@nocobase/plugin-data-visualization 2.1.0-beta.25 → 2.1.0-beta.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/client-v2.d.ts +2 -0
  2. package/client-v2.js +1 -0
  3. package/dist/client-v2/174.75072e326b5a4f8a.js +10 -0
  4. package/dist/client-v2/176.0b68fc9582cfe5a3.js +10 -0
  5. package/dist/client-v2/214.6dda3ffed1dca904.js +10 -0
  6. package/dist/client-v2/542.d15b6fa2a7d6a4e3.js +10 -0
  7. package/dist/client-v2/680.c3725300a5f4414b.js +10 -0
  8. package/dist/client-v2/chart/ChartGroup.d.ts +44 -0
  9. package/dist/client-v2/chart/configs.d.ts +290 -0
  10. package/dist/client-v2/chart/index.d.ts +11 -0
  11. package/dist/client-v2/chart/types.d.ts +103 -0
  12. package/dist/client-v2/flow/components/CodeEditor.d.ts +22 -0
  13. package/dist/client-v2/flow/models/Chart.d.ts +18 -0
  14. package/dist/client-v2/flow/models/ChartBlockModel.d.ts +78 -0
  15. package/dist/client-v2/flow/models/ChartOptionsBuilder.d.ts +23 -0
  16. package/dist/client-v2/flow/models/ChartOptionsBuilder.service.d.ts +58 -0
  17. package/dist/client-v2/flow/models/ChartOptionsEditor.d.ts +16 -0
  18. package/dist/client-v2/flow/models/ChartOptionsPanel.d.ts +11 -0
  19. package/dist/client-v2/flow/models/ConfigPanel.d.ts +10 -0
  20. package/dist/client-v2/flow/models/ECharts.d.ts +20 -0
  21. package/dist/client-v2/flow/models/EventsEditor.d.ts +11 -0
  22. package/dist/client-v2/flow/models/EventsPanel.d.ts +10 -0
  23. package/dist/client-v2/flow/models/QueryBuilder.d.ts +13 -0
  24. package/dist/client-v2/flow/models/QueryBuilder.service.d.ts +20 -0
  25. package/dist/client-v2/flow/models/QueryPanel.d.ts +10 -0
  26. package/dist/client-v2/flow/models/ResultPanel.d.ts +10 -0
  27. package/dist/client-v2/flow/models/SQLEditor.d.ts +10 -0
  28. package/dist/client-v2/flow/models/config-store.d.ts +20 -0
  29. package/dist/client-v2/flow/resources/ChartResource.d.ts +37 -0
  30. package/dist/client-v2/flow/utils.d.ts +50 -0
  31. package/dist/client-v2/hooks/index.d.ts +9 -0
  32. package/dist/client-v2/hooks/useSetChartSize.d.ts +20 -0
  33. package/dist/client-v2/index.d.ts +12 -0
  34. package/dist/client-v2/index.js +10 -0
  35. package/dist/client-v2/locale.d.ts +14 -0
  36. package/dist/client-v2/plugin.d.ts +23 -0
  37. package/dist/externalVersion.js +13 -12
  38. package/dist/node_modules/koa-compose/package.json +1 -1
  39. package/package.json +3 -2
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ (self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["174"],{7737:function(t,e,n){t.exports=n(3789)(n(5036),"DataView")},5072:function(t,e,n){var i=n(9763),r=n(3879),o=n(8150),a=n(7106),s=n(938);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l},5332:function(t,e,n){var i=n(3023),r=n(4747),o=n(9978),a=n(6734),s=n(4710);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l},16:function(t,e,n){t.exports=n(3789)(n(5036),"Map")},1708:function(t,e,n){var i=n(615),r=n(9859),o=n(5170),a=n(8470),s=n(7646);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l},1767:function(t,e,n){t.exports=n(3789)(n(5036),"Promise")},7802:function(t,e,n){t.exports=n(3789)(n(5036),"Set")},6874:function(t,e,n){var i=n(1708),r=n(9871),o=n(1772);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,t.exports=a},9310:function(t,e,n){var i=n(5332),r=n(9333),o=n(1893),a=n(9676),s=n(6536),l=n(3336);function h(t){var e=this.__data__=new i(t);this.size=e.size}h.prototype.clear=r,h.prototype.delete=o,h.prototype.get=a,h.prototype.has=s,h.prototype.set=l,t.exports=h},7432:function(t,e,n){t.exports=n(5036).Symbol},181:function(t,e,n){t.exports=n(5036).Uint8Array},20:function(t,e,n){t.exports=n(3789)(n(5036),"WeakMap")},5773:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var a=t[n];e(a,n,t)&&(o[r++]=a)}return o}},6272:function(t,e,n){var i=n(8355),r=n(7933),o=n(9464),a=n(5752),s=n(1574),l=n(264),h=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),u=!n&&r(t),c=!n&&!u&&a(t),d=!n&&!u&&!c&&l(t),p=n||u||c||d,f=p?i(t.length,String):[],g=f.length;for(var m in t)(e||h.call(t,m))&&!(p&&("length"==m||c&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g)))&&f.push(m);return f}},1595:function(t){t.exports=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}},119:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}},5096:function(t,e,n){var i=n(9679);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return -1}},4090:function(t,e,n){var i=n(1595),r=n(9464);t.exports=function(t,e,n){var o=e(t);return r(t)?o:i(o,n(t))}},6077:function(t,e,n){var i=n(7432),r=n(4444),o=n(3371),a=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?r(t):o(t)}},5301:function(t,e,n){var i=n(6077),r=n(4189);t.exports=function(t){return r(t)&&"[object Arguments]"==i(t)}},6161:function(t,e,n){var i=n(4715),r=n(4189);t.exports=function t(e,n,o,a,s){return e===n||(null!=e&&null!=n&&(r(e)||r(n))?i(e,n,o,a,t,s):e!=e&&n!=n)}},4715:function(t,e,n){var i=n(9310),r=n(8832),o=n(391),a=n(2132),s=n(1344),l=n(9464),h=n(5752),u=n(264),c="[object Arguments]",d="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,m,y){var v=l(t),x=l(e),_=v?d:s(t),b=x?d:s(e);_=_==c?p:_,b=b==c?p:b;var w=_==p,S=b==p,M=_==b;if(M&&h(t)){if(!h(e))return!1;v=!0,w=!1}if(M&&!w)return y||(y=new i),v||u(t)?r(t,e,n,g,m,y):o(t,e,_,n,g,m,y);if(!(1&n)){var C=w&&f.call(t,"__wrapped__"),k=S&&f.call(e,"__wrapped__");if(C||k){var T=C?t.value():t,I=k?e.value():e;return y||(y=new i),m(T,I,n,g,y)}}return!!M&&(y||(y=new i),a(t,e,n,g,m,y))}},9950:function(t,e,n){var i=n(6553),r=n(3909),o=n(6130),a=n(2760),s=/^\[object .+?Constructor\]$/,l=Object.prototype,h=Function.prototype.toString,u=l.hasOwnProperty,c=RegExp("^"+h.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||r(t))&&(i(t)?c:s).test(a(t))}},8912:function(t,e,n){var i=n(6077),r=n(5841),o=n(4189),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&r(t.length)&&!!a[i(t)]}},4829:function(t,e,n){var i=n(2632),r=n(9963),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},8355:function(t){t.exports=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}},7746:function(t){t.exports=function(t){return function(e){return t(e)}}},4854:function(t){t.exports=function(t,e){return t.has(e)}},4780:function(t,e,n){t.exports=n(5036)["__core-js_shared__"]},8832:function(t,e,n){var i=n(6874),r=n(119),o=n(4854);t.exports=function(t,e,n,a,s,l){var h=1&n,u=t.length,c=e.length;if(u!=c&&!(h&&c>u))return!1;var d=l.get(t),p=l.get(e);if(d&&p)return d==e&&p==t;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(t,e),l.set(e,t);++f<u;){var y=t[f],v=e[f];if(a)var x=h?a(v,y,f,e,t,l):a(y,v,f,t,e,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!r(e,function(t,e){if(!o(m,e)&&(y===t||s(y,t,n,a,l)))return m.push(e)})){g=!1;break}}else if(!(y===v||s(y,v,n,a,l))){g=!1;break}}return l.delete(t),l.delete(e),g}},391:function(t,e,n){var i=n(7432),r=n(181),o=n(9679),a=n(8832),s=n(5860),l=n(4886),h=i?i.prototype:void 0,u=h?h.valueOf:void 0;t.exports=function(t,e,n,i,h,c,d){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!c(new r(t),new r(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=s;case"[object Set]":var f=1&i;if(p||(p=l),t.size!=e.size&&!f)break;var g=d.get(t);if(g)return g==e;i|=2,d.set(t,e);var m=a(p(t),p(e),i,h,c,d);return d.delete(t),m;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},2132:function(t,e,n){var i=n(1679),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var l=1&n,h=i(t),u=h.length;if(u!=i(e).length&&!l)return!1;for(var c=u;c--;){var d=h[c];if(!(l?d in e:r.call(e,d)))return!1}var p=s.get(t),f=s.get(e);if(p&&f)return p==e&&f==t;var g=!0;s.set(t,e),s.set(e,t);for(var m=l;++c<u;){var y=t[d=h[c]],v=e[d];if(o)var x=l?o(v,y,d,e,t,s):o(y,v,d,t,e,s);if(!(void 0===x?y===v||a(y,v,n,o,s):x)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var _=t.constructor,b=e.constructor;_!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(g=!1)}return s.delete(t),s.delete(e),g}},8565:function(t,e,n){t.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},1679:function(t,e,n){var i=n(4090),r=n(1809),o=n(9125);t.exports=function(t){return i(t,o,r)}},5930:function(t,e,n){var i=n(29);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},3789:function(t,e,n){var i=n(9950),r=n(8869);t.exports=function(t,e){var n=r(t,e);return i(n)?n:void 0}},4444:function(t,e,n){var i=n(7432),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,s=i?i.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var i=!0}catch(t){}var r=a.call(t);return i&&(e?t[s]=n:delete t[s]),r}},1809:function(t,e,n){var i=n(5773),r=n(3864),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(t){return null==t?[]:i(a(t=Object(t)),function(e){return o.call(t,e)})}:r},1344:function(t,e,n){var i=n(7737),r=n(16),o=n(1767),a=n(7802),s=n(20),l=n(6077),h=n(2760),u="[object Map]",c="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",g=h(i),m=h(r),y=h(o),v=h(a),x=h(s),_=l;(i&&_(new i(new ArrayBuffer(1)))!=f||r&&_(new r)!=u||o&&_(o.resolve())!=c||a&&_(new a)!=d||s&&_(new s)!=p)&&(_=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,i=n?h(n):"";if(i)switch(i){case g:return f;case m:return u;case y:return c;case v:return d;case x:return p}return e}),t.exports=_},8869:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},9763:function(t,e,n){var i=n(267);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},3879:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e}},8150:function(t,e,n){var i=n(267),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},7106:function(t,e,n){var i=n(267),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:r.call(e,t)}},938:function(t,e,n){var i=n(267);t.exports=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},1574:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<n}},29:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},3909:function(t,e,n){var i,r=n(4780),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!o&&o in t}},2632:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},3023:function(t){t.exports=function(){this.__data__=[],this.size=0}},4747:function(t,e,n){var i=n(5096),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},9978:function(t,e,n){var i=n(5096);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},6734:function(t,e,n){var i=n(5096);t.exports=function(t){return i(this.__data__,t)>-1}},4710:function(t,e,n){var i=n(5096);t.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},615:function(t,e,n){var i=n(5072),r=n(5332),o=n(16);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},9859:function(t,e,n){var i=n(5930);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=!!e,e}},5170:function(t,e,n){var i=n(5930);t.exports=function(t){return i(this,t).get(t)}},8470:function(t,e,n){var i=n(5930);t.exports=function(t){return i(this,t).has(t)}},7646:function(t,e,n){var i=n(5930);t.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this}},5860:function(t){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}},267:function(t,e,n){t.exports=n(3789)(Object,"create")},9963:function(t,e,n){t.exports=n(2344)(Object.keys,Object)},1172:function(t,e,n){t=n.nmd(t);var i=n(8565),r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,a=o&&o.exports===r&&i.process,s=function(){try{var t=o&&o.require&&o.require("util").types;if(t)return t;return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},3371:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},2344:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},5036:function(t,e,n){var i=n(8565),r="object"==typeof self&&self&&self.Object===Object&&self;t.exports=i||r||Function("return this")()},9871:function(t){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1772:function(t){t.exports=function(t){return this.__data__.has(t)}},4886:function(t){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},9333:function(t,e,n){var i=n(5332);t.exports=function(){this.__data__=new i,this.size=0}},1893:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},9676:function(t){t.exports=function(t){return this.__data__.get(t)}},6536:function(t){t.exports=function(t){return this.__data__.has(t)}},3336:function(t,e,n){var i=n(5332),r=n(16),o=n(1708);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!r||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},2760:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},9679:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},7933:function(t,e,n){var i=n(5301),r=n(4189),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable;t.exports=i(function(){return arguments}())?i:function(t){return r(t)&&a.call(t,"callee")&&!s.call(t,"callee")}},9464:function(t){t.exports=Array.isArray},623:function(t,e,n){var i=n(6553),r=n(5841);t.exports=function(t){return null!=t&&r(t.length)&&!i(t)}},5752:function(t,e,n){t=n.nmd(t);var i=n(5036),r=n(8042),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?i.Buffer:void 0,l=s?s.isBuffer:void 0;t.exports=l||r},4169:function(t,e,n){var i=n(6161);t.exports=function(t,e){return i(t,e)}},6553:function(t,e,n){var i=n(6077),r=n(6130);t.exports=function(t){if(!r(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5841:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}},6130:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},4189:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},264:function(t,e,n){var i=n(8912),r=n(7746),o=n(1172),a=o&&o.isTypedArray;t.exports=a?r(a):i},9125:function(t,e,n){var i=n(6272),r=n(4829),o=n(623);t.exports=function(t){return o(t)?i(t):r(t)}},3864:function(t){t.exports=function(){return[]}},8042:function(t){t.exports=function(){return!1}},8668:function(t,e,n){"use strict";n.d(e,{tH:function(){return a}});var i=n(9155);let r=(0,i.createContext)(null),o={didCatch:!1,error:null};class a extends i.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=o}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){let{error:t}=this.state;if(null!==t){for(var e,n,i=arguments.length,r=Array(i),a=0;a<i;a++)r[a]=arguments[a];null==(e=(n=this.props).onReset)||e.call(n,{args:r,reason:"imperative-api"}),this.setState(o)}}componentDidCatch(t,e){var n,i;null==(n=(i=this.props).onError)||n.call(i,t,e)}componentDidUpdate(t,e){let{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&null!==e.error&&function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length!==e.length||t.some((t,n)=>!Object.is(t,e[n]))}(t.resetKeys,i)){var r,a;null==(r=(a=this.props).onReset)||r.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(o)}}render(){let{children:t,fallbackRender:e,FallbackComponent:n,fallback:o}=this.props,{didCatch:a,error:s}=this.state,l=t;if(a){let t={error:s,resetErrorBoundary:this.resetErrorBoundary};if((0,i.isValidElement)(o))l=o;else if("function"==typeof e)l=e(t);else if(n)l=(0,i.createElement)(n,t);else throw s}return(0,i.createElement)(r.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}}},9547:function(t,e,n){"use strict";n.d(e,{Ar:function(){return h},Bc:function(){return tx},Gw:function(){return ts},OO:function(){return tC},et:function(){return l},wm:function(){return tp},yU:function(){return tM}});var i=n(3492),r=n(7867),o=n(8169);class a{constructor(t,e,n,i){this.state=t,this.pos=e,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=(0,o.mv)(this.state).resolveInner(this.pos,-1);for(;e&&0>t.indexOf(e.name);)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),n=Math.max(e.from,this.pos-250),i=e.text.slice(n-e.from,this.pos-e.from),r=i.search(d(t,!1));return r<0?null:{from:n+r,to:this.pos,text:i.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,n){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function s(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function l(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[n,i]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let t=1;t<i.length;t++)n[i[t]]=!0}let i=s(e)+s(n)+"*$";return[RegExp("^"+i),new RegExp(i)]}(e);return t=>{let r=t.matchBefore(i);return r||t.explicit?{from:r?r.from:t.pos,options:e,validFor:n}:null}}function h(t,e){return n=>{for(let e=(0,o.mv)(n.state).resolveInner(n.pos,-1);e;e=e.parent){if(t.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return e(n)}}class u{constructor(t,e,n,i){this.completion=t,this.source=e,this.match=n,this.score=i}}function c(t){return t.selection.main.from}function d(t,e){var n;let{source:i}=t,r=e&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,null!=(n=t.flags)?n:t.ignoreCase?"i":""):t}let p=i.YH.define(),f=new WeakMap;function g(t){if(!Array.isArray(t))return t;let e=f.get(t);return e||f.set(t,e=l(t)),e}let m=i.Pe.define(),y=i.Pe.define();class v{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let n=(0,i.vS)(t,e),r=(0,i.Fh)(n);this.chars.push(n);let o=t.slice(e,e+r),a=o.toUpperCase();this.folded.push((0,i.vS)(a==o?o.toLowerCase():a,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:n,any:r,precise:o,byWord:a}=this;if(1==e.length){let r=(0,i.vS)(t,0),o=(0,i.Fh)(r),a=o==t.length?0:-100;if(r==e[0]);else{if(r!=n[0])return null;a+=-200}return this.ret(a,[0,o])}let s=t.indexOf(this.pattern);if(0==s)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=e.length,h=0;if(s<0){for(let o=0,a=Math.min(t.length,200);o<a&&h<l;){let a=(0,i.vS)(t,o);(a==e[h]||a==n[h])&&(r[h++]=o),o+=(0,i.Fh)(a)}if(h<l)return null}let u=0,c=0,d=!1,p=0,f=-1,g=-1,m=/[a-z]/.test(t),y=!0;for(let r=0,h=Math.min(t.length,200),v=0;r<h&&c<l;){let h=(0,i.vS)(t,r);s<0&&(u<l&&h==e[u]&&(o[u++]=r),p<l&&(h==e[p]||h==n[p]?(0==p&&(f=r),g=r+1,p++):p=0));let x,_=h<255?h>=48&&h<=57||h>=97&&h<=122?2:+(h>=65&&h<=90):(x=(0,i.MK)(h))!=x.toLowerCase()?1:2*(x!=x.toUpperCase());(!r||1==_&&m||0==v&&0!=_)&&(e[c]==h||n[c]==h&&(d=!0)?a[c++]=r:a.length&&(y=!1)),v=_,r+=(0,i.Fh)(h)}return c==l&&0==a[0]&&y?this.result(-100+(d?-200:0),a,t):p==l&&0==f?this.ret(-200-t.length+(g==t.length?0:-100),[0,g]):s>-1?this.ret(-700-t.length,[s,s+this.pattern.length]):p==l?this.ret(-900-t.length,[f,g]):c==l?this.result(-100+(d?-200:0)+-700+(y?0:-1100),a,t):2==e.length?null:this.result((r[0]?-700:0)+-200+-1100,r,t)}result(t,e,n){let r=[],o=0;for(let t of e){let e=t+(this.astral?(0,i.Fh)((0,i.vS)(n,t)):1);o&&r[o-1]==t?r[o-1]=e:(r[o++]=t,r[o++]=e)}return this.ret(t-n.length,r)}}class x{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),n=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,e.length],this.score=n+(t.length==this.pattern.length?0:-100),this)}}let _=i.sj.define({combine:t=>(0,i.QR)(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:w,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>n=>b(t(n),e(n)),optionClass:(t,e)=>n=>b(t(n),e(n)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function b(t,e){return t?e?t+" "+e:t:e}function w(t,e,n,i,o,a){let s=t.textDirection==r.OP.RTL,l=s,h=!1,u="top",c,d,p=e.left-o.left,f=o.right-e.right,g=i.right-i.left,m=i.bottom-i.top;if(l&&p<Math.min(g,f)?l=!1:!l&&f<Math.min(g,p)&&(l=!0),g<=(l?p:f))c=Math.max(o.top,Math.min(n.top,o.bottom-m))-e.top,d=Math.min(400,l?p:f);else{h=!0,d=Math.min(400,(s?e.right:o.right-e.left)-30);let t=o.bottom-e.bottom;t>=m||t>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/a.offsetHeight,v=(e.right-e.left)/a.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/v}px`,class:"cm-completionInfo-"+(h?s?"left-narrow":"right-narrow":l?"left":"right")}}function S(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/n);return{from:t*n,to:(t+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class M{constructor(t,e,n){this.view=t,this.stateField=e,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let i=t.state.field(e),{options:r,selected:o}=i.open,a=t.state.facet(_);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,n,i){let r=document.createElement("span");r.className="cm-completionLabel";let o=t.displayLabel||t.label,a=0;for(let t=0;t<i.length;){let e=i[t++],n=i[t++];e>a&&r.appendChild(document.createTextNode(o.slice(a,e)));let s=r.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(o.slice(e,n))),s.className="cm-completionMatchedText",a=n}return a<o.length&&r.appendChild(document.createTextNode(o.slice(a))),r},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort((t,e)=>t.position-e.position).map(t=>t.render)}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=S(r.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",n=>{let{options:i}=t.state.field(e).open;for(let e=n.target,r;e&&e!=this.dom;e=e.parentNode)if("LI"==e.nodeName&&(r=/-(\d+)$/.exec(e.id))&&+r[1]<i.length){this.applyCompletion(t,i[+r[1]]),n.preventDefault();return}}),this.dom.addEventListener("focusout",e=>{let n=t.state.field(this.stateField,!1);n&&n.tooltip&&t.state.facet(_).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:y.of(null)})}),this.showOptions(r,i.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var e;let n=t.state.field(this.stateField),i=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),n!=i){let{options:r,selected:o,disabled:a}=n.open;i.open&&i.open.options==r||(this.range=S(r.length,o,t.state.facet(_).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),a!=(null==(e=i.open)?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=S(e.options.length,e.selected,this.view.state.facet(_).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:n}=e.options[e.selected],{info:i}=n;if(!i)return;let o="string"==typeof i?document.createTextNode(i):i(n);if(!o)return;"then"in o?o.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)}).catch(t=>(0,r.c_)(this.view.state,t,"completion info")):this.addInfoPane(o,n)}}addInfoPane(t,e){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=t.nodeType)n.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:i}=t;n.appendChild(e),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){var e,n;let i,r,o,a=null;for(let e=this.list.firstChild,n=this.range.from;e;e=e.nextSibling,n++)"LI"==e.nodeName&&e.id?n==t?e.hasAttribute("aria-selected")||(e.setAttribute("aria-selected","true"),a=e):e.hasAttribute("aria-selected")&&e.removeAttribute("aria-selected"):n--;return a&&(e=this.list,n=a,i=e.getBoundingClientRect(),r=n.getBoundingClientRect(),o=i.height/e.offsetHeight,r.top<i.top?e.scrollTop-=(i.top-r.top)/o:r.bottom>i.bottom&&(e.scrollTop+=(r.bottom-i.bottom)/o)),a}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=t.getBoundingClientRect(),r=this.space;if(!r){let t=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return i.top>Math.min(r.bottom,e.bottom)-10||i.bottom<Math.max(r.top,e.top)+10?null:this.view.state.facet(_).positionInfo(this.view,e,i,n,r,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,n){let i=document.createElement("ul");i.id=e,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",t=>{t.target==i&&t.preventDefault()});let r=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:s}=t[o],{section:l}=a;if(l){let t="string"==typeof l?l:l.name;t!=r&&(o>n.from||0==n.from)&&(r=t,"string"!=typeof l&&l.header?i.appendChild(l.header(l)):i.appendChild(document.createElement("completion-section")).textContent=t)}let h=i.appendChild(document.createElement("li"));h.id=e+"-"+o,h.setAttribute("role","option");let u=this.optionClass(a);for(let t of(u&&(h.className=u),this.optionContent)){let e=t(a,this.view.state,this.view,s);e&&h.appendChild(e)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<t.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function C(t){return 100*(t.boost||0)+10*!!t.apply+5*!!t.info+ +!!t.type}class k{constructor(t,e,n,i,r,o){this.options=t,this.attrs=e,this.tooltip=n,this.timestamp=i,this.selected=r,this.disabled=o}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new k(this.options,D(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,n,i,r,o){if(i&&!o&&t.some(t=>t.isPending))return i.setDisabled();let a=function(t,e){let n=[],i=null,r=t=>{n.push(t);let{section:e}=t.completion;if(e){i||(i=[]);let t="string"==typeof e?e:e.name;i.some(e=>e.name==t)||i.push("string"==typeof e?{name:t}:e)}},o=e.facet(_);for(let i of t)if(i.hasResult()){let t=i.result.getMatch;if(!1===i.result.filter)for(let e of i.result.options)r(new u(e,i.source,t?t(e):[],1e9-n.length));else{let n=e.sliceDoc(i.from,i.to),a,s=o.filterStrict?new x(n):new v(n);for(let e of i.result.options)if(a=s.match(e.label)){let n=e.displayLabel?t?t(e,a.matched):[]:a.matched;r(new u(e,i.source,n,a.score+(e.boost||0)))}}}if(i){let t=Object.create(null),e=0;for(let n of i.sort((t,e)=>{var n,i;return(null!=(n=t.rank)?n:1e9)-(null!=(i=e.rank)?i:1e9)||(t.name<e.name?-1:1)}))e-=1e5,t[n.name]=e;for(let e of n){let{section:n}=e.completion;n&&(e.score+=t["string"==typeof n?n:n.name])}}let a=[],s=null,l=o.compareCompletions;for(let t of n.sort((t,e)=>e.score-t.score||l(t.completion,e.completion))){let e=t.completion;s&&s.label==e.label&&s.detail==e.detail&&(null==s.type||null==e.type||s.type==e.type)&&s.apply==e.apply&&s.boost==e.boost?C(t.completion)>C(s)&&(a[a.length-1]=t):a.push(t),s=t.completion}return a}(t,e);if(!a.length)return i&&t.some(t=>t.isPending)?i.setDisabled():null;let s=e.facet(_).selectOnOpen?0:-1;if(i&&i.selected!=s&&-1!=i.selected){let t=i.options[i.selected].completion;for(let e=0;e<a.length;e++)if(a[e].completion==t){s=e;break}}return new k(a,D(n,s),{pos:t.reduce((t,e)=>e.hasResult()?Math.min(t,e.from):t,1e8),create:V,above:r.aboveCursor},i?i.timestamp:Date.now(),s,!1)}map(t){return new k(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new k(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class T{constructor(t,e,n){this.active=t,this.id=e,this.open=n}static start(){return new T(L,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,n=e.facet(_),i=(n.override||e.languageDataAt("autocomplete",c(e)).map(g)).map(e=>(this.active.find(t=>t.source==e)||new P(e,+!!this.active.some(t=>0!=t.state))).update(t,n));i.length==this.active.length&&i.every((t,e)=>t==this.active[e])&&(i=this.active);let r=this.open,o=t.effects.some(t=>t.is(N));for(let a of(r&&t.docChanged&&(r=r.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,o=i==e.length;if(r||o)return r==o;if(t[n++].result!=e[i++].result)return!1}}(i,this.active)||o?r=k.build(i,e,this.id,r,n,o):r&&r.disabled&&!i.some(t=>t.isPending)&&(r=null),!r&&i.every(t=>!t.isPending)&&i.some(t=>t.hasResult())&&(i=i.map(t=>t.hasResult()?new P(t.source,0):t)),t.effects))a.is(E)&&(r=r&&r.setSelected(a.value,this.id));return i==this.active&&r==this.open?this:new T(i,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?I:A}}let I={"aria-autocomplete":"list"},A={};function D(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}let L=[];function O(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(p);if(n&&e.activateOnCompletion(n))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:16*!!t.docChanged}class P{constructor(t,e,n=!1){this.source=t,this.state=e,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let n=O(t,e),i=this;for(let e of((8&n||16&n&&this.touches(t))&&(i=new P(i.source,0)),4&n&&0==i.state&&(i=new P(this.source,1)),i=i.updateFor(t,n),t.effects))if(e.is(m))i=new P(i.source,1,e.value);else if(e.is(y))i=new P(i.source,0);else if(e.is(N))for(let t of e.value)t.source==i.source&&(i=t);return i}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(c(t.state))}}class R extends P{constructor(t,e,n,i,r,o){super(t,3,e),this.limit=n,this.result=i,this.from=r,this.to=o}hasResult(){return!0}updateFor(t,e){var n;if(!(3&e))return this.map(t.changes);let i=this.result;i.map&&!t.changes.empty&&(i=i.map(i,t.changes));let r=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),s=c(t.state);if(s>o||!i||2&e&&(c(t.startState)==this.from||s<this.limit))return new P(this.source,4&e?1:0);let l=t.changes.mapPos(this.limit);return!function(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return"function"==typeof t?t(r,n,i,e):d(t,!0).test(r)}(i.validFor,t.state,r,o)?i.update&&(i=i.update(i,r,o,new a(t.state,s,!1)))?new R(this.source,this.explicit,l,i,i.from,null!=(n=i.to)?n:c(t.state)):new P(this.source,1,this.explicit):new R(this.source,this.explicit,l,i,r,o)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new R(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new P(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}let N=i.Pe.define({map:(t,e)=>t.map(t=>t.map(e))}),E=i.Pe.define(),B=i.sU.define({create:()=>T.start(),update:(t,e)=>t.update(e),provide:t=>[r.DK.from(t,t=>t.tooltip),r.Lz.contentAttributes.from(t,t=>t.attrs)]});function z(t,e){let n=e.completion.apply||e.completion.label,r=t.state.field(B).active.find(t=>t.source==e.source);return r instanceof R&&("string"==typeof n?t.dispatch(Object.assign(Object.assign({},function(t,e,n,r){let{main:o}=t.selection,a=n-o.from,s=r-o.from;return Object.assign(Object.assign({},t.changeByRange(l=>{if(l!=o&&n!=r&&t.sliceDoc(l.from+a,l.from+s)!=t.sliceDoc(n,r))return{range:l};let h=t.toText(e);return{changes:{from:l.from+a,to:r==o.from?l.to:l.from+s,insert:h},range:i.OF.cursor(l.from+a+h.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,n,r.from,r.to)),{annotations:p.of(e.completion)})):n(t,e.completion,r.from,r.to),!0)}let V=t=>new M(t,B,z);function F(t,e="option"){return n=>{let i=n.state.field(B,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(_).interactionDelay)return!1;let o=1,a;"page"==e&&(a=(0,r.Eg)(n,i.open.tooltip))&&(o=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector("li").offsetHeight)-1));let{length:s}=i.open.options,l=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return l<0?l="page"==e?0:s-1:l>=s&&(l="page"==e?s-1:0),n.dispatch({effects:E.of(l)}),!0}}let W=t=>!!t.state.field(B,!1)&&(t.dispatch({effects:m.of(!0)}),!0);class H{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}let G=r.Z9.fromClass(class{constructor(t){for(let e of(this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0,t.state.field(B).active))e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(B),n=t.state.facet(_);if(!t.selectionSet&&!t.docChanged&&t.startState.field(B)==e)return;let i=t.transactions.some(t=>{let e=O(t,n);return 8&e||(t.selection||t.docChanged)&&!(3&e)});for(let e=0;e<this.running.length;e++){let n=this.running[e];if(i||n.context.abortOnDocChange&&t.docChanged||n.updates.length+t.transactions.length>50&&Date.now()-n.time>1e3){for(let t of n.context.abortListeners)try{t()}catch(t){(0,r.c_)(this.view.state,t)}n.context.abortListeners=null,this.running.splice(e--,1)}else n.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(t=>t.effects.some(t=>t.is(m)))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(t=>t.isPending&&!this.running.some(e=>e.active.source==t.source))?setTimeout(()=>this.startUpdate(),o):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(B);for(let t of e.active)t.isPending&&!this.running.some(e=>e.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=c(e),i=new a(e,n,t.explicit,this.view),o=new H(t,i);this.running.push(o),Promise.resolve(t.source(i)).then(t=>{o.context.aborted||(o.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:y.of(null)}),(0,r.c_)(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(_),i=this.view.state.field(B);for(let r=0;r<this.running.length;r++){let o=this.running[r];if(void 0===o.done)continue;if(this.running.splice(r--,1),o.done){let i=c(o.updates.length?o.updates[0].startState:this.view.state),r=Math.min(i,o.done.from+ +!o.active.explicit),a=new R(o.active.source,o.active.explicit,r,o.done,o.done.from,null!=(t=o.done.to)?t:i);for(let t of o.updates)a=a.update(t,n);if(a.hasResult()){e.push(a);continue}}let a=i.active.find(t=>t.source==o.active.source);if(a&&a.isPending)if(null==o.done){let t=new P(o.active.source,0);for(let e of o.updates)t=t.update(e,n);t.isPending||e.push(t)}else this.startQuery(a)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:N.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(B,!1);if(e&&e.tooltip&&this.view.state.facet(_).closeOnBlur){let n=e.open&&(0,r.Eg)(this.view,e.open.tooltip);n&&n.dom.contains(t.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:y.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:m.of(!1)}),20),this.composing=0}}}),U="object"==typeof navigator&&/Win/.test(navigator.platform),j=i.Nb.highest(r.Lz.domEventHandlers({keydown(t,e){let n=e.state.field(B,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(U&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(t=>t.source==i.source),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&z(e,i),!1}})),Y=r.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class X{constructor(t,e,n,i){this.field=t,this.line=e,this.from=n,this.to=i}}class Z{constructor(t,e,n){this.field=t,this.from=e,this.to=n}map(t){let e=t.mapPos(this.from,-1,i.iR.TrackDel),n=t.mapPos(this.to,1,i.iR.TrackDel);return null==e||null==n?null:new Z(this.field,e,n)}}class q{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let n=[],i=[e],r=t.doc.lineAt(e),a=/^\s*/.exec(r.text)[0];for(let r of this.lines){if(n.length){let n=a,s=/^\t*/.exec(r)[0].length;for(let e=0;e<s;e++)n+=t.facet(o.Xt);i.push(e+n.length-s),r=n+r.slice(s)}n.push(r),e+=r.length+1}return{text:n,ranges:this.fieldPositions.map(t=>new Z(t.field,i[t.line]+t.from,i[t.line]+t.to))}}static parse(t){let e=[],n=[],i=[],r;for(let o of t.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let t=r[1]?+r[1]:null,a=r[2]||r[3]||"",s=-1,l=a.replace(/\\[{}]/g,t=>t[1]);for(let n=0;n<e.length;n++)(null!=t?e[n].seq==t:l&&e[n].name==l)&&(s=n);if(s<0){let n=0;for(;n<e.length&&(null==t||null!=e[n].seq&&e[n].seq<t);)n++;for(let r of(e.splice(n,0,{seq:t,name:l}),s=n,i))r.field>=s&&r.field++}i.push(new X(s,n.length,r.index,r.index+l.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(t,e,r)=>{for(let t of i)t.line==n.length&&t.from>r&&(t.from--,t.to--);return e}),n.push(o)}return new q(n,i)}}let K=r.NZ.widget({widget:new class extends r.xO{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),$=r.NZ.mark({class:"cm-snippetField"});class J{constructor(t,e){this.ranges=t,this.active=e,this.deco=r.NZ.set(t.map(t=>(t.from==t.to?K:$).range(t.from,t.to)))}map(t){let e=[];for(let n of this.ranges){let i=n.map(t);if(!i)return null;e.push(i)}return new J(e,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))}}let Q=i.Pe.define({map:(t,e)=>t&&t.map(e)}),tt=i.Pe.define(),te=i.sU.define({create:()=>null,update(t,e){for(let n of e.effects){if(n.is(Q))return n.value;if(n.is(tt)&&t)return new J(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>r.Lz.decorations.from(t,t=>t?t.deco:r.NZ.none)});function tn(t,e){return i.OF.create(t.filter(t=>t.field==e).map(t=>i.OF.range(t.from,t.to)))}function ti(t){return({state:e,dispatch:n})=>{let i=e.field(te,!1);if(!i||t<0&&0==i.active)return!1;let r=i.active+t,o=t>0&&!i.ranges.some(e=>e.field==r+t);return n(e.update({selection:tn(i.ranges,r),effects:Q.of(o?null:new J(i.ranges,r)),scrollIntoView:!0})),!0}}let tr=[{key:"Tab",run:ti(1),shift:ti(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(te,!1)&&(e(t.update({effects:Q.of(null)})),!0)}],to=i.sj.define({combine:t=>t.length?t[0]:tr}),ta=i.Nb.highest(r.w4.compute([to],t=>t.facet(to)));function ts(t,e){let n;return Object.assign(Object.assign({},e),{apply:(n=q.parse(t),(t,e,r,o)=>{let{text:a,ranges:s}=n.instantiate(t.state,r),{main:l}=t.state.selection,h={changes:{from:r,to:o==l.from?l.to:o,insert:i.EY.of(a)},scrollIntoView:!0,annotations:e?[p.of(e),i.ZX.userEvent.of("input.complete")]:void 0};if(s.length&&(h.selection=tn(s,0)),s.some(t=>t.field>0)){let e=new J(s,0),n=h.effects=[Q.of(e)];void 0===t.state.field(te,!1)&&n.push(i.Pe.appendConfig.of([te,ta,tl,Y]))}t.dispatch(t.state.update(h))})})}let tl=r.Lz.domEventHandlers({mousedown(t,e){let n=e.state.field(te,!1),i;if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let r=n.ranges.find(t=>t.from<=i&&t.to>=i);return!!r&&r.field!=n.active&&(e.dispatch({selection:tn(n.ranges,r.field),effects:Q.of(n.ranges.some(t=>t.field>r.field)?new J(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),th={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},tu=i.Pe.define({map(t,e){let n=e.mapPos(t,-1,i.iR.TrackAfter);return null==n?void 0:n}}),tc=new class extends i.FB{};tc.startSide=1,tc.endSide=-1;let td=i.sU.define({create:()=>i.om.empty,update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=n.from&&t<=n.to})}for(let n of e.effects)n.is(tu)&&(t=t.update({add:[tc.range(n.value,n.value+1)]}));return t}});function tp(){return[tv,td]}let tf="()[]{}<>\xab\xbb\xbb\xab[]{}";function tg(t){for(let e=0;e<tf.length;e+=2)if(tf.charCodeAt(e)==t)return tf.charAt(e+1);return(0,i.MK)(t<128?t:t+1)}function tm(t,e){return t.languageDataAt("closeBrackets",e)[0]||th}let ty="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),tv=r.Lz.inputHandler.of((t,e,n,r)=>{if((ty?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let a=t.state.selection.main;if(r.length>2||2==r.length&&1==(0,i.Fh)((0,i.vS)(r,0))||e!=a.from||n!=a.to)return!1;let s=function(t,e){let n=tm(t,t.selection.main.head),r=n.brackets||th.brackets;for(let a of r){let s=tg((0,i.vS)(a,0));if(e==a)return s==a?function(t,e,n,r){let a=r.stringPrefixes||th.stringPrefixes,s=null,l=t.changeByRange(r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:tu.of(r.to+e.length),range:i.OF.range(r.anchor+e.length,r.head+e.length)};let l=r.head,h=tb(t.doc,l),u;if(h==e){if(tw(t,l))return{changes:{insert:e+e,from:l},effects:tu.of(l+e.length),range:i.OF.cursor(l+e.length)};else if(t_(t,l)){let r=n&&t.sliceDoc(l,l+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+r.length,insert:r},range:i.OF.cursor(l+r.length)}}}else if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=tS(t,l-2*e.length,a))>-1&&tw(t,u))return{changes:{insert:e+e+e+e,from:l},effects:tu.of(l+e.length),range:i.OF.cursor(l+e.length)};else if(t.charCategorizer(l)(h)!=i.Je.Word&&tS(t,l,a)>-1&&!function(t,e,n,i){let r=(0,o.mv)(t).resolveInner(e,-1),a=i.reduce((t,e)=>Math.max(t,e.length),0);for(let o=0;o<5;o++){let o=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&i.indexOf(o.slice(0,s))>-1){let e=r.firstChild;for(;e&&e.from==r.from&&e.to-e.from>n.length+s;){if(t.sliceDoc(e.to-n.length,e.to)==n)return!1;e=e.firstChild}return!0}let l=r.to==e&&r.parent;if(!l)break;r=l}return!1}(t,l,e,a))return{changes:{insert:e+e,from:l},effects:tu.of(l+e.length),range:i.OF.cursor(l+e.length)};return{range:s=r}});return s?null:t.update(l,{scrollIntoView:!0,userEvent:"input.type"})}(t,a,r.indexOf(a+a+a)>-1,n):function(t,e,n,r){let o=null,a=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:tu.of(a.to+e.length),range:i.OF.range(a.anchor+e.length,a.head+e.length)};let s=tb(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:tu.of(a.head+e.length),range:i.OF.cursor(a.head+e.length)}:{range:o=a}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(t,a,s,n.before||th.before);if(e==s&&t_(t,t.selection.main.from))return function(t,e){let n=null,r=t.changeByRange(r=>r.empty&&tb(t.doc,r.head)==e?{changes:{from:r.head,to:r.head+e.length,insert:e},range:i.OF.cursor(r.head+e.length)}:n={range:r});return n?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}(t,s)}return null}(t.state,r);return!!s&&(t.dispatch(s),!0)}),tx=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=tm(t,t.selection.main.head).brackets||th.brackets,r=null,o=t.changeByRange(e=>{if(e.empty){var o,a;let r,s=(o=t.doc,a=e.head,r=o.sliceString(a-2,a),(0,i.Fh)((0,i.vS)(r,0))==r.length?r:r.slice(1));for(let r of n)if(r==s&&tb(t.doc,e.head)==tg((0,i.vS)(r,0)))return{changes:{from:e.head-r.length,to:e.head+r.length},range:i.OF.cursor(e.head-r.length)}}return{range:r=e}});return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function t_(t,e){let n=!1;return t.field(td).between(0,t.doc.length,t=>{t==e&&(n=!0)}),n}function tb(t,e){let n=t.sliceString(e,e+2);return n.slice(0,(0,i.Fh)((0,i.vS)(n,0)))}function tw(t,e){let n=(0,o.mv)(t).resolveInner(e+1);return n.parent&&n.from==e}function tS(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=i.Je.Word)return e;for(let o of n){let n=e-o.length;if(t.sliceDoc(n,e)==o&&r(t.sliceDoc(n-1,n))!=i.Je.Word)return n}return -1}function tM(t={}){return[j,B,_.of(t),G,tk,Y]}let tC=[{key:"Ctrl-Space",run:W},{mac:"Alt-`",run:W},{key:"Escape",run:t=>{let e=t.state.field(B,!1);return!!e&&!!e.active.some(t=>0!=t.state)&&(t.dispatch({effects:y.of(null)}),!0)}},{key:"ArrowDown",run:F(!0)},{key:"ArrowUp",run:F(!1)},{key:"PageDown",run:F(!0,"page")},{key:"PageUp",run:F(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(B,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(_).interactionDelay)&&z(t,e.open.options[e.open.selected])}}],tk=i.Nb.highest(r.w4.computeN([_],t=>t.facet(_).defaultKeymap?[tC]:[]))},8169:function(t,e,n){"use strict";n.d(e,{Ay:function(){return E},EI:function(){return A},KB:function(){return L},Lv:function(){return th},Oh:function(){return O},Q0:function(){return c},SG:function(){return tC},WD:function(){return F},Xt:function(){return T},Yy:function(){return C},Zt:function(){return ty},_Y:function(){return z},_v:function(){return D},b_:function(){return H},bj:function(){return f},cr:function(){return tc},f7:function(){return tt},jU:function(){return tA},mv:function(){return g},mz:function(){return V},p9:function(){return u},tp:function(){return I},y9:function(){return tg},yd:function(){return G}});var i,r=n(1080),o=n(3492),a=n(7867),s=n(2619),l=n(5690);let h=new r.uY;function u(t){return o.sj.define({combine:t?e=>e.concat(t):void 0})}let c=new r.uY;class d{constructor(t,e,n=[],i=""){this.data=t,this.name=i,o.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(o.$t.prototype,"tree",{get(){return g(this)}}),this.parser=e,this.extension=[M.of(this),o.$t.languageData.of((t,e,n)=>{let i=p(t,e,n),r=i.type.prop(h);if(!r)return[];let o=t.facet(r),a=i.type.prop(c);if(a){let r=i.resolve(e-i.from,n);for(let e of a)if(e.test(r,t)){let n=t.facet(e.facet);return"replace"==e.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(t,e,n=-1){return p(t,e,n).type.prop(h)==this.data}findRegions(t){let e=t.facet(M);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],i=(t,e)=>{if(t.prop(h)==this.data)return void n.push({from:e,to:e+t.length});let o=t.prop(r.uY.mounted);if(o){if(o.tree.prop(h)==this.data){if(o.overlay)for(let t of o.overlay)n.push({from:t.from+e,to:t.to+e});else n.push({from:e,to:e+t.length});return}else if(o.overlay){let t=n.length;if(i(o.tree,o.overlay[0].from+e),n.length>t)return}}for(let n=0;n<t.children.length;n++){let o=t.children[n];o instanceof r.PH&&i(o,t.positions[n]+e)}};return i(g(t),0),n}get allowsNesting(){return!0}}function p(t,e,n){let i=t.facet(M),o=g(t).topNode;if(!i||i.allowsNesting)for(let t=o;t;t=t.enter(e,n,r.Qj.ExcludeBuffers))t.type.isTop&&(o=t);return o}d.setState=o.Pe.define();class f extends d{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=u(t.languageData);return new f(e,t.parser.configure({props:[h.add(t=>t.isTop?e:void 0)]}),t.name)}configure(t,e){return new f(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function g(t){let e=t.field(d.state,!1);return e?e.tree:r.PH.empty}class m{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let y=null;class v{constructor(t,e,n=[],i,r,o,a,s){this.parser=t,this.state=e,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new v(t,e,[],r.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(t,e){return(null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=r.PH.empty&&this.isDone(null!=e?e:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(r.rr.addTree(i,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!=(n=this.parse.stoppedAt)?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(r.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=y;y=this;try{return t()}finally{y=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=x(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,i,r)=>e.push({fromA:t,toA:n,fromB:i,toB:r})),n=r.rr.applyChanges(n,e),i=r.PH.empty,o=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length)for(let e of(s=[],this.skipped)){let n=t.mapPos(e.from,1),i=t.mapPos(e.to,-1);n<i&&s.push({from:n,to:i})}}return new v(this.parser,e,n,i,o,a,s,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:n,to:i}=this.skipped[e];n<t.to&&i>t.from&&(this.fragments=x(this.fragments,n,i),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends r.iX{createParse(e,n,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let e=y;if(e){for(let t of i)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=a,new r.PH(r.Z6.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return y}}function x(t,e,n){return r.rr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class _{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new _(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=v.create(t.facet(M).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new _(n)}}d.state=o.sU.define({create:_.init,update(t,e){for(let t of e.effects)if(t.is(d.setState))return t.value;return e.startState.facet(M)!=e.state.facet(M)?_.init(e.state):t.apply(e)}});let b=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"u">typeof requestIdleCallback&&(b=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});let w="u">typeof navigator&&(null==(i=navigator.scheduling)?void 0:i.isInputPending)?()=>navigator.scheduling.isInputPending():null,S=a.Z9.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(d.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(d.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=b(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,r=n.field(d.state);if(r.tree==r.context.tree&&r.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,t&&!w?Math.max(25,t.timeRemaining()-5):1e9),a=r.context.treeLen<i&&n.doc.length>i+1e3,s=r.context.work(()=>w&&w()||Date.now()>o,i+1e5*!a);this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:d.setState.of(new _(r.context))})),this.chunkBudget>0&&!(s&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>(0,a.c_)(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),M=o.sj.define({combine:t=>t.length?t[0]:null,enables:t=>[d.state,S,a.Lz.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class C{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}let k=o.sj.define(),T=o.sj.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function I(t){let e=t.facet(T);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function A(t,e){let n="",i=t.tabSize,r=t.facet(T)[0];if(" "==r){for(;e>=i;)n+=" ",e-=i;r=" "}for(let t=0;t<e;t++)n+=r;return n}function D(t,e){for(let n of(t instanceof o.$t&&(t=new L(t)),t.state.facet(k))){let i=n(t,e);if(void 0!==i)return i}let n=g(t.state);return n.length>=e?function(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let t=[];for(let e=r;e&&!(e.from<i.node.from||e.to>i.node.to||e.from==i.node.from&&e.type==i.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)i={node:t[e],next:i}}return P(i,t,n)}(t,n,e):null}class L{constructor(t,e={}){this.state=t,this.options=e,this.unit=I(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:i,simulateDoubleBreak:r}=this.options;if(null!=i&&i>=n.from&&i<=n.to)if(r&&i==t)return{text:"",from:t};else if(e<0?i<t:i<=t)return{text:n.text.slice(i-n.from),from:i};else return{text:n.text.slice(0,i-n.from),from:n.from};return n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(t,e);return n.slice(t-i,Math.min(n.length,t+100-i))}column(t,e=1){let{text:n,from:i}=this.lineAt(t,e),r=this.countColumn(n,t-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(t,e=t.length){return(0,o.y$)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:i}=this.lineAt(t,e),r=this.options.overrideIndentation;if(r){let t=r(i);if(t>-1)return t}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let O=new r.uY;function P(t,e,n){for(let i=t;i;i=i.next){let t=function(t){let e=t.type.prop(O);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(r.uY.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>B(t,!0,1,void 0,n&&!(t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak)?e.from:void 0)}return null==t.parent?R:null}(i.node);if(t)return t(N.create(e,n,i))}return 0}function R(){return 0}class N extends L{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new N(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return P(this.context.next,this.base,this.pos)}}function E({closing:t,align:e=!0,units:n=1}){return i=>B(i,e,n,t)}function B(t,e,n,i,r){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=i&&o.slice(a,a+i.length)==i||r==t.pos+a,l=e?function(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=null==r||r<=o.from?o.to:Math.min(o.to,r);for(let t=n.to;;){let r=e.childAfter(t);if(!r||r==i)return null;if(!r.type.isSkipped){if(r.from>=a)return null;let t=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+t}}t=r.to}}(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}let z=t=>t.baseIndent;function V({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}function F(){return o.$t.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+200)return t;let o=n.sliceString(r.from,i);if(!e.some(t=>t.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:t}of a.selection.ranges){let e=a.doc.lineAt(t);if(e.from==s)continue;s=e.from;let n=D(a,e.from);if(null==n)continue;let i=/^\s*/.exec(e.text)[0],r=A(a,n);i!=r&&l.push({from:e.from,to:e.from+i.length,insert:r})}return l.length?[t,{changes:l,sequential:!0}]:t})}let W=o.sj.define(),H=new r.uY;function G(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function U(t,e,n){for(let i of t.facet(W)){let r=i(t,e,n);if(r)return r}return function(t,e,n){let i=g(t);if(i.length<n)return null;let r=i.resolveStack(n,1),o=null;for(let a=r;a;a=a.next){let r=a.node;if(r.to<=n||r.from>n)continue;if(o&&r.from<e)break;let s=r.type.prop(H);if(s&&(r.to<i.length-50||i.length==t.doc.length||!function(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}(r))){let i=s(r,t);i&&i.from<=n&&i.from>=e&&i.to>n&&(o=i)}}return o}(t,e,n)}function j(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}let Y=o.Pe.define({map:j}),X=o.Pe.define({map:j});function Z(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(t=>t.from<=n&&t.to>=n)||e.push(t.lineBlockAt(n));return e}let q=o.sU.define({create:()=>a.NZ.none,update(t,e){for(let n of(e.isUserEvent("delete")&&e.changes.iterChangedRanges((e,n)=>t=K(t,e,n)),t=t.map(e.changes),e.effects))if(n.is(Y)&&!function(t,e,n){let i=!1;return t.between(e,e,(t,r)=>{t==e&&r==n&&(i=!0)}),i}(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(tn),r=i?a.NZ.replace({widget:new ta(i(e.state,n.value))}):to;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(X)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=K(t,e.selection.main.head)),t},provide:t=>a.Lz.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(t,e)=>{n.push(t,e)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if("number"!=typeof i||"number"!=typeof r)throw RangeError("Invalid JSON for fold state");e.push(to.range(i,r))}return a.NZ.set(e,!0)}});function K(t,e,n=e){let i=!1;return t.between(e,n,(t,r)=>{t<n&&r>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(t,i)=>t>=n||i<=e}):t}function $(t,e,n){var i;let r=null;return null==(i=t.field(q,!1))||i.between(e,n,(t,e)=>{(!r||r.from>t)&&(r={from:t,to:e})}),r}function J(t,e){return t.field(q,!1)?e:e.concat(o.Pe.appendConfig.of(ti()))}function Q(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return a.Lz.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}let tt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of Z(t)){let n=U(t.state,e.from,e.to);if(n)return t.dispatch({effects:J(t.state,[Y.of(n),Q(t,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(q,!1))return!1;let e=[];for(let n of Z(t)){let i=$(t.state,n.from,n.to);i&&e.push(X.of(i),Q(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),o=U(e,r.from,r.to);o&&n.push(Y.of(o)),i=(o?t.lineBlockAt(o.to):r).to+1}return n.length&&t.dispatch({effects:J(t.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(q,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(t,e)=>{n.push(X.of({from:t,to:e}))}),t.dispatch({effects:n}),!0}}],te={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},tn=o.sj.define({combine:t=>(0,o.QR)(t,te)});function ti(t){let e=[q,tu];return t&&e.push(tn.of(t)),e}function tr(t,e){let{state:n}=t,i=n.facet(tn),r=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),i=$(t.state,n.from,n.to);i&&t.dispatch({effects:X.of(i)}),e.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}let to=a.NZ.replace({widget:new class extends a.xO{toDOM(t){return tr(t,null)}}});class ta extends a.xO{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return tr(t,this.value)}}let ts={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class tl extends a.wJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function th(t={}){let e={...ts,...t},n=new tl(e,!0),i=new tl(e,!1),r=a.Z9.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(M)!=t.state.facet(M)||t.startState.field(q,!1)!=t.state.field(q,!1)||g(t.startState)!=g(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new o.vB;for(let r of t.viewportLineBlocks){let o=$(t.state,r.from,r.to)?i:U(t.state,r.from,r.to)?n:null;o&&e.add(r.from,r.from,o)}return e.finish()}}),{domEventHandlers:s}=e;return[r,(0,a.cU)({class:"cm-foldGutter",markers(t){var e;return(null==(e=t.plugin(r))?void 0:e.markers)||o.om.empty},initialSpacer:()=>new tl(e,!1),domEventHandlers:{...s,click:(t,e,n)=>{if(s.click&&s.click(t,e,n))return!0;let i=$(t.state,e.from,e.to);if(i)return t.dispatch({effects:X.of(i)}),!0;let r=U(t.state,e.from,e.to);return!!r&&(t.dispatch({effects:Y.of(r)}),!0)}}}),ti()]}let tu=a.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class tc{constructor(t,e){let n;function i(t){let e=l.G.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const r="string"==typeof e.all?e.all:e.all?i(e.all):void 0,o=e.scope;this.scope=o instanceof d?t=>t.prop(h)==o.data:o?t=>t==o:void 0,this.style=(0,s.az)(t.map(t=>({tag:t.tag,class:t.class||i(Object.assign({},t,{tag:null}))})),{all:r}).style,this.module=n?new l.G(n):null,this.themeType=e.themeType}static define(t,e){return new tc(t,e||{})}}let td=o.sj.define(),tp=o.sj.define({combine:t=>t.length?[t[0]]:null});function tf(t){let e=t.facet(td);return e.length?e:t.facet(tp)}function tg(t,e){let n=[tm],i;return t instanceof tc&&(t.module&&n.push(a.Lz.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(tp.of(t)):i?n.push(td.computeN([a.Lz.darkTheme],e=>e.facet(a.Lz.darkTheme)==("dark"==i)?[t]:[])):n.push(td.of(t)),n}let tm=o.Nb.high(a.Z9.fromClass(class{constructor(t){this.markCache=Object.create(null),this.tree=g(t.state),this.decorations=this.buildDeco(t,tf(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=g(t.state),n=tf(t.state),i=n!=tf(t.startState),{viewport:r}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length<r.to&&!i&&e.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||i)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=r.to)}buildDeco(t,e){if(!e||!this.tree.length)return a.NZ.none;let n=new o.vB;for(let{from:i,to:r}of t.visibleRanges)(0,s.DM)(this.tree,e,(t,e,i)=>{n.add(t,e,this.markCache[i]||(this.markCache[i]=a.NZ.mark({class:i})))},i,r);return n.finish()}},{decorations:t=>t.decorations})),ty=tc.define([{tag:s._A.meta,color:"#404740"},{tag:s._A.link,textDecoration:"underline"},{tag:s._A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:s._A.emphasis,fontStyle:"italic"},{tag:s._A.strong,fontWeight:"bold"},{tag:s._A.strikethrough,textDecoration:"line-through"},{tag:s._A.keyword,color:"#708"},{tag:[s._A.atom,s._A.bool,s._A.url,s._A.contentSeparator,s._A.labelName],color:"#219"},{tag:[s._A.literal,s._A.inserted],color:"#164"},{tag:[s._A.string,s._A.deleted],color:"#a11"},{tag:[s._A.regexp,s._A.escape,s._A.special(s._A.string)],color:"#e40"},{tag:s._A.definition(s._A.variableName),color:"#00f"},{tag:s._A.local(s._A.variableName),color:"#30a"},{tag:[s._A.typeName,s._A.namespace],color:"#085"},{tag:s._A.className,color:"#167"},{tag:[s._A.special(s._A.variableName),s._A.macroName],color:"#256"},{tag:s._A.definition(s._A.propertyName),color:"#00c"},{tag:s._A.comment,color:"#940"},{tag:s._A.invalid,color:"#f00"}]),tv=a.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),tx="()[]{}",t_=o.sj.define({combine:t=>(0,o.QR)(t,{afterCursor:!0,brackets:tx,maxScanDistance:1e4,renderMatch:tS})}),tb=a.NZ.mark({class:"cm-matchingBracket"}),tw=a.NZ.mark({class:"cm-nonmatchingBracket"});function tS(t){let e=[],n=t.matched?tb:tw;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}let tM=[o.sU.define({create:()=>a.NZ.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(t_);for(let t of e.state.selection.ranges){if(!t.empty)continue;let r=tA(e.state,t.head,-1,i)||t.head>0&&tA(e.state,t.head-1,1,i)||i.afterCursor&&(tA(e.state,t.head,1,i)||t.head<e.state.doc.length&&tA(e.state,t.head+1,-1,i));r&&(n=n.concat(i.renderMatch(r,e.state)))}return a.NZ.set(n,!0)},provide:t=>a.Lz.decorations.from(t)}),tv];function tC(t={}){return[t_.of(t),tM]}let tk=new r.uY;function tT(t,e,n){let i=t.prop(e<0?r.uY.openedBy:r.uY.closedBy);if(i)return i;if(1==t.name.length){let i=n.indexOf(t.name);if(i>-1&&i%2==+(e<0))return[n[i+e]]}return null}function tI(t){let e=t.type.prop(tk);return e?e(t.node):t}function tA(t,e,n,i={}){let r=i.maxScanDistance||1e4,o=i.brackets||tx,a=g(t),s=a.resolveInner(e,n);for(let t=s;t;t=t.parent){let i=tT(t.type,n,o);if(i&&t.from<t.to){let r=tI(t);if(r&&(n>0?e>=r.from&&e<r.to:e>r.from&&e<=r.to))return function(t,e,n,i,r){let o=e.parent,a={from:n.from,to:n.to},s=0,l=null==o?void 0:o.cursor();if(l&&(t<0?l.childBefore(e.from):l.childAfter(e.to)))do if(t<0?l.to<=e.from:l.from>=e.to){if(0==s&&i.indexOf(l.type.name)>-1&&l.from<l.to){let t=tI(l);return{start:a,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}else if(tT(l.type,t,r))s++;else if(tT(l.type,-t,r)){if(0==s){let t=tI(l);return{start:a,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}s--}}while(t<0?l.prevSibling():l.nextSibling());return{start:a,matched:!1}}(n,t,r,i,o)}}return function(t,e,n,i,r,o,a){let s=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),c=0;for(let t=0;!u.next().done&&t<=o;){let o=u.value;n<0&&(t+=o.length);let s=e+t*n;for(let t=n>0?0:o.length-1,e=n>0?o.length:-1;t!=e;t+=n){let e=a.indexOf(o[t]);if(!(e<0)&&i.resolveInner(s+t,1).type==r)if(e%2==0==n>0)c++;else{if(1==c)return{start:h,end:{from:s+t,to:s+t+1},matched:e>>1==l>>1};c--}}n>0&&(t+=o.length)}return u.done?{start:h,matched:!1}:null}(t,e,n,a,s.type,r,o)}let tD=Object.create(null),tL=[r.Z6.none],tO=[],tP=Object.create(null),tR=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])tR[t]=function(t,e){let n=[];for(let i of e.split(" ")){let e=[];for(let n of i.split(".")){let i=t[n]||s._A[n];i?"function"==typeof i?e.length?e=e.map(i):tN(n,`Modifier ${n} used at start of tag`):e.length?tN(n,`Tag ${n} used as modifier`):e=Array.isArray(i)?i:[i]:tN(n,`Unknown highlighting tag ${n}`)}for(let t of e)n.push(t)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),o=i+" "+n.map(t=>t.id),a=tP[o];if(a)return a.id;let l=tP[o]=r.Z6.define({id:tL.length,name:i,props:[(0,s.pn)({[i]:n})]});return tL.push(l),l.id}(tD,e);function tN(t,e){tO.indexOf(t)>-1||(tO.push(t),console.warn(e))}a.OP.RTL,a.OP.LTR},3492:function(t,e,n){"use strict";let i;n.d(e,{ZX:function(){return tf},kn:function(){return tF},MK:function(){return M},iR:function(){return A},Fh:function(){return C},zK:function(){return w},sU:function(){return Z},om:function(){return tT},$t:function(){return tb},Pe:function(){return tp},OF:function(){return V},Nb:function(){return K},vS:function(){return S},QR:function(){return tw},y$:function(){return tV},YH:function(){return tu},FB:function(){return tS},Gu:function(){return D},Je:function(){return tx},vB:function(){return tI},VR:function(){return L},EY:function(){return p},sj:function(){return H}});let r=[],o=[],a="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,e=0;t<a.length;t++)(t%2?o:r).push(e+=a[t]);function s(t){return t>=127462&&t<=127487}function l(t,e,n){if(e==t.length)return e;e&&u(t.charCodeAt(e))&&c(t.charCodeAt(e-1))&&e--;let i=h(t,e);for(e+=d(i);e<t.length;){let a=h(t,e);if(8205==i||8205==a||n&&function(t){if(t<768)return!1;for(let e=0,n=r.length;;){let i=e+n>>1;if(t<r[i])n=i;else{if(!(t>=o[i]))return!0;e=i+1}if(e==n)return!1}}(a))e+=d(a),i=a;else if(s(a)){let n=0,i=e-2;for(;i>=0&&s(h(t,i));)n++,i-=2;if(n%2==0)break;e+=2}else break}return e}function h(t,e){let n=t.charCodeAt(e);if(!c(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return u(i)?(n-55296<<10)+(i-56320)+65536:n}function u(t){return t>=56320&&t<57344}function c(t){return t>=55296&&t<56320}function d(t){return t<65536?1:2}class p{lineAt(t){if(t<0||t>this.length)throw RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=b(this,t,e);let i=[];return this.decompose(0,t,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(e,this.length,i,1),g.from(i,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=b(this,t,e);let n=[];return this.decompose(t,e,n,0),g.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new y(this),r=new y(t);for(let t=e,o=e;;){if(i.next(t),r.next(t),t=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(t=1){return new y(this,t)}iterRange(t,e=this.length){return new v(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new x(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new f(t):g.from(f.split(t,[])):p.empty}}class f extends p{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let r=0;;r++){let o=this.text[r],a=i+o.length;if((e?n:a)>=t)return new _(i,a,n,o);i=a+1,n++}}decompose(t,e,n,i){var r;let o=t<=0&&e>=this.length?this:new f((r=this.text,m(r,[""],t,e)),Math.min(e,this.length)-Math.max(0,t));if(1&i){let t=n.pop(),e=m(o.text,t.text.slice(),0,o.length);if(e.length<=32)n.push(new f(e,t.length+o.length));else{let t=e.length>>1;n.push(new f(e.slice(0,t)),new f(e.slice(t)))}}else n.push(o)}replace(t,e,n){var i;if(!(n instanceof f))return super.replace(t,e,n);[t,e]=b(this,t,e);let r=m(this.text,m(n.text,(i=this.text,m(i,[""],0,t))),e),o=this.length+n.length-(e-t);return r.length<=32?new f(r,o):g.from(f.split(r,[]),o)}sliceString(t,e=this.length,n="\n"){[t,e]=b(this,t,e);let i="";for(let r=0,o=0;r<=e&&o<this.text.length;o++){let a=this.text[o],s=r+a.length;r>t&&o&&(i+=n),t<s&&e>r&&(i+=a.slice(Math.max(0,t-r),e-r)),r=s+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],i=-1;for(let r of t)n.push(r),i+=r.length+1,32==n.length&&(e.push(new f(n,i)),n=[],i=-1);return i>-1&&e.push(new f(n,i)),e}}class g extends p{constructor(t,e){for(let n of(super(),this.children=t,this.length=e,this.lines=0,t))this.lines+=n.lines}lineInner(t,e,n,i){for(let r=0;;r++){let o=this.children[r],a=i+o.length,s=n+o.lines-1;if((e?s:a)>=t)return o.lineInner(t,e,n,i);i=a+1,n=s+1}}decompose(t,e,n,i){for(let r=0,o=0;o<=e&&r<this.children.length;r++){let a=this.children[r],s=o+a.length;if(t<=s&&e>=o){let r=i&(o<=t|2*(s>=e));o>=t&&s<=e&&!r?n.push(a):a.decompose(t-o,e-o,n,r)}o=s+1}}replace(t,e,n){if([t,e]=b(this,t,e),n.lines<this.lines)for(let i=0,r=0;i<this.children.length;i++){let o=this.children[i],a=r+o.length;if(t>=r&&e<=a){let s=o.replace(t-r,e-r,n),l=this.lines-o.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let r=this.children.slice();return r[i]=s,new g(r,this.length-(e-t)+n.length)}return super.replace(r,a,s)}r=a+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=b(this,t,e);let i="";for(let r=0,o=0;r<this.children.length&&o<=e;r++){let a=this.children[r],s=o+a.length;o>t&&r&&(i+=n),t<s&&e>o&&(i+=a.sliceString(t-o,e-o,n)),o=s+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof g))return 0;let n=0,[i,r,o,a]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=e,r+=e){if(i==o||r==a)return n;let s=this.children[i],l=t.children[r];if(s!=l)return n+s.scanIdentical(l,e);n+=s.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let n=0;for(let e of t)n+=e.lines;if(n<32){let n=[];for(let e of t)e.flatten(n);return new f(n,e)}let i=Math.max(32,n>>5),r=i<<1,o=i>>1,a=[],s=0,l=-1,h=[];function u(){0!=s&&(a.push(1==h.length?h[0]:g.from(h,l)),l=-1,s=h.length=0)}for(let e of t)!function t(e){let n;if(e.lines>r&&e instanceof g)for(let n of e.children)t(n);else e.lines>o&&(s>o||!s)?(u(),a.push(e)):e instanceof f&&s&&(n=h[h.length-1])instanceof f&&e.lines+n.lines<=32?(s+=e.lines,l+=e.length+1,h[h.length-1]=new f(n.text.concat(e.text),n.length+1+e.length)):(s+e.lines>i&&u(),s+=e.lines,l+=e.length+1,h.push(e))}(e);return u(),1==a.length?a[0]:new g(a,e)}}function m(t,e,n=0,i=1e9){for(let r=0,o=0,a=!0;o<t.length&&r<=i;o++){let s=t[o],l=r+s.length;l>=n&&(l>i&&(s=s.slice(0,i-r)),r<n&&(s=s.slice(n-r)),a?(e[e.length-1]+=s,a=!1):e.push(s)),r=l+1}return e}p.empty=new f([""],0);class y{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof f?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,a=i instanceof f?i.text.length:i.children.length;if(o==(e>0?a:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(i instanceof f){let r=i.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,r.length>Math.max(0,t))return this.value=0==t?r:e>0?r.slice(t):r.slice(0,r.length-t),this;t-=r.length}else{let r=i.children[o+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof f?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class v{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new y(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class x{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"u">typeof Symbol&&(p.prototype[Symbol.iterator]=function(){return this.iter()},y.prototype[Symbol.iterator]=v.prototype[Symbol.iterator]=x.prototype[Symbol.iterator]=function(){return this});class _{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}function b(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}function w(t,e,n=!0,i=!0){return function(t,e,n=!0,i=!0){return(n?l:function(t,e,n){for(;e>0;){let i=l(t,e-2,n);if(i<e)return i;e--}return 0})(t,e,i)}(t,e,n,i)}function S(t,e){let n=t.charCodeAt(e);if(!(n>=55296&&n<56320)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return i>=56320&&i<57344?(n-55296<<10)+(i-56320)+65536:n}function M(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10)+55296,(1023&t)+56320)}function C(t){return t<65536?1:2}let k=/\r\n?|\n/;var T,I,A=((T=A||(A={}))[T.Simple=0]="Simple",T[T.TrackDel=1]="TrackDel",T[T.TrackBefore=2]="TrackBefore",T[T.TrackAfter=3]="TrackAfter",T);class D{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,i=0;e<this.sections.length;){let r=this.sections[e++],o=this.sections[e++];o<0?(t(n,i,r),i+=r):i+=o,n+=r}}iterChangedRanges(t,e=!1){R(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];i<0?t.push(n,i):t.push(i,n)}return new D(t)}composeDesc(t){return this.empty?t:t.empty?this:E(this,t)}mapDesc(t,e=!1){return t.empty?this:N(this,t,e)}mapPos(t,e=-1,n=A.Simple){let i=0,r=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],s=this.sections[o++],l=i+a;if(s<0){if(l>t)return r+(t-i);r+=a}else{if(n!=A.Simple&&l>=t&&(n==A.TrackDel&&i<t&&l>t||n==A.TrackBefore&&i<t||n==A.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!a)return t==i||e<0?r:r+s;r+=s}i=l}if(t>i)throw RangeError(`Position ${t} is out of range for changeset of length ${i}`);return r}touchesRange(t,e=t){for(let n=0,i=0;n<this.sections.length&&i<=e;){let r=this.sections[n++],o=this.sections[n++],a=i+r;if(o>=0&&i<=e&&a>=t)return!(i<t)||!(a>e)||"cover";i=a}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];t+=(t?" ":"")+n+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw RangeError("Invalid JSON representation of ChangeDesc");return new D(t)}static create(t){return new D(t)}}class L extends D{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw RangeError("Applying change set to a document with the wrong length");return R(this,(e,n,i,r,o)=>t=t.replace(i,i+(n-e),o),!1),t}mapDesc(t,e=!1){return N(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let i=0,r=0;i<e.length;i+=2){let o=e[i],a=e[i+1];if(a>=0){e[i]=a,e[i+1]=o;let s=i>>1;for(;n.length<s;)n.push(p.empty);n.push(o?t.slice(r,r+o):p.empty)}r+=o}return new L(e,n)}compose(t){return this.empty?t:t.empty?this:E(this,t,!0)}map(t,e=!1){return t.empty?this:N(this,t,e,!0)}iterChanges(t,e=!1){R(this,t,e)}get desc(){return D.create(this.sections)}filter(t){let e=[],n=[],i=[],r=new B(this);t:for(let o=0,a=0;;){let s=o==t.length?1e9:t[o++];for(;a<s||a==s&&0==r.len;){if(r.done)break t;let t=Math.min(r.len,s-a);O(i,t,-1);let o=-1==r.ins?-1:0==r.off?r.ins:0;O(e,t,o),o>0&&P(n,e,r.text),r.forward(t),a+=t}let l=t[o++];for(;a<l;){if(r.done)break t;let t=Math.min(r.len,l-a);O(e,t,-1),O(i,t,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(t),a+=t}}return{changes:new L(e,n),filtered:D.create(i)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],i=this.sections[e+1];i<0?t.push(n):0==i?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,n){let i=[],r=[],o=0,a=null;function s(t=!1){if(!t&&!i.length)return;o<e&&O(i,e-o,-1);let n=new L(i,r);a=a?a.compose(n.map(a)):n,i=[],r=[],o=0}return!function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof L){if(l.length!=e)throw RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:t,to:a=t,insert:h}=l;if(t>a||t<0||a>e)throw RangeError(`Invalid change range ${t} to ${a} (in doc of length ${e})`);let u=h?"string"==typeof h?p.of(h.split(n||k)):h:p.empty,c=u.length;if(t==a&&0==c)return;t<o&&s(),t>o&&O(i,t-o,-1),O(i,a-t,c),P(r,i,u),o=a}}(t),s(!a),a}static empty(t){return new L(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let i=0;i<t.length;i++){let r=t[i];if("number"==typeof r)e.push(r,-1);else if(!Array.isArray(r)||"number"!=typeof r[0]||r.some((t,e)=>e&&"string"!=typeof t))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==r.length)e.push(r[0],0);else{for(;n.length<i;)n.push(p.empty);n[i]=p.of(r.slice(1)),e.push(r[0],n[i].length)}}return new L(e,n)}static createSet(t,e){return new L(t,e)}}function O(t,e,n,i=!1){if(0==e&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&0==e&&0==t[r]?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function P(t,e,n){if(0==n.length)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(p.empty);t.push(n)}}function R(t,e,n){let i=t.inserted;for(let r=0,o=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)r+=s,o+=s;else{let h=r,u=o,c=p.empty;for(;h+=s,u+=l,l&&i&&(c=c.append(i[a-2>>1])),!n&&a!=t.sections.length&&!(t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(r,h,o,u,c),r=h,o=u}}}function N(t,e,n,i=!1){let r=[],o=i?[]:null,a=new B(t),s=new B(e);for(let t=-1;;)if(a.done&&s.len||s.done&&a.len)throw Error("Mismatched change set lengths");else if(-1==a.ins&&-1==s.ins){let t=Math.min(a.len,s.len);O(r,t,-1),a.forward(t),s.forward(t)}else if(s.ins>=0&&(a.ins<0||t==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!n))){let e=s.len;for(O(r,s.ins,-1);e;){let n=Math.min(a.len,e);a.ins>=0&&t<a.i&&a.len<=n&&(O(r,0,a.ins),o&&P(o,r,a.text),t=a.i),a.forward(n),e-=n}s.next()}else if(a.ins>=0){let e=0,n=a.len;for(;n;)if(-1==s.ins){let t=Math.min(n,s.len);e+=t,n-=t,s.forward(t)}else if(0==s.ins&&s.len<n)n-=s.len,s.next();else break;O(r,e,t<a.i?a.ins:0),o&&t<a.i&&P(o,r,a.text),t=a.i,a.forward(a.len-n)}else if(a.done&&s.done)return o?L.createSet(r,o):D.create(r);else throw Error("Mismatched change set lengths")}function E(t,e,n=!1){let i=[],r=n?[]:null,o=new B(t),a=new B(e);for(let t=!1;;)if(o.done&&a.done)return r?L.createSet(i,r):D.create(i);else if(0==o.ins)O(i,o.len,0,t),o.next();else if(0!=a.len||a.done)if(o.done||a.done)throw Error("Mismatched change set lengths");else{let e=Math.min(o.len2,a.len),n=i.length;if(-1==o.ins){let n=-1==a.ins?-1:a.off?0:a.ins;O(i,e,n,t),r&&n&&P(r,i,a.text)}else -1==a.ins?(O(i,o.off?0:o.len,e,t),r&&P(r,i,o.textBit(e))):(O(i,o.off?0:o.len,a.off?0:a.ins,t),r&&!a.off&&P(r,i,a.text));t=(o.ins>e||a.ins>=0&&a.len>e)&&(t||i.length>n),o.forward2(e),a.forward(e)}else O(i,0,a.ins,t),r&&P(r,i,a.text),a.next()}class B{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?p.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?p.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class z{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 0xffffff==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new z(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return V.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return V.range(this.anchor,n)}eq(t,e=!1){return this.anchor==t.anchor&&this.head==t.head&&(!e||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid JSON representation for SelectionRange");return V.range(t.anchor,t.head)}static create(t,e,n){return new z(t,e,n)}}class V{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:V.create(this.ranges.map(n=>n.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new V([this.main],0)}addRange(t,e=!0){return V.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,V.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new V(t.ranges.map(t=>z.fromJSON(t)),t.main)}static single(t,e=t){return new V([V.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw RangeError("A selection needs at least one range");for(let n=0,i=0;i<t.length;i++){let r=t[i];if(r.empty?r.from<=n:r.from<n)return V.normalized(t.slice(),e);n=r.to}return new V(t,e)}static cursor(t,e=0,n,i){return z.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:0xffffff)<<6)}static range(t,e,n,i){let r=(null!=n?n:0xffffff)<<6|(null==i?7:Math.min(6,i));return e<t?z.create(e,t,48|r):z.create(t,e,8*(e>t)|r)}static normalized(t,e=0){let n=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(n);for(let n=1;n<t.length;n++){let i=t[n],r=t[n-1];if(i.empty?i.from<=r.to:i.from<r.to){let o=r.from,a=Math.max(i.to,r.to);n<=e&&e--,t.splice(--n,2,i.anchor>i.head?V.range(a,o):V.range(o,a))}}return new V(t,e)}}function F(t,e){for(let n of t.ranges)if(n.to>e)throw RangeError("Selection points outside of document")}let W=0;class H{constructor(t,e,n,i,r){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=W++,this.default=t([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(t={}){return new H(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(!t.combine?G:(t,e)=>t===e),!!t.static,t.enables)}of(t){return new U([],this,0,t)}compute(t,e){if(this.isStatic)throw Error("Can't compute a static facet");return new U(t,this,1,e)}computeN(t,e){if(this.isStatic)throw Error("Can't compute a static facet");return new U(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],n=>e(n.field(t)))}}function G(t,e){return t==e||t.length==e.length&&t.every((t,n)=>t===e[n])}class U{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=W++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,r=this.id,o=t[r]>>1,a=2==this.type,s=!1,l=!1,h=[];for(let n of this.dependencies)"doc"==n?s=!0:"selection"==n?l=!0:((null!=(e=t[n.id])?e:1)&1)==0&&h.push(t[n.id]);return{create:t=>(t.values[o]=n(t),1),update(t,e){if(s&&e.docChanged||l&&(e.docChanged||e.selection)||Y(t,h)){let e=n(t);if(a?!j(e,t.values[o],i):!i(e,t.values[o]))return t.values[o]=e,1}return 0},reconfigure:(t,e)=>{let s,l=e.config.address[r];if(null!=l){let r=tn(e,l);if(this.dependencies.every(n=>n instanceof H?e.facet(n)===t.facet(n):!(n instanceof Z)||e.field(n,!1)==t.field(n,!1))||(a?j(s=n(t),r,i):i(s=n(t),r)))return t.values[o]=r,0}else s=n(t);return t.values[o]=s,1}}}}function j(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function Y(t,e){let n=!1;for(let i of e)1&te(t,i)&&(n=!0);return n}let X=H.define({static:!0});class Z{constructor(t,e,n,i,r){this.id=t,this.createF=e,this.updateF=n,this.compareF=i,this.spec=r,this.provides=void 0}static define(t){let e=new Z(W++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(X).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],r=this.updateF(i,n);return this.compareF(i,r)?0:(t.values[e]=r,1)},reconfigure:(t,n)=>{let i=t.facet(X),r=n.facet(X),o;return(o=i.find(t=>t.field==this))&&o!=r.find(t=>t.field==this)?(t.values[e]=o.create(t),1):null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,X.of({field:this,create:t})]}get extension(){return this}}function q(t){return e=>new $(e,t)}let K={highest:q(0),high:q(1),default:q(2),low:q(3),lowest:q(4)};class ${constructor(t,e){this.inner=t,this.prec=e}}class J{of(t){return new Q(this,t)}reconfigure(t){return J.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Q{constructor(t,e){this.compartment=t,this.inner=e}}class tt{constructor(t,e,n,i,r,o){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){var i,r,o;let a,s,l=[],h=Object.create(null),u=new Map;for(let n of(i=t,r=e,o=u,a=[[],[],[],[],[]],s=new Map,!function t(e,n){let i=s.get(e);if(null!=i){if(i<=n)return;let t=a[i].indexOf(e);t>-1&&a[i].splice(t,1),e instanceof Q&&o.delete(e.compartment)}if(s.set(e,n),Array.isArray(e))for(let i of e)t(i,n);else if(e instanceof Q){if(o.has(e.compartment))throw RangeError("Duplicate use of compartment in extensions");let i=r.get(e.compartment)||e.inner;o.set(e.compartment,i),t(i,n)}else if(e instanceof $)t(e.inner,e.prec);else if(e instanceof Z)a[n].push(e),e.provides&&t(e.provides,n);else if(e instanceof U)a[n].push(e),e.facet.extensions&&t(e.facet.extensions,2);else{let i=e.extension;if(!i)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(i,n)}}(i,2),a.reduce((t,e)=>t.concat(e))))n instanceof Z?l.push(n):(h[n.facet.id]||(h[n.facet.id]=[])).push(n);let c=Object.create(null),d=[],p=[];for(let t of l)c[t.id]=p.length<<1,p.push(e=>t.slot(e));let f=null==n?void 0:n.config.facets;for(let t in h){let e=h[t],i=e[0].facet,r=f&&f[t]||[];if(e.every(t=>0==t.type))if(c[i.id]=d.length<<1|1,G(r,e))d.push(n.facet(i));else{let t=i.combine(e.map(t=>t.value));d.push(n&&i.compare(t,n.facet(i))?n.facet(i):t)}else{for(let t of e)0==t.type?(c[t.id]=d.length<<1|1,d.push(t.value)):(c[t.id]=p.length<<1,p.push(e=>t.dynamicSlot(e)));c[i.id]=p.length<<1,p.push(t=>(function(t,e,n){let i=n.map(e=>t[e.id]),r=n.map(t=>t.type),o=i.filter(t=>!(1&t)),a=t[e.id]>>1;function s(t){let n=[];for(let e=0;e<i.length;e++){let o=tn(t,i[e]);if(2==r[e])for(let t of o)n.push(t);else n.push(o)}return e.combine(n)}return{create(t){for(let e of i)te(t,e);return t.values[a]=s(t),1},update(t,n){if(!Y(t,o))return 0;let i=s(t);return e.compare(i,t.values[a])?0:(t.values[a]=i,1)},reconfigure(t,r){let o=Y(t,i),l=r.config.facets[e.id],h=r.facet(e);if(l&&!o&&G(n,l))return t.values[a]=h,0;let u=s(t);return e.compare(u,h)?(t.values[a]=h,0):(t.values[a]=u,1)}}})(t,i,e))}}return new tt(t,u,p.map(t=>t(c)),c,d,h)}}function te(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function tn(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}let ti=H.define(),tr=H.define({combine:t=>t.some(t=>t),static:!0}),to=H.define({combine:t=>t.length?t[0]:void 0,static:!0}),ta=H.define(),ts=H.define(),tl=H.define(),th=H.define({combine:t=>!!t.length&&t[0]});class tu{constructor(t,e){this.type=t,this.value=e}static define(){return new tc}}class tc{of(t){return new tu(this,t)}}class td{constructor(t){this.map=t}of(t){return new tp(this,t)}}class tp{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new tp(this.type,e)}is(t){return this.type==t}static define(t={}){return new td(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let t=i.map(e);t&&n.push(t)}return n}}tp.reconfigure=tp.define(),tp.appendConfig=tp.define();class tf{constructor(t,e,n,i,r,o){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&F(n,e.newLength),r.some(t=>t.type==tf.time)||(this.annotations=r.concat(tf.time.of(Date.now())))}static create(t,e,n,i,r,o){return new tf(t,e,n,i,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(tf.userEvent);return!!(e&&(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function tg(t,e,n){var i;let r,o,a;return n?(r=e.changes,o=L.empty(e.changes.length),a=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(r)),{changes:a,selection:e.selection?e.selection.map(o):null==(i=t.selection)?void 0:i.map(r),effects:tp.mapEffects(t.effects,r).concat(tp.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function tm(t,e,n){let i=e.selection,r=tv(e.annotations);return e.userEvent&&(r=r.concat(tf.userEvent.of(e.userEvent))),{changes:e.changes instanceof L?e.changes:L.of(e.changes||[],n,t.facet(to)),selection:i&&(i instanceof V?i:V.single(i.anchor,i.head)),effects:tv(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}tf.time=tu.define(),tf.userEvent=tu.define(),tf.addToHistory=tu.define(),tf.remote=tu.define();let ty=[];function tv(t){return null==t?ty:Array.isArray(t)?t:[t]}var tx=((I=tx||(tx={}))[I.Word=0]="Word",I[I.Space=1]="Space",I[I.Other=2]="Other",I);let t_=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{i=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}class tb{constructor(t,e,n,i,r,o){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)te(this,t<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null==n){if(e)throw RangeError("Field is not present in this state");return}return te(this,n),tn(this,n)}update(...t){return function t(e,n,i){let r=tm(e,n.length?n[0]:{},e.doc.length);n.length&&!1===n[0].filter&&(i=!1);for(let t=1;t<n.length;t++){!1===n[t].filter&&(i=!1);let o=!!n[t].sequential;r=tg(r,tm(e,n[t],o?r.changes.newLength:e.doc.length),o)}let o=tf.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,n=e.facet(tl),i=t;for(let r=n.length-1;r>=0;r--){let o=n[r](t);o&&Object.keys(o).length&&(i=tg(i,tm(e,o,t.changes.newLength),!0))}return i==t?t:tf.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(i?function(e){let n=e.startState,i=!0;for(let t of n.facet(ta)){let n=t(e);if(!1===n){i=!1;break}Array.isArray(n)&&(i=!0===i?n:function(t,e){let n=[];for(let i=0,r=0;;){let o,a;if(i<t.length&&(r==e.length||e[r]>=t[i]))o=t[i++],a=t[i++];else{if(!(r<e.length))return n;o=e[r++],a=e[r++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}(i,n))}if(!0!==i){let t,r;if(!1===i)r=e.changes.invertedDesc,t=L.empty(n.doc.length);else{let n=e.changes.filter(i);t=n.changes,r=n.filtered.mapDesc(n.changes).invertedDesc}e=tf.create(n,t,e.selection&&e.selection.map(r),tp.mapEffects(e.effects,r),e.annotations,e.scrollIntoView)}let r=n.facet(ts);for(let i=r.length-1;i>=0;i--){let o=r[i](e);e=o instanceof tf?o:Array.isArray(o)&&1==o.length&&o[0]instanceof tf?o[0]:t(n,tv(o),!1)}return e}(o):o)}(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:r}=n;for(let e of t.effects)e.is(J.reconfigure)?(n&&(r=new Map,n.compartments.forEach((t,e)=>r.set(e,t)),n=null),r.set(e.value.compartment,e.value.extension)):e.is(tp.reconfigure)?(n=null,i=e.value):e.is(tp.appendConfig)&&(n=null,i=tv(i).concat(e.value));e=n?t.startState.values.slice():new tb(n=tt.resolve(i,r,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values;let o=t.startState.facet(tr)?t.newSelection:t.newSelection.asSingle();new tb(n,t.newDoc,o,e,(e,n)=>n.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:V.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),r=[n.range],o=tv(n.effects);for(let n=1;n<e.ranges.length;n++){let a=t(e.ranges[n]),s=this.changes(a.changes),l=s.map(i);for(let t=0;t<n;t++)r[t]=r[t].map(l);let h=i.mapDesc(s,!0);r.push(a.range.map(h)),i=i.compose(l),o=tp.mapEffects(o,l).concat(tp.mapEffects(tv(a.effects),h))}return{changes:i,selection:V.create(r,e.mainIndex),effects:o}}changes(t=[]){return t instanceof L?t:L.of(t,this.doc.length,this.facet(tb.lineSeparator))}toText(t){return p.of(t.split(this.facet(tb.lineSeparator)||k))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(te(this,e),tn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let i=t[n];i instanceof Z&&null!=this.config.address[i.id]&&(e[n]=i.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let e in n)if(Object.prototype.hasOwnProperty.call(t,e)){let r=n[e],o=t[e];i.push(r.init(t=>r.spec.fromJSON(o,t)))}}return tb.create({doc:t.doc,selection:V.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=tt.resolve(t.extensions||[],new Map),n=t.doc instanceof p?t.doc:p.of((t.doc||"").split(e.staticFacet(tb.lineSeparator)||k)),i=t.selection?t.selection instanceof V?t.selection:V.single(t.selection.anchor,t.selection.head):V.single(0);return F(i,n.length),e.staticFacet(tr)||(i=i.asSingle()),new tb(e,n,i,e.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(tb.tabSize)}get lineBreak(){return this.facet(tb.lineSeparator)||"\n"}get readOnly(){return this.facet(th)}phrase(t,...e){for(let e of this.facet(tb.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]})),t}languageDataAt(t,e,n=-1){let i=[];for(let r of this.facet(ti))for(let o of r(this,e,n))Object.prototype.hasOwnProperty.call(o,t)&&i.push(o[t]);return i}charCategorizer(t){var e;return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return tx.Space;if(function(t){if(i)return i.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||t_.test(n)))return!0}return!1}(t))return tx.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return tx.Word;return tx.Other}}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),r=this.charCategorizer(t),o=t-n,a=t-n;for(;o>0;){let t=w(e,o,!1);if(r(e.slice(t,o))!=tx.Word)break;o=t}for(;a<i;){let t=w(e,a);if(r(e.slice(a,t))!=tx.Word)break;a=t}return o==a?null:V.range(o+n,a+n)}}function tw(t,e,n={}){let i={};for(let e of t)for(let t of Object.keys(e)){let r=e[t],o=i[t];if(void 0===o)i[t]=r;else if(o===r||void 0===r);else if(Object.hasOwnProperty.call(n,t))i[t]=n[t](o,r);else throw Error("Config merge conflict for field "+t)}for(let t in e)void 0===i[t]&&(i[t]=e[t]);return i}tb.allowMultipleSelections=tr,tb.tabSize=H.define({combine:t=>t.length?t[0]:4}),tb.lineSeparator=to,tb.readOnly=th,tb.phrases=H.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(n=>t[n]==e[n])}}),tb.languageData=ti,tb.changeFilter=ta,tb.transactionFilter=ts,tb.transactionExtender=tl,J.reconfigure=tp.define();class tS{eq(t){return this==t}range(t,e=t){return tM.create(t,e,this)}}tS.prototype.startSide=tS.prototype.endSide=0,tS.prototype.point=!1,tS.prototype.mapMode=A.TrackDel;class tM{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new tM(t,e,n)}}function tC(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class tk{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let r=n?this.to:this.from;for(let o=i,a=r.length;;){if(o==a)return o;let i=o+a>>1,s=r[i]-t||(n?this.value[i].endSide:this.value[i].startSide)-e;if(i==o)return s>=0?o:a;s>=0?a=i:o=i+1}}between(t,e,n,i){for(let r=this.findIndex(e,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(!1===i(this.from[r]+t,this.to[r]+t,this.value[r]))return!1}map(t,e){let n=[],i=[],r=[],o=-1,a=-1;for(let s=0;s<this.value.length;s++){let l=this.value[s],h=this.from[s]+t,u=this.to[s]+t,c,d;if(h==u){let t=e.mapPos(h,l.startSide,l.mapMode);if(null==t||(c=d=t,l.startSide!=l.endSide&&(d=e.mapPos(h,l.endSide))<c))continue}else if((c=e.mapPos(h,l.startSide))>(d=e.mapPos(u,l.endSide))||c==d&&l.startSide>0&&l.endSide<=0)continue;0>(d-c||l.endSide-l.startSide)||(o<0&&(o=c),l.point&&(a=Math.max(a,d-c)),n.push(l),i.push(c-o),r.push(d-o))}return{mapped:n.length?new tk(i,r,n,a):null,pos:o}}}class tT{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new tT(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=t,o=t.filter;if(0==e.length&&!o)return this;if(n&&(e=e.slice().sort(tC)),this.isEmpty)return e.length?tT.of(e):this;let a=new tD(this,null,-1).goto(0),s=0,l=[],h=new tI;for(;a.value||s<e.length;)if(s<e.length&&(a.from-e[s].from||a.startSide-e[s].value.startSide)>=0){let t=e[s++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==e.length||this.chunkEnd(a.chunkIndex)<e[s].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||r<this.chunkPos[a.chunkIndex])&&h.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||r<a.from||o(a.from,a.to,a.value))&&!h.addInner(a.from,a.to,a.value)&&l.push(tM.create(a.from,a.to,a.value)),a.next());return h.finishInner(this.nextLayer.isEmpty&&!l.length?tT.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],a=this.chunk[r],s=t.touchesRange(o,o+a.length);if(!1===s)i=Math.max(i,a.maxPoint),e.push(a),n.push(t.mapPos(o));else if(!0===s){let{mapped:r,pos:s}=a.map(o,t);r&&(i=Math.max(i,r.maxPoint),e.push(r),n.push(s))}}let r=this.nextLayer.map(t);return 0==e.length?r:new tT(n,e,r||tT.empty,i)}between(t,e,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let r=this.chunkPos[i],o=this.chunk[i];if(e>=r&&t<=r+o.length&&!1===o.between(r,t-r,e-r,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return tL.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return tL.from(t).goto(e)}static compare(t,e,n,i,r=-1){let o=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r),a=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r),s=tA(o,a,n),l=new tP(o,s,r),h=new tP(a,s,r);n.iterGaps((t,e,n)=>tR(l,t,h,e,n,i)),n.empty&&0==n.length&&tR(l,0,h,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=0x3b9ac9ff);let r=t.filter(t=>!t.isEmpty&&0>e.indexOf(t)),o=e.filter(e=>!e.isEmpty&&0>t.indexOf(e));if(r.length!=o.length)return!1;if(!r.length)return!0;let a=tA(r,o),s=new tP(r,a,0).goto(n),l=new tP(o,a,0).goto(n);for(;;){if(s.to!=l.to||!tN(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>i)return!0;s.next(),l.next()}}static spans(t,e,n,i,r=-1){let o=new tP(t,null,r).goto(e),a=e,s=o.openStart;for(;;){let t=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),r=o.pointFrom<e?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,s);i.point(a,t,o.point,n,r,o.pointRank),s=Math.min(o.openEnd(t),n.length)}else t>a&&(i.span(a,t,o.active,s),s=o.openEnd(t));if(o.to>n)return s+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(t,e=!1){let n=new tI;for(let i of t instanceof tM?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(tC(e,i)>0)return t.slice().sort(tC);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}static join(t){if(!t.length)return tT.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let i=t[n];i!=tT.empty;i=i.nextLayer)e=new tT(i.chunkPos,i.chunk,e,Math.max(i.maxPoint,e.maxPoint));return e}}tT.empty=new tT([],[],null,-1),tT.empty.nextLayer=tT.empty;class tI{finishChunk(t){this.chunks.push(new tk(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new tI)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&0>(t-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if(0>(t-this.lastTo||e.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(tT.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=tT.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function tA(t,e,n){let i=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&i.set(e.chunk[t],e.chunkPos[t]);let r=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let o=i.get(t.chunk[e]);null==o||(n?n.mapPos(o):o)!=t.chunkPos[e]||(null==n?void 0:n.touchesRange(o,o+t.chunk[e].length))||r.add(t.chunk[e])}return r}class tD{constructor(t,e,n,i=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,e){0>(this.to-t||this.endSide-e)&&this.gotoInner(t,e,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class tL{constructor(t){this.heap=t}static from(t,e=null,n=-1){let i=[];for(let r=0;r<t.length;r++)for(let o=t[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&i.push(new tD(o,e,n,r));return 1==i.length?i[0]:new tL(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)tO(this.heap,t);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)tO(this.heap,t);0>(this.to-t||this.value.endSide-e)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),tO(this.heap,0)}}}function tO(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),0>n.compare(r))break;t[i]=n,t[e]=r,e=i}}class tP{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=tL.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e);)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){tE(this.active,t),tE(this.activeTo,t),tE(this.activeRank,t),this.minActive=tz(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:r}=this.cursor;for(;e<this.activeRank.length&&(r-this.activeRank[e]||i-this.activeTo[e])>0;)e++;tB(this.active,e,n),tB(this.activeTo,e,i),tB(this.activeRank,e,r),t&&tB(t,e,this.cursor.from),this.minActive=tz(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&0>(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&tE(n,i)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let t=this.cursor.value;if(t.point)if(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}else this.addActive(n),this.cursor.next()}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function tR(t,e,n,i,r,o){t.goto(e),n.goto(i);let a=i+r,s=i,l=i-e;for(;;){let e=t.to+l-n.to,i=e||t.endSide-n.endSide,r=i<0?t.to+l:n.to,h=Math.min(r,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&tN(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,h,t.point,n.point):h>s&&!tN(t.active,n.active)&&o.compareRange(s,h,t.active,n.active),r>a)break;(e||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(r),s=r,i<=0&&t.next(),i>=0&&n.next()}}function tN(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function tE(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function tB(t,e,n){for(let n=t.length-1;n>=e;n--)t[n+1]=t[n];t[e]=n}function tz(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)0>(e[r]-i||t[r].endSide-t[n].endSide)&&(n=r,i=e[r]);return n}function tV(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)9==t.charCodeAt(r)?(i+=e-i%e,r++):(i++,r=w(t,r));return i}function tF(t,e,n,i){for(let i=0,r=0;;){if(r>=e)return i;if(i==t.length)break;r+=9==t.charCodeAt(i)?n-r%n:1,i=w(t,i)}return!0===i?-1:t.length}},7254:function(t,e,n){"use strict";n.d(e,{bM:function(){return m}});var i=n(7867),r=n(8169),o=n(2619);let a="#e06c75",s="#abb2bf",l="#7d8799",h="#d19a66",u="#2c313a",c="#282c34",d="#353a42",p="#528bff",f=i.Lz.theme({"&":{color:s,backgroundColor:c},".cm-content":{caretColor:p},".cm-cursor, .cm-dropCursor":{borderLeftColor:p},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:s},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:c,color:l,border:"none"},".cm-activeLineGutter":{backgroundColor:u},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:d},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:d,borderBottomColor:d},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:u,color:s}}},{dark:!0}),g=r.cr.define([{tag:o._A.keyword,color:"#c678dd"},{tag:[o._A.name,o._A.deleted,o._A.character,o._A.propertyName,o._A.macroName],color:a},{tag:[o._A.function(o._A.variableName),o._A.labelName],color:"#61afef"},{tag:[o._A.color,o._A.constant(o._A.name),o._A.standard(o._A.name)],color:h},{tag:[o._A.definition(o._A.name),o._A.separator],color:s},{tag:[o._A.typeName,o._A.className,o._A.number,o._A.changed,o._A.annotation,o._A.modifier,o._A.self,o._A.namespace],color:"#e5c07b"},{tag:[o._A.operator,o._A.operatorKeyword,o._A.url,o._A.escape,o._A.regexp,o._A.link,o._A.special(o._A.string)],color:"#56b6c2"},{tag:[o._A.meta,o._A.comment],color:l},{tag:o._A.strong,fontWeight:"bold"},{tag:o._A.emphasis,fontStyle:"italic"},{tag:o._A.strikethrough,textDecoration:"line-through"},{tag:o._A.link,color:l,textDecoration:"underline"},{tag:o._A.heading,fontWeight:"bold",color:a},{tag:[o._A.atom,o._A.bool,o._A.special(o._A.variableName)],color:h},{tag:[o._A.processingInstruction,o._A.string,o._A.inserted],color:"#98c379"},{tag:o._A.invalid,color:"#ffffff"}]),m=[f,(0,r.y9)(g)]},7867:function(t,e,n){"use strict";let i;n.d(e,{N$:function(){return it},Z9:function(){return t5},Eg:function(){return iA},Lz:function(){return nC},NZ:function(){return td},Wu:function(){return i6},w4:function(){return nP},D4:function(){return ih},TS:function(){return nE},ld:function(){return iO},OP:function(){return tM},DK:function(){return iS},wJ:function(){return iB},S7:function(){return iE},dz:function(){return io},$K:function(){return i5},HJ:function(){return id},xO:function(){return tu},c_:function(){return tQ},cU:function(){return iH},A:function(){return n2},VH:function(){return nX},Ux:function(){return iI}});for(var r,o,a,s=n(3492),l=n(5690),h={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},u={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c="u">typeof navigator&&/Mac/.test(navigator.platform),d="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),p=0;p<10;p++)h[48+p]=h[96+p]=String(p);for(var p=1;p<=24;p++)h[p+111]="F"+p;for(var p=65;p<=90;p++)h[p]=String.fromCharCode(p+32),u[p]=String.fromCharCode(p);for(var f in h)u.hasOwnProperty(f)||(u[f]=h[f]);function g(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function m(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function y(t,e){if(!e.anchorNode)return!1;try{return m(t,e.anchorNode)}catch(t){return!1}}function v(t){return 3==t.nodeType?A(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function x(t,e,n,i){return!!n&&(w(t,e,n,i,-1)||w(t,e,n,i,1))}function _(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function b(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function w(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:S(t))){if("DIV"==t.nodeName)return!1;let n=t.parentNode;if(!n||1!=n.nodeType)return!1;e=_(t)+(r<0?0:1),t=n}else{if(1!=t.nodeType||1==(t=t.childNodes[e+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=r<0?S(t):0}}}function S(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function M(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function C(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(e.width-t.offsetWidth))&&(n=1),(i>.995&&i<1.005||!isFinite(i)||1>Math.abs(e.height-t.offsetHeight))&&(i=1),{scaleX:n,scaleY:i}}class k{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:n}=t;this.set(e,Math.min(t.anchorOffset,e?S(e):0),n,Math.min(t.focusOffset,n?S(n):0))}set(t,e,n,i){this.anchorNode=t,this.anchorOffset=e,this.focusNode=n,this.focusOffset=i}}let T=null;function I(t){if(t.setActive)return t.setActive();if(T)return t.focus(T);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(null==T?{get preventScroll(){return T={preventScroll:!0},!0}}:void 0),!T){T=!1;for(let t=0;t<e.length;){let n=e[t++],i=e[t++],r=e[t++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}}}function A(t,e,n=e){let r=i||(i=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function D(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let o=new KeyboardEvent("keydown",r);o.synthetic=!0,t.dispatchEvent(o);let a=new KeyboardEvent("keyup",r);return a.synthetic=!0,t.dispatchEvent(a),o.defaultPrevented||a.defaultPrevented}function L(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function O(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function P(t,e){for(let n=t,i=e;;)if(3==n.nodeType&&i>0)return{node:n,offset:i};else if(1==n.nodeType&&i>0){if("false"==n.contentEditable)return null;i=S(n=n.childNodes[i-1])}else{if(!n.parentNode||b(n))return null;i=_(n),n=n.parentNode}}function R(t,e){for(let n=t,i=e;;)if(3==n.nodeType&&i<n.nodeValue.length)return{node:n,offset:i};else if(1==n.nodeType&&i<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[i],i=0}else{if(!n.parentNode||b(n))return null;i=_(n)+1,n=n.parentNode}}class N{constructor(t,e,n=!0){this.node=t,this.offset=e,this.precise=n}static before(t,e){return new N(t.parentNode,_(t),e)}static after(t,e){return new N(t.parentNode,_(t)+1,e)}}let E=[];class B{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let n of this.children){if(n==t)return e;e+=n.length+n.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let n=this.dom,i=null,r;for(let o of this.children){if(7&o.flags){if(!o.dom&&(r=i?i.nextSibling:n.firstChild)){let t=B.get(r);(!t||!t.parent&&t.canReuseDOM(o))&&o.reuseDOM(r)}o.sync(t,e),o.flags&=-8}if(r=i?i.nextSibling:n.firstChild,e&&!e.written&&e.node==n&&r!=o.dom&&(e.written=!0),o.dom.parentNode==n)for(;r&&r!=o.dom;)r=z(r);else n.insertBefore(o.dom,r);i=o.dom}for((r=i?i.nextSibling:n.firstChild)&&e&&e.node==n&&(e.written=!0);r;)r=z(r)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(t,e),n.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let n;if(t==this.dom)n=this.dom.childNodes[e];else{let i=0==S(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==i&&e.firstChild!=e.lastChild&&(i=t==e.firstChild?-1:1),t=e}n=i<0?t:t.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!B.get(n);)n=n.nextSibling;if(!n)return this.length;for(let t=0,e=0;;t++){let i=this.children[t];if(i.dom==n)return e;e+=i.length+i.breakAfter}}domBoundsAround(t,e,n=0){let i=-1,r=-1,o=-1,a=-1;for(let s=0,l=n,h=n;s<this.children.length;s++){let n=this.children[s],u=l+n.length;if(l<t&&u>e)return n.domBoundsAround(t,e,l);if(u>=t&&-1==i&&(i=s,r=l),l>e&&n.dom.parentNode==this.dom){o=s,a=h;break}h=u,l=u+n.breakAfter}return{from:r,to:a<0?n+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,n=E){this.markDirty();for(let i=t;i<e;i++){let t=this.children[i];t.parent==this&&0>n.indexOf(t)&&t.destroy()}n.length<250?this.children.splice(t,e-t,...n):this.children=[].concat(this.children.slice(0,t),n,this.children.slice(e));for(let t=0;t<n.length;t++)n[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new V(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,n,i,r,o){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!((this.flags|t.flags)&8)}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function z(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}B.prototype.breakAfter=0;class V{constructor(t,e,n){this.children=t,this.pos=e,this.i=n,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function F(t,e,n,i,r,o,a,s,l){let{children:h}=t,u=h.length?h[e]:null,c=o.length?o[o.length-1]:null,d=c?c.breakAfter:a;if(!(e==i&&u&&!a&&!d&&o.length<2&&u.merge(n,r,o.length?c:null,0==n,s,l))){if(i<h.length){let t=h[i];t&&(r<t.length||t.breakAfter&&(null==c?void 0:c.breakAfter))?(e==i&&(t=t.split(r),r=0),!d&&c&&t.merge(0,r,c,!0,0,l)?o[o.length-1]=t:((r||t.children.length&&!t.children[0].length)&&t.merge(0,r,null,!1,0,l),o.push(t))):(null==t?void 0:t.breakAfter)&&(c?c.breakAfter=1:a=1),i++}for(u&&(u.breakAfter=a,n>0&&(!a&&o.length&&u.merge(n,u.length,o[0],!1,s,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,s,0),e++));e<i&&o.length;)if(h[i-1].become(o[o.length-1]))i--,o.pop(),l=o.length?0:s;else if(h[e].become(o[0]))e++,o.shift(),s=o.length?0:l;else break;!o.length&&e&&i<h.length&&!h[e-1].breakAfter&&h[i].merge(0,0,h[e-1],!1,s,l)&&e--,(e<i||o.length)&&t.replaceChildren(e,i,o)}}function W(t,e,n,i,r,o){let a=t.childCursor(),{i:s,off:l}=a.findPos(n,1),{i:h,off:u}=a.findPos(e,-1),c=e-n;for(let t of i)c+=t.length;t.length+=c,F(t,h,u,s,l,i,0,r,o)}let H="u">typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},G="u">typeof document?document:{documentElement:{style:{}}},U=/Edge\/(\d+)/.exec(H.userAgent),j=/MSIE \d/.test(H.userAgent),Y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(H.userAgent),X=!!(j||Y||U),Z=!X&&/gecko\/(\d+)/i.test(H.userAgent),q=!X&&/Chrome\/(\d+)/.exec(H.userAgent),K="webkitFontSmoothing"in G.documentElement.style,$=!X&&/Apple Computer/.test(H.vendor),J=$&&(/Mobile\/\w+/.test(H.userAgent)||H.maxTouchPoints>2);var Q={mac:J||/Mac/.test(H.platform),windows:/Win/.test(H.platform),linux:/Linux|X11/.test(H.platform),ie:X,ie_version:j?G.documentMode||6:Y?+Y[1]:U?+U[1]:0,gecko:Z,gecko_version:Z?+(/Firefox\/(\d+)/.exec(H.userAgent)||[0,0])[1]:0,chrome:!!q,chrome_version:q?+q[1]:0,ios:J,android:/Android\b/.test(H.userAgent),webkit:K,safari:$,webkit_version:K?+(/\bAppleWebKit\/(\d+)/.exec(H.userAgent)||[0,0])[1]:0,tabSize:null!=G.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class tt extends B{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,n){return!(8&this.flags)&&(!n||n instanceof tt&&!(this.length-(e-t)+n.length>256)&&!(8&n.flags))&&(this.text=this.text.slice(0,t)+(n?n.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new tt(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new N(this.dom,t)}domBoundsAround(t,e,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,o=e,a=0;0==e&&n<0||e==i&&n>=0?!(Q.chrome||Q.gecko)&&(e?(r--,a=1):o<i&&(o++,a=-1)):n<0?r--:o<i&&o++;let s=A(t,r,o).getClientRects();if(!s.length)return null;let l=s[(a?a<0:n>=0)?0:s.length-1];return Q.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,t=>t.width)||l),a?M(l,a<0):l||null}(this.dom,t,e)}}class te extends B{constructor(t,e=[],n=0){for(let i of(super(),this.mark=t,this.children=e,this.length=n,e))i.setParent(this)}setAttrs(t){if(L(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!((this.flags|t.flags)&8)}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,n,i,r,o){return(!n||!!(n instanceof te&&n.mark.eq(this.mark))&&(!t||!(r<=0))&&(!(e<this.length)||!(o<=0)))&&(W(this,t,e,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(t){let e=[],n=0,i=-1,r=0;for(let o of this.children){let a=n+o.length;a>t&&e.push(n<t?o.split(t-n):o),i<0&&n>=t&&(i=r),n=a,r++}let o=this.length-t;return this.length=t,i>-1&&(this.children.length=i,this.markDirty()),new te(this.mark,e,o)}domAtPos(t){return tr(this,t)}coordsAt(t,e){return to(this,t,e)}}class tn extends B{static create(t,e,n){return new tn(t,e,n)}constructor(t,e,n){super(),this.widget=t,this.length=e,this.side=n,this.prevWidget=null}split(t){let e=tn.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,n,i,r,o){return(!n||n instanceof tn&&!!this.widget.compare(n.widget)&&(!(t>0)||!(r<=0))&&(!(e<this.length)||!(o<=0)))&&(this.length=t+(n?n.length:0)+(this.length-e),!0)}become(t){return t instanceof tn&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return s.EY.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,n=e&&e.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):s.EY.empty}domAtPos(t){return(this.length?0==t:this.side>0)?N.before(this.dom):N.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let n=this.widget.coordsAt(this.dom,t,e);if(n)return n;let i=this.dom.getClientRects(),r=null;if(!i.length)return null;let o=this.side?this.side<0:t>0;for(let e=o?i.length-1:0;r=i[e],t>0?0!=e:e!=i.length-1&&!(r.top<r.bottom);e+=o?-1:1);return M(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ti extends B{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof ti&&t.side==this.side}split(){return new ti(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?N.before(this.dom):N.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return s.EY.empty}get isHidden(){return!0}}function tr(t,e){let n=t.dom,{children:i}=t,r=0;for(let t=0;r<i.length;r++){let o=i[r],a=t+o.length;if(!(a==t&&0>=o.getSide())){if(e>t&&e<a&&o.dom.parentNode==n)return o.domAtPos(e-t);if(e<=t)break;t=a}}for(let t=r;t>0;t--){let e=i[t-1];if(e.dom.parentNode==n)return e.domAtPos(e.length)}for(let t=r;t<i.length;t++){let e=i[t];if(e.dom.parentNode==n)return e.domAtPos(0)}return new N(n,0)}function to(t,e,n){let i=null,r=-1,o=null,a=-1;!function t(e,s){for(let l=0,h=0;l<e.children.length&&h<=s;l++){let u=e.children[l],c=h+u.length;c>=s&&(u.children.length?t(u,s-h):(!o||o.isHidden&&(n>0||function(t,e){let n=t.coordsAt(0,1),i=e.coordsAt(0,1);return n&&i&&i.top<n.bottom}(o,u)))&&(c>s||h==c&&u.getSide()>0)?(o=u,a=s-h):(h<s||h==c&&0>u.getSide()&&!u.isHidden)&&(i=u,r=s-h)),h=c}}(t,e);let s=(n<0?i:o)||i||o;return s?s.coordsAt(Math.max(0,s==i?r:a),n):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=v(e);return n[n.length-1]||null}(t)}function ta(t,e){for(let n in t)"class"==n&&e.class?e.class+=" "+t.class:"style"==n&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}tt.prototype.children=tn.prototype.children=ti.prototype.children=E;let ts=Object.create(null);function tl(t,e,n){if(t==e)return!0;t||(t=ts),e||(e=ts);let i=Object.keys(t),r=Object.keys(e);if(i.length-(n&&i.indexOf(n)>-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(-1==r.indexOf(o)||t[o]!==e[o]))return!1;return!0}function th(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,"style"==r?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,"style"==r?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}class tu{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return -1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var tc=((r=tc||(tc={}))[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r);class td extends s.FB{constructor(t,e,n,i){super(),this.startSide=t,this.endSide=e,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(t){return new tp(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),n=!!t.block;return e+=n&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new tg(t,e,e,n,t.widget||null,!1)}static replace(t){let e=!!t.block,n,i;if(t.isBlockGap)n=-5e8,i=4e8;else{let{start:r,end:o}=tm(t,e);n=(r?e?-3e8:-1:5e8)-1,i=(o?e?2e8:1:-6e8)+1}return new tg(t,n,i,e,t.widget||null,!0)}static line(t){return new tf(t)}static set(t,e=!1){return s.om.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}td.none=s.om.empty;class tp extends td{constructor(t){let{start:e,end:n}=tm(t);super(e?-1:5e8,n?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,n;return this==t||t instanceof tp&&this.tagName==t.tagName&&(this.class||(null==(e=this.attrs)?void 0:e.class))==(t.class||(null==(n=t.attrs)?void 0:n.class))&&tl(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw RangeError("Mark decorations may not be empty");return super.range(t,e)}}tp.prototype.point=!1;class tf extends td{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof tf&&this.spec.class==t.spec.class&&tl(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}tf.prototype.mapMode=s.iR.TrackBefore,tf.prototype.point=!0;class tg extends td{constructor(t,e,n,i,r,o){super(e,n,r,t),this.block=i,this.isReplace=o,this.mapMode=i?e<=0?s.iR.TrackBefore:s.iR.TrackAfter:s.iR.TrackDel}get type(){return this.startSide!=this.endSide?tc.WidgetRange:this.startSide<=0?tc.WidgetBefore:tc.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){var e,n;return t instanceof tg&&(e=this.widget,e==(n=t.widget)||!!(e&&n&&e.compare(n)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function tm(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return null==n&&(n=t.inclusive),null==i&&(i=t.inclusive),{start:null!=n?n:e,end:null!=i?i:e}}function ty(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}tg.prototype.point=!0;class tv extends B{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,n,i,r,o){if(n){if(!(n instanceof tv))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),W(this,t,e,n?n.children.slice():[],r,o),!0}split(t){let e=new tv;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:n,off:i}=this.childPos(t);i&&(e.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let t=n;t<this.children.length;t++)e.append(this.children[t],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){tl(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){!function t(e,n,i){let r,{children:o}=e;i>0&&n instanceof te&&o.length&&(r=o[o.length-1])instanceof te&&r.mark.eq(n.mark)?t(r,n.children[0],i-1):(o.push(n),n.setParent(e)),e.length+=n.length}(this,t,e)}addLineDeco(t){let e=t.spec.attributes,n=t.spec.class;e&&(this.attrs=ta(e,this.attrs||{})),n&&(this.attrs=ta({class:n},this.attrs||{}))}domAtPos(t){return tr(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var n;this.dom?4&this.flags&&(L(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(th(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let i=this.dom.lastChild;for(;i&&B.get(i)instanceof te;)i=i.lastChild;if(!i||!this.length||"BR"!=i.nodeName&&(null==(n=B.get(i))?void 0:n.isEditable)==!1&&(!Q.ios||!this.children.some(t=>t instanceof tt))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t=0,e;for(let n of this.children){if(!(n instanceof tt)||/[^ -~]/.test(n.text))return null;let i=v(n.dom);if(1!=i.length)return null;t+=i[0].width,e=i[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(t,e){let n=to(this,t,e);if(!this.children.length&&n&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=n.bottom-n.top;if(2>Math.abs(e-t.lineHeight)&&t.textHeight<e){let i=(e-t.textHeight)/2;return{top:n.top+i,bottom:n.bottom-i,left:n.left,right:n.left}}}return n}become(t){return t instanceof tv&&0==this.children.length&&0==t.children.length&&tl(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let n=0,i=0;n<t.children.length;n++){let r=t.children[n],o=i+r.length;if(o>=e){if(r instanceof tv)return r;if(o>e)break}i=o+r.breakAfter}return null}}class tx extends B{constructor(t,e,n){super(),this.widget=t,this.length=e,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(t,e,n,i,r,o){return(!n||n instanceof tx&&!!this.widget.compare(n.widget)&&(!(t>0)||!(r<=0))&&(!(e<this.length)||!(o<=0)))&&(this.length=t+(n?n.length:0)+(this.length-e),!0)}domAtPos(t){return 0==t?N.before(this.dom):N.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let n=new tx(this.widget,e,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return E}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):s.EY.empty}domBoundsAround(){return null}become(t){return t instanceof tx&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){let n=this.widget.coordsAt(this.dom,t,e);return n||(this.widget instanceof t_?null:M(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:n}=this.deco;return e!=n&&(t<0?e<0:n>0)}}class t_ extends tu{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class tb{constructor(t,e,n,i){this.doc=t,this.pos=e,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof tx&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new tv),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(tw(new ti(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof tx||this.getLine()}buildText(t,e,n){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:n,done:i}=this.cursor.next(this.skip);if(this.skip=0,i)throw Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let i=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-n)),this.getLine().append(tw(new tt(this.text.slice(this.textOff,this.textOff+i)),e),n),this.atCursorPos=!0,this.textOff+=i,t-=i,n=0}}span(t,e,n,i){this.buildText(e-t,n,i),this.pos=e,this.openStart<0&&(this.openStart=i)}point(t,e,n,i,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof tg){if(n.block)throw RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=e-t;if(n instanceof tg)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new tx(n.widget||tS.block,a,n));else{let o=tn.create(n.widget||tS.inline,a,a?0:n.startSide),s=this.atCursorPos&&!o.isEditable&&r<=i.length&&(t<e||n.startSide>0),l=!o.isEditable&&(t<e||r>i.length||n.startSide<=0),h=this.getLine();2!=this.pendingBuffer||s||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),s&&(h.append(tw(new ti(1),i),r),r=i.length+Math.max(0,r-i.length)),h.append(tw(o,i),r),this.atCursorPos=l,this.pendingBuffer=l?t<e||r>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=r)}static build(t,e,n,i,r){let o=new tb(t,e,n,r);return o.openEnd=s.om.spans(i,e,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function tw(t,e){for(let n of e)t=new te(n,[t],t.length);return t}class tS extends tu{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}tS.inline=new tS("span"),tS.block=new tS("div");var tM=((o=tM||(tM={}))[o.LTR=0]="LTR",o[o.RTL=1]="RTL",o);let tC=tM.LTR,tk=tM.RTL;function tT(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<t[n]);return e}let tI=tT("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),tA=tT("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),tD=Object.create(null),tL=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);tD[e]=n,tD[n]=-e}function tO(t){return t<=247?tI[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?tA[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}let tP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class tR{get dir(){return this.level%2?tk:tC}constructor(t,e,n){this.from=t,this.to=e,this.level=n}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,n,i){let r=-1;for(let o=0;o<t.length;o++){let a=t[o];if(a.from<=e&&a.to>=e){if(a.level==n)return o;(r<0||(0!=i?i<0?a.from<e:a.to>e:t[r].level>a.level))&&(r=o)}}if(r<0)throw RangeError("Index out of range");return r}}let tN=[];function tE(t){return[new tR(0,t,0)]}let tB="",tz=s.sj.define(),tV=s.sj.define(),tF=s.sj.define(),tW=s.sj.define(),tH=s.sj.define(),tG=s.sj.define(),tU=s.sj.define(),tj=s.sj.define(),tY=s.sj.define(),tX=s.sj.define({combine:t=>t.some(t=>t)}),tZ=s.sj.define({combine:t=>t.some(t=>t)}),tq=s.sj.define();class tK{constructor(t,e="nearest",n="nearest",i=5,r=5,o=!1){this.range=t,this.y=e,this.x=n,this.yMargin=i,this.xMargin=r,this.isSnapshot=o}map(t){return t.empty?this:new tK(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new tK(s.OF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let t$=s.Pe.define({map:(t,e)=>t.map(e)}),tJ=s.Pe.define();function tQ(t,e,n){let i=t.facet(tW);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}let t0=s.sj.define({combine:t=>!t.length||t[0]}),t1=0,t2=s.sj.define({combine:t=>t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})});class t5{constructor(t,e,n,i,r){this.id=t,this.create=e,this.domEventHandlers=n,this.domEventObservers=i,this.baseExtensions=r(this),this.extension=this.baseExtensions.concat(t2.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(t2.of({plugin:this,arg:t}))}static define(t,e){let{eventHandlers:n,eventObservers:i,provide:r,decorations:o}=e||{};return new t5(t1++,t,n,i,t=>{let e=[];return o&&e.push(t6.of(e=>{let n=e.plugin(t);return n?o(n):td.none})),r&&e.push(r(t)),e})}static fromClass(t,e){return t5.define((e,n)=>new t(e,n),e)}}class t3{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(tQ(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(e){tQ(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null==(e=this.value)?void 0:e.destroy)try{this.value.destroy()}catch(e){tQ(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let t4=s.sj.define(),t8=s.sj.define(),t6=s.sj.define(),t9=s.sj.define(),t7=s.sj.define(),et=s.sj.define();function ee(t,e){let n=t.state.facet(et);if(!n.length)return n;let i=n.map(e=>e instanceof Function?e(t):e),r=[];return s.om.spans(i,e.from,e.to,{point(){},span(t,n,i,o){let a=t-e.from,s=n-e.from,l=r;for(let t=i.length-1;t>=0;t--,o--){let n=i[t].spec.bidiIsolate,r;if(null==n&&(n=function(t,e,n){for(let i=e;i<n;i++){let e=tO(t.charCodeAt(i));if(1==e)break;if(2==e||4==e)return tk}return tC}(e.text,a,s)),o>0&&l.length&&(r=l[l.length-1]).to==a&&r.direction==n)r.to=s,l=r.inner;else{let t={from:a,to:s,direction:n,inner:[]};l.push(t),l=t.inner}}}}),r}let en=s.sj.define();function ei(t){let e=0,n=0,i=0,r=0;for(let o of t.state.facet(en)){let a=o(t);a&&(null!=a.left&&(e=Math.max(e,a.left)),null!=a.right&&(n=Math.max(n,a.right)),null!=a.top&&(i=Math.max(i,a.top)),null!=a.bottom&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}let er=s.sj.define();class eo{constructor(t,e,n,i){this.fromA=t,this.toA=e,this.fromB=n,this.toB=i}join(t){return new eo(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,n=this;for(;e>0;e--){let i=t[e-1];if(!(i.fromA>n.toA)){if(i.toA<n.fromA)break;n=n.join(i),t.splice(e-1,1)}}return t.splice(e,0,n),t}static extendWithRanges(t,e){if(0==e.length)return t;let n=[];for(let i=0,r=0,o=0,a=0;;i++){let s=i==t.length?null:t[i],l=o-a,h=s?s.fromB:1e9;for(;r<e.length&&e[r]<h;){let t=e[r],i=e[r+1],o=Math.max(a,t),s=Math.min(h,i);if(o<=s&&new eo(o+l,s+l,o,s).addToSet(n),i>h)break;r+=2}if(!s)return n;new eo(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),o=s.toA,a=s.toB}}}class ea{constructor(t,e,n){for(let i of(this.view=t,this.state=e,this.transactions=n,this.flags=0,this.startState=t.state,this.changes=s.VR.empty(this.startState.doc.length),n))this.changes=this.changes.compose(i.changes);let i=[];this.changes.iterChangedRanges((t,e,n,r)=>i.push(new eo(t,e,n,r))),this.changedRanges=i}static create(t,e,n){return new ea(t,e,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}class es extends B{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=td.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new tv],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new eo(0,0,0,t.state.doc.length)],0,null)}update(t){var e,n,i,r,o,a;let l,h,u=t.changedRanges;this.minWidth>0&&u.length&&(u.every(({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let c=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null==(e=this.domChanged)?void 0:e.newSel)?c=this.domChanged.newSel.head:(n=t.changes,i=this.hasComposition,l=!1,i&&n.iterChangedRanges((t,e)=>{t<i.to&&e>i.from&&(l=!0)}),l||t.selectionSet||(c=t.state.selection.main.head)));let d=c>-1?function(t,e,n){let i=el(t,n);if(!i)return null;let{node:r,from:o,to:a}=i,s=r.nodeValue;if(/[\n\r]/.test(s)||t.state.doc.sliceString(i.from,i.to)!=s)return null;let l=e.invertedDesc,h=new eo(l.mapPos(o),l.mapPos(a),o,a),u=[];for(let e=r.parentNode;;e=e.parentNode){let n=B.get(e);if(n instanceof te)u.push({node:e,deco:n.mark});else{if(n instanceof tv||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:h,text:r,marks:u,line:e};if(e==t.contentDOM)return null;u.push({node:e,deco:new tp({inclusive:!0,attributes:function(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,c):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:n}=this.hasComposition;u=new eo(e,n,t.changes.mapPos(e,-1),t.changes.mapPos(n,1)).addToSet(u.slice())}this.hasComposition=d?{from:d.range.fromB,to:d.range.toB}:null,(Q.ie||Q.chrome)&&!d&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let p=(r=this.decorations,o=this.updateDeco(),a=t.changes,h=new eh,s.om.compare(r,o,a,h),h.changes);return u=eo.extendWithRanges(u,p),(!!(7&this.flags)||0!=u.length)&&(this.updateInner(u,t.startState.doc.length,d),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,n);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=Q.chrome||Q.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||i.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(t=>t.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof tx&&t.widget instanceof t_&&r.push(t.dom);i.updateGaps(r)}updateChildren(t,e,n){let i=n?n.range.addToSet(t.slice()):t,r=this.childCursor(e);for(let t=i.length-1;;t--){let e=t>=0?i[t]:null;if(!e)break;let{fromA:o,toA:a,fromB:s,toB:l}=e,h,u,c,d;if(n&&n.range.fromB<l&&n.range.toB>s){let t=tb.build(this.view.state.doc,s,n.range.fromB,this.decorations,this.dynamicDecorationMap),e=tb.build(this.view.state.doc,n.range.toB,l,this.decorations,this.dynamicDecorationMap);u=t.breakAtStart,c=t.openStart,d=e.openEnd;let i=this.compositionView(n);e.breakAtStart?i.breakAfter=1:e.content.length&&i.merge(i.length,i.length,e.content[0],!1,e.openStart,0)&&(i.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&i.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),h=t.content.concat(i).concat(e.content)}else({content:h,breakAtStart:u,openStart:c,openEnd:d}=tb.build(this.view.state.doc,s,l,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=r.findPos(a,1),{i:g,off:m}=r.findPos(o,-1);F(this,g,m,p,f,h,u,c,d)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(t){for(let e of(this.editContextFormatting=this.editContextFormatting.map(t.changes),t.transactions))for(let t of e.effects)t.is(tJ)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new tt(t.text.nodeValue);for(let{deco:n}of(e.flags|=8,t.marks))e=new te(n,[e],e.length);let n=new tv;return n.append(e,0),n}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|!!e.children.some(t=>7&t.flags),this.markedForComposition.add(e);let n=B.get(t);n&&n!=e&&(n.dom=null),e.setDOM(t)},n=this.childPos(t.range.fromB,1),i=this.children[n.i];e(t.line,i);for(let r=t.marks.length-1;r>=-1;r--)n=i.childPos(n.off,1),i=i.children[n.i],e(r>=0?t.marks[r].node:t.text,i)}updateSelection(t=!1,e=!1){var n;(t||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&!(this.view.state.facet(t0)||this.dom.tabIndex>-1)&&y(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||e||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),h=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Q.gecko&&s.empty&&!this.hasComposition&&1==(n=l).node.nodeType&&n.node.firstChild&&(0==n.offset||"false"==n.node.childNodes[n.offset-1].contentEditable)&&(n.offset==n.node.childNodes.length||"false"==n.node.childNodes[n.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(t,l.node.childNodes[l.offset]||null)),l=h=new N(t,0),a=!0}let u=this.view.observer.selectionRange;!a&&u.focusNode&&(x(l.node,l.offset,u.anchorNode,u.anchorOffset)&&x(h.node,h.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,s))||(this.view.observer.ignore(()=>{Q.android&&Q.chrome&&this.dom.contains(u.focusNode)&&function(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=g(this.view.root);if(t)if(s.empty){if(Q.gecko){var e,n;let t=(e=l.node,n=l.offset,1!=e.nodeType?0:(n&&"false"==e.childNodes[n-1].contentEditable?1:0)|2*(n<e.childNodes.length&&"false"==e.childNodes[n].contentEditable));if(t&&3!=t){let e=(1==t?P:R)(l.node,l.offset);e&&(l=new N(e.node,e.offset))}}t.collapse(l.node,l.offset),null!=s.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=s.bidiLevel)}else if(t.extend){t.collapse(l.node,l.offset);try{t.extend(h.node,h.offset)}catch(t){}}else{let e=document.createRange();s.anchor>s.head&&([l,h]=[h,l]),e.setEnd(h.node,h.offset),e.setStart(l.node,l.offset),t.removeAllRanges(),t.addRange(e)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,h)),this.impreciseAnchor=l.precise?null:new N(u.anchorNode,u.anchorOffset),this.impreciseHead=h.precise?null:new N(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&x(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,n=g(t.root),{anchorNode:i,anchorOffset:r}=t.observer.selectionRange;if(!n||!e.empty||!e.assoc||!n.modify)return;let o=tv.find(this,e.head);if(!o)return;let a=o.posAtStart;if(e.head==a||e.head==a+o.length)return;let s=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!s||!l||s.bottom>l.top)return;let h=this.domAtPos(e.head+e.assoc);n.collapse(h.node,h.offset),n.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let u=t.observer.selectionRange;t.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=e.from&&n.collapse(i,r)}moveToLine(t){let e=this.dom,n;if(t.node!=e)return t;for(let i=t.offset;!n&&i<e.childNodes.length;i++){let t=B.get(e.childNodes[i]);t instanceof tv&&(n=t.domAtPos(0))}for(let i=t.offset-1;!n&&i>=0;i--){let t=B.get(e.childNodes[i]);t instanceof tv&&(n=t.domAtPos(t.length))}return n?new N(n.node,n.offset,!0):t}nearest(t){for(let e=t;e;){let t=B.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let n=this.nearest(t);if(!n)throw RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(t,e)+n.posAtStart}domAtPos(t){let{i:e,off:n}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(n<t.length||t instanceof tv)break;e++,n=0}return this.children[e].domAtPos(n)}coordsAt(t,e){let n=null,i=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],s=r-a.breakAfter,l=s-a.length;if(s<t)break;if(l<=t&&(l<t||a.covers(-1))&&(s>t||a.covers(1))&&(!n||a instanceof tv&&!(n instanceof tv&&e>=0)))n=a,i=l;else if(n&&l==t&&s==t&&a instanceof tx&&2>Math.abs(e))if(a.deco.startSide<0)break;else o&&(n=null);r=l}return n?n.coordsAt(t-i,e):null}coordsForChar(t){let{i:e,off:n}=this.childPos(t,1),i=this.children[e];if(!(i instanceof tv))return null;for(;i.children.length;){let{i:t,off:e}=i.childPos(n,1);for(;;t++){if(t==i.children.length)return null;if((i=i.children[t]).length)break}n=e}if(!(i instanceof tt))return null;let r=(0,s.zK)(i.text,n);if(r==n)return null;let o=A(i.dom,n,r).getClientRects();for(let t=0;t<o.length;t++){let e=o[t];if(t==o.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:n,to:i}=t,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==tM.LTR;for(let t=0,l=0;l<this.children.length;l++){let h=this.children[l],u=t+h.length;if(u>i)break;if(t>=n){let n=h.dom.getBoundingClientRect();if(e.push(n.height),o){let e=h.dom.lastChild,i=e?v(e):[];if(i.length){let e=i[i.length-1],o=s?e.right-n.left:n.right-e.left;o>a&&(a=o,this.minWidth=r,this.minWidthFrom=t,this.minWidthTo=u)}}}t=u+h.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?tM.RTL:tM.LTR}measureTextSize(){for(let t of this.children)if(t instanceof tv){let e=t.measureTextSize();if(e)return e}let t=document.createElement("div"),e,n,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(t);let r=v(t.firstChild)[0];e=t.getBoundingClientRect().height,n=r?r.width/27:7,i=r?r.height:e,t.remove()}),{lineHeight:e,charWidth:n,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new V(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let n=0,i=0;;i++){let r=i==e.viewports.length?null:e.viewports[i],o=r?r.from-1:this.length;if(o>n){let i=(e.lineBlockAt(o).bottom-e.lineBlockAt(n).top)/this.view.scaleY;t.push(td.replace({widget:new t_(i),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return td.set(t)}updateDeco(){let t=1,e=this.view.state.facet(t6).map(e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e),n=!1,i=this.view.state.facet(t9).map((t,e)=>{let i="function"==typeof t;return i&&(n=!0),i?t(this.view):t});for(i.length&&(this.dynamicDecorationMap[t++]=n,e.push(s.om.join(i))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=e.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let e of this.view.state.facet(tq))try{if(e(this.view,t.range,t))return!0}catch(t){tQ(this.view.state,t,"scroll handler")}let{range:e}=t,n=this.coordsAt(e.head,e.empty?e.assoc:e.head>e.anchor?-1:1),i;if(!n)return;!e.empty&&(i=this.coordsAt(e.anchor,e.anchor>e.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let r=ei(this.view),o={left:n.left-r.left,top:n.top-r.top,right:n.right+r.right,bottom:n.bottom+r.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(t,e,n,i,r,o,a,s){let l=t.ownerDocument,h=l.defaultView||window;for(let u=t,c=!1;u&&!c;)if(1==u.nodeType){let t,d=u==l.body,p=1,f=1;if(d)t=function(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(c=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let e=u.getBoundingClientRect();({scaleX:p,scaleY:f}=C(u,e)),t={left:e.left,right:e.left+u.clientWidth*p,top:e.top,bottom:e.top+u.clientHeight*f}}let g=0,m=0;if("nearest"==r)e.top<t.top?(m=e.top-(t.top+a),n>0&&e.bottom>t.bottom+m&&(m=e.bottom-t.bottom+a)):e.bottom>t.bottom&&(m=e.bottom-t.bottom+a,n<0&&e.top-m<t.top&&(m=e.top-(t.top+a)));else{let i=e.bottom-e.top,o=t.bottom-t.top;m=("center"==r&&i<=o?e.top+i/2-o/2:"start"==r||"center"==r&&n<0?e.top-a:e.bottom-o+a)-t.top}if("nearest"==i?e.left<t.left?(g=e.left-(t.left+o),n>0&&e.right>t.right+g&&(g=e.right-t.right+o)):e.right>t.right&&(g=e.right-t.right+o,n<0&&e.left<t.left+g&&(g=e.left-(t.left+o))):g=("center"==i?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==i==s?e.left-o:e.right-(t.right-t.left)+o)-t.left,g||m)if(d)h.scrollBy(g,m);else{let t=0,n=0;if(m){let t=u.scrollTop;u.scrollTop+=m/f,n=(u.scrollTop-t)*f}if(g){let e=u.scrollLeft;u.scrollLeft+=g/p,t=(u.scrollLeft-e)*p}e={left:e.left-t,top:e.top-n,right:e.right-t,bottom:e.bottom-n},t&&1>Math.abs(t-g)&&(i="nearest"),n&&1>Math.abs(n-m)&&(r="nearest")}if(d)break;(e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right)&&(e={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)}),u=u.assignedSlot||u.parentNode}else if(11==u.nodeType)u=u.host;else break}(this.view.scrollDOM,o,e.head<e.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,a),-a),Math.max(Math.min(t.yMargin,s),-s),this.view.textDirection==tM.LTR)}}function el(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=P(n.focusNode,n.focusOffset),r=R(n.focusNode,n.focusOffset),o=i||r;if(r&&i&&r.node!=i.node){let e=B.get(r.node);if(!e||e instanceof tt&&e.text!=r.node.nodeValue)o=r;else if(t.docView.lastCompositionAfterCursor){let t=B.get(i.node);!t||t instanceof tt&&t.text!=i.node.nodeValue||(o=r)}}if(t.docView.lastCompositionAfterCursor=o!=i,!o)return null;let a=e-o.offset;return{from:a,to:a+o.node.nodeValue.length,node:o.node}}let eh=class{constructor(){this.changes=[]}compareRange(t,e){ty(t,e,this.changes)}comparePoint(t,e){ty(t,e,this.changes)}boundChange(t){ty(t,t,this.changes)}};function eu(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function ec(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function ed(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function ep(t,e,n){let i=t.nodeValue.length,r=-1,o=1e9,a=0;for(let s=0;s<i;s++){let i=A(t,s,s+1).getClientRects();for(let l=0;l<i.length;l++){let h=i[l];if(h.top==h.bottom)continue;a||(a=e-h.left);let u=(h.top>n?h.top-n:n-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&u<o){let n=e>=(h.left+h.right)/2,i=n;if((Q.chrome||Q.gecko)&&A(t,s).getBoundingClientRect().left==h.right&&(i=!n),u<=0)return{node:t,offset:s+ +!!i};r=s+ +!!i,o=u}}}return{node:t,offset:r>-1?r:a>0?t.nodeValue.length:0}}function ef(t,e,n,i=-1){var r,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:h}=t.viewState,{x:u,y:c}=e,d=c-s;if(d<0)return 0;if(d>h)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,r=!1;(l=t.elementAtHeight(d)).type!=tc.Text;)for(;!((d=i>0?l.bottom+e:l.top-e)>=0)||!(d<=h);){if(r)return n?null:0;r=!0,i=-i}c=s+d;let p=l.from;if(p<t.viewport.from)return 0==t.viewport.from?0:n?null:eg(t,a,l,u,c);if(p>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:eg(t,a,l,u,c);let f=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:f,m=g.elementFromPoint(u,c);m&&!t.contentDOM.contains(m)&&(m=null),!m&&(u=Math.max(a.left+1,Math.min(a.right-1,u)),(m=g.elementFromPoint(u,c))&&!t.contentDOM.contains(m)&&(m=null));let y,x=-1;if(m&&(null==(r=t.docView.nearest(m))?void 0:r.isEditable)!=!1){if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(u,c);t&&({offsetNode:y,offset:x}=t)}else if(f.caretRangeFromPoint){let e=f.caretRangeFromPoint(u,c);e&&({startContainer:y,startOffset:x}=e,(!t.contentDOM.contains(y)||Q.safari&&function(t,e,n){let i,r=t;if(3!=t.nodeType||e!=(i=t.nodeValue.length))return!1;for(;;){let t=r.nextSibling;if(t){if("BR"==t.nodeName)break;return!1}{let t=r.parentNode;if(!t||"DIV"==t.nodeName)break;r=t}}return A(t,i-1,i).getBoundingClientRect().right>n}(y,x,u)||Q.chrome&&function(t,e,n){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return n-(1==t.nodeType?t.getBoundingClientRect():A(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,x,u))&&(y=void 0))}y&&(x=Math.min(S(y),x))}if(!y||!t.docView.dom.contains(y)){let e=tv.find(t.docView,p);if(!e)return d>l.top+l.height/2?l.to:l.from;({node:y,offset:x}=function t(e,n,i){let r,o,a,s,l,h,u,c,d=!1;for(let g=e.firstChild;g;g=g.nextSibling){let e=v(g);for(let m=0;m<e.length;m++){var p,f;let y=e[m];h&&eu(h,y)&&(y=ec(ed(y,h.bottom),h.top));let v=(p=y).left>n?p.left-n:Math.max(0,n-p.right),x=(f=y).top>i?f.top-i:Math.max(0,i-f.bottom);if(0==v&&0==x)return 3==g.nodeType?ep(g,n,i):t(g,n,i);(!l||c>x||c==x&&u>v)&&(l=g,h=y,u=v,c=x,d=!v||(n<y.left?m>0:m<e.length-1)),0==v?i>y.bottom&&(!a||a.bottom<y.bottom)?(r=g,a=y):i<y.top&&(!s||s.top>y.top)&&(o=g,s=y):a&&eu(a,y)?a=ed(a,y.bottom):s&&eu(s,y)&&(s=ec(s,y.top))}}if(a&&a.bottom>=i?(l=r,h=a):s&&s.top<=i&&(l=o,h=s),!l)return{node:e,offset:0};let g=Math.max(h.left,Math.min(h.right,n));if(3==l.nodeType)return ep(l,g,i);if(d&&"false"!=l.contentEditable)return t(l,g,i);let m=Array.prototype.indexOf.call(e.childNodes,l)+ +(n>=(h.left+h.right)/2);return{node:e,offset:m}}(e.dom,u,c))}let _=t.docView.nearest(y);if(!_)return null;if(!_.isWidget||(null==(o=_.dom)?void 0:o.nodeType)!=1)return _.localPosFromDOM(y,x)+_.posAtStart;{let t=_.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?_.posAtStart:_.posAtEnd}}function eg(t,e,n,i,r){let o=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;o+=Math.floor((r-n.top-(t.defaultLineHeight-e)*.5)/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+(0,s.kn)(a,o,t.state.tabSize)}function em(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let t;for(let r of i.type){if(r.from>e)break;if(!(r.to<e)){if(r.from<e&&r.to>e)return r;(!t||r.type==tc.Text&&(t.type!=r.type||(n<0?r.from<e:r.to>e)))&&(t=r)}}return t||i}return i}function ey(t,e,n,i){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let l=e,h=null;;){let e=function(t,e,n,i,r){var o;let a=i.head-t.from,l=tR.find(e,a,null!=(o=i.bidiLevel)?o:-1,i.assoc),h=e[l],u=h.side(r,n);if(a==u){let t=l+=r?1:-1;if(t<0||t>=e.length)return null;a=(h=e[l=t]).side(!r,n),u=h.side(r,n)}let c=(0,s.zK)(t.text,a,h.forward(r,n));(c<h.from||c>h.to)&&(c=u),tB=t.text.slice(Math.min(a,c),Math.max(a,c));let d=l==(r?e.length-1:0)?null:e[l+(r?1:-1)];return d&&c==u&&d.level+ +!r<h.level?s.OF.cursor(d.side(!r,n)+t.from,d.forward(r,n)?1:-1,d.level):s.OF.cursor(c+t.from,h.forward(r,n)?-1:1,h.level)}(r,o,a,l,n),u=tB;if(!e){if(r.number==(n?t.state.doc.lines:1))return l;u="\n",r=t.state.doc.line(r.number+(n?1:-1)),o=t.bidiSpans(r),e=t.visualLineSide(r,!n)}if(h){if(!h(u))return l}else{if(!i)return e;h=i(u)}l=e}}function ev(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(t,r,o)=>{if(e>t&&e<r){let o=i||n||(e-t<r-e?-1:1);e=o<0?t:r,i=o}});if(!i)return e}}function ex(t,e,n){let i=ev(t.state.facet(t7).map(e=>e(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:s.OF.cursor(i,i<n.from?1:-1)}class e_{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(s.$t.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+="￿"}readRange(t,e){if(!t)return this;let n=t.parentNode;for(let i=t;;){this.findPointBefore(n,i);let t=this.text.length;this.readNode(i);let r=i.nextSibling;if(r==e)break;let o=B.get(i),a=B.get(r);(o&&a?o.breakAfter:(o?o.breakAfter:b(i))||b(r)&&("BR"!=i.nodeName||i.cmIgnore)&&this.text.length>t)&&this.lineBreak(),i=r}return this.findPointBefore(n,e),this}readTextNode(t){let e=t.nodeValue;for(let n of this.points)n.node==t&&(n.pos=this.text.length+Math.min(n.offset,e.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=e.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=i.exec(e))&&(r=a.index,o=a[0].length),this.append(e.slice(n,r<0?e.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);n=r+o}}readNode(t){if(t.cmIgnore)return;let e=B.get(t),n=e&&e.overrideDOMText;if(null!=n){this.findPointInside(t,n.length);for(let t=n.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let n of this.points)n.node==t&&t.childNodes[n.offset]==e&&(n.pos=this.text.length)}findPointInside(t,e){for(let n of this.points)(3==t.nodeType?n.node==t:t.contains(n.node))&&(n.pos=this.text.length+(!function(t,e,n){for(;;){if(!e||n<S(e))return!1;if(e==t)return!0;n=_(e)+1,e=e.parentNode}}(t,n.node,n.offset)?0:e))}}class eb{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class ew{constructor(t,e,n,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:r,impreciseAnchor:o}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,n,0))){let e=r||o?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new eb(n,i)),(r!=n||o!=i)&&e.push(new eb(r,o))),e}(t),n=new e_(e,t.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(t,e){if(0==t.length)return null;let n=t[0].pos,i=2==t.length?t[1].pos:n;return n>-1&&i>-1?s.OF.single(n+e,i+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,n=r&&r.node==e.focusNode&&r.offset==e.focusOffset||!m(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),i=o&&o.node==e.anchorNode&&o.offset==e.anchorOffset||!m(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if((Q.ios||Q.chrome)&&t.state.selection.main.empty&&n!=i&&(a.from>0||a.to<t.state.doc.length)){let e=Math.min(n,i),r=Math.max(n,i),o=a.from-e,s=a.to-r;(0==o||1==o||0==e)&&(0==s||-1==s||r==t.state.doc.length)&&(n=0,i=t.state.doc.length)}this.newSel=s.OF.single(i,n)}}}function eS(t,e){let n,{newSel:i}=e,r=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:i,to:a}=e.bounds,l=r.from,h=null;(8===o||Q.android&&e.text.length<a-i)&&(l=r.to,h="end");let u=function(t,e,n,i){let r=Math.min(t.length,e.length),o=0;for(;o<r&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==r&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if("end"==i){let t=Math.max(0,o-Math.min(a,s));n-=a+t-o}if(a<o&&t.length<e.length){let t=n<=o&&n>=a?o-n:0;o-=t,s=o+(s-a),a=o}else if(s<o){let t=n<=o&&n>=s?o-n:0;o-=t,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}(t.state.doc.sliceString(i,a,"￿"),e.text,l-i,h);u&&(Q.chrome&&13==o&&u.toB==u.from+2&&"￿￿"==e.text.slice(u.from,u.toB)&&u.toB--,n={from:i+u.from,to:i+u.toA,insert:s.EY.of(e.text.slice(u.from,u.toB).split("￿"))})}else i&&(!t.hasFocus&&t.state.facet(t0)||i.main.eq(r))&&(i=null);if(!n&&!i)return!1;if(!n&&e.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:(Q.mac||Q.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==n.insert.length&&(i=s.OF.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:s.EY.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:Q.chrome&&n&&n.from==n.to&&n.from==r.head&&"\n "==n.insert.toString()&&t.lineWrapping&&(i&&(i=s.OF.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:s.EY.of([" "])}),n)return eM(t,n,i,o);if(!i||i.main.eq(r))return!1;{let e=!1,n="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),n=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:e,userEvent:n}),!0}}function eM(t,e,n,i=-1){let r;if(Q.ios&&t.inputState.flushIOSKey(e))return!0;let o=t.state.selection.main;if(Q.android&&(e.to==o.to&&(e.from==o.from||e.from==o.from-1&&" "==t.state.sliceDoc(e.from,o.from))&&1==e.insert.length&&2==e.insert.lines&&D(t.contentDOM,"Enter",13)||(e.from==o.from-1&&e.to==o.to&&0==e.insert.length||8==i&&e.insert.length<e.to-e.from&&e.to>o.head)&&D(t.contentDOM,"Backspace",8)||e.from==o.from&&e.to==o.to+1&&0==e.insert.length&&D(t.contentDOM,"Delete",46)))return!0;let a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l=()=>r||(r=function(t,e,n){let i,r=t.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let n=o.from<e.from?r.sliceDoc(o.from,e.from):"",a=o.to>e.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(t.state.toText(n+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let a=r.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let h=t.state.sliceDoc(e.from,e.to),u,c=n&&el(t,n.main.head);if(c){let t=e.insert.length-(e.to-e.from);u={from:c.from,to:c.to-t}}else u=t.state.doc.lineAt(o.head);let d=o.to-e.to,p=o.to-o.from;i=r.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:a,range:l||n.map(a)};let i=n.to-d,c=i-h.length;if(n.to-n.from!=p||t.state.sliceDoc(c,i)!=h||n.to>=u.from&&n.from<=u.to)return{range:n};let f=r.changes({from:c,to:i,insert:e.insert}),g=n.to-o.to;return{changes:f,range:l?s.OF.range(Math.max(0,l.anchor+g),Math.max(0,l.head+g)):n.map(f)}})}else i={changes:a,selection:l&&r.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}(t,e,n));return t.state.facet(tG).some(n=>n(t,e.from,e.to,a,l))||t.dispatch(l()),!0}class eC{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,Q.safari&&t.contentDOM.addEventListener("input",()=>null),Q.gecko&&function(t){eK.has(t)||(eK.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}(t.contentDOM.ownerDocument)}handleEvent(t){!function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=B.get(n))&&i.ignoreEvent(e))return!1;return!0}(this.view,t)||this.ignoreDuringComposition(t)||"keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(t.type,t)):this.runHandlers(t.type,t))}runHandlers(t,e){let n=this.handlers[t];if(n){for(let t of n.observers)t(this.view,e);for(let t of n.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=function(t){let e=Object.create(null);function n(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec,i=t&&t.plugin.domEventHandlers,r=t&&t.plugin.domEventObservers;if(i)for(let t in i){let r=i[t];r&&n(t).handlers.push(ek(e.value,r))}if(r)for(let t in r){let i=r[t];i&&n(t).observers.push(ek(e.value,i))}}for(let t in eO)n(t).handlers.push(eO[t]);for(let t in eP)n(t).observers.push(eP[t]);return e}(t),n=this.handlers,i=this.view.contentDOM;for(let t in e)if("scroll"!=t){let r=!e[t].handlers.length,o=n[t];o&&!o.handlers.length!=r&&(i.removeEventListener(t,this.handleEvent),o=null),o||i.addEventListener(t,this.handleEvent,{passive:r})}for(let t in n)"scroll"==t||e[t]||i.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){let e;return this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),!!(9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))||((this.tabFocusMode>0&&27!=t.keyCode&&0>eA.indexOf(t.keyCode)&&(this.tabFocusMode=-1),Q.android&&Q.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))?(this.view.observer.delayAndroidKey(t.key,t.keyCode),!0):Q.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&((e=eT.find(e=>e.keyCode==t.keyCode))&&!t.ctrlKey||eI.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=e||t,setTimeout(()=>this.flushIOSKey(),250),!0):(229!=t.keyCode&&this.view.observer.forceFlush(),!1))}flushIOSKey(t){let e=this.pendingIOSKey;return!(!e||"Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,D(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(Q.safari&&!Q.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function ek(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(t){tQ(n.state,t)}}}let eT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],eI="dthko",eA=[16,17,18,20,91,92,224,225];function eD(t){return .7*Math.max(0,t)+8}class eL{constructor(t,e,n,i){this.view=t,this.startEvent=e,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e=t.ownerDocument,n,i;for(let r=t.parentNode;r;)if(r==e.body||n&&i)break;else if(1==r.nodeType)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(11==r.nodeType)r=r.host;else break;return{x:n,y:i}}(t.contentDOM),this.atoms=t.state.facet(t7).map(e=>e(t));let r=t.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(s.$t.allowMultipleSelections)&&function(t,e){let n=t.state.facet(tz);return n.length?n[0](e):Q.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!!function(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=g(t.root);if(!i||0==i.rangeCount)return!0;let r=i.getRangeAt(0).getClientRects();for(let t=0;t<r.length;t++){let n=r[t];if(n.left<=e.clientX&&n.right>=e.clientX&&n.top<=e.clientY&&n.bottom>=e.clientY)return!0}return!1}(t,e)&&1==eU(e)&&null}start(t){!1===this.dragging&&this.select(t)}move(t){var e;if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&10>(e=this.startEvent,Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))))return;this.select(this.lastEvent=t);let n=0,i=0,r=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=ei(this.view);t.clientX-l.left<=r+6?n=-eD(r-t.clientX):t.clientX+l.right>=a-6&&(n=eD(t.clientX-a)),t.clientY-l.top<=o+6?i=-eD(o-t.clientY):t.clientY+l.bottom>=s-6&&(i=eD(t.clientY-s)),this.setScrollSpeed(n,i)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let n=0;n<t.ranges.length;n++){let i=t.ranges[n],r=null;if(i.empty){let t=ev(this.atoms,i.from,0);t!=i.from&&(r=s.OF.cursor(t,-1))}else{let t=ev(this.atoms,i.from,-1),e=ev(this.atoms,i.to,1);(t!=i.from||e!=i.to)&&(r=s.OF.range(i.from==i.anchor?t:e,i.from==i.head?t:e))}r&&(e||(e=t.ranges.slice()),e[n]=r)}return e?s.OF.create(e,t.mainIndex):t}select(t){let{view:e}=this,n=this.skipAtoms(this.style.get(t,this.extend,this.multiple));(this.mustSelect||!n.eq(e.state.selection,!1===this.dragging))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}let eO=Object.create(null),eP=Object.create(null),eR=Q.ie&&Q.ie_version<15||Q.ios&&Q.webkit_version<604;function eN(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function eE(t,e){e=eN(t.state,tj,e);let{state:n}=t,i,r=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(null!=eY&&n.selection.ranges.every(t=>t.empty)&&eY==o.toString()){let t=-1;i=n.changeByRange(i=>{let l=n.doc.lineAt(i.from);if(l.from==t)return{range:i};t=l.from;let h=n.toText((a?o.line(r++).text:e)+n.lineBreak);return{changes:{from:l.from,insert:h},range:s.OF.cursor(i.from+h.length)}})}else i=a?n.changeByRange(t=>{let e=o.line(r++);return{changes:{from:t.from,to:t.to,insert:e.text},range:s.OF.cursor(t.from+e.length)}}):n.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function eB(t,e,n,i){if(1==i)return s.OF.cursor(e,n);{if(2==i)return function(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(0==r.length)return s.OF.cursor(e);0==o?n=1:o==r.length&&(n=-1);let a=o,l=o;n<0?a=(0,s.zK)(r.text,o,!1):l=(0,s.zK)(r.text,o);let h=i(r.text.slice(a,l));for(;a>0;){let t=(0,s.zK)(r.text,a,!1);if(i(r.text.slice(t,a))!=h)break;a=t}for(;l<r.length;){let t=(0,s.zK)(r.text,l);if(i(r.text.slice(l,t))!=h)break;l=t}return s.OF.range(a+r.from,l+r.from)}(t.state,e,n);let r=tv.find(t.docView,e),o=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:o.from,l=r?r.posAtEnd:o.to;return l<t.state.doc.length&&l==o.to&&l++,s.OF.range(a,l)}}eP.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},eO.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),eP.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},eP.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},eO.mousedown=(t,e)=>{var n,i;let r,o,a;if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let l=null;for(let n of t.state.facet(tF))if(l=n(t,e))break;if(l||0!=e.button||(r=eV(n=t,i=e),o=eU(i),a=n.state.selection,l={update(t){t.docChanged&&(r.pos=t.changes.mapPos(r.pos),a=a.map(t.changes))},get(t,e,i){let l=eV(n,t),h,u=eB(n,l.pos,l.bias,o);if(r.pos!=l.pos&&!e){let t=eB(n,r.pos,r.bias,o),e=Math.min(t.from,u.from),i=Math.max(t.to,u.to);u=e<u.from?s.OF.range(e,i):s.OF.range(i,e)}return e?a.replaceRange(a.main.extend(u.from,u.to)):i&&1==o&&a.ranges.length>1&&(h=function(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return s.OF.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n))}return null}(a,l.pos))?h:i?a.addRange(u):s.OF.create([u])}}),l){let n=!t.hasFocus;t.inputState.startMouseSelection(new eL(t,e,l,n)),n&&t.observer.ignore(()=>{I(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}return!1};let ez=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function eV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:function(t,e,n,i){let r=tv.find(t.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(0==o)return 1;if(o==r.length)return -1;let a=r.coordsAt(o,-1);if(a&&ez(n,i,a))return -1;let s=r.coordsAt(o,1);return s&&ez(n,i,s)?1:a&&a.bottom>=i?-1:1}(t,n,e.clientX,e.clientY)}}let eF=Q.ie&&Q.ie_version<=11,eW=null,eH=0,eG=0;function eU(t){if(!eF)return t.detail;let e=eW,n=eG;return eW=t,eG=Date.now(),eH=!e||n>Date.now()-400&&2>Math.abs(e.clientX-t.clientX)&&2>Math.abs(e.clientY-t.clientY)?(eH+1)%3:1}function ej(t,e,n,i){let r;if(!(n=eN(t.state,tj,n)))return;let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:a}=t.inputState,s=i&&a&&((r=t.state.facet(tV)).length?r[0](e):Q.mac?!e.altKey:!e.ctrlKey)?{from:a.from,to:a.to}:null,l={from:o,insert:n},h=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:h,selection:{anchor:h.mapPos(o,-1),head:h.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}eO.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let t=i.posAtStart,e=t+i.length;(t>=n.to||e<=n.from)&&(n=s.OF.range(t,e))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",eN(t.state,tY,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1},eO.dragend=t=>(t.inputState.draggedContent=null,!1),eO.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&ej(t,e,i.filter(t=>null!=t).join(t.state.lineBreak),!1)};for(let t=0;t<n.length;t++){let e=new FileReader;e.onerror=o,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(i[t]=e.result),o()},e.readAsText(n[t])}return!0}{let n=e.dataTransfer.getData("Text");if(n)return ej(t,e,n,!0),!0}return!1},eO.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=eR?null:e.clipboardData;return n?(eE(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(!function(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),eE(t,n.value)},50)}(t),!1)};let eY=null;eO.copy=eO.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=function(t){let e=[],n=[],i=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let r=-1;for(let{from:i}of t.selection.ranges){let o=t.doc.lineAt(i);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:eN(t,tY,e.join(t.lineBreak)),ranges:n,linewise:i}}(t.state);if(!n&&!r)return!1;eY=r?n:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=eR?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(!function(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}(t,n),!1)};let eX=s.YH.define();function eZ(t,e){let n=[];for(let i of t.facet(tU)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:eX.of(!0)}):null}function eq(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=eZ(t.state,e);n?t.dispatch(n):t.update([])}},10)}eP.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),eq(t)},eP.blur=t=>{t.observer.clearSelectionRange(),eq(t)},eP.compositionstart=eP.compositionupdate=t=>{!t.observer.editContext&&(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},eP.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Q.chrome&&Q.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))},eP.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},eO.beforeinput=(t,e)=>{var n,i;let r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let i=null==(n=e.dataTransfer)?void 0:n.getData("text/plain"),r=e.getTargetRanges();if(i&&r.length){let e=r[0],n=t.posAtDOM(e.startContainer,e.startOffset),o=t.posAtDOM(e.endContainer,e.endOffset);return eM(t,{from:n,to:o,insert:t.state.toText(i)},null),!0}}if(Q.chrome&&Q.android&&(r=eT.find(t=>t.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let e=(null==(i=window.visualViewport)?void 0:i.height)||0;setTimeout(()=>{var n;((null==(n=window.visualViewport)?void 0:n.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Q.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),Q.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout(()=>eP.compositionend(t,e),20),!1};let eK=new Set,e$=["pre-wrap","normal","pre-line","break-spaces"],eJ=!1;class eQ{constructor(t){this.lineWrapping=t,this.doc=s.EY.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let n=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((e-t-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return e$.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let n=0;n<t.length;n++){let i=t[n];i<0?n++:this.heightSamples[Math.floor(10*i)]||(e=!0,this.heightSamples[Math.floor(10*i)]=!0)}return e}refresh(t,e,n,i,r,o){let a=e$.indexOf(t)>-1,s=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=e,this.charWidth=n,this.textHeight=i,this.lineLength=r,s){this.heightSamples={};for(let t=0;t<o.length;t++){let e=o[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return s}}class e0{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class e1{constructor(t,e,n,i,r){this.from=t,this.length=e,this.top=n,this.height=i,this._content=r}get type(){return"number"==typeof this._content?tc.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof tg?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e1(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var e2=((a=e2||(e2={}))[a.ByPos=0]="ByPos",a[a.ByHeight=1]="ByHeight",a[a.ByPosNoHeight=2]="ByPosNoHeight",a);class e5{constructor(t,e,n=2){this.length=t,this.height=e,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=2*!!t|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>.001&&(eJ=!0),this.height=t)}replace(t,e,n){return e5.of(n)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,n,i){let r=this,o=n.doc;for(let a=i.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:h,toB:u}=i[a],c=r.lineAt(s,e2.ByPosNoHeight,n.setDoc(e),0,0),d=c.to>=l?c:r.lineAt(l,e2.ByPosNoHeight,n,0,0);for(u+=d.to-l,l=d.to;a>0&&c.from<=i[a-1].toA;)s=i[a-1].fromA,h=i[a-1].fromB,a--,s<c.from&&(c=r.lineAt(s,e2.ByPosNoHeight,n,0,0));h+=c.from-s,s=c.from;let p=nt.build(n.setDoc(o),t,h,u);r=e3(r,r.replace(s,l,p))}return r.updateHeight(n,0)}static empty(){return new e8(0,0)}static of(t){if(1==t.length)return t[0];let e=0,n=t.length,i=0,r=0;for(;;)if(e==n)if(i>2*r){let r=t[e-1];r.break?t.splice(--e,1,r.left,null,r.right):t.splice(--e,1,r.left,r.right),n+=1+r.break,i-=r.size}else if(r>2*i){let e=t[n];e.break?t.splice(n,1,e.left,null,e.right):t.splice(n,1,e.left,e.right),n+=2+e.break,r-=e.size}else break;else if(i<r){let n=t[e++];n&&(i+=n.size)}else{let e=t[--n];e&&(r+=e.size)}let o=0;return null==t[e-1]?(o=1,e--):null==t[e]&&(o=1,n++),new e9(e5.of(t.slice(0,e)),o,e5.of(t.slice(n)))}}function e3(t,e){return t==e?t:(t.constructor!=e.constructor&&(eJ=!0),e)}e5.prototype.size=1;class e4 extends e5{constructor(t,e,n){super(t,e),this.deco=n}blockAt(t,e,n,i){return new e1(i,this.length,n,this.height,this.deco||0)}lineAt(t,e,n,i,r){return this.blockAt(0,n,i,r)}forEachLine(t,e,n,i,r,o){t<=r+this.length&&e>=r&&o(this.blockAt(0,n,i,r))}updateHeight(t,e=0,n=!1,i){return i&&i.from<=e&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class e8 extends e4{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,n,i){return new e1(i,this.length,n,this.height,this.breaks)}replace(t,e,n){let i=n[0];return 1==n.length&&(i instanceof e8||i instanceof e6&&4&i.flags)&&10>Math.abs(this.length-i.length)?(i instanceof e6?i=new e8(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):e5.of(n)}updateHeight(t,e=0,n=!1,i){return i&&i.from<=e&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class e6 extends e5{constructor(t){super(t,0)}heightMetrics(t,e){let n=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,r=i-n+1,o,a=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*r);o=e/r,this.length>r+1&&(a=(this.height-e)/(this.length-r-1))}else o=this.height/r;return{firstLine:n,lastLine:i,perLine:o,perChar:a}}blockAt(t,e,n,i){let{firstLine:r,lastLine:o,perLine:a,perChar:s}=this.heightMetrics(e,i);if(e.lineWrapping){let r=i+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-n)/this.height))*this.length)),o=e.doc.lineAt(r),l=a+o.length*s,h=Math.max(n,t-l/2);return new e1(o.from,o.length,h,l,0)}{let i=Math.max(0,Math.min(o-r,Math.floor((t-n)/a))),{from:s,length:l}=e.doc.line(r+i);return new e1(s,l,n+a*i,a,0)}}lineAt(t,e,n,i,r){if(e==e2.ByHeight)return this.blockAt(t,n,i,r);if(e==e2.ByPosNoHeight){let{from:e,to:i}=n.doc.lineAt(t);return new e1(e,i-e,0,0,0)}let{firstLine:o,perLine:a,perChar:s}=this.heightMetrics(n,r),l=n.doc.lineAt(t),h=a+l.length*s,u=l.number-o,c=i+a*u+s*(l.from-r-u);return new e1(l.from,l.length,Math.max(i,Math.min(c,i+this.height-h)),h,0)}forEachLine(t,e,n,i,r,o){t=Math.max(t,r),e=Math.min(e,r+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(n,r);for(let h=t,u=i;h<=e;){let e=n.doc.lineAt(h);if(h==t){let n=e.number-a;u+=s*n+l*(t-r-n)}let i=s+l*e.length;o(new e1(e.from,e.length,u,i,0)),u+=i,h=e.to+1}}replace(t,e,n){let i=this.length-e;if(i>0){let t=n[n.length-1];t instanceof e6?n[n.length-1]=new e6(t.length+i):n.push(null,new e6(i-1))}if(t>0){let e=n[0];e instanceof e6?n[0]=new e6(t+e.length):n.unshift(new e6(t-1),null)}return e5.of(n)}decomposeLeft(t,e){e.push(new e6(t-1),null)}decomposeRight(t,e){e.push(null,new e6(this.length-t-1))}updateHeight(t,e=0,n=!1,i){let r=e+this.length;if(i&&i.from<=e+this.length&&i.more){let n=[],o=Math.max(e,i.from),a=-1;for(i.from>e&&n.push(new e6(i.from-e-1).updateHeight(t,e));o<=r&&i.more;){let e=t.doc.lineAt(o).length;n.length&&n.push(null);let r=i.heights[i.index++];-1==a?a=r:Math.abs(r-a)>=.001&&(a=-2);let s=new e8(e,r);s.outdated=!1,n.push(s),o+=e+1}o<=r&&n.push(null,new e6(r-o).updateHeight(t,o));let s=e5.of(n);return(a<0||Math.abs(s.height-this.height)>=.001||Math.abs(a-this.heightMetrics(t,e).perLine)>=.001)&&(eJ=!0),e3(this,s)}return(n||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class e9 extends e5{constructor(t,e,n){super(t.length+e+n.length,t.height+n.height,e|(t.outdated||n.outdated?2:0)),this.left=t,this.right=n,this.size=t.size+n.size}get break(){return 1&this.flags}blockAt(t,e,n,i){let r=n+this.left.height;return t<r?this.left.blockAt(t,e,n,i):this.right.blockAt(t,e,r,i+this.left.length+this.break)}lineAt(t,e,n,i,r){let o=i+this.left.height,a=r+this.left.length+this.break,s=e==e2.ByHeight?t<o:t<a,l=s?this.left.lineAt(t,e,n,i,r):this.right.lineAt(t,e,n,o,a);if(this.break||(s?l.to<a:l.from>a))return l;let h=e==e2.ByPosNoHeight?e2.ByPosNoHeight:e2.ByPos;return s?l.join(this.right.lineAt(a,h,n,o,a)):this.left.lineAt(a,h,n,i,r).join(l)}forEachLine(t,e,n,i,r,o){let a=i+this.left.height,s=r+this.left.length+this.break;if(this.break)t<s&&this.left.forEachLine(t,e,n,i,r,o),e>=s&&this.right.forEachLine(t,e,n,a,s,o);else{let l=this.lineAt(s,e2.ByPos,n,i,r);t<l.from&&this.left.forEachLine(t,l.from-1,n,i,r,o),l.to>=t&&l.from<=e&&o(l),e>l.to&&this.right.forEachLine(l.to+1,e,n,a,s,o)}}replace(t,e,n){let i=this.left.length+this.break;if(e<i)return this.balanced(this.left.replace(t,e,n),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-i,e-i,n));let r=[];t>0&&this.decomposeLeft(t,r);let o=r.length;for(let t of n)r.push(t);if(t>0&&e7(r,o-1),e<this.length){let t=r.length;this.decomposeRight(e,r),e7(r,t)}return e5.of(r)}decomposeLeft(t,e){let n=this.left.length;if(t<=n)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&t>=++n&&e.push(null),t>n&&this.right.decomposeLeft(t-n,e)}decomposeRight(t,e){let n=this.left.length,i=n+this.break;if(t>=i)return this.right.decomposeRight(t-i,e);t<n&&this.left.decomposeRight(t,e),this.break&&t<i&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?e5.of(this.break?[t,null,e]:[t,e]):(this.left=e3(this.left,t),this.right=e3(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,n=!1,i){let{left:r,right:o}=this,a=e+r.length+this.break,s=null;return(i&&i.from<=e+r.length&&i.more?s=r=r.updateHeight(t,e,n,i):r.updateHeight(t,e,n),i&&i.from<=a+o.length&&i.more?s=o=o.updateHeight(t,a,n,i):o.updateHeight(t,a,n),s)?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function e7(t,e){let n,i;null==t[e]&&(n=t[e-1])instanceof e6&&(i=t[e+1])instanceof e6&&t.splice(e-1,3,new e6(n.length+1+i.length))}class nt{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof e8?n.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new e8(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,n){if(t<e||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=e-t;n.block?this.addBlock(new e4(o,i,n)):(o||r||i>=5)&&this.addLineDeco(i,r,o)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new e8(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let n=new e6(e-t);return this.oracle.doc.lineAt(t).to==e&&(n.flags|=4),n}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof e8)return t;let e=new e8(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=e,this.writtenTo=this.pos=this.pos+n}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof e8||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new e8(0,-1));let n=t;for(let t of this.nodes)t instanceof e8&&t.updateHeight(this.oracle,n),n+=t?t.length:1;return this.nodes}static build(t,e,n,i){let r=new nt(n,t);return s.om.spans(e,n,i,r,0),r.finish(n)}}class ne{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,n,i){(t<e||n&&n.heightRelevant||i&&i.heightRelevant)&&ty(t,e,this.changes,5)}}class nn{constructor(t,e,n,i){this.from=t,this.to=e,this.size=n,this.displaySize=i}static same(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.size!=r.size)return!1}return!0}draw(t,e){return td.replace({widget:new ni(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class ni extends tu{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class nr{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=nl,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=tM.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(t8).some(t=>"function"!=typeof t&&"cm-lineWrapping"==t.class);this.heightOracle=new eQ(e),this.stateDeco=t.facet(t6).filter(t=>"function"!=typeof t),this.heightMap=e5.empty().applyChanges(this.stateDeco,s.EY.empty,this.heightOracle.setDoc(t.doc),[new eo(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=td.set(this.lineGaps.map(t=>t.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let n=0;n<=1;n++){let i=n?e.head:e.anchor;if(!t.some(({from:t,to:e})=>i>=t&&i<=e)){let{from:e,to:n}=this.lineBlockAt(i);t.push(new no(e,n))}}return this.viewports=t.sort((t,e)=>t.from-e.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?nl:new nh(this.heightOracle,this.heightMap,this.viewports),2*!t.eq(this.scaler)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(nu(t,this.scaler))})}update(t,e=null){var n,i;let r;this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(t6).filter(t=>"function"!=typeof t);let a=t.changedRanges,l=eo.extendWithRanges(a,(n=this.stateDeco,i=t?t.changes:s.VR.empty(this.state.doc.length),r=new ne,s.om.compare(o,n,i,r,0),r.changes)),h=this.heightMap.height,u=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);eJ=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=h||eJ)&&(t.flags|=2),u?(this.scrollAnchorPos=t.changes.mapPos(u.from,-1),this.scrollAnchorHeight=u.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=h);let c=l.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<c.from||e.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,e));let d=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,t.flags|=this.updateForViewport(),(d||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(tZ)&&(this.mustEnforceCursorAssoc=!0)}measure(t){var e;let n,i,r=t.contentDOM,o=window.getComputedStyle(r),a=this.heightOracle,l=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?tM.RTL:tM.LTR;let h=this.heightOracle.mustRefreshForWrapping(l),u=r.getBoundingClientRect(),c=h||this.mustMeasureContent||this.contentDOMHeight!=u.height;this.contentDOMHeight=u.height,this.mustMeasureContent=!1;let d=0,p=0;if(u.width&&u.height){let{scaleX:t,scaleY:e}=C(r,u);(t>.005&&Math.abs(this.scaleX-t)>.005||e>.005&&Math.abs(this.scaleY-e)>.005)&&(this.scaleX=t,this.scaleY=e,d|=16,h=c=!0)}let f=(parseInt(o.paddingTop)||0)*this.scaleY,g=(parseInt(o.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=g)&&(this.paddingTop=f,this.paddingBottom=g,d|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(a.lineWrapping&&(c=!0),this.editorWidth=t.scrollDOM.clientWidth,d|=16);let m=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=O(t.scrollDOM);let y=(this.printing?function(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}:function(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,o=Math.max(0,n.left),a=Math.min(r.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let e=t.parentNode;e&&e!=i.body;)if(1==e.nodeType){let n=e,i=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=i.overflow){let i=n.getBoundingClientRect();o=Math.max(o,i.left),a=Math.min(a,i.right),s=Math.max(s,i.top),l=Math.min(e==t.parentNode?r.innerHeight:l,i.bottom)}e="absolute"==i.position||"fixed"==i.position?n.offsetParent:n.parentNode}else if(11==e.nodeType)e=e.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}})(r,this.paddingTop),v=y.top-this.pixelViewport.top,x=y.bottom-this.pixelViewport.bottom;this.pixelViewport=y;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(c=!0)),!this.inView&&!this.scrollTarget&&(n=(e=t.dom).getBoundingClientRect(),i=e.ownerDocument.defaultView||window,!(n.left<i.innerWidth)||!(n.right>0)||!(n.top<i.innerHeight)||!(n.bottom>0)))return 0;let b=u.width;if((this.contentDOMWidth!=b||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=u.width,this.editorHeight=t.scrollDOM.clientHeight,d|=16),c){let e=t.docView.measureVisibleLineHeights(this.viewport);if(a.mustRefreshForHeights(e)&&(h=!0),h||a.lineWrapping&&Math.abs(b-this.contentDOMWidth)>a.charWidth){let{lineHeight:n,charWidth:i,textHeight:r}=t.docView.measureTextSize();(h=n>0&&a.refresh(l,n,i,r,b/i,e))&&(t.docView.minWidth=0,d|=16)}for(let n of(v>0&&x>0?p=Math.max(v,x):v<0&&x<0&&(p=Math.min(v,x)),eJ=!1,this.viewports)){let i=n.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(n);this.heightMap=(h?e5.empty().applyChanges(this.stateDeco,s.EY.empty,this.heightOracle,[new eo(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(a,0,h,new e0(n.from,i))}eJ&&(d|=2)}let w=!this.viewportIsAppropriate(this.viewport,p)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(2&d&&(d|=this.updateScaler()),this.viewport=this.getViewport(p,this.scrollTarget),d|=this.updateForViewport()),(2&d||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(h?[]:this.lineGaps,t)),d|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),d}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let n=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),i=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,s=new no(i.lineAt(o-1e3*n,e2.ByHeight,r,0,0).from,i.lineAt(a+(1-n)*1e3,e2.ByHeight,r,0,0).to);if(e){let{head:t}=e.range;if(t<s.from||t>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=i.lineAt(t,e2.ByPos,r,0,0),a;a="center"==e.y?(o.top+o.bottom)/2-n/2:"start"==e.y||"nearest"==e.y&&t<s.from?o.top:o.bottom-n,s=new no(i.lineAt(a-500,e2.ByHeight,r,0,0).from,i.lineAt(a+n+500,e2.ByHeight,r,0,0).to)}}return s}mapViewport(t,e){let n=e.mapPos(t.from,-1),i=e.mapPos(t.to,1);return new no(this.heightMap.lineAt(n,e2.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,e2.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(t,e2.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(e,e2.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(0==t||i<=o-Math.max(10,Math.min(-n,250)))&&(e==this.state.doc.length||r>=a+Math.max(10,Math.min(n,250)))&&i>o-2e3&&r<a+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let n=[];for(let i of t)e.touchesRange(i.from,i.to)||n.push(new nn(e.mapPos(i.from),e.mapPos(i.to),i.size,i.displaySize));return n}ensureLineGaps(t,e){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,r=i>>1,o=i<<1;if(this.defaultTextDirection!=tM.LTR&&!n)return[];let a=[],l=(i,o,h,u)=>{if(o-i<r)return;let c=this.state.selection.main,d=[c.from];for(let t of(c.empty||d.push(c.to),d))if(t>i&&t<o){l(i,t-10,h,u),l(t+10,o,h,u);return}let p=function(t,e){for(let n of t)if(e(n))return n}(t,t=>t.from>=h.from&&t.to<=h.to&&Math.abs(t.from-i)<r&&Math.abs(t.to-o)<r&&!d.some(e=>t.from<e&&t.to>e));if(!p){if(o<h.to&&e&&n&&e.visibleRanges.some(t=>t.from<=o&&t.to>=o)){let t=e.moveToLineBoundary(s.OF.cursor(o),!1,!0).head;t>i&&(o=t)}let t=this.gapSize(h,i,o,u),r=n||t<2e6?t:2e6;p=new nn(i,o,t,r)}a.push(p)},h=e=>{var r,a,h;let u,c,d,p,f;if(e.length<o||e.type!=tc.Text)return;let g=(r=e.from,a=e.to,h=this.stateDeco,d=[],p=r,f=0,s.om.spans(h,r,a,{span(){},point(t,e){t>p&&(d.push({from:p,to:t}),f+=t-p),p=e}},20),p<a&&(d.push({from:p,to:a}),f+=a-p),{total:f,ranges:d});if(g.total<o)return;let m=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let t,n,r=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=m){let i=ns(g,m),o=((this.visibleBottom-this.visibleTop)/2+r)/e.height;t=i-o,n=i+o}else t=(this.visibleTop-e.top-r)/e.height,n=(this.visibleBottom-e.top+r)/e.height;u=na(g,t),c=na(g,n)}else{let n,r,o=g.total*this.heightOracle.charWidth,a=i*this.heightOracle.charWidth,s=0;if(o>2e6)for(let n of t)n.from>=e.from&&n.from<e.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let l=this.pixelViewport.left+s,h=this.pixelViewport.right+s;if(null!=m){let t=ns(g,m),e=((h-l)/2+a)/o;n=t-e,r=t+e}else n=(l-a)/o,r=(h+a)/o;u=na(g,n),c=na(g,r)}u>e.from&&l(e.from,u,e,g),c<e.to&&l(c,e.to,e,g)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(h):h(t);return a}gapSize(t,e,n,i){let r=ns(i,n)-ns(i,e);return this.heightOracle.lineWrapping?t.height*r:i.total*this.heightOracle.charWidth*r}updateLineGaps(t){nn.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=td.set(t.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];s.om.spans(e,this.viewport.from,this.viewport.to,{span(t,e){n.push({from:t,to:e})},point(){}},20);let i=0;if(n.length!=this.visibleRanges.length)i=12;else for(let e=0;e<n.length&&!(8&i);e++){let r=this.visibleRanges[e],o=n[e];(r.from!=o.from||r.to!=o.to)&&(i|=4,t&&t.mapPos(r.from,-1)==o.from&&t.mapPos(r.to,1)==o.to||(i|=8))}return this.visibleRanges=n,i}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(e=>e.from<=t&&e.to>=t)||nu(this.heightMap.lineAt(t,e2.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(e=>e.top<=t&&e.bottom>=t)||nu(this.heightMap.lineAt(this.scaler.fromDOM(t),e2.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return nu(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class no{constructor(t,e){this.from=t,this.to=e}}function na({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let t=0;;t++){let{from:n,to:r}=e[t],o=r-n;if(i<=o)return n+i;i-=o}}function ns(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}let nl={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class nh{constructor(t,e,n){let i=0,r=0,o=0;for(let a of(this.viewports=n.map(({from:n,to:r})=>{let o=e.lineAt(n,e2.ByPos,t,0,0).top,a=e.lineAt(r,e2.ByPos,t,0,0).bottom;return i+=a-o,{from:n,to:r,top:o,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(e.height-i),this.viewports))a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(t){for(let e=0,n=0,i=0;;e++){let r=e<this.viewports.length?this.viewports[e]:null;if(!r||t<r.top)return i+(t-n)*this.scale;if(t<=r.bottom)return r.domTop+(t-r.top);n=r.bottom,i=r.domBottom}}fromDOM(t){for(let e=0,n=0,i=0;;e++){let r=e<this.viewports.length?this.viewports[e]:null;if(!r||t<r.domTop)return n+(t-i)/this.scale;if(t<=r.domBottom)return r.top+(t-r.domTop);n=r.bottom,i=r.domBottom}}eq(t){return t instanceof nh&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}}function nu(t,e){if(1==e.scale)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new e1(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(t=>nu(t,e)):t._content)}let nc=s.sj.define({combine:t=>t.join(" ")}),nd=s.sj.define({combine:t=>t.indexOf(!0)>-1}),np=l.G.newName(),nf=l.G.newName(),ng=l.G.newName(),nm={"&light":"."+nf,"&dark":"."+ng};function ny(t,e,n){return new l.G(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,e=>{if("&"==e)return t;if(!n||!n[e])throw RangeError(`Unsupported selector: ${e}`);return n[e]}):t+" "+e})}let nv=ny("."+np,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},nm),nx={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},n_=Q.ie&&Q.ie_version<=11;class nb{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new k,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(e=>{for(let t of e)this.queue.push(t);(Q.ie&&Q.ie_version<=11||Q.ios&&t.composing)&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Q.android&&!1!==t.constructor.EDIT_CONTEXT&&!(Q.chrome&&Q.chrome_version<126)&&(this.editContext=new nM(t),t.state.facet(t0)&&(t.contentDOM.editContext=this.editContext.editContext)),n_&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var t;(null==(t=this.view.docView)?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((e,n)=>e!=t[n]))){for(let e of(this.gapIntersection.disconnect(),t))this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(t0)?n.root.activeElement!=this.dom:!y(this.dom,i))return;let r=i.anchorNode&&n.docView.nearest(i.anchorNode);if(r&&r.ignoreEvent(t)){e||(this.selectionChanged=!1);return}(Q.ie&&Q.ie_version<=11||Q.android&&Q.chrome)&&!n.state.selection.main.empty&&i.focusNode&&x(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=g(t.root);if(!e)return!1;let n=Q.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return nS(t,n)}let n=null;function i(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?nS(t,n):null}(this.view,e)||e;if(!n||this.selectionRange.eq(n))return!1;let i=y(this.dom,n);return i&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,S(n));;)if(i){if(1!=n.nodeType)return!1;let t=n.childNodes[i-1];"false"==t.contentEditable?i--:i=S(n=t)}else{if(n==t)return!0;i=_(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(n),i&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let n=this.dom;n;)if(1==n.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==n?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(n),n=n.assignedSlot||n.parentNode;else if(11==n.nodeType)n=n.host;else break;if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,nx),n_&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),n_&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var n;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&D(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null==(n=this.delayedAndroidKey)?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,n=-1,i=!1;for(let r of t){let t=this.readMutation(r);t&&(t.typeOver&&(i=!0),-1==e?{from:e,to:n}=t:(e=Math.min(t.from,e),n=Math.max(t.to,n)))}return{from:e,to:n,typeOver:i}}readChange(){let{from:t,to:e,typeOver:n}=this.processRecords(),i=this.selectionChanged&&y(this.dom,this.selectionRange);if(t<0&&!i)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new ew(this.view,t,e,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let n=this.view.state,i=eS(this.view,e);return this.view.state==n&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let n=nw(e,t.previousSibling||t.target.previousSibling,-1),i=nw(e,t.nextSibling||t.target.nextSibling,1);return{from:n?e.posAfter(n):e.posAtStart,to:i?e.posBefore(i):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(t0)!=t.state.facet(t0)&&(t.view.contentDOM.editContext=t.state.facet(t0)?this.editContext.editContext:null))}destroy(){var t,e,n;for(let i of(this.stop(),null==(t=this.intersection)||t.disconnect(),null==(e=this.gapIntersection)||e.disconnect(),null==(n=this.resizeScroll)||n.disconnect(),this.scrollTargets))i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function nw(t,e,n){for(;e;){let i=B.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function nS(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return x(a.node,a.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}class nM{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});for(let n in this.handlers.textupdate=e=>{let n=t.state.selection.main,{anchor:i,head:r}=n,o=this.toEditorPos(e.updateRangeStart),a=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:o,drifted:!1});let l={from:o,to:a,insert:s.EY.of(e.text.split("\n"))};if(l.from==this.from&&i<this.from?l.from=i:l.to==this.to&&i>this.to&&(l.to=i),l.from==l.to&&!l.insert.length){let i=s.OF.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd));i.main.eq(n)||t.dispatch({selection:i,userEvent:"select"});return}if((Q.mac||Q.android)&&l.from==r-1&&/^\. ?$/.test(e.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(l={from:o,to:a,insert:s.EY.of([e.text.replace("."," ")])}),this.pendingContextChange=l,!t.state.readOnly){let n=this.to-this.from+(l.to-l.from+l.insert.length);eM(t,l,s.OF.single(this.toEditorPos(e.selectionStart,n),this.toEditorPos(e.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state))},this.handlers.characterboundsupdate=n=>{let i=[],r=null;for(let e=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);e<o;e++){let n=t.coordsForChar(e);r=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||r||new DOMRect,i.push(r)}e.updateCharacterBounds(n.rangeStart,i)},this.handlers.textformatupdate=e=>{let n=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,i=t.underlineThickness;if("None"!=e&&"None"!=i){let r=this.toEditorPos(t.rangeStart),o=this.toEditorPos(t.rangeEnd);if(r<o){let t=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==i?1:2}px`;n.push(td.mark({attributes:{style:t}}).range(r,o))}}}t.dispatch({effects:tJ.of(td.set(n))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}},this.handlers)e.addEventListener(n,this.handlers[n]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=g(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,n=!1,i=this.pendingContextChange;return t.changes.iterChanges((r,o,a,s,l)=>{if(n)return;let h=l.length-(o-r);if(i&&o>=i.to)if(i.from==r&&i.to==o&&i.insert.eq(l)){i=this.pendingContextChange=null,e+=h,this.to+=h;return}else i=null,this.revertPending(t.state);if(r+=e,(o+=e)<=this.from)this.from+=h,this.to+=h;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+l.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),l.toString()),this.to+=h}e+=h}),i&&!n&&this.revertPending(t.state),!n}update(t){let e=this.pendingContextChange,n=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(n.from,n.to)&&t.transactions.some(t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),i=this.toContextPos(e.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(n,i)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let n=this.composing;return n&&n.drifted?n.editorBase+(t-n.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class nC{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:n}=t;for(let e of(this.dispatchTransactions=t.dispatchTransactions||n&&(t=>t.forEach(t=>n(t,this)))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new nr(t.state||s.$t.create(t)),t.scrollTo&&t.scrollTo.is(t$)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(t2).map(t=>new t3(t)),this.plugins))e.update(this);this.observer=new nb(this),this.inputState=new eC(this),this.inputState.ensureHandlers(this.plugins),this.docView=new es(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null==(e=document.fonts)?void 0:e.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...t){let e=1==t.length&&t[0]instanceof s.ZX?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let e=!1,n=!1,i,r=this.state;for(let e of t){if(e.startState!=r)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=e.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,l=null;t.some(t=>t.annotation(eX))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,(l=eZ(r,o))||(a=1));let h=this.observer.delayedAndroidKey,u=null;if(h?(this.observer.clearDelayedAndroidKey(),((u=this.observer.readChange())&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(s.$t.phrases)!=this.state.facet(s.$t.phrases))return this.setState(r);i=ea.create(this,r,t),i.flags|=a;let c=this.viewState.scrollTarget;try{for(let e of(this.updateState=2,t)){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new tK(t.empty?t:s.OF.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(t$)&&(c=t.value.clip(this.state))}this.viewState.update(i,c),this.bidiCache=nI.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),e=this.docView.update(i),this.state.facet(er)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(e,t.some(t=>t.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(nc)!=i.state.facet(nc)&&(this.viewState.mustMeasureContent=!0),(e||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),e&&this.docViewUpdate(),!i.empty)for(let t of this.state.facet(tH))try{t(i)}catch(t){tQ(this.state,t,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!eS(this,u)&&h.force&&D(this.contentDOM,h.key,h.keyCode)})}setState(t){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);for(let e of(this.viewState=new nr(t),this.plugins=t.facet(t2).map(t=>new t3(t)),this.pluginMap.clear(),this.plugins))e.update(this);this.docView.destroy(),this.docView=new es(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(t2),n=t.state.facet(t2);if(e!=n){let i=[];for(let r of n){let n=e.indexOf(r);if(n<0)i.push(new t3(r));else{let e=this.plugins[n];e.mustUpdate=t,i.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){tQ(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(o<0)if(O(n))r=-1,o=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(i);r=t.from,o=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map(t=>{try{return t.read(this)}catch(t){return tQ(this.state,t),nT}}),h=ea.create(this,this.state,[]),u=!1;h.flags|=a,e?e.flags|=a:e=h,this.updateState=2,!h.empty&&(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),(u=this.docView.update(h))&&this.docViewUpdate());for(let t=0;t<s.length;t++)if(l[t]!=nT)try{let e=s[t];e.write&&e.write(l[t],this)}catch(t){tQ(this.state,t)}if(u&&this.docView.updateSelection(!0),!h.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let t=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(t>1||t<-1){n.scrollTop=(i+=t)/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(tH))t(e)}get themeClasses(){return np+" "+(this.state.facet(nd)?ng:nf)+" "+this.state.facet(nc)}updateAttrs(){let t=nA(this,t4,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(t0)?"true":"false",class:"cm-content",style:`${Q.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),nA(this,t8,e);let n=this.observer.ignore(()=>{let n=th(this.contentDOM,this.contentAttrs,e),i=th(this.dom,this.editorAttrs,t);return n||i});return this.editorAttrs=t,this.contentAttrs=e,n}showAnnouncements(t){let e=!0;for(let n of t)for(let t of n.effects)t.is(nC.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(er);let t=this.state.facet(nC.cspNonce);l.G.mount(this.root,this.styleModules.concat(nv).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if((this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t)&&!(this.measureRequests.indexOf(t)>-1)){if(null!=t.key){for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key){this.measureRequests[e]=t;return}}this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.plugin!=t)&&this.pluginMap.set(t,e=this.plugins.find(e=>e.plugin==t)||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,n){return ex(this,t,ey(this,t,e,n))}moveByGroup(t,e){return ex(this,t,ey(this,t,e,e=>{var n;let i,r;return n=t.head,r=(i=this.state.charCategorizer(n))(e),t=>{let e=i(t);return r==s.Je.Space&&(r=e),r==e}}))}visualLineSide(t,e){let n=this.bidiSpans(t),i=this.textDirectionAt(t.from),r=n[e?n.length-1:0];return s.OF.cursor(r.side(e,i)+t.from,r.forward(!e,i)?1:-1)}moveToLineBoundary(t,e,n=!0){return function(t,e,n,i){let r=em(t,e.head,e.assoc||-1),o=i&&r.type==tc.Text&&(t.lineWrapping||r.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head):null;if(o){let e=t.dom.getBoundingClientRect(),i=t.textDirectionAt(r.from),a=t.posAtCoords({x:n==(i==tM.LTR)?e.right-1:e.left+1,y:(o.top+o.bottom)/2});if(null!=a)return s.OF.cursor(a,n?-1:1)}return s.OF.cursor(n?r.to:r.from,n?-1:1)}(this,t,e,n)}moveVertically(t,e,n){return ex(this,t,function(t,e,n,i){let r=e.head,o=n?1:-1;if(r==(n?t.state.doc.length:0))return s.OF.cursor(r,e.assoc);let a=e.goalColumn,l,h=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||-1),c=t.documentTop;if(u)null==a&&(a=u.left-h.left),l=o<0?u.top:u.bottom;else{let e=t.viewState.lineBlockAt(r);null==a&&(a=Math.min(h.right-h.left,t.defaultCharacterWidth*(r-e.from))),l=(o<0?e.top:e.bottom)+c}let d=h.left+a,p=null!=i?i:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let n=l+(p+e)*o,i=ef(t,{x:d,y:n},!1,o);if(n<h.top||n>h.bottom||(o<0?i<r:i>r)){let e=t.docView.coordsForChar(i),r=!e||n<e.top?-1:1;return s.OF.cursor(i,r,void 0,a)}}}(this,t,e,n))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),ef(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let n=this.docView.coordsAt(t,e);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(t),r=this.bidiSpans(i);return M(n,r[tR.find(r,t-i.from,-1,e)].dir==tM.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(tX)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>nk)return tE(t.length);let e=this.textDirectionAt(t.from),n;for(let i of this.bidiCache)if(i.from==t.from&&i.dir==e&&(i.fresh||function t(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],o=n[i];if(r.from!=o.from||r.to!=o.to||r.direction!=o.direction||!t(r.inner,o.inner))return!1}return!0}(i.isolates,n=ee(this,t))))return i.order;n||(n=ee(this,t));let i=function(t,e,n){if(!t)return[new tR(0,0,+(e==tk))];if(e==tC&&!n.length&&!tP.test(t))return tE(t.length);if(n.length)for(;t.length>tN.length;)tN[tN.length]=256;let i=[],r=+(e!=tC);return function t(e,n,i,r,o,a,s){let l=n%2?2:1;!function(t,e,n,i,r){for(let o=0;o<=i.length;o++){let a=o?i[o-1].to:e,s=o<i.length?i[o].from:n,l=o?256:r;for(let e=a,n=l,i=l;e<s;e++){let r=tO(t.charCodeAt(e));512==r?r=n:8==r&&4==i&&(r=16),tN[e]=4==r?2:r,7&r&&(i=r),n=r}for(let t=a,e=l,i=l;t<s;t++){let r=tN[t];if(128==r)t<s-1&&e==tN[t+1]&&24&e?r=tN[t]=e:tN[t]=256;else if(64==r){let r=t+1;for(;r<s&&64==tN[r];)r++;let o=t&&8==e||r<n&&8==tN[r]?1==i?1:8:256;for(let e=t;e<r;e++)tN[e]=o;t=r-1}else 8==r&&1==i&&(tN[t]=1);e=r,7&r&&(i=r)}}}(e,o,a,r,l),function(t,e,n,i,r){let o=1==r?2:1;for(let a=0,s=0,l=0;a<=i.length;a++){let h=a?i[a-1].to:e,u=a<i.length?i[a].from:n;for(let e=h,n,i,a;e<u;e++)if(i=tD[n=t.charCodeAt(e)])if(i<0){for(let t=s-3;t>=0;t-=3)if(tL[t+1]==-i){let n=tL[t+2],i=2&n?r:4&n?1&n?o:r:0;i&&(tN[e]=tN[tL[t]]=i),s=t;break}}else if(189==tL.length)break;else tL[s++]=e,tL[s++]=n,tL[s++]=l;else if(2==(a=tN[e])||1==a){let t=a==r;l=+!t;for(let e=s-3;e>=0;e-=3){let n=tL[e+2];if(2&n)break;if(t)tL[e+2]|=2;else{if(4&n)break;tL[e+2]|=4}}}}}(e,o,a,r,l),function(t,e,n,i){for(let r=0,o=i;r<=n.length;r++){let a=r?n[r-1].to:t,s=r<n.length?n[r].from:e;for(let l=a;l<s;){let a=tN[l];if(256==a){let a=l+1;for(;;)if(a==s){if(r==n.length)break;a=n[r++].to,s=r<n.length?n[r].from:e}else if(256==tN[a])a++;else break;let h=1==o,u=h==((a<e?tN[a]:i)==1)?h?1:2:i;for(let e=a,i=r,o=i?n[i-1].to:t;e>l;)e==o&&(e=n[--i].from,o=i?n[i-1].to:t),tN[--e]=u;l=a}else o=a,l++}}}(o,a,r,l),function e(n,i,r,o,a,s,l){let h=o%2?2:1;if(o%2==a%2)for(let u=i,c=0;u<r;){let i=!0,d=!1;if(c==s.length||u<s[c].from){let t=tN[u];t!=h&&(i=!1,d=16==t)}let p=i||1!=h?null:[],f=i?o:o+1,g=u;e:for(;;)if(c<s.length&&g==s[c].from){if(d)break;let e=s[c];if(!i)for(let t=e.to,n=c+1;;){if(t==r)break e;if(n<s.length&&s[n].from==t)t=s[n++].to;else if(tN[t]==h)break e;else break}c++,p?p.push(e):(e.from>u&&l.push(new tR(u,e.from,f)),t(n,e.direction==tC!=!(f%2)?o+1:o,a,e.inner,e.from,e.to,l),u=e.to),g=e.to}else if(g==r||(i?tN[g]!=h:tN[g]==h))break;else g++;p?e(n,u,g,o+1,a,p,l):u<g&&l.push(new tR(u,g,f)),u=g}else for(let u=r,c=s.length;u>i;){let r=!0,d=!1;if(!c||u>s[c-1].to){let t=tN[u-1];t!=h&&(r=!1,d=16==t)}let p=r||1!=h?null:[],f=r?o:o+1,g=u;e:for(;;)if(c&&g==s[c-1].to){if(d)break;let e=s[--c];if(!r)for(let t=e.from,n=c;;){if(t==i)break e;if(n&&s[n-1].to==t)t=s[--n].from;else if(tN[t-1]==h)break e;else break}p?p.push(e):(e.to<u&&l.push(new tR(e.to,u,f)),t(n,e.direction==tC!=!(f%2)?o+1:o,a,e.inner,e.from,e.to,l),u=e.from),g=e.from}else if(g==i||(r?tN[g-1]!=h:tN[g-1]==h))break;else g--;p?e(n,g,u,o+1,a,p,l):g<u&&l.push(new tR(g,u,f)),u=g}}(e,o,a,n,i,r,s)}(t,r,r,n,0,t.length,i),i}(t.text,e,n);return this.bidiCache.push(new nI(t.from,t.to,e,n,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||Q.safari&&(null==(t=this.inputState)?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{I(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let t of(this.root.activeElement==this.contentDOM&&this.contentDOM.blur(),this.plugins))t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return t$.of(new tK("number"==typeof t?s.OF.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,n=this.viewState.scrollAnchorAt(t);return t$.of(new tK(s.OF.cursor(n.from),"start","start",n.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return t5.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return t5.define(()=>({}),{eventObservers:t})}static theme(t,e){let n=l.G.newName(),i=[nc.of(n),er.of(ny(`.${n}`,t))];return e&&e.dark&&i.push(nd.of(!0)),i}static baseTheme(t){return s.Nb.lowest(er.of(ny("."+np,t,nm)))}static findFromDOM(t){var e;let n=t.querySelector(".cm-content"),i=n&&B.get(n)||B.get(t);return(null==(e=null==i?void 0:i.rootView)?void 0:e.view)||null}}nC.styleModule=er,nC.inputHandler=tG,nC.clipboardInputFilter=tj,nC.clipboardOutputFilter=tY,nC.scrollHandler=tq,nC.focusChangeEffect=tU,nC.perLineTextDirection=tX,nC.exceptionSink=tW,nC.updateListener=tH,nC.editable=t0,nC.mouseSelectionStyle=tF,nC.dragMovesSelection=tV,nC.clickAddsSelectionRange=tz,nC.decorations=t6,nC.outerDecorations=t9,nC.atomicRanges=t7,nC.bidiIsolatedRanges=et,nC.scrollMargins=en,nC.darkTheme=nd,nC.cspNonce=s.sj.define({combine:t=>t.length?t[0]:""}),nC.contentAttributes=t8,nC.editorAttributes=t4,nC.lineWrapping=nC.contentAttributes.of({class:"cm-lineWrapping"}),nC.announce=s.Pe.define();let nk=4096,nT={};class nI{constructor(t,e,n,i,r,o){this.from=t,this.to=e,this.dir=n,this.isolates=i,this.fresh=r,this.order=o}static update(t,e){if(e.empty&&!t.some(t=>t.fresh))return t;let n=[],i=t.length?t[t.length-1].dir:tM.LTR;for(let r=Math.max(0,t.length-10);r<t.length;r++){let o=t[r];o.dir!=i||e.touchesRange(o.from,o.to)||n.push(new nI(e.mapPos(o.from,1),e.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function nA(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let e=i[r],o="function"==typeof e?e(t):e;o&&ta(o,n)}return n}let nD=Q.mac?"mac":Q.windows?"win":Q.linux?"linux":"key";function nL(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}let nO=s.Nb.default(nC.domEventHandlers({keydown:(t,e)=>nV(nN(e.state),t,e,"editor")})),nP=s.sj.define({enables:nO}),nR=new WeakMap;function nN(t){let e=t.facet(nP),n=nR.get(e);return n||nR.set(e,n=function(t,e=nD){let n=Object.create(null),i=Object.create(null),r=(t,e)=>{let n=i[t];if(null==n)i[t]=e;else if(n!=e)throw Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},o=(t,i,o,a,s)=>{var l,h;let u=n[t]||(n[t]=Object.create(null)),c=i.split(/ (?!$)/).map(t=>(function(t,e){let n,i,r,o,a=t.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(let t=0;t<a.length-1;++t){let s=a[t];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))"mac"==e?o=!0:i=!0;else throw Error("Unrecognized modifier name: "+s)}return n&&(s="Alt-"+s),i&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s})(t,e));for(let e=1;e<c.length;e++){let n=c.slice(0,e).join(" ");r(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[e=>{let i=nB={view:e,prefix:n,scope:t};return setTimeout(()=>{nB==i&&(nB=null)},4e3),!0}]})}let d=c.join(" ");r(d,!1);let p=u[d]||(u[d]={preventDefault:!1,stopPropagation:!1,run:(null==(h=null==(l=u._any)?void 0:l.run)?void 0:h.slice())||[]});o&&p.run.push(o),a&&(p.preventDefault=!0),s&&(p.stopPropagation=!0)};for(let i of t){let t=i.scope?i.scope.split(" "):["editor"];if(i.any)for(let e of t){let t=n[e]||(n[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:r}=i;for(let e in t)t[e].run.push(t=>r(t,nz))}let r=i[e]||i.key;if(r)for(let e of t)o(e,r,i.run,i.preventDefault,i.stopPropagation),i.shift&&o(e,"Shift-"+r,i.shift,i.preventDefault,i.stopPropagation)}return n}(e.reduce((t,e)=>t.concat(e),[]))),n}function nE(t,e,n){return nV(nN(t.state),e,t,n)}let nB=null,nz=null;function nV(t,e,n,i){var r;nz=e;let o=("Esc"==(r=!(c&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||d&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?u:h)[e.keyCode]||e.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),a=(0,s.vS)(o,0),l=(0,s.Fh)(a)==o.length&&" "!=o,p="",f=!1,g=!1,m=!1;nB&&nB.view==n&&nB.scope==i&&(p=nB.prefix+" ",0>eA.indexOf(e.keyCode)&&(g=!0,nB=null));let y=new Set,v=t=>{if(t){for(let e of t.run)if(!y.has(e)&&(y.add(e),e(n)))return t.stopPropagation&&(m=!0),!0;t.preventDefault&&(t.stopPropagation&&(m=!0),g=!0)}return!1},x=t[i],_,b;return x&&(v(x[p+nL(o,e,!l)])?f=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Q.windows&&e.ctrlKey&&e.altKey)&&(_=h[e.keyCode])&&_!=o?v(x[p+nL(_,e,!0)])?f=!0:e.shiftKey&&(b=u[e.keyCode])!=o&&b!=_&&v(x[p+nL(b,e,!1)])&&(f=!0):l&&e.shiftKey&&v(x[p+nL(o,e,!0)])&&(f=!0),!f&&v(x._any)&&(f=!0)),g&&(f=!0),f&&m&&e.stopPropagation(),nz=null,f}class nF{constructor(t,e,n,i,r){this.className=t,this.left=e,this.top=n,this.width=i,this.height=r}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,n){if(!n.empty)return function(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),o=t.textDirection==tM.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=nW(t),h=a.querySelector(".cm-line"),u=h&&window.getComputedStyle(h),c=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=s.right-(u?parseInt(u.paddingRight):0),p=em(t,i,1),f=em(t,r,-1),g=p.type==tc.Text?p:null,m=f.type==tc.Text?f:null;if(g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=nH(t,i,1,g)),m&&(t.lineWrapping||f.widgetLineBreaks)&&(m=nH(t,r,-1,m)),g&&m&&g.from==m.from&&g.to==m.to)return v(x(n.from,n.to,g));{let e=g?x(n.from,null,g):_(p,!1),i=m?x(null,n.to,m):_(f,!0),r=[];return(g||p).to<(m||f).from-(g&&m?1:0)||p.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<i.top?r.push(y(c,e.bottom,d,i.top)):e.bottom<i.top&&t.elementAtHeight((e.bottom+i.top)/2).type==tc.Text&&(e.bottom=i.top=(e.bottom+i.top)/2),v(e).concat(r).concat(v(i))}function y(t,n,i,r){return new nF(e,t-l.left,n-l.top,i-t,r-n)}function v({top:t,bottom:e,horizontal:n}){let i=[];for(let r=0;r<n.length;r+=2)i.push(y(n[r],t,n[r+1],e));return i}function x(e,n,i){let r=1e9,a=-1e9,s=[];function l(e,n,l,h,u){let p=t.coordsAtPos(e,e==i.to?-2:2),f=t.coordsAtPos(l,l==i.from?2:-2);p&&f&&(r=Math.min(p.top,f.top,r),a=Math.max(p.bottom,f.bottom,a),u==tM.LTR?s.push(o&&n?c:p.left,o&&h?d:f.right):s.push(!o&&h?c:f.left,!o&&n?d:p.right))}let h=null!=e?e:i.from,u=null!=n?n:i.to;for(let i of t.visibleRanges)if(i.to>h&&i.from<u)for(let r=Math.max(i.from,h),o=Math.min(i.to,u);;){let i=t.state.doc.lineAt(r);for(let a of t.bidiSpans(i)){let t=a.from+i.from,s=a.to+i.from;if(t>=o)break;s>r&&l(Math.max(t,r),null==e&&t<=h,Math.min(s,o),null==n&&s>=u,a.dir)}if((r=i.to+1)>=o)break}return 0==s.length&&l(h,null==e,u,null==n,t.textDirection),{top:r,bottom:a,horizontal:s}}function _(t,e){let n=s.top+(e?t.top:t.bottom);return{top:n,bottom:n,horizontal:[]}}}(t,e,n);{let i=t.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let r=nW(t);return[new nF(e,i.left-r.left,i.top-r.top,null,i.bottom-i.top)]}}}function nW(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==tM.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function nH(t,e,n,i){let r=t.coordsAtPos(e,2*n);if(!r)return i;let o=t.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return null==s||null==l?i:{from:Math.max(i.from,Math.min(s,l)),to:Math.min(i.to,Math.max(s,l))}}class nG{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(nU)!=t.state.facet(nU)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,n=t.facet(nU);for(;e<n.length&&n[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;(t!=this.scaleX||e!=this.scaleY)&&(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some((t,e)=>{var n;return n=this.drawn[e],!(t.constructor==n.constructor&&t.eq(n))})){let e=this.dom.firstChild,n=0;for(let i of t)i.update&&e&&i.constructor&&this.drawn[n].constructor&&i.update(e,this.drawn[n])?(e=e.nextSibling,n++):this.dom.insertBefore(i.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}let nU=s.sj.define();function nj(t){return[t5.define(e=>new nG(e,t)),nU.of(t)]}let nY=s.sj.define({combine:t=>(0,s.QR)(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function nX(t={}){return[nY.of(t),nq,n$,nJ,tZ.of(!0)]}function nZ(t){return t.startState.facet(nY)!=t.state.facet(nY)}let nq=nj({above:!0,markers(t){let{state:e}=t,n=e.facet(nY),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty||n.drawRangeCursor){let e=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=r.empty?r:s.OF.cursor(r.head,r.head>r.anchor?-1:1);for(let r of nF.forRange(t,e,n))i.push(r)}}return i},update(t,e){t.transactions.some(t=>t.selection)&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let n=nZ(t);return n&&nK(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){nK(e.state,t)},class:"cm-cursorLayer"});function nK(t,e){e.style.animationDuration=t.facet(nY).cursorBlinkRate+"ms"}let n$=nj({above:!1,markers:t=>t.state.selection.ranges.map(e=>e.empty?[]:nF.forRange(t,"cm-selectionBackground",e)).reduce((t,e)=>t.concat(e)),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||nZ(t),class:"cm-selectionLayer"}),nJ=s.Nb.highest(nC.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),nQ=s.Pe.define({map:(t,e)=>null==t?null:e.mapPos(t)}),n0=s.sU.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce((t,e)=>e.is(nQ)?e.value:t,t))}),n1=t5.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(n0);null==n?null!=this.cursor&&(null==(e=this.cursor)||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(n0)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(n0),n=null!=e&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(n0)!=t&&this.view.dispatch({effects:nQ.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function n2(){return[n0,n1]}function n5(t,e,n,i,r){e.lastIndex=0;for(let o=t.iterRange(n,i),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)r(a+s.index,s)}class n3{constructor(t){const{regexp:e,decoration:n,decorate:i,boundary:r,maxLength:o=1e3}=t;if(!e.global)throw RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,i)this.addMatch=(t,e,n,r)=>i(r,n,n+t[0].length,t,e);else if("function"==typeof n)this.addMatch=(t,e,i,r)=>{let o=n(t,e,i);o&&r(i,i+t[0].length,o)};else if(n)this.addMatch=(t,e,i,r)=>r(i,i+t[0].length,n);else throw RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(t){let e=new s.vB,n=e.add.bind(e);for(let{from:e,to:i}of function(t,e){let n=t.visibleRanges;if(1==n.length&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}(t,this.maxLength))n5(t.state.doc,this.regexp,e,i,(e,i)=>this.addMatch(i,t,e,n));return e.finish()}updateDeco(t,e){let n=1e9,i=-1;return(t.docChanged&&t.changes.iterChanges((e,r,o,a)=>{a>=t.view.viewport.from&&o<=t.view.viewport.to&&(n=Math.min(o,n),i=Math.max(a,i))}),t.viewportMoved||i-n>1e3)?this.createDeco(t.view):i>-1?this.updateRange(t.view,e.map(t.changes),n,i):e}updateRange(t,e,n,i){for(let r of t.visibleRanges){let o=Math.max(r.from,n),a=Math.min(r.to,i);if(a>=o){let n=t.state.doc.lineAt(o),i=n.to<a?t.state.doc.lineAt(a):n,s=Math.max(r.from,n.from),l=Math.min(r.to,i.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){s=o;break}for(;a<i.to;a++)if(this.boundary.test(i.text[a-i.from])){l=a;break}}let h=[],u,c=(t,e,n)=>h.push(n.range(t,e));if(n==i)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.index<l-n.from;)this.addMatch(u,t,u.index+n.from,c);else n5(t.state.doc,this.regexp,s,l,(e,n)=>this.addMatch(n,t,e,c));e=e.update({filterFrom:s,filterTo:l,filter:(t,e)=>t<s||e>l,add:h})}}return e}}let n4=null!=/x/.unicode?"gu":"g",n8=RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]",n4),n6={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},n9=null,n7=s.sj.define({combine(t){let e=(0,s.QR)(t,{render:null,specialChars:n8,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==n9&&"u">typeof document&&document.body){let e=document.body.style;n9=(null!=(t=e.tabSize)?t:e.MozTabSize)!=null}return n9||!1}())&&(e.specialChars=RegExp(" |"+e.specialChars.source,n4)),e.addSpecialChars&&(e.specialChars=RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,n4)),e}});function it(t={}){return[n7.of(t),ie||(ie=t5.fromClass(class{constructor(t){this.view=t,this.decorations=td.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(n7)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new n3({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,o=(0,s.vS)(e[0],0);if(9==o){let t=r.lineAt(i),e=n.state.tabSize,o=(0,s.y$)(t.text,e,i-t.from);return td.replace({widget:new ir((e-o%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=td.replace({widget:new ii(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(n7);t.startState.facet(n7)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let ie=null;class ii extends tu{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){var e;let n=(e=this.code)>=32?"•":10==e?"␤":String.fromCharCode(9216+e),i=t.state.phrase("Control character")+" "+(n6[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class ir extends tu{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}function io(){return is}let ia=td.line({class:"cm-activeLine"}),is=t5.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(ia.range(r.from)),e=r.from)}return td.set(n)}},{decorations:t=>t.decorations});function il(t,e){var n;let i,r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),o=t.state.doc.lineAt(r),a=r-o.from,l=a>2e3?-1:a==o.length?(n=e.clientX,(i=t.coordsAtPos(t.viewport.from))?Math.round(Math.abs((i.left-n)/t.defaultCharacterWidth)):-1):(0,s.y$)(o.text,t.state.tabSize,r-o.from);return{line:o.number,col:l,off:a}}function ih(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return nC.mouseSelectionStyle.of((t,n)=>{let i,r;return e(n)?(i=il(t,n),r=t.state.selection,i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),n=t.state.doc.lineAt(e);i={line:n.number,col:i.col,off:Math.min(i.off,n.length)},r=r.map(t.changes)}},get(e,n,o){let a=il(t,e);if(!a)return r;let l=function(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),o=[];if(e.off>2e3||n.off>2e3||e.col<0||n.col<0){let a=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let e=i;e<=r;e++){let n=t.doc.line(e);n.length<=l&&o.push(s.OF.range(n.from+a,n.to+l))}}else{let a=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let e=i;e<=r;e++){let n=t.doc.line(e),i=(0,s.kn)(n.text,a,t.tabSize,!0);if(i<0)o.push(s.OF.cursor(n.to));else{let e=(0,s.kn)(n.text,l,t.tabSize);o.push(s.OF.range(n.from+i,n.from+e))}}}return o}(t.state,i,a);return l.length?o?s.OF.create(l.concat(r.ranges)):s.OF.create(l):r}}:null):null})}let iu={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},ic={style:"cursor: crosshair"};function id(t={}){let[e,n]=iu[t.key||"Alt"],i=t5.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||n(t))},keyup(t){t.keyCode!=e&&n(t)||this.set(!1)},mousemove(t){this.set(n(t))}}});return[i,nC.contentAttributes.of(t=>{var e;return(null==(e=t.plugin(i))?void 0:e.isDown)?ic:null})]}let ip="-10000px";class ig{constructor(t,e,n,i){this.facet=e,this.createTooltipView=n,this.removeTooltipView=i,this.input=t.state.facet(e),this.tooltips=this.input.filter(t=>t);let r=null;this.tooltipViews=this.tooltips.map(t=>r=n(t,r))}update(t,e){var n;let i=t.state.facet(this.facet),r=i.filter(t=>t);if(i===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let o=[],a=e?[]:null;for(let n=0;n<r.length;n++){let i=r[n],s=-1;if(i){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==i.create&&(s=t)}if(s<0)o[n]=this.createTooltipView(i,n?o[n-1]:null),a&&(a[n]=!!i.above);else{let i=o[n]=this.tooltipViews[s];a&&(a[n]=e[s]),i.update&&i.update(t)}}}for(let t of this.tooltipViews)0>o.indexOf(t)&&(this.removeTooltipView(t),null==(n=t.destroy)||n.call(t));return e&&(a.forEach((t,n)=>e[n]=t),e.length=a.length),this.input=i,this.tooltips=r,this.tooltipViews=o,!0}}function im(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}let iy=s.sj.define({combine:t=>{var e,n,i;return{position:Q.ios?"absolute":(null==(e=t.find(t=>t.position))?void 0:e.position)||"fixed",parent:(null==(n=t.find(t=>t.parent))?void 0:n.parent)||null,tooltipSpace:(null==(i=t.find(t=>t.tooltipSpace))?void 0:i.tooltipSpace)||im}}}),iv=new WeakMap,ix=t5.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(iy);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new ig(t,iS,(t,e)=>this.createTooltip(t,e),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let t of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(t.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(iy);if(i.position!=this.position&&!this.madeAbsolute){for(let t of(this.position=i.position,this.manager.tooltipViews))t.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){for(let t of(this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(t.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",n.dom.appendChild(t)}return n.dom.style.position=this.position,n.dom.style.top=ip,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;for(let e of(this.view.win.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))e.dom.remove(),null==(t=e.destroy)||t.call(e);this.parent&&this.container.remove(),null==(e=this.resizeObserver)||e.disconnect(),null==(n=this.intersectionObserver)||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(Q.gecko)n=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==ip&&"0px"==t.style.left){let e=t.getBoundingClientRect();n=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(t=n.width/this.parent.offsetWidth,e=n.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=ei(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((t,e)=>{let n=this.manager.tooltipViews[e];return n.getCoords?n.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(iy).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute)for(let t of(this.madeAbsolute=!0,this.position="absolute",this.manager.tooltipViews))t.dom.style.position="absolute";let{visible:n,space:i,scaleX:r,scaleY:o}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],h=this.manager.tooltipViews[s],{dom:u}=h,c=t.pos[s],d=t.size[s];if(!c||!1!==l.clip&&(c.bottom<=Math.max(n.top,i.top)||c.top>=Math.min(n.bottom,i.bottom)||c.right<Math.max(n.left,i.left)-.1||c.left>Math.min(n.right,i.right)+.1)){u.style.top=ip;continue}let p=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,f=7*!!p,g=d.right-d.left,m=null!=(e=iv.get(h))?e:d.bottom-d.top,y=h.offset||iw,v=this.view.textDirection==tM.LTR,x=d.width>i.right-i.left?v?i.left:i.right-d.width:v?Math.max(i.left,Math.min(c.left-14*!!p+y.x,i.right-g)):Math.min(Math.max(i.left,c.left-g+14*!!p-y.x),i.right-g),_=this.above[s];!l.strictSide&&(_?c.top-m-f-y.y<i.top:c.bottom+m+f+y.y>i.bottom)&&_==i.bottom-c.bottom>c.top-i.top&&(_=this.above[s]=!_);let b=(_?c.top-i.top:i.bottom-c.bottom)-f;if(b<m&&!1!==h.resize){if(b<this.view.defaultLineHeight){u.style.top=ip;continue}iv.set(h,m),u.style.height=(m=b)/o+"px"}else u.style.height&&(u.style.height="");let w=_?c.top-m-f-y.y:c.bottom+f+y.y,S=x+g;if(!0!==h.overlap)for(let t of a)t.left<S&&t.right>x&&t.top<w+m&&t.bottom>w&&(w=_?t.top-m-2-f:t.bottom+f+2);if("absolute"==this.position?(u.style.top=(w-t.parent.top)/o+"px",i_(u,(x-t.parent.left)/r)):(u.style.top=w/o+"px",i_(u,x/r)),p){let t=c.left+(v?y.x:-y.x)-(x+14-7);p.style.left=t/r+"px"}!0!==h.overlap&&a.push({left:x,top:w,right:S,bottom:w+m}),u.classList.toggle("cm-tooltip-above",_),u.classList.toggle("cm-tooltip-below",!_),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView)&&(this.inView=this.view.inView,!this.inView))for(let t of this.manager.tooltipViews)t.dom.style.top=ip}},{eventObservers:{scroll(){this.maybeMeasure()}}});function i_(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}let ib=nC.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),iw={x:0,y:0},iS=s.sj.define({enables:[ix,ib]}),iM=s.sj.define({combine:t=>t.reduce((t,e)=>t.concat(e),[])});class iC{static create(t){return new iC(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ig(t,iM,(t,e)=>this.createHostedView(t,e),t=>t.dom.remove())}createHostedView(t,e){let n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null==(t=e.destroy)||t.call(e)}passProp(t){let e;for(let n of this.manager.tooltipViews){let i=n[t];if(void 0!==i){if(void 0===e)e=i;else if(e!==i)return}}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}let ik=iS.compute([iM],t=>{let e=t.facet(iM);return 0===e.length?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var e;return null!=(e=t.end)?e:t.pos})),create:iC.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class iT{constructor(t,e,n,i,r){this.view=t,this.source=e,this.field=n,this.setHover=i,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,n=t.docView.nearest(e.target);if(!n)return;let i,r=1;if(n instanceof tn)i=n.posAtStart;else{if(null==(i=t.posAtCoords(e)))return;let n=t.coordsAtPos(i);if(!n||e.y<n.top||e.y>n.bottom||e.x<n.left-t.defaultCharacterWidth||e.x>n.right+t.defaultCharacterWidth)return;let o=t.bidiSpans(t.state.doc.lineAt(i)).find(t=>t.from<=i&&t.to>=i),a=o&&o.dir==tM.RTL?-1:1;r=e.x<n.left?-a:a}let o=this.source(t,i,r);if(null==o?void 0:o.then){let e=this.pending={pos:i};o.then(n=>{this.pending==e&&(this.pending=null,n&&!(Array.isArray(n)&&!n.length)&&t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))},e=>tQ(t.state,e,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let t=this.view.plugin(ix),e=t?t.manager.tooltips.findIndex(t=>t.create==iC.create):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:r}=this;if(i.length&&r&&!function(t,e){let{left:n,right:i,top:r,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let t=a.getBoundingClientRect();r=Math.min(t.top,r),o=Math.max(t.bottom,o)}return e.clientX>=n-4&&e.clientX<=i+4&&e.clientY>=r-4&&e.clientY<=o+4}(r.dom,t)||this.pending){let{pos:r}=i[0]||this.pending,o=null!=(n=null==(e=i[0])?void 0:e.end)?n:r;(r==o?this.view.posAtCoords(this.lastMove)!=r:!function(t,e,n,i,r){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.right<i||o.top>r||Math.min(o.bottom,a)<r)return!1;let s=t.posAtCoords({x:i,y:r},!1);return s>=e&&s<=n}(this.view,r,o,t.clientX,t.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=n=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function iI(t,e={}){let n=s.Pe.define(),i=s.sU.define({create:()=>[],update(t,i){if(t.length&&(e.hideOnChange&&(i.docChanged||i.selection)?t=[]:e.hideOn&&(t=t.filter(t=>!e.hideOn(i,t))),i.docChanged)){let e=[];for(let n of t){let t=i.changes.mapPos(n.pos,-1,s.iR.TrackDel);if(null!=t){let r=Object.assign(Object.create(null),n);r.pos=t,null!=r.end&&(r.end=i.changes.mapPos(r.end)),e.push(r)}}t=e}for(let e of i.effects)e.is(n)&&(t=e.value),e.is(iD)&&(t=[]);return t},provide:t=>iM.from(t)});return{active:i,extension:[i,t5.define(r=>new iT(r,t,i,n,e.hoverTime||300)),ik]}}function iA(t,e){let n=t.plugin(ix);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}let iD=s.Pe.define(),iL=s.sj.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function iO(t,e){let n=t.plugin(iP),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}let iP=t5.fromClass(class{constructor(t){this.input=t.state.facet(iE),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(e=>e(t));let e=t.state.facet(iL);for(let n of(this.top=new iR(t,!0,e.topContainer),this.bottom=new iR(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top)),this.panels))n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(iL);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new iR(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new iR(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(iE);if(n!=this.input){let e=n.filter(t=>t),i=[],r=[],o=[],a=[];for(let n of e){let e=this.specs.indexOf(n),s;e<0?(s=n(t.view),a.push(s)):(s=this.panels[e]).update&&s.update(t),i.push(s),(s.top?r:o).push(s)}for(let t of(this.specs=e,this.panels=i,this.top.sync(r),this.bottom.sync(o),a))t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>nC.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class iR{constructor(t,e,n){this.view=t,this.top=e,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&0>t.indexOf(e)&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=iN(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=iN(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function iN(t){let e=t.nextSibling;return t.remove(),e}let iE=s.sj.define({enables:iP});class iB extends s.FB{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}iB.prototype.elementClass="",iB.prototype.toDOM=void 0,iB.prototype.mapMode=s.iR.TrackBefore,iB.prototype.startSide=iB.prototype.endSide=-1,iB.prototype.point=!0;let iz=s.sj.define(),iV=s.sj.define(),iF={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>s.om.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},iW=s.sj.define();function iH(t){return[iU(),iW.of({...iF,...t})]}let iG=s.sj.define({combine:t=>t.some(t=>t)});function iU(t){let e=[ij];return t&&!1===t.fixed&&e.push(iG.of(!0)),e}let ij=t5.fromClass(class{constructor(t){for(let e of(this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(iW).map(e=>new iq(t,e)),this.fixed=!t.state.facet(iG),this.gutters))"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(iG)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=s.om.iter(this.view.state.facet(iz),this.view.viewport.from),i=[],r=this.gutters.map(t=>new iZ(t,this.view.viewport,-this.view.documentPadding.top));for(let t of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(t.type)){let e=!0;for(let o of t.type)if(o.type==tc.Text&&e){for(let t of(iX(n,i,o.from),r))t.line(this.view,o,i);e=!1}else if(o.widget)for(let t of r)t.widget(this.view,o)}else if(t.type==tc.Text)for(let e of(iX(n,i,t.from),r))e.line(this.view,t,i);else if(t.widget)for(let e of r)e.widget(this.view,t);for(let t of r)t.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(iW),n=t.state.facet(iW),i=t.docChanged||t.heightChanged||t.viewportChanged||!s.om.eq(t.startState.facet(iz),t.state.facet(iz),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let e of this.gutters)e.update(t)&&(i=!0);else{i=!0;let r=[];for(let i of n){let n=e.indexOf(i);n<0?r.push(new iq(this.view,i)):(this.gutters[n].update(t),r.push(this.gutters[n]))}for(let t of this.gutters)t.dom.remove(),0>r.indexOf(t)&&t.destroy();for(let t of r)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>nC.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||0==n.gutters.length||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==tM.LTR?{left:i,right:r}:{right:i,left:r}})});function iY(t){return Array.isArray(t)?t:[t]}function iX(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class iZ{constructor(t,e,n){this.gutter=t,this.height=n,this.i=0,this.cursor=s.om.iter(t.markers,e.from)}addElement(t,e,n){let{gutter:i}=this,r=(e.top-this.height)/t.scaleY,o=e.height/t.scaleY;if(this.i==i.elements.length){let e=new iK(t,o,r,n);i.elements.push(e),i.dom.appendChild(e.dom)}else i.elements[this.i].update(t,o,r,n);this.height=e.bottom,this.i++}line(t,e,n){let i=[];iX(this.cursor,i,e.from),n.length&&(i=i.concat(n));let r=this.gutter.config.lineMarker(t,e,i);r&&i.unshift(r);let o=this.gutter;(0!=i.length||o.config.renderEmptyElements)&&this.addElement(t,e,i)}widget(t,e){let n=this.gutter.config.widgetMarker(t,e.widget,e),i=n?[n]:null;for(let n of t.state.facet(iV)){let r=n(t,e.widget,e);r&&(i||(i=[])).push(r)}i&&this.addElement(t,e,i)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class iq{constructor(t,e){for(let n in this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),e.domEventHandlers)this.dom.addEventListener(n,i=>{let r=i.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let t=r.getBoundingClientRect();o=(t.top+t.bottom)/2}else o=i.clientY;let a=t.lineBlockAtHeight(o-t.documentTop);e.domEventHandlers[n](t,a,i)&&i.preventDefault()});this.markers=iY(e.markers(t)),e.initialSpacer&&(this.spacer=new iK(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=iY(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let n=t.view.viewport;return!s.om.eq(this.markers,e,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class iK{constructor(t,e,n,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,n,i)}update(t,e,n,i){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),!function(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}(this.markers,i)&&this.setMarkers(t,i)}setMarkers(t,e){let n="cm-gutterElement",i=this.dom.firstChild;for(let r=0,o=0;;){let a=o,s=r<e.length?e[r++]:null,l=!1;if(s){let t=s.elementClass;t&&(n+=" "+t);for(let t=o;t<this.markers.length;t++)if(this.markers[t].compare(s)){a=t,l=!0;break}}else a=this.markers.length;for(;o<a;){let t=this.markers[o++];if(t.toDOM){t.destroy(i);let e=i.nextSibling;i.remove(),i=e}}if(!s)break;s.toDOM&&(l?i=i.nextSibling:this.dom.insertBefore(s.toDOM(t),i)),l&&o++}this.dom.className=n,this.markers=e}destroy(){this.setMarkers(null,[])}}let i$=s.sj.define(),iJ=s.sj.define(),iQ=s.sj.define({combine:t=>(0,s.QR)(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let n=Object.assign({},t);for(let t in e){let i=n[t],r=e[t];n[t]=i?(t,e,n)=>i(t,e,n)||r(t,e,n):r}return n}})});class i0 extends iB{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function i1(t,e){return t.state.facet(iQ).formatNumber(e,t.state)}let i2=iW.compute([iQ],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(i$),lineMarker:(t,e,n)=>n.some(t=>t.toDOM)?null:new i0(i1(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,n)=>{for(let i of t.state.facet(iJ)){let r=i(t,e,n);if(r)return r}return null},lineMarkerChange:t=>t.startState.facet(iQ)!=t.state.facet(iQ),initialSpacer:t=>new i0(i1(t,i3(t.state.doc.lines))),updateSpacer(t,e){let n=i1(e.view,i3(e.view.state.doc.lines));return n==t.number?t:new i0(n)},domEventHandlers:t.facet(iQ).domEventHandlers,side:"before"}));function i5(t={}){return[iQ.of(t),iU(),i2]}function i3(t){let e=9;for(;e<t;)e=10*e+9;return e}let i4=new class extends iB{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},i8=iz.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(i4.range(r)))}return s.om.of(e)});function i6(){return i8}},1080:function(t,e,n){"use strict";var i,r;n.d(e,{PH:function(){return f},Qj:function(){return i},RY:function(){return O},Z6:function(){return u},fI:function(){return c},iX:function(){return R},rr:function(){return P},uY:function(){return s}});let o=0;class a{constructor(t,e){this.from=t,this.to=e}}class s{constructor(t={}){this.id=o++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=u.match(t)),e=>{let n=t(e);return void 0===n?null:[this,n]}}}s.closedBy=new s({deserialize:t=>t.split(" ")}),s.openedBy=new s({deserialize:t=>t.split(" ")}),s.group=new s({deserialize:t=>t.split(" ")}),s.isolate=new s({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw RangeError("Invalid value for isolate: "+t);return t||"auto"}}),s.contextHash=new s({perNode:!0}),s.lookAhead=new s({perNode:!0}),s.mounted=new s({perNode:!0});class l{constructor(t,e,n){this.tree=t,this.overlay=e,this.parser=n}static get(t){return t&&t.props&&t.props[s.mounted.id]}}let h=Object.create(null);class u{constructor(t,e,n,i=0){this.name=t,this.props=e,this.id=n,this.flags=i}static define(t){let e=t.props&&t.props.length?Object.create(null):h,n=!!t.top|2*!!t.skipped|4*!!t.error|8*(null==t.name),i=new u(t.name||"",e,t.id,n);if(t.props){for(let n of t.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");e[n[0].id]=n[1]}}return i}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(s.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let n in t)for(let i of n.split(" "))e[i]=t[n];return t=>{for(let n=t.prop(s.group),i=-1;i<(n?n.length:0);i++){let r=e[i<0?t.name:n[i]];if(r)return r}}}}u.none=new u("",Object.create(null),0,8);class c{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let n of this.types){let i=null;for(let e of t){let t=e(n);t&&(i||(i=Object.assign({},n.props)),i[t[0].id]=t[1])}e.push(i?new u(n.name,i,n.id,n.flags):n)}return new c(e)}}let d=new WeakMap,p=new WeakMap;(r=i||(i={}))[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays";class f{constructor(t,e,n,i,r){if(this.type=t,this.children=e,this.positions=n,this.length=i,this.props=null,r&&r.length)for(let[t,e]of(this.props=Object.create(null),r))this.props["number"==typeof t?t:t.id]=e}toString(){let t=l.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let n=t.toString();n&&(e&&(e+=","),e+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new T(this.topNode,t)}cursorAt(t,e=0,n=0){let i=new T(d.get(this)||this.topNode);return i.moveTo(t,e),d.set(this,i._tree),i}get topNode(){return new _(this,0,0,null)}resolve(t,e=0){let n=v(d.get(this)||this.topNode,t,e,!1);return d.set(this,n),n}resolveInner(t,e=0){let n=v(p.get(this)||this.topNode,t,e,!0);return p.set(this,n),n}resolveStack(t,e=0){return function(t,e,n){let i=t.resolveInner(e,n),r=null;for(let t=i instanceof _?i:i.context.parent;t;t=t.parent)if(t.index<0){let o=t.parent;(r||(r=[i])).push(o.resolve(e,n)),t=o}else{let o=l.get(t.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new _(o.tree,o.overlay[0].from+t.from,-1,t);(r||(r=[i])).push(v(a,e,n,!1))}}return r?C(r):i}(this,t,e)}iterate(t){let{enter:e,leave:n,from:r=0,to:o=this.length}=t,a=t.mode||0,s=(a&i.IncludeAnonymous)>0;for(let t=this.cursor(a|i.IncludeAnonymous);;){let i=!1;if(t.from<=o&&t.to>=r&&(!s&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;i=!0}for(;i&&n&&(s||!t.type.isAnonymous)&&n(t),!t.nextSibling();){if(!t.parent())return;i=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:L(u.none,this.children,this.positions,0,this.children.length,0,this.length,(t,e,n)=>new f(this.type,t,e,n,this.propValues),t.makeTree||((t,e,n)=>new f(u.none,t,e,n)))}static build(t){return function(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=1024,reused:o=[],minRepeatType:a=i.types.length}=t,l=Array.isArray(n)?new g(n,n.length):n,h=i.types,u=0,c=0;function d(t,e,n,r,o,a,s,l,h){let u=[],c=[];for(;t.length>r;)u.push(t.pop()),c.push(e.pop()+n-o);t.push(p(i.types[s],u,c,a-o,l-a,h)),e.push(o-n)}function p(t,e,n,i,r,o,a){if(o){let t=[s.contextHash,o];a=a?[t].concat(a):[t]}if(r>25){let t=[s.lookAhead,r];a=a?[t].concat(a):[t]}return new f(t,e,n,i,a)}let y=[],v=[];for(;l.pos>0;)!function t(e,n,g,y,v,x){let{id:_,start:b,end:w,size:S}=l,M=c,C=u;for(;S<0;){if(l.next(),-1==S){let t=o[_];g.push(t),y.push(b-e);return}if(-3==S){u=_;return}if(-4==S){c=_;return}else throw RangeError(`Unrecognized record size: ${S}`)}let k=h[_],T,I,A=b-e;if(w-b<=r&&(I=function(t,e){let n=l.fork(),i=0,o=0,s=0,h=n.end-r,u={size:0,start:0,skip:0};n:for(let r=n.pos-t;n.pos>r;){let t=n.size;if(n.id==e&&t>=0){u.size=i,u.start=o,u.skip=s,s+=4,i+=4,n.next();continue}let l=n.pos-t;if(t<0||l<r||n.start<h)break;let c=4*(n.id>=a),d=n.start;for(n.next();n.pos>l;){if(n.size<0)if(-3==n.size)c+=4;else break n;else n.id>=a&&(c+=4);n.next()}o=d,i+=t,s+=c}return(e<0||i==t)&&(u.size=i,u.start=o,u.skip=s),u.size>4?u:void 0}(l.pos-n,v))){let t=new Uint16Array(I.size-I.skip),n=l.pos-I.size,r=t.length;for(;l.pos>n;)r=function t(e,n,i){let{id:r,start:o,end:s,size:h}=l;if(l.next(),h>=0&&r<a){let a=i;if(h>4){let r=l.pos-(h-4);for(;l.pos>r;)i=t(e,n,i)}n[--i]=a,n[--i]=s-e,n[--i]=o-e,n[--i]=r}else -3==h?u=r:-4==h&&(c=r);return i}(I.start,t,r);T=new m(t,w-I.start,i),A=I.start-e}else{let e=l.pos-S;l.next();let n=[],o=[],h=_>=a?_:-1,u=0,c=w;for(;l.pos>e;)h>=0&&l.id==h&&l.size>=0?(l.end<=c-r&&(d(n,o,b,u,l.end,c,h,M,C),u=n.length,c=l.end),l.next()):x>2500?function(t,e,n,o){let a=[],s=0,h=-1;for(;l.pos>e;){let{id:t,start:e,end:n,size:i}=l;if(i>4)l.next();else if(h>-1&&e<h)break;else h<0&&(h=n-r),a.push(t,e,n),s++,l.next()}if(s){let e=new Uint16Array(4*s),r=a[a.length-2];for(let t=a.length-3,n=0;t>=0;t-=3)e[n++]=a[t],e[n++]=a[t+1]-r,e[n++]=a[t+2]-r,e[n++]=n;n.push(new m(e,a[2]-r,i)),o.push(r-t)}}(b,e,n,o):t(b,e,n,o,h,x+1);if(h>=0&&u>0&&u<n.length&&d(n,o,b,u,b,c,h,M,C),n.reverse(),o.reverse(),h>-1&&u>0){let t=function(t,e){return(n,i,r)=>{let o=0,a=n.length-1,l,h;if(a>=0&&(l=n[a])instanceof f){if(!a&&l.type==t&&l.length==r)return l;(h=l.prop(s.lookAhead))&&(o=i[a]+l.length+h)}return p(t,n,i,r,o,e)}}(k,C);T=L(k,n,o,0,n.length,0,w-b,t,t)}else T=p(k,n,o,w-b,M-w,C)}g.push(T),y.push(A)}(t.start||0,t.bufferStart||0,y,v,-1,0);let x=null!=(e=t.length)?e:y.length?v[0]+y[0].length:0;return new f(h[t.topID],y.reverse(),v.reverse(),x)}(t)}}f.empty=new f(u.none,[],[],0);class g{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new g(this.buffer,this.index)}}class m{constructor(t,e,n){this.buffer=t,this.length=e,this.set=n}get type(){return u.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],n=this.buffer[t+3],i=this.set.types[e],r=i.name;if(/\W/.test(r)&&!i.isError&&(r=JSON.stringify(r)),n==(t+=4))return r;let o=[];for(;t<n;)o.push(this.childString(t)),t=this.buffer[t+3];return r+"("+o.join(",")+")"}findChild(t,e,n,i,r){let{buffer:o}=this,a=-1;for(let s=t;s!=e&&(!y(r,i,o[s+1],o[s+2])||(a=s,!(n>0)));s=o[s+3]);return a}slice(t,e,n){let i=this.buffer,r=new Uint16Array(e-t),o=0;for(let a=t,s=0;a<e;){r[s++]=i[a++],r[s++]=i[a++]-n;let e=r[s++]=i[a++]-n;r[s++]=i[a++]-t,o=Math.max(o,e)}return new m(r,o,this.set)}}function y(t,e,n,i){switch(t){case -2:return n<e;case -1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function v(t,e,n,r){for(var o;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof _&&t.index<0?null:t.parent;if(!e)return t;t=e}let a=r?0:i.IgnoreOverlays;if(r)for(let i=t,r=i.parent;r;r=(i=r).parent)i instanceof _&&i.index<0&&(null==(o=r.enter(e,n,a))?void 0:o.from)!=i.from&&(t=r);for(;;){let i=t.enter(e,n,a);if(!i)return t;t=i}}class x{cursor(t=0){return new T(this,t)}getChild(t,e=null,n=null){let i=b(this,t,e,n);return i.length?i[0]:null}getChildren(t,e=null,n=null){return b(this,t,e,n)}resolve(t,e=0){return v(this,t,e,!1)}resolveInner(t,e=0){return v(this,t,e,!0)}matchContext(t){return w(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),n=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(n=e,e=t.prevSibling):e=t}return n}get node(){return this}get next(){return this.parent}}class _ extends x{constructor(t,e,n,i){super(),this._tree=t,this.from=e,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,n,r,o=0){for(let a=this;;){for(let{children:s,positions:h}=a._tree,u=e>0?s.length:-1;t!=u;t+=e){let u=s[t],c=h[t]+a.from;if(y(r,n,c,c+u.length)){if(u instanceof m){if(o&i.ExcludeBuffers)continue;let s=u.findChild(0,u.buffer.length,e,n-c,r);if(s>-1)return new M(new S(a,u,t,c),null,s)}else if(o&i.IncludeAnonymous||!u.type.isAnonymous||I(u)){let s;if(!(o&i.IgnoreMounts)&&(s=l.get(u))&&!s.overlay)return new _(s.tree,c,t,a);let h=new _(u,c,t,a);return o&i.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(e<0?u.children.length-1:0,e,n,r)}}}if(o&i.IncludeAnonymous||!a.type.isAnonymous||(t=a.index>=0?a.index+e:e<0?-1:a._parent._tree.children.length,!(a=a._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,n=0){let r;if(!(n&i.IgnoreOverlays)&&(r=l.get(this._tree))&&r.overlay){let n=t-this.from;for(let{from:t,to:i}of r.overlay)if((e>0?t<=n:t<n)&&(e<0?i>=n:i>n))return new _(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function b(t,e,n,i){let r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=n){for(let t=!1;!t;)if(t=r.type.is(n),!r.nextSibling())return o}for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function w(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class S{constructor(t,e,n,i){this.parent=t,this.buffer=e,this.index=n,this.start=i}}class M extends x{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,n){super(),this.context=t,this._parent=e,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,e,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.context.start,n);return r<0?null:new M(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,n=0){if(n&i.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return o<0?null:new M(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new M(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new M(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let o=n.buffer[this.index+1];t.push(n.slice(i,r,o)),e.push(0)}return new f(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function C(t){if(!t.length)return null;let e=0,n=t[0];for(let i=1;i<t.length;i++){let r=t[i];(r.from>n.from||r.to<n.to)&&(n=r,e=i)}let i=n instanceof _&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new k(r,n)}class k{constructor(t,e){this.heads=t,this.node=e}get next(){return C(this.heads)}}class T{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof _)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:n,buffer:i}=this.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=n+i.buffer[t+1],this.to=n+i.buffer[t+2],!0}yield(t){return!!t&&(t instanceof _?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],t,e-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,n=this.mode){return this.buffer?!(n&i.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&i.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&i.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,n=this.stack.length-1;if(t<0){let t=n<0?0:this.stack[n]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(n<0?e.buffer.length:e.buffer[this.stack[n]+3]))return this.yieldBuf(t)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,n,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:n}=r)}else({index:e,_parent:n}=this._tree);for(;n;{index:e,_parent:n}=n)if(e>-1)for(let r=e+t,o=t<0?-1:n._tree.children.length;r!=o;r+=t){let t=n._tree.children[r];if(this.mode&i.IncludeAnonymous||t instanceof m||!t.type.isAnonymous||I(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,n=0;if(t&&t.context==this.buffer)n:for(let i=this.index,r=this.stack.length;r>=0;){for(let o=t;o;o=o._parent)if(o.index==i){if(i==this.index)return o;e=o,n=r+1;break n}i=this.stack[--r]}for(let t=n;t<this.stack.length;t++)e=new M(this.buffer,e,this.stack[t]);return this.bufferNode=new M(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&e&&e(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(t){if(!this.buffer)return w(this.node.parent,t);let{buffer:e}=this.buffer,{types:n}=e.set;for(let i=t.length-1,r=this.stack.length-1;i>=0;r--){if(r<0)return w(this._tree,t,i);let o=n[e.buffer[this.stack[r]]];if(!o.isAnonymous){if(t[i]&&t[i]!=o.name)return!1;i--}}return!0}}function I(t){return t.children.some(t=>t instanceof m||!t.type.isAnonymous||I(t))}let A=new WeakMap;function D(t,e){if(!t.isAnonymous||e instanceof m||e.type!=t)return 1;let n=A.get(e);if(null==n){for(let i of(n=1,e.children)){if(i.type!=t||!(i instanceof f)){n=1;break}n+=D(t,i)}A.set(e,n)}return n}function L(t,e,n,i,r,o,a,s,l){let h=0;for(let n=i;n<r;n++)h+=D(t,e[n]);let u=Math.ceil(1.5*h/8),c=[],d=[];return!function e(n,i,r,a,s){for(let h=r;h<a;){let r=h,p=i[h],f=D(t,n[h]);for(h++;h<a;h++){let e=D(t,n[h]);if(f+e>=u)break;f+=e}if(h==r+1){if(f>u){let t=n[r];e(t.children,t.positions,0,t.children.length,i[r]+s);continue}c.push(n[r])}else{let e=i[h-1]+n[h-1].length-p;c.push(L(t,n,i,r,h,p,e,null,l))}d.push(p+s-o)}}(e,n,i,r,0),(s||l)(c,d,a)}class O{constructor(){this.map=new WeakMap}setBuffer(t,e,n){let i=this.map.get(t);i||this.map.set(t,i=new Map),i.set(e,n)}getBuffer(t,e){let n=this.map.get(t);return n&&n.get(e)}set(t,e){t instanceof M?this.setBuffer(t.context.buffer,t.index,e):t instanceof _&&this.map.set(t.tree,e)}get(t){return t instanceof M?this.getBuffer(t.context.buffer,t.index):t instanceof _?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class P{constructor(t,e,n,i,r=!1,o=!1){this.from=t,this.to=e,this.tree=n,this.offset=i,this.open=!!r|2*!!o}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],n=!1){let i=[new P(0,t.length,t,0,!1,n)];for(let n of e)n.to>t.length&&i.push(n);return i}static applyChanges(t,e,n=128){if(!e.length)return t;let i=[],r=1,o=t.length?t[0]:null;for(let a=0,s=0,l=0;;a++){let h=a<e.length?e[a]:null,u=h?h.fromA:1e9;if(u-s>=n)for(;o&&o.from<u;){let e=o;if(s>=e.from||u<=e.to||l){let t=Math.max(e.from,s)-l,n=Math.min(e.to,u)-l;e=t>=n?null:new P(t,n,e.tree,e.offset+l,a>0,!!h)}if(e&&i.push(e),o.to>u)break;o=r<t.length?t[r++]:null}if(!h)break;s=h.toA,l=h.toA-h.toB}return i}}class R{startParse(t,e,n){return"string"==typeof t&&(t=new N(t)),n=n?n.length?n.map(t=>new a(t.from,t.to)):[new a(0,0)]:[new a(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,n){let i=this.startParse(t,e,n);for(;;){let t=i.advance();if(t)return t}}}class N{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}new s({perNode:!0})},2619:function(t,e,n){"use strict";n.d(e,{DM:function(){return d},_A:function(){return A},az:function(){return c},pn:function(){return l}});var i=n(1080);let r=0;class o{constructor(t,e,n,i){this.name=t,this.set=e,this.base=n,this.modified=i,this.id=r++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){if(t instanceof o&&(e=t),null==e?void 0:e.base)throw Error("Can not derive from a modified tag");let n=new o("string"==typeof t?t:"?",[],null,[]);if(n.set.push(n),e)for(let t of e.set)n.set.push(t);return n}static defineModifier(t){let e=new s(t);return t=>t.modified.indexOf(e)>-1?t:s.get(t.base||t,t.modified.concat(e).sort((t,e)=>t.id-e.id))}}let a=0;class s{constructor(t){this.name=t,this.instances=[],this.id=a++}static get(t,e){if(!e.length)return t;let n=e[0].instances.find(n=>{var i,r;return n.base==t&&(i=e,r=n.modified,i.length==r.length&&i.every((t,e)=>t==r[e]))});if(n)return n;let i=[],r=new o(t.name,i,t,e);for(let t of e)t.instances.push(r);let a=function(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((t,e)=>e.length-t.length)}(e);for(let e of t.set)if(!e.modified.length)for(let t of a)i.push(s.get(e,t));return r}}function l(t){let e=Object.create(null);for(let n in t){let i=t[n];for(let t of(Array.isArray(i)||(i=[i]),n.split(" ")))if(t){let n=[],r=2,o=t;for(let e=0;;){if("..."==o&&e>0&&e+3==t.length){r=1;break}let i=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!i)throw RangeError("Invalid path: "+t);if(n.push("*"==i[0]?"":'"'==i[0][0]?JSON.parse(i[0]):i[0]),(e+=i[0].length)==t.length)break;let a=t[e++];if(e==t.length&&"!"==a){r=0;break}if("/"!=a)throw RangeError("Invalid path: "+t);o=t.slice(e)}let a=n.length-1,s=n[a];if(!s)throw RangeError("Invalid path: "+t);let l=new u(i,r,a>0?n.slice(0,a):null);e[s]=l.sort(e[s])}}return h.add(e)}let h=new i.uY;class u{constructor(t,e,n,i){this.tags=t,this.mode=e,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function c(t,e){let n=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)n[t.id]=e.class;else n[e.tag.id]=e.class;let{scope:i,all:r=null}=e||{};return{style:t=>{let e=r;for(let i of t)for(let t of i.set){let i=n[t.id];if(i){e=e?e+" "+i:i;break}}return e},scope:i}}function d(t,e,n,i=0,r=t.length){let o=new p(i,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}u.empty=new u([],2,null);class p{constructor(t,e,n){this.at=t,this.highlighters=e,this.span=n,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,n,r,o){let{type:a,from:s,to:l}=t;if(s>=n||l<=e)return;a.isTop&&(o=this.highlighters.filter(t=>!t.scope||t.scope(a)));let c=r,d=function(t){let e=t.type.prop(h);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||u.empty,p=function(t,e){let n=null;for(let i of t){let t=i.style(e);t&&(n=n?n+" "+t:t)}return n}(o,d.tags);if(p&&(c&&(c+=" "),c+=p,1==d.mode&&(r+=(r?" ":"")+p)),this.startSpan(Math.max(e,s),c),d.opaque)return;let f=t.tree&&t.tree.prop(i.uY.mounted);if(f&&f.overlay){let i=t.node.enter(f.overlay[0].from+s,1),a=this.highlighters.filter(t=>!t.scope||t.scope(f.tree.type)),h=t.firstChild();for(let u=0,d=s;;u++){let p=u<f.overlay.length?f.overlay[u]:null,g=p?p.from+s:l,m=Math.max(e,d),y=Math.min(n,g);if(m<y&&h)for(;t.from<y&&(this.highlightRange(t,m,y,r,o),this.startSpan(Math.min(y,t.to),c),!(t.to>=g)&&t.nextSibling()););if(!p||g>n)break;(d=p.to+s)>e&&(this.highlightRange(i.cursor(),Math.max(e,p.from+s),Math.min(n,d),"",a),this.startSpan(Math.min(n,d),c))}h&&t.parent()}else if(t.firstChild()){f&&(r="");do{if(t.to<=e)continue;if(t.from>=n)break;this.highlightRange(t,e,n,r,o),this.startSpan(Math.min(n,t.to),c)}while(t.nextSibling());t.parent()}}}let f=o.define,g=f(),m=f(),y=f(m),v=f(m),x=f(),_=f(x),b=f(x),w=f(),S=f(w),M=f(),C=f(),k=f(),T=f(k),I=f(),A={comment:g,lineComment:f(g),blockComment:f(g),docComment:f(g),name:m,variableName:f(m),typeName:y,tagName:f(y),propertyName:v,attributeName:f(v),className:f(m),labelName:f(m),namespace:f(m),macroName:f(m),literal:x,string:_,docString:f(_),character:f(_),attributeValue:f(_),number:b,integer:f(b),float:f(b),bool:f(x),regexp:f(x),escape:f(x),color:f(x),url:f(x),keyword:M,self:f(M),null:f(M),atom:f(M),unit:f(M),modifier:f(M),operatorKeyword:f(M),controlKeyword:f(M),definitionKeyword:f(M),moduleKeyword:f(M),operator:C,derefOperator:f(C),arithmeticOperator:f(C),logicOperator:f(C),bitwiseOperator:f(C),compareOperator:f(C),updateOperator:f(C),definitionOperator:f(C),typeOperator:f(C),controlOperator:f(C),punctuation:k,separator:f(k),bracket:T,angleBracket:f(T),squareBracket:f(T),paren:f(T),brace:f(T),content:w,heading:S,heading1:f(S),heading2:f(S),heading3:f(S),heading4:f(S),heading5:f(S),heading6:f(S),contentSeparator:f(w),list:f(w),quote:f(w),emphasis:f(w),strong:f(w),link:f(w),monospace:f(w),strikethrough:f(w),inserted:f(),deleted:f(),changed:f(),invalid:f(),meta:I,documentMeta:f(I),annotation:f(I),processingInstruction:f(I),definition:o.defineModifier("definition"),constant:o.defineModifier("constant"),function:o.defineModifier("function"),standard:o.defineModifier("standard"),local:o.defineModifier("local"),special:o.defineModifier("special")};for(let t in A){let e=A[t];e instanceof o&&(e.name=t)}c([{tag:A.link,class:"tok-link"},{tag:A.heading,class:"tok-heading"},{tag:A.emphasis,class:"tok-emphasis"},{tag:A.strong,class:"tok-strong"},{tag:A.keyword,class:"tok-keyword"},{tag:A.atom,class:"tok-atom"},{tag:A.bool,class:"tok-bool"},{tag:A.url,class:"tok-url"},{tag:A.labelName,class:"tok-labelName"},{tag:A.inserted,class:"tok-inserted"},{tag:A.deleted,class:"tok-deleted"},{tag:A.literal,class:"tok-literal"},{tag:A.string,class:"tok-string"},{tag:A.number,class:"tok-number"},{tag:[A.regexp,A.escape,A.special(A.string)],class:"tok-string2"},{tag:A.variableName,class:"tok-variableName"},{tag:A.local(A.variableName),class:"tok-variableName tok-local"},{tag:A.definition(A.variableName),class:"tok-variableName tok-definition"},{tag:A.special(A.variableName),class:"tok-variableName2"},{tag:A.definition(A.propertyName),class:"tok-propertyName tok-definition"},{tag:A.typeName,class:"tok-typeName"},{tag:A.namespace,class:"tok-namespace"},{tag:A.className,class:"tok-className"},{tag:A.macroName,class:"tok-macroName"},{tag:A.propertyName,class:"tok-propertyName"},{tag:A.operator,class:"tok-operator"},{tag:A.comment,class:"tok-comment"},{tag:A.meta,class:"tok-meta"},{tag:A.invalid,class:"tok-invalid"},{tag:A.punctuation,class:"tok-punctuation"}])},223:function(t,e,n){"use strict";n.d(e,{oQ:function(){return eF}});var i=n(7867),r=n(3492),o=n(8169),a=n(1080);function s(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return!!r&&(i(n.update(r)),!0)}}let l=s(function(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:t,to:o}of n){let n=i.length,a=1e9,s=c(e,t).line;if(s){for(let n=t;n<=o;){let l=e.doc.lineAt(n);if(l.from>r&&(t==o||o>l.from)){r=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,n=l.text.slice(t,t+s.length)==s?t:-1;t<l.text.length&&t<a&&(a=t),i.push({line:l,comment:n,token:s,indent:t,empty:e,single:!1})}n=l.to+1}if(a<1e9)for(let t=n;t<i.length;t++)i[t].indent<i[t].line.text.length&&(i[t].indent=a);i.length==n+1&&(i[n].single=!0)}}if(2!=t&&i.some(t=>t.comment<0&&(!t.empty||t.single))){let t=[];for(let{line:e,token:n,indent:r,empty:o,single:a}of i)(a||!o)&&t.push({from:e.from+r,insert:n+" "});let n=e.changes(t);return{changes:n,selection:e.selection.map(n,1)}}if(1!=t&&i.some(t=>t.comment>=0)){let t=[];for(let{line:e,comment:n,token:r}of i)if(n>=0){let i=e.from+n,o=i+r.length;" "==e.text[o-e.from]&&o++,t.push({from:i,to:o})}return{changes:t}}return null},0),h=s(d,0),u=s((t,e)=>d(t,e,function(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}(e)),0);function c(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}function d(t,e,n=e.selection.ranges){let i=n.map(t=>c(e,t.from).block);if(!i.every(t=>t))return null;let r=n.map((t,n)=>(function(t,{open:e,close:n},i,r){let o,a,s=t.sliceDoc(i-50,i),l=t.sliceDoc(r,r+50),h=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(l)[0].length,c=s.length-h;if(s.slice(c-e.length,c)==e&&l.slice(u,u+n.length)==n)return{open:{pos:i-h,margin:h&&1},close:{pos:r+u,margin:u&&1}};r-i<=100?o=a=t.sliceDoc(i,r):(o=t.sliceDoc(i,i+50),a=t.sliceDoc(r-50,r));let d=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(a)[0].length,f=a.length-p-n.length;return o.slice(d,d+e.length)==e&&a.slice(f,f+n.length)==n?{open:{pos:i+d+e.length,margin:+!!/\s/.test(o.charAt(d+e.length))},close:{pos:r-p-n.length,margin:+!!/\s/.test(a.charAt(f-1))}}:null})(e,i[n],t.from,t.to));if(2!=t&&!r.every(t=>t))return{changes:e.changes(n.map((t,e)=>r[e]?[]:[{from:t.from,insert:i[e].open+" "},{from:t.to,insert:" "+i[e].close}]))};if(1!=t&&r.some(t=>t)){let t=[];for(let e=0,n;e<r.length;e++)if(n=r[e]){let r=i[e],{open:o,close:a}=n;t.push({from:o.pos-r.open.length,to:o.pos+o.margin},{from:a.pos-a.margin,to:a.pos+r.close.length})}return{changes:t}}return null}let p=r.YH.define(),f=r.YH.define(),g=r.sj.define(),m=r.sj.define({combine:t=>(0,r.QR)(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(n,i)=>t(n,i)||e(n,i)})}),y=r.sU.define({create:()=>D.empty,update(t,e){let n=e.state.facet(m),i=e.annotation(p);if(i){let r=S.fromTransaction(e,i.selection),o=i.side,a=0==o?t.undone:t.done;return a=r?M(a,a.length,n.minDepth,r):T(a,e.startState.selection),new D(0==o?i.rest:a,0==o?a:i.rest)}let o=e.annotation(f);if(("full"==o||"before"==o)&&(t=t.isolate()),!1===e.annotation(r.ZX.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let a=S.fromTransaction(e),s=e.annotation(r.ZX.time),l=e.annotation(r.ZX.userEvent);return a?t=t.addChanges(a,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,l,n.newGroupDelay)),("full"==o||"after"==o)&&(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new D(t.done.map(S.fromJSON),t.undone.map(S.fromJSON))});function v(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(y,!1);if(!r)return!1;let o=r.pop(t,n,e);return!!o&&(i(o),!0)}}let x=v(0,!1),_=v(1,!1),b=v(0,!0),w=v(1,!0);class S{constructor(t,e,n,i,r){this.changes=t,this.effects=e,this.mapped=n,this.startSelection=i,this.selectionsAfter=r}setSelAfter(t){return new S(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,n;return{changes:null==(t=this.changes)?void 0:t.toJSON(),mapped:null==(e=this.mapped)?void 0:e.toJSON(),startSelection:null==(n=this.startSelection)?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new S(t.changes&&r.VR.fromJSON(t.changes),[],t.mapped&&r.Gu.fromJSON(t.mapped),t.startSelection&&r.OF.fromJSON(t.startSelection),t.selectionsAfter.map(r.OF.fromJSON))}static fromTransaction(t,e){let n=k;for(let e of t.startState.facet(g)){let i=e(t);i.length&&(n=n.concat(i))}return!n.length&&t.changes.empty?null:new S(t.changes.invert(t.startState.doc),n,void 0,e||t.startState.selection,k)}static selection(t){return new S(void 0,k,void 0,void 0,t)}}function M(t,e,n,i){let r=t.slice(e+1>n+20?e-n-1:0,e);return r.push(i),r}function C(t,e){return t.length?e.length?t.concat(e):t:e}let k=[];function T(t,e){if(!t.length)return[S.selection([e])];{let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),M(t,t.length-1,1e9,n.setSelAfter(i)))}}function I(t,e){if(!t.length)return t;let n=t.length,i=k;for(;n;){let o=function(t,e,n){let i=C(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(e)):k,n);if(!t.changes)return S.selection(i);let o=t.changes.map(e),a=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(a):a;return new S(o,r.Pe.mapEffects(t.effects,e),s,t.startSelection.map(a),i)}(t[n-1],e,i);if(o.changes&&!o.changes.empty||o.effects.length){let e=t.slice(0,n);return e[n-1]=o,e}e=o.mapped,n--,i=o.selectionsAfter}return i.length?[S.selection(i)]:k}let A=/^(input\.type|delete)($|\.)/;class D{constructor(t,e,n=0,i){this.done=t,this.undone=e,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new D(this.done,this.undone):this}addChanges(t,e,n,i,o){var a,s;let l,h,u=this.done,c=u[u.length-1];return new D(u=c&&c.changes&&!c.changes.empty&&t.changes&&(!n||A.test(n))&&(!c.selectionsAfter.length&&e-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,(a=c.changes,s=t.changes,l=[],h=!1,a.iterChangedRanges((t,e)=>l.push(t,e)),s.iterChangedRanges((t,e,n,i)=>{for(let t=0;t<l.length;){let e=l[t++],r=l[t++];i>=e&&n<=r&&(h=!0)}}),h))||"input.type.compose"==n)?M(u,u.length-1,i.minDepth,new S(t.changes.compose(c.changes),C(r.Pe.mapEffects(t.effects,c.changes),c.effects),c.mapped,c.startSelection,k)):M(u,u.length,i.minDepth,t),k,e,n)}addSelection(t,e,n,i){var r;let o=this.done.length?this.done[this.done.length-1].selectionsAfter:k;return o.length>0&&e-this.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(r=o[o.length-1],r.ranges.length==t.ranges.length&&0===r.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length)?this:new D(T(this.done,t),this.undone,e,n)}addMapping(t){return new D(I(this.done,t),I(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,n){let i=0==t?this.done:this.undone;if(0==i.length)return null;let r=i[i.length-1],o=r.selectionsAfter[0]||e.selection;if(n&&r.selectionsAfter.length){let n,a;return e.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:p.of({side:t,rest:(n=i[i.length-1],(a=i.slice())[i.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),a),selection:o}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0})}{if(!r.changes)return null;let n=1==i.length?k:i.slice(0,i.length-1);return r.mapped&&(n=I(n,r.mapped)),e.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:p.of({side:t,rest:n,selection:o}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}}}D.empty=new D(k,k);function L(t,e){return r.OF.create(t.ranges.map(e),t.mainIndex)}function O(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function P({state:t,dispatch:e},n){let i=L(t.selection,n);return!i.eq(t.selection,!0)&&(e(O(t,i)),!0)}function R(t,e){return r.OF.cursor(e?t.to:t.from)}function N(t,e){return P(t,n=>n.empty?t.moveByChar(n,e):R(n,e))}function E(t){return t.textDirectionAt(t.state.selection.main.head)==i.OP.LTR}let B=t=>N(t,!E(t)),z=t=>N(t,E(t));function V(t,e){return P(t,n=>n.empty?t.moveByGroup(n,e):R(n,e))}function F(t,e,n){let i,s,l=(0,o.mv)(t).resolveInner(e.head),h=n?a.uY.closedBy:a.uY.openedBy;for(let i=e.head;;){let e=n?l.childAfter(i):l.childBefore(i);if(!e)break;!function(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}(t,e,h)?i=n?e.to:e.from:l=e}return s=l.type.prop(h)&&(i=n?(0,o.jU)(t,l.from,1):(0,o.jU)(t,l.to,-1))&&i.matched?n?i.end.to:i.end.from:n?l.to:l.from,r.OF.cursor(s,n?-1:1)}function W(t,e){return P(t,n=>{if(!n.empty)return R(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}"u">typeof Intl&&Intl.Segmenter;let H=t=>W(t,!1),G=t=>W(t,!0);function U(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,o;if(e){for(let e of t.state.facet(i.Lz.scrollMargins)){let i=e(t);(null==i?void 0:i.top)&&(n=Math.max(null==i?void 0:i.top,n)),(null==i?void 0:i.bottom)&&(r=Math.max(null==i?void 0:i.bottom,r))}o=t.scrollDOM.clientHeight-n-r}else o=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,o-5)}}function j(t,e){let n,r=U(t),{state:o}=t,a=L(o.selection,n=>n.empty?t.moveVertically(n,e,r.height):R(n,e));if(a.eq(o.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(o.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+r.marginTop,h=s.bottom-r.marginBottom;e&&e.top>l&&e.bottom<h&&(n=i.Lz.scrollIntoView(a.main.head,{y:"start",yMargin:e.top-l}))}return t.dispatch(O(o,a),{effects:n}),!0}let Y=t=>j(t,!1),X=t=>j(t,!0);function Z(t,e,n){let i=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,n);if(o.head==e.head&&o.head!=(n?i.to:i.from)&&(o=t.moveToLineBoundary(e,n,!1)),!n&&o.head==i.from&&i.length){let n=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;n&&e.head!=i.from+n&&(o=r.OF.cursor(i.from+n))}return o}function q(t,e){let n=L(t.state.selection,t=>{let n=e(t);return r.OF.range(t.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(t.state.selection)&&(t.dispatch(O(t.state,n)),!0)}function K(t,e){return q(t,n=>t.moveByChar(n,e))}let $=t=>K(t,!E(t)),J=t=>K(t,E(t));function Q(t,e){return q(t,n=>t.moveByGroup(n,e))}function tt(t,e){return q(t,n=>t.moveVertically(n,e))}let te=t=>tt(t,!1),tn=t=>tt(t,!0);function ti(t,e){return q(t,n=>t.moveVertically(n,e,U(t).height))}let tr=t=>ti(t,!1),to=t=>ti(t,!0),ta=({state:t,dispatch:e})=>(e(O(t,{anchor:0})),!0),ts=({state:t,dispatch:e})=>(e(O(t,{anchor:t.doc.length})),!0),tl=({state:t,dispatch:e})=>(e(O(t,{anchor:t.selection.main.anchor,head:0})),!0),th=({state:t,dispatch:e})=>(e(O(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function tu(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:o}=t,a=o.changeByRange(i=>{let{from:o,to:a}=i;if(o==a){let r=e(i);r<o?(n="delete.backward",r=tc(t,r,!1)):r>o&&(n="delete.forward",r=tc(t,r,!0)),o=Math.min(o,r),a=Math.max(a,r)}else o=tc(t,o,!1),a=tc(t,a,!0);return o==a?{range:i}:{changes:{from:o,to:a},range:r.OF.cursor(o,o<i.head?-1:1)}});return!a.changes.empty&&(t.dispatch(o.update(a,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?i.Lz.announce.of(o.phrase("Selection deleted")):void 0})),!0)}function tc(t,e,n){if(t instanceof i.Lz)for(let r of t.state.facet(i.Lz.atomicRanges).map(e=>e(t)))r.between(e,e,(t,i)=>{t<e&&i>e&&(e=n?i:t)});return e}let td=(t,e,n)=>tu(t,i=>{let a=i.from,{state:s}=t,l=s.doc.lineAt(a),h,u;if(n&&!e&&a>l.from&&a<l.from+200&&!/[^ \t]/.test(h=l.text.slice(0,a-l.from))){if(" "==h[h.length-1])return a-1;let t=(0,r.y$)(h,s.tabSize)%(0,o.tp)(s)||(0,o.tp)(s);for(let e=0;e<t&&" "==h[h.length-1-e];e++)a--;u=a}else(u=(0,r.zK)(l.text,a-l.from,e,e)+l.from)==a&&l.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(u-l.from,a-l.from))&&(u=(0,r.zK)(l.text,u-l.from,!1,!1)+l.from);return u}),tp=t=>td(t,!1,!0),tf=t=>td(t,!0,!1),tg=(t,e)=>tu(t,n=>{let i=n.head,{state:o}=t,a=o.doc.lineAt(i),s=o.charCategorizer(i);for(let t=null;;){if(i==(e?a.to:a.from)){i==n.head&&a.number!=(e?o.doc.lines:1)&&(i+=e?1:-1);break}let l=(0,r.zK)(a.text,i-a.from,e)+a.from,h=a.text.slice(Math.min(i,l)-a.from,Math.max(i,l)-a.from),u=s(h);if(null!=t&&u!=t)break;(" "!=h||i!=n.head)&&(t=u),i=l}return i}),tm=t=>tg(t,!1);function ty(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=t.doc.lineAt(i.to);if(i.empty||i.to!=o.from||(o=t.doc.lineAt(i.to-1)),n>=r.number){let t=e[e.length-1];t.to=o.to,t.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return e}function tv(t,e,n){if(t.readOnly)return!1;let i=[],o=[];for(let e of ty(t)){if(n?e.to==t.doc.length:0==e.from)continue;let a=t.doc.lineAt(n?e.to+1:e.from-1),s=a.length+1;if(n)for(let n of(i.push({from:e.to,to:a.to},{from:e.from,insert:a.text+t.lineBreak}),e.ranges))o.push(r.OF.range(Math.min(t.doc.length,n.anchor+s),Math.min(t.doc.length,n.head+s)));else for(let n of(i.push({from:a.from,to:e.from},{from:e.to,insert:t.lineBreak+a.text}),e.ranges))o.push(r.OF.range(n.anchor-s,n.head-s))}return!!i.length&&(e(t.update({changes:i,scrollIntoView:!0,selection:r.OF.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function tx(t,e,n){if(t.readOnly)return!1;let i=[];for(let e of ty(t))n?i.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):i.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let t_=tw(!1),tb=tw(!0);function tw(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(n=>{let{from:i,to:s}=n,l=e.doc.lineAt(i),h=!t&&i==s&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=(0,o.mv)(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(a.uY.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}(e,i);t&&(i=s=(s<=l.to?l:e.doc.lineAt(s)).to);let u=new o.KB(e,{simulateBreak:i,simulateDoubleBreak:!!h}),c=(0,o._v)(u,i);for(null==c&&(c=(0,r.y$)(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));s<l.to&&/\s/.test(l.text[s-l.from]);)s++;h?{from:i,to:s}=h:i>l.from&&i<l.from+100&&!/\S/.test(l.text.slice(0,i))&&(i=l.from);let d=["",(0,o.EI)(e,c)];return h&&d.push((0,o.EI)(e,u.lineIndent(l.from,-1))),{changes:{from:i,to:s,insert:r.EY.of(d)},range:r.OF.cursor(i+1+d[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function tS(t,e){let n=-1;return t.changeByRange(i=>{let o=[];for(let r=i.from;r<=i.to;){let a=t.doc.lineAt(r);a.number>n&&(i.empty||i.to>a.from)&&(e(a,o,i),n=a.number),r=a.to+1}let a=t.changes(o);return{changes:o,range:r.OF.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}let tM=[{key:"Ctrl-b",run:B,shift:$,preventDefault:!0},{key:"Ctrl-f",run:z,shift:J},{key:"Ctrl-p",run:H,shift:te},{key:"Ctrl-n",run:G,shift:tn},{key:"Ctrl-a",run:t=>P(t,e=>r.OF.cursor(t.lineBlockAt(e.head).from,1)),shift:t=>q(t,e=>r.OF.cursor(t.lineBlockAt(e.head).from))},{key:"Ctrl-e",run:t=>P(t,e=>r.OF.cursor(t.lineBlockAt(e.head).to,-1)),shift:t=>q(t,e=>r.OF.cursor(t.lineBlockAt(e.head).to))},{key:"Ctrl-d",run:tf},{key:"Ctrl-h",run:tp},{key:"Ctrl-k",run:t=>tu(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)})},{key:"Ctrl-Alt-h",run:tm},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:r.EY.of(["",""])},range:r.OF.cursor(t.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,i=t.doc.lineAt(n),o=n==i.from?n-1:(0,r.zK)(i.text,n-i.from,!1)+i.from,a=n==i.to?n+1:(0,r.zK)(i.text,n-i.from,!0)+i.from;return{changes:{from:o,to:a,insert:t.doc.slice(n,a).append(t.doc.slice(o,n))},range:r.OF.cursor(a)}});return!n.changes.empty&&(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:X}],tC=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>P(t,e=>F(t.state,e,!E(t))),shift:t=>q(t,e=>F(t.state,e,!E(t)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>P(t,e=>F(t.state,e,E(t))),shift:t=>q(t,e=>F(t.state,e,E(t)))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>tv(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>tx(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>tv(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>tx(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=r.OF.create([n.main]):n.main.empty||(i=r.OF.create([r.OF.cursor(n.main.head)])),!!i&&(e(O(t,i)),!0)}},{key:"Mod-Enter",run:tb},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let n=ty(t).map(({from:e,to:n})=>r.OF.range(e,Math.min(n+1,t.doc.length)));return e(t.update({selection:r.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let n=L(t.selection,e=>{let n=(0,o.mv)(t),i=n.resolveStack(e.from,1);if(e.empty){let t=n.resolveStack(e.from,-1);t.node.from>=i.node.from&&t.node.to<=i.node.to&&(i=t)}for(let t=i;t;t=t.next){let{node:n}=t;if((n.from<e.from&&n.to>=e.to||n.to>e.to&&n.from<=e.from)&&t.next)return r.OF.range(n.to,n.from)}return e});return!n.eq(t.selection)&&(e(O(t,n)),!0)},preventDefault:!0},{key:"Mod-[",run:({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(tS(t,(e,n)=>{let i=/^\s*/.exec(e.text)[0];if(!i)return;let a=(0,r.y$)(i,t.tabSize),s=0,l=(0,o.EI)(t,Math.max(0,a-(0,o.tp)(t)));for(;s<i.length&&s<l.length&&i.charCodeAt(s)==l.charCodeAt(s);)s++;n.push({from:e.from+s,to:e.from+i.length,insert:l.slice(s)})}),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(tS(t,(e,n)=>{n.push({from:e.from,insert:t.facet(o.Xt)})}),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new o.KB(t,{overrideIndentation:t=>{let e=n[t];return null==e?-1:e}}),r=tS(t,(e,r,a)=>{let s=(0,o._v)(i,e.from);if(null==s)return;/\S/.test(e.text)||(s=0);let l=/^\s*/.exec(e.text)[0],h=(0,o.EI)(t,s);(l!=h||a.from<e.from+l.length)&&(n[e.from]=s,r.push({from:e.from,to:e.from+l.length,insert:h}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(ty(e).map(({from:t,to:n})=>(t>0?t--:n<e.doc.length&&n++,{from:t,to:n}))),i=L(e.selection,e=>{let n;if(t.lineWrapping){let i=t.lineBlockAt(e.head),r=t.coordsAtPos(e.head,e.assoc||1);r&&(n=i.bottom+t.documentTop-r.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,n)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>{let n,i;return n=!1,i=L(t.selection,e=>{let i=(0,o.jU)(t,e.head,-1)||(0,o.jU)(t,e.head,1)||e.head>0&&(0,o.jU)(t,e.head-1,1)||e.head<t.doc.length&&(0,o.jU)(t,e.head+1,-1);if(!i||!i.end)return e;n=!0;let a=i.start.from==e.head?i.end.to:i.end.from;return r.OF.cursor(a)}),!!n&&(e(O(t,i)),!0)}},{key:"Mod-/",run:t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=c(t.state,n.from);return i.line?l(t):!!i.block&&u(t)}},{key:"Alt-A",run:h},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:B,shift:$,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>V(t,!E(t)),shift:t=>Q(t,!E(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>P(t,e=>Z(t,e,!E(t))),shift:t=>q(t,e=>Z(t,e,!E(t))),preventDefault:!0},{key:"ArrowRight",run:z,shift:J,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>V(t,E(t)),shift:t=>Q(t,E(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>P(t,e=>Z(t,e,E(t))),shift:t=>q(t,e=>Z(t,e,E(t))),preventDefault:!0},{key:"ArrowUp",run:H,shift:te,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ta,shift:tl},{mac:"Ctrl-ArrowUp",run:Y,shift:tr},{key:"ArrowDown",run:G,shift:tn,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ts,shift:th},{mac:"Ctrl-ArrowDown",run:X,shift:to},{key:"PageUp",run:Y,shift:tr},{key:"PageDown",run:X,shift:to},{key:"Home",run:t=>P(t,e=>Z(t,e,!1)),shift:t=>q(t,e=>Z(t,e,!1)),preventDefault:!0},{key:"Mod-Home",run:ta,shift:tl},{key:"End",run:t=>P(t,e=>Z(t,e,!0)),shift:t=>q(t,e=>Z(t,e,!0)),preventDefault:!0},{key:"Mod-End",run:ts,shift:th},{key:"Enter",run:t_,shift:t_},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:tp,shift:tp},{key:"Delete",run:tf},{key:"Mod-Backspace",mac:"Alt-Backspace",run:tm},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>tg(t,!0)},{mac:"Mod-Backspace",run:t=>tu(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)})},{mac:"Mod-Delete",run:t=>tu(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)})}].concat(tM.map(t=>({mac:t.key,run:t.run,shift:t.shift}))));function tk(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];"string"==typeof r?t.setAttribute(i,r):null!=r&&(t[i]=r)}e++}for(;e<arguments.length;e++)!function t(e,n){if("string"==typeof n)e.appendChild(document.createTextNode(n));else if(null==n);else if(null!=n.nodeType)e.appendChild(n);else if(Array.isArray(n))for(var i=0;i<n.length;i++)t(e,n[i]);else throw RangeError("Unsupported child node: "+n)}(t,arguments[e]);return t}let tT="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class tI{constructor(t,e,n=0,i=t.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,i),this.bufferStart=n,this.normalize=r?t=>r(tT(t)):tT,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return(0,r.vS)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=(0,r.MK)(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,r.Fh)(t);let i=this.normalize(e);if(i.length)for(let t=0,r=n;;t++){let o=i.charCodeAt(t),a=this.match(o,r,this.bufferPos+this.bufferStart);if(t==i.length-1){if(a)return this.value=a,this;break}r==n&&t<e.length&&e.charCodeAt(t)==o&&r++}}}match(t,e,n){let i=null;for(let e=0;e<this.matches.length;e+=2){let r=this.matches[e],o=!1;this.query.charCodeAt(r)==t&&(r==this.query.length-1?i={from:this.matches[e+1],to:n}:(this.matches[e]++,o=!0)),o||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?i={from:e,to:n}:this.matches.push(1,e)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}"u">typeof Symbol&&(tI.prototype[Symbol.iterator]=function(){return this});let tA={from:-1,to:-1,match:/.*/.exec("")},tD="gm"+(null==/x/.unicode?"":"u");class tL{constructor(t,e,n,i=0,r=t.length){if(this.text=t,this.to=r,this.curLine="",this.done=!1,this.value=tA,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new tR(t,e,n,i,r);this.re=new RegExp(e,tD+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=t.iter();let o=t.lineAt(i);this.curLineStart=o.from,this.matchPos=tN(t,i),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,i=n+e[0].length;if(this.matchPos=tN(this.text,i+ +(n==i)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,e)))return this.value={from:n,to:i,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}let tO=new WeakMap;class tP{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,n){let i=tO.get(t);if(!i||i.from>=n||i.to<=e){let i=new tP(e,t.sliceString(e,n));return tO.set(t,i),i}if(i.from==e&&i.to==n)return i;let{text:r,from:o}=i;return o>e&&(r=t.sliceString(e,o)+r,o=e),i.to<n&&(r+=t.sliceString(i.to,n)),tO.set(t,new tP(o,r)),new tP(e,r.slice(e-o,n-o))}}class tR{constructor(t,e,n,i,r){this.text=t,this.to=r,this.done=!1,this.value=tA,this.matchPos=tN(t,i),this.re=new RegExp(e,tD+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=tP.get(t,i,this.chunkEnd(i+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,n=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,n,e)))return this.value={from:t,to:n,match:e},this.matchPos=tN(this.text,n+ +(t==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=tP.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function tN(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}function tE(t){let e=tk("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!n)return;let{state:o}=t,a=o.doc.lineAt(o.selection.main.head),[,s,l,h,u]=n,c=h?+h.slice(1):0,d=l?+l:a.number;if(l&&u){let t=d/100;s&&(t=t*("-"==s?-1:1)+a.number/o.doc.lines),d=Math.round(o.doc.lines*t)}else l&&s&&(d=d*("-"==s?-1:1)+a.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),f=r.OF.cursor(p.from+Math.max(0,Math.min(c,p.length)));t.dispatch({effects:[tB.of(!1),i.Lz.scrollIntoView(f.from,{y:"center"})],selection:f}),t.focus()}return{dom:tk("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:tB.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),n())},onsubmit:t=>{t.preventDefault(),n()}},tk("label",t.state.phrase("Go to line"),": ",e)," ",tk("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),tk("button",{name:"close",onclick:()=>{t.dispatch({effects:tB.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["\xd7"]))}}"u">typeof Symbol&&(tL.prototype[Symbol.iterator]=tR.prototype[Symbol.iterator]=function(){return this});let tB=r.Pe.define(),tz=r.sU.define({create:()=>!0,update(t,e){for(let n of e.effects)n.is(tB)&&(t=n.value);return t},provide:t=>i.S7.from(t,t=>t?tE:null)}),tV=i.Lz.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),tF={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},tW=r.sj.define({combine:t=>(0,r.QR)(t,tF,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})}),tH=i.NZ.mark({class:"cm-selectionMatch"}),tG=i.NZ.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function tU(t,e,n,i){return(0==n||t(e.sliceDoc(n-1,n))!=r.Je.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=r.Je.Word)}let tj=i.Z9.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(tW),{state:n}=t,o=n.selection;if(o.ranges.length>1)return i.NZ.none;let a=o.main,s,l=null;if(a.empty){if(!e.highlightWordAroundCursor)return i.NZ.none;let t=n.wordAt(a.head);if(!t)return i.NZ.none;l=n.charCategorizer(a.head),s=n.sliceDoc(t.from,t.to)}else{let t=a.to-a.from;if(t<e.minSelectionLength||t>200)return i.NZ.none;if(e.wholeWords){var h,u,c;if(s=n.sliceDoc(a.from,a.to),!(tU(l=n.charCategorizer(a.head),n,a.from,a.to)&&(h=l,u=a.from,c=a.to,h(n.sliceDoc(u,u+1))==r.Je.Word&&h(n.sliceDoc(c-1,c))==r.Je.Word)))return i.NZ.none}else if(!(s=n.sliceDoc(a.from,a.to)))return i.NZ.none}let d=[];for(let r of t.visibleRanges){let t=new tI(n.doc,s,r.from,r.to);for(;!t.next().done;){let{from:r,to:o}=t.value;if((!l||tU(l,n,r,o))&&(a.empty&&r<=a.from&&o>=a.to?d.push(tG.range(r,o)):(r>=a.to||o<=a.from)&&d.push(tH.range(r,o)),d.length>e.maxMatches))return i.NZ.none}}return i.NZ.set(d)}},{decorations:t=>t.decorations}),tY=i.Lz.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),tX=r.sj.define({combine:t=>(0,r.QR)(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new ed(t),scrollToMatch:t=>i.Lz.scrollIntoView(t)})});class tZ{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,tD),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new t1(this):new t$(this)}getCursor(t,e=0,n){let i=t.doc?t:r.$t.create({doc:t});return null==n&&(n=i.doc.length),this.regexp?tJ(this,i,e,n):tK(this,i,e,n)}}class tq{constructor(t){this.spec=t}}function tK(t,e,n,i){var o,a;return new tI(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?(o=e.doc,a=e.charCategorizer(e.selection.main.head),(t,e,n,i)=>((i>t||i+n.length<e)&&(i=Math.max(0,t-2),n=o.sliceString(i,Math.min(o.length,e+2))),(a(tQ(n,t-i))!=r.Je.Word||a(t0(n,t-i))!=r.Je.Word)&&(a(t0(n,e-i))!=r.Je.Word||a(tQ(n,e-i))!=r.Je.Word))):void 0)}class t$ extends tq{constructor(t){super(t)}nextMatch(t,e,n){let i=tK(this.spec,t,n,t.doc.length).nextOverlapping();if(i.done){let n=Math.min(t.doc.length,e+this.spec.unquoted.length);i=tK(this.spec,t,0,n).nextOverlapping()}return i.done||i.value.from==e&&i.value.to==n?null:i.value}prevMatchInRange(t,e,n){for(let i=n;;){let n=Math.max(e,i-1e4-this.spec.unquoted.length),r=tK(this.spec,t,n,i),o=null;for(;!r.nextOverlapping().done;)o=r.value;if(o)return o;if(n==e)return null;i-=1e4}}prevMatch(t,e,n){let i=this.prevMatchInRange(t,0,e);return i||(i=this.prevMatchInRange(t,Math.max(0,n-this.spec.unquoted.length),t.doc.length)),i&&(i.from!=e||i.to!=n)?i:null}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let n=tK(this.spec,t,0,t.doc.length),i=[];for(;!n.next().done;){if(i.length>=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=tK(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}function tJ(t,e,n,i){var o;return new tL(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(o=e.charCategorizer(e.selection.main.head),(t,e,n)=>!n[0].length||(o(tQ(n.input,n.index))!=r.Je.Word||o(t0(n.input,n.index))!=r.Je.Word)&&(o(t0(n.input,n.index+n[0].length))!=r.Je.Word||o(tQ(n.input,n.index+n[0].length))!=r.Je.Word)):void 0},n,i)}function tQ(t,e){return t.slice((0,r.zK)(t,e,!1),e)}function t0(t,e){return t.slice(e,(0,r.zK)(t,e))}class t1 extends tq{nextMatch(t,e,n){let i=tJ(this.spec,t,n,t.doc.length).next();return i.done&&(i=tJ(this.spec,t,0,e).next()),i.done?null:i.value}prevMatchInRange(t,e,n){for(let i=1;;i++){let r=Math.max(e,n-1e4*i),o=tJ(this.spec,t,r,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==e||a.from>r+10))return a;if(r==e)return null}}prevMatch(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(e,n)=>{if("&"==n)return t.match[0];if("$"==n)return"$";for(let e=n.length;e>0;e--){let i=+n.slice(0,e);if(i>0&&i<t.match.length)return t.match[i]+n.slice(e)}return e})}matchAll(t,e){let n=tJ(this.spec,t,0,t.doc.length),i=[];for(;!n.next().done;){if(i.length>=e)return null;i.push(n.value)}return i}highlight(t,e,n,i){let r=tJ(this.spec,t,Math.max(0,e-250),Math.min(n+250,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}let t2=r.Pe.define(),t5=r.Pe.define(),t3=r.sU.define({create:t=>new t4(ea(t).create(),null),update(t,e){for(let n of e.effects)n.is(t2)?t=new t4(n.value.create(),t.panel):n.is(t5)&&(t=new t4(t.query,n.value?eo:null));return t},provide:t=>i.S7.from(t,t=>t.panel)});class t4{constructor(t,e){this.query=t,this.panel=e}}let t8=i.NZ.mark({class:"cm-searchMatch"}),t6=i.NZ.mark({class:"cm-searchMatch cm-searchMatch-selected"}),t9=i.Z9.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(t3))}update(t){let e=t.state.field(t3);(e!=t.startState.field(t3)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return i.NZ.none;let{view:n}=this,o=new r.vB;for(let e=0,i=n.visibleRanges,r=i.length;e<r;e++){let{from:a,to:s}=i[e];for(;e<r-1&&s>i[e+1].from-500;)s=i[++e].to;t.highlight(n.state,a,s,(t,e)=>{let i=n.state.selection.ranges.some(n=>n.from==t&&n.to==e);o.add(t,e,i?t6:t8)})}return o.finish()}},{decorations:t=>t.decorations});function t7(t){return e=>{let n=e.state.field(t3,!1);return n&&n.query.spec.valid?t(e,n):eh(e)}}let et=t7((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let o=r.OF.single(i.from,i.to),a=t.state.facet(tX);return t.dispatch({selection:o,effects:[eg(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),el(t),!0}),ee=t7((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,o=e.prevMatch(n,i,i);if(!o)return!1;let a=r.OF.single(o.from,o.to),s=t.state.facet(tX);return t.dispatch({selection:a,effects:[eg(t,o),s.scrollToMatch(a.main,t)],userEvent:"select.search"}),el(t),!0}),en=t7((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!!n&&!!n.length&&(t.dispatch({selection:r.OF.create(n.map(t=>r.OF.range(t.from,t.to))),userEvent:"select.search.matches"}),!0)}),ei=t7((t,{query:e})=>{let{state:n}=t,{from:o,to:a}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,o,o);if(!s)return!1;let l=s,h=[],u,c,d=[];l.from==o&&l.to==a&&(c=n.toText(e.getReplacement(l)),h.push({from:l.from,to:l.to,insert:c}),l=e.nextMatch(n,l.from,l.to),d.push(i.Lz.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(o).number)+".")));let p=t.state.changes(h);return l&&(u=r.OF.single(l.from,l.to).map(p),d.push(eg(t,l)),d.push(n.facet(tX).scrollToMatch(u.main,t))),t.dispatch({changes:p,selection:u,effects:d,userEvent:"input.replace"}),!0}),er=t7((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(t=>{let{from:n,to:i}=t;return{from:n,to:i,insert:e.getReplacement(t)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:i.Lz.announce.of(r),userEvent:"input.replace.all"}),!0});function eo(t){return t.state.facet(tX).createPanel(t)}function ea(t,e){var n,i,r,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let h=t.facet(tX);return new tZ({search:(null!=(n=null==e?void 0:e.literal)?n:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!=(i=null==e?void 0:e.caseSensitive)?i:h.caseSensitive,literal:null!=(r=null==e?void 0:e.literal)?r:h.literal,regexp:null!=(o=null==e?void 0:e.regexp)?o:h.regexp,wholeWord:null!=(a=null==e?void 0:e.wholeWord)?a:h.wholeWord})}function es(t){let e=(0,i.ld)(t,eo);return e&&e.dom.querySelector("[main-field]")}function el(t){let e=es(t);e&&e==t.root.activeElement&&e.select()}let eh=t=>{let e=t.state.field(t3,!1);if(e&&e.panel){let n=es(t);if(n&&n!=t.root.activeElement){let i=ea(t.state,e.query.spec);i.valid&&t.dispatch({effects:t2.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[t5.of(!0),e?t2.of(ea(t.state,e.query.spec)):r.Pe.appendConfig.of(ey)]});return!0},eu=t=>{let e=t.state.field(t3,!1);if(!e||!e.panel)return!1;let n=(0,i.ld)(t,eo);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:t5.of(!1)}),!0},ec=[{key:"Mod-f",run:eh,scope:"editor search-panel"},{key:"F3",run:et,shift:ee,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:et,shift:ee,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:eu,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:o}=n.main,a=[],s=0;for(let e=new tI(t.doc,t.sliceDoc(i,o));!e.next().done;){if(a.length>1e3)return!1;e.value.from==i&&(s=a.length),a.push(r.OF.range(e.value.from,e.value.to))}return e(t.update({selection:r.OF.create(a,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=(0,i.ld)(t,tE);if(!e){let n=[tB.of(!0)];null==t.state.field(tz,!1)&&n.push(r.Pe.appendConfig.of([tz,tV])),t.dispatch({effects:n}),e=(0,i.ld)(t,tE)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(t=>t.from===t.to))return(({state:t,dispatch:e})=>{let{selection:n}=t,i=r.OF.create(n.ranges.map(e=>t.wordAt(e.head)||r.OF.cursor(e.head)),n.mainIndex);return!i.eq(n)&&(e(t.update({selection:i})),!0)})({state:t,dispatch:e});let o=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(e=>t.sliceDoc(e.from,e.to)!=o))return!1;let a=function(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let n=!1,r=new tI(t.doc,e,i[i.length-1].to);;)if(r.next(),r.done){if(n)return null;r=new tI(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),n=!0}else{if(n&&i.some(t=>t.from==r.value.from))continue;if(o){let e=t.wordAt(r.value.from);if(!e||e.from!=r.value.from||e.to!=r.value.to)continue}return r.value}}(t,o);return!!a&&(e(t.update({selection:t.selection.addRange(r.OF.range(a.from,a.to),!1),effects:i.Lz.scrollIntoView(a.to)})),!0)},preventDefault:!0}];class ed{constructor(t){this.view=t;let e=this.query=t.state.field(t3).query.spec;function n(t,e,n){return tk("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=tk("input",{value:e.search,placeholder:ep(t,"Find"),"aria-label":ep(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=tk("input",{value:e.replace,placeholder:ep(t,"Replace"),"aria-label":ep(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=tk("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=tk("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=tk("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=tk("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,n("next",()=>et(t),[ep(t,"next")]),n("prev",()=>ee(t),[ep(t,"previous")]),n("select",()=>en(t),[ep(t,"all")]),tk("label",null,[this.caseField,ep(t,"match case")]),tk("label",null,[this.reField,ep(t,"regexp")]),tk("label",null,[this.wordField,ep(t,"by word")]),...t.state.readOnly?[]:[tk("br"),this.replaceField,n("replace",()=>ei(t),[ep(t,"replace")]),n("replaceAll",()=>er(t),[ep(t,"replace all")])],tk("button",{name:"close",onclick:()=>eu(t),"aria-label":ep(t,"close"),type:"button"},["\xd7"])])}commit(){let t=new tZ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:t2.of(t)}))}keydown(t){(0,i.TS)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?ee:et)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),ei(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(t2)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(tX).top}}function ep(t,e){return t.state.phrase(e)}let ef=/[\s\.,:;?!]/;function eg(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(n).to,a=Math.max(r.from,e-30),s=Math.min(o,n+30),l=t.state.sliceDoc(a,s);if(a!=r.from){for(let t=0;t<30;t++)if(!ef.test(l[t+1])&&ef.test(l[t])){l=l.slice(t);break}}if(s!=o){for(let t=l.length-1;t>l.length-30;t--)if(!ef.test(l[t-1])&&ef.test(l[t])){l=l.slice(0,t);break}}return i.Lz.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}let em=i.Lz.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ey=[t3,r.Nb.low(t9),em];var ev=n(9547);class ex{constructor(t,e,n){this.from=t,this.to=e,this.diagnostic=n}}class e_{constructor(t,e,n){this.diagnostics=t,this.panel=e,this.selected=n}static init(t,e,n){let o=n.facet(eD).markerFilter;o&&(t=o(t,n));let a=t.slice().sort((t,e)=>t.from-e.from||t.to-e.to),s=new r.vB,l=[],h=0;for(let t=0;;){let e,r,o=t==a.length?null:a[t];if(!o&&!l.length)break;for(l.length?(e=h,r=l.reduce((t,e)=>Math.min(t,e.to),o&&o.from>e?o.from:1e8)):(e=o.from,r=o.to,l.push(o),t++);t<a.length;){let n=a[t];if(n.from==e&&(n.to>n.from||n.to==e))l.push(n),t++,r=Math.min(n.to,r);else{r=Math.min(n.from,r);break}}let u=function(t){let e="hint",n=1;for(let r of t){var i;let t="error"==(i=r.severity)?4:"warning"==i?3:"info"==i?2:1;t>n&&(n=t,e=r.severity)}return e}(l);if(l.some(t=>t.from==t.to||t.from==t.to-1&&n.doc.lineAt(t.from).to==t.from))s.add(e,e,i.NZ.widget({widget:new eP(u),diagnostics:l.slice()}));else{let t=l.reduce((t,e)=>e.markClass?t+" "+e.markClass:t,"");s.add(e,r,i.NZ.mark({class:"cm-lintRange cm-lintRange-"+u+t,diagnostics:l.slice(),inclusiveEnd:l.some(t=>t.to>r)}))}h=r;for(let t=0;t<l.length;t++)l[t].to<=h&&l.splice(t--,1)}let u=s.finish();return new e_(u,e,eb(u))}}function eb(t,e=null,n=0){let i=null;return t.between(n,1e9,(t,n,{spec:r})=>{if(!(e&&0>r.diagnostics.indexOf(e)))if(i){if(0>r.diagnostics.indexOf(i.diagnostic))return!1;i=new ex(i.from,n,i.diagnostic)}else i=new ex(t,n,e||r.diagnostics[0])}),i}function ew(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(eD).hideOn(t,n,i);if(null!=r)return r;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(t=>t.is(eS))||t.changes.touchesRange(o.from,Math.max(o.to,i)))}let eS=r.Pe.define(),eM=r.Pe.define(),eC=r.Pe.define(),ek=r.sU.define({create:()=>new e_(i.NZ.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=eb(n,t.selected.diagnostic,r)||eb(n,null,r)}!n.size&&r&&e.state.facet(eD).autoPanel&&(r=null),t=new e_(n,r,i)}for(let n of e.effects)if(n.is(eS)){let i=e.state.facet(eD).autoPanel?n.value.length?eN.open:null:t.panel;t=e_.init(n.value,i,e.state)}else n.is(eM)?t=new e_(t.diagnostics,n.value?eN.open:null,t.selected):n.is(eC)&&(t=new e_(t.diagnostics,t.panel,n.value));return t},provide:t=>[i.S7.from(t,t=>t.panel),i.Lz.decorations.from(t,t=>t.diagnostics)]}),eT=i.NZ.mark({class:"cm-lintRange cm-lintRange-active"}),eI=t=>{let e=t.state.field(ek,!1);return!!e&&!!e.panel&&(t.dispatch({effects:eM.of(!1)}),!0)},eA=[{key:"Mod-Shift-m",run:t=>{var e,n;let o=t.state.field(ek,!1);o&&o.panel||t.dispatch({effects:(e=t.state,n=[eM.of(!0)],e.field(ek,!1)?n:n.concat(r.Pe.appendConfig.of(eV)))});let a=(0,i.ld)(t,eN.open);return a&&a.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(ek,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return(!!i.value||!!(i=e.diagnostics.iter(0)).value&&(i.from!=n.from||i.to!=n.to))&&(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)}}],eD=r.sj.define({combine:t=>Object.assign({sources:t.map(t=>t.source).filter(t=>null!=t)},(0,r.QR)(t.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?n=>t(n)||e(n):t:e}))});function eL(t){let e=[];if(t)i:for(let{name:n}of t){for(let t=0;t<n.length;t++){let i=n[t];if(/[a-zA-Z]/.test(i)&&!e.some(t=>t.toLowerCase()==i.toLowerCase())){e.push(i);continue i}}e.push("")}return e}function eO(t,e,n){var i;let r=n?eL(e.actions):[];return tk("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},tk("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null==(i=e.actions)?void 0:i.map((n,i)=>{let o=!1,a=i=>{if(i.preventDefault(),o)return;o=!0;let r=eb(t.state.field(ek).diagnostics,e);r&&n.apply(t,r.from,r.to)},{name:s}=n,l=r[i]?s.indexOf(r[i]):-1,h=l<0?s:[s.slice(0,l),tk("u",s.slice(l,l+1)),s.slice(l+1)];return tk("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${r[i]})"`}.`},h)}),e.source&&tk("div",{class:"cm-diagnosticSource"},e.source))}class eP extends i.xO{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return tk("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class eR{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(0xffffffff*Math.random()).toString(16),this.dom=eO(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class eN{constructor(t){this.view=t,this.items=[];let e=e=>{if(27==e.keyCode)eI(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65)||!(e.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],i=eL(n.actions);for(let r=0;r<i.length;r++)if(i[r].toUpperCase().charCodeAt(0)==e.keyCode){let e=eb(this.view.state.field(ek).diagnostics,n);e&&n.actions[r].apply(t,e.from,e.to)}}e.preventDefault()},n=t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)};this.list=tk("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e,onclick:n}),this.dom=tk("div",{class:"cm-panel-lint"},this.list,tk("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>eI(this.view)},"\xd7")),this.update()}get selectedIndex(){let t=this.view.state.field(ek).selected;if(!t)return -1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return -1}update(){let{diagnostics:t,selected:e}=this.view.state.field(ek),n=0,i=!1,r=null,o=new Set;for(t.between(0,this.view.state.doc.length,(t,a,{spec:s})=>{for(let t of s.diagnostics){if(o.has(t))continue;o.add(t);let a=-1,s;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==t){a=e;break}a<0?(s=new eR(this.view,t),this.items.splice(n,0,s),i=!0):(s=this.items[a],a>n&&(this.items.splice(n,a-n),i=!0)),e&&s.diagnostic==e.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),r=s):s.dom.hasAttribute("aria-selected")&&s.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();0==this.items.length&&(this.items.push(new eR(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let n=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/n:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)e();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=eb(this.view.state.field(ek).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:eC.of(e)})}static open(t){return new eN(t)}}function eE(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}let eB=i.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:eE("#d11")},".cm-lintRange-warning":{backgroundImage:eE("orange")},".cm-lintRange-info":{backgroundImage:eE("#999")},".cm-lintRange-hint":{backgroundImage:eE("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});i.wJ;let ez=r.Pe.define(),eV=[ek,i.Lz.decorations.compute([ek],t=>{let{selected:e,panel:n}=t.field(ek);return e&&n&&e.from!=e.to?i.NZ.set([eT.range(e.from,e.to)]):i.NZ.none}),(0,i.Ux)(function(t,e,n){let{diagnostics:i}=t.state.field(ek),r,o=-1,a=-1;i.between(e-(n<0),e+ +(n>0),(t,i,{spec:s})=>{if(e>=t&&e<=i&&(t==i||(e>t||n>0)&&(e<i||n<0)))return r=s.diagnostics,o=t,a=i,!1});let s=t.state.facet(eD).tooltipFilter;return(r&&s&&(r=s(r,t.state)),r)?{pos:o,end:a,above:t.state.doc.lineAt(o).to<a,create:()=>{var e;return{dom:(e=t,tk("ul",{class:"cm-tooltip-lint"},r.map(t=>eO(e,t,!1))))}}}:null},{hideOn:ew}),eB],eF=[(0,i.$K)(),(0,i.Wu)(),(0,i.N$)(),function(t={}){return[y,m.of(t),i.Lz.domEventHandlers({beforeinput(t,e){let n="historyUndo"==t.inputType?x:"historyRedo"==t.inputType?_:null;return!!n&&(t.preventDefault(),n(e))}})]}(),(0,o.Lv)(),(0,i.VH)(),(0,i.A)(),r.$t.allowMultipleSelections.of(!0),(0,o.WD)(),(0,o.y9)(o.Zt,{fallback:!0}),(0,o.SG)(),(0,ev.wm)(),(0,ev.yU)(),(0,i.D4)(),(0,i.HJ)(),(0,i.dz)(),[tY,tj],i.w4.of([...ev.Bc,...tC,...ec,{key:"Mod-z",run:x,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:_,preventDefault:!0},{linux:"Ctrl-Shift-z",run:_,preventDefault:!0},{key:"Mod-u",run:b,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:w,preventDefault:!0},...o.f7,...ev.OO,...eA])]},5690:function(t,e,n){"use strict";n.d(e,{G:function(){return a}});let i="u"<typeof Symbol?"__ͼ":Symbol.for("ͼ"),r="u"<typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),o="u">typeof globalThis?globalThis:"u">typeof window?window:{};class a{constructor(t,e){this.rules=[];let{finish:n}=e||{};function i(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}for(let e in t)!function t(e,r,o,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),h=l&&"keyframes"==l[1];if(l&&null==r)return o.push(e[0]+";");for(let n in r){let a=r[n];if(/&/.test(n))t(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((t,e)=>t.concat(e)),a,o);else if(a&&"object"==typeof a){if(!l)throw RangeError("The value of a property ("+n+") should be a primitive value.");t(i(n),a,s,h)}else null!=a&&s.push(n.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+a+";")}(s.length||h)&&o.push((n&&!l&&!a?e.map(n):e).join(", ")+" {"+s.join(" ")+"}")}(i(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=o[i]||1;return o[i]=t+1,"ͼ"+t.toString(36)}static mount(t,e,n){let i=t[r],o=n&&n.nonce;i?o&&i.setNonce(o):i=new l(t,o),i.mount(Array.isArray(e)?e:[e],t)}}let s=new Map;class l{constructor(t,e){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let e=s.get(n);if(e)return t[r]=e;this.sheet=new i.CSSStyleSheet,s.set(n,this)}else this.styleTag=n.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[r]=this}mount(t,e){let n=this.sheet,i=0,r=0;for(let e=0;e<t.length;e++){let o=t[e],a=this.modules.indexOf(o);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),n)for(let t=0;t<o.rules.length;t++)n.insertRule(o.rules[t],i++)}else{for(;r<a;)i+=this.modules[r++].rules.length;i+=o.rules.length,r++}}if(n)0>e.adoptedStyleSheets.indexOf(this.sheet)&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let n=e.head||e;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}},3291:function(t,e,n){"use strict";n.d(e,{Ts:function(){return gl}});var i,r,o,a,s,l,h,u,c,d,p,f,g,m,y,v,x,_,b,w,S,M,C,k,T,I,A,D,L,O,P,R,N,E,B,z,V,F,W,H,G,U,j,Y,X,Z,q,K,$,J,Q,tt,te,tn,ti={};n.r(ti),n.d(ti,{Arc:function(){return dD},BezierCurve:function(){return dT},BoundingRect:function(){return nu},Circle:function(){return c0},CompoundPath:function(){return dL},Ellipse:function(){return c5},Group:function(){return rT},Image:function(){return aW},IncrementalDisplayable:function(){return dj},Line:function(){return dw},LinearGradient:function(){return dP},OrientedBoundingRect:function(){return dG},Path:function(){return aN},Point:function(){return e1},Polygon:function(){return dg},Polyline:function(){return dv},RadialGradient:function(){return dR},Rect:function(){return aq},Ring:function(){return dc},Sector:function(){return dl},Text:function(){return sn},WH:function(){return dZ},XY:function(){return dX},applyTransform:function(){return d7},calcZ2Range:function(){return pv},clipPointsByRect:function(){return pn},clipRectByRect:function(){return pi},createIcon:function(){return pr},ensureCopyRect:function(){return pg},ensureCopyTransform:function(){return pm},expandOrShrinkRect:function(){return ps},extendPath:function(){return d$},extendShape:function(){return dq},getShapeClass:function(){return dQ},getTransform:function(){return d9},groupTransition:function(){return pe},initProps:function(){return sQ},isBoundingRectAxisAligned:function(){return pp},isElementRemoved:function(){return s0},lineLineIntersect:function(){return pa},linePolygonIntersect:function(){return po},makeImage:function(){return d1},makePath:function(){return d0},mergePath:function(){return d5},registerShape:function(){return dJ},removeElement:function(){return s1},removeElementWithFadeOut:function(){return s5},resizePath:function(){return d3},retrieveZInfo:function(){return py},setTooltipConfig:function(){return pu},subPixelOptimize:function(){return d6},subPixelOptimizeLine:function(){return d4},subPixelOptimizeRect:function(){return d8},transformDirection:function(){return pt},traverseElements:function(){return pd},traverseUpdateZ:function(){return px},updateProps:function(){return sJ}});var tr=function(t,e){return(tr=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function to(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tr(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ta=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},ts=new function(){this.browser=new ta,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="u">typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(ts.wxa=!0,ts.touchEventsSupported=!0):"u"<typeof document&&"u">typeof self?ts.worker=!0:!ts.hasGlobalWindow||"Deno"in window||"u">typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(ts.node=!0,ts.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);if(i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),e.svgSupported="u">typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="u">typeof document){var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,ts);var tl="sans-serif",th="12px "+tl,tu=function(t){var e={};if("u"<typeof JSON)return e;for(var n=0;n<t.length;n++){var i=String.fromCharCode(n+32),r=(t.charCodeAt(n)-20)/100;e[i]=r}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),tc={createCanvas:function(){return"u">typeof document&&document.createElement("canvas")},measureText:function(t,e){if(!i){var n=tc.createCanvas();i=n&&n.getContext("2d")}if(i)return r!==e&&(r=i.font=e||th),i.measureText(t);t=t||"",e=e||th;var o=/((?:\d+)?\.?\d*)px/.exec(e),a=o&&+o[1]||12,s=0;if(e.indexOf("mono")>=0)s=a*t.length;else for(var l=0;l<t.length;l++){var h=tu[t[l]];s+=null==h?a:h*a}return{width:s}},loadImage:function(t,e,n){var i=new Image;return i.onload=e,i.onerror=n,i.src=t,i}},td=tN(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),tp=tN(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),tf=Object.prototype.toString,tg=Array.prototype,tm=tg.forEach,ty=tg.filter,tv=tg.slice,tx=tg.map,t_=(function(){}).constructor,tb=t_?t_.prototype:null,tw="__proto__",tS=2311;function tM(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"u">typeof console&&console.error.apply(console,t)}function tC(t){if(null==t||"object"!=typeof t)return t;var e=t,n=tf.call(t);if("[object Array]"===n){if(!t[t3]){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=tC(t[i])}}else if(tp[n]){if(!t[t3]){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(var i=0,r=t.length;i<r;i++)e[i]=t[i]}}}else if(!td[n]&&!t[t3]&&!tq(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==tw&&(e[a]=tC(t[a]));return e}function tk(t,e,n){if(!tY(e)||!tY(t))return n?tC(e):t;for(var i in e)if(e.hasOwnProperty(i)&&i!==tw){var r=t[i],o=e[i];!(tY(o)&&tY(r))||tW(o)||tW(r)||tq(o)||tq(r)||tX(o)||tX(r)||o[t3]||r[t3]?!n&&i in t||(t[i]=tC(e[i])):tk(r,o,n)}return t}function tT(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=tk(n,t[i],e);return n}function tI(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==tw&&(t[n]=e[n]);return t}function tA(t,e,n){for(var i=tz(e),r=0,o=i.length;r<o;r++){var a=i[r];(n?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}function tD(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return -1}function tL(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var o=i[r];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else tA(t,e,n)}function tO(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function tP(t,e,n){if(t&&e)if(t.forEach&&t.forEach===tm)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function tR(t,e,n){if(!t)return[];if(!e)return t0(t);if(t.map&&t.map===tx)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}function tN(t,e,n,i){if(t&&e){for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function tE(t,e,n){if(!t)return[];if(!e)return t0(t);if(t.filter&&t.filter===ty)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function tB(t,e,n){if(t&&e){for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]}}function tz(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}tc.createCanvas;var tV=tb&&tH(tb.bind)?tb.call.bind(tb.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(tv.call(arguments)))}};function tF(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(tv.call(arguments)))}}function tW(t){return Array.isArray?Array.isArray(t):"[object Array]"===tf.call(t)}function tH(t){return"function"==typeof t}function tG(t){return"string"==typeof t}function tU(t){return"[object String]"===tf.call(t)}function tj(t){return"number"==typeof t}function tY(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function tX(t){return!!td[tf.call(t)]}function tZ(t){return!!tp[tf.call(t)]}function tq(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function tK(t){return null!=t.colorStops}function t$(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function tJ(t,e){return null!=t?t:e}function tQ(t,e,n){return null!=t?t:null!=e?e:n}function t0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return tv.apply(t,e)}function t1(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function t2(t,e){if(!t)throw Error(e)}function t5(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var t3="__ec_primitive__",t4=function(){function t(){this.data={}}return t.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e,this},t.prototype.keys=function(){return tz(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},t}(),t8="function"==typeof Map,t6=function(){function t(e){var n=tW(e);this.data=t8?new Map:new t4;var i=this;function r(t,e){n?i.set(t,e):i.set(e,t)}e instanceof t?e.each(r):e&&tP(e,r)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,e){return this.data.set(t,e),e},t.prototype.each=function(t,e){this.data.forEach(function(n,i){t.call(e,n,i)})},t.prototype.keys=function(){var t=this.data.keys();return t8?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function t9(t){return new t6(t)}function t7(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var r=t.length,i=0;i<e.length;i++)n[i+r]=e[i];return n}function et(t,e){var n;if(Object.create)n=Object.create(t);else{var i=function(){};i.prototype=t,n=new i}return e&&tI(n,e),n}function ee(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function en(t,e){return t.hasOwnProperty(e)}function ei(){}var er=180/Math.PI;function eo(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function ea(t,e){return t[0]=e[0],t[1]=e[1],t}function es(t){return[t[0],t[1]]}function el(t,e,n){return t[0]=e,t[1]=n,t}function eh(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function eu(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function ec(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function ed(t){var e;return Math.sqrt((e=t)[0]*e[0]+e[1]*e[1])}function ep(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ef(t,e){var n=ed(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function eg(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var em=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function ey(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function ev(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function ex(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function e_(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var eb=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},ew=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new eb(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new eb(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.handler.dispatchToElement(new eb(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new eb(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new eb(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new eb(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),eS=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===n)return this;var s={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=r[t].length-1,h=r[t][l];return h&&h.callAtLast?r[t].splice(l,0,s):r[t].push(s),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;r<o;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=e[o-1],s=i.length,l=0;l<s;l++){var h=i[l];if(!r||!r.filter||null==h.query||r.filter(t,h.query))switch(o){case 0:h.h.call(a);break;case 1:h.h.call(a,e[0]);break;case 2:h.h.call(a,e[0],e[1]);break;default:h.h.apply(a,e.slice(1,o-1))}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t}(),eM=Math.log(2);function eC(t,e,n,i,r,o){var a=i+"-"+r,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/eM);return t[n][l]}for(var h=i|1<<n,u=n+1;i&1<<u;)u++;for(var c=0,d=0,p=0;d<s;d++){var f=1<<d;!(f&r)&&(c+=(p%2?-1:1)*t[n][d]*eC(t,e-1,u,h,r|f,o),p++)}return o[a]=c,c}function ek(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=eC(n,8,0,0,0,i);if(0!==r){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*eC(n,7,+(0===a),1<<a,1<<s,i)/r*e[a];return function(t,e,n){var i=e*o[6]+n*o[7]+1;t[0]=(e*o[0]+n*o[1]+o[2])/i,t[1]=(e*o[3]+n*o[4]+o[5])/i}}}var eT="___zrEVENTSAVED",eI=[];function eA(t,e,n,i,r){if(e.getBoundingClientRect&&ts.domSupported&&!eD(e)){var o=e[eT]||(e[eT]={}),a=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,h=0;h<4;h++){var u=t[h].getBoundingClientRect(),c=2*h,d=u.left,p=u.top;a.push(d,p),l=l&&o&&d===o[c]&&p===o[c+1],s.push(t[h].offsetLeft,t[h].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?ek(s,a):ek(a,s))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,l=o%2,h=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[h]+":0",i[1-l]+":auto",r[1-h]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return e.clearMarkers=function(){tP(n,function(t){t.parentNode&&t.parentNode.removeChild(t)})},n}(e,o),o,r);if(a)return a(t,n,i),!0}return!1}function eD(t){return"CANVAS"===t.nodeName.toUpperCase()}var eL=/([&<>"'])/g,eO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function eP(t){return null==t?"":(t+"").replace(eL,function(t,e){return eO[e]})}var eR=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,eN=[],eE=ts.browser.firefox&&39>+ts.browser.version.split(".")[0];function eB(t,e,n,i){return n=n||{},i?ez(t,e,n):eE&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ez(t,e,n),n}function ez(t,e,n){if(ts.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(eD(t)){var o=t.getBoundingClientRect();n.zrX=i-o.left,n.zrY=r-o.top;return}if(eA(eN,t,i,r)){n.zrX=eN[0],n.zrY=eN[1];return}}n.zrX=n.zrY=0}function eV(t){return t||window.event}function eF(t,e,n){if(null!=(e=eV(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&eB(t,r,e,n)}else{eB(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&eR.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function eW(t,e,n,i){t.addEventListener(e,n,i)}var eH=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function eG(t){return 2===t.which||3===t.which}var eU=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],l=eB(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},t.prototype._recognize=function(t){for(var e in eY)if(eY.hasOwnProperty(e)){var n=eY[e](this._track,t);if(n)return n}},t}();function ej(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}var eY={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=ej(i)/ej(r);isFinite(o)||(o=1),e.pinchScale=o;var a=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}};function eX(){return[1,0,0,1,0,0]}function eZ(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function eq(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function eK(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function e$(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function eJ(t,e,n,i){void 0===i&&(i=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],h=e[5],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+s*u,t[1]=-r*u+s*c,t[2]=o*c+l*u,t[3]=-o*u+c*l,t[4]=c*(a-i[0])+u*(h-i[1])+i[0],t[5]=c*(h-i[1])-u*(a-i[0])+i[1],t}function eQ(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function e0(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}var e1=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),e2=Math.min,e5=Math.max,e3=Math.abs,e4=["x","y"],e8=["width","height"],e6=new e1,e9=new e1,e7=new e1,nt=new e1,ne=nh(),nn=ne.minTv,ni=ne.maxTv,nr=[0,0],no=function(){function t(e,n,i,r){t.set(this,e,n,i,r)}return t.set=function(t,e,n,i,r){return i<0&&(e+=i,i=-i),r<0&&(n+=r,r=-r),t.x=e,t.y=n,t.width=i,t.height=r,t},t.prototype.union=function(t){var e=e2(t.x,this.x),n=e2(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=e5(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=e5(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=t.width/this.width,n=t.height/this.height,i=eX();return e$(i,i,[-this.x,-this.y]),eQ(i,i,[e,n]),e$(i,i,[t.x,t.y]),i},t.prototype.intersect=function(e,n,i){return t.intersect(this,e,n,i)},t.intersect=function(e,n,i,r){i&&e1.set(i,0,0);var o=r&&r.outIntersectRect||null,a=r&&r.clamp;if(o&&(o.x=o.y=o.width=o.height=NaN),!e||!n)return!1;e instanceof t||(e=t.set(na,e.x,e.y,e.width,e.height)),n instanceof t||(n=t.set(ns,n.x,n.y,n.width,n.height));var s=!!i;ne.reset(r,s);var l=ne.touchThreshold,h=e.x+l,u=e.x+e.width-l,c=e.y+l,d=e.y+e.height-l,p=n.x+l,f=n.x+n.width-l,g=n.y+l,m=n.y+n.height-l;if(h>u||c>d||p>f||g>m)return!1;var y=!(u<p||f<h||d<g||m<c);return(s||o)&&(nr[0]=1/0,nr[1]=0,nl(h,u,p,f,0,s,o,a),nl(c,d,g,m,1,s,o,a),s&&e1.copy(i,y?ne.useDir?ne.dirMinTv:nn:ni)),y},t.contain=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},t.prototype.contain=function(e,n){return t.contain(this,e,n)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},t.applyTransform=function(e,n,i){if(!i){e!==n&&t.copy(e,n);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}e6.x=e7.x=n.x,e6.y=nt.y=n.y,e9.x=nt.x=n.x+n.width,e9.y=e7.y=n.y+n.height,e6.transform(i),nt.transform(i),e9.transform(i),e7.transform(i),e.x=e2(e6.x,e9.x,e7.x,nt.x),e.y=e2(e6.y,e9.y,e7.y,nt.y);var l=e5(e6.x,e9.x,e7.x,nt.x),h=e5(e6.y,e9.y,e7.y,nt.y);e.width=l-e.x,e.height=h-e.y},t}(),na=new no(0,0,0,0),ns=new no(0,0,0,0);function nl(t,e,n,i,r,o,a,s){var l=e3(e-n),h=e3(i-t),u=e2(l,h),c=e4[r],d=e4[1-r],p=e8[r];e<n||i<t?l<h?(o&&(ni[c]=-l),s&&(a[c]=e,a[p]=0)):(o&&(ni[c]=h),s&&(a[c]=t,a[p]=0)):(a&&(a[c]=e5(t,n),a[p]=e2(e,i)-a[c]),o&&(u<nr[0]||ne.useDir)&&(nr[0]=e2(u,nr[0]),(l<h||!ne.bidirectional)&&(nn[c]=l,nn[d]=0,ne.useDir&&ne.calcDirMTV()),(l>=h||!ne.bidirectional)&&(nn[c]=-h,nn[d]=0,ne.useDir&&ne.calcDirMTV())))}function nh(){var t=0,e=new e1,n=new e1,i={minTv:new e1,maxTv:new e1,useDir:!1,dirMinTv:new e1,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(r,o){i.touchThreshold=0,r&&null!=r.touchThreshold&&(i.touchThreshold=e5(0,r.touchThreshold)),i.negativeSize=!1,o&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,r&&null!=r.direction&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),n.copy(i.minTv),t=r.direction,i.bidirectional=null==r.bidirectional||!!r.bidirectional,i.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var o=i.minTv,a=i.dirMinTv,s=o.y*o.y+o.x*o.x,l=Math.sin(t),h=Math.cos(t),u=l*o.y+h*o.x;if(r(u)){r(o.x)&&r(o.y)&&a.set(0,0);return}(n.x=s*h/u,n.y=s*l/u,r(n.x)&&r(n.y))?a.set(0,0):(i.bidirectional||e.dot(n)>0)&&n.len()<a.len()&&a.copy(n)}};function r(t){return 1e-10>e3(t)}return i}var nu=no,nc="silent";function nd(){eH(this.event)}var np=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return to(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(eS),nf=function(t,e){this.x=t,this.y=e},ng=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],nm=new nu(0,0,0,0),ny=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new nf(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new np,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new ew(a),a}return to(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(tP(ng,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=nx(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new nf(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new nf(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r,o="on"+e,a={type:e,event:n,target:(r=t).target,topTarget:r.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:nd};i&&(i[o]&&(a.cancelBubble=!!i[o].call(i,a)),i.trigger(e,a),i=i.__hostTarget?i.__hostTarget:i.parent,!a.cancelBubble););!a.cancelBubble&&(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new nf(t,e);if(nv(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new nu(t-s,e-s,a,a),h=i.length-1;h>=0;h--){var u=i[h];u===n||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(nm.copy(u.getBoundingRect()),u.transform&&nm.applyTransform(u.transform),nm.intersect(l)&&o.push(u))}if(o.length){for(var c=Math.PI/12,d=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<d;f+=c)if(nv(o,r,t+p*Math.cos(f),e+p*Math.sin(f),n),r.target)return r}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new eU);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new nf;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(eS);function nv(t,e,n,i,r){for(var o=t.length-1;o>=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1}i.silent&&(r=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return!r||nc}return!1}(a,n,i))&&(e.topTarget||(e.topTarget=a),s!==nc)){e.target=a;break}}}function nx(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function n_(t,e,n,i){var r=e+1;if(r===n)return 1;if(0>i(t[r++],t[e])){for(;r<n&&0>i(t[r],t[r-1]);)r++;var o=t,a=e,s=r;for(s--;a<s;){var l=o[a];o[a++]=o[s],o[s--]=l}}else for(;r<n&&i(t[r],t[r-1])>=0;)r++;return r-e}function nb(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var o,a=t[i],s=e,l=i;s<l;)0>r(a,t[o=s+l>>>1])?l=o:s=o+1;var h=i-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function nw(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l<s&&o(t,e[n+r+l])>0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&0>=o(t,e[n+r-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}for(a++;a<l;){var u=a+(l-a>>>1);o(t,e[n+u])>0?a=u+1:l=u}return l}function nS(t,e,n,i,r,o){var a=0,s=0,l=1;if(0>o(t,e[n+r])){for(s=r+1;l<s&&0>o(t,e[n+r-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=i-r;l<s&&o(t,e[n+r+l])>=0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var u=a+(l-a>>>1);0>o(t,e[n+u])?l=u:a=u+1}return l}function nM(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<32){o=n_(t,n,i,e),nb(t,n,i,n+o,e);return}var a=function(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],h=i[s],u=n[s+1],c=i[s+1];i[s]=h+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var d=nS(t[u],t,l,h,0,e);l+=d,0==(h-=d)||0!==(c=nw(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(n,i,o,s){var l,h,u,c=0;for(c=0;c<i;c++)a[c]=t[n+c];var d=0,p=o,f=n;if(t[f++]=t[p++],0==--s){for(c=0;c<i;c++)t[f+c]=a[d+c];return}if(1===i){for(c=0;c<s;c++)t[f+c]=t[p+c];t[f+s]=a[d];return}for(var g=r;;){l=0,h=0,u=!1;do if(0>e(t[p],a[d])){if(t[f++]=t[p++],h++,l=0,0==--s){u=!0;break}}else if(t[f++]=a[d++],l++,h=0,1==--i){u=!0;break}while((l|h)<g);if(u)break;do{if(0!==(l=nS(t[p],a,d,i,0,e))){for(c=0;c<l;c++)t[f+c]=a[d+c];if(f+=l,d+=l,(i-=l)<=1){u=!0;break}}if(t[f++]=t[p++],0==--s){u=!0;break}if(0!==(h=nw(a[d],t,p,s,0,e))){for(c=0;c<h;c++)t[f+c]=t[p+c];if(f+=h,p+=h,0==(s-=h)){u=!0;break}}if(t[f++]=a[d++],1==--i){u=!0;break}g--}while(l>=7||h>=7);if(u)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(c=0;c<s;c++)t[f+c]=t[p+c];t[f+s]=a[d]}else if(0===i)throw Error();else for(c=0;c<i;c++)t[f+c]=a[d+c]}(l,h,u,c):function(n,i,o,s){var l=0;for(l=0;l<s;l++)a[l]=t[o+l];var h=n+i-1,u=s-1,c=o+s-1,d=0,p=0;if(t[c--]=t[h--],0==--i){for(l=0,d=c-(s-1);l<s;l++)t[d+l]=a[l];return}if(1===s){for(c-=i,h-=i,p=c+1,d=h+1,l=i-1;l>=0;l--)t[p+l]=t[d+l];t[c]=a[u];return}for(var f=r;;){var g=0,m=0,y=!1;do if(0>e(a[u],t[h])){if(t[c--]=t[h--],g++,m=0,0==--i){y=!0;break}}else if(t[c--]=a[u--],m++,g=0,1==--s){y=!0;break}while((g|m)<f);if(y)break;do{if(0!=(g=i-nS(a[u],t,n,i,i-1,e))){for(c-=g,h-=g,i-=g,p=c+1,d=h+1,l=g-1;l>=0;l--)t[p+l]=t[d+l];if(0===i){y=!0;break}}if(t[c--]=a[u--],1==--s){y=!0;break}if(0!=(m=s-nw(t[h],a,0,s,s-1,e))){for(c-=m,u-=m,s-=m,p=c+1,d=u+1,l=0;l<m;l++)t[p+l]=a[d+l];if(s<=1){y=!0;break}}if(t[c--]=t[h--],0==--i){y=!0;break}f--}while(g>=7||m>=7);if(y)break;f<0&&(f=0),f+=2}if((r=f)<1&&(r=1),1===s){for(c-=i,h-=i,p=c+1,d=h+1,l=i-1;l>=0;l--)t[p+l]=t[d+l];t[c]=a[u]}else if(0===s)throw Error();else for(l=0,d=c-(s-1);l<s;l++)t[d+l]=a[l]}(l,h,u,c))}return n=[],i=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]<i[t+1]&&t--;else if(i[t]>i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]<i[t+1]&&t--,s(t)}},pushRun:function(t,e){n[o]=t,i[o]=e,o+=1}}}(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=n_(t,n,i,e))<s){var l=r;l>s&&(l=s),nb(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}tP(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ny.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=nx(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||eg(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});var nC=!1;function nk(){nC||(nC=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nT(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var nI=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nT}return t.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(e),n},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,r=e.length;i<r;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,nM(n,nT)},t.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),r=e&&e.length,o=0,a=t.__clipPaths;if(!t.ignoreClip&&(r||i)){if(a||(a=t.__clipPaths=[]),r)for(var s=0;s<e.length;s++)a[o++]=e[s];for(var l=i,h=t;l;)l.parent=h,l.updateTransform(),a[o++]=l,h=l,l=l.getClipPath()}if(a&&(a.length=o),t.childrenRef){for(var u=t.childrenRef(),c=0;c<u.length;c++){var d=u[c];t.__dirty&&(d.__dirty|=1),this._updateAndAddDisplayable(d,a,n)}t.__dirty=0}else isNaN(t.z)&&(nk(),t.z=0),isNaN(t.z2)&&(nk(),t.z2=0),isNaN(t.zlevel)&&(nk(),t.zlevel=0),this._displayList[this._displayListLen++]=t;var p=t.getDecalElement&&t.getDecalElement();p&&this._updateAndAddDisplayable(p,a,n);var f=t.getTextGuideLine();f&&this._updateAndAddDisplayable(f,a,n);var g=t.getTextContent();g&&this._updateAndAddDisplayable(g,a,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);return}var i=tD(this._roots,t);i>=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();g=ts.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var nA={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t-e)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1)?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)):n*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)*.5+1},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){return(t*=2)<1?t*t*(3.5949095*t-2.5949095)*.5:.5*((t-=2)*t*(3.5949095*t+2.5949095)+2)},bounceIn:function(t){return 1-nA.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*nA.bounceIn(2*t):.5*nA.bounceOut(2*t-1)+.5}},nD=Math.pow,nL=Math.sqrt,nO=nL(3),nP=1/3,nR=eo(),nN=eo(),nE=eo();function nB(t){return t>-1e-8&&t<1e-8}function nz(t){return t>1e-8||t<-1e-8}function nV(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function nF(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function nW(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,p=0;if(nB(u)&&nB(c))if(nB(s))o[0]=0;else{var f=-l/s;f>=0&&f<=1&&(o[p++]=f)}else{var g=c*c-4*u*d;if(nB(g)){var m=c/u,f=-s/a+m,y=-m/2;f>=0&&f<=1&&(o[p++]=f),y>=0&&y<=1&&(o[p++]=y)}else if(g>0){var v=nL(g),x=u*s+1.5*a*(-c+v),_=u*s+1.5*a*(-c-v),f=(-s-((x=x<0?-nD(-x,nP):nD(x,nP))+(_=_<0?-nD(-_,nP):nD(_,nP))))/(3*a);f>=0&&f<=1&&(o[p++]=f)}else{var b=Math.acos((2*u*s-3*a*c)/(2*nL(u*u*u)))/3,w=nL(u),S=Math.cos(b),f=(-s-2*w*S)/(3*a),y=(-s+w*(S+nO*Math.sin(b)))/(3*a),M=(-s+w*(S-nO*Math.sin(b)))/(3*a);f>=0&&f<=1&&(o[p++]=f),y>=0&&y<=1&&(o[p++]=y),M>=0&&M<=1&&(o[p++]=M)}}return p}function nH(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(nB(a)){if(nz(o)){var h=-s/o;h>=0&&h<=1&&(r[l++]=h)}}else{var u=o*o-4*a*s;if(nB(u))r[0]=-o/(2*a);else if(u>0){var c=nL(u),h=(-o+c)/(2*a),d=(-o-c)/(2*a);h>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}function nG(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=i}function nU(t,e,n,i,r,o,a,s,l,h,u){var c,d,p,f,g,m=.005,y=1/0;nR[0]=l,nR[1]=h;for(var v=0;v<1;v+=.05)nN[0]=nV(t,n,r,a,v),nN[1]=nV(e,i,o,s,v),(f=em(nR,nN))<y&&(c=v,y=f);y=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=c-m,p=c+m,nN[0]=nV(t,n,r,a,d),nN[1]=nV(e,i,o,s,d),f=em(nN,nR),d>=0&&f<y?(c=d,y=f):(nE[0]=nV(t,n,r,a,p),nE[1]=nV(e,i,o,s,p),g=em(nE,nR),p<=1&&g<y?(c=p,y=g):m*=.5);return u&&(u[0]=nV(t,n,r,a,c),u[1]=nV(e,i,o,s,c)),nL(y)}function nj(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function nY(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function nX(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function nZ(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function nq(t,e,n,i,r,o,a,s,l){var h,u=.005,c=1/0;nR[0]=a,nR[1]=s;for(var d=0;d<1;d+=.05){nN[0]=nj(t,n,r,d),nN[1]=nj(e,i,o,d);var p=em(nR,nN);p<c&&(h=d,c=p)}c=1/0;for(var f=0;f<32&&!(u<1e-4);f++){var g=h-u,m=h+u;nN[0]=nj(t,n,r,g),nN[1]=nj(e,i,o,g);var p=em(nN,nR);if(g>=0&&p<c)h=g,c=p;else{nE[0]=nj(t,n,r,m),nE[1]=nj(e,i,o,m);var y=em(nE,nR);m<=1&&y<c?(h=m,c=y):u*=.5}}return l&&(l[0]=nj(t,n,r,h),l[1]=nj(e,i,o,h)),nL(c)}var nK=/cubic-bezier\(([0-9,\.e ]+)\)/;function n$(t){var e=t&&nK.exec(t);if(e){var n=e[1].split(","),i=+t5(n[0]),r=+t5(n[1]),o=+t5(n[2]),a=+t5(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:nW(0,i,o,1,t,s)&&nV(0,r,a,1,s[0])}}}var nJ=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||ei,this.ondestroy=t.ondestroy||ei,this.onrestart=t.onrestart||ei,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r)if(!this.loop)return!0;else this._startTime=t-i%n,this._pausedTime=0,this.onrestart();return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=tH(t)?t:nA[t]||n$(t)},t}(),nQ=function(t){this.value=t},n0=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new nQ(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),n1=function(){function t(t){this._list=new n0,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new nQ(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),n2={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 n5(t){return(t=Math.round(t))<0?0:t>255?255:t}function n3(t){return t<0?0:t>1?1:t}function n4(t){return t.length&&"%"===t.charAt(t.length-1)?n5(parseFloat(t)/100*255):n5(parseInt(t,10))}function n8(t){return t.length&&"%"===t.charAt(t.length-1)?n3(parseFloat(t)/100):n3(parseFloat(t))}function n6(t,e,n){return(n<0?n+=1:n>1&&(n-=1),6*n<1)?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function n9(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function n7(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var it=new n1(20),ie=null;function ii(t,e){ie&&n7(ie,e),ie=it.put(t,ie||e.slice())}function ir(t,e){if(t){e=e||[];var n=it.get(t);if(n)return n7(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in n2)return n7(e,n2[i]),ii(t,e),e;var r=i.length;if("#"===i.charAt(0)){if(4===r||5===r){var o=parseInt(i.slice(1,4),16);return o>=0&&o<=4095?(n9(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===r?parseInt(i.slice(4),16)/15:1),ii(t,e),e):void n9(e,0,0,0,1)}if(7===r||9===r){var o=parseInt(i.slice(1,7),16);return o>=0&&o<=0xffffff?(n9(e,(0xff0000&o)>>16,(65280&o)>>8,255&o,9===r?parseInt(i.slice(7),16)/255:1),ii(t,e),e):void n9(e,0,0,0,1)}return}var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===r){var l=i.substr(0,a),h=i.substr(a+1,s-(a+1)).split(","),u=1;switch(l){case"rgba":if(4!==h.length)return 3===h.length?n9(e,+h[0],+h[1],+h[2],1):n9(e,0,0,0,1);u=n8(h.pop());case"rgb":if(h.length>=3)return n9(e,n4(h[0]),n4(h[1]),n4(h[2]),3===h.length?u:n8(h[3])),ii(t,e),e;return void n9(e,0,0,0,1);case"hsla":if(4!==h.length)return void n9(e,0,0,0,1);return h[3]=n8(h[3]),io(h,e),ii(t,e),e;case"hsl":if(3!==h.length)return void n9(e,0,0,0,1);return io(h,e),ii(t,e),e;default:return}}n9(e,0,0,0,1)}}function io(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=n8(t[1]),r=n8(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return n9(e=e||[],n5(255*n6(a,o,n+1/3)),n5(255*n6(a,o,n)),n5(255*n6(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ia(t,e){var n=ir(t);if(n){for(var i=0;i<3;i++)e<0?n[i]=n[i]*(1-e)|0:n[i]=(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return iu(n,4===n.length?"rgba":"rgb")}}function is(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i,r,o,a,s=t*(e.length-1),l=Math.floor(s),h=Math.ceil(s),u=e[l],c=e[h],d=s-l;return n[0]=n5((i=u[0],i+(c[0]-i)*d)),n[1]=n5((r=u[1],r+(c[1]-r)*d)),n[2]=n5((o=u[2],o+(c[2]-o)*d)),n[3]=n3((a=u[3],a+(c[3]-a)*d)),n}}function il(t,e,n,i){var r,o=ir(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,n=0;else{n=h<.5?l/(s+a):l/(2-s-a);var u=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,h];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=(r=Math.round(r=tH(e)?e(o[0]):e))<0?0:r>360?360:r),null!=n&&(o[1]=n8(tH(n)?n(o[1]):n)),null!=i&&(o[2]=n8(tH(i)?i(o[2]):i)),iu(io(o),"rgba")}function ih(t,e){var n=ir(t);if(n&&null!=e)return n[3]=n3(e),iu(n,"rgba")}function iu(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function ic(t,e){var n=ir(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var id=new n1(100);function ip(t){if(tG(t)){var e=id.get(t);return e||(e=ia(t,-.1),id.put(t,e)),e}if(tK(t)){var n=tI({},t);return n.colorStops=tR(t.colorStops,function(t){return{offset:t.offset,color:ia(t.color,-.1)}}),n}return t}var ig=Math.round;function im(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=ir(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}function iy(t){return t<1e-4&&t>-1e-4}function iv(t){return ig(1e3*t)/1e3}function ix(t){return ig(1e4*t)/1e4}var i_={left:"start",right:"end",center:"middle",middle:"middle"};function ib(t){return t&&!!t.image}function iw(t){return ib(t)||t&&!!t.svgElement}function iS(t){return"linear"===t.type}function iM(t){return"radial"===t.type}function iC(t){return t&&("linear"===t.type||"radial"===t.type)}function ik(t){return"url(#"+t+")"}function iT(t){var e=t.getGlobalScale();return Math.max(Math.ceil(Math.log(Math.max(e[0],e[1]))/Math.log(10)),1)}function iI(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*er,r=tJ(t.scaleX,1),o=tJ(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),(1!==r||1!==o)&&l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+ig(a*er)+"deg, "+ig(s*er)+"deg)"),l.join(" ")}var iA=ts.hasGlobalWindow&&tH(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"u">typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},iD=Array.prototype.slice;function iL(t,e,n,i){for(var r,o=e.length,a=0;a<o;a++)t[a]=(r=e[a],(n[a]-r)*i+r);return t}function iO(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=e[o]+n[o]*i;return t}function iP(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function iR(t){if(tO(t)){var e=t.length;if(tO(t[0])){for(var n=[],i=0;i<e;i++)n.push(iD.call(t[i]));return n}return iD.call(t)}return t}function iN(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function iE(t){return 4===t||5===t}function iB(t){return 1===t||2===t}var iz=[0,0,0,0],iV=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(tO(e)){var l=tO(e&&e[0])?2:1;a=l,(1!==l||tj(e[0]))&&(2!==l||tj(e[0][0]))||(o=!0)}else if(tj(e)&&e==e)a=0;else if(tG(e))if(isNaN(+e)){var h=ir(e);h&&(s=h,a=3)}else a=0;else if(tK(e)){var u=tI({},s);u.colorStops=tR(e.colorStops,function(t){return{offset:t.offset,color:ir(t.color)}}),iS(e)?a=4:iM(e)&&(a=5),s=u}0===r?this.valType=a:(a!==this.valType||6===a)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=tH(n)?n:nA[n]||n$(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(t,e){return t.time-e.time});for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=iB(i),l=iE(i),h=0;h<r;h++){var u=n[h],c=u.value,d=o.value;u.percent=u.time/t,!a&&(s&&h!==r-1?function(t,e,n){if(t.push&&e.push){var i=t.length,r=e.length;if(i!==r)if(i>r)t.length=r;else for(var o=i;o<r;o++)t.push(1===n?e[o]:iD.call(e[o]));for(var a=t[0]&&t[0].length,o=0;o<t.length;o++)if(1===n)isNaN(t[o])&&(t[o]=e[o]);else for(var s=0;s<a;s++)isNaN(t[o][s])&&(t[o][s]=e[o][s])}}(c,d,i):l&&function(t,e){for(var n=t.length,i=e.length,r=n>i?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,i);s++)r.push({offset:a.offset,color:a.color.slice()})}(c.colorStops,d.colorStops))}if(!a&&5!==i&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var p=n[0].value,h=0;h<r;h++)0===i?n[h].additiveValue=n[h].value-p:3===i?n[h].additiveValue=iO([],n[h].value,p,-1):iB(i)&&(n[h].additiveValue=1===i?iO([],n[h].value,p,-1):iP([],n[h].value,p,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i,r,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,h=l.length,u=this.propName,c=3===s,d=this._lastFr,p=Math.min;if(1===h)i=r=l[0];else{if(e<0)n=0;else if(e<this._lastFrP){for(n=p(d+1,h-1);n>=0&&!(l[n].percent<=e);n--);n=p(n,h-2)}else{for(n=d;n<h&&!(l[n].percent>e);n++);n=p(n-1,h-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:p((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var m=o?this._additiveValue:c?iz:t[u];if((iB(s)||c)&&!m&&(m=this._additiveValue=[]),this.discrete)t[u]=g<1?i.rawValue:r.rawValue;else if(iB(s))1===s?iL(m,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s,l=0;l<o;l++)t[a][l]=(s=e[a][l],(n[a][l]-s)*i+s)}}(m,i[a],r[a],g);else if(iE(s)){var y,v,x,_,b,w=i[a],S=r[a],M=4===s;(t[u]={type:M?"linear":"radial",x:(y=w.x,(S.x-y)*g+y),y:(v=w.y,(S.y-v)*g+v),colorStops:tR(w.colorStops,function(t,e){var n,i=S.colorStops[e];return{offset:(n=t.offset,(i.offset-n)*g+n),color:iN(iL([],t.color,i.color,g))}}),global:S.global},M)?(t[u].x2=(x=w.x2,(S.x2-x)*g+x),t[u].y2=(_=w.y2,(S.y2-_)*g+_)):t[u].r=(b=w.r,(S.r-b)*g+b)}else if(c)iL(m,i[a],r[a],g),o||(t[u]=iN(m));else{var C,k=(C=i[a],(r[a]-C)*g+C);o?this._additiveValue=k:t[u]=k}o&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;0===e?t[n]=t[n]+i:3===e?(ir(t[n],iz),iO(iz,iz,i,1),t[n]=iN(iz)):1===e?iO(t[n],t[n],i,1):2===e&&iP(t[n],t[n],i,1)},t}(),iF=function(){function t(t,e,n,i){(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i)?tM("Can' use additive animation on looped animation."):(this._additiveAnimators=i,this._allowDiscrete=n)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,tz(e),n)},t.prototype.whenWithKeys=function(t,e,n,i){for(var r=this._tracks,o=0;o<n.length;o++){var a=n[o],s=r[a];if(!s){s=r[a]=new iV(a);var l=void 0,h=this._getAdditiveTrack(a);if(h){var u=h.keyframes,c=u[u.length-1];l=c&&c.value,3===h.valType&&l&&(l=iN(l))}else l=this._target[a];if(null==l)continue;t>0&&s.addKeyframe(0,iR(l),i),this._trackKeys.push(a)}s.addKeyframe(t,iR(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},t.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var r=n[i].getTrack(t);r&&(e=r)}return e},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r<this._trackKeys.length;r++){var o=this._trackKeys[r],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,h=l.length;if(a.prepare(i,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var u=l[h-1];u&&(e._target[a.propName]=u.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var c=new nJ({life:i,loop:this._loop,delay:this._delay||0,onframe:function(t){e._started=2;var i=e._additiveAnimators;if(i){for(var r=!1,o=0;o<i.length;o++)if(i[o]._clip){r=!0;break}r||(e._additiveAnimators=null)}for(var o=0;o<n.length;o++)n[o].step(e._target,t);var a=e._onframeCbs;if(a)for(var o=0;o<a.length;o++)a[o](e._target,t)},ondestroy:function(){e._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),t&&c.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return tR(this._trackKeys,function(e){return t._tracks[e]})},t.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,r=0;r<t.length;r++){var o=n[t[r]];o&&!o.isFinished()&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}for(var a=!0,r=0;r<i.length;r++)if(!n[i[r]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(t,e,n){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var r=e[i],o=this._tracks[r];if(!(!o||o.isFinished())){var a=o.keyframes,s=a[n?0:a.length-1];s&&(t[r]=iR(s.rawValue))}}}},t.prototype.__changeFinalValue=function(t,e){e=e||tz(t);for(var n=0;n<e.length;n++){var i=e[n],r=this._tracks[i];if(r){var o=r.keyframes;if(o.length>1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function iW(){return new Date().getTime()}var iH=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(e=e||{}).stage||{},n}return to(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=iW()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)&&(i.ondestroy(),this.removeClip(i)),i=r}this._time=e,!t&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,g(function e(){t._running&&(g(e),t._paused||t.update())})},e.prototype.start=function(){this._running||(this._time=iW(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=iW(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=iW()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new iF(t,e.loop);return this.addAnimator(n),n},e}(eS),iG=ts.domSupported,iU=(a={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},s=tR(o=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],function(t){var e=t.replace("mouse","pointer");return a.hasOwnProperty(e)?e:t}),{mouse:o,touch:["touchstart","touchend","touchmove"],pointer:s}),ij=["mousemove","mouseup"],iY=["pointermove","pointerup"],iX=!1;function iZ(t){var e=t.pointerType;return"pen"===e||"touch"===e}function iq(t){t&&(t.zrByTouch=!0)}function iK(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var i$=function(t,e){this.stopPropagation=ei,this.stopImmediatePropagation=ei,this.preventDefault=ei,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},iJ={mousedown:function(t){t=eF(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=eF(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=eF(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){iK(this,(t=eF(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){iX=!0,t=eF(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){iX||(t=eF(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){iq(t=eF(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),iJ.mousemove.call(this,t),iJ.mousedown.call(this,t)},touchmove:function(t){iq(t=eF(this.dom,t)),this.handler.processGesture(t,"change"),iJ.mousemove.call(this,t)},touchend:function(t){iq(t=eF(this.dom,t)),this.handler.processGesture(t,"end"),iJ.mouseup.call(this,t),new Date-this.__lastTouchMoment<300&&iJ.click.call(this,t)},pointerdown:function(t){iJ.mousedown.call(this,t)},pointermove:function(t){iZ(t)||iJ.mousemove.call(this,t)},pointerup:function(t){iJ.mouseup.call(this,t)},pointerout:function(t){iZ(t)||iJ.mouseout.call(this,t)}};tP(["click","dblclick","contextmenu"],function(t){iJ[t]=function(e){e=eF(this.dom,e),this.trigger(t,e)}});var iQ={pointermove:function(t){iZ(t)||iQ.mousemove.call(this,t)},pointerup:function(t){iQ.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function i0(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,eW(t.domTarget,e,n,i)}function i1(t){var e,n,i,r=t.mounted;for(var o in r)r.hasOwnProperty(o)&&(e=t.domTarget,n=r[o],i=t.listenerOpts[o],e.removeEventListener(o,n,i));t.mounted={}}var i2=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},i5=function(t){function e(e,n){var i,r,o=t.call(this)||this;return o.__pointerCapturing=!1,o.dom=e,o.painterRoot=n,o._localHandlerScope=new i2(e,iJ),iG&&(o._globalHandlerScope=new i2(document,iQ)),r=(i=o._localHandlerScope).domHandlers,ts.pointerEventsSupported?tP(iU.pointer,function(t){i0(i,t,function(e){r[t].call(o,e)})}):(ts.touchEventsSupported&&tP(iU.touch,function(t){i0(i,t,function(e){r[t].call(o,e),i.touching=!0,null!=i.touchTimer&&(clearTimeout(i.touchTimer),i.touchTimer=null),i.touchTimer=setTimeout(function(){i.touching=!1,i.touchTimer=null},700)})}),tP(iU.mouse,function(t){i0(i,t,function(e){e=eV(e),i.touching||r[t].call(o,e)})})),o}return to(e,t),e.prototype.dispose=function(){i1(this._localHandlerScope),iG&&i1(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,iG&&this.__pointerCapturing^t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){ts.pointerEventsSupported?tP(iY,n):ts.touchEventsSupported||tP(ij,n);function n(n){i0(e,n,function(i){if(!iK(t,(i=eV(i)).target)){var r;r=i,i=eF(t.dom,new i$(t,r),!0),e.domHandlers[n].call(t,i)}},{capture:!0})}}(this,e):i1(e)}},e}(eS),i3=1;ts.hasGlobalWindow&&(i3=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var i4=i3,i8="#333",i6="#ccc";function i9(t){return t>5e-5||t<-5e-5}var i7=[],rt=[],re=eX(),rn=Math.abs,ri=function(){var t;function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return i9(this.rotation)||i9(this.x)||i9(this.y)||i9(this.scaleX-1)||i9(this.scaleY-1)||i9(this.skewX)||i9(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(eZ(n),this.invTransform=null);return}n=n||eX(),e?this.getLocalTransform(n):eZ(n),t&&(e?eK(n,t,n):eq(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(i7);var n=i7[0]<0?-1:1,i=i7[1]<0?-1:1,r=((i7[0]-n)*e+n)/i7[0]||0,o=((i7[1]-i)*e+i)/i7[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||eX(),e0(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||eX(),eK(rt,t.invTransform,e),e=rt);var n=this.originX,i=this.originY;(n||i)&&(re[4]=n,re[5]=i,eK(rt,e,re),rt[4]-=n,rt[5]-=i,e=rt),this.setLocalTransform(e)}},e.prototype.getGlobalScale=function(t){var e=this.transform;return(t=t||[],e)?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},e.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ev(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ev(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&rn(t[0]-1)>1e-10&&rn(t[3]-1)>1e-10?Math.sqrt(rn(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){ro(this,t)},e.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,h=t.x,u=t.y,c=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var p=n+a,f=i+s;e[4]=-p*r-c*f*o,e[5]=-f*o-d*p*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=d*r,e[2]=c*o,l&&eJ(e,e,l),e[4]+=n+h,e[5]+=i+u,e},e.initDefaultProps=void((t=e.prototype).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}(),rr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ro(t,e){for(var n=0;n<rr.length;n++){var i=rr[n];t[i]=e[i]}}function ra(t){m||(m=new n1(100)),t=t||th;var e=m.get(t);return e||(e={font:t,strWidthCache:new n1(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:tc.measureText("国",t).width,asciiCharWidth:tc.measureText("a",t).width},m.put(t,e)),e}var rs=0;function rl(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=function(t){if(!(rs>=5)){t=t||th;for(var e=[],n=+new Date,i=0;i<=127;i++)e[i]=tc.measureText(String.fromCharCode(i),t).width;var r=new Date-n;return r>16?rs=5:r>2&&rs++,e}}(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?null!=t.asciiWidthMap?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function rh(t,e){var n=t.strWidthCache,i=n.get(e);return null==i&&(i=tc.measureText(e,t.font).width,n.put(e,i)),i}function ru(t,e,n,i){var r=rh(ra(e),t),o=rf(e);return new nu(rd(0,r,n),rp(0,o,i),r,o)}function rc(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return ru(r[0],e,n,i);for(var o=new nu(0,0,0,0),a=0;a<r.length;a++){var s=ru(r[a],e,n,i);0===a?o.copy(s):o.union(s)}return o}function rd(t,e,n,i){return"right"===n?i?t+=e:t-=e:"center"===n&&(i?t+=e/2:t-=e/2),t}function rp(t,e,n,i){return"middle"===n?i?t+=e/2:t-=e/2:"bottom"===n&&(i?t+=e:t-=e),t}function rf(t){return ra(t).stWideCharWidth}function rg(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function rm(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,h=n.y,u="left",c="top";if(i instanceof Array)l+=rg(i[0],n.width),h+=rg(i[1],n.height),u=null,c=null;else switch(i){case"left":l-=r,h+=s,u="right",c="middle";break;case"right":l+=r+a,h+=s,c="middle";break;case"top":l+=a/2,h-=r,u="center",c="bottom";break;case"bottom":l+=a/2,h+=o+r,u="center";break;case"inside":l+=a/2,h+=s,u="center",c="middle";break;case"insideLeft":l+=r,h+=s,c="middle";break;case"insideRight":l+=a-r,h+=s,u="right",c="middle";break;case"insideTop":l+=a/2,h+=r,u="center";break;case"insideBottom":l+=a/2,h+=o-r,u="center",c="bottom";break;case"insideTopLeft":l+=r,h+=r;break;case"insideTopRight":l+=a-r,h+=r,u="right";break;case"insideBottomLeft":l+=r,h+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,h+=o-r,u="right",c="bottom"}return(t=t||{}).x=l,t.y=h,t.align=u,t.verticalAlign=c,t}var ry="__zr_normal__",rv=rr.concat(["ignore"]),rx=tN(rr,function(t,e){return t[e]=!0,t},{ignore:!1}),r_={},rb=new nu(0,0,0,0),rw=[],rS=function(){function t(t){this.id=tS++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;r.copyTransform(e);var h=null!=n.position,u=n.autoOverflowArea,c=void 0;if((u||h)&&(c=rb,n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform)),h){this.calculateTextPosition?this.calculateTextPosition(r_,n,c):rm(r_,n,c),r.x=r_.x,r.y=r_.y,o=r_.align,a=r_.verticalAlign;var d=n.origin;if(d&&null!=n.rotation){var p=void 0,f=void 0;"center"===d?(p=.5*c.width,f=.5*c.height):(p=rg(d[0],c.width),f=rg(d[1],c.height)),l=!0,r.originX=-r.x+p+(i?0:c.x),r.originY=-r.y+f+(i?0:c.y)}}null!=n.rotation&&(r.rotation=n.rotation);var g=n.offset;g&&(r.x+=g[0],r.y+=g[1],l||(r.originX=-g[0],r.originY=-g[1]));var m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(u){var y=m.overflowRect=m.overflowRect||new nu(0,0,0,0);r.getLocalTransform(rw),e0(rw,rw),nu.copy(y,c),y.applyTransform(rw)}else m.overflowRect=null;var v=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,x=void 0,_=void 0,b=void 0;v&&this.canBeInsideText()?(x=n.insideFill,_=n.insideStroke,(null==x||"auto"===x)&&(x=this.getInsideTextFill()),(null==_||"auto"===_)&&(_=this.getInsideTextStroke(x),b=!0)):(x=n.outsideFill,_=n.outsideStroke,(null==x||"auto"===x)&&(x=this.getOutsideFill()),(null==_||"auto"===_)&&(_=this.getOutsideStroke(x),b=!0)),((x=x||"#000")!==m.fill||_!==m.stroke||b!==m.autoStroke||o!==m.align||a!==m.verticalAlign)&&(s=!0,m.fill=x,m.stroke=_,m.autoStroke=b,m.align=o,m.verticalAlign=a,e.setDefaultTextStyle(m)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?i6:i8},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&ir(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+255*!r*(1-i);return n[3]=1,iu(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},tI(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(tY(t))for(var n=tz(t),i=0;i<n.length;i++){var r=n[i];this.attrKV(r,t[r])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],r=i.__fromStateTransition;if(!i.getLoop()&&(!r||r===ry)){var o=i.targetName,a=o?e[o]:e;i.saveTo(a)}}},t.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,rv)},t.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null==t[r]||r in e||(e[r]=this[r])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(ry,!1,t)},t.prototype.useState=function(t,e,n,i){var r,o=t===ry;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(tD(a,t)>=0)||!e&&1!==a.length){if(this.stateProxy&&!o&&(r=this.stateProxy(t)),r||(r=this.states&&this.states[t]),!r&&!o)return void tM("State "+t+" not exists.");o||this.saveCurrentToNormalState(r);var l=!!(r&&r.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,r,this._normalState,e,!n&&!this.__inHover&&s&&s.duration>0,s);var h=this._textContent,u=this._textGuide;return h&&h.useState(t,e,n,l),u&&u.useState(t,e,n,l),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),r}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a){for(var s=0;s<o;s++)if(t[s]!==r[s]){a=!1;break}}if(!a){for(var s=0;s<o;s++){var l=t[s],h=void 0;this.stateProxy&&(h=this.stateProxy(l,t)),h||(h=this.states[l]),h&&i.push(h)}var u=i[o-1],c=!!(u&&u.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},t.prototype.removeState=function(t){var e=tD(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=tD(i,t),o=tD(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var r=t[i];tI(n,r),r.textConfig&&tI(e=e||{},r.textConfig)}return e&&(n.textConfig=e),n},t.prototype._applyStateObj=function(t,e,n,i,r,o){var a=!(e&&i);e&&e.textConfig?(this.textConfig=tI({},i?this.textConfig:n.textConfig),tI(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,h=0;h<rv.length;h++){var u=rv[h],c=r&&rx[u];e&&null!=e[u]?c?(l=!0,s[u]=e[u]):this[u]=e[u]:a&&null!=n[u]&&(c?(l=!0,s[u]=n[u]):this[u]=n[u])}if(!r)for(var h=0;h<this.animators.length;h++){var d=this.animators[h],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(e||n)[p]:e||n)}l&&this._transitionState(t,s,o)},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new ri,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),tI(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,e,n){var i=new iF(t?this[t]:this,e,n);return t&&(i.targetName=t),this.addAnimator(i,t),i},t.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(e)}).done(function(){var e=i.animators,n=tD(e,t);n>=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o<i;o++){var a=n[o];t&&t!==a.scope?r.push(a):a.stop(e)}return this.animators=r,this},t.prototype.animateTo=function(t,e,n){rM(this,t,e,n)},t.prototype.animateFrom=function(t,e,n){rM(this,t,e,n,!0)},t.prototype._transitionState=function(t,e,n,i){for(var r=rM(this,e,n,i),o=0;o<r.length;o++)r[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;function n(t,n,i,r){Object.defineProperty(e,t,{get:function(){return this[n]||o(this,this[n]=[]),this[n]},set:function(t){this[i]=t[0],this[r]=t[1],this[n]=t,o(this,t)}});function o(t,e){Object.defineProperty(e,0,{get:function(){return t[i]},set:function(e){t[i]=e}}),Object.defineProperty(e,1,{get:function(){return t[r]},set:function(e){t[r]=e}})}}e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),t}();function rM(t,e,n,i,r){var o=[];!function t(e,n,i,r,o,a,s,l){for(var h=tz(r),u=o.duration,c=o.delay,d=o.additive,p=o.setToFinal,f=!tY(a),g=e.animators,m=[],y=0;y<h.length;y++){var v=h[y],x=r[v];if(null!=x&&null!=i[v]&&(f||a[v]))if(!tY(x)||tO(x)||tK(x))m.push(v);else{if(n){l||(i[v]=x,e.updateDuringAnimation(n));continue}t(e,v,i[v],x,o,a&&a[v],s,l)}else l||(i[v]=x,e.updateDuringAnimation(n),m.push(v))}var _=m.length;if(!d&&_)for(var b=0;b<g.length;b++){var w=g[b];if(w.targetName===n&&w.stopTracks(m)){var S=tD(g,w);g.splice(S,1)}}if(o.force||(_=(m=tE(m,function(t){var e,n;return!((e=r[t])===(n=i[t])||tO(e)&&tO(n)&&function(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}(e,n))})).length),_>0||o.force&&!s.length){var M=void 0,C=void 0,k=void 0;if(l){C={},p&&(M={});for(var b=0;b<_;b++){var v=m[b];C[v]=i[v],p?M[v]=r[v]:i[v]=r[v]}}else if(p){k={};for(var b=0;b<_;b++){var v=m[b];k[v]=iR(i[v]),function(t,e,n){if(tO(e[n]))if(tO(t[n])||(t[n]=[]),tZ(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),rC(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(tO(r[0]))for(var s=r[0].length,l=0;l<a;l++)o[l]?rC(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else rC(o,r,a);o.length=r.length}else t[n]=e[n]}(i,r,v)}}var w=new iF(i,!1,!1,d?tE(g,function(t){return t.targetName===n}):null);w.targetName=n,o.scope&&(w.scope=o.scope),p&&M&&w.whenWithKeys(0,M,m),k&&w.whenWithKeys(0,k,m),w.whenWithKeys(null==u?500:u,l?C:r,m).delay(c||0),e.addAnimator(w,n),s.push(w)}}(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,h=n.aborted,u=function(){s=!0,--a<=0&&(s?l&&l():h&&h())},c=function(){--a<=0&&(s?l&&l():h&&h())};!a&&l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var d=0;d<o.length;d++){var p=o[d];u&&p.done(u),c&&p.aborted(c),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function rC(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}tL(rS,eS),tL(rS,ri);var rk=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return to(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=tD(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=tD(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},e.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],r=t.call(e,i);i.isGroup&&!r&&i.traverse(t,e)}return this},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(e)},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(e)},e.prototype.getBoundingRect=function(t){for(var e=new nu(0,0,0,0),n=t||this._children,i=[],r=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(i);l?(nu.applyTransform(e,s,l),(r=r||e.clone()).union(e)):(r=r||s.clone()).union(s)}}return r||e},e}(rS);rk.prototype.type="group";var rT=rk,rI={},rA={},rD=function(){function t(t,e,n){var i,r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var o=new nI,a=n.renderer||"canvas";rI[a]||(a=tz(rI)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new rI[a](e,o,n,t),l=n.ssr||s.ssrOnly;this.storage=o,this.painter=s;var h=ts.node||ts.worker||l?null:new i5(s.getViewportRoot(),s.root),u=n.useCoarsePointer;(null==u||"auto"===u?ts.touchEventsSupported:!!u)&&(i=tJ(n.pointerSize,44)),this.handler=new ny(o,s,h,s.root,i),this.animation=new iH({stage:{update:l?null:function(){return r._flush(!0)}}}),l||this.animation.start()}return t.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},t.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return .4>ic(t,1);if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r<i;r++)n+=ic(e[r].color,1);return(n/=i)<.4}return!1}(t))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(t){var e,n=iW();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=iW();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){!this._disposed&&(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof rT&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){if(!this._disposed){var t;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,t=this.id,delete rA[t]}},t}();function rL(t,e){var n=new rD(tS++,t,e);return rA[n.id]=n,n}var rO=Math.min,rP=Math.max,rR=Math.abs;function rN(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,h=s-a;if(0===l)return 0===h?a:(a+s)/2;if(i){if(l>0){if(t<=r)return a;else if(t>=o)return s}else if(t>=r)return a;else if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*h+a}var rE=function(t,e,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return rB(t,e,n)};function rB(t,e,n){return tG(t)?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e+(n||0):parseFloat(t):null==t?NaN:+t}function rz(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function rV(t){return t.sort(function(t,e){return t-e}),t}function rF(t){if(isNaN(t*=1))return 0;if(t>1e-14){for(var e,n,i,r,o,a=1,s=0;s<15;s++,a*=10)if(Math.round(t*a)/a===t)return s}return i=(n=(e=t.toString().toLowerCase()).indexOf("e"))>0?+e.slice(n+1):0,r=n>0?n:e.length,Math.max(0,((o=e.indexOf("."))<0?0:r-1-o)-i)}function rW(t,e){var n=Math.log,i=Math.LN10,r=Math.min(Math.max(-Math.floor(n(t[1]-t[0])/i)+Math.round(n(rR(e[1]-e[0]))/i),0),20);return isFinite(r)?r:20}function rH(t){var e=2*Math.PI;return(t%e+e)%e}function rG(t){return t>-1e-4&&t<1e-4}var rU=/^(?:(\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 rj(t){if(t instanceof Date)return t;if(tG(t)){var e=rU.exec(t);if(!e)return new Date(NaN);if(!e[8])return new Date(+e[1],(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0);var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return null==t?new Date(NaN):new Date(Math.round(t))}function rY(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function rX(t,e){var n=rY(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function rZ(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function rq(t){t.sort(function(t,e){return!function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?1:-1});for(var e=-1/0,n=1,i=0;i<t.length;){for(var r=t[i].interval,o=t[i].close,a=0;a<2;a++)r[a]<=e&&(r[a]=e,o[a]=a?1:1-n),e=r[a],n=o[a];r[0]===r[1]&&o[0]*o[1]!=1?t.splice(i,1):i++}return t}function rK(t){var e=parseFloat(t);return e==t&&(0!==e||!tG(t)||0>=t.indexOf("x"))?e:NaN}function r$(t){return!isNaN(rK(t))}function rJ(){return Math.round(9*Math.random())}function rQ(t,e){return null==t?e:null==e?t:t*e/function t(e,n){return 0===n?e:t(n,e%n)}(t,e)}var r0="series\0",r1="\0_ec_\0";function r2(t){return t instanceof Array?t:null==t?[]:[t]}function r5(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}var r3=["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 r4(t){return!tY(t)||tW(t)||t instanceof Date?t:t.value}function r8(t,e,n){var i,r,o,a,s,l,h,u,c,d,p,f,g="normalMerge"===n,m="replaceMerge"===n,y="replaceAll"===n;t=t||[],e=(e||[]).slice();var v=t9();tP(e,function(t,n){if(!tY(t)){e[n]=null;return}});var x=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;r<t.length;r++){var o=t[r];o&&null!=o.id&&e.set(o.id,r),i.push({existing:"replaceMerge"===n||oe(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(t,v,n);return(g||m)&&(i=x,r=t,o=v,tP(a=e,function(t,e){if(t&&null!=t.id){var n=r9(t.id),s=o.get(n);if(null!=s){var l=i[s];t2(!l.newOption,'Duplicated option on id "'+n+'".'),l.newOption=t,l.existing=r[s],a[e]=null}}})),g&&(s=x,tP(l=e,function(t,e){if(t&&null!=t.name)for(var n=0;n<s.length;n++){var i=s[n].existing;if(!s[n].newOption&&i&&(null==i.id||null==t.id)&&!oe(t)&&!oe(i)&&r6("name",i,t)){s[n].newOption=t,l[e]=null;return}}})),g||m?(h=x,u=e,c=m,tP(u,function(t){if(t){for(var e,n=0;(e=h[n])&&(e.newOption||oe(e.existing)||e.existing&&null!=t.id&&!r6("id",t,e.existing));)n++;e?(e.newOption=t,e.brandNew=c):h.push({newOption:t,brandNew:c,existing:null,keyInfo:null}),n++}})):y&&(d=x,tP(e,function(t){d.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})),p=x,f=t9(),tP(p,function(t){var e=t.existing;e&&f.set(e.id,t)}),tP(p,function(t){var e=t.newOption;t2(!e||null==e.id||!f.get(e.id)||f.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&f.set(e.id,t),t.keyInfo||(t.keyInfo={})}),tP(p,function(t,e){var n=t.existing,i=t.newOption,r=t.keyInfo;if(tY(i)){if(r.name=null!=i.name?r9(i.name):n?n.name:r0+e,n)r.id=r9(n.id);else if(null!=i.id)r.id=r9(i.id);else{var o=0;do r.id="\0"+r.name+"\0"+o++;while(f.get(r.id))}f.set(r.id,t)}}),x}function r6(t,e,n){var i=r7(e[t],null),r=r7(n[t],null);return null!=i&&null!=r&&i===r}function r9(t){return r7(t,"")}function r7(t,e){return null==t?e:tG(t)?t:tj(t)||tU(t)?t+"":e}function ot(t){var e=t.name;return!!(e&&e.indexOf(r0))}function oe(t){return t&&null!=t.id&&0===r9(t.id).indexOf(r1)}function on(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?tW(e.dataIndex)?tR(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?tW(e.name)?tR(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function oi(){var t="__ec_inner_"+or++;return function(e){return e[t]||(e[t]={})}}var or=rJ();function oo(t,e,n){var i=oa(e,n),r=i.mainTypeSpecified,o=i.queryOptionMap,a=i.others,s=n?n.defaultMainType:null;return!r&&s&&o.set(s,{}),o.each(function(e,i){var r=oh(t,i,e,{useDefault:s===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[i+"Models"]=r.models,a[i+"Model"]=r.models[0]}),a}function oa(t,e){if(tG(t)){var n,i={};i[t+"Index"]=0,n=i}else n=t;var r=t9(),o={},a=!1;return tP(n,function(t,n){if("dataIndex"===n||"dataIndexInside"===n){o[n]=t;return}var i=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=i[1],l=(i[2]||"").toLowerCase();!s||!l||e&&e.includeMainTypes&&0>tD(e.includeMainTypes,s)||(a=a||!!s,(r.get(s)||r.set(s,{}))[l]=t)}),{mainTypeSpecified:a,queryOptionMap:r,others:o}}var os={useDefault:!0,enableAll:!1,enableNone:!1},ol={useDefault:!1,enableAll:!0,enableNone:!0};function oh(t,e,n,i){i=i||os;var r=n.index,o=n.id,a=n.name,s={models:null,specified:null!=r||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=t.getComponent(e))?[l]:[],s}if("none"===r||!1===r)if(i.enableNone)return s.models=[],s;else r=-1;return"all"===r&&(r=i.enableAll?o=a=null:-1),s.models=t.queryComponents({mainType:e,index:r,id:o,name:a}),s}function ou(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function oc(t,e){var n=t9(),i=[];return tP(t,function(t){var r=e(t);(n.get(r)||(i.push(r),n.set(r,[]))).push(t)}),{keys:i,buckets:n}}function od(t,e,n,i,r){var o=null==e||"auto"===e;if(null==i)return i;if(tj(i)){var a,s=(i-(a=n||0))*r+a;return rz(s,o?Math.max(rF(n||0),rF(i)):e)}if(tG(i))return r<1?n:i;for(var l=[],h=Math.max(n?n.length:0,i.length),u=0;u<h;++u){var c=t.getDimensionInfo(u);if(c&&"ordinal"===c.type)l[u]=(r<1&&n?n:i)[u];else{var d=n&&n[u]?n[u]:0,p=i[u],s=(p-d)*r+d;l[u]=rz(s,o?Math.max(rF(d),rF(p)):e)}}return l}var op=function(){function t(){}return t.prototype.reset=function(t,e,n,i){return this._list=t,this._step=i=i||1,this._idx=e,this._end=null!=n?n:i>0?t.length:0,this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0)},t}();function of(t){t.option=t.parentModel=t.ecModel=null}var og="___EC__COMPONENT__CONTAINER___",om="___EC__EXTENDED_CLASS___";function oy(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function ov(t,e){t.$constructor=t,t.extend=function(t){var e,n,i=this;if(tH(e=i)&&/^class\s/.test(Function.prototype.toString.call(e)))n=function(t){function e(){return t.apply(this,arguments)||this}return to(e,t),e}(i);else{var r=n=function(){(t.$constructor||i).apply(this,arguments)},o=r.prototype;function a(){}for(var s in a.prototype=this.prototype,r.prototype=new a,o)o.hasOwnProperty(s)&&(r.prototype[s]=o[s]);r.prototype.constructor=r,r.superClass=this}return tI(n.prototype,t),n[om]=!0,n.extend=this.extend,n.superCall=ob,n.superApply=ow,n.superClass=i,n}}function ox(t,e){t.extend=e.extend}var o_=Math.round(10*Math.random());function ob(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function ow(t,e,n){return this.superClass.prototype[e].apply(t,n)}function oS(t){var e={};t.registerClass=function(t){var n=t.type||t.prototype.type;if(n){t2(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),t.prototype.type=n;var i,r,o=oy(n);o.sub?o.sub!==og&&(((r=e[(i=o).main])&&r[og]||((r=e[i.main]={})[og]=!0),r)[o.sub]=t):e[o.main]=t}return t},t.getClass=function(t,n,i){var r=e[t];if(r&&r[og]&&(r=n?r[n]:null),i&&!r)throw Error(n?"Component "+t+"."+(n||"")+" is used but not imported.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){var n=oy(t),i=[],r=e[n.main];return r&&r[og]?tP(r,function(t,e){e!==og&&i.push(t)}):i.push(r),i},t.hasClass=function(t){return!!e[oy(t).main]},t.getAllClassMainTypes=function(){var t=[];return tP(e,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){var n=e[oy(t).main];return n&&n[og]}}function oM(t,e){for(var n=0;n<t.length;n++)t[n][1]||(t[n][1]=t[n][0]);return e=e||!1,function(n,i,r){for(var o={},a=0;a<t.length;a++){var s=t[a][1];if(!(i&&tD(i,s)>=0||r&&0>tD(r,s))){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var oC=oM([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ok=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return oC(this,t,e)},t}(),oT=new n1(50);function oI(t,e,n,i,r){if(!t)return e;if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var o=oT.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?oD(e=o.image)||o.pending.push(a):((e=tc.loadImage(t,oA,oA)).__zrImageSrc=t,oT.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}function oA(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function oD(t){return t&&t.width&&t.height}var oL=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function oO(t,e,n,i){var r=tI({},i=i||{});n=tJ(n,"..."),r.maxIterations=tJ(i.maxIterations,2);var o=r.minChar=tJ(i.minChar,0),a=r.fontMeasureInfo=ra(e),s=a.asciiCharWidth;r.placeholder=tJ(i.placeholder,"");for(var l=t=Math.max(0,t-1),h=0;h<o&&l>=s;h++)l-=s;var u=rh(a,n);return u>l&&(n="",u=0),l=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=l,r.containerWidth=t,r}function oP(t,e,n){var i=n.containerWidth,r=n.contentWidth,o=n.fontMeasureInfo;if(!i){t.textLine="",t.isTruncated=!1;return}var a=rh(o,e);if(a<=i){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(a<=r||s>=n.maxIterations){e+=n.ellipsis;break}var l=0===s?function(t,e,n){for(var i=0,r=0,o=t.length;r<o&&i<e;r++)i+=rl(n,t.charCodeAt(r));return r}(e,r,o):a>0?Math.floor(e.length*r/a):0;a=rh(o,e=e.substr(0,l))}""===e&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}var oR=function(){},oN=function(t){this.tokens=[],t&&(this.tokens=t)},oE=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function oB(t,e,n,i,r){var o,a,s=""===e,l=r&&n.rich[r]||{},h=t.lines,u=l.font||n.font,c=!1;if(i){var d=l.padding,p=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var f=rg(l.width,i.width)+p;h.length>0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=oV(e,u,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}o||(o=e.split("\n"));for(var m=ra(u),y=0;y<o.length;y++){var v=o[y],x=new oR;if(x.styleName=r,x.text=v,x.isLineHolder=!v&&!s,"number"==typeof l.width?x.width=l.width:x.width=a?a[y]:rh(m,v),y||c)h.push(new oN([x]));else{var _=(h[h.length-1]||(h[0]=new oN)).tokens,b=_.length;1===b&&_[0].isLineHolder?_[0]=x:(v||!b||s)&&_.push(x)}}}var oz=tN(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function oV(t,e,n,i,r){for(var o=[],a=[],s="",l="",h=0,u=0,c=ra(e),d=0;d<t.length;d++){var p=t.charAt(d);if("\n"===p){l&&(s+=l,u+=h),o.push(s),a.push(u),s="",l="",h=0,u=0;continue}var f=rl(c,p.charCodeAt(0)),g=!i&&!function(t){var e;return(!((e=t.charCodeAt(0))>=32)||!(e<=591))&&(!(e>=880)||!(e<=4351))&&(!(e>=4608)||!(e<=5119))&&(!(e>=7680)||!(e<=8303))||!!oz[t]}(p);if(o.length?u+f>n:r+u+f>n){u?(s||l)&&(g?(s||(s=l,l="",u=h=0),o.push(s),a.push(u-h),l+=p,h+=f,s="",u=h):(l&&(s+=l,l="",h=0),o.push(s),a.push(u),s=p,u=f)):g?(o.push(l),a.push(h),l=p,h=f):(o.push(p),a.push(f));continue}u+=f,g?(l+=p,h+=f):(l&&(s+=l,l="",h=0),s+=p)}return l&&(s+=l),s&&(o.push(s),a.push(u)),1===o.length&&(u+=r),{accumWidth:u,lines:o,linesWidths:a}}function oF(t,e,n,i,r,o){if(t.baseX=n,t.baseY=i,t.outerWidth=t.outerHeight=null,e){var a=2*e.width,s=2*e.height;nu.set(oW,rd(n,a,r),rp(i,s,o),a,s),nu.intersect(e,oW,null,oH);var l=oH.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=rd(l.x,l.width,r,!0),t.baseY=rp(l.y,l.height,o,!0)}}var oW=new nu(0,0,0,0),oH={outIntersectRect:{},clamp:!0};function oG(t){return null!=t?t+="":t=""}function oU(t,e,n,i){var r=new nu(rd(t.x||0,e,t.textAlign),rp(t.y||0,n,t.textBaseline),e,n),o=null!=i?i:oj(t)?t.lineWidth:0;return o>0&&(r.x-=o/2,r.y-=o/2,r.width+=o,r.height+=o),r}function oj(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}var oY="__zr_style_"+Math.round(10*Math.random()),oX={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},oZ={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};oX[oY]=!0;var oq=["z","z2","invisible"],oK=["invisible"],o$=function(t){var e;function n(e){return t.call(this,e)||this}return to(n,t),n.prototype._init=function(e){for(var n=tz(e),i=0;i<n.length;i++){var r=n[i];"style"===r?this.useStyle(e[r]):t.prototype.attrKV.call(this,r,e[r])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(t,e,n,i){var r,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(r=this,o=t,a=e,oJ.copy(r.getBoundingRect()),r.transform&&oJ.applyTransform(r.transform),oQ.width=o,oQ.height=a,!oJ.intersect(oQ))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(i&&this.parent)for(var h=this.parent;h;){if(h.ignore)return!1;h=h.parent}return!0},n.prototype.contain=function(t,e){return this.rectContain(t,e)},n.prototype.traverse=function(t,e){t.call(e,this)},n.prototype.rectContain=function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},n.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var e=this.transform,n=this.getBoundingRect(),i=this.style,r=i.shadowBlur||0,o=i.shadowOffsetX||0,a=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new nu(0,0,0,0)),e?nu.applyTransform(t,n,e):t.copy(n),(r||o||a)&&(t.width+=2*r+Math.abs(o),t.height+=2*r+Math.abs(a),t.x=Math.min(t.x,t.x+o-r),t.y=Math.min(t.y,t.y+a-r));var s=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-s),t.y=Math.floor(t.y-s),t.width=Math.ceil(t.width+1+2*s),t.height=Math.ceil(t.height+1+2*s))}return t},n.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new nu(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(t){return this.animate("style",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(e,n){"style"!==e?t.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:tI(this.style,t),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(t){return et(oX,t)},n.prototype.useStyle=function(t){t[oY]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},n.prototype.isStyleObject=function(t){return t[oY]},n.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,oq)},n.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.style?o?r?s=n.style:(s=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),r?this.style:i.style),this._mergeStyle(s,n.style)):l&&(s=i.style),s)if(o){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var u=tz(h),c=0;c<u.length;c++){var d=u[c];d in s&&(s[d]=s[d],this.style[d]=h[d])}for(var p=tz(s),c=0;c<p.length;c++){var d=p[c];this.style[d]=this.style[d]}this._transitionState(e,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);for(var f=this.__inHover?oK:oq,c=0;c<f.length;c++){var d=f[c];n&&null!=n[d]?this[d]=n[d]:l&&null!=i[d]&&(this[d]=i[d])}},n.prototype._mergeStates=function(e){for(var n,i=t.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var o=e[r];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},n.prototype._mergeStyle=function(t,e){return tI(t,e),t},n.prototype.getAnimationStyleProps=function(){return oZ},n.initDefaultProps=void((e=n.prototype).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=3),n}(rS),oJ=new nu(0,0,0,0),oQ=new nu(0,0,0,0),o0=Math.min,o1=Math.max,o2=Math.sin,o5=Math.cos,o3=2*Math.PI,o4=eo(),o8=eo(),o6=eo();function o9(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],o=i[0],a=i[1],s=i[1],l=1;l<t.length;l++)r=o0(r,(i=t[l])[0]),o=o1(o,i[0]),a=o0(a,i[1]),s=o1(s,i[1]);e[0]=r,e[1]=a,n[0]=o,n[1]=s}}function o7(t,e,n,i,r,o){r[0]=o0(t,n),r[1]=o0(e,i),o[0]=o1(t,n),o[1]=o1(e,i)}var at=[],ae=[],an={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ai=[],ar=[],ao=[],aa=[],as=[],al=[],ah=Math.min,au=Math.max,ac=Math.cos,ad=Math.sin,ap=Math.abs,af=Math.PI,ag=2*af,am="u">typeof Float32Array,ay=[];function av(t){return Math.round(t/af*1e8)/1e8%2*af}function ax(t,e){var n=av(t[0]);n<0&&(n+=ag);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=ag?r=n+ag:e&&n-r>=ag?r=n-ag:!e&&n>r?r=n+(ag-av(n-r)):e&&n<r&&(r=n-(ag-av(r-n))),t[0]=n,t[1]=r}var a_=function(){var t;function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,e,n){(n=n||0)>0&&(this._ux=ap(n/i4/t)||0,this._uy=ap(n/i4/e)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(an.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},e.prototype.lineTo=function(t,e){var n=ap(t-this._xi),i=ap(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(an.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(an.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(an.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),ay[0]=i,ay[1]=r,ax(ay,o),i=ay[0];var a=(r=ay[1])-i;return this.addData(an.A,t,e,n,n,i,a,0,+!o),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=ac(r)*n+t,this._yi=ad(r)*n+e,this},e.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},e.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(an.R,t,e,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(an.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&am&&(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e}},e.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();var o=this.data;if(am&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var a=0;a<i;a++)this.data[a]=o[a];for(var r=0;r<e;r++)for(var s=t[r].data,a=0;a<s.length;a++)this.data[i++]=s[a];this._len=i}},e.prototype.addData=function(t,e,n,i,r,o,a,s,l){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var u=0;u<arguments.length;u++)h[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 t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,am&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){ao[0]=ao[1]=as[0]=as[1]=Number.MAX_VALUE,aa[0]=aa[1]=al[0]=al[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;t<this._len;){var a=e[t++],s=1===t;switch(s&&(n=e[t],i=e[t+1],r=n,o=i),a){case an.M:n=r=e[t++],i=o=e[t++],as[0]=r,as[1]=o,al[0]=r,al[1]=o;break;case an.L:o7(n,i,e[t],e[t+1],as,al),n=e[t++],i=e[t++];break;case an.C:!function(t,e,n,i,r,o,a,s,l,h){var u=nH(t,n,r,a,at);l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0;for(var c=0;c<u;c++){var d=nV(t,n,r,a,at[c]);l[0]=o0(d,l[0]),h[0]=o1(d,h[0])}u=nH(e,i,o,s,ae);for(var c=0;c<u;c++){var p=nV(e,i,o,s,ae[c]);l[1]=o0(p,l[1]),h[1]=o1(p,h[1])}l[0]=o0(t,l[0]),h[0]=o1(t,h[0]),l[0]=o0(a,l[0]),h[0]=o1(a,h[0]),l[1]=o0(e,l[1]),h[1]=o1(e,h[1]),l[1]=o0(s,l[1]),h[1]=o1(s,h[1])}(n,i,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],as,al),n=e[t++],i=e[t++];break;case an.Q:!function(t,e,n,i,r,o,a,s){var l=o1(o0(nX(t,n,r),1),0),h=o1(o0(nX(e,i,o),1),0),u=nj(t,n,r,l),c=nj(e,i,o,h);a[0]=o0(t,r,u),a[1]=o0(e,o,c),s[0]=o1(t,r,u),s[1]=o1(e,o,c)}(n,i,e[t++],e[t++],e[t],e[t+1],as,al),n=e[t++],i=e[t++];break;case an.A:var l=e[t++],h=e[t++],u=e[t++],c=e[t++],d=e[t++],p=e[t++]+d;t+=1;var f=!e[t++];s&&(r=ac(d)*u+l,o=ad(d)*c+h),function(t,e,n,i,r,o,a,s,l){var h=Math.abs(r-o);if(h%o3<1e-4&&h>1e-4){s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;return}if(o4[0]=o5(r)*n+t,o4[1]=o2(r)*i+e,o8[0]=o5(o)*n+t,o8[1]=o2(o)*i+e,ex(s,o4,o8),e_(l,o4,o8),(r%=o3)<0&&(r+=o3),(o%=o3)<0&&(o+=o3),r>o&&!a?o+=o3:r<o&&a&&(r+=o3),a){var u=o;o=r,r=u}for(var c=0;c<o;c+=Math.PI/2)c>r&&(o6[0]=o5(c)*n+t,o6[1]=o2(c)*i+e,ex(s,o6,s),e_(l,o6,l))}(l,h,u,c,d,p,f,as,al),n=ac(p)*u+l,i=ad(p)*c+h;break;case an.R:o7(r=n=e[t++],o=i=e[t++],r+e[t++],o+e[t++],as,al);break;case an.Z:n=r,i=o}ex(ao,ao,as),e_(aa,aa,al)}return 0===t&&(ao[0]=ao[1]=aa[0]=aa[1]=0),new nu(ao[0],ao[1],aa[0]-ao[0],aa[1]-ao[1])},e.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,r=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,h=0,u=0,c=0;c<e;){var d=t[c++],p=1===c;p&&(r=t[c],o=t[c+1],a=r,s=o);var f=-1;switch(d){case an.M:r=a=t[c++],o=s=t[c++];break;case an.L:var g=t[c++],m=t[c++],y=g-r,v=m-o;(ap(y)>n||ap(v)>i||c===e-1)&&(f=Math.sqrt(y*y+v*v),r=g,o=m);break;case an.C:var x=t[c++],_=t[c++],g=t[c++],m=t[c++],b=t[c++],w=t[c++];f=function(t,e,n,i,r,o,a,s){for(var l=t,h=e,u=0,c=1;c<=10;c++){var d=.1*c,p=nV(t,n,r,a,d),f=nV(e,i,o,s,d),g=p-l,m=f-h;u+=Math.sqrt(g*g+m*m),l=p,h=f}return u}(r,o,x,_,g,m,b,w),r=b,o=w;break;case an.Q:var x=t[c++],_=t[c++],g=t[c++],m=t[c++];f=function(t,e,n,i,r,o){for(var a=t,s=e,l=0,h=1;h<=10;h++){var u=.1*h,c=nj(t,n,r,u),d=nj(e,i,o,u),p=c-a,f=d-s;l+=Math.sqrt(p*p+f*f),a=c,s=d}return l}(r,o,x,_,g,m),r=g,o=m;break;case an.A:var S=t[c++],M=t[c++],C=t[c++],k=t[c++],T=t[c++],I=t[c++],A=I+T;c+=1,p&&(a=ac(T)*C+S,s=ad(T)*k+M),f=au(C,k)*ah(ag,Math.abs(I)),r=ac(A)*C+S,o=ad(A)*k+M;break;case an.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case an.Z:var y=a-r,v=s-o;f=Math.sqrt(y*y+v*v),r=a,o=s}f>=0&&(l[u++]=f,h+=f)}return this._pathLen=h,h},e.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,h,u,c,d=this.data,p=this._ux,f=this._uy,g=this._len,m=e<1,y=0,v=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,h=e*this._pathLen))r:for(var _=0;_<g;){var b=d[_++],w=1===_;switch(w&&(r=d[_],o=d[_+1],n=r,i=o),b!==an.L&&x>0&&(t.lineTo(u,c),x=0),b){case an.M:n=r=d[_++],i=o=d[_++],t.moveTo(r,o);break;case an.L:a=d[_++],s=d[_++];var S=ap(a-r),M=ap(s-o);if(S>p||M>f){if(m){var C=l[v++];if(y+C>h){var k=(h-y)/C;t.lineTo(r*(1-k)+a*k,o*(1-k)+s*k);break r}y+=C}t.lineTo(a,s),r=a,o=s,x=0}else{var T=S*S+M*M;T>x&&(u=a,c=s,x=T)}break;case an.C:var I=d[_++],A=d[_++],D=d[_++],L=d[_++],O=d[_++],P=d[_++];if(m){var C=l[v++];if(y+C>h){var k=(h-y)/C;nG(r,I,D,O,k,ai),nG(o,A,L,P,k,ar),t.bezierCurveTo(ai[1],ar[1],ai[2],ar[2],ai[3],ar[3]);break r}y+=C}t.bezierCurveTo(I,A,D,L,O,P),r=O,o=P;break;case an.Q:var I=d[_++],A=d[_++],D=d[_++],L=d[_++];if(m){var C=l[v++];if(y+C>h){var k=(h-y)/C;nZ(r,I,D,k,ai),nZ(o,A,L,k,ar),t.quadraticCurveTo(ai[1],ar[1],ai[2],ar[2]);break r}y+=C}t.quadraticCurveTo(I,A,D,L),r=D,o=L;break;case an.A:var R=d[_++],N=d[_++],E=d[_++],B=d[_++],z=d[_++],V=d[_++],F=d[_++],W=!d[_++],H=E>B?E:B,G=ap(E-B)>.001,U=z+V,j=!1;if(m){var C=l[v++];y+C>h&&(U=z+V*(h-y)/C,j=!0),y+=C}if(G&&t.ellipse?t.ellipse(R,N,E,B,F,z,U,W):t.arc(R,N,H,z,U,W),j)break r;w&&(n=ac(z)*E+R,i=ad(z)*B+N),r=ac(U)*E+R,o=ad(U)*B+N;break;case an.R:n=r=d[_],i=o=d[_+1],a=d[_++],s=d[_++];var Y=d[_++],X=d[_++];if(m){var C=l[v++];if(y+C>h){var Z=h-y;t.moveTo(a,s),t.lineTo(a+ah(Z,Y),s),(Z-=Y)>0&&t.lineTo(a+Y,s+ah(Z,X)),(Z-=X)>0&&t.lineTo(a+au(Y-Z,0),s+X),(Z-=Y)>0&&t.lineTo(a,s+au(X-Z,0));break r}y+=C}t.rect(a,s,Y,X);break;case an.Z:if(m){var C=l[v++];if(y+C>h){var k=(h-y)/C;t.lineTo(r*(1-k)+n*k,o*(1-k)+i*k);break r}y+=C}t.closePath(),r=n,o=i}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=an,e.initDefaultProps=void((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0),e}();function ab(t,e,n,i,r,o,a){if(0===r)return!1;var s=0,l=t;if(a>e+r&&a>i+r||a<e-r&&a<i-r||o>t+r&&o>n+r||o<t-r&&o<n-r)return!1;if(t===n)return Math.abs(o-t)<=r/2;s=(e-i)/(t-n);var h=s*o-a+(l=(t*i-n*e)/(t-n));return h*h/(s*s+1)<=r/2*r/2}function aw(t,e,n,i,r,o,a,s,l){return 0!==a&&(!(l>e+a)||!(l>i+a)||!(l>o+a))&&(!(l<e-a)||!(l<i-a)||!(l<o-a))&&(!(s>t+a)||!(s>n+a)||!(s>r+a))&&(!(s<t-a)||!(s<n-a)||!(s<r-a))&&nq(t,e,n,i,r,o,s,l,null)<=a/2}var aS=2*Math.PI;function aM(t){return(t%=aS)<0&&(t+=aS),t}var aC=2*Math.PI;function ak(t,e,n,i,r,o){if(o>e&&o>i||o<e&&o<i||i===e)return 0;var a=(o-e)/(i-e),s=i<e?1:-1;(1===a||0===a)&&(s=i<e?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}var aT=a_.CMD,aI=2*Math.PI,aA=[-1,-1,-1],aD=[-1,-1];function aL(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),h=0,u=0,c=0,d=0,p=0,f=0;f<l;){var g,m,y,v,x,_,b,w,S=s[f++],M=1===f;switch(S===aT.M&&f>1&&!n&&(h+=ak(u,c,d,p,i,r)),M&&(u=s[f],c=s[f+1],d=u,p=c),S){case aT.M:d=s[f++],p=s[f++],u=d,c=p;break;case aT.L:if(n){if(ab(u,c,s[f],s[f+1],e,i,r))return!0}else h+=ak(u,c,s[f],s[f+1],i,r)||0;u=s[f++],c=s[f++];break;case aT.C:if(n){if(g=u,m=c,y=s[f++],v=s[f++],x=s[f++],_=s[f++],b=s[f],w=s[f+1],0!==e&&(!(r>m+e)||!(r>v+e)||!(r>_+e)||!(r>w+e))&&(!(r<m-e)||!(r<v-e)||!(r<_-e)||!(r<w-e))&&(!(i>g+e)||!(i>y+e)||!(i>x+e)||!(i>b+e))&&(!(i<g-e)||!(i<y-e)||!(i<x-e)||!(i<b-e))&&nU(g,m,y,v,x,_,b,w,i,r,null)<=e/2)return!0}else h+=function(t,e,n,i,r,o,a,s,l,h){if(h>e&&h>i&&h>o&&h>s||h<e&&h<i&&h<o&&h<s)return 0;var u=nW(e,i,o,s,h,aA);if(0===u)return 0;for(var c=0,d=-1,p=void 0,f=void 0,g=0;g<u;g++){var m=aA[g],y=0===m||1===m?.5:1;nV(t,n,r,a,m)<l||(d<0&&(d=nH(e,i,o,s,aD),aD[1]<aD[0]&&d>1&&function(){var t=aD[0];aD[0]=aD[1],aD[1]=t}(),p=nV(e,i,o,s,aD[0]),d>1&&(f=nV(e,i,o,s,aD[1]))),2===d?m<aD[0]?c+=p<e?y:-y:m<aD[1]?c+=f<p?y:-y:c+=s<f?y:-y:m<aD[0]?c+=p<e?y:-y:c+=s<p?y:-y)}return c}(u,c,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],i,r)||0;u=s[f++],c=s[f++];break;case aT.Q:if(n){if(aw(u,c,s[f++],s[f++],s[f],s[f+1],e,i,r))return!0}else h+=function(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||s<e&&s<i&&s<o)return 0;var l=function(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(nB(o)){if(nz(a)){var h=-s/a;h>=0&&h<=1&&(r[l++]=h)}}else{var u=a*a-4*o*s;if(nB(u)){var h=-a/(2*o);h>=0&&h<=1&&(r[l++]=h)}else if(u>0){var c=nL(u),h=(-a+c)/(2*o),d=(-a-c)/(2*o);h>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,i,o,s,aA);if(0===l)return 0;var h=nX(e,i,o);if(h>=0&&h<=1){for(var u=0,c=nj(e,i,o,h),d=0;d<l;d++){var p=0===aA[d]||1===aA[d]?.5:1,f=nj(t,n,r,aA[d]);f<a||(aA[d]<h?u+=c<e?p:-p:u+=o<c?p:-p)}return u}var p=0===aA[0]||1===aA[0]?.5:1,f=nj(t,n,r,aA[0]);return f<a?0:o<e?p:-p}(u,c,s[f++],s[f++],s[f],s[f+1],i,r)||0;u=s[f++],c=s[f++];break;case aT.A:var C=s[f++],k=s[f++],T=s[f++],I=s[f++],A=s[f++],D=s[f++];f+=1;var L=!!(1-s[f++]);o=Math.cos(A)*T+C,a=Math.sin(A)*I+k,M?(d=o,p=a):h+=ak(u,c,o,a,i,r);var O=(i-C)*I/T+C;if(n){if(function(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var h=Math.sqrt((s-=t)*s+(l-=e)*l);if(h-a>n||h+a<n)return!1;if(Math.abs(i-r)%aC<1e-4)return!0;if(o){var u=i;i=aM(r),r=aM(u)}else i=aM(i),r=aM(r);i>r&&(r+=aC);var c=Math.atan2(l,s);return c<0&&(c+=aC),c>=i&&c<=r||c+aC>=i&&c+aC<=r}(C,k,I,A,A+D,L,e,O,r))return!0}else h+=function(t,e,n,i,r,o,a,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);aA[0]=-l,aA[1]=l;var h=Math.abs(i-r);if(h<1e-4)return 0;if(h>=aI-1e-4){i=0,r=aI;var u=o?1:-1;return a>=aA[0]+t&&a<=aA[1]+t?u:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=aI,r+=aI);for(var d=0,p=0;p<2;p++){var f=aA[p];if(f+t>a){var g=Math.atan2(s,f),u=o?1:-1;g<0&&(g=aI+g),(g>=i&&g<=r||g+aI>=i&&g+aI<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),d+=u)}}return d}(C,k,I,A,A+D,L,O,r);u=Math.cos(A+D)*T+C,c=Math.sin(A+D)*I+k;break;case aT.R:d=u=s[f++],p=c=s[f++];var P=s[f++],R=s[f++];if(o=d+P,a=p+R,n){if(ab(d,p,o,p,e,i,r)||ab(o,p,o,a,e,i,r)||ab(o,a,d,a,e,i,r)||ab(d,a,d,p,e,i,r))return!0}else h+=ak(o,p,o,a,i,r),h+=ak(d,a,d,p,i,r);break;case aT.Z:if(n){if(ab(u,c,d,p,e,i,r))return!0}else h+=ak(u,c,d,p,i,r);u=d,c=p}}return n||1e-4>Math.abs(c-p)||(h+=ak(u,c,d,p,i,r)||0),0!==h}var aO=tA({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},oX),aP={style:tA({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},oZ.style)},aR=rr.concat(["invisible","culling","z","z2","zlevel","parent"]),aN=function(t){var e;function n(e){return t.call(this,e)||this}return to(n,t),n.prototype.update=function(){var e=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new n;r.buildPath===n.prototype.buildPath&&(r.buildPath=function(t){e.buildPath(t,e.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s<aR.length;++s)r[aR[s]]=this[aR[s]];r.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(e){var n=tz(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var r=0;r<n.length;r++){var o=n[r],a=e[o];"style"===o?this.style?tI(this.style,a):this.useStyle(a):"shape"===o?tI(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(tG(t)){var e=ic(t,0);return e>.5?i8:e>.2?"#eee":i6}else if(t)return i6}return i8},n.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(tG(e)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>ic(t,0))return e}},n.prototype.buildPath=function(t,e,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new a_(!1)},n.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),aL(o,a/s,!0,t,e)))return!0}if(this.hasFill())return aL(o,0,!1,t,e)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},n.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:tI(n,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return et(aO,t)},n.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=tI({},this.shape))},n.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=tI({},i.shape),tI(s,n.shape)):(s=tI({},r?this.shape:i.shape),tI(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=tI({},this.shape);for(var h={},u=tz(s),c=0;c<u.length;c++){var d=u[c];"object"==typeof s[d]?this.shape[d]=s[d]:h[d]=s[d]}this._transitionState(e,{shape:h},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(e){for(var n,i=t.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var o=e[r];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},n.prototype.getAnimationStyleProps=function(){return aP},n.prototype.isZeroArea=function(){return!1},n.extend=function(t){var e=function(e){function n(n){var i=e.call(this,n)||this;return t.init&&t.init.call(i,n),i}return to(n,e),n.prototype.getDefaultStyle=function(){return tC(t.style)},n.prototype.getDefaultShape=function(){return tC(t.shape)},n}(n);for(var i in t)"function"==typeof t[i]&&(e.prototype[i]=t[i]);return e},n.initDefaultProps=void((e=n.prototype).type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7),n}(o$),aE=tA({strokeFirst:!0,font:th,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},aO),aB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.hasStroke=function(){return oj(this.style)},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return et(aE,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t,e,n;return this._rect||(this._rect=(e=oG((t=this.style).text),n=t.font,oU(t,rh(ra(n),e),rf(n),null))),this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(o$);aB.prototype.type="tspan";var az=tA({x:0,y:0},oX),aV={style:tA({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},oZ.style)},aF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.createStyle=function(t){return et(az,t)},e.prototype._getSize=function(t){var e,n=this.style,i=n[t];if(null!=i)return i;var r=(e=n.image)&&"string"!=typeof e&&e.width&&e.height?n.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=n[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return aV},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new nu(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(o$);aF.prototype.type="image";var aW=aF,aH=Math.round;function aG(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s&&(aH(2*i)===aH(2*r)&&(t.x1=t.x2=aj(i,s,!0)),aH(2*o)===aH(2*a)&&(t.y1=t.y2=aj(o,s,!0))),t}}function aU(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s&&(t.x=aj(i,s,!0),t.y=aj(r,s,!0),t.width=Math.max(aj(i+o,s,!1)-t.x,+(0!==o)),t.height=Math.max(aj(r+a,s,!1)-t.y,+(0!==a))),t}}function aj(t,e,n){if(!e)return t;var i=aH(2*t);return(i+aH(e))%2==0?i/2:(i+(n?1:-1))/2}var aY=function(){this.x=0,this.y=0,this.width=0,this.height=0},aX={},aZ=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new aY},e.prototype.buildPath=function(t,e){if(this.subPixelOptimize){var n,i,r,o,a,s,l,h,u,c,d,p,f,g,m,y=aU(aX,e,this.style);p=y.x,f=y.y,g=y.width,m=y.height,y.r=e.r,e=y}else p=e.x,f=e.y,g=e.width,m=e.height;e.r?(l=(n=e).x,h=n.y,u=n.width,c=n.height,d=n.r,u<0&&(l+=u,u=-u),c<0&&(h+=c,c=-c),"number"==typeof d?i=r=o=a=d:d instanceof Array?1===d.length?i=r=o=a=d[0]:2===d.length?(i=o=d[0],r=a=d[1]):3===d.length?(i=d[0],r=a=d[1],o=d[2]):(i=d[0],r=d[1],o=d[2],a=d[3]):i=r=o=a=0,i+r>u&&(s=i+r,i*=u/s,r*=u/s),o+a>u&&(s=o+a,o*=u/s,a*=u/s),r+o>c&&(s=r+o,r*=c/s,o*=c/s),i+a>c&&(s=i+a,i*=c/s,a*=c/s),t.moveTo(l+i,h),t.lineTo(l+u-r,h),0!==r&&t.arc(l+u-r,h+r,r,-Math.PI/2,0),t.lineTo(l+u,h+c-o),0!==o&&t.arc(l+u-o,h+c-o,o,0,Math.PI/2),t.lineTo(l+a,h+c),0!==a&&t.arc(l+a,h+c-a,a,Math.PI/2,Math.PI),t.lineTo(l,h+i),0!==i&&t.arc(l+i,h+i,i,Math.PI,1.5*Math.PI)):t.rect(p,f,g,m)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(aN);aZ.prototype.type="rect";var aq=aZ,aK={fill:"#000"},a$={},aJ={style:tA({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},oZ.style)},aQ=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=aK,n.attr(e),n}return to(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(e){var n=this.innerTransformable;return n?n.getLocalTransform(e):t.prototype.getLocalTransform.call(this,e)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){var t;this._childCursor=0,a8(t=this.style),tP(t.rich,a8),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new nu(0,0,0,0),e=this._children,n=[],i=null,r=0;r<e.length;r++){var o=e[r],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(t.copy(a),t.applyTransform(s),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||aK},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,i=t.rich||n&&{};return tI(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,e){for(var n=tz(e),i=0;i<n.length;i++){var r=n[i];t[r]=t[r]||{},tI(t[r],e[r])}},e.prototype.getAnimationStyleProps=function(){return aJ},e.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),this._children[this._childCursor++]=e,e.__zr=this.__zr,e.parent=this,e},e.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||th,n=t.padding,i=this._defaultStyle,r=t.x||0,o=t.y||0,a=t.align||i.align||"left",s=t.verticalAlign||i.verticalAlign||"top";oF(a$,i.overflowRect,r,o,a,s),r=a$.baseX,o=a$.baseY;var l=function(t,e,n,i){var r,o=oG(t),a=e.overflow,s=e.padding,l=s?s[1]+s[3]:0,h=s?s[0]+s[2]:0,u=e.font,c=rf(u),d=tJ(e.lineHeight,c),p="truncate"===e.lineOverflow,f=!1,g=e.width;null==g&&null!=n&&(g=n-l);var m=e.height;null==m&&null!=i&&(m=i-h);var y=(r=null!=g&&("break"===a||"breakAll"===a)?o?oV(o,e.font,g,"breakAll"===a,0).lines:[]:o?o.split("\n"):[]).length*d;if(null==m&&(m=y),y>m&&p){var v=Math.floor(m/d);f=f||r.length>v,y=(r=r.slice(0,v)).length*d}if(o&&"truncate"===a&&null!=g)for(var x=oO(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),_={},b=0;b<r.length;b++)oP(_,r[b],x),r[b]=_.textLine,f=f||_.isTruncated;for(var w=m,S=0,M=ra(u),b=0;b<r.length;b++)S=Math.max(rh(M,r[b]),S);null==g&&(g=S);var C=g;return w+=h,{lines:r,height:m,outerWidth:C+=l,outerHeight:w,lineHeight:d,calculatedLineHeight:c,contentWidth:S,contentHeight:y,width:g,isTruncated:f}}(st(t),t,a$.outerWidth,a$.outerHeight),h=se(t),u=!!t.backgroundColor,c=l.outerHeight,d=l.outerWidth,p=l.lines,f=l.lineHeight;this.isTruncated=!!l.isTruncated;var g=r,m=rp(o,l.contentHeight,s);if(h||n){var y=rd(r,d,a),v=rp(o,c,s);h&&this._renderBackground(t,t,y,v,d,c)}m+=f/2,n&&(g=a7(r,a,n),"top"===s?m+=n[0]:"bottom"===s&&(m-=n[2]));for(var x=0,_=!1,b=!1,w=a9("fill"in t?t.fill:(b=!0,i.fill)),S=a6("stroke"in t?t.stroke:u||i.autoStroke&&!b?null:(x=2,_=!0,i.stroke)),M=t.textShadowBlur>0,C=0;C<p.length;C++){var k=this._getOrCreateChild(aB),T=k.createStyle();k.useStyle(T),T.text=p[C],T.x=g,T.y=m,a&&(T.textAlign=a),T.textBaseline="middle",T.opacity=t.opacity,T.strokeFirst=!0,M&&(T.shadowBlur=t.textShadowBlur||0,T.shadowColor=t.textShadowColor||"transparent",T.shadowOffsetX=t.textShadowOffsetX||0,T.shadowOffsetY=t.textShadowOffsetY||0),T.stroke=S,T.fill=w,S&&(T.lineWidth=t.lineWidth||x,T.lineDash=t.lineDash,T.lineDashOffset=t.lineDashOffset||0),T.font=e,a3(T,t),m+=f,k.setBoundingRect(oU(T,l.contentWidth,l.calculatedLineHeight,_?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,e=this._defaultStyle,n=t.align||e.align,i=t.verticalAlign||e.verticalAlign,r=t.x||0,o=t.y||0;oF(a$,e.overflowRect,r,o,n,i),r=a$.baseX,o=a$.baseY;var a=function(t,e,n,i,r){var o,a=new oE,s=oG(t);if(!s)return a;var l=e.padding,h=l?l[1]+l[3]:0,u=l?l[0]+l[2]:0,c=e.width;null==c&&null!=n&&(c=n-h);var d=e.height;null==d&&null!=i&&(d=i-u);for(var p=e.overflow,f=("break"===p||"breakAll"===p)&&null!=c?{width:c,accumWidth:0,breakAll:"breakAll"===p}:null,g=oL.lastIndex=0;null!=(o=oL.exec(s));){var m=o.index;m>g&&oB(a,s.substring(g,m),e,f),oB(a,o[2],e,f,o[1]),g=oL.lastIndex}g<s.length&&oB(a,s.substring(g,s.length),e,f);var y=[],v=0,x=0,_="truncate"===p,b="truncate"===e.lineOverflow,w={};function S(t,e,n){t.width=e,t.lineHeight=n,v+=n,x=Math.max(x,e)}o:for(var M=0;M<a.lines.length;M++){for(var C=a.lines[M],k=0,T=0,I=0;I<C.tokens.length;I++){var A=C.tokens[I],D=A.styleName&&e.rich[A.styleName]||{},L=A.textPadding=D.padding,O=L?L[1]+L[3]:0,P=A.font=D.font||e.font;A.contentHeight=rf(P);var R=tJ(D.height,A.contentHeight);if(A.innerHeight=R,L&&(R+=L[0]+L[2]),A.height=R,A.lineHeight=tQ(D.lineHeight,e.lineHeight,R),A.align=D&&D.align||r,A.verticalAlign=D&&D.verticalAlign||"middle",b&&null!=d&&v+A.lineHeight>d){var N=a.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),S(C,T,k),a.lines=a.lines.slice(0,M+1)):a.lines=a.lines.slice(0,M),a.isTruncated=a.isTruncated||a.lines.length<N;break o}var E=D.width,B=null==E||"auto"===E;if("string"==typeof E&&"%"===E.charAt(E.length-1))A.percentWidth=E,y.push(A),A.contentWidth=rh(ra(P),A.text);else{if(B){var z=D.backgroundColor,V=z&&z.image;V&&oD(V=function(t){if("string"!=typeof t)return t;var e=oT.get(t);return e&&e.image}(V))&&(A.width=Math.max(A.width,V.width*R/V.height))}var F=_&&null!=c?c-T:null;null!=F&&F<A.width?!B||F<O?(A.text="",A.width=A.contentWidth=0):(!function(t,e,n,i,r,o){if(!n){t.text="",t.isTruncated=!1;return}var a=(e+"").split("\n");o=oO(n,i,r,o);for(var s=!1,l={},h=0,u=a.length;h<u;h++)oP(l,a[h],o),a[h]=l.textLine,s=s||l.isTruncated;t.text=a.join("\n"),t.isTruncated=s}(w,A.text,F-O,P,e.ellipsis,{minChar:e.truncateMinChar}),A.text=w.text,a.isTruncated=a.isTruncated||w.isTruncated,A.width=A.contentWidth=rh(ra(P),A.text)):A.contentWidth=rh(ra(P),A.text)}A.width+=O,T+=A.width,D&&(k=Math.max(k,A.lineHeight))}S(C,T,k)}a.outerWidth=a.width=tJ(c,x),a.outerHeight=a.height=tJ(d,v),a.contentHeight=v,a.contentWidth=x,a.outerWidth+=h,a.outerHeight+=u;for(var M=0;M<y.length;M++){var A=y[M],W=A.percentWidth;A.width=parseInt(W,10)/100*a.width}return a}(st(t),t,a$.outerWidth,a$.outerHeight,n),s=a.width,l=a.outerWidth,h=a.outerHeight,u=t.padding;this.isTruncated=!!a.isTruncated;var c=rd(r,l,n),d=rp(o,h,i),p=c,f=d;u&&(p+=u[3],f+=u[0]);var g=p+s;se(t)&&this._renderBackground(t,t,c,d,l,h);for(var m=!!t.backgroundColor,y=0;y<a.lines.length;y++){for(var v=a.lines[y],x=v.tokens,_=x.length,b=v.lineHeight,w=v.width,S=0,M=p,C=g,k=_-1,T=void 0;S<_&&(!(T=x[S]).align||"left"===T.align);)this._placeToken(T,t,b,f,M,"left",m),w-=T.width,M+=T.width,S++;for(;k>=0&&"right"===(T=x[k]).align;)this._placeToken(T,t,b,f,C,"right",m),w-=T.width,C-=T.width,k--;for(M+=(s-(M-p)-(g-C)-w)/2;S<=k;)T=x[S],this._placeToken(T,t,b,f,M+T.width/2,"center",m),M+=T.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,h=i+n/2;"top"===l?h=i+t.height/2:"bottom"===l&&(h=i+n-t.height/2),!t.isLineHolder&&se(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var u=!!s.backgroundColor,c=t.textPadding;c&&(r=a7(r,o,c),h-=t.height/2-c[0]-t.innerHeight/2);var d=this._getOrCreateChild(aB),p=d.createStyle();d.useStyle(p);var f=this._defaultStyle,g=!1,m=0,y=!1,v=a9("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),x=a6("stroke"in s?s.stroke:"stroke"in e?e.stroke:u||a||f.autoStroke&&!g?null:(m=2,y=!0,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=r,p.y=h,_&&(p.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,p.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=t.font||th,p.opacity=tQ(s.opacity,e.opacity,1),a3(p,s),x&&(p.lineWidth=tQ(s.lineWidth,e.lineWidth,m),p.lineDash=tJ(s.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=x),v&&(p.fill=v),d.setBoundingRect(oU(p,t.contentWidth,t.contentHeight,y?0:null))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l=t.backgroundColor,h=t.borderWidth,u=t.borderColor,c=l&&l.image,d=l&&!c,p=t.borderRadius,f=this;if(d||t.lineHeight||h&&u){(a=this._getOrCreateChild(aq)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=p,a.dirtyShape()}if(d){var m=a.style;m.fill=l||null,m.fillOpacity=tJ(t.fillOpacity,1)}else if(c){(s=this._getOrCreateChild(aW)).onload=function(){f.dirtyStyle()};var y=s.style;y.image=l.image,y.x=n,y.y=i,y.width=r,y.height=o}if(h&&u){var m=a.style;m.lineWidth=h,m.stroke=u,m.strokeOpacity=tJ(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var v=(a||s).style;v.shadowBlur=t.shadowBlur||0,v.shadowColor=t.shadowColor||"transparent",v.shadowOffsetX=t.shadowOffsetX||0,v.shadowOffsetY=t.shadowOffsetY||0,v.opacity=tQ(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return a4(t)&&(e=[t.fontStyle,t.fontWeight,a5(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&t5(e)||t.textFont||t.font},e}(o$),a0={left:!0,right:1,center:1},a1={top:1,bottom:1,middle:1},a2=["fontStyle","fontWeight","fontSize","fontFamily"];function a5(t){return"string"==typeof t&&(-1!==t.indexOf("px")||-1!==t.indexOf("rem")||-1!==t.indexOf("em"))?t:isNaN(+t)?"12px":t+"px"}function a3(t,e){for(var n=0;n<a2.length;n++){var i=a2[n],r=e[i];null!=r&&(t[i]=r)}}function a4(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}function a8(t){if(t){t.font=aQ.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||a0[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||a1[n]?n:"top",t.padding&&(t.padding=t1(t.padding))}}function a6(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function a9(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function a7(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function st(t){var e=t.text;return null!=e&&(e+=""),e}function se(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var sn=aQ,si=oi(),sr=function(t,e,n,i){if(i){var r=si(i);r.dataIndex=n,r.dataType=e,r.seriesIndex=t,r.ssrType="chart","group"===i.type&&i.traverse(function(i){var r=si(i);r.seriesIndex=t,r.dataIndex=n,r.dataType=e,r.ssrType="chart"})}},so=1,sa={},ss=oi(),sl=oi(),sh=["emphasis","blur","select"],su=["normal","emphasis","blur","select"],sc="highlight",sd="downplay",sp="select",sf="unselect",sg="toggleSelect",sm="selectchanged";function sy(t){return null!=t&&"none"!==t}function sv(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function sx(t){sv(t,"emphasis",2)}function s_(t){2===t.hoverState&&sv(t,"normal",0)}function sb(t){sv(t,"blur",1)}function sw(t){1===t.hoverState&&sv(t,"normal",0)}function sS(t){t.selected=!0}function sM(t){t.selected=!1}function sC(t,e,n){e(t,n),t.isGroup&&t.traverse(function(t){e(t,n)})}function sk(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function sT(t,e){var n,i,r,o,a,s=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n){var i=e&&tD(e,"select")>=0,r=!1;if(t instanceof aN){var o=ss(t),a=i&&o.selectFill||o.normalFill,s=i&&o.selectStroke||o.normalStroke;if(sy(a)||sy(s)){var l=(n=n||{}).style||{};"inherit"===l.fill?(r=!0,n=tI({},n),(l=tI({},l)).fill=a):!sy(l.fill)&&sy(a)?(r=!0,n=tI({},n),(l=tI({},l)).fill=ip(a)):!sy(l.stroke)&&sy(s)&&(r||(n=tI({},n),l=tI({},l)),l.stroke=ip(s)),n.style=l}}if(n&&null==n.z2){r||(n=tI({},n));var h=t.z2EmphasisLift;n.z2=t.z2+(null!=h?h:10)}return n}(this,e,s);else if("blur"===t)return n=s,i=tD(this.currentStates,t)>=0,r=this.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a<e.length;a++){var s=e[a],l=r[s];o[s]=null==l?i&&i[s]:l}for(var a=0;a<t.animators.length;a++){var h=t.animators[a];h.__fromStateTransition&&0>h.__fromStateTransition.indexOf(n)&&"style"===h.targetName&&h.saveTo(o,e)}return o}(this,["opacity"],t,{opacity:1}),null==(a=(n=n||{}).style||{}).opacity&&(n=tI({},n),a=tI({opacity:i?r:.1*o.opacity},a),n.style=a),n;else if("select"===t){var l=s;if(l&&null==l.z2){l=tI({},l);var h=this.z2SelectLift;l.z2=this.z2+(null!=h?h:9)}return l}}return s}function sI(t){t.stateProxy=sT;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=sT),n&&(n.stateProxy=sT)}function sA(t,e){sP(t,e)||t.__highByOuter||sC(t,sx)}function sD(t,e){sP(t,e)||t.__highByOuter||sC(t,s_)}function sL(t,e){t.__highByOuter|=1<<(e||0),sC(t,sx)}function sO(t,e){(t.__highByOuter&=~(1<<(e||0)))||sC(t,s_)}function sP(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function sR(t){var e=t.getModel(),n=[],i=[];e.eachComponent(function(e,r){var o=sl(r),a="series"===e,s=a?t.getViewOfSeriesModel(r):t.getViewOfComponentModel(r);a||i.push(s),o.isBlured&&(s.group.traverse(function(t){sw(t)}),a&&n.push(r)),o.isBlured=!1}),tP(i,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(n,!1,e)})}function sN(t,e,n,i){var r=i.getModel();function o(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&sC(i,sw)}}if((n=n||"coordinateSystem",null!=t)&&e&&"none"!==e){var a=r.getSeriesByIndex(t),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];r.eachSeries(function(t){var r=a===t,h=t.coordinateSystem;h&&h.master&&(h=h.master);var u=h&&s?h===s:r;if(!("series"===n&&!r||"coordinateSystem"===n&&!u||"series"===e&&r)){if(i.getViewOfSeriesModel(t).group.traverse(function(t){t.__highByOuter&&r&&"self"===e||sb(t)}),tO(e))o(t.getData(),e);else if(tY(e))for(var c=tz(e),d=0;d<c.length;d++)o(t.getData(c[d]),e[c[d]]);l.push(t),sl(t).isBlured=!0}}),r.eachComponent(function(t,e){if("series"!==t){var n=i.getViewOfComponentModel(e);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,r)}})}}function sE(t,e,n){if(null!=t&&null!=e){var i=n.getModel().getComponent(t,e);if(i){sl(i).isBlured=!0;var r=n.getViewOfComponentModel(i);r&&r.focusBlurEnabled&&r.group.traverse(function(t){sb(t)})}}}function sB(t,e,n,i){var r,o={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return o;var a=i.getModel().getComponent(t,e);if(!a)return o;var s=i.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return o;for(var l=s.findHighDownDispatchers(n),h=0;h<l.length;h++)if("self"===si(l[h]).focus){r=!0;break}return{focusSelf:r,dispatchers:l}}function sz(t){tP(t.getAllData(),function(e){var n=e.data,i=e.type;n.eachItemGraphicEl(function(e,n){t.isSelected(n,i)?sC(e,sS):sC(e,sM)})})}function sV(t,e,n){sj(t,!0),sC(t,sI),sW(t,e,n)}function sF(t,e,n,i){i?sj(t,!1):sV(t,e,n)}function sW(t,e,n){var i=si(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var sH=["emphasis","blur","select"],sG={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function sU(t,e,n,i){n=n||"itemStyle";for(var r=0;r<sH.length;r++){var o=sH[r],a=e.getModel([o,n]);t.ensureState(o).style=i?i(a):a[sG[n]]()}}function sj(t,e){var n=!1===e;t.highDownSilentOnTouch&&(t.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!n||t.__highDownDispatcher)&&(t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n)}function sY(t){return!!(t&&t.__highDownDispatcher)}function sX(t){var e=t.type;return e===sp||e===sf||e===sg}function sZ(t){var e=t.type;return e===sc||e===sd}var sq=oi();function sK(t,e,n,i,r){if(e&&e.ecModel){var o,a=e.ecModel.getUpdatePayload();o=a&&a.animation}var s=e&&e.isAnimationEnabled(),l="update"===t;if(!s)return null;var h=void 0,u=void 0,c=void 0;return i?(h=tJ(i.duration,200),u=tJ(i.easing,"cubicOut"),c=0):(h=e.getShallow(l?"animationDurationUpdate":"animationDuration"),u=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(h=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),tH(c)&&(c=c(n,r)),tH(h)&&(h=h(n)),{duration:h||0,delay:c,easing:u}}function s$(t,e,n,i,r,o,a){var s,l=!1;tH(r)?(a=o,o=r,r=null):tY(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var h="leave"===t;h||e.stopAnimation("leave");var u=sK(t,i,r,h?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null);if(u&&u.duration>0){var c={duration:u.duration,delay:u.delay||0,easing:u.easing,done:o,force:!!o||!!a,setToFinal:!h,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),l||e.attr(n),a&&a(1),o&&o()}function sJ(t,e,n,i,r,o){s$("update",t,e,n,i,r,o)}function sQ(t,e,n,i,r,o){s$("enter",t,e,n,i,r,o)}function s0(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("leave"===t.animators[e].scope)return!0;return!1}function s1(t,e,n,i,r,o){s0(t)||s$("leave",t,e,n,i,r,o)}function s2(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),s1(t,{style:{opacity:0}},e,n,i)}function s5(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||s2(t,e,n,i)}):s2(t,e,n,i)}function s3(t){sq(t).oldStyle=t.style}var s4={};function s8(t,e){for(var n=0;n<sh.length;n++){var i=sh[n],r=e[i],o=t.ensureState(i);o.style=o.style||{},o.style.text=r}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(a,!0)}function s6(t,e,n){var i,r=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;r&&(i=r.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==i&&(i=tH(t.defaultText)?t.defaultText(o,t,n):t.defaultText);for(var l={normal:i},h=0;h<sh.length;h++){var u=sh[h],c=e[u];l[u]=tJ(r?r.getFormattedLabel(o,u,null,a,c&&c.get("formatter")):null,i)}return l}function s9(t,e,n,i){n=n||s4;for(var r=t instanceof sn,o=!1,a=0;a<su.length;a++){var s=e[su[a]];if(s&&s.getShallow("show")){o=!0;break}}var l=r?t:t.getTextContent();if(o){!r&&(l||(l=new sn,t.setTextContent(l)),t.stateProxy&&(l.stateProxy=t.stateProxy));var h=s6(n,e),u=e.normal,c=!!u.getShallow("show"),d=lt(u,i&&i.normal,n,!1,!r);d.text=h.normal,r||t.setTextConfig(le(u,n,!1));for(var a=0;a<sh.length;a++){var p=sh[a],s=e[p];if(s){var f=l.ensureState(p),g=!!tJ(s.getShallow("show"),c);g!==c&&(f.ignore=!g),f.style=lt(s,i&&i[p],n,!0,!r),f.style.text=h[p],r||(t.ensureState(p).textConfig=le(s,n,!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=!c,l.useStyle(d),l.dirty(),n.enableTextSetter&&(ls(l).setLabelText=function(t){var i=s6(n,e,t);s8(l,i)})}else l&&(l.ignore=!0);t.dirty()}function s7(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<sh.length;i++){var r=sh[i];n[r]=t.getModel([r,e])}return n}function lt(t,e,n,i,r){var o={};return function(t,e,n,i,r){n=n||s4;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||s4).rich;if(n){e=e||{};for(var i=tz(n),r=0;r<i.length;r++)e[i[r]]=1}t=t.parentModel}return e}(e);if(l){o={};var h="richInheritPlainLabel",u=tJ(e.get(h),a?a.get(h):void 0);for(var c in l)if(l.hasOwnProperty(c)){var d=e.getModel(["rich",c]);lo(o[c]={},d,s,e,u,n,i,r,!1,!0)}}o&&(t.rich=o);var p=e.get("overflow");p&&(t.overflow=p);var f=e.get("lineOverflow");f&&(t.lineOverflow=f);var g=e.get("minMargin");if(null!=g)t.margin=[g=tj(g)?g/2:0,g,g,g],t.__marginType=lu.minMargin;else{var m=e.get("textMargin");null!=m&&(t.margin=t1(m),t.__marginType=lu.textMargin)}lo(t,e,s,null,null,n,i,r,!0,!1)}(o,t,n,i,r),e&&tI(o,e),o}function le(t,e,n){e=e||{};var i,r={},o=t.getShallow("rotate"),a=tJ(t.getShallow("distance"),n?null:5),s=t.getShallow("offset");return"outside"===(i=t.getShallow("position")||(n?null:"inside"))&&(i=e.defaultOutsidePosition||"top"),null!=i&&(r.position=i),null!=s&&(r.offset=s),null!=o&&(r.rotation=o*=Math.PI/180),null!=a&&(r.distance=a),r.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",null!=e.autoOverflowArea&&(r.autoOverflowArea=e.autoOverflowArea),null!=e.layoutRect&&(r.layoutRect=e.layoutRect),r}var ln=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],li=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],lr=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function lo(t,e,n,i,r,o,a,s,l,h){n=!a&&n||s4;var u=o&&o.inheritColor,c=e.getShallow("color"),d=e.getShallow("textBorderColor"),p=tJ(e.getShallow("opacity"),n.opacity);("inherit"===c||"auto"===c)&&(c=u||null),("inherit"===d||"auto"===d)&&(d=u||null),s||(c=c||n.color,d=d||n.textBorderColor),null!=c&&(t.fill=c),null!=d&&(t.stroke=d);var f=tJ(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=f&&(t.lineWidth=f);var g=tJ(e.getShallow("textBorderType"),n.textBorderType);null!=g&&(t.lineDash=g);var m=tJ(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=m&&(t.lineDashOffset=m),a||null!=p||h||(p=o&&o.defaultOpacity),null!=p&&(t.opacity=p),a||s||null!=t.fill||!o.inheritColor||(t.fill=o.inheritColor);for(var y=0;y<ln.length;y++){var v=ln[y],x=!1!==r&&i?tQ(e.getShallow(v),i.getShallow(v),n[v]):tJ(e.getShallow(v),n[v]);null!=x&&(t[v]=x)}for(var y=0;y<li.length;y++){var v=li[y],x=e.getShallow(v);null!=x&&(t[v]=x)}if(null==t.verticalAlign){var _=e.getShallow("baseline");null!=_&&(t.verticalAlign=_)}if(!l||!o.disableBox){for(var y=0;y<lr.length;y++){var v=lr[y],x=e.getShallow(v);null!=x&&(t[v]=x)}var b=e.getShallow("borderType");null!=b&&(t.borderDash=b),("auto"===t.backgroundColor||"inherit"===t.backgroundColor)&&u&&(t.backgroundColor=u),("auto"===t.borderColor||"inherit"===t.borderColor)&&u&&(t.borderColor=u)}}function la(t,e){var n=e&&e.getModel("textStyle");return t5([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var ls=oi();function ll(t,e,n,i){if(t){var r=ls(t);r.prevValue=r.value,r.value=n;var o=e.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}function lh(t,e,n,i,r){var o=ls(t);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=tJ(o.interpolatedValue,o.prevValue),l=o.value;t.percent=0,(null==o.prevValue?sQ:sJ)(t,{percent:1},i,e,null,function(i){var h=od(n,o.precision,s,l,i);o.interpolatedValue=1===i?null:h,s8(t,s6({labelDataIndex:e,labelFetcher:r,defaultText:a?a(h):h+""},o.statesModels,h))})}}var lu={minMargin:1,textMargin:2},lc=["textStyle","color"],ld=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],lp=new sn,lf=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(lc):null)},t.prototype.getFont=function(){return la({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<ld.length;n++)e[ld[n]]=this.getShallow(ld[n]);return lp.useStyle(e),lp.update(),lp.getBoundingRect()},t}(),lg=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],lm=oM(lg),ly=function(){function t(){}return t.prototype.getLineStyle=function(t){return lm(this,t)},t}(),lv=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],lx=oM(lv),l_=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return lx(this,t,e)},t}(),lb=function(){function t(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return t.prototype.init=function(t,e,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r]},t.prototype.mergeOption=function(t,e){tk(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var n=this.option,i=null==n?n:n[t];if(null==i&&!e){var r=this.parentModel;r&&(i=r.getShallow(t))}return i},t.prototype.getModel=function(e,n){var i=null!=e,r=i?this.parsePath(e):null;return new t(i?this._doGet(r):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new this.constructor(tC(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!ts.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;else if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},t}();ov(lb),l=["__\0is_clz",o_++].join("_"),lb.prototype[l]=!0,lb.isInstance=function(t){return!!(t&&t[l])},tL(lb,ly),tL(lb,l_),tL(lb,ok),tL(lb,lf);var lw=Math.round(10*Math.random());function lS(t){return[t||"",lw++].join("_")}function lM(t,e){return tk(tk({},t,!0),e,!0)}var lC={},lk={},lT=ts.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||"EN").toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function lI(t,e){lk[t=t.toUpperCase()]=new lb(e),lC[t]=e}lI("EN",{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:". "}}}}),lI("ZH",{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var lA=null,lD={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},lL={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},lO="{yyyy}-{MM}-{dd}",lP={year:"{yyyy}",month:"{yyyy}-{MM}",day:lO,hour:lO+" "+lL.hour,minute:lO+" "+lL.minute,second:lO+" "+lL.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},lR=["year","month","day","hour","minute","second","millisecond"],lN=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function lE(t,e){return t+="","0000".substr(0,e-t.length)+t}function lB(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function lz(t,e,n,i){var r=rj(t),o=r[lW(n)](),a=r[lH(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[lG(n)](),h=r["get"+(n?"UTC":"")+"Day"](),u=r[lU(n)](),c=(u-1)%12+1,d=r[lj(n)](),p=r[lY(n)](),f=r[lX(n)](),g=u>=12?"pm":"am",m=g.toUpperCase(),y=(i instanceof lb?i:lk[i||lT]||lk.EN).getModel("time"),v=y.get("month"),x=y.get("monthAbbr"),_=y.get("dayOfWeek"),b=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,lE(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,lE(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,lE(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[h]).replace(/{ee}/g,b[h]).replace(/{e}/g,h+"").replace(/{HH}/g,lE(u,2)).replace(/{H}/g,u+"").replace(/{hh}/g,lE(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,lE(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,lE(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,lE(f,3)).replace(/{S}/g,f+"")}function lV(t,e){var n=rj(t),i=n[lH(e)]()+1,r=n[lG(e)](),o=n[lU(e)](),a=n[lj(e)](),s=n[lY(e)](),l=0===n[lX(e)](),h=l&&0===s,u=h&&0===a,c=u&&0===o,d=c&&1===r;if(d&&1===i)return"year";if(d)return"month";if(c)return"day";if(u)return"hour";if(h)return"minute";else if(l)return"second";else return"millisecond"}function lF(t,e,n){switch(e){case"year":t[lZ(n)](0);case"month":t[lq(n)](1);case"day":t[lK(n)](0);case"hour":t[l$(n)](0);case"minute":t[lJ(n)](0);case"second":t[lQ(n)](0)}return t}function lW(t){return t?"getUTCFullYear":"getFullYear"}function lH(t){return t?"getUTCMonth":"getMonth"}function lG(t){return t?"getUTCDate":"getDate"}function lU(t){return t?"getUTCHours":"getHours"}function lj(t){return t?"getUTCMinutes":"getMinutes"}function lY(t){return t?"getUTCSeconds":"getSeconds"}function lX(t){return t?"getUTCMilliseconds":"getMilliseconds"}function lZ(t){return t?"setUTCMonth":"setMonth"}function lq(t){return t?"setUTCDate":"setDate"}function lK(t){return t?"setUTCHours":"setHours"}function l$(t){return t?"setUTCMinutes":"setMinutes"}function lJ(t){return t?"setUTCSeconds":"setSeconds"}function lQ(t){return t?"setUTCMilliseconds":"setMilliseconds"}function l0(t){if(!r$(t))return tG(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function l1(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function l2(t,e,n){function i(t){return t&&t5(t)?t:"-"}function r(t){return!!(null!=t&&!isNaN(t)&&isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?rj(t):t;if(!isNaN(+s))return lz(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return tU(t)?i(t):tj(t)&&r(t)?t+"":"-";var l=rK(t);return r(l)?l0(l):tU(t)?i(t):"boolean"==typeof t?t+"":"-"}var l5=["a","b","c","d","e","f","g"],l3=function(t,e){return"{"+t+(null==e?"":e)+"}"};function l4(t,e,n){tW(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var a=l5[o];t=t.replace(l3(a),l3(a,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var h=e[s][r[l]];t=t.replace(l3(l5[l],s),n?eP(h):h)}return t}function l8(t,e){return e=e||"transparent",tG(t)?t:tY(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function l6(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var l9={},l7={},ht=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(t,e){function n(n,i){var r=[];return tP(n,function(n,i){var o=n.create(t,e);r=r.concat(o||[])}),r}this._nonSeriesBoxMasterList=n(l9,!0),this._normalMasterList=n(l7,!1)},t.prototype.update=function(t,e){tP(this._normalMasterList,function(n){n.update&&n.update(t,e)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(t,e){if("matrix"===t||"calendar"===t){l9[t]=e;return}l7[t]=e},t.get=function(t){return l7[t]||l9[t]},t}(),he=t9();function hn(t,e){var n=t.getShallow("coordinateSystem"),i=t.getShallow("coordinateSystemUsage",!0),r=0;if(n){var o="series"===t.mainType;(null==i&&(i=o?"data":"box"),"data"===i)?(r=1,o||(r=0)):"box"!==i||(r=2,o||l9[n])||(r=0)}return{coordSysType:n,kind:r}}function hi(t){var e=t.targetModel,n=t.coordSysType,i=t.coordSysProvider,r=t.isDefaultDataCoordSys;t.allowNotFound;var o=hn(e,!0),a=o.kind,s=o.coordSysType;if(r&&1!==a&&(a=1,s=n),0===a||s!==n)return!1;var l=i(n,e);return!!l&&(1===a?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0)}var hr=function(t,e){var n=e.getReferringComponents(t,os).models[0];return n&&n.coordinateSystem},ho=["left","right","top","bottom","width","height"],ha=[["width","left","right"],["height","top","bottom"]];function hs(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.getBoundingRect(),p=e.childAt(h+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(u=o+g)>i||l.newline?(o=0,u=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=u+n:a=c+n)})}function hl(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function hh(t,e){var n=function(t,e){var n,i,r=hp(t,e,{enableLayoutOnlyByCenter:!0}),o=t.getBoxLayoutParams();if(r.type===hd.point)i=r.refPoint,n=hu(o,{width:e.getWidth(),height:e.getHeight()});else{var a=t.get("center"),s=tW(a)?a:[a,a];n=hu(o,r.refContainer),i=2===r.boxCoordFrom?r.refPoint:[rE(s[0],n.width)+n.x,rE(s[1],n.height)+n.y]}return{viewRect:n,center:i}}(t,e),i=n.viewRect,r=n.center,o=t.get("radius");tW(o)||(o=[0,o]);var a=Math.min(rE(i.width,e.getWidth()),rE(i.height,e.getHeight())),s=rE(o[0],a/2),l=rE(o[1],a/2);return{cx:r[0],cy:r[1],r0:s,r:l,viewRect:i}}function hu(t,e,n){n=t1(n||0);var i=e.width,r=e.height,o=rE(t.left,i),a=rE(t.top,r),s=rE(t.right,i),l=rE(t.bottom,r),h=rE(t.width,i),u=rE(t.height,r),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(h)&&(h=i-s-d-o),isNaN(u)&&(u=r-l-c-a),null!=p&&(isNaN(h)&&isNaN(u)&&(p>i/r?h=.8*i:u=.8*r),isNaN(h)&&(h=p*u),isNaN(u)&&(u=h/p)),isNaN(o)&&(o=i-s-h-d),isNaN(a)&&(a=r-l-u-c),t.left||t.right){case"center":o=i/2-h/2-n[3];break;case"right":o=i-h-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-u/2-n[0];break;case"bottom":a=r-u-c}o=o||0,a=a||0,isNaN(h)&&(h=i-d-o-(s||0)),isNaN(u)&&(u=r-c-a-(l||0));var f=new nu((e.x||0)+o+n[3],(e.y||0)+a+n[0],h,u);return f.margin=n,f}function hc(t,e,n){var i=t.getShallow("preserveAspect",!0);if(!i)return e;var r=e.width/e.height;if(1e-9>Math.abs(Math.atan(n)-Math.atan(r)))return e;var o=t.getShallow("preserveAspectAlign",!0),a=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l="cover"===i;return r>n&&!l||r<n&&l?(s.width=e.height*n,"left"===o?s.left=0:"right"===o?s.right=0:s.left="center"):(s.height=e.width/n,"top"===a?s.top=0:"bottom"===a?s.bottom=0:s.top="middle"),hu(s,e)}tF(hs,"vertical"),tF(hs,"horizontal");var hd={rect:1,point:2};function hp(t,e,n){var i,r,o,a,s=t.boxCoordinateSystem;if(s){var l=function(t){var e=t.getShallow("coord",!0),n=1;if(null==e){var i=he.get(t.type);i&&i.getCoord2&&(n=2,e=i.getCoord2(t))}return{coord:e,from:n}}(t),h=l.coord,u=l.from;if(s.dataToLayout){o=hd.rect,a=u;var c=s.dataToLayout(h);i=c.contentRect||c.rect}else n&&n.enableLayoutOnlyByCenter&&s.dataToPoint&&(o=hd.point,a=u,r=s.dataToPoint(h))}return null==o&&(o=hd.rect),o===hd.rect&&(i||(i={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),r=[i.x+i.width/2,i.y+i.height/2]),{type:o,refContainer:i,refPoint:r,boxCoordFrom:a}}function hf(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],h=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===h)a="group"===t.type?new nu(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(a=a.clone()).applyTransform(u)}var c=hu(tA({width:a.width,height:a.height},e),n,i),d=s?c.x-a.x:0,p=l?c.y-a.y:0;return"raw"===h?(o.x=d,o.y=p):(o.x+=d,o.y+=p),o===t&&t.markRedraw(),!0}function hg(t){var e=t.layoutMode||t.constructor.layoutMode;return tY(e)?e:e?{type:e}:null}function hm(t,e,n){var i=n&&n.ignoreSize;tW(i)||(i=[i,i]);var r=a(ha[0],0),o=a(ha[1],1);function a(n,r){var o={},a=0,l={},h=0;if(tP(n,function(e){l[e]=t[e]}),tP(n,function(t){en(e,t)&&(o[t]=l[t]=e[t]),s(o,t)&&a++,s(l,t)&&h++}),i[r])return s(e,n[1])?l[n[2]]=null:s(e,n[2])&&(l[n[1]]=null),l;if(2===h||!a)return l;if(a>=2)return o;for(var u=0;u<n.length;u++){var c=n[u];if(!en(o,c)&&en(t,c)){o[c]=t[c];break}}return o}function s(t,e){return null!=t[e]&&"auto"!==t[e]}function l(t,e,n){tP(t,function(t){e[t]=n[t]})}l(ha[0],t,r),l(ha[1],t,o)}function hy(t){return hv({},t)}function hv(t,e){return e&&t&&tP(ho,function(n){en(e,n)&&(t[n]=e[n])}),t}var hx=oi(),h_=function(t){var e;function n(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=lS("ec_cpt_model"),r}return to(n,t),n.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=hg(this),i=n?hy(t):{};tk(t,e.getTheme().get(this.mainType)),tk(t,this.getDefaultOption()),n&&hm(t,i,n)},n.prototype.mergeOption=function(t,e){tk(this.option,t,!0);var n=hg(this);n&&hm(this.option,t,n)},n.prototype.optionUpdated=function(t,e){},n.prototype.getDefaultOption=function(){var t=this.constructor;if(!(t&&t[om]))return t.defaultOption;var e=hx(this);if(!e.defaultOption){for(var n=[],i=t;i;){var r=i.prototype.defaultOption;r&&n.push(r),i=i.superClass}for(var o={},a=n.length-1;a>=0;a--)o=tk(o,n[a],!0);e.defaultOption=o}return e.defaultOption},n.prototype.getReferringComponents=function(t,e){return oh(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)},e)},n.prototype.getBoxLayoutParams=function(){return hl(this,!1)},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=void((e=n.prototype).type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0),n}(lb);ox(h_,lb),oS(h_),h={},h_.registerSubTypeDefaulter=function(t,e){h[oy(t).main]=e},h_.determineSubType=function(t,e){var n=e.type;if(!n){var i=oy(t).main;h_.hasSubTypes(t)&&h[i]&&(n=h[i](e))}return n};var hb=function(t){var e=[];return tP(h_.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=tR(e,function(t){return oy(t).main}),"dataset"!==t&&0>=tD(e,"dataset")&&e.unshift("dataset"),e};function hw(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}h_.topologicalTravel=function(t,e,n,i){if(t.length){var r,o,a,s=(o={},a=[],tP(r=e,function(t){var e,n,i,s=hw(o,t),l=(e=s.originalDeps=hb(t),n=r,i=[],tP(e,function(t){tD(n,t)>=0&&i.push(t)}),i);s.entryCount=l.length,0===s.entryCount&&a.push(t),tP(l,function(e){0>tD(s.predecessor,e)&&s.predecessor.push(e);var n=hw(o,e);0>tD(n.successor,e)&&n.successor.push(t)})}),{graph:o,noEntryList:a}),l=s.graph,h=s.noEntryList,u={};for(tP(t,function(t){u[t]=!0});h.length;){var c=h.pop(),d=l[c],p=!!u[c];p&&(n.call(i,c,d.originalDeps.slice()),delete u[c]),tP(d.successor,p?g:f)}tP(u,function(){throw Error("")})}function f(t){l[t].entryCount--,0===l[t].entryCount&&h.push(t)}function g(t){u[t]=!0,f(t)}};var hS={color:{},darkColor:{},size:{}},hM=hS.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var hC in tI(hM,{primary:hM.neutral80,secondary:hM.neutral70,tertiary:hM.neutral60,quaternary:hM.neutral50,disabled:hM.neutral20,border:hM.neutral30,borderTint:hM.neutral20,borderShade:hM.neutral40,background:hM.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:hM.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:hM.neutral70,axisLineTint:hM.neutral40,axisTick:hM.neutral70,axisTickMinor:hM.neutral60,axisLabel:hM.neutral70,axisSplitLine:hM.neutral15,axisMinorSplitLine:hM.neutral05}),hM)if(hM.hasOwnProperty(hC)){var hk=hM[hC];"theme"===hC?hS.darkColor.theme=hM.theme.slice():"highlight"===hC?hS.darkColor.highlight="rgba(255,231,130,0.4)":0===hC.indexOf("accent")?hS.darkColor[hC]=il(hk,null,function(t){return .5*t},function(t){return Math.min(1,1.3-t)}):hS.darkColor[hC]=il(hk,null,function(t){return .9*t},function(t){return 1-Math.pow(t,1.5)})}hS.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var hT="";"u">typeof navigator&&(hT=navigator.platform||"");var hI="rgba(0, 0, 0, 0.2)",hA=hS.color.theme["0"],hD=il(hA,null,null,.9),hL={darkMode:"auto",colorBy:"series",color:hS.color.theme,gradientColor:[hD,hA],aria:{decal:{decals:[{color:hI,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:hI,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:hI,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:hI,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:hI,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:hI,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:hT.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},hO=t9(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),hP="original",hR="arrayRows",hN="objectRows",hE="keyedColumns",hB="typedArray",hz="unknown",hV="column",hF=oi();function hW(t,e,n){var i,r,o={},a=hG(e);if(!a||!t)return o;var s=[],l=[],h=hF(e.ecModel).datasetMap,u=a.uid+"_"+n.seriesLayoutBy;tP(t=t.slice(),function(e,n){var a=tY(e)?e:t[n]={name:e};"ordinal"===a.type&&null==i&&(i=n,r=p(a)),o[a.name]=[]});var c=h.get(u)||h.set(u,{categoryWayDim:r,valueWayDim:0});function d(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function p(t){var e=t.dimsDef;return e?e.length:1}return tP(t,function(t,e){var n=t.name,r=p(t);if(null==i){var a=c.valueWayDim;d(o[n],a,r),d(l,a,r),c.valueWayDim+=r}else if(i===e)d(o[n],0,r),d(s,0,r);else{var a=c.categoryWayDim;d(o[n],a,r),d(l,a,r),c.categoryWayDim+=r}}),s.length&&(o.itemName=s),l.length&&(o.seriesName=l),o}function hH(t,e,n){var i,r={};if(!hG(t))return r;var o=e.sourceFormat,a=e.dimensionsDefine;(o===hN||o===hE)&&tP(a,function(t,e){(tY(t)?t.name:t)==="name"&&(i=e)});var s=function(){for(var t={},r={},s=[],l=0,h=Math.min(5,n);l<h;l++){var u=hj(e.data,o,e.seriesLayoutBy,a,e.startIndex,l);s.push(u);var c=3===u;if(c&&null==t.v&&l!==i&&(t.v=l),null!=t.n&&t.n!==t.v&&(c||3!==s[t.n])||(t.n=l),d(t)&&3!==s[t.n])return t;c||(2===u&&null==r.v&&l!==i&&(r.v=l),(null==r.n||r.n===r.v)&&(r.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(r)?r:null}();if(s){r.value=[s.v];var l=null!=i?i:s.n;r.itemName=[l],r.seriesName=[l]}return r}function hG(t){if(!t.get("data",!0))return oh(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},os).models[0]}function hU(t,e){return hj(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function hj(t,e,n,i,r,o){var a,s,l;if(tZ(t))return 3;if(i){var h=i[o];tY(h)?(s=h.name,l=h.type):tG(h)&&(s=h)}if(null!=l)return"ordinal"===l?1:3;if(e===hR)if("row"===n){for(var u=t[o],c=0;c<(u||[]).length&&c<5;c++)if(null!=(a=g(u[r+c])))return a}else for(var c=0;c<t.length&&c<5;c++){var d=t[r+c];if(d&&null!=(a=g(d[o])))return a}else if(e===hN){if(!s)return 3;for(var c=0;c<t.length&&c<5;c++){var p=t[c];if(p&&null!=(a=g(p[s])))return a}}else if(e===hE){if(!s)return 3;var u=t[s];if(!u||tZ(u))return 3;for(var c=0;c<u.length&&c<5;c++)if(null!=(a=g(u[c])))return a}else if(e===hP)for(var c=0;c<t.length&&c<5;c++){var p=t[c],f=r4(p);if(!tW(f))return 3;if(null!=(a=g(f[o])))return a}function g(t){var e=tG(t);return null!=t&&Number.isFinite(Number(t))&&""!==t?e?2:3:e&&"-"!==t?1:void 0}return 3}var hY=t9(),hX=oi(),hZ=oi(),hq=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){return h$(this,hX,r2(this.get("color",!0)),this.get("colorLayer",!0),t,e,n)},t.prototype.clearColorPalette=function(){var t,e;t=this,(e=hX)(t).paletteIdx=0,e(t).paletteNameMap={}},t}();function hK(t,e,n,i){var r=r2(t.get(["aria","decal","decals"]));return h$(t,hZ,r,null,e,n,i)}function h$(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,h=s.paletteNameMap=s.paletteNameMap||{};if(h.hasOwnProperty(r))return h[r];var u=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((u=u||n)&&u.length){var c=u[l];return r&&(h[r]=c),s.paletteIdx=(l+1)%u.length,c}}var hJ="\0_ec_inner",hQ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new lb(i),this._locale=new lb(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=h2(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,h2(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):_(this,r),n=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&tP(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=t9(),s=e&&e.replaceMergeMainTypeMap;hF(this).datasetMap=t9(),tP(t,function(t,e){null!=t&&(h_.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?tC(t):tk(n[e],t,!0))}),s&&s.each(function(t,e){h_.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))}),h_.topologicalTravel(o,h_.getAllClassMainTypes(),function(e){var o,a=function(t,e,n){var i=hY.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,r2(t[e])),l=i.get(e),h=l?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=r8(l,a,h);tP(u,function(t){var n,i,r,o,a=t.newOption;tY(a)&&(t.keyInfo.mainType=e,t.keyInfo.subType=(n=e,i=a,r=t.existing,o=h_,i.type?i.type:r?r.subType:o.determineSubType(n,i)))}),n[e]=null,i.set(e,null),r.set(e,0);var c=[],d=[],p=0;tP(u,function(t,n){var i=t.existing,r=t.newOption;if(r){var a="series"===e,s=h_.getClass(e,t.keyInfo.subType,!a);if(!s)return;if("tooltip"===e){if(o)return;o=!0}if(i&&i.constructor===s)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var l=tI({componentIndex:n},t.keyInfo);tI(i=new s(r,this,this,l),l),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(c.push(i.option),d.push(i),p++):(c.push(void 0),d.push(void 0))},this),n[e]=c,i.set(e,d),r.set(e,p),"series"===e&&v(this)},this),this._seriesIndices||v(this)},e.prototype.getOption=function(){var t=tC(this.option);return tP(t,function(e,n){if(h_.hasClass(n)){for(var i=r2(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!oe(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}}),delete t[hJ],t},e.prototype.setTheme=function(t){this._theme=new lb(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e){for(var r=0;r<n.length;r++)if(n[r])return n[r]}}},e.prototype.queryComponents=function(t){var e,n=t.mainType;if(!n)return[];var i=t.index,r=t.id,o=t.name,a=this._componentsMap.get(n);return a&&a.length?(null!=i?(e=[],tP(r2(i),function(t){a[t]&&e.push(a[t])})):e=null!=r?h0("id",r,a):null!=o?h0("name",o,a):tE(a,function(t){return!!t}),h1(e,t)):[]},e.prototype.findComponents=function(t){var e,n,i,r,o,a=t.query,s=t.mainType,l=(e=a,n=s+"Index",i=s+"Id",r=s+"Name",e&&(null!=e[n]||null!=e[i]||null!=e[r])?{mainType:s,index:e[n],id:e[i],name:e[r]}:null);return o=h1(l?this.queryComponents(l):tE(this._componentsMap.get(s),function(t){return!!t}),t),t.filter?tE(o,t.filter):o},e.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if(tH(t))i.each(function(n,i){for(var r=0;n&&r<n.length;r++){var o=n[r];o&&t.call(e,i,o,o.componentIndex)}});else for(var r=tG(t)?i.get(t):tY(t)?this.findComponents(t):null,o=0;r&&o<r.length;o++){var a=r[o];a&&e.call(n,a,a.componentIndex)}},e.prototype.getSeriesByName=function(t){var e=r7(t,null);return tE(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return tE(this._componentsMap.get("series"),function(e){return!!e&&e.subType===t})},e.prototype.getSeries=function(){return tE(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,e){x(this),tP(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},e.prototype.eachRawSeries=function(t,e){tP(this._componentsMap.get("series"),function(n){n&&t.call(e,n,n.componentIndex)})},e.prototype.eachSeriesByType=function(t,e,n){x(this),tP(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},e.prototype.eachRawSeriesByType=function(t,e,n){return tP(this.getSeriesByType(t),e,n)},e.prototype.isSeriesFiltered=function(t){return x(this),null==this._seriesIndicesMap.get(t.componentIndex)},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,e){x(this);var n=[];tP(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];t.call(e,r,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=t9(n)},e.prototype.restoreData=function(t){v(this);var e=this._componentsMap,n=[];e.each(function(t,e){h_.hasClass(e)&&n.push(e)}),h_.topologicalTravel(n,h_.getAllClassMainTypes(),function(n){tP(e.get(n),function(e){e&&("series"!==n||!function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}(e,t))&&e.restoreData()})})},e.internalField=void(v=function(t){var e=t._seriesIndices=[];tP(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=t9(e)},x=function(t){},_=function(t,e){t.option={},t.option[hJ]=1,t._componentsMap=t9({series:[]}),t._componentsCount=t9();var n,i,r,o=e.aria;tY(o)&&null==o.enabled&&(o.enabled=!0),n=e,i=t._theme.option,r=n.color&&!n.colorLayer,tP(i,function(t,e){"colorLayer"===e&&r||"color"===e&&n.color||h_.hasClass(e)||("object"==typeof t?n[e]=n[e]?tk(n[e],t,!1):tC(t):null==n[e]&&(n[e]=t))}),tk(e,hL,!1),t._mergeOption(e,null)}),e}(lb);function h0(t,e,n){if(tW(e)){var i=t9();return tP(e,function(t){null!=t&&null!=r7(t,null)&&i.set(t,!0)}),tE(n,function(e){return e&&i.get(e[t])})}var r=r7(e,null);return tE(n,function(e){return e&&null!=r&&e[t]===r})}function h1(t,e){return e.hasOwnProperty("subType")?tE(t,function(t){return t&&t.subType===e.subType}):t}function h2(t){var e=t9();return t&&tP(r2(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}tL(hQ,hq);var h5=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],h3=function(t){tP(h5,function(e){this[e]=tV(t[e],t)},this)},h4=/^(min|max)?(.+)$/,h8=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&(tP(r2(t.series),function(t){t&&t.data&&tZ(t.data)&&(t.data[t3]=!0)}),tP(r2(t.dataset),function(t){t&&t.source&&tZ(t.source)&&(t.source[t3]=!0)})),t=tC(t);var i=this._optionBackup,r=function(t,e,n){var i,r,o=[],a=t.baseOption,s=t.timeline,l=t.options,h=t.media,u=!!t.media,c=!!(l||s||a&&a.timeline);function d(t){tP(e,function(e){e(t,n)})}return a?(r=a).timeline||(r.timeline=s):((c||u)&&(t.options=t.media=null),r=t),u&&tW(h)&&tP(h,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))}),d(r),tP(l,function(t){return d(t)}),tP(o,function(t){return d(t.option)}),{baseOption:r,timelineOptions:l||[],mediaDefault:i,mediaList:o}}(t,e,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],tC(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=tC(n[i.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,n,i=this._api.getWidth(),r=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var h=0,u=o.length;h<u;h++)(function(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return tP(t,function(t,e){var n=e.match(h4);if(n&&n[1]&&n[2]){var o,a,s,l=n[1];o=i[n[2].toLowerCase()],a=t,("min"===(s=l)?o>=a:"max"===s?o<=a:o===a)||(r=!1)}}),r})(o[h].query,i,r)&&s.push(h);return!s.length&&a&&(s=[-1]),s.length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=tR(s,function(t){return tC(-1===t?a.option:o[t].option)})),this._currentMediaIndices=s,l},t}(),h6=tY,h9=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function h7(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=h9.length;n<i;n++){var r=h9[n],o=e.normal,a=e.emphasis;o&&o[r]&&(t[r]=t[r]||{},t[r].normal?tk(t[r].normal,o[r]):t[r].normal=o[r],o[r]=null),a&&a[r]&&(t[r]=t[r]||{},t[r].emphasis?tk(t[r].emphasis,a[r]):t[r].emphasis=a[r],a[r]=null)}}function ut(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,tA(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r,r.focus&&(t.emphasis.focus=r.focus),r.blurScope&&(t.emphasis.blurScope=r.blurScope))}}function ue(t){ut(t,"itemStyle"),ut(t,"lineStyle"),ut(t,"areaStyle"),ut(t,"label"),ut(t,"labelLine"),ut(t,"upperLabel"),ut(t,"edgeLabel")}function un(t,e){var n=h6(t)&&t[e],i=h6(n)&&n.textStyle;if(i)for(var r=0,o=r3.length;r<o;r++){var a=r3[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}function ui(t){t&&(ue(t),un(t,"label"),t.emphasis&&un(t.emphasis,"label"))}function ur(t){return tW(t)?t:t?[t]:[]}function uo(t){return(tW(t)?t[0]:t)||{}}function ua(t){t&&tP(us,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var us=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],ul=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],uh=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function uu(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<uh.length;n++){var i=uh[n][1],r=uh[n][0];null!=e[i]&&(e[r]=e[i])}}function uc(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function ud(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function up(t,e){var n;tP(ur(t.series),function(t){h6(t)&&function(t){if(h6(t)){h7(t),ue(t),un(t,"label"),un(t,"upperLabel"),un(t,"edgeLabel"),t.emphasis&&(un(t.emphasis,"label"),un(t.emphasis,"upperLabel"),un(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(h7(e),ui(e));var n=t.markLine;n&&(h7(n),ui(n));var i=t.markArea;i&&ui(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!tZ(o))for(var a=0;a<o.length;a++)ui(o[a]);tP(t.categories,function(t){ue(t)})}if(r&&!tZ(r))for(var a=0;a<r.length;a++)ui(r[a]);if((e=t.markPoint)&&e.data)for(var s=e.data,a=0;a<s.length;a++)ui(s[a]);if((n=t.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)tW(l[a])?(ui(l[a][0]),ui(l[a][1])):ui(l[a]);"gauge"===t.type?(un(t,"axisLabel"),un(t,"title"),un(t,"detail")):"treemap"===t.type?(ut(t.breadcrumb,"itemStyle"),tP(t.levels,function(t){ue(t)})):"tree"===t.type&&ue(t.leaves)}}(t)}),n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"],e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),tP(n,function(e){tP(ur(t[e]),function(t){t&&(un(t,"axisLabel"),un(t.axisPointer,"label"))})}),tP(ur(t.parallel),function(t){var e=t&&t.parallelAxisDefault;un(e,"axisLabel"),un(e&&e.axisPointer,"label")}),tP(ur(t.calendar),function(t){ut(t,"itemStyle"),un(t,"dayLabel"),un(t,"monthLabel"),un(t,"yearLabel")}),tP(ur(t.radar),function(t){un(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),tP(ur(t.geo),function(t){h6(t)&&(ui(t),tP(ur(t.regions),function(t){ui(t)}))}),tP(ur(t.timeline),function(t){ui(t),ut(t,"label"),ut(t,"itemStyle"),ut(t,"controlStyle",!0);var e=t.data;tW(e)&&tP(e,function(t){tY(t)&&(ut(t,"label"),ut(t,"itemStyle"))})}),tP(ur(t.toolbox),function(t){ut(t,"iconStyle"),tP(t.feature,function(t){ut(t,"iconStyle")})}),un(uo(t.axisPointer),"label"),un(uo(t.tooltip).axisPointer,"label"),t.series=r2(t.series),tP(t.series,function(t){if(tY(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){null!=t.clockWise&&(t.clockwise=t.clockWise),uc(t.label);var n=t.data;if(n&&!tZ(n))for(var i=0;i<n.length;i++)uc(n[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},t.emphasis.scaleSize=null)}else if("gauge"===e){var r=function(t,e){for(var n=e.split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t,"pointer.color");null!=r&&function(t,e,n){for(var i,r=e.split(","),o=t,a=0;a<r.length-1;a++)null==o[i=r[a]]&&(o[i]={}),o=o[i];null==o[r[a]]&&(o[r[a]]=n)}(t,"itemStyle.color",r)}else if("bar"===e){uu(t),uu(t.backgroundStyle),uu(t.emphasis);var n=t.data;if(n&&!tZ(n))for(var i=0;i<n.length;i++)"object"==typeof n[i]&&(uu(n[i]),uu(n[i]&&n[i].emphasis))}else if("sunburst"===e){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),ud(t),function t(e,n){if(e)for(var i=0;i<e.length;i++)n(e[i]),e[i]&&t(e[i].children,n)}(t.data,ud)}else"graph"===e||"sankey"===e?t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency")):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&tA(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),ua(t)}}),t.dataRange&&(t.visualMap=t.dataRange),tP(ul,function(e){var n=t[e];n&&(tW(n)||(n=[n]),tP(n,function(t){ua(t)}))})}var uf=function(t){this.data=t.data||(t.sourceFormat===hE?{}:[]),this.sourceFormat=t.sourceFormat||hz,this.seriesLayoutBy=t.seriesLayoutBy||hV,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];null==i.type&&1===hU(this,n)&&(i.type="ordinal")}};function ug(t){return t instanceof uf}function um(t,e,n){n=n||uv(t);var i=e.seriesLayoutBy,r=function(t,e,n,i,r){if(!t)return{dimensionsDefine:ux(r),startIndex:a,dimensionsDetectedCount:o};if(e===hR){var o,a;"auto"===i||null==i?u_(function(t){null!=t&&"-"!==t&&(tG(t)?null==a&&(a=1):a=0)},n,t,10):a=tj(i)?i:+!!i,r||1!==a||(r=[],u_(function(t,e){r[e]=null!=t?t+"":""},n,t,1/0)),o=r?r.length:"row"===n?t.length:t[0]?t[0].length:null}else if(e===hN)r||(r=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e)return tz(e)}(t));else if(e===hE)r||(r=[],tP(t,function(t,e){r.push(e)}));else if(e===hP){var s=r4(t[0]);o=tW(s)&&s.length||1}return{startIndex:a,dimensionsDefine:ux(r),dimensionsDetectedCount:o}}(t,n,i,e.sourceHeader,e.dimensions);return new uf({data:t,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:tC(e)})}function uy(t){return new uf({data:t,sourceFormat:tZ(t)?hB:hP})}function uv(t){var e=hz;if(tZ(t))e=hB;else if(tW(t)){0===t.length&&(e=hR);for(var n=0,i=t.length;n<i;n++){var r=t[n];if(null!=r){if(tW(r)||tZ(r)){e=hR;break}else if(tY(r)){e=hN;break}}}}else if(tY(t)){for(var o in t)if(en(t,o)&&tO(t[o])){e=hE;break}}return e}function ux(t){if(t){var e=t9();return tR(t,function(t,n){var i={name:(t=tY(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var r=e.get(i.name);return r?i.name+="-"+r.count++:e.set(i.name,{count:1}),i})}}function u_(t,e,n,i){if("row"===e)for(var r=0;r<n.length&&r<i;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;r<o.length&&r<i;r++)t(o[r],r)}function ub(t){var e=t.sourceFormat;return e===hN||e===hE}var uw={},uS="u">typeof console&&console.warn&&console.log;function uM(t,e){!function(t,e,n){if(uS){if(n){if(uw[e])return;uw[e]=!0}console[t]("[ECharts] "+e)}}("error",t,e)}function uC(t){throw Error(t)}var uk=function(){var t;function e(t,e){var n=ug(t)?t:uy(t);this._source=n;var i=this._data=n.data,r=n.sourceFormat;n.seriesLayoutBy,r===hB&&(this._offset=0,this._dimSize=e,this._data=i),k(this,i,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,e){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=void((t=e.prototype).pure=!1,t.persistent=!0),e.internalField=function(){k=function(t,r,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,h=o.dimensionsDefine;tI(t,C[uR(a,s)]),a===hB?(t.getItem=e,t.count=i,t.fillStorage=n):(t.getItem=tV(function(t,e){return uA[uR(t,e)]}(a,s),null,r,l,h),t.count=tV(function(t,e){return uL[uR(t,e)]}(a,s),null,r,l,h))};var t,e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;o<i;o++)e[o]=n[r+o];return e},n=function(t,e,n,i){for(var r=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],h=null==s[1]?-1/0:s[1],u=e-t,c=n[a],d=0;d<u;d++){var p=r[d*o+a];c[t+d]=p,p<l&&(l=p),p>h&&(h=p)}s[0]=l,s[1]=h}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[hR+"_"+hV]={pure:!0,appendData:r},t[hR+"_row"]={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[hN]={pure:!0,appendData:r},t[hE]={pure:!0,appendData:function(t){var e=this._data;tP(t,function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])})}},t[hP]={appendData:r},t[hB]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},C=t}(),e}(),uT=function(t){tW(t)||uM("series.data or dataset.source must be an array.")};(b={})[hR+"_"+hV]=uT,b[hR+"_row"]=uT,b[hN]=uT,b[hE]=function(t,e){for(var n=0;n<e.length;n++)null==e[n].name&&uM("dimension name must not be null/undefined.")},b[hP]=uT;var uI=function(t,e,n,i){return t[i]},uA=((w={})[hR+"_"+hV]=function(t,e,n,i){return t[i+e]},w[hR+"_row"]=function(t,e,n,i,r){i+=e;for(var o=r||[],a=0;a<t.length;a++){var s=t[a];o[a]=s?s[i]:null}return o},w[hN]=uI,w[hE]=function(t,e,n,i,r){for(var o=r||[],a=0;a<n.length;a++){var s=n[a].name,l=null!=s?t[s]:null;o[a]=l?l[i]:null}return o},w[hP]=uI,w),uD=function(t,e,n){return t.length},uL=((S={})[hR+"_"+hV]=function(t,e,n){return Math.max(0,t.length-e)},S[hR+"_row"]=function(t,e,n){var i=t[0];return i?Math.max(0,i.length-e):0},S[hN]=uD,S[hE]=function(t,e,n){var i=n[0].name,r=null!=i?t[i]:null;return r?r.length:0},S[hP]=uD,S),uO=function(t,e,n){return t[e]},uP=((M={})[hR]=uO,M[hN]=function(t,e,n){return t[n]},M[hE]=uO,M[hP]=function(t,e,n){var i=r4(t);return i instanceof Array?i[e]:i},M[hB]=uO,M);function uR(t,e){return t===hR?t+"_"+e:t}function uN(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r=t.getStore(),o=r.getSource().sourceFormat;if(null!=n){var a=t.getDimensionIndex(n),s=r.getDimensionProperty(a);return uP[o](i,a,s)}var l=i;return o===hP&&(l=r4(i)),l}}}var uE=/\{@(.+?)\}/g,uB=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],h=s&&s.stroke,u=this.mainType,c="series"===u,d=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:h,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,i,r,o){e=e||"normal";var a=this.getData(n),s=this.getDataParams(t,n);return(o&&(s.value=o.interpolatedValue),null!=i&&tW(s.value)&&(s.value=s.value[i]),r||(r=a.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"])),tH(r))?(s.status=e,s.dimensionIndex=i,r(s)):tG(r)?l4(r,s).replace(uE,function(e,n){var i=n.length,r=n;"["===r.charAt(0)&&"]"===r.charAt(i-1)&&(r=+r.slice(1,i-1));var s=uN(a,t,r);if(o&&tW(o.interpolatedValue)){var l=a.getDimensionIndex(r);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},t.prototype.getRawValue=function(t,e){return uN(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function uz(t){var e,n;return tY(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function uV(t){return new uF(t)}var uF=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n,i,r,o=this._upstream,a=t&&t.skip;if(this._dirty&&o){var s=this.context;s.data=s.outputData=o.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(i=this._plan(this.context));var l=((e=this._modBy)>=1||(e=1),e),h=this._modDataCount||0,u=((n=t&&t.modBy)>=1||(n=1),n),c=t&&t.modDataCount||0;(l!==u||h!==c)&&(i="reset"),(this._dirty||"reset"===i)&&(this._dirty=!1,r=this._doReset(a)),this._modBy=u,this._modDataCount=c;var d=t&&t.step;if(o?this._dueEnd=o._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!a&&(r||p<f)){var g=this._progress;if(tW(g))for(var m=0;m<g.length;m++)this._doProgress(g[m],p,f,u,c);else this._doProgress(g,p,f,u,c)}this._dueIndex=f;var y=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,n,i,r){uW.reset(e,n,i,r),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:uW.next},this.context)},t.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),tW(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var e,n,i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),uW=function(){var t,e,n,i,r,o={reset:function(l,h,u,c){e=l,t=h,n=u,r=Math.ceil((i=c)/n),o.next=n>1&&i>0?s:a}};return o;function a(){return e<t?e++:null}function s(){var o=e%r*n+Math.ceil(e/r),a=e>=t?null:o<i?o:e;return e++,a}}();function uH(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||tj(t)||null==t||"-"===t||(t=+rj(t)),null==t||""===t?NaN:Number(t))}var uG=t9({number:function(t){return parseFloat(t)},time:function(t){return+rj(t)},trim:function(t){return tG(t)?t5(t):t}}),uU={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},uj=function(){function t(t,e){tj(e)||uC(""),this._opFn=uU[t],this._rvalFloat=rK(e)}return t.prototype.evaluate=function(t){return tj(t)?this._opFn(t,this._rvalFloat):this._opFn(rK(t),this._rvalFloat)},t}(),uY=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=tj(t)?t:rK(t),i=tj(e)?e:rK(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=tG(t),s=tG(e);a&&(n=s?t:0),s&&(i=a?e:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},t}(),uX=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=rK(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&("number"===n||"number"===this._rvalTypeof)&&(e=rK(t)===this._rvalFloat)}return this._isEQ?e:!e},t}(),uZ=function(){function t(){}return t.prototype.getRawData=function(){throw Error("not supported")},t.prototype.getRawDataItem=function(t){throw Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return uH(t,e)},t}();function uq(t){return u0(t.sourceFormat)||uC(""),t.data}function uK(t){var e=t.sourceFormat,n=t.data;if(u0(e)||uC(""),e===hR){for(var i=[],r=0,o=n.length;r<o;r++)i.push(n[r].slice());return i}if(e===hN){for(var i=[],r=0,o=n.length;r<o;r++)i.push(tI({},n[r]));return i}}function u$(t,e,n){if(null!=n){if(tj(n)||!isNaN(n)&&!en(e,n))return t[n];else if(en(e,n))return e[n]}}function uJ(t){return tC(t)}var uQ=t9();function u0(t){return t===hR||t===hN}var u1="undefined",u2=typeof Uint32Array===u1?Array:Uint32Array,u5=typeof Uint16Array===u1?Array:Uint16Array,u3=typeof Int32Array===u1?Array:Int32Array,u4=typeof Float64Array===u1?Array:Float64Array,u8={float:u4,int:u3,ordinal:Array,number:Array,time:u4};function u6(t){return t>65535?u2:u5}function u9(){return[1/0,-1/0]}function u7(t,e,n,i,r){var o=u8[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),h=0;h<s;h++)l[h]=a[h];t[e]=l}}else t[e]=new o(i)}var ct=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=t9()}return t.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),r=this.defaultDimValueGetter=T[i.sourceFormat];this._dimValueGetter=n||r,this._rawExtent=[],ub(i),this._dimensions=tR(e,function(t){return{type:t.type,property:t.property}}),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,r=n.get(t);if(null!=r){if(i[r].type===e)return r}else r=i.length;return i[r]={type:e},n.set(t,r),this._chunks[r]=new u8[e||"float"](this._rawCount),this._rawExtent[r]=u9(),r},t.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],r=this._rawExtent,o=i.ordinalOffset||0,a=n.length;0===o&&(r[t]=u9());for(var s=r[t],l=o;l<a;l++){var h=n[l]=e.parseAndCollect(n[l]);isNaN(h)||(s[0]=Math.min(h,s[0]),s[1]=Math.max(h,s[1]))}i.ordinalMeta=e,i.ordinalOffset=a,i.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,r=i.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;l<r;l++){var h=i[l];u7(n,l,h.type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<r;p++){var h=i[p],f=T.arrayRows.call(this,t[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=tR(o,function(t){return t.property}),h=0;h<a;h++){var u=o[h];s[h]||(s[h]=u9()),u7(r,h,u.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,r,s);else for(var c=[],d=t;d<e;d++){c=i.getItem(d,c);for(var p=0;p<a;p++){var f=r[p],g=this._dimValueGetter(c,l[p],d,p);f[d]=g;var m=s[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.getValues=function(t,e){var n=[],i=[];if(null==e){e=t,t=[];for(var r=0;r<this._dimensions.length;r++)i.push(r)}else i=t;for(var r=0,o=i.length;r<o;r++)n.push(this.get(i[r],e));return n},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},t.prototype.getSum=function(t){var e=this._chunks[t],n=0;if(e)for(var i=0,r=this.count();i<r;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(t){var e=[];this.each([t],function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return -1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;i<=r;){var o=(i+r)/2|0;if(e[o]<t)i=o+1;else{if(!(e[o]>t))return o;r=o-1}}return -1},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r<i;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else{var n=u6(this._rawCount);t=new n(this.count());for(var r=0;r<t.length;r++)t[r]=r}return t},t.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),r=new(u6(n._rawCount))(i),o=[],a=t.length,s=0,l=t[0],h=n._chunks,u=0;u<i;u++){var c=void 0,d=n.getRawIndex(u);if(0===a)c=e(u);else if(1===a)c=e(h[l][d],u);else{for(var p=0;p<a;p++)o[p]=h[t[p]][d];o[p]=u,c=e.apply(null,o)}c&&(r[s++]=d)}return s<i&&(n._indices=r),n._count=s,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=tz(t),r=i.length;if(!r)return this;var o=e.count(),a=new(u6(e._rawCount))(o),s=0,l=i[0],h=t[l][0],u=t[l][1],c=e._chunks,d=!1;if(!e._indices){var p=0;if(1===r){for(var f=c[i[0]],g=0;g<n;g++){var m=f[g];(m>=h&&m<=u||isNaN(m))&&(a[s++]=p),p++}d=!0}else if(2===r){for(var f=c[i[0]],y=c[i[1]],v=t[i[1]][0],x=t[i[1]][1],g=0;g<n;g++){var m=f[g],_=y[g];(m>=h&&m<=u||isNaN(m))&&(_>=v&&_<=x||isNaN(_))&&(a[s++]=p),p++}d=!0}}if(!d)if(1===r)for(var g=0;g<o;g++){var b=e.getRawIndex(g),m=c[i[0]][b];(m>=h&&m<=u||isNaN(m))&&(a[s++]=b)}else for(var g=0;g<o;g++){for(var w=!0,b=e.getRawIndex(g),S=0;S<r;S++){var M=i[S],m=c[M][b];(m<t[M][0]||m>t[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return s<o&&(e._indices=a),e._count=s,e._extent=[],e._updateGetRawIdx(),e},t.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},t.prototype.modify=function(t,e){this._updateDims(this,t,e)},t.prototype._updateDims=function(t,e,n){for(var i=t._chunks,r=[],o=e.length,a=t.count(),s=[],l=t._rawExtent,h=0;h<e.length;h++)l[e[h]]=u9();for(var u=0;u<a;u++){for(var c=t.getRawIndex(u),d=0;d<o;d++)s[d]=i[e[d]][c];s[o]=u;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(var h=0;h<p.length;h++){var f=e[h],g=p[h],m=l[f],y=i[f];y&&(y[c]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,h=Math.floor(1/e),u=this.getRawIndex(0),c=new(u6(this._rawCount))(Math.min((Math.ceil(s/h)+2)*2,s));c[l++]=u;for(var d=1;d<s-1;d+=h){for(var p=Math.min(d+h,s-1),f=Math.min(d+2*h,s),g=(f+p)/2,m=0,y=p;y<f;y++){var v=this.getRawIndex(y),x=a[v];isNaN(x)||(m+=x)}m/=f-p;var _=d,b=Math.min(d+h,s),w=d-1,S=a[u];n=-1,r=_;for(var M=-1,C=0,y=_;y<b;y++){var v=this.getRawIndex(y),x=a[v];if(isNaN(x)){C++,M<0&&(M=v);continue}(i=Math.abs((w-g)*(x-S)-(w-y)*(m-S)))>n&&(n=i,r=v)}C>0&&C<b-_&&(c[l++]=Math.min(M,r),r=Math.max(M,r)),c[l++]=r,u=r}return c[l++]=this.getRawIndex(s-1),o._count=l,o._indices=c,o.getRawIndex=this._getRawIdx,o},t.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,r=Math.floor(1/e),o=i[t],a=this.count(),s=new(u6(this._rawCount))(2*Math.ceil(a/r)),l=0,h=0;h<a;h+=r){var u=h,c=o[this.getRawIndex(u)],d=h,p=o[this.getRawIndex(d)],f=r;h+r>a&&(f=a-h);for(var g=0;g<f;g++){var m=o[this.getRawIndex(h+g)];m<c&&(c=m,u=h+g),m>p&&(p=m,d=h+g)}var y=this.getRawIndex(u),v=this.getRawIndex(d);u<d?(s[l++]=y,s[l++]=v):(s[l++]=v,s[l++]=y)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},t.prototype.downSample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=Math.floor(1/e),l=o[t],h=this.count(),u=r._rawExtent[t]=u9(),c=new(u6(this._rawCount))(Math.ceil(h/s)),d=0,p=0;p<h;p+=s){s>h-p&&(a.length=s=h-p);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var m=n(a),y=this.getRawIndex(Math.min(p+i(a,m)||0,h-1));l[y]=m,m<u[0]&&(u[0]=m),m>u[1]&&(u[1]=m),c[d++]=y}return r._count=d,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();r<o;r++){var a=this.getRawIndex(r);switch(n){case 0:e(r);break;case 1:e(i[t[0]][a],r);break;case 2:e(i[t[0]][a],i[t[1]][a],r);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[t[s]][a];l[s]=r,e.apply(null,l)}}},t.prototype.getDataExtent=function(t){var e,n=this._chunks[t],i=u9();if(!n)return i;var r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(e=this._extent[t])return e.slice();for(var o=(e=i)[0],a=e[1],s=0;s<r;s++){var l=n[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return e=[o,a],this._extent[t]=e,e},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r<i.length;r++)n.push(i[r][e]);return n},t.prototype.clone=function(e,n){var i=new t,r=this._chunks,o=e&&tN(e,function(t,e){return t[e]=!0,t},{});if(o)for(var a=0;a<r.length;a++)i._chunks[a]=o[a]?function(t){var e=t.constructor;return e===Array?t.slice():new e(t)}(r[a]):r[a];else i._chunks=r;return this._copyCommonProps(i),n||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=tC(this._extent),t._rawExtent=tC(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var i=0;i<n;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return uH(t[i],this._dimensions[i])}T={arrayRows:t,objectRows:function(t,e,n,i){return uH(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return uH(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),ce=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(ci(n)){var o=void 0,a=void 0,s=void 0;if(r){var l=i[0];l.prepareSource(),o=(s=l.getSource()).data,a=s.sourceFormat,e=[l._getVersionSign()]}else a=tZ(o=n.get("data",!0))?hB:hP,e=[];var h=this._getSourceMetaRawOption()||{},u=s&&s.metaRawOption||{},c=tJ(h.seriesLayoutBy,u.seriesLayoutBy)||null,d=tJ(h.sourceHeader,u.sourceHeader),p=tJ(h.dimensions,u.dimensions);t=c!==u.seriesLayoutBy||!!d!=!!u.sourceHeader||p?[um(o,{seriesLayoutBy:c,sourceHeader:d,dimensions:p},a)]:[]}else if(r){var f=this._applyTransform(i);t=f.sourceList,e=f.upstreamSignList}else t=[um(n.get("source",!0),this._getSourceMetaRawOption(),null)],e=[];this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n,i=this._sourceHost,r=i.get("transform",!0),o=i.get("fromTransformResult",!0);null!=o&&1!==t.length&&cr("");var a=[],s=[];return(tP(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||cr(""),a.push(e),s.push(t._getVersionSign())}),r)?n=function(t,e,n){var i=r2(t),r=i.length;r||uC("");for(var o=0;o<r;o++)e=function(t,e){e.length||uC(""),tY(t)||uC("");var n=t.type,i=uQ.get(n);i||uC("");var r=tR(e,function(t){return function(t,e){var n=new uZ,i=t.data,r=n.sourceFormat=t.sourceFormat,o=t.startIndex;t.seriesLayoutBy!==hV&&uC("");var a=[],s={},l=t.dimensionsDefine;if(l)tP(l,function(t,e){var n=t.name,i={index:e,name:n,displayName:t.displayName};a.push(i),null!=n&&(en(s,n)&&uC(""),s[n]=i)});else for(var h=0;h<t.dimensionsDetectedCount||0;h++)a.push({index:h});var u=uA[uR(r,hV)];e.__isBuiltIn&&(n.getRawDataItem=function(t){return u(i,o,a,t)},n.getRawData=tV(uq,null,t)),n.cloneRawData=tV(uK,null,t),n.count=tV(uL[uR(r,hV)],null,i,o,a);var c=uP[r];n.retrieveValue=function(t,e){return d(u(i,o,a,t),e)};var d=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=a[e];if(n)return c(t,e,n.name)}};return n.getDimensionInfo=tV(u$,null,a,s),n.cloneAllDimensionInfo=tV(uJ,null,a),n}(t,i)});return tR(r2(i.transform({upstream:r[0],upstreamList:r,config:tC(t.config)})),function(t,n){tY(t)||uC(""),t.data||uC(""),u0(uv(t.data))||uC("");var i,r=e[0];if(r&&0===n&&!t.dimensions){var o=r.startIndex;o&&(t.data=r.data.slice(0,o).concat(t.data)),i={seriesLayoutBy:hV,sourceHeader:o,dimensions:r.metaRawOption.dimensions}}else i={seriesLayoutBy:hV,sourceHeader:0,dimensions:t.dimensions};return um(t.data,i,null)})}(i[o],e),o!==r-1&&(e.length=Math.max(e.length,1));return e}(r,a,{datasetIndex:i.componentIndex}):null!=o&&(n=[new uf({data:(e=a[0]).data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:tC(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})]),{sourceList:n,upstreamSignList:s}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},t.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},t.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},t.prototype._innerGetDataStore=function(t,e,n){var i=this._storeList,r=i[0];r||(r=i[0]={});var o=r[n];if(!o){var a=this._getUpstreamSourceManagers()[0];ci(this._sourceHost)&&a?o=a._innerGetDataStore(t,e,n):(o=new ct).initData(new uk(e,t.length),t),r[n]=o}return o},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(ci(t)){var e=hG(t);return e?[e.getSourceManager()]:[]}return tR(t.get("transform",!0)||t.get("fromTransformResult",!0)?oh(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},os).models:[],function(t){return t.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;return ci(i)?(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},t}();function cn(t){t.option.transform&&(t.option.transform[t3]=!0)}function ci(t){return"series"===t.mainType}function cr(t){throw Error(t)}function co(t){var e=t.lineHeight;return null==e?"line-height:1":"line-height:"+eP(e+"")+"px"}function ca(t,e){var n=t.color||hS.color.tertiary,i=t.fontSize||12,r=t.fontWeight||"400",o=t.color||hS.color.secondary,a=t.fontSize||14,s=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+eP(i+"")+"px;color:"+eP(n)+";font-weight:"+eP(r+""),valueStyle:"font-size:"+eP(a+"")+"px;color:"+eP(o)+";font-weight:"+eP(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:r},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var cs=[0,10,20,30],cl=["","\n","\n\n","\n\n\n"];function ch(t,e){return e.type=t,e}function cu(t){return"section"===t.type}function cc(t,e,n,i){var r,o=e.noHeader,a={html:cs[r=function t(e){if(cu(e)){var n=0,i=e.blocks.length,r=i>1||i>0&&!e.noHeader;return tP(e.blocks,function(e){var i=t(e);i>=n&&(n=i+ +(r&&(!i||cu(e)&&!e.noHeader)))}),n}return 0}(e)],richText:cl[r]},s=[],l=e.blocks||[];t2(!l||tW(l)),l=l||[];var h=t.orderMode;if(e.sortBlocks&&h){l=l.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(en(u,h)){var c=new uY(u[h],null);l.sort(function(t,e){return c.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===h&&l.reverse()}tP(l,function(n,r){var o=e.valueFormatter,l=(cu(n)?cc:cd)(o?tI(tI({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)});var d="richText"===t.renderMode?s.join(a.richText):cf(i,s.join(""),o?n:a.html);if(o)return d;var p=l2(e.header,"ordinal",t.useUTC),f=ca(i,t.renderMode).nameStyle,g=co(i);return"richText"===t.renderMode?cg(t,p,f)+a.richText+d:cf(i,'<div style="'+f+";"+g+';">'+eP(p)+"</div>"+d,n)}function cd(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,h=t.useUTC,u=e.valueFormatter||t.valueFormatter||function(t){return tR(t=tW(t)?t:[t],function(t,e){return l2(t,tW(b)?b[e]:b,h)})};if(!o||!a){var c,d,p,f,g,m,y,v,x=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||hS.color.secondary,r),_=o?"":l2(l,"ordinal",h),b=e.valueType,w=a?[]:u(e.value,e.dataIndex),S=!s||!o,M=!s&&o,C=ca(i,r),k=C.nameStyle,T=C.valueStyle;return"richText"===r?(s?"":x)+(o?"":cg(t,_,k))+(a?"":(c=t,d=w,p=S,f=M,g=[T],p&&g.push({padding:[0,0,0,f?10:20],align:"right"}),c.markupStyleCreator.wrapRichTextStyle(tW(d)?d.join(" "):d,g))):cf(i,(s?"":x)+(o?"":'<span style="'+k+";"+(s?"":"margin-left:2px")+'">'+eP(_)+"</span>")+(a?"":(m=w,y=S,v=M,'<span style="'+(y?"float:right;margin-left:"+(v?"10px":"20px"):"")+";"+T+'">'+tR(m=tW(m)?m:[m],function(t){return eP(t)}).join("&nbsp;&nbsp;")+"</span>")),n)}}function cp(t,e,n,i,r,o){if(t)return(cu(t)?cc:cd)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function cf(t,e,n){return'<div style="margin: '+n+"px 0 0;"+co(t)+';">'+e+'<div style="clear:both"></div></div>'}function cg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function cm(t,e){return l8(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function cy(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var cv=function(){function t(){this.richTextStyles={},this._nextStyleNameId=rJ()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i,r,o,a,s,l,h="richText"===n?this._generateStyleName():null,u=(a=(o=tG(i={color:e,type:t,renderMode:n,markerId:h})?{color:i,extraCssText:r}:i||{}).color,s=o.type,r=o.extraCssText,l=o.renderMode||"html",a?"html"===l?"subItem"===s?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+eP(a)+";"+(r||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+eP(a)+";"+(r||"")+'"></span>':{renderMode:l,content:"{"+(o.markerId||"markerX")+"|} ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}:"");return tG(u)?u:(this.richTextStyles[h]=u.style,u.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};tW(e)?tP(e,function(t){return tI(n,t)}):tI(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function cx(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),h=l.mapDimensionsAll("defaultedTooltip"),u=h.length,c=o.getRawValue(a),d=tW(c),p=cm(o,a);if(u>1||d&&!u){var f=function(t,e,n,i,r){var o=e.getData(),a=tN(t,function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],h=[];function u(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?h.push(ch("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?tP(i,function(t){u(uN(o,n,t),t)}):tP(t,u),{inlineValues:s,inlineValueTypes:l,blocks:h}}(c,o,a,h,p);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(u){var g=l.getDimensionInfo(h[0]);r=e=uN(l,a,h[0]),n=g.type}else r=e=d?c[0]:c;var m=ot(o),y=m&&o.name||"",v=l.getName(a),x=s?y:v;return ch("section",{header:y,noHeader:s||!m,sortParam:r,blocks:[ch("nameValue",{markerType:"item",markerColor:p,name:x,noName:!t5(x),value:e,valueType:n,dataIndex:a})].concat(i||[])})}var c_=oi();function cb(t,e){return t.getName(e)||t.getId(e)}var cw="__universalTransitionEnabled",cS=function(t){var e;function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return to(n,t),n.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=uV({count:cC,reset:ck}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(c_(this).sourceManager=new ce(this)).prepareSource();var i=this.getInitialData(t,n);cI(i,this),this.dataTask.context.data=i,c_(this).dataBeforeProcessed=i,cM(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=hg(this),i=n?hy(t):{},r=this.subType;h_.hasClass(r)&&(r+="Series"),tk(t,e.getTheme().get(this.subType)),tk(t,this.getDefaultOption()),r5(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&hm(t,i,n)},n.prototype.mergeOption=function(t,e){t=tk(this.option,t,!0),this.fillDataTextStyle(t.data);var n=hg(this);n&&hm(this.option,t,n);var i=c_(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);cI(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,c_(this).dataBeforeProcessed=r,cM(this),this._initSelectedMapFromData(r)},n.prototype.fillDataTextStyle=function(t){if(t&&!tZ(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&r5(t[n],"label",e)},n.prototype.getInitialData=function(t,e){},n.prototype.appendData=function(t){this.getRawData().appendData(t.data)},n.prototype.getData=function(t){var e=cD(this);if(!e)return c_(this).data;var n=e.context.data;return null!=t&&n.getLinkedData?n.getLinkedData(t):n},n.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},n.prototype.setData=function(t){var e=cD(this);if(e){var n=e.context;n.outputData=t,e!==this.dataTask&&(n.data=t)}c_(this).data=t},n.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return t9(t)},n.prototype.getSourceManager=function(){return c_(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return c_(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},n.prototype.indicesOfNearest=function(t,e,n,i){var r=this.getData(),o=this.coordinateSystem,a=o&&o.getAxis(t);if(!o||!a)return[];var s=a.dataToCoord(n);null==i&&(i=1/0);var l=[],h=1/0,u=-1,c=0;return r.each(e,function(t,e){var n=s-a.dataToCoord(t),r=Math.abs(n);r<=i&&((r<h||r===h&&n>=0&&u<0)&&(h=r,u=n,c=0),n===u&&(l[c++]=e))}),l.length=c,l},n.prototype.formatTooltip=function(t,e,n){return cx({series:this,dataIndex:t,multipleSeries:e})},n.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(ts.node&&!(t&&t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=hq.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},n.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<t.length;o++){var a=cb(r,t[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,e=tz(t),n=[],i=0;i<e.length;i++){var r=t[e[i]];r>=0&&n.push(r)}return n},n.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[cb(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this[cw])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a){if("series"===o)r.selectedMap="all";else if("multiple"===o){tY(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l<a;l++){var h=e[l],u=cb(t,h);s[u]=!0,this._selectedDataIndicesMap[u]=t.getRawIndex(h)}}else if("single"===o||!0===o){var c=e[a-1],u=cb(t,c);(n={})[u]=!0,r.selectedMap=n,this._selectedDataIndicesMap=((i={})[u]=t.getRawIndex(c),i)}}},n.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each(function(n){var i=t.getRawDataItem(n);i&&i.selected&&e.push(n)}),e.length>0&&this._innerSelect(t,e)}},n.registerClass=function(t){return h_.registerClass(t)},n.protoInitialize=void((e=n.prototype).type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"),n}(h_);function cM(t){var e,n,i,r=t.name;ot(t)||(t.name=(n=(e=t.getRawData()).mapDimensionsAll("seriesName"),i=[],tP(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")||r))}function cC(t){return t.model.getRawData().count()}function ck(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cT}function cT(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function cI(t,e){tP(t7(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,tF(cA,e))})}function cA(t,e){var n=cD(t);return n&&n.setOutputEnd((e||this).count()),e}function cD(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}tL(cS,uB),tL(cS,hq),ox(cS,h_);var cL=function(){function t(){this.group=new rT,this.uid=lS("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function cO(){var t=oi();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!!(i&&i.large),s=n.progressiveRender=!!(i&&i.progressiveRender);return(r!==a||o!==s)&&"reset"}}ov(cL),oS(cL);var cP=a_.CMD,cR=[[],[],[]],cN=Math.sqrt,cE=Math.atan2;function cB(t,e){if(e){var n,i,r,o,a,s,l=t.data,h=t.len(),u=cP.M,c=cP.C,d=cP.L,p=cP.R,f=cP.A,g=cP.Q;for(r=0,o=0;r<h;){switch(n=l[r++],o=r,i=0,n){case u:case d:i=1;break;case c:i=3;break;case g:i=2;break;case f:var m=e[4],y=e[5],v=cN(e[0]*e[0]+e[1]*e[1]),x=cN(e[2]*e[2]+e[3]*e[3]),_=cE(-e[1]/x,e[0]/v);l[r]*=v,l[r++]+=m,l[r]*=x,l[r++]+=y,l[r++]*=v,l[r++]*=x,l[r++]+=_,l[r++]+=_,r+=2,o=r;break;case p:s[0]=l[r++],s[1]=l[r++],ev(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ev(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<i;a++){var b=cR[a];b[0]=l[r++],b[1]=l[r++],ev(b,b,e),l[o++]=b[0],l[o++]=b[1]}}t.increaseVersion()}}var cz=Math.sqrt,cV=Math.sin,cF=Math.cos,cW=Math.PI;function cH(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function cG(t,e){return(t[0]*e[0]+t[1]*e[1])/(cH(t)*cH(e))}function cU(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(cG(t,e))}function cj(t,e,n,i,r,o,a,s,l,h,u){var c=cW/180*l,d=cF(c)*(t-n)/2+cV(c)*(e-i)/2,p=-1*cV(c)*(t-n)/2+cF(c)*(e-i)/2,f=d*d/(a*a)+p*p/(s*s);f>1&&(a*=cz(f),s*=cz(f));var g=(r===o?-1:1)*cz((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,m=g*a*p/s,y=-(g*s)*d/a,v=(t+n)/2+cF(c)*m-cV(c)*y,x=(e+i)/2+cV(c)*m+cF(c)*y,_=cU([1,0],[(d-m)/a,(p-y)/s]),b=[(d-m)/a,(p-y)/s],w=[(-1*d-m)/a,(-1*p-y)/s],S=cU(b,w);if(-1>=cG(b,w)&&(S=cW),cG(b,w)>=1&&(S=0),S<0){var M=Math.round(S/cW*1e6)/1e6;S=2*cW+M%2*cW}u.addData(h,v,x,a,s,_,S,c,o)}var cY=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,cX=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,cZ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.applyTransform=function(t){},e}(aN);function cq(t){return null!=t.setData}function cK(t,e){var n=function(t){var e,n=new a_;if(!t)return n;var i=0,r=0,o=0,a=0,s=a_.CMD,l=t.match(cY);if(!l)return n;for(var h=0;h<l.length;h++){for(var u=l[h],c=u.charAt(0),d=void 0,p=u.match(cX)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var y=void 0,v=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=i,C=r,k=void 0,T=void 0;switch(c){case"l":i+=p[m++],r+=p[m++],d=s.L,n.addData(d,i,r);break;case"L":i=p[m++],r=p[m++],d=s.L,n.addData(d,i,r);break;case"m":i+=p[m++],r+=p[m++],d=s.M,n.addData(d,i,r),o=i,a=r,c="l";break;case"M":i=p[m++],r=p[m++],d=s.M,n.addData(d,i,r),o=i,a=r,c="L";break;case"h":i+=p[m++],d=s.L,n.addData(d,i,r);break;case"H":i=p[m++],d=s.L,n.addData(d,i,r);break;case"v":r+=p[m++],d=s.L,n.addData(d,i,r);break;case"V":r=p[m++],d=s.L,n.addData(d,i,r);break;case"C":d=s.C,n.addData(d,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),i=p[m-2],r=p[m-1];break;case"c":d=s.C,n.addData(d,p[m++]+i,p[m++]+r,p[m++]+i,p[m++]+r,p[m++]+i,p[m++]+r),i+=p[m-2],r+=p[m-1];break;case"S":y=i,v=r,k=n.len(),T=n.data,e===s.C&&(y+=i-T[k-4],v+=r-T[k-3]),d=s.C,M=p[m++],C=p[m++],i=p[m++],r=p[m++],n.addData(d,y,v,M,C,i,r);break;case"s":y=i,v=r,k=n.len(),T=n.data,e===s.C&&(y+=i-T[k-4],v+=r-T[k-3]),d=s.C,M=i+p[m++],C=r+p[m++],i+=p[m++],r+=p[m++],n.addData(d,y,v,M,C,i,r);break;case"Q":M=p[m++],C=p[m++],i=p[m++],r=p[m++],d=s.Q,n.addData(d,M,C,i,r);break;case"q":M=p[m++]+i,C=p[m++]+r,i+=p[m++],r+=p[m++],d=s.Q,n.addData(d,M,C,i,r);break;case"T":y=i,v=r,k=n.len(),T=n.data,e===s.Q&&(y+=i-T[k-4],v+=r-T[k-3]),i=p[m++],r=p[m++],d=s.Q,n.addData(d,y,v,i,r);break;case"t":y=i,v=r,k=n.len(),T=n.data,e===s.Q&&(y+=i-T[k-4],v+=r-T[k-3]),i+=p[m++],r+=p[m++],d=s.Q,n.addData(d,y,v,i,r);break;case"A":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],M=i,C=r,i=p[m++],cj(M,C,i,r=p[m++],w,S,x,_,b,d=s.A,n);break;case"a":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],M=i,C=r,i+=p[m++],cj(M,C,i,r+=p[m++],w,S,x,_,b,d=s.A,n)}}("z"===c||"Z"===c)&&(d=s.Z,n.addData(d),i=o,r=a),e=d}return n.toStatic(),n}(t),i=tI({},e);return i.buildPath=function(t){var e=cq(t);if(e&&t.canSave()){t.appendPath(n);var i=t.getContext();i&&t.rebuildPath(i,1)}else{var i=e?t.getContext():t;i&&n.rebuildPath(i,1)}},i.applyTransform=function(t){cB(n,t),this.dirtyShape()},i}function c$(t,e){e=e||{};var n=new aN;return t.shape&&n.setShape(t.shape),n.setStyle(t.style),e.bakeTransform?cB(n.path,t.getComputedTransform()):e.toLocal?n.setLocalTransform(t.getComputedTransform()):n.copyTransform(t),n.buildPath=t.buildPath,n.applyTransform=n.applyTransform,n.z=t.z,n.z2=t.z2,n.zlevel=t.zlevel,n}var cJ=function(){this.cx=0,this.cy=0,this.r=0},cQ=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new cJ},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(aN);cQ.prototype.type="circle";var c0=cQ,c1=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},c2=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new c1},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.rx,o=e.ry,a=.5522848*r,s=.5522848*o;t.moveTo(n-r,i),t.bezierCurveTo(n-r,i-s,n-a,i-o,n,i-o),t.bezierCurveTo(n+a,i-o,n+r,i-s,n+r,i),t.bezierCurveTo(n+r,i+s,n+a,i+o,n,i+o),t.bezierCurveTo(n-a,i+o,n-r,i+s,n-r,i),t.closePath()},e}(aN);c2.prototype.type="ellipse";var c5=c2,c3=Math.PI,c4=2*c3,c8=Math.sin,c6=Math.cos,c9=Math.acos,c7=Math.atan2,dt=Math.abs,de=Math.sqrt,dn=Math.max,di=Math.min;function dr(t,e,n,i,r,o,a){var s=t-n,l=e-i,h=(a?o:-o)/de(s*s+l*l),u=h*l,c=-h*s,d=t+u,p=e+c,f=n+u,g=i+c,m=(d+f)/2,y=(p+g)/2,v=f-d,x=g-p,_=v*v+x*x,b=r-o,w=d*g-f*p,S=(x<0?-1:1)*de(dn(0,b*b*_-w*w)),M=(w*x-v*S)/_,C=(-w*v-x*S)/_,k=(w*x+v*S)/_,T=(-w*v+x*S)/_,I=M-m,A=C-y,D=k-m,L=T-y;return I*I+A*A>D*D+L*L&&(M=k,C=T),{cx:M,cy:C,x0:-u,y0:-c,x1:M*(r/b-1),y1:C*(r/b-1)}}var da=function(){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},ds=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new da},e.prototype.buildPath=function(t,e){!function(t,e){var n,i=dn(e.r,0),r=dn(e.r0||0,0),o=i>0,a=r>0;if(o||a){if(o||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=e.startAngle,h=e.endAngle;if(!(isNaN(l)||isNaN(h))){var u=e.cx,c=e.cy,d=!!e.clockwise,p=dt(h-l),f=p>c4&&p%c4;if(f>1e-4&&(p=f),i>1e-4)if(p>c4-1e-4)t.moveTo(u+i*c6(l),c+i*c8(l)),t.arc(u,c,i,l,h,!d),r>1e-4&&(t.moveTo(u+r*c6(h),c+r*c8(h)),t.arc(u,c,r,h,l,d));else{var g=void 0,m=void 0,y=void 0,v=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0,C=void 0,k=void 0,T=void 0,I=void 0,A=void 0,D=void 0,L=i*c6(l),O=i*c8(l),P=r*c6(h),R=r*c8(h),N=p>1e-4;if(N){var E=e.cornerRadius;E&&(g=(n=function(t){var e;if(tW(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(E))[0],m=n[1],y=n[2],v=n[3]);var B=dt(i-r)/2;if(x=di(B,y),_=di(B,v),b=di(B,g),w=di(B,m),C=S=dn(x,_),k=M=dn(b,w),(S>1e-4||M>1e-4)&&(T=i*c6(h),I=i*c8(h),A=r*c6(l),D=r*c8(l),p<c3)){var z=function(t,e,n,i,r,o,a,s){var l=n-t,h=i-e,u=a-r,c=s-o,d=c*l-u*h;if(!(d*d<1e-4))return d=(u*(e-o)-c*(t-r))/d,[t+d*l,e+d*h]}(L,O,A,D,T,I,P,R);if(z){var V=L-z[0],F=O-z[1],W=T-z[0],H=I-z[1],G=1/c8(c9((V*W+F*H)/(de(V*V+F*F)*de(W*W+H*H)))/2),U=de(z[0]*z[0]+z[1]*z[1]);C=di(S,(i-U)/(G+1)),k=di(M,(r-U)/(G-1))}}}if(N)if(C>1e-4){var j=di(y,C),Y=di(v,C),X=dr(A,D,L,O,i,j,d),Z=dr(T,I,P,R,i,Y,d);t.moveTo(u+X.cx+X.x0,c+X.cy+X.y0),C<S&&j===Y?t.arc(u+X.cx,c+X.cy,C,c7(X.y0,X.x0),c7(Z.y0,Z.x0),!d):(j>0&&t.arc(u+X.cx,c+X.cy,j,c7(X.y0,X.x0),c7(X.y1,X.x1),!d),t.arc(u,c,i,c7(X.cy+X.y1,X.cx+X.x1),c7(Z.cy+Z.y1,Z.cx+Z.x1),!d),Y>0&&t.arc(u+Z.cx,c+Z.cy,Y,c7(Z.y1,Z.x1),c7(Z.y0,Z.x0),!d))}else t.moveTo(u+L,c+O),t.arc(u,c,i,l,h,!d);else t.moveTo(u+L,c+O);if(r>1e-4&&N)if(k>1e-4){var j=di(g,k),Y=di(m,k),X=dr(P,R,T,I,r,-Y,d),Z=dr(L,O,A,D,r,-j,d);t.lineTo(u+X.cx+X.x0,c+X.cy+X.y0),k<M&&j===Y?t.arc(u+X.cx,c+X.cy,k,c7(X.y0,X.x0),c7(Z.y0,Z.x0),!d):(Y>0&&t.arc(u+X.cx,c+X.cy,Y,c7(X.y0,X.x0),c7(X.y1,X.x1),!d),t.arc(u,c,r,c7(X.cy+X.y1,X.cx+X.x1),c7(Z.cy+Z.y1,Z.cx+Z.x1),d),j>0&&t.arc(u+Z.cx,c+Z.cy,j,c7(Z.y1,Z.x1),c7(Z.y0,Z.x0),!d))}else t.lineTo(u+P,c+R),t.arc(u,c,r,h,l,d);else t.lineTo(u+P,c+R)}else t.moveTo(u,c);t.closePath()}}}(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(aN);ds.prototype.type="sector";var dl=ds,dh=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},du=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new dh},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(aN);du.prototype.type="ring";var dc=du;function dd(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],h=[],u=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)ex(a,a,t[d]),e_(s,s,t[d]);ex(a,a,i[0]),e_(s,s,i[1])}for(var d=0,p=t.length;d<p;d++){var f=t[d];if(n)r=t[d?d-1:p-1],o=t[(d+1)%p];else if(0===d||d===p-1){l.push(es(t[d]));continue}else r=t[d-1],o=t[d+1];ec(h,o,r),ep(h,h,e);var g=eg(f,r),m=eg(f,o),y=g+m;0!==y&&(g/=y,m/=y),ep(u,h,-g),ep(c,h,m);var v=eh([],f,u),x=eh([],f,c);i&&(e_(v,v,a),ex(v,v,s),e_(x,x,a),ex(x,x,s)),l.push(v),l.push(x)}return n&&l.push(l.shift()),l}(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],h=o[2*s+1],u=r[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;s<c;s++)t.lineTo(r[s][0],r[s][1])}n&&t.closePath()}}var dp=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},df=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new dp},e.prototype.buildPath=function(t,e){dd(t,e,!0)},e}(aN);df.prototype.type="polygon";var dg=df,dm=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},dy=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dm},e.prototype.buildPath=function(t,e){dd(t,e,!1)},e}(aN);dy.prototype.type="polyline";var dv=dy,dx={},d_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},db=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new d_},e.prototype.buildPath=function(t,e){if(this.subPixelOptimize){var n,i,r,o,a=aG(dx,e,this.style);n=a.x1,i=a.y1,r=a.x2,o=a.y2}else n=e.x1,i=e.y1,r=e.x2,o=e.y2;var s=e.percent;0!==s&&(t.moveTo(n,i),s<1&&(r=n*(1-s)+r*s,o=i*(1-s)+o*s),t.lineTo(r,o))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(aN);db.prototype.type="line";var dw=db,dS=[],dM=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function dC(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?nF:nV)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?nF:nV)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?nY:nj)(t.x1,t.cpx1,t.x2,e),(n?nY:nj)(t.y1,t.cpy1,t.y2,e)]}var dk=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dM},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(n,i),null==l||null==h?(u<1&&(nZ(n,a,r,u,dS),a=dS[1],r=dS[2],nZ(i,s,o,u,dS),s=dS[1],o=dS[2]),t.quadraticCurveTo(a,s,r,o)):(u<1&&(nG(n,a,l,r,u,dS),a=dS[1],l=dS[2],r=dS[3],nG(i,s,h,o,u,dS),s=dS[1],h=dS[2],o=dS[3]),t.bezierCurveTo(a,s,l,h,r,o)))},e.prototype.pointAt=function(t){return dC(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=dC(this.shape,t,!0);return ef(e,e)},e}(aN);dk.prototype.type="bezier-curve";var dT=dk,dI=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},dA=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dI},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*r+n,h*r+i),t.arc(n,i,r,o,a,!s)},e}(aN);dA.prototype.type="arc";var dD=dA,dL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return to(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),aN.prototype.getBoundingRect.call(this)},e}(aN),dO=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}(),dP=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return to(e,t),e}(dO),dR=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return to(e,t),e}(dO),dN=Math.min,dE=Math.max,dB=Math.abs,dz=[0,0],dV=[0,0],dF=nh(),dW=dF.minTv,dH=dF.maxTv,dG=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new e1;for(var n=0;n<2;n++)this._axes[n]=new e1;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,r=t.x,o=t.y,a=r+t.width,s=o+t.height;if(n[0].set(r,o),n[1].set(a,o),n[2].set(a,s),n[3].set(r,s),e)for(var l=0;l<4;l++)n[l].transform(e);e1.sub(i[0],n[1],n[0]),e1.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},t.prototype.intersect=function(t,e,n){var i=!0,r=!e;return(e&&e1.set(e,0,0),dF.reset(n,!r),!this._intersectCheckOneSide(this,t,r,1)&&(i=!1,r)||!this._intersectCheckOneSide(t,this,r,-1)&&(i=!1,r))?i:(r||dF.negativeSize||e1.copy(e,i?dF.useDir?dF.dirMinTv:dW:dH),i)},t.prototype._intersectCheckOneSide=function(t,e,n,i){for(var r=!0,o=0;o<2;o++){var a=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,dz),t._getProjMinMaxOnAxis(o,e._corners,dV),dF.negativeSize||dz[1]<dV[0]||dz[0]>dV[1]){if(r=!1,dF.negativeSize||n)return r;var s=dB(dV[0]-dz[1]),l=dB(dz[0]-dV[1]);dN(s,l)>dH.len()&&(s<l?e1.scale(dH,a,-s*i):e1.scale(dH,a,l*i))}else if(!n){var s=dB(dV[0]-dz[1]),l=dB(dz[0]-dV[1]);(dF.useDir||dN(s,l)<dW.len())&&((s<l||!dF.bidirectional)&&(e1.scale(dW,a,s*i),dF.useDir&&dF.calcDirMTV()),(s>=l||!dF.bidirectional)&&(e1.scale(dW,a,-l*i),dF.useDir&&dF.calcDirMTV()))}}return r},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l<e.length;l++){var h=e[l].dot(i)+r[t];a=dN(h,a),s=dE(h,s)}n[0]=a+dF.touchThreshold,n[1]=s-dF.touchThreshold,dF.negativeSize=n[1]<n[0]},t}(),dU=[],dj=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return to(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new nu(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(dU)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1])){for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0}return!1},e}(o$),dY={},dX=["x","y"],dZ=["width","height"];function dq(t){return aN.extend(t)}var dK=function(t,e){var n=cK(t,e),i=cZ;function r(t){var e=i.call(this,t)||this;return e.applyTransform=n.applyTransform,e.buildPath=n.buildPath,e}return to(r,i),r};function d$(t,e){return dK(t,e)}function dJ(t,e){dY[t]=e}function dQ(t){if(dY.hasOwnProperty(t))return dY[t]}function d0(t,e,n,i){var r=new cZ(cK(t,e));return n&&("center"===i&&(n=d2(n,r.getBoundingRect())),d3(r,n)),r}function d1(t,e,n){var i=new aW({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(d2(e,r))}}});return i}function d2(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var d5=function(t,e){for(var n=[],i=t.length,r=0;r<i;r++){var o=t[r];n.push(o.getUpdatedPathProxy(!0))}var a=new aN(e);return a.createPathProxy(),a.buildPath=function(t){if(cq(t)){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e,1)}},a};function d3(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function d4(t,e){return aG(t,t,{lineWidth:e}),t}function d8(t,e){return aU(t,t,e),t}var d6=aj;function d9(t,e){for(var n=eZ([]);t&&t!==e;)eK(n,t.getLocalTransform(),n),t=t.parent;return n}function d7(t,e,n){return e&&!tO(e)&&(e=ri.getLocalTransform(e)),n&&(e=e0([],e)),ev([],t,e)}function pt(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:rR(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:rR(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return rR((o=d7(o,e,n))[0])>rR(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function pe(t,e,n){if(t&&e){var i,r=(i={},t.traverse(function(t){!t.isGroup&&t.anid&&(i[t.anid]=t)}),i);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),sJ(t,i,n,si(t).dataIndex)}}})}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=tC(t.shape)),e}}function pn(t,e){return tR(t,function(t){var n=t[0];n=rO(n=rP(n,e.x),e.x+e.width);var i=t[1];return[n,i=rO(i=rP(i,e.y),e.y+e.height)]})}function pi(t,e){var n=rP(t.x,e.x),i=rO(t.x+t.width,e.x+e.width),r=rP(t.y,e.y),o=rO(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function pr(t,e,n){var i=tI({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),tA(r,n),new aW(i)):d0(t.replace("path://",""),i,n,"center")}function po(t,e,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(pa(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function pa(t,e,n,i,r,o,a,s){var l,h=n-t,u=i-e,c=a-r,d=s-o,p=c*u-h*d;if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=t-r,g=e-o,m=(f*u-h*g)/p;if(m<0||m>1)return!1;var y=(f*d-c*g)/p;return!(y<0)&&!(y>1)}function ps(t,e,n,i,r){return null==e||(tj(e)?pl[0]=pl[1]=pl[2]=pl[3]=e:(pl[0]=e[0],pl[1]=e[1],pl[2]=e[2],pl[3]=e[3]),i&&(pl[0]=rP(0,pl[0]),pl[1]=rP(0,pl[1]),pl[2]=rP(0,pl[2]),pl[3]=rP(0,pl[3])),n&&(pl[0]=-pl[0],pl[1]=-pl[1],pl[2]=-pl[2],pl[3]=-pl[3]),ph(t,pl,"x","width",3,1,r&&r[0]||0),ph(t,pl,"y","height",0,2,r&&r[1]||0)),t}var pl=[0,0,0,0];function ph(t,e,n,i,r,o,a){var s=e[o]+e[r],l=t[i];t[i]+=s,a=rP(0,rO(a,l)),t[i]<a?(t[i]=a,t[n]+=e[r]>=0?-e[r]:e[o]>=0?l+e[o]:rR(s)>1e-8?(l-a)*e[r]/s:0):t[n]-=e[r]}function pu(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=tG(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&tP(tz(l),function(t){en(s,t)||(s[t]=l[t],s.$vars.push(t))});var h=si(t.el);h.componentMainType=o,h.componentIndex=a,h.tooltipConfig={name:i,option:tA({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function pc(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function pd(t,e){if(t)if(tW(t))for(var n=0;n<t.length;n++)pc(t[n],e);else pc(t,e)}function pp(t){return!t||rR(t[1])<pf&&rR(t[2])<pf||rR(t[0])<pf&&rR(t[3])<pf}var pf=1e-5;function pg(t,e){return t?nu.copy(t,e):e.clone()}function pm(t,e){return e?eq(t||eX(),e):void 0}function py(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function pv(t){var e=-1/0,n=1/0;function i(t){if(t&&!t.isGroup){var e=t.currentStates;if(e.length)for(var n=0;n<e.length;n++)r(t.states[e[n]]);r(t)}}function r(t){if(t){var i=t.z2;i>e&&(e=i),i<n&&(n=i)}}return pc(t,function(t){i(t),i(t.getTextContent()),i(t.getTextGuideLine())}),n>e&&(n=e=0),{min:n,max:e}}function px(t,e,n){!function t(e,n,i,r){if(e.ignoreModelZ)return r;var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)r=rP(t(s[l],n,i,r),r);else e.z=n,e.zlevel=i,r=rP(e.z2||0,r);if(o&&(o.z=n,o.zlevel=i,isFinite(r)&&(o.z2=r+2)),a){var h=e.textGuideLineConfig;a.z=n,a.zlevel=i,isFinite(r)&&(a.z2=r+(h&&h.showAbove?1:-1))}return r}(t,e,n,-1/0)}dY.circle=c0,dY.ellipse=c5,dY.sector=dl,dY.ring=dc,dY.polygon=dg,dY.polyline=dv,dY.rect=aq,dY.line=dw,dY.bezierCurve=dT,dY.arc=dD;var p_=oi(),pb=cO(),pw=function(){function t(){this.group=new rT,this.uid=lS("viewChart"),this.renderTask=uV({plan:pC,reset:pk}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&pM(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&pM(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){pd(this.group,t)},t.markUpdateMethod=function(t,e){p_(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function pS(t,e,n){t&&sY(t)&&("emphasis"===e?sL:sO)(t,n)}function pM(t,e,n){var i,r,o=on(t,e),a=e&&null!=e.highlightKey?(null==(r=sa[i=e.highlightKey])&&so<=32&&(r=sa[i]=so++),r):null;null!=o?tP(r2(o),function(e){pS(t.getItemGraphicEl(e),n,a)}):t.eachItemGraphicEl(function(t){pS(t,n,a)})}function pC(t){return pb(t.model)}function pk(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&p_(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),pT[l]}ov(pw,["dispose"]),oS(pw);var pT={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},pI="\0__throttleOriginMethod",pA="\0__throttleRate",pD="\0__throttleType";function pL(t,e,n){var i,r,o,a,s,l=0,h=0,u=null;function c(){h=new Date().getTime(),u=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d<arguments.length;d++)t[d]=arguments[d];i=new Date().getTime(),o=this,a=t;var p=s||e,f=s||n;s=null,r=i-(f?l:h)-p,clearTimeout(u),f?u=setTimeout(c,p):r>=0?c():u=setTimeout(c,-r),l=i};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}function pO(t,e,n,i){var r=t[e];if(r){var o=r[pI]||r,a=r[pD];if(r[pA]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=pL(o,n,"debounce"===i))[pI]=o,r[pD]=i,r[pA]=n}return r}}function pP(t,e){var n=t[e];n&&n[pI]&&(n.clear&&n.clear(),t[e]=n[pI])}var pR=oi(),pN={itemStyle:oM(lv,!0),lineStyle:oM(lg,!0)},pE={lineStyle:"stroke",itemStyle:"fill"};function pB(t,e){var n=t.visualStyleMapper||pN[e];return n||(console.warn("Unknown style type '"+e+"'."),pN.itemStyle)}function pz(t,e){var n=t.visualDrawType||pE[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var pV=new lb,pF=Math.PI,pW=function(){function t(t,e,n,i){this._stageTaskMap=t9(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount,a=null!=o?Math.ceil(o/r):null;return{step:r,modBy:a,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=t9();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;tP(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,{});t2(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}tP(t,function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each(function(t){a(i,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),o.updatePayload(u,n);var p=o.getPerformArgs(u,i.block);d.each(function(t){t.perform(p)}),u.perform(p)&&(r=!0)}else h&&h.each(function(s,l){a(i,s)&&s.dirty();var h=o.getPerformArgs(s,i.block);h.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(h)&&(r=!0)})}}),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=t9(),s=t.seriesType,l=t.getTargetSeries;function h(e){var s=e.uid,l=a.set(s,o&&o.get(s)||uV({plan:pY,reset:pX,count:pK}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(h):s?n.eachRawSeriesByType(s,h):l&&l(n,i).each(h)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||uV({reset:pH});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=t9(),l=t.seriesType,h=t.getTargetSeries,u=!0,c=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,uV({reset:pG,onDirty:pj})));n.context={model:t,overallProgress:u},n.agent=o,n.__block=u,r._pipe(t,n)}t2(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):h?h(n,i).each(d):(u=!1,tP(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);i.head||(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return tH(t)&&(t={overallReset:t,seriesType:function(t){I=null;try{t(p$,pJ)}catch(t){}return I}(t)}),t.uid=lS("stageHandler"),e&&(t.visualType=e),t},t}();function pH(t){t.overallReset(t.ecModel,t.api,t.payload)}function pG(t){return t.overallProgress&&pU}function pU(){this.agent.dirty(),this.getDownstream().dirty()}function pj(){this.agent&&this.agent.dirty()}function pY(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function pX(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=r2(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?tR(e,function(t,e){return pq(e)}):pZ}var pZ=pq(0);function pq(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o<e.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(e,i)}}function pK(t){return t.data.count()}var p$={},pJ={};function pQ(t,e){for(var n in e.prototype)t[n]=ei}pQ(p$,hQ),pQ(pJ,h3),p$.eachSeriesByType=p$.eachRawSeriesByType=function(t){I=t},p$.eachComponent=function(t){"series"===t.mainType&&t.subType&&(I=t.subType)};var p0=hS.darkColor,p1=p0.background,p2=function(){return{axisLine:{lineStyle:{color:p0.axisLine}},splitLine:{lineStyle:{color:p0.axisSplitLine}},splitArea:{areaStyle:{color:[p0.backgroundTint,p0.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:p0.axisMinorSplitLine}},axisLabel:{color:p0.axisLabel},axisName:{}}},p5={label:{color:p0.secondary},itemStyle:{borderColor:p0.borderTint},dividerLineStyle:{color:p0.border}},p3={darkMode:!0,color:p0.theme,backgroundColor:p1,axisPointer:{lineStyle:{color:p0.border},crossStyle:{color:p0.borderShade},label:{color:p0.tertiary}},legend:{textStyle:{color:p0.secondary},pageTextStyle:{color:p0.tertiary}},textStyle:{color:p0.secondary},title:{textStyle:{color:p0.primary},subtextStyle:{color:p0.quaternary}},toolbox:{iconStyle:{borderColor:p0.accent50}},tooltip:{backgroundColor:p0.neutral20,defaultBorderColor:p0.border,textStyle:{color:p0.tertiary}},dataZoom:{borderColor:p0.accent10,textStyle:{color:p0.tertiary},brushStyle:{color:p0.backgroundTint},handleStyle:{color:p0.neutral00,borderColor:p0.accent20},moveHandleStyle:{color:p0.accent40},emphasis:{handleStyle:{borderColor:p0.accent50}},dataBackground:{lineStyle:{color:p0.accent30},areaStyle:{color:p0.accent20}},selectedDataBackground:{lineStyle:{color:p0.accent50},areaStyle:{color:p0.accent30}}},visualMap:{textStyle:{color:p0.secondary},handleStyle:{borderColor:p0.neutral30}},timeline:{lineStyle:{color:p0.accent10},label:{color:p0.tertiary},controlStyle:{color:p0.accent30,borderColor:p0.accent30}},calendar:{itemStyle:{color:p0.neutral00,borderColor:p0.neutral20},dayLabel:{color:p0.tertiary},monthLabel:{color:p0.secondary},yearLabel:{color:p0.secondary}},matrix:{x:p5,y:p5,backgroundColor:{borderColor:p0.axisLine},body:{itemStyle:{borderColor:p0.borderTint}}},timeAxis:p2(),logAxis:p2(),valueAxis:p2(),categoryAxis:p2(),line:{symbol:"circle"},graph:{color:p0.theme},gauge:{title:{color:p0.secondary},axisLine:{lineStyle:{color:[[1,p0.neutral05]]}},axisLabel:{color:p0.axisLabel},detail:{color:p0.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:p0.background}},radar:((u=p2()).axisName={color:p0.axisLabel},u.axisLine.lineStyle.color=p0.neutral20,u),treemap:{breadcrumb:{itemStyle:{color:p0.neutral20,textStyle:{color:p0.secondary}},emphasis:{itemStyle:{color:p0.neutral30}}}},sunburst:{itemStyle:{borderColor:p0.background}},map:{itemStyle:{borderColor:p0.border,areaColor:p0.neutral10},label:{color:p0.tertiary},emphasis:{label:{color:p0.primary},itemStyle:{areaColor:p0.highlight}},select:{label:{color:p0.primary},itemStyle:{areaColor:p0.highlight}}},geo:{itemStyle:{borderColor:p0.border,areaColor:p0.neutral10},emphasis:{label:{color:p0.primary},itemStyle:{areaColor:p0.highlight}},select:{label:{color:p0.primary},itemStyle:{color:p0.highlight}}}};p3.categoryAxis.splitLine.show=!1;var p4=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},n={},i={};if(tG(t)){var r=oy(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};tP(t,function(t,r){for(var s=!1,l=0;l<o.length;l++){var h=o[l],u=r.lastIndexOf(h);if(u>0&&u===r.length-h.length){var c=r.slice(0,u);"data"!==c&&(e.mainType=c,e[h.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return h(s,o,"mainType")&&h(s,o,"subType")&&h(s,o,"index","componentIndex")&&h(s,o,"name")&&h(s,o,"id")&&h(l,r,"name")&&h(l,r,"dataIndex")&&h(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function h(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),p8=["symbol","symbolSize","symbolRotate","symbolOffset"],p6=p8.concat(["symbolKeepAspect"]);function p9(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function p7(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function ft(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}function fe(t,e){tP([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(e,i,r){var o,a;e=tI({},e),r.dispatchAction(tI(e,{type:n[1],seriesIndex:(o=e,a=[],i.eachComponent({mainType:"series",subType:t,query:o},function(t){a.push(t.seriesIndex)}),a)}))})})}function fn(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e=t.seriesIndex,i=t.option.selectedMap,a=r.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===e){var l=t.getData(),h=on(l,r.fromActionPayload);n.trigger(o,{type:o,seriesId:t.id,name:tW(h)?l.getName(h[0]):l.getName(h),selected:tG(i)?i:tI({},i)})}})}function fi(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}var fr=Math.round(9*Math.random()),fo="function"==typeof Object.defineProperty,fa=function(){function t(){this._id="__ec_inner_"+fr++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return fo?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}(),fs=aN.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),fl=aN.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),fh=aN.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),p=.6*a,f=.7*a;t.moveTo(n-u,l+s),t.arc(n,l,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(n+u-c*p,l+s+d*p,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-u+c*p,l+s+d*p,n-u,l+s),t.closePath()}}),fu=aN.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),fc={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},fd={};tP({line:dw,rect:aq,roundRect:aq,square:aq,circle:c0,diamond:fl,pin:fh,arrow:fu,triangle:fs},function(t,e){fd[e]=new t});var fp=aN.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=rm(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=fd[i];r||(r=fd[i="rect"]),fc[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function ff(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||hS.color.neutral00,n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function fg(t,e,n,i,r,o,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?d1(t.slice(8),new nu(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?d0(t.slice(7),{},new nu(e,n,i,r),a?"center":"cover"):new fp({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=ff,o&&s.setColor(o),s}function fm(t){return tW(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function fy(t,e){if(null!=t)return tW(t)||(t=[t,t]),[rE(t[0],e[0])||0,rE(tJ(t[1],t[0]),e[1])||0]}function fv(t){return isFinite(t)}function fx(t,e,n){for(var i,r,o,a,s,l,h,u,c,d,p="radial"===e.type?(o=Math.min(i=n.width,r=n.height),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r,e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),a=fv(a)?a:.5,s=fv(s)?s:.5,l=l>=0&&fv(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)):(h=null==e.x?0:e.x,u=null==e.x2?1:e.x2,c=null==e.y?0:e.y,d=null==e.y2?0:e.y2,e.global||(h=h*n.width+n.x,u=u*n.width+n.x,c=c*n.height+n.y,d=d*n.height+n.y),h=fv(h)?h:0,u=fv(u)?u:1,c=fv(c)?c:0,d=fv(d)?d:0,t.createLinearGradient(h,c,u,d)),f=e.colorStops,g=0;g<f.length;g++)p.addColorStop(f[g].offset,f[g].color);return p}function f_(t){return parseInt(t,10)}function fb(t,e,n){var i=["width","height"][e],r=["clientWidth","clientHeight"][e],o=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=n[i]&&"auto"!==n[i])return parseFloat(n[i]);var s=document.defaultView.getComputedStyle(t);return(t[r]||f_(s[i])||f_(t.style[i]))-(f_(s[o])||0)-(f_(s[a])||0)|0}function fw(t){var e,n,i=t.style,r=i.lineDash&&i.lineWidth>0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:tj(e)?[e]:tW(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=tR(r,function(t){return t/a}),o/=a)}return[r,o]}var fS=new a_(!0);function fM(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}function fC(t){return"string"==typeof t&&"none"!==t}function fk(t){var e=t.fill;return null!=e&&"none"!==e}function fT(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function fI(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function fA(t,e,n){var i=oI(e.image,e.__image,n);if(oD(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*er),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var fD=["shadowBlur","shadowOffsetX","shadowOffsetY"],fL=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fO(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){fN(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?oX.opacity:a}(i||e.blend!==n.blend)&&(o||(fN(t,r),o=!0),t.globalCompositeOperation=e.blend||oX.blend);for(var s=0;s<fD.length;s++){var l=fD[s];(i||e[l]!==n[l])&&(o||(fN(t,r),o=!0),t[l]=t.dpr*(e[l]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(fN(t,r),o=!0),t.shadowColor=e.shadowColor||oX.shadowColor),o}function fP(t,e,n,i,r){var o=fE(e,r.inHover),a=i?null:n&&fE(n,r.inHover)||{};if(o===a)return!1;var s=fO(t,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(fN(t,r),s=!0),fC(o.fill)&&(t.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(fN(t,r),s=!0),fC(o.stroke)&&(t.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(fN(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(fN(t,r),s=!0),t.lineWidth=l)}for(var h=0;h<fL.length;h++){var u=fL[h],c=u[0];(i||o[c]!==a[c])&&(s||(fN(t,r),s=!0),t[c]=o[c]||u[1])}return s}function fR(t,e){var n=e.transform,i=t.dpr||1;n?t.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):t.setTransform(i,0,0,i,0,0)}function fN(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function fE(t,e){return e&&t.__hoverStyle||t.style}function fB(t,e){fz(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function fz(t,e,n,i){var r,o=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){e.__dirty&=-2,e.__isRendered=!1;return}var a=e.__clipPaths,s=n.prevElClipPaths,l=!1,h=!1;if(!s||function(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}(a,s)){if(s&&s.length&&(fN(t,n),t.restore(),h=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length){fN(t,n),t.save();for(var u=!1,c=0;c<a.length;c++){var d=a[c];u=u||d.isZeroArea(),fR(t,d),t.beginPath(),d.buildPath(t,d.shape),t.clip()}n.allClipped=u,l=!0}n.prevElClipPaths=a}if(n.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var p=n.prevEl;p||(h=l=!0);var f=e instanceof aN&&e.autoBatch&&(y=fk(m=e.style),v=fM(m),!(m.lineDash||!(y^v)||y&&"string"!=typeof m.fill||v&&"string"!=typeof m.stroke||m.strokePercent<1||m.strokeOpacity<1||m.fillOpacity<1));!l&&(x=p.transform,o&&x?o[0]===x[0]&&o[1]===x[1]&&o[2]===x[2]&&o[3]===x[3]&&o[4]===x[4]&&o[5]===x[5]:+(!o&&!x))?f||fN(t,n):(fN(t,n),fR(t,e));var g=fE(e,n.inHover);if(e instanceof aN)1!==n.lastDrawType&&(h=!0,n.lastDrawType=1),fP(t,e,p,h,n),f&&(n.batchFill||n.batchStroke)||t.beginPath(),function(t,e,n,i){var r,o,a,s=fM(n),l=fk(n),h=n.strokePercent,u=h<1,c=!e.path;(!e.silent||u)&&c&&e.createPathProxy();var d=e.path||fS,p=e.__dirty;if(!i){var f=n.fill,g=n.stroke,m=l&&!!f.colorStops,y=s&&!!g.colorStops,v=l&&!!f.image,x=s&&!!g.image,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0;(m||y)&&(M=e.getBoundingRect()),m&&(_=p?fx(t,f,M):e.__canvasFillGradient,e.__canvasFillGradient=_),y&&(b=p?fx(t,g,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(w=p||!e.__canvasFillPattern?fA(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=w),x&&(S=p||!e.__canvasStrokePattern?fA(t,g,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),m?t.fillStyle=_:v&&(w?t.fillStyle=w:l=!1),y?t.strokeStyle=b:x&&(S?t.strokeStyle=S:s=!1)}var C=e.getGlobalScale();d.setScale(C[0],C[1],e.segmentIgnoreThreshold),t.setLineDash&&n.lineDash&&(o=(r=fw(e))[0],a=r[1]);var k=!0;(c||4&p)&&(d.setDPR(t.dpr),u?d.setContext(null):(d.setContext(t),k=!1),d.reset(),e.buildPath(d,e.shape,i),d.toStatic(),e.pathUpdated()),k&&d.rebuildPath(t,u?h:1),o&&(t.setLineDash(o),t.lineDashOffset=a),!i&&(n.strokeFirst?(s&&fI(t,n),l&&fT(t,n)):(l&&fT(t,n),s&&fI(t,n))),o&&t.setLineDash([])}(t,e,g,f),f&&(n.batchFill=g.fill||"",n.batchStroke=g.stroke||"");else if(e instanceof aB){3!==n.lastDrawType&&(h=!0,n.lastDrawType=3),fP(t,e,p,h,n);var m,y,v,x,_,b=g.text;if(null!=b&&(b+=""),b){t.font=g.font||th,t.textAlign=g.textAlign,t.textBaseline=g.textBaseline;var w=void 0,S=void 0;t.setLineDash&&g.lineDash&&(w=(_=fw(e))[0],S=_[1]),w&&(t.setLineDash(w),t.lineDashOffset=S),g.strokeFirst?(fM(g)&&t.strokeText(b,g.x,g.y),fk(g)&&t.fillText(b,g.x,g.y)):(fk(g)&&t.fillText(b,g.x,g.y),fM(g)&&t.strokeText(b,g.x,g.y)),w&&t.setLineDash([])}}else e instanceof aW?(2!==n.lastDrawType&&(h=!0,n.lastDrawType=2),r=h,fO(t,fE(e,n.inHover),p&&fE(p,n.inHover),r,n),function(t,e,n){var i=e.__image=oI(n.image,e.__image,e,e.onload);if(i&&oD(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var h=n.sx||0,u=n.sy||0;t.drawImage(i,h,u,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var h=n.sx,u=n.sy,c=a-h,d=s-u;t.drawImage(i,h,u,c,d,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,g)):e.getTemporalDisplayables&&(4!==n.lastDrawType&&(h=!0,n.lastDrawType=4),function(t,e,n){var i,r,o=e.getDisplayables(),a=e.getTemporalDisplayables();t.save();var s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(i=e.getCursor(),r=o.length;i<r;i++){var l=o[i];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),fz(t,l,s,i===r-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var h=0,u=a.length;h<u;h++){var l=a[h];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),fz(t,l,s,h===u-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,n));f&&i&&fN(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),n.prevEl=e,e.__dirty=0,e.__isRendered=!0}var fV=new fa,fF=new n1(100),fW=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function fH(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&fV.delete(t);var o=fV.get(t);if(o)return o;var a=tA(t,{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"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(t){for(var e,o,s=[n],l=!0,h=0;h<fW.length;++h){var u=a[fW[h]];if(null!=u&&!tW(u)&&!tG(u)&&!tj(u)&&"boolean"!=typeof u){l=!1;break}s.push(u)}if(l){e=s.join(",")+(r?"-svg":"");var c=fF.get(e);c&&(r?t.svgElement=c:t.image=c)}var d=function t(e){if(!e||0===e.length)return[[0,0]];if(tj(e)){var n=Math.ceil(e);return[[n,n]]}for(var i=!0,r=0;r<e.length;++r)if(!tj(e[r])){i=!1;break}if(i)return t([e]);for(var o=[],r=0;r<e.length;++r)if(tj(e[r])){var n=Math.ceil(e[r]);o.push([n,n])}else{var n=tR(e[r],function(t){return Math.ceil(t)});n.length%2==1?o.push(n.concat(n)):o.push(n)}return o}(a.dashArrayX),p=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(tj(t)){var e=Math.ceil(t);return[e,e]}var n=tR(t,function(t){return Math.ceil(t)});return t.length%2?n.concat(n):n}(a.dashArrayY),f=function t(e){if(!e||0===e.length)return[["rect"]];if(tG(e))return[[e]];for(var n=!0,i=0;i<e.length;++i)if(!tG(e[i])){n=!1;break}if(n)return t([e]);for(var r=[],i=0;i<e.length;++i)tG(e[i])?r.push([e[i]]):r.push(e[i]);return r}(a.symbol),g=tR(d,function(t){return fG(t)}),m=fG(p),y=!r&&tc.createCanvas(),v=r&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var t=1,e=0,n=g.length;e<n;++e)t=rQ(t,g[e]);for(var i=1,e=0,n=f.length;e<n;++e)i=rQ(i,f[e].length);t*=i;var r=m*g.length*f.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(r,a.maxTileHeight))}}();y&&(y.width=x.width*n,y.height=x.height*n,o=y.getContext("2d")),function(){o&&(o.clearRect(0,0,y.width,y.height),a.backgroundColor&&(o.fillStyle=a.backgroundColor,o.fillRect(0,0,y.width,y.height)));for(var t=0,e=0;e<p.length;++e)t+=p[e];if(!(t<=0))for(var s=-m,l=0,h=0,u=0;s<x.height;){if(l%2==0){for(var c=h/2%f.length,g=0,_=0,b=0;g<2*x.width;){for(var w=0,e=0;e<d[u].length;++e)w+=d[u][e];if(w<=0)break;if(_%2==0){var S=(1-a.symbolSize)*.5,M=g+d[u][_]*S,C=s+p[l]*S,k=d[u][_]*a.symbolSize,T=p[l]*a.symbolSize,I=b/2%f[c].length;!function(t,e,s,l,h){var u=r?1:n,c=fg(h,t*u,e*u,s*u,l*u,a.color,a.symbolKeepAspect);if(r){var d=i.painter.renderOneToVNode(c);d&&v.children.push(d)}else fB(o,c)}(M,C,k,T,f[c][I])}g+=d[u][_],++b,++_===d[u].length&&(_=0)}++u===d.length&&(u=0)}s+=p[l],++h,++l===p.length&&(l=0)}}(),l&&fF.put(e,y||v),t.image=y,t.svgElement=v,t.svgWidth=x.width,t.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=r?1:1/n,fV.set(t,s),t.dirty=!1,s}function fG(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var fU=new eS,fj={},fY="__flagInMainProcess",fX="__mainProcessVersion",fZ="__pendingUpdate",fq="__needsUpdateStatus",fK=/^[a-zA-Z0-9_]+$/,f$="__connectUpdateStatus";function fJ(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this.isDisposed()?void this.id:f0(this,t,e)}}function fQ(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return f0(this,t,e)}}function f0(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),eS.prototype[e].apply(t,n)}var f1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e}(eS),f2=f1.prototype;f2.on=fQ("on"),f2.off=fQ("off");var f5=function(t){function e(e,n,i){var r=t.call(this,new p4)||this;r._chartsViews=[],r._chartsMap={},r._componentsViews=[],r._componentsMap={},r._pendingActions=[],i=i||{},r._dom=e,r[fX]=1,i.ssr&&(y=function(t){var e=si(t),n=e.dataIndex;if(null!=n){var i=t9();return i.set("series_index",e.seriesIndex),i.set("data_index",n),e.ssrType&&i.set("ssr_type",e.ssrType),i}});var o=r._zr=rL(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:tJ(i.useDirtyRect,!1),useCoarsePointer:tJ(i.useCoarsePointer,"auto"),pointerSize:i.pointerSize});r._ssr=i.ssr,r._throttledZrFlush=pL(tV(o.flush,o),17),r._updateTheme(n),r._locale=function(t){if(!tG(t))return tk(tC(t),tC(lC.EN),!1);var e=lC[t.toUpperCase()]||{};return"ZH"===t||"EN"===t?tC(e):tk(tC(e),tC(lC.EN),!1)}(i.locale||lT),r._coordSysMgr=new ht;var a=r._api=G(r);function s(t,e){return t.__prio-e.__prio}return nM(ge,s),nM(f7,s),r._scheduler=new pW(r,a,f7,ge),r._messageCenter=new f1,r._initEvents(),r.resize=tV(r.resize,r),o.animation.on("frame",r._onframe,r),z(o,r),V(o,r),r[t3]=!0,r}return to(e,t),e.prototype._onframe=function(){if(!this._disposed){Y(this);var t=this._scheduler;if(this[fZ]){var e=this[fZ].silent;this[fY]=!0,X(this);try{A(this),O.update.call(this,null,this[fZ].updateParams)}catch(t){throw this[fY]=!1,this[fZ]=null,t}this._zr.flush(),this[fY]=!1,this[fZ]=null,E.call(this,e),B.call(this,e)}else if(t.unfinished){var n=1,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),R(this,i),t.performVisualTasks(i),H(this,this._model,r,"remain",{}),n-=new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[fY]){if(this._disposed)return void this.id;if(tY(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[fY]=!0,X(this),!this._model||e){var i,r,o,a=new h8(this._api),s=this._theme,l=this._model=new hQ;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},gt);var h={seriesTransition:o,optionChanged:!0};if(n)this[fZ]={silent:i,updateParams:h},this[fY]=!1,this.getZr().wakeUp();else{try{A(this),O.update.call(this,null,h)}catch(t){throw this[fZ]=null,this[fY]=!1,t}this._ssr||this._zr.flush(),this[fZ]=null,this[fY]=!1,E.call(this,i),B.call(this,i)}}},e.prototype.setTheme=function(t,e){if(!this[fY]){if(this._disposed)return void this.id;var n=this._model;if(n){var i=e&&e.silent,r=null;this[fZ]&&(null==i&&(i=this[fZ].silent),r=this[fZ].updateParams,this[fZ]=null),this[fY]=!0,X(this);try{this._updateTheme(t),n.setTheme(this._theme),A(this),O.update.call(this,{type:"setTheme"},r)}catch(t){throw this[fY]=!1,t}this[fY]=!1,E.call(this,i),B.call(this,i)}}},e.prototype._updateTheme=function(t){tG(t)&&(t=gn[t]),t&&((t=tC(t))&&up(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ts.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr;return tP(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed)return void this.id;var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;tP(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return tP(i,function(t){t.group.ignore=!1}),o},e.prototype.getConnectedDataURL=function(t){if(this._disposed)return void this.id;var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(!go[n])return this.getDataURL(t);var a=o,s=o,l=-o,h=-o,u=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();tP(gr,function(o,c){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(tC(t)),p=o.getDom().getBoundingClientRect();a=i(p.left,a),s=i(p.top,s),l=r(p.right,l),h=r(p.bottom,h),u.push({dom:d,left:p.left,top:p.top})}}),a*=c,s*=c,l*=c,h*=c;var d=l-a,p=h-s,f=tc.createCanvas(),g=rL(f,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:p}),!e)return t.connectedBackgroundColor&&g.add(new aq({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),tP(u,function(t){var e=new aW({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});g.add(e)}),g.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"));var m="";return tP(u,function(t){var e=t.left-a,n=t.top-s;m+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()},e.prototype.convertToPixel=function(t,e,n){return P(this,"convertToPixel",t,e,n)},e.prototype.convertToLayout=function(t,e,n){return P(this,"convertToLayout",t,e,n)},e.prototype.convertFromPixel=function(t,e,n){return P(this,"convertFromPixel",t,e,n)},e.prototype.containPixel=function(t,e){var n;return this._disposed?void this.id:(tP(oo(this._model,t),function(t,i){i.indexOf("Models")>=0&&tP(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}},this)},this),!!n)},e.prototype.getVisual=function(t,e){var n=oo(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?p9(i,r,e):p7(i,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n=this;tP(f4,function(t){var e=function(e){var i,r=n.getModel(),o=e.target;if("globalout"===t?i={}:o&&fi(o,function(t){var e=si(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return i=tI({},e.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=i.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),h=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,n._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:l,view:h},n.trigger(t,i)}};e.zrEventfulCallAtLast=!0,n._zr.on(t,e,n)});var i=this._messageCenter;tP(f9,function(t,e){i.on(e,function(t){n.trigger(e,t)})}),t=this,e=this._api,i.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(fn("map","selectchanged",t,i,n),fn("pie","selectchanged",t,i,n)):"select"===n.fromAction?(fn("map","selected",t,i,n),fn("pie","selected",t,i,n)):"unselect"===n.fromAction&&(fn("map","unselected",t,i,n),fn("pie","unselected",t,i,n))})},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)return void this.id;this._disposed=!0,this.getDom()&&ou(this.getDom(),gs,"");var t=this._api,e=this._model;tP(this._componentsViews,function(n){n.dispose(e,t)}),tP(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),this._dom=this._model=this._chartsMap=this._componentsMap=this._chartsViews=this._componentsViews=this._scheduler=this._api=this._zr=this._throttledZrFlush=this._theme=this._coordSysMgr=this._messageCenter=null,delete gr[this.id]},e.prototype.resize=function(t){if(!this[fY]){if(this._disposed)return void this.id;this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[fZ]&&(null==i&&(i=this[fZ].silent),n=!0,this[fZ]=null),this[fY]=!0,X(this);try{n&&A(this),O.update.call(this,{type:"resize",animation:tI({duration:0},t&&t.animation)})}catch(t){throw this[fY]=!1,t}this[fY]=!1,E.call(this,i),B.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)return void this.id;if(tY(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),gi[t]){var n=gi[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=tI({},t);return e.type=f6[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)return void this.id;if((tY(e)||(e={silent:!!e}),f8[t.type])&&this._model){if(this[fY])return void this._pendingActions.push(t);var n=e.silent;N.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&ts.browser.weChat&&this._throttledZrFlush(),E.call(this,n),B.call(this,n)}},e.prototype.updateLabelLayout=function(){fU.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)return void this.id;var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function e(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var r=n[i];"emphasis"!==r&&"blur"!==r&&"select"!==r&&e.push(r)}t.selected&&t.states.select&&e.push("select"),2===t.hoverState&&t.states.emphasis?e.push("emphasis"):1===t.hoverState&&t.states.blur&&e.push("blur"),t.useStates(e)}function n(t,e){if(!t.preventAutoZ){var n=py(t);e.eachRendered(function(t){return px(t,n.z,n.zlevel),!0})}}function i(t,e){e.eachRendered(function(t){if(!s0(t)){var e=t.getTextContent(),n=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}})}function r(t,n){var i=t.getModel("stateAnimation"),r=t.isAnimationEnabled(),o=i.get("duration"),a=o>0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(t){if(t.states&&t.states.emphasis&&!s0(t)){if(t instanceof aN&&((n=ss(t)).normalFill=t.style.fill,n.normalStroke=t.style.stroke,n.selectFill=(i=t.states.select||{}).style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null),t.__dirty){var n,i,o=t.prevStates;o&&t.useStates(o)}if(r){t.stateTransition=a;var s=t.getTextContent(),l=t.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}t.__dirty&&e(t)}})}A=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),D(t,!0),D(t,!1),e.plan()},D=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l<r.length;l++)r[l].__alive=!1;function h(t){var l=t.__requireNewView;t.__requireNewView=!1;var h="_ec_"+t.id+"_"+t.type,u=!l&&o[h];if(!u){var c=oy(t.type);(u=new(e?cL.getClass(c.main,c.sub):pw.getClass(c.sub))).init(n,s),o[h]=u,r.push(u),a.add(u.group)}t.__viewId=u.__id=h,u.__alive=!0,u.__model=t,u.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},e||i.prepareView(u,t,n,s)}e?n.eachComponent(function(t,e){"series"!==t&&h(e)}):n.eachSeries(h);for(var l=0;l<r.length;){var u=r[l];u.__alive?l++:(e||u.renderTask.dispose(),a.remove(u.group),u.dispose(n,s),r.splice(l,1),o[u.__id]===u&&delete o[u.__id],u.__id=u.group.__ecComponentInfo=null)}},L=function(t,e,n,i,r){var o,a=t._model;if(a.setUpdatePayload(n),!i)return void tP([].concat(t._componentsViews).concat(t._chartsViews),u);var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var h=n.excludeSeriesId;function u(i){i&&i.__alive&&i[e]&&i[e](i.__model,a,t._api,n)}null!=h&&(o=t9(),tP(r2(h),function(t){var e=r7(t,null);null!=e&&o.set(e,!0)})),a&&a.eachComponent(l,function(e){if(!(o&&null!=o.get(e.id))){if(sZ(n))if(e instanceof cS)n.type!==sc||n.notBlur||e.get(["emphasis","disabled"])||function(t,e,n){var i=t.seriesIndex,r=t.getData(e.dataType);if(r){var o=on(r,e);o=(tW(o)?o[0]:o)||0;var a=r.getItemGraphicEl(o);if(!a)for(var s=r.count(),l=0;!a&&l<s;)a=r.getItemGraphicEl(l++);if(a){var h=si(a);sN(i,h.focus,h.blurScope,n)}else{var u=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);null!=u&&sN(i,u,c,n)}}}(e,n,t._api);else{var i=sB(e.mainType,e.componentIndex,n.name,t._api),r=i.focusSelf,a=i.dispatchers;n.type===sc&&r&&!n.notBlur&&sE(e.mainType,e.componentIndex,t._api),a&&tP(a,function(t){n.type===sc?sL(t):sO(t)})}else if(sX(n)&&e instanceof cS){if(t._api,sX(n)){var s=n.dataType,l=on(e.getData(s),n);tW(l)||(l=[l]),e[n.type===sg?"toggleSelect":n.type===sp?"select":"unselect"](l,s)}sz(e),j(t)}}},t),a&&a.eachComponent(l,function(e){o&&null!=o.get(e.id)||u(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])},t)},O={prepareAndUpdate:function(t){A(this),O.update.call(this,t,t&&{optionChanged:null!=t.newOption})},update:function(e,n){var i=this._model,r=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(i){i.setUpdatePayload(e),s.restoreData(i,e),s.performSeriesTasks(i),a.create(i,r),s.performDataProcessorTasks(i,e),R(this,i),a.update(i,r),t(i),s.performVisualTasks(i,e);var l=i.get("backgroundColor")||"transparent";o.setBackgroundColor(l);var h=i.get("darkMode");null!=h&&"auto"!==h&&o.setDarkMode(h),F(this,i,r,e,n),fU.trigger("afterupdate",i,r)}},updateTransform:function(e){var n=this,i=this._model,r=this._api;if(i){i.setUpdatePayload(e);var o=[];i.eachComponent(function(t,a){if("series"!==t){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,i,r,e);l&&l.update&&o.push(s)}else o.push(s)}});var a=t9();i.eachSeries(function(t){var o=n._chartsMap[t.__viewId];if(o.updateTransform){var s=o.updateTransform(t,i,r,e);s&&s.update&&a.set(t.uid,1)}else a.set(t.uid,1)}),t(i),this._scheduler.performVisualTasks(i,e,{setDirty:!0,dirtyMap:a}),H(this,i,r,e,{},a),fU.trigger("afterupdate",i,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),pw.markUpdateMethod(e,"updateView"),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),F(this,n,this._api,e,{}),fU.trigger("afterupdate",n,this._api))},updateVisual:function(e){var n=this,i=this._model;i&&(i.setUpdatePayload(e),i.eachSeries(function(t){t.getData().clearAllVisual()}),pw.markUpdateMethod(e,"updateVisual"),t(i),this._scheduler.performVisualTasks(i,e,{visualType:"visual",setDirty:!0}),i.eachComponent(function(t,r){if("series"!==t){var o=n.getViewOfComponentModel(r);o&&o.__alive&&o.updateVisual(r,i,n._api,e)}}),i.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,i,n._api,e)}),fU.trigger("afterupdate",i,this._api))},updateLayout:function(t){O.update.call(this,t)}},P=function(t,e,n,i,r){if(t._disposed)return void t.id;for(var o,a=t._model,s=t._coordSysMgr.getCoordinateSystems(),l=oo(a,n),h=0;h<s.length;h++){var u=s[h];if(u[e]&&null!=(o=u[e](a,l,i,r)))return o}},R=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},N=function(t,e){var n,i=this,r=this.getModel(),o=t.type,a=t.escapeConnect,s=f8[o],l=(s.update||"update").split(":"),h=l.pop(),u=null!=l[0]&&oy(l[0]);this[fY]=!0,X(this);var c=[t],d=!1;t.batch&&(d=!0,c=tR(t.batch,function(e){return(e=tA(tI({},e),t)).batch=null,e}));var p=[],f=[],g=s.nonRefinedEventType,m=sX(t),y=sZ(t);if(y&&sR(this._api),tP(c,function(e){var o=s.action(e,r,i._api);if(s.refineEvent?f.push(o):n=o,(n=n||tI({},e)).type=g,p.push(n),y){var a=oa(t),l=a.queryOptionMap;L(i,h,e,a.mainTypeSpecified?l.keys()[0]:"series"),j(i)}else m?(L(i,h,e,"series"),j(i)):u&&L(i,h,e,u.main,u.sub)}),"none"!==h&&!y&&!m&&!u)try{this[fZ]?(A(this),O.update.call(this,t),this[fZ]=null):O[h].call(this,t)}catch(t){throw this[fY]=!1,t}if(n=d?{type:g,escapeConnect:a,batch:p}:p[0],this[fY]=!1,!e){var v=void 0;if(s.refineEvent){var x=s.refineEvent(f,t,r,this._api).eventContent;t2(tY(x)),(v=tA({type:s.refinedEventType},x)).fromAction=t.type,v.fromActionPayload=t,v.escapeConnect=!0}var _=this._messageCenter;_.trigger(n.type,n),v&&_.trigger(v.type,v)}},E=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();N.call(this,n,t)}},B=function(t){t||this.trigger("updated")},z=function(t,e){t.on("rendered",function(n){e.trigger("rendered",n),!t.animation.isFinished()||e[fZ]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})},V=function(t,e){t.on("mouseover",function(t){var n,i,r,o,a,s=fi(t.target,sY);s&&(n=e._api,o=(r=sB((i=si(s)).componentMainType,i.componentIndex,i.componentHighDownName,n)).dispatchers,a=r.focusSelf,o?(a&&sE(i.componentMainType,i.componentIndex,n),tP(o,function(e){return sA(e,t)})):(sN(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&sE(i.componentMainType,i.componentIndex,n),sA(s,t)),j(e))}).on("mouseout",function(t){var n,i,r,o=fi(t.target,sY);o&&(sR(n=e._api),(r=sB((i=si(o)).componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers)?tP(r,function(e){return sD(e,t)}):sD(o,t),j(e))}).on("click",function(t){var n=fi(t.target,function(t){return null!=si(t).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",r=si(n);e._api.dispatchAction({type:i,dataType:r.dataType,dataIndexInside:r.dataIndex,seriesIndex:r.seriesIndex,isFromClick:!0})}})},F=function(t,e,n,i,r){!function(t){var e=[],n=[],i=!1;if(t.eachComponent(function(t,r){var o=r.get("zlevel")||0,a=r.get("z")||0,s=r.getZLevelKey();i=i||!!s,("series"===t?n:e).push({zlevel:o,z:a,idx:r.componentIndex,type:t,key:s})}),i){var r,o,a=e.concat(n);nM(a,function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel}),tP(a,function(e){var n=t.getComponent(e.type,e.idx),i=e.zlevel,a=e.key;null!=r&&(i=Math.max(r,i)),a?(i===r&&a!==o&&i++,o=a):o&&(i===r&&i++,o=""),r=i,n.setZLevel(i)})}}(e),W(t,e,n,i,r),tP(t._chartsViews,function(t){t.__alive=!1}),H(t,e,n,i,r),tP(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},W=function(t,e,o,a,s,l){tP(l||t._componentsViews,function(t){var s=t.__model;i(s,t),t.render(s,e,o,a),n(s,t),r(s,t)})},H=function(t,e,o,a,s,l){var h,u,c,d,p=t._scheduler;s=tI(s||{},{updatedSeries:e.getSeries()}),fU.trigger("series:beforeupdate",e,o,s);var f=!1;e.eachSeries(function(e){var n,r,o,s=t._chartsMap[e.__viewId];s.__alive=!0;var h=s.renderTask;p.updatePayload(h,a),i(e,s),l&&l.get(e.uid)&&h.dirty(),h.perform(p.getPerformArgs(h))&&(f=!0),s.group.silent=!!e.get("silent"),n=e,r=s,o=n.get("blendMode")||null,r.eachRendered(function(t){t.isGroup||(t.style.blend=o)}),sz(e)}),p.unfinished=f||p.unfinished,fU.trigger("series:layoutlabels",e,o,s),fU.trigger("series:transition",e,o,s),e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];n(e,i),r(e,i)}),h=t,u=e,c=h._zr.storage,d=0,c.traverse(function(t){!t.isGroup&&d++}),!(d>u.get("hoverLayerThreshold"))||ts.node||ts.worker||u.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=h._chartsMap[t.__viewId];e.__alive&&e.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}}),fU.trigger("series:afterupdate",e,o,s)},j=function(t){t[fq]=!0,t.getZr().wakeUp()},X=function(t){t[fX]=(t[fX]+1)%1e3},Y=function(t){t[fq]&&(t.getZr().storage.traverse(function(t){s0(t)||e(t)}),t[fq]=!1)},G=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return to(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){sL(e,n),j(t)},n.prototype.leaveEmphasis=function(e,n){sO(e,n),j(t)},n.prototype.enterBlur=function(e){sC(e,sb),j(t)},n.prototype.leaveBlur=function(e){sC(e,sw),j(t)},n.prototype.enterSelect=function(e){sC(e,sS),j(t)},n.prototype.leaveSelect=function(e){sC(e,sM),j(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n.prototype.getMainProcessVersion=function(){return t[fX]},n}(h3))(t)},U=function(t){function e(t,e){for(var n=0;n<t.length;n++)t[n][f$]=e}tP(f6,function(n,i){t._messageCenter.on(i,function(n){if(go[t.group]&&0!==t[f$]&&(!n||!n.escapeConnect)){var i=t.makeActionFromEvent(n),r=[];tP(gr,function(e){e!==t&&e.group===t.group&&r.push(e)}),e(r,0),tP(r,function(t){1!==t[f$]&&t.dispatchAction(i)}),e(r,2)}})})}}(),e}(eS),f3=f5.prototype;f3.on=fJ("on"),f3.off=fJ("off"),f3.one=function(t,e,n){var i=this;this.on.call(this,t,function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];e&&e.apply&&e.apply(this,r),i.off(t,n)},n)};var f4=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],f8={},f6={},f9={},f7=[],gt=[],ge=[],gn={},gi={},gr={},go={},ga=new Date-0,gs="_echarts_instance_";function gl(t,e,n){var i=!(n&&n.ssr);if(i){var r=function(t){return gr[t.getAttribute?t.getAttribute(gs):t[gs]]}(t);if(r)return r}var o=new f5(t,e,n);return o.id="ec_"+ga++,gr[o.id]=o,i&&ou(t,gs,o.id),U(o),fU.trigger("afterinit",o),o}function gh(t){0>tD(gt,t)&&gt.push(t)}function gu(t,e){gg(f7,t,e,2e3)}function gc(t,e){fU.on(t,e)}function gd(t,e,n){function i(t){return t.toLowerCase()}tH(e)&&(n=e,e=""),tY(t)?(r=t.type,l=t.event,a=t.update,s=t.publishNonRefinedEvent,n||(n=t.action),o=t.refineEvent):(r=t,l=e);var r,o,a,s,l=i(l||r),h=o?i(r):l;f8[r]||(t2(fK.test(r)&&fK.test(l)),o&&t2(l!==r),f8[r]={actionType:r,refinedEventType:l,nonRefinedEventType:h,update:a,action:n,refineEvent:o},f9[l]=1,o&&s&&(f9[h]=1),f6[h]=r)}function gp(t,e){gg(ge,t,e,3e3,"visual")}var gf=[];function gg(t,e,n,i,r){if((tH(e)||tY(e))&&(n=e,e=i),!(tD(gf,n)>=0)){gf.push(n);var o=pW.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function gm(t,e,n,i){var r;return{eventContent:{selected:(r=[],n.eachSeries(function(t){tP(t.getAllData(),function(e){e.data;var n=e.type,i=t.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:t.seriesIndex};null!=n&&(o.dataType=n),r.push(o)}})}),r),isFromClick:e.isFromClick||!1}}}gp(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=pB(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=pz(t,i),l=o[s],h=tH(l)?l:null,u="auto"===o.fill||"auto"===o.stroke;if(!o[s]||h||u){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||tH(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||tH(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&h)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=tI({},o);r[s]=h(i),e.setItemVisual(n,"style",r)}}}}),gp(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=pB(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){pV.option=n[i];var a=r(pV);tI(t.ensureUniqueItemVisual(e,"style"),a),pV.option.decal&&(t.setItemVisual(e,"decal",pV.option.decal),pV.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}}),gp(4500,{performRawSeries:!0,overallReset:function(t){var e=t9();t.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),pR(t).scope=r}}),t.eachSeries(function(e){if(!(e.isColorBySeries()||t.isSeriesFiltered(e))){var n=e.getRawData(),i={},r=e.getData(),o=pR(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=pz(e,a);r.each(function(t){i[r.getRawIndex(t)]=t}),n.each(function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),h=n.getName(t)||t+"",u=n.count();l[s]=e.getColorFromPalette(h,o,u)}})}})}}),gp(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a<p8.length;a++){var s=p8[a],l=t.get(s);tH(l)?(o=!0,r[s]=l):i[s]=l}if(i.symbol=i.symbol||t.defaultSymbol,n.setVisual(tI({legendIcon:t.legendIcon||i.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},i)),!e.isSeriesFiltered(t)){var h=tz(r);return{dataEach:o?function(e,n){for(var i=t.getRawValue(n),o=t.getDataParams(n),a=0;a<h.length;a++){var s=h[a];e.setItemVisual(n,s,r[s](i,o))}}:null}}}}}),gp(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){for(var n=t.getItemModel(e),i=0;i<p6.length;i++){var r=p6[i],o=n.getShallow(r,!0);null!=o&&t.setItemVisual(e,r,o)}}:null}}}),gp(7e3,function(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=fH(n,e))});var r=i.getVisual("decal");r&&(i.getVisual("style").decal=fH(r,e))}})}),gh(up),gu(900,function(t){var e=t9();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(t){var e;0!==t.length&&("seriesDesc"===(t[0].seriesModel.get("stackOrder")||"seriesAsc")&&t.reverse(),tP(t,function(e,n){e.data.setCalculationInfo("stackedOnSeries",n>0?t[n-1].seriesModel:null)}),tP(e=t,function(t,n){var i=[],r=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(o,h,u){var c,d,p=a.get(t.stackedDimension,u);if(isNaN(p))return r;s?d=a.getRawIndex(u):c=a.get(t.stackedByDimension,u);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,c)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&p>=0&&y>0||"samesign"===l&&p<=0&&y<0){p=function(t,e){var n=Math.max(rF(t),rF(e)),i=t+e;return n>20?i:rz(i,n)}(p,y),f=y;break}}}return i[0]=p,i[1]=f,i})}))})}),gi.default=function(t,e){tA(e=e||{},{text:"loading",textColor:hS.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:hS.color.theme["0"],spinnerRadius:10,lineWidth:5,zlevel:0});var n,i=new rT,r=new aq({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(r);var o=new sn({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new aq({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return i.add(a),e.showSpinner&&((n=new dD({shape:{startAngle:-pF/2,endAngle:-pF/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*pF/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*pF/2}).delay(300).start("circularInOut"),i.add(n)),i.resize=function(){var i=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner&&i?0:5+i/2)+(e.showSpinner?0:i/2)+(i?0:s),h=t.getHeight()/2;e.showSpinner&&n.setShape({cx:l,cy:h}),a.setShape({x:l-s,y:h-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},gd({type:sc,event:sc,update:sc},ei),gd({type:sd,event:sd,update:sd},ei),gd({type:sp,event:sm,update:sp,action:ei,refineEvent:gm,publishNonRefinedEvent:!0}),gd({type:sf,event:sm,update:sf,action:ei,refineEvent:gm,publishNonRefinedEvent:!0}),gd({type:sg,event:sm,update:sg,action:ei,refineEvent:gm,publishNonRefinedEvent:!0}),gn.default={},gn.dark=p3;var gy={},gv=[],gx={registerPreprocessor:gh,registerProcessor:gu,registerPostInit:function(t){gc("afterinit",t)},registerPostUpdate:function(t){gc("afterupdate",t)},registerUpdateLifecycle:gc,registerAction:gd,registerCoordinateSystem:function(t,e){ht.register(t,e)},registerLayout:function(t,e){gg(ge,t,e,1e3,"layout")},registerVisual:gp,registerTransform:function(t){var e=(t=tC(t)).type;e||uC("");var n=e.split(":");2!==n.length&&uC("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,uQ.set(e,t)},registerLoading:function(t,e){gi[t]=e},registerMap:function(t,e,n){var i=fj.registerMap;i&&i(t,e,n)},registerImpl:function(t,e){fj[t]=e},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:h_,ComponentView:cL,SeriesModel:cS,ChartView:pw,registerComponentModel:function(t){h_.registerClass(t)},registerComponentView:function(t){cL.registerClass(t)},registerSeriesModel:function(t){cS.registerClass(t)},registerChartView:function(t){pw.registerClass(t)},registerCustomSeries:function(t,e){gy[t]=e},registerSubTypeDefaulter:function(t,e){h_.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){rI[t]=e}};function g_(t){tW(t)?tP(t,function(t){g_(t)}):tD(gv,t)>=0||(gv.push(t),tH(t)&&(t={install:t}),t.install(gx))}var gb=2*Math.PI,gw=a_.CMD,gS=["top","right","bottom","left"];function gM(t,e,n,i,r,o,a,s){var l=n-t,h=i-e,u=Math.sqrt(l*l+h*h),c=((r-t)*(l/=u)+(o-e)*(h/=u))/u;s&&(c=Math.min(Math.max(c,0),1)),c*=u;var d=a[0]=t+c*l,p=a[1]=e+c*h;return Math.sqrt((d-r)*(d-r)+(p-o)*(p-o))}function gC(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,h=a[0]=Math.min(Math.max(r,t),s),u=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((h-r)*(h-r)+(u-o)*(u-o))}var gk=[],gT=new e1,gI=new e1,gA=new e1,gD=new e1,gL=new e1;function gO(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var r=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||gS,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,h=r.anchor,u=t.getComputedTransform(),c=u&&e0([],u),d=e.get("length2")||0;h&&gA.copy(h);for(var p=0;p<a.length;p++){!function(t,e,n,i){var r=e.width,o=e.height;switch(t){case"top":n.set(e.x+r/2,e.y-0),i.set(0,-1);break;case"bottom":n.set(e.x+r/2,e.y+o+0),i.set(0,1);break;case"left":n.set(e.x-0,e.y+o/2),i.set(-1,0);break;case"right":n.set(e.x+r+0,e.y+o/2),i.set(1,0)}}(a[p],s,gT,gD),e1.scaleAndAdd(gI,gT,gD,d),gI.transform(c);var f=t.getBoundingRect(),g=h?h.distance(gI):t instanceof aN?function(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,h=1/0,u=e.data,c=t.x,d=t.y,p=0;p<u.length;){var f=u[p++];1===p&&(o=u[p],a=u[p+1],s=o,l=a);var g=h;switch(f){case gw.M:s=u[p++],l=u[p++],o=s,a=l;break;case gw.L:g=gM(o,a,u[p],u[p+1],c,d,gk,!0),o=u[p++],a=u[p++];break;case gw.C:g=nU(o,a,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],c,d,gk),o=u[p++],a=u[p++];break;case gw.Q:g=nq(o,a,u[p++],u[p++],u[p],u[p+1],c,d,gk),o=u[p++],a=u[p++];break;case gw.A:var m=u[p++],y=u[p++],v=u[p++],x=u[p++],_=u[p++],b=u[p++];p+=1;var w=!!(1-u[p++]);i=Math.cos(_)*v+m,r=Math.sin(_)*x+y,p<=1&&(s=i,l=r);var S=(c-m)*x/v+m;g=function(t,e,n,i,r,o,a,s,l){var h=Math.sqrt((a-=t)*a+(s-=e)*s),u=(a/=h)*n+t,c=(s/=h)*n+e;if(Math.abs(i-r)%gb<1e-4)return l[0]=u,l[1]=c,h-n;if(o){var d=i;i=aM(r),r=aM(d)}else i=aM(i),r=aM(r);i>r&&(r+=gb);var p=Math.atan2(s,a);if(p<0&&(p+=gb),p>=i&&p<=r||p+gb>=i&&p+gb<=r)return l[0]=u,l[1]=c,h-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,m=n*Math.cos(r)+t,y=n*Math.sin(r)+e,v=(f-a)*(f-a)+(g-s)*(g-s),x=(m-a)*(m-a)+(y-s)*(y-s);return v<x?(l[0]=f,l[1]=g,Math.sqrt(v)):(l[0]=m,l[1]=y,Math.sqrt(x))}(m,y,x,_,_+b,w,S,d,gk),o=Math.cos(_+b)*v+m,a=Math.sin(_+b)*x+y;break;case gw.R:g=gC(s=o=u[p++],l=a=u[p++],u[p++],u[p++],c,d,gk);break;case gw.Z:g=gM(o,a,s,l,c,d,gk,!0),o=s,a=l}g<h&&(h=g,n.set(gk[0],gk[1]))}return h}(gI,t.path,gA):function(t,e,n){var i=gC(e.x,e.y,e.width,e.height,t.x,t.y,gk);return n.set(gk[0],gk[1]),i}(gI,f,gA);g<l&&(l=g,gI.transform(u),gA.transform(u),gA.toArray(o[0]),gI.toArray(o[1]),gT.toArray(o[2]))}gN(o,e.get("minTurnAngle")),n.setShape({points:o})}}}var gP=[],gR=new e1;function gN(t,e){if(e<=180&&e>0){e=e/180*Math.PI,gT.fromArray(t[0]),gI.fromArray(t[1]),gA.fromArray(t[2]),e1.sub(gD,gT,gI),e1.sub(gL,gA,gI);var n=gD.len(),i=gL.len();if(!(n<.001)&&!(i<.001)&&(gD.scale(1/n),gL.scale(1/i),Math.cos(e)<gD.dot(gL))){var r=gM(gI.x,gI.y,gA.x,gA.y,gT.x,gT.y,gP,!1);gR.fromArray(gP),gR.scaleAndAdd(gL,r/Math.tan(Math.PI-e));var o=gA.x!==gI.x?(gR.x-gI.x)/(gA.x-gI.x):(gR.y-gI.y)/(gA.y-gI.y);if(isNaN(o))return;o<0?e1.copy(gR,gI):o>1&&e1.copy(gR,gA),gR.toArray(t[1])}}}function gE(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function gB(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=eg(i[0],i[1]),o=eg(i[1],i[2]);if(!r||!o){t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]);return}var a=Math.min(r,o)*n,s=ey([],i[1],i[0],a/r),l=ey([],i[1],i[2],a/o),h=ey([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],h[0],h[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var u=1;u<i.length;u++)t.lineTo(i[u][0],i[u][1])}function gz(t,e,n){var i=t.getTextGuideLine(),r=t.getTextContent();if(!r){i&&t.removeTextGuideLine();return}for(var o=e.normal,a=o.get("show"),s=r.ignore,l=0;l<su.length;l++){var h=su[l],u=e[h],c="normal"===h;if(u){var d=u.get("show");if((c?s:tJ(r.states[h]&&r.states[h].ignore,s))||!tJ(d,a)){var p=c?i:i&&i.states[h];p&&(p.ignore=!0),i&&gE(i,!0,h,u);continue}!i&&(i=new dv,t.setTextGuideLine(i),c||!s&&a||gE(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),gE(i,!1,h,u)}}if(i){tA(i.style,n),i.style.fill=null;var f=o.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=f||!1,i.buildPath=gB}}function gV(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<sh.length;i++){var r=sh[i];n[r]=t.getModel([r,e])}return n}var gF=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"];function gW(t,e,n){n=n||3,e?t.dirty|=n:t.dirty&=~n}function gH(t,e){return e=e||3,null==t.dirty||!!(t.dirty&e)}function gG(t){if(t)return gH(t)&&gU(t,t.label,t),t}function gU(t,e,n){var i=e.getComputedTransform();t.transform=pm(t.transform,i);var r=t.localRect=pg(t.localRect,e.getBoundingRect()),o=e.style,a=o.margin,s=n&&n.marginForce,l=n&&n.minMarginForce,h=n&&n.marginDefault,u=o.__marginType;null==u&&h&&(a=h,u=lu.textMargin);for(var c=0;c<4;c++)gj[c]=u===lu.minMargin&&l&&null!=l[c]?l[c]:s&&null!=s[c]?s[c]:a?a[c]:0;u===lu.textMargin&&ps(r,gj,!1,!1);var d=t.rect=pg(t.rect,r);return i&&d.applyTransform(i),u===lu.minMargin&&ps(d,gj,!1,!1),t.axisAligned=pp(i),(t.label=t.label||{}).ignore=e.ignore,gW(t,!1),gW(t,!0,2),t}var gj=[0,0,0,0];function gY(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var n=t.transform;n&&(n[4]+=e.x,n[5]+=e.y);var i=t.rect;i&&(i.x+=e.x,i.y+=e.y);var r=t.obb;r&&r.fromBoundingRect(t.localRect,n)}}function gX(t,e){for(var n=0;n<gF.length;n++){var i=gF[n];null==t[i]&&(t[i]=e[i])}return gG(t)}function gZ(t){var e=t.obb;return(!e||gH(t,2))&&(t.obb=e=e||new dG,e.fromBoundingRect(t.localRect,t.transform),gW(t,!1,2)),e}function gq(t,e,n,i,r){var o,a,s,l=t.length,h=dX[e],u=dZ[e];if(l<2)return!1;t.sort(function(t,e){return t.rect[h]-e.rect[h]});for(var c=0,d=!1,p=0,f=0;f<l;f++){var g=t[f],m=g.rect;(o=m[h]-c)<0&&(m[h]-=o,g.label[h]-=o,d=!0),p+=Math.max(-o,0),c=m[h]+m[u]}p>0&&r&&b(-p/l,0,l);var y=t[0],v=t[l-1];function x(){a=y.rect[h]-n,s=i-v.rect[h]-v.rect[u]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){b(i*n,0,l);var r=i+t;r<0&&w(-r*n,1)}else w(-t*n,1)}}function b(e,n,i){0!==e&&(d=!0);for(var r=n;r<i;r++){var o=t[r],a=o.rect;a[h]+=e,o.label[h]+=e}}function w(e,n){for(var i=[],r=0,o=1;o<l;o++){var a=t[o-1].rect,s=Math.max(t[o].rect[h]-a[h]-a[u],0);i.push(s),r+=s}if(r){var c=Math.min(Math.abs(e)/r,n);if(e>0)for(var o=0;o<l-1;o++){var d=i[o]*c;b(d,0,o+1)}else for(var o=l-1;o>0;o--){var d=i[o-1]*c;b(-d,o,l)}}}function S(t){for(var e=t<0?-1:1,n=Math.ceil((t=Math.abs(t))/(l-1)),i=0;i<l-1;i++)if(e>0?b(n,0,i+1):b(-n,l-i-1,l),(t-=n)<=0)return}return x(),a<0&&w(-a,.8),s<0&&w(s,.8),x(),_(a,s,1),_(s,a,-1),x(),a<0&&S(-a),s<0&&S(s),d}function gK(t){var e=[];function n(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}t.sort(function(t,e){return!!e.suggestIgnore-!!t.suggestIgnore||e.priority-t.priority});for(var i=0;i<t.length;i++){var r=gG(t[i]);if(!r.label.ignore){for(var o=r.label,a=r.labelLine,s=!1,l=0;l<e.length;l++)if(g$(r,e[l],null,{touchThreshold:.05})){s=!0;break}s?(n(o),a&&n(a)):e.push(r)}}}function g$(t,e,n,i){return!!t&&!!e&&(!t.label||!t.label.ignore)&&(!e.label||!e.label.ignore)&&!!t.rect.intersect(e.rect,n,i)&&(!!t.axisAligned&&!!e.axisAligned||gZ(t).intersect(gZ(e),n,i))}var gJ=["align","verticalAlign","width","height","fontSize"],gQ=new ri,g0=oi(),g1=oi();function g2(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null!=e[r]&&(t[r]=e[r])}}var g5=["x","y","rotation"],g3=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,i,r){var o,a=i.style,s=i.__hostTarget.textConfig||{},l=i.getComputedTransform(),h=i.getBoundingRect().plain();nu.applyTransform(h,h,l),l?gQ.setLocalTransform(l):(gQ.x=gQ.y=gQ.rotation=gQ.originX=gQ.originY=0,gQ.scaleX=gQ.scaleY=1),gQ.rotation=aM(gQ.rotation);var u=i.__hostTarget;if(u){o=u.getBoundingRect().plain();var c=u.getComputedTransform();nu.applyTransform(o,o,c)}var d=o&&u.getTextGuideLine();this._labelList.push({label:i,labelLine:d,seriesModel:n,dataIndex:t,dataType:e,layoutOptionOrCb:r,layoutOption:null,rect:h,hostRect:o,priority:o?o.width*o.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:d&&d.ignore,x:gQ.x,y:gQ.y,scaleX:gQ.scaleX,scaleY:gQ.scaleY,rotation:gQ.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:i.cursor,attachedPos:s.position,attachedRot:s.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(tH(i)||tz(i).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var r=t.getTextContent(),o=si(t);r&&!r.disableLabelLayout&&e._addLabel(o.dataIndex,o.dataType,n,r,i)})},t.prototype.updateLayoutConfig=function(t){for(var e=t.getWidth(),n=t.getHeight(),i=0;i<this._labelList.length;i++){var r=this._labelList[i],o=r.label,a=o.__hostTarget,s=r.defaultAttr,l=void 0;l=(l=tH(r.layoutOptionOrCb)?r.layoutOptionOrCb(function(t,e){var n=t.label,i=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}(i&&i.shape.points)}}(r,a)):r.layoutOptionOrCb)||{},r.layoutOption=l;var h=Math.PI/180;a&&a.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:s.attachedPos,rotation:null!=l.rotate?l.rotate*h:s.attachedRot,offset:[l.dx||0,l.dy||0]});var u=!1;if(null!=l.x?(o.x=rE(l.x,e),o.setStyle("x",0),u=!0):(o.x=s.x,o.setStyle("x",s.style.x)),null!=l.y?(o.y=rE(l.y,n),o.setStyle("y",0),u=!0):(o.y=s.y,o.setStyle("y",s.style.y)),l.labelLinePoints){var c=a.getTextGuideLine();c&&(c.setShape({points:l.labelLinePoints}),u=!1)}g0(o).needsUpdateLabelLine=u,o.rotation=null!=l.rotate?l.rotate*h:s.rotation,o.scaleX=s.scaleX,o.scaleY=s.scaleY;for(var d=0;d<gJ.length;d++){var p=gJ[d];o.setStyle(p,null!=l[p]?l[p]:s.style[p])}if(l.draggable){if(o.draggable=!0,o.cursor="move",a){var f=r.seriesModel;null!=r.dataIndex&&(f=r.seriesModel.getData(r.dataType).getItemModel(r.dataIndex)),o.on("drag",function(t,e){return function(){gO(t,e)}}(a,f.getModel("labelLine")))}}else o.off("drag"),o.cursor=s.cursor}},t.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),i=[];tP(this._labelList,function(t){t.defaultAttr.ignore||i.push(gX({},t))});var r=tE(i,function(t){return"shiftX"===t.layoutOption.moveOverlap}),o=tE(i,function(t){return"shiftY"===t.layoutOption.moveOverlap});gq(r,0,0,e),gq(o,1,0,n);for(var a=tE(i,function(t){return t.layoutOption.hideOverlap}),s=0;s<a.length;s++){var l=a[s],h=l.defaultAttr,u=l.labelLine;l.label.attr("ignore",h.ignore),u&&u.attr("ignore",h.labelGuideIgnore)}gK(a)},t.prototype.processLabelsOverall=function(){var t=this;tP(this._chartViewList,function(e){var n=e.__model,i=e.ignoreLabelLineUpdate,r=n.isAnimationEnabled();e.group.traverse(function(e){if(e.ignore&&!e.forceLabelAnimation)return!0;var o=!i,a=e.getTextContent();!o&&a&&(o=g0(a).needsUpdateLabelLine),o&&t._updateLabelLine(e,n),r&&t._animateLabels(e,n)})})},t.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=si(t),r=i.dataIndex;if(n&&null!=r){var o=e.getData(i.dataType),a=o.getItemModel(r),s={},l=o.getItemVisual(r,"style");l&&(s.stroke=l[o.getVisual("drawType")]);var h=a.getModel("labelLine");gz(t,gV(a),s),gO(t,h)}},t.prototype._animateLabels=function(t,e){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!s0(t))){var r=g0(n),o=r.oldLayout,a=si(t),s=a.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},h=e.getData(a.dataType);if(o){n.attr(o);var u=t.prevStates;u&&(tD(u,"select")>=0&&n.attr(r.oldLayoutSelect),tD(u,"emphasis")>=0&&n.attr(r.oldLayoutEmphasis)),sJ(n,l,e,s)}else if(n.attr(l),!ls(n).valueAnimation){var c=tJ(n.style.opacity,1);n.style.opacity=0,sQ(n,{style:{opacity:c}},e,s)}if(r.oldLayout=l,n.states.select){var d=r.oldLayoutSelect={};g2(d,l,g5),g2(d,n.states.select,g5)}if(n.states.emphasis){var p=r.oldLayoutEmphasis={};g2(p,l,g5),g2(p,n.states.emphasis,g5)}lh(n,s,h,e,e)}if(i&&!i.ignore&&!i.invisible){var r=g1(i),o=r.oldLayout,f={points:i.shape.points};o?(i.attr({shape:o}),sJ(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,sQ(i,{style:{strokePercent:1}},e)),r.oldLayout=f}},t}(),g4=oi();function g8(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var i=g4(e).labelManager;i||(i=g4(e).labelManager=new g3),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=g4(e).labelManager;n.updatedSeries.forEach(function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}function g6(t,e,n){var i=tc.createCanvas(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}g_(g8);var g9=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||i4,"string"==typeof e?r=g6(e,n,i):tY(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(ee(r),r.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=i,o}return to(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=g6("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new nu(0,0,0,0);function h(t){if(!(!t.isFinite()||t.isZero()))if(0===o.length){var e=new nu(0,0,0,0);e.copy(t),o.push(e)}else{for(var n=!1,i=1/0,r=0,h=0;h<o.length;++h){var u=o[h];if(u.intersect(t)){var c=new nu(0,0,0,0);c.copy(u),c.union(t),o[h]=c,n=!0;break}if(s){l.copy(t),l.union(u);var d=t.width*t.height,p=u.width*u.height,f=l.width*l.height-d-p;f<i&&(i=f,r=h)}}if(s&&(o[r].union(t),n=!0),!n){var e=new nu(0,0,0,0);e.copy(t),o.push(e)}s||(s=o.length>=a)}}for(var u=this.__startIndex;u<this.__endIndex;++u){var c=t[u];if(c){var d=c.shouldBePainted(n,i,!0,!0),p=c.__isRendered&&(1&c.__dirty||!d)?c.getPrevPaintRect():null;p&&h(p);var f=d&&(1&c.__dirty||!c.__isRendered)?c.getPaintRect():null;f&&h(f)}}for(var u=this.__prevStartIndex;u<this.__prevEndIndex;++u){var c=e[u],d=c&&c.shouldBePainted(n,i,!0,!0);if(c&&(!d||!c.__zr)&&c.__isRendered){var p=c.getPrevPaintRect();p&&h(p)}}do{r=!1;for(var u=0;u<o.length;){if(o[u].isZero()){o.splice(u,1);continue}for(var g=u+1;g<o.length;)o[u].intersect(o[g])?(r=!0,o[u].union(o[g]),o.splice(g,1)):g++;u++}}while(r);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,o&&(o.width=t*n,o.height=e*n,1!==n&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,e,n){var i=this.dom,r=this.ctx,o=i.width,a=i.height;e=e||this.clearColor;var s=this.motionBlur&&!t,l=this.lastFrameAlpha,h=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/h,a/h));var c=this.domBack;function d(t,n,i,o){if(r.clearRect(t,n,i,o),e&&"transparent"!==e){var a=void 0;tK(e)?(a=(e.global||e.__width===i&&e.__height===o)&&e.__canvasGradient||fx(r,e,{x:0,y:0,width:i,height:o}),e.__canvasGradient=a,e.__width=i,e.__height=o):null!=e.image&&(e.scaleX=e.scaleX||h,e.scaleY=e.scaleY||h,a=fA(r,e,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),r.save(),r.fillStyle=a||e,r.fillRect(t,n,i,o),r.restore()}s&&(r.save(),r.globalAlpha=l,r.drawImage(c,t,n,i,o),r.restore())}!n||s?d(0,0,o,a):n.length&&tP(n,function(t){d(t.x*h,t.y*h,t.width*h,t.height*h)})},e}(eS),g7=function(){function t(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=tI({},n||{}),this.dpr=n.devicePixelRatio||i4,this._singleCanvas=r,this.root=t,t.style&&(ee(t),t.innerHTML=""),this.storage=e;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(r){var s=t.width,l=t.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var h=new g9(t,this,this.dpr);h.__builtin__=!0,h.initContext(),a[314159]=h,h.zlevel=314159,o.push(314159),this._domRoot=t}else{this._width=fb(t,0,n),this._height=fb(t,1,n);var u,c,d,p=this._domRoot=(u=this._width,c=this._height,(d=document.createElement("div")).style.cssText=["position:relative","width:"+u+"px","height:"+c+"px","padding:0;margin:0;border-width:0"].join(";")+";",d);t.appendChild(p)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var r=0;r<i.length;r++){var o=i[r],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===r?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var e,n=t.length,i=this._hoverlayer;if(i&&i.clear(),n){for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<n;o++){var a=t[o];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(1e5)),e||(e=i.ctx).save(),fz(e,a,r,o===n-1))}e&&e.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(1e5)},t.prototype.paintOne=function(t,e){fB(t,e)},t.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e,n),o=r.finished,a=r.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer(function(t){t.afterBrush&&t.afterBrush()});else{var s=this;g(function(){s._paintList(t,e,n,i)})}}},t.prototype._compositeManually=function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},t.prototype._doPaintList=function(t,e,n){for(var i=this,r=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&r.push(l)}for(var h=!0,u=!1,c=this,d=0;d<r.length;d++)!function(a){var s,l=r[a],d=l.ctx,p=o&&l.createRepaintRects(t,e,c._width,c._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),y=l.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,y,p);else if(f===l.__startIndex){var v=t[f];v.incremental&&v.notClear&&!n||l.clear(!1,y,p)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(e){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(s=f;s<l.__endIndex;s++){var r=t[s];if(r.__inHover&&(u=!0),i._doPaintEl(r,l,o,e,n,s===l.__endIndex-1),g&&Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var _=c.dpr,b=0;b<p.length;++b){var w=p[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(h=!1)}(d);return ts.wxa&&tP(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:h,needsRefreshHover:u}},t.prototype._doPaintEl=function(t,e,n,i,r,o){var a=e.ctx;if(n){var s=t.getPaintRect();(!i||s&&s.intersect(i))&&(fz(a,t,r,o),t.setPrevPaintRect(s))}else fz(a,t,r,o)},t.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var n=this._layers[t];return n||((n=new g9("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?tk(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&tk(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},t.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,o=this._domRoot,a=null,s=-1;if(!n[t]){if(e&&(e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh&&1)){if(r>0&&t>i[0]){for(s=0;s<r-1&&(!(i[s]<t)||!(i[s+1]>t));s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i];t.call(e,this._layers[r],r)}},t.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__&&t.call(e,o,r)}},t.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__||t.call(e,o,r)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function e(t){a&&(a.__endIndex!==t&&(a.__dirty=!0),a.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n,i,r=1;r<t.length;r++){var o=t[r];if(o.zlevel!==t[r-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0;for(i=0;i<t.length;i++){var o=t[i],l=o.zlevel,h=void 0;n!==l&&(n=l,s=0),o.incremental?((h=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,s=1):h=this.getLayer(l+.01*(s>0),this._needsManuallyCompositing),h.__builtin__||tM("ZLevel "+l+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==i&&(h.__dirty=!0),h.__startIndex=i,h.incremental?h.__drawIndex=-1:h.__drawIndex=i,e(i),a=h),1&o.__dirty&&!o.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,tP(this._layers,function(t){t.setUnpainted()})},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?tk(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(r===t||r===t+.01)&&tk(this._layers[r],n[t],!0)}}},t.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(tD(n,t),1))},t.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,r=this.root;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=fb(r,0,i),e=fb(r,1,i),n.style.display="",this._width!==t||e!==this._height){for(var o in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}return this},t.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new g9("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,r=e.dom.height;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,i,r):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++)fz(n,a[s],o,s===l-1);return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}(),mt=Math.sin,me=Math.cos,mn=Math.PI,mi=2*Math.PI,mr=180/mn,mo=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,h=!s,u=Math.abs(l),c=iy(u-mi)||(h?l>=mi:-l>=mi),d=l>0?l%mi:l%mi+mi,p=!1;p=!!c||!iy(u)&&d>=mn==!!h;var f=t+n*me(o),g=e+i*mt(o);this._start&&this._add("M",f,g);var m=Math.round(r*mr);if(c){var y=1/this._p,v=(h?1:-1)*(mi-y);this._add("A",n,i,m,1,+h,t+n*me(o+v),e+i*mt(o+v)),y>.01&&this._add("A",n,i,m,0,+h,f,g)}else{var x=t+n*me(a),_=e+i*mt(a);this._add("A",n,i,m,+p,+h,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var h=[],u=this._p,c=1;c<arguments.length;c++){var d=arguments[c];if(isNaN(d)){this._invalid=!0;return}h.push(Math.round(d*u)/u)}this._d.push(t+h.join(" ")),this._start="Z"===t},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),ma="none",ms=Math.round,ml=["lineCap","miterLimit","lineJoin"],mh=tR(ml,function(t){return"stroke-"+t.toLowerCase()}),mu="http://www.w3.org/2000/svg",mc="http://www.w3.org/1999/xlink",md="ecmeta_";function mp(t){return document.createElementNS(mu,t)}function mf(t,e,n,i,r){return{tag:t,attrs:n||{},children:i,text:r,key:e}}function mg(t,e){var n=(e=e||{}).newline?"\n":"";return function t(e){var i=e.children,r=e.tag,o=e.attrs,a=e.text;return function(t,e){var n=[];if(e)for(var i in e){var r=e[i],o=i;!1!==r&&(!0!==r&&null!=r&&(o+='="'+r+'"'),n.push(o))}return"<"+t+" "+n.join(" ")+">"}(r,o)+("style"!==r?eP(a):a||"")+(i?""+n+tR(i,function(e){return t(e)}).join(n)+n:"")+"</"+r+">"}(t)}function mm(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function my(t,e,n,i){return mf("svg","root",{width:t,height:e,xmlns:mu,"xmlns:xlink":mc,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var mv=0,mx={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"},m_="transform-origin",mb={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function mw(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function mS(t){return tG(t)?mx[t]?"cubic-bezier("+mx[t]+")":n$(t)?t:"":""}function mM(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof dL){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(tP(o,function(t){var e=mm(n.zrId);e.animation=!0,mM(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=tz(o),h=l.length;if(h){var u=o[r=l[h-1]];for(var c in u){var d=u[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}}),i){e.d=!1;var s=mw(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},h=0;h<o;h++){var u=r[h],c=[u.getMaxTime()/1e3+"s"],d=mS(u.getClip().easing),p=u.getDelay();d?c.push(d):c.push("linear"),p&&c.push(p/1e3+"s"),u.getLoop()&&c.push("infinite");var f=c.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(u)}for(var g in l){var s=function(r){var o,a,s=r[1],l=s.length,h={},u={},c={},d="animation-timing-function";function p(t,e,n){for(var i=t.getTracks(),r=t.getMaxTime(),o=0;o<i.length;o++){var a=i[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var h=0;h<s.length;h++){var u=s[h],c=Math.round(u.time/r*100)+"%",p=mS(u.easing),f=u.rawValue;(tG(f)||tj(f))&&(e[c]=e[c]||{},e[c][l]=u.rawValue,p&&(e[c][d]=p))}}}}for(var f=0;f<l;f++){var g=s[f],m=g.targetName;m?"shape"===m&&p(g,u):i||p(g,h)}for(var y in h){var v={};ro(v,t),tI(v,h[y]);var x=iI(v),_=h[y][d];c[y]=x?{transform:x}:{},function(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[m_]=n+"px "+i+"px")}(c[y],v),_&&(c[y][d]=_)}var b=!0;for(var y in u){c[y]=c[y]||{};var w=!o,_=u[y][d];w&&(o=new a_);var S=o.len();o.reset(),c[y].d=function(t,e,n){var i=tI({},t.shape);tI(i,e),t.buildPath(n,i);var r=new mo;return r.reset(iT(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}(t,u[y],o);var M=o.len();if(!w&&S!==M){b=!1;break}_&&(c[y][d]=_)}if(!b)for(var y in c)delete c[y].d;if(!i)for(var f=0;f<l;f++){var g=s[f],m=g.targetName;"style"===m&&p(g,c,function(t){return mb[t]})}for(var C=tz(c),k=!0,f=1;f<C.length;f++){var T=C[f-1],I=C[f];if(c[T][m_]!==c[I][m_]){k=!1;break}a=c[T][m_]}if(k&&a){for(var y in c)c[y][m_]&&delete c[y][m_];e[m_]=a}if(tE(C,function(t){return tz(c[t]).length>0}).length)return mw(c,n)+" "+r[0]+" both"}(l[g]);s&&a.push(s)}if(a.length){var m=n.zrId+"-cls-"+mv++;n.cssNodes["."+m]={animation:a.join(",")},e.class=m}}function mC(t,e,n,i){var r=JSON.stringify(t),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+mv++,n.cssStyleCache[r]=o,n.cssNodes["."+o+(i?":hover":"")]=t),e.class=e.class?e.class+" "+o:o}var mk=Math.round;function mT(t){return t&&tH(t.toDataURL)}function mI(t,e,n,i){!function(t,e,n,i){var r,o,a=null==e.opacity?1:e.opacity;if(n instanceof aW)return t("opacity",a);if(null!=(r=e.fill)&&r!==ma){var s=im(e.fill);t("fill",s.color);var l=null!=e.fillOpacity?e.fillOpacity*s.opacity*a:s.opacity*a;(i||l<1)&&t("fill-opacity",l)}else t("fill",ma);if(null!=(o=e.stroke)&&o!==ma){var h=im(e.stroke);t("stroke",h.color);var u=e.strokeNoScale?n.getLineScale():1,c=u?(e.lineWidth||0)/u:0,d=null!=e.strokeOpacity?e.strokeOpacity*h.opacity*a:h.opacity*a,p=e.strokeFirst;if((i||1!==c)&&t("stroke-width",c),(i||p)&&t("paint-order",p?"stroke":"fill"),(i||d<1)&&t("stroke-opacity",d),e.lineDash){var f=fw(n),g=f[0],m=f[1];g&&(m=ms(m||0),t("stroke-dasharray",g.join(",")),(m||i)&&t("stroke-dashoffset",m))}else i&&t("stroke-dasharray",ma);for(var y=0;y<ml.length;y++){var v=ml[y];if(i||e[v]!==aO[v]){var x=e[v]||aO[v];x&&t(mh[y],x)}}}else i&&t("stroke",ma)}(function(r,o){var a="fill"===r||"stroke"===r;a&&iC(o)?mB(e,t,r,i):a&&iw(o)?mz(n,t,r,i):t[r]=o,a&&i.ssr&&"none"===o&&(t["pointer-events"]="visible")},e,n,!1),function(t,e,n){var i=t.style;if(i&&(i.shadowBlur||i.shadowOffsetX||i.shadowOffsetY)){var r,o,a=(r=t.style,o=t.getGlobalScale(),[r.shadowColor,(r.shadowBlur||0).toFixed(2),(r.shadowOffsetX||0).toFixed(2),(r.shadowOffsetY||0).toFixed(2),o[0],o[1]].join(",")),s=n.shadowCache,l=s[a];if(!l){var h=t.getGlobalScale(),u=h[0],c=h[1];if(!u||!c)return;var d=i.shadowOffsetX||0,p=i.shadowOffsetY||0,f=i.shadowBlur,g=im(i.shadowColor),m=g.opacity,y=g.color;l=n.zrId+"-s"+n.shadowIdx++,n.defs[l]=mf("filter",l,{id:l,x:"-100%",y:"-100%",width:"300%",height:"300%"},[mf("feDropShadow","",{dx:d/u,dy:p/c,stdDeviation:f/2/u+" "+f/2/c,"flood-color":y,"flood-opacity":m})]),s[a]=l}e.filter=ik(l)}}(n,t,i)}function mA(t,e){var n=function(t){if("function"==typeof y)return y(t)}(e);n&&(n.each(function(e,n){null!=e&&(t[(md+n).toLowerCase()]=e+"")}),e.isSilent()&&(t[md+"silent"]="true"))}function mD(t){return iy(t[0]-1)&&iy(t[1])&&iy(t[2])&&iy(t[3]-1)}function mL(t,e,n){if(e&&!(iy(e[4])&&iy(e[5])&&mD(e))){var i=n?10:1e4;t.transform=mD(e)?"translate("+mk(e[4]*i)/i+" "+mk(e[5]*i)/i+")":"matrix("+iv(e[0])+","+iv(e[1])+","+iv(e[2])+","+iv(e[3])+","+ix(e[4])+","+ix(e[5])+")"}}function mO(t,e,n){for(var i=t.points,r=[],o=0;o<i.length;o++)r.push(mk(i[o][0]*n)/n),r.push(mk(i[o][1]*n)/n);e.points=r.join(" ")}function mP(t){return!t.smooth}var mR={circle:[(c=tR(["cx","cy","r"],function(t){return"string"==typeof t?[t,t]:t}),function(t,e,n){for(var i=0;i<c.length;i++){var r=c[i],o=t[r[0]];null!=o&&(e[r[1]]=mk(o*n)/n)}})],polyline:[mO,mP],polygon:[mO,mP]};function mN(t,e){var n=t.style,i=t.shape,r=mR[t.type],o={},a=e.animation,s="path",l=t.style.strokePercent,h=e.compress&&iT(t)||4;if(!r||e.willUpdate||r[1]&&!r[1](i)||a&&function(t){for(var e=t.animators,n=0;n<e.length;n++)if("shape"===e[n].targetName)return!0;return!1}(t)||l<1){var u=!t.path||t.shapeChanged();t.path||t.createPathProxy();var c=t.path;u&&(c.beginPath(),t.buildPath(c,t.shape),t.pathUpdated());var d=c.getVersion(),p=t.__svgPathBuilder;t.__svgPathVersion===d&&p&&l===t.__svgPathStrokePercent||(p||(p=t.__svgPathBuilder=new mo),p.reset(h),c.rebuildPath(p,l),p.generateStr(),t.__svgPathVersion=d,t.__svgPathStrokePercent=l),o.d=p.getStr()}else{s=t.type;var f=Math.pow(10,h);r[0](i,o,f)}return mL(o,t.transform),mI(o,n,t,e),mA(o,t),e.animation&&mM(t,o,e),e.emphasis&&function(t,e,n){if(!t.ignore)if(t.isSilent()){var i={"pointer-events":"none"};mC(i,e,n,!0)}else{var r=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},o=r.fill;if(!o){var a=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||a;l&&(o=ip(l))}var h=r.lineWidth;h&&(h/=!r.strokeNoScale&&t.transform?t.transform[0]:1);var i={cursor:"pointer"};o&&(i.fill=o),r.stroke&&(i.stroke=r.stroke),h&&(i["stroke-width"]=h),mC(i,e,n,!0)}}(t,o,e),mf(s,t.id+"",o)}function mE(t,e){return t instanceof aN?mN(t,e):t instanceof aW?function(t,e){var n,i=t.style,r=i.image;if(r&&!tG(r)&&((n=r)&&tG(n.src)?r=r.src:mT(r)&&(r=r.toDataURL())),r){var o=i.x||0,a=i.y||0,s={href:r,width:i.width,height:i.height};return o&&(s.x=o),a&&(s.y=a),mL(s,t.transform),mI(s,i,t,e),mA(s,t),e.animation&&mM(t,s,e),mf("image",t.id+"",s)}}(t,e):t instanceof aB?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),!(!i||isNaN(n.x)||isNaN(n.y))){var r,o,a,s=n.font||th,l=n.x||0,h=(r=n.y||0,o=rf(s),"top"===(a=n.textBaseline)?r+=o/2:"bottom"===a&&(r-=o/2),r),u={"dominant-baseline":"central","text-anchor":i_[n.textAlign]||n.textAlign};if(a4(n)){var c="",d=n.fontStyle,p=a5(n.fontSize);if(!parseFloat(p))return;var f=n.fontFamily||tl,g=n.fontWeight;c+="font-size:"+p+";font-family:"+f+";",d&&"normal"!==d&&(c+="font-style:"+d+";"),g&&"normal"!==g&&(c+="font-weight:"+g+";"),u.style=c}else u.style="font: "+s;return i.match(/\s/)&&(u["xml:space"]="preserve"),l&&(u.x=l),h&&(u.y=h),mL(u,t.transform),mI(u,n,t,e),mA(u,t),e.animation&&mM(t,u,e),mf("text",t.id+"",u,void 0,i)}}(t,e):void 0}function mB(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(iS(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!iM(o))return;r="radialGradient",a.cx=tJ(o.x,.5),a.cy=tJ(o.y,.5),a.r=tJ(o.r,.5)}for(var s=o.colorStops,l=[],h=0,u=s.length;h<u;++h){var c=100*ix(s[h].offset)+"%",d=im(s[h].color),p=d.color,f=d.opacity,g={offset:c};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),l.push(mf("stop",h+"",g))}var m=mg(mf(r,"",a,l)),y=i.gradientCache,v=y[m];v||(v=i.zrId+"-g"+i.gradientIdx++,y[m]=v,a.id=v,i.defs[v]=mf(r,v,a,l)),e[n]=ik(v)}function mz(t,e,n,i){var r,o,a,s=t.style[n],l=t.getBoundingRect(),h={},u=s.repeat,c="no-repeat"===u,d="repeat-x"===u,p="repeat-y"===u;if(ib(s)){var f=s.imageWidth,g=s.imageHeight,m=void 0,y=s.image;if(tG(y)?m=y:y&&tG(y.src)?m=y.src:mT(y)&&(m=y.toDataURL()),"u"<typeof Image){var v="Image width/height must been given explictly in svg-ssr renderer.";t2(f,v),t2(g,v)}else if(null==f||null==g){var x=function(t,e){if(t){var n=t.elm,i=f||e.width,r=g||e.height;"pattern"===t.tag&&(d?(r=1,i/=l.width):p&&(i=1,r/=l.height)),t.attrs.width=i,t.attrs.height=r,n&&(n.setAttribute("width",i),n.setAttribute("height",r))}},_=oI(m,null,t,function(t){c||x(w,t),x(r,t)});_&&_.width&&_.height&&(f=f||_.width,g=g||_.height)}r=mf("image","img",{href:m,width:f,height:g}),h.width=f,h.height=g}else s.svgElement&&(r=tC(s.svgElement),h.width=s.svgWidth,h.height=s.svgHeight);if(r){c?o=a=1:d?(a=1,o=h.width/l.width):p?(o=1,a=h.height/l.height):h.patternUnits="userSpaceOnUse",null==o||isNaN(o)||(h.width=o),null==a||isNaN(a)||(h.height=a);var b=iI(s);b&&(h.patternTransform=b);var w=mf("pattern","",h,[r]),S=mg(w),M=i.patternCache,C=M[S];C||(C=i.zrId+"-p"+i.patternIdx++,M[S]=C,h.id=C,w=i.defs[C]=mf("pattern",C,h,[r])),e[n]=ik(C)}}function mV(t){return document.createTextNode(t)}function mF(t,e,n){t.insertBefore(e,n)}function mW(t,e){t.removeChild(e)}function mH(t,e){t.appendChild(e)}function mG(t){return t.parentNode}function mU(t){return t.nextSibling}function mj(t,e){t.textContent=e}var mY=mf("","");function mX(t){return void 0===t}function mZ(t){return void 0!==t}function mq(t,e){var n=t.key===e.key;return t.tag===e.tag&&n}function mK(t){var e,n=t.children,i=t.tag;if(mZ(i)){var r=t.elm=mp(i);if(mQ(mY,t),tW(n))for(e=0;e<n.length;++e){var o=n[e];null!=o&&mH(r,mK(o))}else mZ(t.text)&&!tY(t.text)&&mH(r,mV(t.text))}else t.elm=mV(t.text);return t.elm}function m$(t,e,n,i,r){for(;i<=r;++i){var o=n[i];null!=o&&mF(t,mK(o),e)}}function mJ(t,e,n,i){for(;n<=i;++n){var r=e[n];null!=r&&(mZ(r.tag)?mW(mG(r.elm),r.elm):mW(t,r.elm))}}function mQ(t,e){var n,i=e.elm,r=t&&t.attrs||{},o=e.attrs||{};if(r!==o){for(n in o){var a=o[n];r[n]!==a&&(!0===a?i.setAttribute(n,""):!1===a?i.removeAttribute(n):"style"===n?i.style.cssText=a:120!==n.charCodeAt(0)?i.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?i.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?i.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?i.setAttributeNS(mc,n,a):i.setAttribute(n,a))}for(n in r)n in o||i.removeAttribute(n)}}var m0=0,m1=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=m2("refreshHover"),this.configLayer=m2("configLayer"),this.storage=e,this._opts=n=tI({},n),this.root=t,this._id="zr"+m0++,this._oldVNode=my(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=mp("svg");mQ(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(mq(t,e))!function t(e,n){var i=n.elm=e.elm,r=e.children,o=n.children;e!==n&&(mQ(e,n),mX(n.text)?mZ(r)&&mZ(o)?r!==o&&function(e,n,i){for(var r,o,a,s=0,l=0,h=n.length-1,u=n[0],c=n[h],d=i.length-1,p=i[0],f=i[d];s<=h&&l<=d;)null==u?u=n[++s]:null==c?c=n[--h]:null==p?p=i[++l]:null==f?f=i[--d]:mq(u,p)?(t(u,p),u=n[++s],p=i[++l]):mq(c,f)?(t(c,f),c=n[--h],f=i[--d]):mq(u,f)?(t(u,f),mF(e,u.elm,mU(c.elm)),u=n[++s],f=i[--d]):(mq(c,p)?(t(c,p),mF(e,c.elm,u.elm),c=n[--h]):(mX(r)&&(r=function(t,e,n){for(var i={},r=e;r<=n;++r){var o=t[r].key;void 0!==o&&(i[o]=r)}return i}(n,s,h)),mX(o=r[p.key])||(a=n[o]).tag!==p.tag?mF(e,mK(p),u.elm):(t(a,p),n[o]=void 0,mF(e,a.elm,u.elm))),p=i[++l]);(s<=h||l<=d)&&(s>h?m$(e,null==i[d+1]?null:i[d+1].elm,i,l,d):mJ(e,n,s,h))}(i,r,o):mZ(o)?(mZ(e.text)&&mj(i,""),m$(i,null,o,0,o.length-1)):mZ(r)?mJ(i,r,0,r.length-1):mZ(e.text)&&mj(i,""):e.text!==n.text&&(mZ(r)&&mJ(i,r,0,r.length-1),mj(i,n.text)))}(t,e);else{var n=t.elm,i=mG(n);mK(e),null!==i&&(mF(i,e.elm,mU(n)),mJ(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return mE(t,mm(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=mm(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress,r.emphasis=t.emphasis,r.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=mf("rect","bg",{width:t,height:e,x:"0",y:"0"}),iC(n))mB({fill:n},r.attrs,"fill",i);else if(iw(n))mz({style:{fill:n},dirty:ei,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=im(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=mf("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=tR(tz(r.defs),function(t){return r.defs[t]});if(l.length&&o.push(mf("defs","defs",{},l)),t.animation){var h,u,c,d,p,f,g,m,y=(h=r.cssNodes,u=r.cssAnims,p=" {"+(d=(c={newline:!0}).newline?"\n":""),f=d+"}",g=tR(tz(h),function(t){return t+p+tR(tz(h[t]),function(e){return e+":"+h[t][e]+";"}).join(d)+f}).join(d),m=tR(tz(u),function(t){return"@keyframes "+t+p+tR(tz(u[t]),function(e){return e+p+tR(tz(u[t][e]),function(n){var i=u[t][e][n];return"d"===n&&(i='path("'+i+'")'),n+":"+i+";"}).join(d)+f}).join(d)+f}).join(d),g||m?["<![CDATA[",g,m,"]]>"].join(d):"");if(y){var v=mf("style","stl",{},[],y);o.push(v)}}return my(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},mg(this.renderToVNode({animation:tJ(t.cssAnimation,!0),emphasis:tJ(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:tJ(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,h=0;h<o;h++){var u=t[h];if(!u.invisible){var c=u.__clipPaths,d=c&&c.length||0,p=r&&r.length||0,f=void 0;for(f=Math.max(d-1,p-1);f>=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m<d;m++){var y={};!function(t,e,n){var i=n.clipPathCache,r=n.defs,o=i[t.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};i[t.id]=o,r[o]=mf("clipPath",o,a,[mN(t,n)])}e["clip-path"]=ik(o)}(c[m],y,e);var v=mf("g","clip-g-"+l++,y,[]);(i?i.children:n).push(v),a[s++]=v,i=v}r=c;var x=mE(u,e);x&&(i?i.children:n).push(x)}}},t.prototype.resize=function(t,e){var n=this._opts,i=this.root,r=this._viewport;if(null!=t&&(n.width=t),null!=e&&(n.height=e),i&&r&&(r.style.display="none",t=fb(i,0,n),e=fb(i,1,n),r.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,r){var o=r.style;o.width=t+"px",o.height=e+"px"}if(iw(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",t),a.setAttribute("height",e));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",t),s.setAttribute("height",e))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(t){var e=this.renderToString(),n="data:image/svg+xml;";return t?(e=iA(e))&&n+"base64,"+e:n+"charset=UTF-8,"+encodeURIComponent(e)},t}();function m2(t){return function(){}}function m5(t){return null==t?0:t.length||1}function m3(t){return t}var m4=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||m3,this._newKeyGetter=i||m3,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=Array(t.length),r=Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o<t.length;o++){var a=i[o],s=n[a],l=m5(s);if(l>1){var h=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(h,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a<r.length;a++){var s=r[a],l=n[s],h=i[s],u=m5(l),c=m5(h);if(u>1&&1===c)this._updateManyToOne&&this._updateManyToOne(h,l),i[s]=null;else if(1===u&&c>1)this._updateOneToMany&&this._updateOneToMany(h,l),i[s]=null;else if(1===u&&1===c)this._update&&this._update(h,l),i[s]=null;else if(u>1&&c>1)this._updateManyToMany&&this._updateManyToMany(h,l),i[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(o,i)},t.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[i],o=m5(r);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(r[a]);else 1===o&&this._add&&this._add(r);e[i]=null}},t.prototype._initIndexMap=function(t,e,n,i){for(var r=this._diffModeMultiple,o=0;o<t.length;o++){var a="_ec_"+this[i](t[o],o);if(r||(n[o]=a),e){var s=e[a],l=m5(s);0===l?(e[a]=o,r&&n.push(a)):1===l?e[a]=[s,o]:s.push(o)}}},t}(),m8=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function m6(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function m9(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var m7=function(t){this.otherDims={},null!=t&&tI(this,t)},yt=oi(),ye={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},yn=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=yo(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return tJ(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=ub(this.source),n=!(t>30),i="",r=[],o=0,a=0;o<t;o++){var s=void 0,l=void 0,h=void 0,u=this.dimensions[a];if(u&&u.storeDimIndex===o)s=e?u.name:null,l=u.type,h=u.ordinalMeta,a++;else{var c=this.getSourceDimension(o);c&&(s=e?c.name:null,l=c.type)}r.push({property:s,type:l,ordinalMeta:h}),!e||null==s||u&&u.isCalculationCoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=ye[l]||"f",h&&(i+=h.uid),i+="$"}var d=this.source;return{dimensions:r,hash:[d.seriesLayoutBy,d.startIndex,i].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,r=this.dimensions[n];if(r&&r.storeDimIndex===e)r.isCalculationCoord||(i=r.name),n++;else{var o=this.getSourceDimension(e);o&&(i=o.name)}t.push(i)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function yi(t){return t instanceof yn}function yr(t){for(var e=t9(),n=0;n<(t||[]).length;n++){var i=t[n],r=tY(i)?i.name:i;null!=r&&null==e.get(r)&&e.set(r,n)}return e}function yo(t){var e=yt(t);return e.dimNameMap||(e.dimNameMap=yr(t.dimensionsDefine))}var ya=tY,ys="u"<typeof Int32Array?Array:Int32Array,yl=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],yh=["_approximateExtent"],yu=function(){function t(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;yi(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},h=0;h<n.length;h++){var u=n[h],c=tG(u)?new m7({name:u}):u instanceof m7?u:new m7(u),d=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=d,c.coordDimIndex=0);var p=c.otherDims=c.otherDims||{};o.push(d),r[d]=c,null!=l[d]&&(s=!0),c.createInvertedIndices&&(a[d]=[]);var f=h;tj(c.storeDimIndex)&&(f=c.storeDimIndex),0===p.itemName&&(this._nameDimIdx=f),0===p.itemId&&(this._idDimIdx=f),i&&(c.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=r,this._initGetDimensionInfo(s),this.hostModel=e,this._invertedIndicesMap=a,this._dimOmitted){var g=this._dimIdxToName=t9();tP(o,function(t){g.set(r[t].storeDimIndex,t)})}}return t.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(null==e)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(null!=n)return n;var i=this._schema.getSourceDimension(e);if(i)return i.name},t.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(null!=e)return e;if(null==t)return -1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(tj(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||0>this._schema.getSourceDimensionIndex(t)))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,e,n){var i,r,o,a,s,l,h,u,c,d,p,f,g,m=this;if(t instanceof ct&&(g=t),!g){var y=this.dimensions,v=ug(t)||tO(t)?new uk(t,y.length):t;g=new ct;var x=tR(y,function(t){return{type:m._dimInfos[t].type,property:t}});g.initData(v,x,n)}this._store=g,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,g.count()),this._dimSummary=(i=this,r=this._schema,a=(o={}).encode={},s=t9(),l=[],h=[],u={},tP(i.dimensions,function(t){var e=i.getDimensionInfo(t),n=e.coordDim;if(n){var r,o=e.coordDimIndex;m6(a,n)[o]=t,e.isExtraCoord||(s.set(n,1),"ordinal"!==(r=e.type)&&"time"!==r&&(l[0]=t),m6(u,n)[o]=i.getDimensionIndex(e.name)),e.defaultTooltip&&h.push(t)}hO.each(function(t,n){var i=m6(a,n),r=e.otherDims[n];null!=r&&!1!==r&&(i[r]=e.name)})}),c=[],d={},s.each(function(t,e){var n=a[e];d[e]=n[0],c=c.concat(n)}),o.dataDimsOnCoord=c,o.dataDimIndicesOnCoord=tR(c,function(t){return i.getDimensionInfo(t).storeDimIndex}),o.encodeFirstDimNotExtra=d,(p=a.label)&&p.length&&(l=p.slice()),(f=a.tooltip)&&f.length?h=f.slice():h.length||(h=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=h,o.userOutput=new m8(u,r),o),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},t.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e&&e.length),i=n.start,r=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var a=i;a<r;a++){var s=a-i;this._nameList[a]=e[s],o&&tt(this,a)}},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==hB&&!t.fillStorage},t.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===hP&&!n.pure)for(var o=[],a=t;a<e;a++){var s,l=n.getItem(a,o);if(!(!this.hasItemOption&&tY(s=l))||s instanceof Array||(this.hasItemOption=!0),l){var h=l.name;null==i[a]&&null!=h&&(i[a]=r7(h,null));var u=l.id;null==r[a]&&null!=u&&(r[a]=r7(u,null))}}if(this._shouldMakeIdFromName())for(var a=t;a<e;a++)tt(this,a);Z(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){ya(t)?tI(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return null==n&&null!=this._nameDimIdx&&(n=K(this,this._nameDimIdx,e)),null==n&&(n=""),n},t.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},t.prototype.getId=function(t){return q(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,e)},t.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,e)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,e){var n=this,i=this._store;return tW(t)?i.getValues(tR(t,function(t){return n._getStoreDimIndex(t)}),e):i.getValues(t)},t.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return -1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n&&n[e];return null==i||isNaN(i)?-1:i},t.prototype.each=function(t,e,n){tH(t)&&(n=e,e=t,t=[]);var i=n||this,r=tR($(t),this._getStoreDimIndex,this);this._store.each(r,i?tV(e,i):e)},t.prototype.filterSelf=function(t,e,n){tH(t)&&(n=e,e=t,t=[]);var i=n||this,r=tR($(t),this._getStoreDimIndex,this);return this._store=this._store.filter(r,i?tV(e,i):e),this},t.prototype.selectRange=function(t){var e=this,n={},i=tz(t),r=[];return tP(i,function(i){var o=e._getStoreDimIndex(i);n[o]=t[i],r.push(o)}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(t,e,n){tH(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},t.prototype.map=function(t,e,n,i){var r=n||i||this,o=tR($(t),this._getStoreDimIndex,this),a=Q(this);return a._store=this._store.map(o,r?tV(e,r):e),a},t.prototype.modify=function(t,e,n,i){var r=n||i||this,o=tR($(t),this._getStoreDimIndex,this);this._store.modify(o,r?tV(e,r):e)},t.prototype.downSample=function(t,e,n,i){var r=Q(this);return r._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),r},t.prototype.minmaxDownSample=function(t,e){var n=Q(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),n},t.prototype.lttbDownSample=function(t,e){var n=Q(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var e=this.hostModel;return new lb(this.getRawDataItem(t),e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new m4(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(e){return q(t,e)},function(t){return q(e,t)})},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},ya(t)?tI(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(tW(r=this.getVisual(e))?r=r.slice():ya(r)&&(r=tI({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,ya(e)?tI(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){ya(t)?tI(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?tI(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){sr(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){tP(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:tR(this.dimensions,this._getDimInfo,this),this.hostModel)),J(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];tH(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(t0(arguments)))})},t.internalField=void(Z=function(t){var e=t._invertedIndicesMap;tP(e,function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new ys(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(var s=0;s<a.count();s++)n[a.get(r.storeDimIndex,s)]=s}})},K=function(t,e,n){return r7(t._getCategory(e,n),null)},q=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=K(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n},$=function(t){return tW(t)||(t=null!=t?[t]:[]),t},Q=function(e){var n=new t(e._schema?e._schema:tR(e.dimensions,e._getDimInfo,e),e.hostModel);return J(n,e),n},J=function(t,e){tP(yl.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,tP(yh,function(n){t[n]=tC(e[n])}),t._calculationInfo=tI({},e._calculationInfo)},tt=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=K(t,r,e)),null==s&&null!=o&&(i[e]=s=K(t,o,e)),null==s&&null!=a){var l=t._nameRepeatCount,h=l[a]=(l[a]||0)+1;s=a,h>1&&(s+="__ec__"+h),i[e]=s}}),t}();function yc(t,e){ug(t)||(t=uy(t));var n,i,r,o,a,s=(e=e||{}).coordDimensions||[],l=e.dimensionsDefine||t.dimensionsDefine||[],h=t9(),u=[],c=(n=t,i=s,r=l,o=e.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,i.length,r.length,o||0),tP(i,function(t){var e;tY(t)&&(e=t.dimsDef)&&(a=Math.max(a,e.length))}),a),d=e.canOmitUnusedDimensions&&c>30,p=l===t.dimensionsDefine,f=p?yo(t):yr(l),g=e.encodeDefine;!g&&e.encodeDefaulter&&(g=e.encodeDefaulter(t,c));for(var m=t9(g),y=new u3(c),v=0;v<y.length;v++)y[v]=-1;function x(t){var e=y[t];if(e<0){var n=l[t],i=tY(n)?n:{name:n},r=new m7,o=i.name;null!=o&&null!=f.get(o)&&(r.name=r.displayName=o),null!=i.type&&(r.type=i.type),null!=i.displayName&&(r.displayName=i.displayName);var a=u.length;return y[t]=a,r.storeDimIndex=t,u.push(r),r}return u[e]}if(!d)for(var v=0;v<c;v++)x(v);m.each(function(t,e){var n=r2(t).slice();if(1===n.length&&!tG(n[0])&&n[0]<0)return void m.set(e,!1);var i=m.set(e,[]);tP(n,function(t,n){var r=tG(t)?f.get(t):t;null!=r&&r<c&&(i[n]=r,b(x(r),e,n))})});var _=0;function b(t,e,n){null!=hO.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,h.set(e,!0))}tP(s,function(t){if(tG(t))r=t,i={};else{var e,n,i,r=(i=t).name,o=i.ordinalMeta;i.ordinalMeta=null,(i=tI({},i)).ordinalMeta=o,e=i.dimsDef,n=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var a=m.get(r);if(!1!==a){if(!(a=r2(a)).length)for(var s=0;s<(e&&e.length||1);s++){for(;_<c&&null!=x(_).coordDim;)_++;_<c&&a.push(_++)}tP(a,function(t,o){var a=x(t);if(p&&null!=i.type&&(a.type=i.type),b(tA(a,i),r,o),null==a.name&&e){var s=e[o];tY(s)||(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}n&&tA(a.otherDims,n)})}});var w=e.generateCoord,S=e.generateCoordCount,M=null!=S;S=w?S||1:0;var C=w||"value";function k(t){null==t.name&&(t.name=t.coordDim)}if(d)tP(u,function(t){k(t)}),u.sort(function(t,e){return t.storeDimIndex-e.storeDimIndex});else for(var T=0;T<c;T++){var I=x(T);null==I.coordDim&&(I.coordDim=function(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}(C,h,M),I.coordDimIndex=0,(!w||S<=0)&&(I.isExtraCoord=!0),S--),k(I),null==I.type&&(1===hU(t,T)||I.isExtraCoord&&(null!=I.otherDims.itemName||null!=I.otherDims.seriesName))&&(I.type="ordinal")}return function(t){for(var e=t9(),n=0;n<t.length;n++){var i=t[n],r=i.name,o=e.get(r)||0;o>0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(u),new yn({source:t,dimensions:u,fullDimensionCount:c,dimensionOmitted:d})}var yd=function(t){this.coordSysDims=[],this.axisMap=t9(),this.categoryAxisMap=t9(),this.coordSysName=t},yp={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",os).models[0],o=t.getReferringComponents("yAxis",os).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),yf(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),yf(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",os).models[0];e.coordSysDims=["single"],n.set("single",r),yf(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",os).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),yf(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),yf(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();tP(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),yf(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))})},matrix:function(t,e,n,i){var r=t.getReferringComponents("matrix",os).models[0];e.coordSysDims=["x","y"];var o=r.getDimensionModel("x"),a=r.getDimensionModel("y");n.set("x",o),n.set("y",a),i.set("x",o),i.set("y",a)}};function yf(t){return"category"===t.get("type")}function yg(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function ym(t,e){return yg(t,e)?t.getCalculationInfo("stackResultDimension"):e}var yy=function(t,e,n){n=n||{};var i,r,o,a,s,l,h,u,c=e.getSourceManager(),d=!1;t?(d=!0,u=uy(t)):d=(u=c.getSource()).sourceFormat===hP;var p=function(t){var e=t.get("coordinateSystem"),n=new yd(e),i=yp[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),f=(r=e.get("coordinateSystem"),o=ht.get(r),p&&p.coordSysDims&&(i=tR(p.coordSysDims,function(t){var e={name:t},n=p.axisMap.get(t);return n&&(e.type=m9(n.get("type"))),e})),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),i),g=n.useEncodeDefaulter,m=tH(g)?g:g?tF(hW,f,e):null,y=yc(u,{coordDimensions:f,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:m,canOmitUnusedDimensions:!d}),v=(a=y.dimensions,s=n.createInvertedIndices,p&&tP(a,function(t,e){var n=t.coordDim,i=p.categoryAxisMap.get(n);i&&(null==l&&(l=e),t.ordinalMeta=i.getOrdinalMeta(),s&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(h=!0)}),h||null==l||(a[l].otherDims.itemName=0),l),x=d?null:c.getSharedDataStore(y),_=function(t,e,n){var i,r,o,a,s,l,h,u=(n=n||{}).byIndex,c=n.stackedCoordDimension;yi(e.schema)?(i=(r=e.schema).dimensions,o=e.store):i=e;var d=!!(t&&t.get("stack"));if(tP(i,function(t,e){tG(t)&&(i[e]=t={name:t}),d&&!t.isExtraCoord&&(u||a||!t.ordinalMeta||(a=t),s||"ordinal"===t.type||"time"===t.type||c&&c!==t.coordDim||(s=t))}),!s||u||a||(u=!0),s){l="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,a&&(a.createInvertedIndices=!0);var p=s.coordDim,f=s.type,g=0;tP(i,function(t){t.coordDim===p&&g++});var m={name:l,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(m.storeDimIndex=o.ensureCalculationDimension(h,f),y.storeDimIndex=o.ensureCalculationDimension(l,f)),r.appendCalculationDimension(m),r.appendCalculationDimension(y)):(i.push(m),i.push(y))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:u,stackedOverDimension:h,stackResultDimension:l}}(e,{schema:y,store:x}),b=new yu(y,e);b.setCalculationInfo(_);var w=null!=v&&function(t){if(t.sourceFormat===hP)return!tW(r4(function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[])))}(u)?function(t,e,n,i){return i===v?n:this.defaultDimValueGetter(t,e,n,i)}:null;return b.hasItemOption=!1,b.initData(d?u:x,null,w),b},yv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return to(e,t),e.prototype.getInitialData=function(t){return yy(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new rT,n=fg("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=fg(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);return e.add(s),s.setStyle(t.itemStyle),s.rotation=("inherit"===t.iconRotate?r:t.iconRotate||0)*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill=hS.color.neutral00,s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(cS);function yx(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=uN(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a<n.length;a++)o.push(uN(t,e,n[a]));return o.join(" ")}}function y_(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!tW(e))return e+"";for(var i=[],r=0;r<n.length;r++){var o=t.getDimensionIndex(n[r]);o>=0&&i.push(e[o])}return i.join(" ")}var yb=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return to(e,t),e.prototype._createSymbol=function(t,e,n,i,r,o){this.removeAll();var a=fg(t,-1,-1,2,2,null,o);a.attr({z2:tJ(r,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),a.drift=yw,this._symbolType=t,this.add(a)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){sL(this.childAt(0))},e.prototype.downplay=function(){sO(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=e.getSymbolZ2(t,n),h=o!==this._symbolType,u=r&&r.disableAnimation;if(h){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,l,c)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(p):sJ(d,p,a,n),s3(d)}if(this._updateCommon(t,n,s,i,r),h){var d=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,sQ(d,p,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,h,u,c,d,p,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,h=i.blurScope,c=i.labelStatesModels,d=i.hoverScale,p=i.cursorStyle,u=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e),y=m.getModel("emphasis");o=y.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=y.get("focus"),h=y.get("blurScope"),u=y.get("disabled"),c=s7(m),d=y.getShallow("scale"),p=m.getShallow("cursor")}var v=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(v||0)*Math.PI/180||0);var x=fy(t.getItemVisual(e,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var _=t.getItemVisual(e,"style"),b=_.fill;if(f instanceof aW){var w=f.style;f.useStyle(tI({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(tI({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var C=r&&r.useNameLabel;s9(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return C?t.getName(e):yx(t,e)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var k=f.ensureState("emphasis");k.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var T=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;k.scaleX=this._sizeX*T,k.scaleY=this._sizeY*T,this.setSymbolScale(1),sF(this,l,h,u)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=si(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&s1(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();s1(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return fm(t.getItemVisual(e,"symbolSize"))},e.getSymbolZ2=function(t,e){return t.getItemVisual(e,"z2")},e}(rT);function yw(t,e){this.parent.drift(t,e)}function yS(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function yM(t){return null==t||tY(t)||(t={isIgnore:t}),t||{}}function yC(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:s7(e),cursorStyle:e.get("cursor")}}var yk=function(){function t(t){this.group=new rT,this._SymbolCtor=t||yb}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=yM(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=yC(t),l={disableAnimation:a},h=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add(function(i){var r=h(i);if(yS(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}}).update(function(u,c){var d=r.getItemGraphicEl(c),p=h(u);if(!yS(t,p,u,e))return void n.remove(d);var f=t.getItemVisual(u,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),(d=new o(t,u,s,l)).setPosition(p);else{d.updateData(t,u,s,l);var m={x:p[0],y:p[1]};a?d.attr(m):sJ(d,m,i)}n.add(d),t.setItemGraphicEl(u,d)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)},i)}).execute(),this._getSymbolPoint=h,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yC(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=yM(n);for(var r=t.start;r<t.end;r++){var o=e.getItemLayout(r);if(yS(e,o,r,n)){var a=new this._SymbolCtor(e,r,this._seriesScope);a.traverse(i),a.setPosition(o),this.group.add(a),e.setItemGraphicEl(r,a),this._progressiveEls.push(a)}}},t.prototype.eachRendered=function(t){pd(this._progressiveEls||this.group,t)},t.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)},n.hostModel)}):e.removeAll()},t}();function yT(t,e,n){var i,r,o,a,s=t.getBaseAxis(),l=t.getOtherAxis(s),h=(i=l,r=n,o=0,a=i.scale.getExtent(),"start"===r?o=a[0]:"end"===r?o=a[1]:tj(r)&&!isNaN(r)?o=r:a[0]>0?o=a[0]:a[1]<0&&(o=a[1]),o),u=s.dim,c=l.dim,d=e.mapDimension(c),p=e.mapDimension(u),f=+("x"===c||"radius"===c),g=tR(t.dimensions,function(t){return e.mapDimension(t)}),m=!1,y=e.getCalculationInfo("stackResultDimension");return yg(e,g[0])&&(m=!0,g[0]=y),yg(e,g[1])&&(m=!0,g[1]=y),{dataDimsForPoint:g,valueStart:h,valueAxisDim:c,baseAxisDim:u,stacked:!!m,valueDim:d,baseDim:p,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function yI(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var yA="u">typeof Float32Array,yD=yA?Float32Array:Array;function yL(t){return tW(t)?yA?new Float32Array(t):t:new yD(t)}var yO=Math.min,yP=Math.max;function yR(t,e){return isNaN(t)||isNaN(e)}function yN(t,e,n,i,r,o,a,s,l){for(var h,u,c,d,p,f,g=n,m=0;m<i;m++){var y=e[2*g],v=e[2*g+1];if(g>=r||g<0)break;if(yR(y,v)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,v),c=y,d=v;else{var x=y-h,_=v-u;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===y&&S===v&&m<i;)m++,b+=o,g+=o,w=e[2*b],S=e[2*b+1],y=e[2*g],v=e[2*g+1],x=y-h,_=v-u;var M=m+1;if(l)for(;yR(w,S)&&M<i;)M++,b+=o,w=e[2*b],S=e[2*b+1];var C=.5,k=0,T=0,I=void 0,A=void 0;if(M>=i||yR(w,S))p=y,f=v;else{k=w-h,T=S-u;var D=y-h,L=w-y,O=v-u,P=S-v,R=void 0,N=void 0;if("x"===s){R=Math.abs(D),N=Math.abs(L);var E=k>0?1:-1;p=y-E*R*a,f=v,I=y+E*N*a,A=v}else if("y"===s){R=Math.abs(O),N=Math.abs(P);var B=T>0?1:-1;p=y,f=v-B*R*a,I=y,A=v+B*N*a}else R=Math.sqrt(D*D+O*O),p=y-k*a*(1-(C=(N=Math.sqrt(L*L+P*P))/(N+R))),f=v-T*a*(1-C),I=y+k*a*C,A=v+T*a*C,I=yO(I,yP(w,y)),A=yO(A,yP(S,v)),I=yP(I,yO(w,y)),A=yP(A,yO(S,v)),k=I-y,T=A-v,p=y-k*R/N,f=v-T*R/N,p=yO(p,yP(h,y)),f=yO(f,yP(u,v)),p=yP(p,yO(h,y)),f=yP(f,yO(u,v)),k=y-p,T=v-f,I=y+k*N/R,A=v+T*N/R}t.bezierCurveTo(c,d,p,f,y,v),c=I,d=A}else t.lineTo(y,v)}h=y,u=v,g+=o}return m}var yE=function(){this.smooth=0,this.smoothConstraint=!0},yB=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:hS.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new yE},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&yR(n[2*r-2],n[2*r-1]);r--);for(;i<r&&yR(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=yN(t,n,i,r,r,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},e.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,r=this.path.data,o=a_.CMD,a="x"===e,s=[],l=0;l<r.length;){var h=r[l++],u=void 0,c=void 0,d=void 0,p=void 0,f=void 0,g=void 0,m=void 0;switch(h){case o.M:n=r[l++],i=r[l++];break;case o.L:if(u=r[l++],c=r[l++],(m=a?(t-n)/(u-n):(t-i)/(c-i))<=1&&m>=0){var y=a?(c-i)*m+i:(u-n)*m+n;return a?[t,y]:[y,t]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],d=r[l++],p=r[l++],f=r[l++],g=r[l++];var v=a?nW(n,u,d,f,t,s):nW(i,c,p,g,t,s);if(v>0)for(var x=0;x<v;x++){var _=s[x];if(_<=1&&_>=0){var y=a?nV(i,c,p,g,_):nV(n,u,d,f,_);return a?[t,y]:[y,t]}}n=f,i=g}}},e}(aN),yz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e}(yE),yV=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return to(e,t),e.prototype.getDefaultShape=function(){return new yz},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&yR(n[2*o-2],n[2*o-1]);o--);for(;r<o&&yR(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=yN(t,n,r,o,o,1,e.smooth,a,e.connectNulls);yN(t,i,r+s-1,s,o,-1,e.stackedOnSmooth,a,e.connectNulls),r+=s+1,t.closePath()}},e}(aN);function yF(t,e,n,i,r){var o=t.getArea(),a=o.x,s=o.y,l=o.width,h=o.height,u=n.get(["lineStyle","width"])||0;a-=u/2,s-=u/2,l+=u,h+=u,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var c=new aq({shape:{x:a,y:s,width:l,height:h}});if(e){var d=t.getBaseAxis(),p=d.isHorizontal(),f=d.inverse;p?(f&&(c.shape.x+=l),c.shape.width=0):(f||(c.shape.y+=h),c.shape.height=0);var g=tH(r)?function(t){r(t,c)}:null;sQ(c,{shape:{width:l,height:h,x:a,y:s}},n,null,i,g)}return c}function yW(t,e,n){var i=t.getArea(),r=rz(i.r0,1),o=rz(i.r,1),a=new dl({shape:{cx:rz(t.cx,1),cy:rz(t.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=r,sQ(a,{shape:{endAngle:i.endAngle,r:o}},n)),a}function yH(t,e,n,i,r){if(t){if("polar"===t.type)return yW(t,e,n);else if("cartesian2d"===t.type)return yF(t,e,n,i,r)}return null}function yG(t,e){return t.type===e}function yU(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return!0}}function yj(t){for(var e=1/0,n=1/0,i=-1/0,r=-1/0,o=0;o<t.length;){var a=t[o++],s=t[o++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),r=Math.max(s,r))}return[[e,n],[i,r]]}function yY(t,e){var n=yj(t),i=n[0],r=n[1],o=yj(e),a=o[0],s=o[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-s[0]),Math.abs(r[1]-s[1]))}function yX(t){return tj(t)?t:.5*!!t}function yZ(t,e,n,i,r){var o=n.getBaseAxis(),a=+("x"!==o.dim&&"radius"!==o.dim),s=[],l=0,h=[],u=[],c=[],d=[];if(r){for(l=0;l<t.length;l+=2){var p=e||t;isNaN(p[l])||isNaN(p[l+1])||d.push(t[l],t[l+1])}t=d}for(l=0;l<t.length-2;l+=2)switch(c[0]=t[l+2],c[1]=t[l+3],u[0]=t[l],u[1]=t[l+1],s.push(u[0],u[1]),i){case"end":h[a]=c[a],h[1-a]=u[1-a],s.push(h[0],h[1]);break;case"middle":var f=(u[a]+c[a])/2,g=[];h[a]=g[a]=f,h[1-a]=u[1-a],g[1-a]=c[1-a],s.push(h[0],h[1]),s.push(g[0],g[1]);break;default:h[a]=u[a],h[1-a]=c[1-a],s.push(h[0],h[1])}return s.push(t[l++],t[l++]),s}function yq(t,e){return[t[2*e],t[2*e+1]]}function yK(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<sh.length;e++)if(t.get([sh[e],"endLabel","show"]))return!0;return!1}function y$(t,e,n,i){if(!yG(e,"cartesian2d"))return yW(e,n,i);var r=i.getModel("endLabel"),o=r.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=yK(i)?function(n,i){t._endLabelOnDuring(n,i,a,s,o,r,e)}:null,h=e.getBaseAxis().isHorizontal(),u=yF(e,n,i,function(){var e=t._endLabel;e&&n&&null!=s.originalX&&e.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var c=u.shape,d=Math.max(c.width,c.height);h?(c.y-=d,c.height+=2*d):(c.x-=d,c.width+=2*d)}return l&&l(1,u),u}var yJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.init=function(){var t=new rT,e=new yk;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t,this._changePolyState=tV(this._changePolyState,this)},e.prototype.render=function(t,e,n){var i,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),h=a.getLayout("points")||[],u="polar"===r.type,c=this._coordSys,d=this._symbolDraw,p=this._polyline,f=this._polygon,g=this._lineGroup,m=!e.ssr&&t.get("animation"),y=!l.isEmpty(),v=l.get("origin"),x=yT(r,a,v),_=y&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=yL(2*i),o=0;o<i;o++){var a=yI(n,t,e,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}(r,a,x),b=t.get("showSymbol"),w=t.get("connectNulls"),S=b&&!u&&function(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&!(r&&function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;a<r;a+=o)if(1.5*yb.getSymbolSize(e,a)[+!!t.isHorizontal()]>i)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return tP(o.getViewLabels(),function(t){s[o.scale.getRawOrdinalNumber(t.tickValue)]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}(t,a,r),M=this._data;M&&M.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),M.setItemGraphicEl(e,null))}),b||d.remove(),o.add(g);var C=!u&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(i=r.getArea()).width?(i.x-=.1,i.y-=.1,i.width+=.2,i.height+=.2):i.r0&&(i.r0-=.5,i.r+=.5)),this._clipShapeForSymbol=i;var k=function(t,e,n){var i,r,o=t.getVisual("visualMeta");if(o&&o.length&&t.count()){if("cartesian2d"!==e.type)return;for(var a=o.length-1;a>=0;a--){var s=t.getDimensionInfo(o[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){r=o[a];break}}if(!r)return;var l=e.getAxis(i),h=tR(r.stops,function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}}),u=h.length,c=r.outerColors.slice();u&&h[0].coord>h[u-1].coord&&(h.reverse(),c.reverse());var d=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord,r=function(t,e){if(e&&e.length&&t>=0&&t<=1){var n,i,r,o,a=t*(e.length-1),s=Math.floor(a),l=Math.ceil(a),h=ir(e[s]),u=ir(e[l]),c=a-s;return iu([n5((n=h[0],n+(u[0]-n)*c)),n5((i=h[1],i+(u[1]-i)*c)),n5((r=h[2],r+(u[2]-r)*c)),n3((o=h[3],o+(u[3]-o)*c))],"rgba")}}((n-i)/(e.coord-i),[t.color,e.color]);return{coord:n,color:r}}for(var s=0;s<o;s++){var l=t[s],h=l.coord;if(h<0)n=l;else if(h>e){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}else n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}return r}(h,"x"===i?n.getWidth():n.getHeight()),p=d.length;if(!p&&u)return h[0].coord<0?c[1]?c[1]:h[u-1].color:c[0]?c[0]:h[0].color;var f=d[0].coord-10,g=d[p-1].coord+10,m=g-f;if(m<.001)return"transparent";tP(d,function(t){t.offset=(t.coord-f)/m}),d.push({offset:p?d[p-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:c[0]||"transparent"});var y=new dP(0,0,0,0,d,!0);return y[i]=f,y[i+"2"]=g,y}}(a,r,n)||a.getVisual("style")[a.getVisual("drawType")];if(p&&c.type===r.type&&C===this._step){y&&!f?f=this._newPolygon(h,_):f&&!y&&(g.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(t,r,l8(k));var T=g.getClipPath();T?sQ(T,{shape:y$(this,r,!1,t).shape},t):g.setClipPath(y$(this,r,!0,t)),b&&d.updateData(a,{isIgnore:S,clipShape:i,disableAnimation:!0,getSymbolPoint:function(t){return[h[2*t],h[2*t+1]]}}),yU(this._stackedOnPoints,_)&&yU(this._points,h)||(m?this._doUpdateAnimation(a,_,r,n,C,v,w):(C&&(_&&(_=yZ(_,h,r,C,w)),h=yZ(h,null,r,C,w)),p.setShape({points:h}),f&&f.setShape({points:h,stackedOnPoints:_})))}else b&&d.updateData(a,{isIgnore:S,clipShape:i,disableAnimation:!0,getSymbolPoint:function(t){return[h[2*t],h[2*t+1]]}}),m&&this._initSymbolLabelAnimation(a,r,i),C&&(_&&(_=yZ(_,h,r,C,w)),h=yZ(h,null,r,C,w)),p=this._newPolyline(h),y?f=this._newPolygon(h,_):f&&(g.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(t,r,l8(k)),g.setClipPath(y$(this,r,!0,t));var I=t.getModel("emphasis"),A=I.get("focus"),D=I.get("blurScope"),L=I.get("disabled");p.useStyle(tA(s.getLineStyle(),{fill:"none",stroke:k,lineJoin:"bevel"})),sU(p,t,"lineStyle"),p.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1),si(p).seriesIndex=t.seriesIndex,sF(p,A,D,L);var O=yX(t.get("smooth")),P=t.get("smoothMonotone");if(p.setShape({smooth:O,smoothMonotone:P,connectNulls:w}),f){var R=a.getCalculationInfo("stackedOnSeries"),N=0;f.useStyle(tA(l.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),R&&(N=yX(R.get("smooth"))),f.setShape({smooth:O,stackedOnSmooth:N,smoothMonotone:P,connectNulls:w}),sU(f,t,"areaStyle"),si(f).seriesIndex=t.seriesIndex,sF(f,A,D,L)}var E=this._changePolyState;a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=E)}),this._polyline.onHoverStateChange=E,this._data=a,this._coordSys=r,this._stackedOnPoints=_,this._points=h,this._step=C,this._valueOrigin=v,t.get("triggerLineEvent")&&(this.packEventData(t,p),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){si(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=on(r,i);if(this._changePolyState("emphasis"),o instanceof Array||null==o||!(o>=0))pw.prototype.highlight.call(this,t,e,n,i);else{var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],h=a[2*o+1];if(isNaN(l)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,h))return;var u=t.get("zlevel")||0,c=t.get("z")||0;(s=new yb(r,o)).x=l,s.y=h,s.setZ(u,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=u,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=on(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else pw.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;sk(this._polyline,t),e&&sk(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new yB({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new yV({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");tH(l)&&(l=l(null));var h=s.get("animationDelay")||0,u=tH(h)?h(null):h;t.eachItemGraphicEl(function(t,o){if(t){var s=[t.x,t.y],c=void 0,d=void 0,p=void 0;if(n)if(r){var f=e.pointToCoord(s);i?(c=n.startAngle,d=n.endAngle,p=-f[1]/180*Math.PI):(c=n.r0,d=n.r,p=f[0])}else i?(c=n.x,d=n.x+n.width,p=t.x):(c=n.y+n.height,d=n.y,p=t.y);var g=d===c?0:(p-c)/(d-c);a&&(g=1-g);var m=tH(h)?h(o):l*g+u,y=t.getSymbolPath(),v=y.getTextContent();t.attr({scaleX:0,scaleY:0}),t.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:m}),v&&v.animateFrom({style:{opacity:0}},{duration:300,delay:m}),y.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(yK(t)){var r,o,a,s=t.getData(),l=this._polyline,h=s.getLayout("points");if(!h){l.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||((u=this._endLabel=new sn({z2:200})).ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var c=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(h);c>=0&&(s9(l,s7(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:c,defaultText:function(t,e,n){return null!=n?y_(s,n):yx(s,t)},enableTextSetter:!0},(o=(r=e.getBaseAxis()).isHorizontal(),a=r.inverse,{normal:{align:i.get("align")||(o?a?"right":"left":"center"),verticalAlign:i.get("verticalAlign")||(o?"middle":a?"top":"bottom")}})),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var h=n.getLayout("points"),u=n.hostModel,c=u.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,y=e.shape,v=m?g?y.x:y.y+y.height:g?y.x+y.width:y.y,x=(g?p:0)*(m?-1:1),_=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a=+("x"!==n),s=0,l=-1,h=0;h<o;h++)if(!(isNaN(r=t[2*h+a])||isNaN(t[2*h+1-a]))){if(0===h){i=r;continue}if(i<=e&&r>=e||i>=e&&r<=e){l=h;break}s=h,i=r}return{range:[s,l],t:(e-i)/(r-i)}}(h,v,b),S=w.range,M=S[1]-S[0],C=void 0;if(M>=1){if(M>1&&!c){var k=yq(h,S[0]);s.attr({x:k[0]+x,y:k[1]+_}),r&&(C=u.getRawValue(S[0]))}else{var k=l.getPointOn(v,b);k&&s.attr({x:k[0]+x,y:k[1]+_});var T=u.getRawValue(S[0]),I=u.getRawValue(S[1]);r&&(C=od(n,d,T,I,w.t))}i.lastFrameIndex=S[0]}else{var A=1===t||i.lastFrameIndex>0?S[0]:0,k=yq(h,A);r&&(C=u.getRawValue(A)),s.attr({x:k[0]+x,y:k[1]+_})}if(r){var D=ls(s);"function"==typeof D.setLabelText&&D.setLabelText(C)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,h=t.hostModel,u=function(t,e,n,i,r,o){for(var a,s=(a=[],e.diff(t).add(function(t){a.push({cmd:"+",idx:t})}).update(function(t,e){a.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){a.push({cmd:"-",idx:t})}).execute(),a),l=[],h=[],u=[],c=[],d=[],p=[],f=[],g=yT(r,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],v=0;v<s.length;v++){var x=s[v],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],M=m[b+1],C=y[w],k=y[w+1];(isNaN(S)||isNaN(M))&&(S=C,M=k),l.push(S,M),h.push(C,k),u.push(n[b],n[b+1]),c.push(i[w],i[w+1]),f.push(e.getRawIndex(x.idx1));break;case"+":var T=x.idx,I=g.dataDimsForPoint,A=r.dataToPoint([e.get(I[0],T),e.get(I[1],T)]);w=2*T,l.push(A[0],A[1]),h.push(y[w],y[w+1]);var D=yI(g,r,e,T);u.push(D[0],D[1]),c.push(i[w],i[w+1]),f.push(e.getRawIndex(T));break;case"-":_=!1}_&&(d.push(x),p.push(p.length))}p.sort(function(t,e){return f[t]-f[e]});for(var L=l.length,O=yL(L),P=yL(L),R=yL(L),N=yL(L),E=[],v=0;v<p.length;v++){var B=p[v],z=2*v,V=2*B;O[z]=l[V],O[z+1]=l[V+1],P[z]=h[V],P[z+1]=h[V+1],R[z]=u[V],R[z+1]=u[V+1],N[z]=c[V],N[z+1]=c[V+1],E[v]=d[B]}return{current:O,next:P,stackedOnCurrent:R,stackedOnNext:N,status:E}}(this._data,t,this._stackedOnPoints,e,this._coordSys,this._valueOrigin),c=u.current,d=u.stackedOnCurrent,p=u.next,f=u.stackedOnNext;if(r&&(d=yZ(u.stackedOnCurrent,u.current,n,r,a),c=yZ(u.current,null,n,r,a),f=yZ(u.stackedOnNext,u.next,n,r,a),p=yZ(u.next,null,n,r,a)),yY(c,p)>3e3||l&&yY(d,f)>3e3){s.stopAnimation(),s.setShape({points:p}),l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f}));return}s.shape.__points=u.current,s.shape.points=c;var g={shape:{points:p}};u.current!==c&&(g.shape.__points=u.next),s.stopAnimation(),sJ(s,g,h),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),sJ(l,{shape:{stackedOnPoints:f}},h),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],y=u.status,v=0;v<y.length;v++)if("="===y[v].cmd){var x=t.getItemGraphicEl(y[v].idx1);x&&m.push({el:x,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var t=s.shape.__points,e=0;e<m.length;e++){var n=m[e].el,i=2*m[e].ptIdx;n.x=t[i],n.y=t[i+1],n.markRedraw()}})},e.prototype.remove=function(t){var e=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,i){t.__temp&&(e.remove(t),n.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(pw);function yQ(t,e){return{seriesType:t,plan:cO(),reset:function(t){var n=t.getData(),i=t.coordinateSystem,r=t.pipelineContext,o=e||r.large;if(i){var a=tR(i.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");yg(n,a[0])&&(a[0]=l),yg(n,a[1])&&(a[1]=l);var h=n.getStore(),u=n.getDimensionIndex(a[0]),c=n.getDimensionIndex(a[1]);return s&&{progress:function(t,e){for(var n=t.end-t.start,r=o&&yL(n*s),a=[],l=[],d=t.start,p=0;d<t.end;d++){var f=void 0;if(1===s){var g=h.get(u,d);f=i.dataToPoint(g,null,l)}else a[0]=h.get(u,d),a[1]=h.get(c,d),f=i.dataToPoint(a,null,l);o?(r[p++]=f[0],r[p++]=f[1]):e.setItemLayout(d,f.slice())}o&&e.setLayout("points",r)}}}}}}var y0={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)!isNaN(t[i])&&(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},y1=function(t){return Math.round(t.length/2)};function y2(t){return{seriesType:t,reset:function(t,e,n){var i=t.getData(),r=t.get("sampling"),o=t.coordinateSystem,a=i.count();if(a>10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),h=s.getExtent(),u=n.getDevicePixelRatio(),c=Math.round(a/(Math.abs(h[1]-h[0])*(u||1)));if(isFinite(c)&&c>1){"lttb"===r?t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/c)):"minmax"===r&&t.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/c));var d=void 0;tG(r)?d=y0[r]:tH(r)&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/c,d,y1))}}}}}var y5="__ec_stack_";function y3(t){return t.get("stack")||y5+t.seriesIndex}function y4(t){return t.dim+t.index}function y8(t,e){var n=[];return e.eachSeriesByType(t,function(t){ve(t)&&n.push(t)}),n}function y6(t){var e=function(t){var e={};tP(t,function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,o=i.getDimensionIndex(i.mapDimension(n.dim)),a=i.getStore(),s=0,l=a.count();s<l;++s){var h=a.get(o,s);e[r]?e[r].push(h):e[r]=[h]}});var n={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(r){r.sort(function(t,e){return t-e});for(var o=null,a=1;a<r.length;++a){var s=r[a]-r[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return tP(t,function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=e[r.dim+"_"+r.index],s=Math.abs(o[1]-o[0]),l=r.scale.getExtent(),h=Math.abs(l[1]-l[0]);i=a?s/h*a:s}else{var u=t.getData();i=Math.abs(o[1]-o[0])/u.count()}var c=rE(t.get("barWidth"),i),d=rE(t.get("barMaxWidth"),i),p=rE(t.get("barMinWidth")||(vn(t)?.5:1),i),f=t.get("barGap"),g=t.get("barCategoryGap"),m=t.get("defaultBarGap");n.push({bandWidth:i,barWidth:c,barMaxWidth:d,barMinWidth:p,barGap:f,barCategoryGap:g,defaultBarGap:m,axisKey:y4(r),stackId:y3(t)})}),y9(n)}function y9(t){var e={};tP(t,function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:t.defaultBarGap||0,stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;!a[s]&&o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var h=t.barMaxWidth;h&&(a[s].maxWidth=h);var u=t.barMinWidth;u&&(a[s].minWidth=u);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)});var n={};return tP(e,function(t,e){n[e]={};var i,r=t.stacks,o=t.bandWidth,a=t.categoryGap;null==a&&(a=Math.max(35-4*tz(r).length,15)+"%");var s=rE(a,o),l=rE(t.gap,1),h=t.remainedWidth,u=t.autoWidthCount,c=(h-s)/(u+(u-1)*l);c=Math.max(c,0),tP(r,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){var i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,h-=i+l*i,u--}else{var i=c;e&&e<i&&(i=Math.min(e,h)),n&&n>i&&(i=n),i!==c&&(t.width=i,h-=i+l*i,u--)}}),c=Math.max(c=(h-s)/(u+(u-1)*l),0);var d=0;tP(r,function(t,e){t.width||(t.width=c),i=t,d+=t.width*(1+l)}),i&&(d-=i.width*l);var p=-d/2;tP(r,function(t,i){n[e][i]=n[e][i]||{bandWidth:o,offset:p,width:t.width},p+=t.width*(1+l)})}),n}function y7(t,e){var n=y8(t,e),i=y6(n);tP(n,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=y3(t),o=i[y4(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function vt(t){return{seriesType:t,plan:cO(),reset:function(t){if(ve(t)){var e,n,i=t.getData(),r=t.coordinateSystem,o=r.getBaseAxis(),a=r.getOtherAxis(o),s=i.getDimensionIndex(i.mapDimension(a.dim)),l=i.getDimensionIndex(i.mapDimension(o.dim)),h=t.get("showBackground",!0),u=i.mapDimension(a.dim),c=i.getCalculationInfo("stackResultDimension"),d=yg(i,u)&&!!i.getCalculationInfo("stackedOnSeries"),p=a.isHorizontal(),f=((n=(e=a).model.get("startValue"))||(n=0),e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))),g=vn(t),m=t.get("barMinHeight")||0,y=c&&i.getDimensionIndex(c),v=i.getLayout("size"),x=i.getLayout("offset");return{progress:function(t,e){for(var n,i=t.count,o=g&&yL(3*i),a=g&&h&&yL(3*i),u=g&&yL(i),c=r.master.getRect(),_=p?c.width:c.height,b=e.getStore(),w=0;null!=(n=t.next());){var S=b.get(d?y:s,n),M=b.get(l,n),C=f,k=void 0;d&&(k=S-b.get(s,n));var T=void 0,I=void 0,A=void 0,D=void 0;if(p){var L=r.dataToPoint([S,M]);if(d){var O=r.dataToPoint([k,M]);C=O[0]}T=C,I=L[1]+x,A=L[0]-C,D=v,Math.abs(A)<m&&(A=(A<0?-1:1)*m)}else{var L=r.dataToPoint([M,S]);if(d){var O=r.dataToPoint([M,k]);C=O[1]}T=L[0]+x,I=C,A=v,Math.abs(D=L[1]-C)<m&&(D=(D<=0?-1:1)*m)}g?(o[w]=T,o[w+1]=I,o[w+2]=p?A:D,a&&(a[w]=p?c.x:T,a[w+1]=p?I:c.y,a[w+2]=_),u[n]=n):e.setItemLayout(n,{x:T,y:I,width:A,height:D}),w+=3}g&&e.setLayout({largePoints:o,largeDataIndices:u,largeBackgroundPoints:a,valueAxisHorizontal:p})}}}}}}function ve(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function vn(t){return t.pipelineContext&&t.pipelineContext.large}var vi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.getInitialData=function(t,e){return yy(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(t),o=i.dataToPoint(r);if(n)tP(i.getAxes(),function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=r[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),!(i.length<2)){if(2===i.length){o[n]=t.toGlobalCoord(t.getExtent()[+!!l]);return}for(var h=void 0,u=void 0,c=1,d=0;d<i.length;d++){var p=i[d].coord,f=d===i.length-1?i[d-1].tickValue+c:i[d].tickValue;if(f===s){u=p;break}if(f<s)h=p;else if(null!=h&&f>s){u=(p+h)/2;break}1===d&&(c=f-i[0].tickValue)}null==u&&(h?h&&(u=i[i.length-1].coord):u=i[0].coord),o[n]=t.toGlobalCoord(u)}}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),h=+!i.getBaseAxis().isHorizontal();o[h]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(cS);cS.registerClass(vi);var vr=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.getInitialData=function(){return yy(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=lM(vi.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:hS.color.primary,borderWidth:2}},realtimeSort:!1}),e}(vi),vo=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},va=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return to(e,t),e.prototype.getDefaultShape=function(){return new vo},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=(o-r)*.5,s=r+a,l=e.startAngle,h=e.endAngle,u=e.clockwise,c=2*Math.PI,d=u?h-l<c:l-h<c;d||(l=h-(u?c:-c));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(h),m=Math.sin(h);d?(t.moveTo(p*r+n,f*r+i),t.arc(p*s+n,f*s+i,a,-Math.PI+l,l,!u)):t.moveTo(p*o+n,f*o+i),t.arc(n,i,o,l,h,!u),t.arc(g*s+n,m*s+i,a,h-2*Math.PI,h-Math.PI,!u),0!==r&&t.arc(n,i,r,h,l,u)},e}(aN);function vs(t,e,n){return e*Math.sin(t)*(n?-1:1)}function vl(t,e,n){return e*Math.cos(t)*(n?1:-1)}function vh(t,e,n){var i=t.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;tW(i)||(i=[i,i,i,i]);var r=Math.abs(e.r||0-e.r0||0);return{cornerRadius:tR(i,function(t){return rg(t,r)})}}var vu=Math.max,vc=Math.min,vd=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return to(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},e.prototype.eachRendered=function(t){pd(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e!==this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,h=l.getBaseAxis();"cartesian2d"===l.type?r=h.isHorizontal():"polar"===l.type&&(r="angle"===h.dim);var u=t.isAnimationEnabled()?t:null,c=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);c&&this._enableRealtimeSort(c,a,n);var d=t.get("clip",!0)||c,p=function(t,e){var n=t.getArea&&t.getArea();if(yG(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),y=m.get("borderRadius")||0,v=[],x=this._backgroundEls,_=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(t){var e,n,i,o=v_[l.type](a,t);if(!o)return null;var s=(e=l,n=r,i=o,new("polar"===e.type?dl:aq)({shape:vT(n,i,e),silent:!0,z2:0}));return s.useStyle(m.getItemStyle()),"cartesian2d"===l.type?s.setShape("r",y):s.setShape("cornerRadius",y),v[t]=s,s}a.diff(s).add(function(e){var n=a.getItemModel(e),i=v_[l.type](a,e,n);if(i&&(g&&w(e),a.hasValue(e)&&vx[l.type](i))){var s=!1;d&&(s=vp[l.type](p,i));var m=vf[l.type](t,a,e,i,r,u,h.model,!1,f);c&&(m.forceLabelAnimation=!0),vw(m,a,e,n,i,t,r,"polar"===l.type),_?m.attr({shape:i}):c?vg(c,u,m,i,e,r,!1,!1):sQ(m,{shape:i},t,e),a.setItemGraphicEl(e,m),o.add(m),m.ignore=s}}).update(function(e,n){var i=a.getItemModel(e),S=v_[l.type](a,e,i);if(S){if(g){var M=void 0;0===x.length?M=w(n):((M=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?M.setShape("r",y):M.setShape("cornerRadius",y),v[e]=M);var C=v_[l.type](a,e);sJ(M,{shape:vT(r,C,l)},u,e)}var k=s.getItemGraphicEl(n);if(!a.hasValue(e)||!vx[l.type](S))return void o.remove(k);var T=!1;if(d&&(T=vp[l.type](p,S))&&o.remove(k),k&&("sector"===k.type&&f||"sausage"===k.type&&!f)&&(k&&s5(k,t,n),k=null),k?s3(k):k=vf[l.type](t,a,e,S,r,u,h.model,!0,f),c&&(k.forceLabelAnimation=!0),b){var I=k.getTextContent();if(I){var A=ls(I);null!=A.prevValue&&(A.prevValue=A.value)}}else vw(k,a,e,i,S,t,r,"polar"===l.type);_?k.attr({shape:S}):c?vg(c,u,k,S,e,r,!0,b):sJ(k,{shape:S},t,e,null),a.setItemGraphicEl(e,k),k.ignore=T,o.add(k)}}).remove(function(e){var n=s.getItemGraphicEl(e);n&&s5(n,t,e)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new rT);S.removeAll();for(var M=0;M<v.length;++M)S.add(v[M]);o.add(S),this._backgroundEls=v,this._data=a},e.prototype._renderLarge=function(t,e,n){this._clear(),vC(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),vC(e,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)&&yH(t.coordinateSystem,!1,t),n=this.group;e?n.setClipPath(e):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,e,n){var i=this;if(e.count()){var r=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(e,t,n),this._isFirstFrame=!1;else{var o=function(t){var n=e.getItemGraphicEl(t),i=n&&n.shape;return i&&Math.abs(r.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(e,o,r,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,e,n){var i=[];return t.each(t.mapDimension(e.dim),function(t,e){var r=n(e);r=null==r?NaN:r,i.push({dataIndex:e,mappedValue:r,ordinalNumber:t})}),i.sort(function(t,e){return e.mappedValue-t.mappedValue}),{ordinalNumbers:tR(i,function(t){return t.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,e,n){for(var i=n.scale,r=t.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=t.rawIndexOf(r,i.getRawOrdinalNumber(a)),h=l<0?5e-324:e(t.indexOfRawIndex(l));if(h>o)return!0;o=h}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(e){s5(e,t,si(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(pw),vp={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=vu(e.x,t.x),s=vc(e.x+e.width,r),l=vu(e.y,t.y),h=vc(e.y+e.height,o),u=s<a,c=h<l;return e.x=u&&a>r?s:a,e.y=c&&l>o?h:l,e.width=u?0:s-a,e.height=c?0:h-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),u||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=vc(e.r,t.r),o=vu(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}return a}},vf={cartesian2d:function(t,e,n,i,r,o,a,s,l){var h=new aq({shape:tI({},i),z2:1});return h.__dataIndex=n,h.name="item",o&&(h.shape[r?"height":"width"]=0),h},polar:function(t,e,n,i,r,o,a,s,l){var h,u,c=!r&&l?va:dl,d=new c({shape:i,z2:1});if(d.name="item",h=vb(r),u=c===va,d.calculateTextPosition=function(t,e,n){var i=e.position;if(!i||i instanceof Array)return rm(t,e,n);var r=h(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,c=a.r,d=a.r0,p=(c+d)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,y=u?Math.abs(c-d)/2:0,v=Math.cos,x=Math.sin,_=s+c*v(f),b=l+c*x(f),w="left",S="top";switch(r){case"startArc":_=s+(d-o)*v(m),b=l+(d-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(d+o)*v(m),b=l+(d+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+p*v(f)+vs(f,o+y,!1),b=l+p*x(f)+vl(f,o+y,!1),w="right",S="middle";break;case"insideStartAngle":_=s+p*v(f)+vs(f,-o+y,!1),b=l+p*x(f)+vl(f,-o+y,!1),w="left",S="middle";break;case"middle":_=s+p*v(m),b=l+p*x(m),w="center",S="middle";break;case"endArc":_=s+(c+o)*v(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(c-o)*v(m),b=l+(c-o)*x(m),w="center",S="top";break;case"endAngle":_=s+p*v(g)+vs(g,o+y,!0),b=l+p*x(g)+vl(g,o+y,!0),w="left",S="middle";break;case"insideEndAngle":_=s+p*v(g)+vs(g,-o+y,!0),b=l+p*x(g)+vl(g,-o+y,!0),w="right",S="middle";break;default:return rm(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=w,t.verticalAlign=S,t},o){var p=d.shape,f=r?"r":"endAngle",g={};p[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?sJ:sQ)(d,{shape:g},o)}return d}};function vg(t,e,n,i,r,o,a,s){var l,h;o?(h={x:i.x,width:i.width},l={y:i.y,height:i.height}):(h={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?sJ:sQ)(n,{shape:l},e,r,null),(a?sJ:sQ)(n,{shape:h},e?t.baseAxis.model:null,r)}function vm(t,e){for(var n=0;n<e.length;n++)if(!isFinite(t[e[n]]))return!0;return!1}var vy=["x","y","width","height"],vv=["cx","cy","r","startAngle","endAngle"],vx={cartesian2d:function(t){return!vm(t,vy)},polar:function(t){return!vm(t,vv)}},v_={cartesian2d:function(t,e,n){var i,r,o,a=t.getItemLayout(e);if(!a)return null;var s=n?(i=n,r=a,(o=i.get(["itemStyle","borderColor"]))&&"none"!==o?Math.min(i.get(["itemStyle","borderWidth"])||0,isNaN(r.width)?Number.MAX_VALUE:Math.abs(r.width),isNaN(r.height)?Number.MAX_VALUE:Math.abs(r.height)):0):0,l=a.width>0?1:-1,h=a.height>0?1:-1;return{x:a.x+l*s/2,y:a.y+h*s/2,width:a.width-l*s,height:a.height-h*s}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function vb(t){var e;return e=t?"Arc":"Angle",function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}function vw(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var h=t.shape,u=vh(i.getModel("itemStyle"),h,!0);tI(h,u),t.setShape(h)}}else{var c=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",c)}t.useStyle(l);var d=i.getShallow("cursor");d&&t.attr("cursor",d);var p=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",f=s7(i);s9(t,f,{labelFetcher:o,labelDataIndex:n,defaultText:yx(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var g=t.getTextContent();if(s&&g){var m=i.get(["label","position"]);t.textConfig.inside="middle"===m||null,function(t,e,n,i){if(tj(i))return t.setTextConfig({rotation:i});if(tW(e))return t.setTextConfig({rotation:0});var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=n(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=(a+s)/2;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:t.setTextConfig({rotation:0});return}var h=1.5*Math.PI-r;"middle"===l&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}(t,"outside"===m?p:m,vb(a),i.get(["label","rotate"]))}ll(g,f,o.getRawValue(n),function(t){return y_(e,t)});var y=i.getModel(["emphasis"]);sF(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),sU(t,i),null!=r.startAngle&&null!=r.endAngle&&r.startAngle===r.endAngle&&(t.style.fill="none",t.style.stroke="none",tP(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var vS=function(){},vM=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return to(e,t),e.prototype.getDefaultShape=function(){return new vS},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[i]=s,a[r]=n[l+2],o[i]=n[l+i],o[r]=n[l+r],t.rect(o[0],o[1],a[0],a[1])},e}(aN);function vC(t,e,n,i){var r=t.getData(),o=+!!r.getLayout("valueAxisHorizontal"),a=r.getLayout("largeDataIndices"),s=r.getLayout("size"),l=t.getModel("backgroundStyle"),h=r.getLayout("largeBackgroundPoints");if(h){var u=new vM({shape:{points:h},incremental:!!i,silent:!0,z2:0});u.baseDimIdx=o,u.largeDataIndices=a,u.barWidth=s,u.useStyle(l.getItemStyle()),e.add(u),n&&n.push(u)}var c=new vM({shape:{points:r.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,e.add(c),c.useStyle(r.getVisual("style")),c.style.stroke=null,si(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",vk),c.on("mousemove",vk)),n&&n.push(c)}var vk=pL(function(t){var e=function(t,e,n){for(var i=t.baseDimIdx,r=1-i,o=t.shape.points,a=t.largeDataIndices,s=[],l=[],h=t.barWidth,u=0,c=o.length/3;u<c;u++){var d=3*u;if(l[i]=h,l[r]=o[d+2],s[i]=o[d+i],s[r]=o[d+r],l[r]<0&&(s[r]+=l[r],l[r]=-l[r]),e>=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[u]}return -1}(this,t.offsetX,t.offsetY);si(this).dataIndex=e>=0?e:null},30,!1);function vT(t,e,n){if(yG(n,"cartesian2d")){var i=n.getArea();return{x:t?e.x:i.x,y:t?i.y:e.y,width:t?e.width:i.width,height:t?i.height:e.height}}var i=n.getArea();return{cx:i.cx,cy:i.cy,r0:t?i.r0:e.r0,r:t?i.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}var vI=2*Math.PI,vA=Math.PI/180;function vD(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=hh(t,n),o=r.cx,a=r.cy,s=r.r,l=r.r0,h=r.viewRect,u=-t.get("startAngle")*vA,c=t.get("endAngle"),d=t.get("padAngle")*vA;c="auto"===c?u-vI:-c*vA;var p=t.get("minAngle")*vA+d,f=0;e.each(i,function(t){!isNaN(t)&&f++});var g=e.getSum(i),m=Math.PI/(g||f)*2,y=t.get("clockwise"),v=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=y?1:-1,w=[u,c],S=b*d/2;ax(w,!y),u=w[0],c=w[1];var M=vL(t);M.startAngle=u,M.endAngle=c,M.clockwise=y,M.cx=o,M.cy=a,M.r=s,M.r0=l;var C=Math.abs(c-u),k=C,T=0,I=u;if(e.setLayout({viewRect:h,r:s}),e.each(i,function(t,n){if(isNaN(t))return void e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:o,cy:a,r0:l,r:v?NaN:s});(i="area"!==v?0===g&&x?m:t*m:C/f)<p?(i=p,k-=p):T+=t;var i,r=I+b*i,h=0,u=0;d>i?u=h=I+b*i/2:(h=I+S,u=r-S),e.setItemLayout(n,{angle:i,startAngle:h,endAngle:u,clockwise:y,cx:o,cy:a,r0:l,r:v?rN(t,_,[l,s]):s}),I=r}),k<vI&&f)if(k<=.001){var A=C/f;e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=A;var r=0,o=0;A<d?o=r=u+b*(n+.5)*A:(r=u+b*n*A+S,o=u+b*(n+1)*A-S),i.startAngle=r,i.endAngle=o}})}else m=k/T,I=u,e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n),r=i.angle===p?p:t*m,o=0,a=0;r<d?a=o=I+b*r/2:(o=I+S,a=I+b*r-S),i.startAngle=o,i.endAngle=a,I+=b*r}})})}var vL=oi();function vO(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf(function(t){for(var e=i.getName(t),r=0;r<n.length;r++)if(!n[r].isSelected(e))return!1;return!0})}}}}var vP=Math.PI/180;function vR(t,e,n,i,r,o,a,s,l,h){if(!(t.length<2)){for(var u=t.length,c=0;c<u;c++)if("outer"===t[c].position&&"labelLine"===t[c].labelAlignTo){var d=t[c].label.x-h;t[c].linePoints[1][0]+=d,t[c].label.x=h}gq(t,1,l,l+a)&&function(t){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;s<t.length;s++)if("none"===t[s].labelAlignTo){var l=t[s],h=l.label.y>n?a:o,u=Math.abs(l.label.y-n);if(u>=h.maxY){var c=l.label.x-e-l.len2*r,d=i+l.len;h.rB=Math.abs(c)<d?Math.sqrt(u*u/(1-c*c/d/d)):d,h.maxY=u}h.list.push(l)}p(o),p(a)}(t)}function p(t){for(var o=t.rB,a=o*o,s=0;s<t.list.length;s++){var l=t.list[s],h=Math.abs(l.label.y-n),u=i+l.len,c=e+(Math.sqrt(Math.abs(u*u*(1-h*h/a)))+l.len2)*r,d=c-l.label.x,p=l.targetTextWidth-d*r;vN(l,p,!0),l.label.x=c}}}function vN(t,e,n){if(null==t.labelStyleWidth){var i=t.label,r=i.style,o=t.rect,a=r.backgroundColor,s=r.padding,l=s?s[1]+s[3]:0,h=r.overflow,u=o.width+(a?0:l);if(e<u||n){if(h&&h.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",e-l);var c=i.getBoundingRect();i.setStyle("width",Math.ceil(c.width)),i.setStyle("backgroundColor",a)}else{var d=e-l,p=e<u?d:n?d>t.unconstrainedWidth?null:d:null;i.setStyle("width",p)}vE(o,i)}}}function vE(t,e){vz.rect=t,gU(vz,e,vB)}var vB={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},vz={};function vV(t){return"center"===t.position}var vF=function(t){function e(e,n,i){var r=t.call(this)||this;r.z2=2;var o=new sn;return r.setTextContent(o),r.updateData(e,n,i,!0),r}return to(e,t),e.prototype.updateData=function(t,e,n,i){var r=t.hostModel,o=t.getItemModel(e),a=o.getModel("emphasis"),s=t.getItemLayout(e),l=tI(vh(o.getModel("itemStyle"),s,!0),s);if(isNaN(l.startAngle))return void this.setShape(l);if(i){this.setShape(l);var h=r.getShallow("animationType");r.ecModel.ssr?(sQ(this,{scaleX:0,scaleY:0},r,{dataIndex:e,isFrom:!0}),this.originX=l.cx,this.originY=l.cy):"scale"===h?(this.shape.r=s.r0,sQ(this,{shape:{r:s.r}},r,e)):null!=n?(this.setShape({startAngle:n,endAngle:n}),sQ(this,{shape:{startAngle:s.startAngle,endAngle:s.endAngle}},r,e)):(this.shape.endAngle=s.startAngle,sJ(this,{shape:{endAngle:s.endAngle}},r,e))}else s3(this),sJ(this,{shape:l},r,e);this.useStyle(t.getItemVisual(e,"style")),sU(this,o);var u=(s.startAngle+s.endAngle)/2,c=r.get("selectedOffset"),d=Math.cos(u)*c,p=Math.sin(u)*c,f=o.getShallow("cursor");f&&this.attr("cursor",f),this._updateLabel(r,t,e),this.ensureState("emphasis").shape=tI({r:s.r+(a.get("scale")&&a.get("scaleSize")||0)},vh(a.getModel("itemStyle"),s)),tI(this.ensureState("select"),{x:d,y:p,shape:vh(o.getModel(["select","itemStyle"]),s)}),tI(this.ensureState("blur"),{shape:vh(o.getModel(["blur","itemStyle"]),s)});var g=this.getTextGuideLine(),m=this.getTextContent();g&&tI(g.ensureState("select"),{x:d,y:p}),tI(m.ensureState("select"),{x:d,y:p}),sF(this,a.get("focus"),a.get("blurScope"),a.get("disabled"))},e.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),r=i.getModel("labelLine"),o=e.getItemVisual(n,"style"),a=o&&o.fill,s=o&&o.opacity;s9(this,s7(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:s,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});var l=this.getTextContent();this.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var h=i.get(["label","position"]);if("outside"!==h&&"outer"!==h)this.removeTextGuideLine();else{var u=this.getTextGuideLine();u||(u=new dv,this.setTextGuideLine(u)),gz(this,gV(i),{stroke:a,opacity:tQ(r.get(["lineStyle","opacity"]),s,1)})}},e}(dl),vW=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return to(e,t),e.prototype.render=function(t,e,n,i){var r,o=t.getData(),a=this._data,s=this.group;if(!a&&o.count()>0){for(var l=o.getItemLayout(0),h=1;isNaN(l&&l.startAngle)&&h<o.count();++h)l=o.getItemLayout(h);l&&(r=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===o.count()&&t.get("showEmptyCircle")){var u=new dl({shape:tC(vL(t))});u.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=u,s.add(u)}o.diff(a).add(function(t){var e=new vF(o,t,r);o.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);n.updateData(o,t,r),n.off("click"),s.add(n),o.setItemGraphicEl(t,n)}).remove(function(e){s5(a.getItemGraphicEl(e),t,e)}).execute(),function(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*vP,s=i.getLayout("viewRect"),l=i.getLayout("r"),h=s.width,u=s.x,c=s.y,d=s.height;function p(t){t.ignore=!0}i.each(function(t){var s,c,f,g,m=i.getItemGraphicEl(t),y=m.shape,v=m.getTextContent(),x=m.getTextGuideLine(),_=i.getItemModel(t),b=_.getModel("label"),w=b.get("position")||_.get(["emphasis","label","position"]),S=b.get("distanceToLabelLine"),M=b.get("alignTo"),C=rE(b.get("edgeDistance"),h),k=b.get("bleedMargin");null==k&&(k=Math.min(h,d)>200?10:2);var T=_.getModel("labelLine"),I=T.get("length");I=rE(I,h);var A=T.get("length2");if(A=rE(A,h),Math.abs(y.endAngle-y.startAngle)<a){tP(v.states,p),v.ignore=!0,x&&(tP(x.states,p),x.ignore=!0);return}if(function(t){if(!t.ignore)return!0;for(var e in t.states)if(!1===t.states[e].ignore)return!0;return!1}(v)){var D=(y.startAngle+y.endAngle)/2,L=Math.cos(D),O=Math.sin(D);e=y.cx,n=y.cy;var P="inside"===w||"inner"===w;if("center"===w)s=y.cx,c=y.cy,g="center";else{var R=(P?(y.r+y.r0)/2*L:y.r*L)+e,N=(P?(y.r+y.r0)/2*O:y.r*O)+n;if(s=R+3*L,c=N+3*O,!P){var E=R+L*(I+l-y.r),B=N+O*(I+l-y.r),z=E+(L<0?-1:1)*A;s="edge"===M?L<0?u+C:u+h-C:z+(L<0?-S:S),c=B,f=[[R,N],[E,B],[z,B]]}g=P?"center":"edge"===M?L>0?"right":"left":L>0?"left":"right"}var V=Math.PI,F=0,W=b.get("rotate");if(tj(W))F=V/180*W;else if("center"===w)F=0;else if("radial"===W||!0===W)F=L<0?-D+V:-D;else if("tangential"===W&&"outside"!==w&&"outer"!==w){var H=Math.atan2(L,O);H<0&&(H=2*V+H),O>0&&(H=V+H),F=H-V}if(o=!!F,v.x=s,v.y=c,v.rotation=F,v.setStyle({verticalAlign:"middle"}),P){v.setStyle({align:g});var G=v.states.select;G&&(G.x+=v.x,G.y+=v.y)}else{var U=new nu(0,0,0,0);vE(U,v),r.push({label:v,labelLine:x,position:w,len:I,len2:A,minTurnAngle:T.get("minTurnAngle"),maxSurfaceAngle:T.get("maxSurfaceAngle"),surfaceNormal:new e1(L,O),linePoints:f,textAlign:g,labelDistance:S,labelAlignTo:M,edgeDistance:C,bleedMargin:k,rect:U,unconstrainedWidth:U.width,labelStyleWidth:v.style.width})}m.setTextConfig({inside:P})}}),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],h=[],u=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++){var p=t[d].label;vV(t[d])||(p.x<e?(u=Math.min(u,p.x),l.push(t[d])):(c=Math.max(c,p.x),h.push(t[d])))}for(var d=0;d<t.length;d++){var f=t[d];if(!vV(f)&&f.linePoints){if(null!=f.labelStyleWidth)continue;var p=f.label,g=f.linePoints,m=void 0;m="edge"===f.labelAlignTo?p.x<e?g[2][0]-f.labelDistance-a-f.edgeDistance:a+r-f.edgeDistance-g[2][0]-f.labelDistance:"labelLine"===f.labelAlignTo?p.x<e?u-a-f.bleedMargin:a+r-c-f.bleedMargin:p.x<e?p.x-a-f.bleedMargin:a+r-p.x-f.bleedMargin,f.targetTextWidth=m,vN(f,m,!1)}}vR(h,e,n,i,1,r,o,a,s,c),vR(l,e,n,i,-1,r,o,a,s,u);for(var d=0;d<t.length;d++){var f=t[d];if(!vV(f)&&f.linePoints){var p=f.label,g=f.linePoints,y="edge"===f.labelAlignTo,v=p.style.padding,x=v?v[1]+v[3]:0,_=p.style.backgroundColor?0:x,b=f.rect.width+_,w=g[1][0]-g[2][0];y?p.x<e?g[2][0]=a+f.edgeDistance+b+f.labelDistance:g[2][0]=a+r-f.edgeDistance-b-f.labelDistance:(p.x<e?g[2][0]=p.x+f.labelDistance:g[2][0]=p.x-f.labelDistance,g[1][0]=g[2][0]+w),g[1][1]=g[2][1]=p.y}}}(r,e,n,l,h,d,u,c);for(var f=0;f<r.length;f++){var g=r[f],m=g.label,y=g.labelLine,v=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),v&&(tP(m.states,p),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(y){var _=g.linePoints;v||!_?(tP(y.states,p),y.ignore=!0):(gN(_,g.minTurnAngle),function(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,gT.fromArray(t[0]),gI.fromArray(t[1]),gA.fromArray(t[2]),e1.sub(gD,gI,gT),e1.sub(gL,gA,gI);var i=gD.len(),r=gL.len();if(!(i<.001)&&!(r<.001)&&(gD.scale(1/i),gL.scale(1/r),gD.dot(e)<Math.cos(n))){var o=gM(gI.x,gI.y,gA.x,gA.y,gT.x,gT.y,gP,!1);gR.fromArray(gP);var a=Math.PI/2,s=a+Math.acos(gL.dot(e))-n;if(s>=a)e1.copy(gR,gA);else{gR.scaleAndAdd(gL,o/Math.tan(Math.PI/2-s));var l=gA.x!==gI.x?(gR.x-gI.x)/(gA.x-gI.x):(gR.y-gI.y)/(gA.y-gI.y);if(isNaN(l))return;l<0?e1.copy(gR,gI):l>1&&e1.copy(gR,gA)}gR.toArray(t[1])}}}(_,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:_}),m.__hostTarget.textGuideLineConfig={anchor:new e1(_[0][0],_[0][1])})}}}(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="pie",e}(pw);function vH(t,e,n){e=tW(e)&&{coordDimensions:e}||tI({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=new yu(yc(i,e).dimensions,t);return r.initData(i,n),r}var vG=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),vU=oi(),vj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new vG(tV(this.getData,this),tV(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return vH(this,{coordDimensions:["value"],encodeDefaulter:tF(hH,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=vU(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),function(t){o.push(t)}),r=i.seats=function(t,e){var n=tN(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return[];for(var i=Math.pow(10,e),r=tR(t,function(t){return(isNaN(t)?0:t)/n*i*100}),o=100*i,a=tR(r,function(t){return Math.floor(t)}),s=tN(a,function(t,e){return t+e},0),l=tR(r,function(t,e){return t-a[e]});s<o;){for(var h=-1/0,u=null,c=0,d=l.length;c<d;++c)l[c]>h&&(h=l[c],u=c);++a[u],l[u]=0,++s}return tR(a,function(t){return t/i})}(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){r5(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(cS);d={fullType:vj.type,getCoord2:function(t){return t.getShallow("center")}},he.set(d.fullType,{getCoord2:void 0}).getCoord2=d.getCoord2;var vY=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return to(e,t),e.prototype.getInitialData=function(t,e){return yy(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:hS.color.primary}},universalTransition:{divideShape:"clone"}},e}(cS),vX=function(){},vZ=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return to(e,t),e.prototype.getDefaultShape=function(){return new vX},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,h=this.softClipShape;if(l){this._ctx=s;return}for(this._ctx=null,n=this._off;n<i.length;){var u=i[n++],c=i[n++];!(isNaN(u)||isNaN(c))&&(!h||h.contain(u,c))&&(a.x=u-r[0]/2,a.y=c-r[1]/2,a.width=r[0],a.height=r[1],o.buildPath(t,a,!0))}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.afterBrush=function(){var t,e=this.shape,n=e.points,i=e.size,r=this._ctx,o=this.softClipShape;if(r){for(t=this._off;t<n.length;){var a=n[t++],s=n[t++];!(isNaN(a)||isNaN(s))&&(!o||o.contain(a,s))&&r.fillRect(a-i[0]/2,s-i[1]/2,i[0],i[1])}this.incremental&&(this._off=t,this.notClear=!0)}},e.prototype.findDataIndex=function(t,e){for(var n=this.shape,i=n.points,r=n.size,o=Math.max(r[0],4),a=Math.max(r[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,h=i[l]-o/2,u=i[l+1]-a/2;if(t>=h&&e>=u&&t<=h+o&&e<=u+a)return s}return -1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return(t=n[0],e=n[1],i.contain(t,e))?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,h=-1/0,u=0;u<n.length;){var c=n[u++],d=n[u++];a=Math.min(c,a),l=Math.max(c,l),s=Math.min(d,s),h=Math.max(d,h)}t=this._rect=new nu(a-r/2,s-o/2,l-a+r,h-s+o)}return t},e}(aN),vq=function(){function t(){this.group=new rT}return t.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},t.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(t){if(null!=t.startIndex){var n=(t.endIndex-t.startIndex)*2,i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e),t.reset()})},t.prototype.incrementalPrepareUpdate=function(t){this._clear()},t.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],r=e.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var a=o.length,s=new Float32Array(a+r.length);s.set(o),s.set(r,a),i.endIndex=t.end,i.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=t.start,l.endIndex=t.end,l.incremental=!0,l.setShape({points:r}),this._setCommon(l,e,n)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new vZ({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var r=e.getVisual("symbolSize");t.setShape("size",r instanceof Array?r:[r,r]),t.softClipShape=n.clipShape||null,t.symbolProxy=fg(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("style"),s=a&&a.fill;s&&t.setColor(s);var l=si(t);l.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){l.dataIndex=null;var n=t.hoverDataIdx;n>=0&&(l.dataIndex=n+(t.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),vK=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=yQ("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new vq:new yk,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(pw),v$={left:0,right:0,top:0,bottom:0},vJ=["25%","25%"],vQ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.mergeDefaultAndTheme=function(e,n){var i=hy(e.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&e.outerBounds&&hm(e.outerBounds,i)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&hm(this.option.outerBounds,e.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:v$,outerBoundsContain:"all",outerBoundsClampWidth:"25%",outerBoundsClampHeight:"25%",backgroundColor:hS.color.transparent,borderWidth:1,borderColor:hS.color.neutral30},e}(h_),v0=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),v1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",os).models[0]},e.type="cartesian2dAxis",e}(h_);tL(v1,v0);var v2={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:hS.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:hS.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:hS.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[hS.color.backgroundTint,hS.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:hS.color.neutral00,borderColor:hS.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},v5=tk({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},v2),v3=tk({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:hS.color.axisMinorSplitLine,width:1}}},v2),v4=tk({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},v3),v8=tA({logBase:10},v3),v6={category:v5,value:v3,time:v4,log:v8},v9=0,v7=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++v9,this._onCollect=t.onCollect}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&tR(i,xt);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!tG(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=t9(this.categories))},t}();function xt(t){return tY(t)&&null!=t.value?t.value:t+""}var xe={value:1,category:1,time:1,log:1},xn=null;function xi(t,e,n,i){tP(xe,function(r,o){var a=tk(tk({},v6[o],!0),i,!0),s=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return to(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=hg(this),i=n?hy(t):{};tk(t,e.getTheme().get(o+"Axis")),tk(t,this.getDefaultOption()),t.type=xr(t),n&&hm(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=v7.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(t){var e=xn;return e?e.updateModelAxisBreak(this,t):{breaks:[]}},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",xr)}function xr(t){return t.type||(t.data?"category":"value")}function xo(t){return"interval"===t.type||"log"===t.type}function xa(t){var e=Math.pow(10,rY(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,rz(n*e)}function xs(t){return rF(t)+2}function xl(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function xh(t,e){return t>=e[0]&&t<=e[1]}var xu=function(){function t(){this.normalize=xc,this.scale=xd}return t.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=tV(t.normalize,t),this.scale=tV(t.scale,t)):(this.normalize=xc,this.scale=xd)},t}();function xc(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function xd(t,e){return t*(e[1]-e[0])+e[0]}function xp(t,e,n){var i=Math.log(t);return[Math.log(n?e[0]:Math.max(0,e[0]))/i,Math.log(n?e[1]:Math.max(0,e[1]))/i]}var xf=function(){function t(t){this._calculator=new xu,this._setting=t||{},this._extent=[1/0,-1/0];var e=lA;e&&(this._brkCtx=e.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]<e[0]?t[0]:e[0],t[1]>e[1]?t[1]:e[1])},t.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},t.prototype._innerSetExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(t){var e=lA;e&&this._innerSetBreak(e.parseAxisBreakOption(t,tV(this.parse,this)))},t.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return!!this._brkCtx&&this._brkCtx.hasBreaks()},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();oS(xf);var xg=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new v7({})),tW(i)&&(i=new v7({categories:tR(i,function(t){return tY(t)?t.value:t})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return to(e,t),e.prototype.parse=function(t){return null==t?NaN:tG(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return xh(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null==t){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r<a;++r){var s=e[r];n[r]=s,i[s]=r}for(var l=0;r<o;++r){for(;null!=i[l];)l++;n.push(l),i[l]=r}},e.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&t>=0&&t<e.length?e[t]:t},e.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&t>=0&&t<e.length?e[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[e];return null==n?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(xf);xf.registerClass(xg);var xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return to(e,t),e.prototype.parse=function(t){return null==t||""===t?NaN:Number(t)},e.prototype.contain=function(t){return xh(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=xs(t)},e.prototype.getTicks=function(t){t=t||{};var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=lA,a=[];if(!e)return a;if("only_break"===t.breakTicks&&o)return o.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a;n[0]<i[0]&&(t.expandToNicedExtent?a.push({value:rz(i[0]-e,r)}):a.push({value:n[0]}));for(var s=function(t,n){return Math.round((n-t)/e)},l=i[0];l<=i[1];){if(a.push({value:l}),l=rz(l+e,r),this._brkCtx){var h=this._brkCtx.calcNiceTickMultiple(l,s);h>=0&&(l=rz(l+h*e,r))}if(a.length>0&&l===a[a.length-1].value)break;if(a.length>1e4)return[]}var u=a.length?a[a.length-1].value:i[1];return n[1]>u&&(t.expandToNicedExtent?a.push({value:rz(u+e,r)}):a.push({value:n[1]})),o&&o.pruneTicksByBreak(t.pruneByBreak,a,this._brkCtx.breaks,function(t){return t.value},this._interval,this._extent),"none"!==t.breakTicks&&o&&o.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),r=1;r<e.length;r++){var o=e[r],a=e[r-1];if(!a.break&&!o.break){for(var s=0,l=[],h=(o.value-a.value)/t,u=xs(h);s<t-1;){var c=rz(a.value+(s+1)*h,u);c>i[0]&&c<i[1]&&l.push(c),s++}var d=lA;d&&d.pruneTicksByBreak("auto",l,this._getNonTransBreaks(),function(t){return t},this._interval,i),n.push(l)}}return n},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=rF(t.value)||0:"auto"===n&&(n=this._intervalPrecision),l0(rz(t.value,n,!0))},e.prototype.calcNiceTicks=function(t,e,n){t=t||5;var i=this._extent.slice(),r=this._getExtentSpanWithBreaks();if(isFinite(r)){r<0&&(r=-r,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var o,a,s,l,h,u,c,d,p=(s=i,l=r,h=t,c=(u={}).interval=rX(l/h,!0),null!=e&&c<e&&(c=u.interval=e),null!=n&&c>n&&(c=u.interval=n),d=u.intervalPrecision=xs(c),o=u.niceTickExtent=[rz(Math.ceil(s[0]/c)*c,d),rz(Math.floor(s[1]/c)*c,d)],a=s,isFinite(o[0])||(o[0]=a[0]),isFinite(o[1])||(o[1]=a[1]),xl(o,0,a),xl(o,1,a),o[0]>o[1]&&(o[0]=o[1]),u);this._intervalPrecision=p.intervalPrecision,this._interval=p.interval,this._niceExtent=p.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var e=this._extent.slice();if(e[0]===e[1])if(0!==e[0]){var n=Math.abs(e[0]);t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;isFinite(e[1]-e[0])||(e[0]=0,e[1]=1),this._innerSetExtent(e[0],e[1]),e=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval,r=this._intervalPrecision;t.fixMin||(e[0]=rz(Math.floor(e[0]/i)*i,r)),t.fixMax||(e[1]=rz(Math.ceil(e[1]/i)*i,r)),this._innerSetExtent(e[0],e[1])},e.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},e.type="interval",e}(xf);xf.registerClass(xm);var xy=function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n},xv=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return to(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return lz(t.value,lP[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(lB(this._minLevelUnit))]||lP.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if(tG(n))o=n;else if(tH(n)){var a={time:t.time,level:t.time.level},s=lA;s&&s.makeAxisLabelFormatterParamBreak(a,t.break),o=n(t.value,e,a)}else{var l=t.time;if(l){var h=n[l.lowerTimeUnit][l.upperTimeUnit];o=h[Math.min(l.level,h.length-1)]||""}else{var u=lV(t.value,r);o=n[u][u][0]}}return lz(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){t=t||{};var e=this._interval,n=this._extent,i=lA,r=[];if(!e)return r;var o=this.getSetting("useUTC");if(i&&"only_break"===t.breakTicks)return lA.addBreaksToTicks(r,this._brkCtx.breaks,this._extent),r;var a=lV(n[1],o);r.push({value:n[0],time:{level:0,upperTimeUnit:a,lowerTimeUnit:a}});var s=function(t,e,n,i,r,o){for(var a=0,s=[],l=[],h=0,u=0,c=0;c<lN.length;++c){var d,p=lB(lN[c]);if((d=lN[c])===lB(d)&&(!function(t,r,s){var l=[],h=!r.length;if(!x_(lB(t),i[0],i[1],n)){h&&(r=[{value:(p=i[0],f=Math.max(0,tD(lR,t)-1),lF(new Date(p),lR[f],n).getTime())},{value:i[1]}]);for(var u=0;u<r.length-1;u++){var c=r[u].value,d=r[u+1].value;if(c!==d){var p,f,g,m,y,v=void 0,x=void 0,_=void 0;switch(t){case"year":v=Math.max(1,Math.round(e/864e5/365)),x=lW(n),_=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":v=(g=e/2592e6)>6?6:g>3?3:g>2?2:1,x=lH(n),_=lZ(n);break;case"week":case"half-week":case"day":v=(m=e/864e5)>16?16:m>7.5?7:m>3.5?4:m>1.5?2:1,x=lG(n),_=lq(n);break;case"half-day":case"quarter-day":case"hour":v=(y=e/36e5)>12?12:y>6?6:y>3.5?4:y>2?2:1,x=lU(n),_=lK(n);break;case"minute":v=xb(e,!0),x=lj(n),_=l$(n);break;case"second":v=xb(e,!1),x=lY(n),_=lJ(n);break;case"millisecond":v=rX(e,!0),x=lX(n),_=lQ(n)}d>=i[0]&&c<=i[1]&&function(t,e,n,r,s,l){for(var h,u,c,d=((h=new Date(0))[s](1),u=h.getTime(),h[s](1+t),c=h.getTime()-u,function(t,e){return Math.max(0,Math.round((e-t)/c))}),p=e,f=new Date(p);p<n&&p<=i[1]&&(l.push({value:p}),!(a++>1e4));)if(f[s](f[r]()+t),p=f.getTime(),o){var g=o.calcNiceTickMultiple(p,d);g>0&&(f[s](f[r]()+g*t),p=f.getTime())}l.push({value:p,notAdd:!0})}(v,c,d,x,_,l),"year"===t&&s.length>1&&0===u&&s.unshift({value:s[0].value-v})}}for(var u=0;u<l.length;u++)s.push(l[u])}}(lN[c],s[s.length-1]||[],l),p!==(lN[c+1]?lB(lN[c+1]):null))){if(l.length){u=h,l.sort(function(t,e){return t.value-e.value});for(var f=[],g=0;g<l.length;++g){var m=l[g].value;(0===g||l[g-1].value!==m)&&(f.push(l[g]),m>=i[0]&&m<=i[1]&&h++)}var y=r/e;if(h>1.5*y&&u>y/1.5||(s.push(f),h>y||t===lN[c]))break}l=[]}}for(var v=tE(tR(s,function(t){return tE(t,function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd})}),function(t){return t.length>0}),x=[],_=v.length-1,c=0;c<v.length;++c)for(var b=v[c],w=0;w<b.length;++w){var S=lV(b[w].value,n);x.push({value:b[w].value,time:{level:_-c,upperTimeUnit:S,lowerTimeUnit:S}})}x.sort(function(t,e){return t.value-e.value});for(var M=[],c=0;c<x.length;++c)(0===c||x[c].value!==x[c-1].value)&&M.push(x[c]);return M}(this._minLevelUnit,this._approxInterval,o,n,this._getExtentSpanWithBreaks(),this._brkCtx);r=r.concat(s);var l=lV(n[1],o);r.push({value:n[1],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var h=this.getSetting("useUTC"),u=lR.length-1,c=0;return tP(r,function(t){u=Math.min(u,tD(lR,t.time.upperTimeUnit)),c=Math.max(c,t.time.level)}),i&&lA.pruneTicksByBreak(t.pruneByBreak,r,this._brkCtx.breaks,function(t){return t.value},this._approxInterval,this._extent),i&&"none"!==t.breakTicks&&lA.addBreaksToTicks(r,this._brkCtx.breaks,this._extent,function(t){for(var e=Math.max(tD(lR,lV(t.vmin,h)),tD(lR,lV(t.vmax,h))),n=0,i=0;i<lR.length;i++)if(!x_(lR[i],t.vmin,t.vmax,h)){n=i;break}var r=Math.min(n,u);return{level:c,lowerTimeUnit:lR[Math.max(r,e)],upperTimeUnit:lR[r]}}),r},e.prototype.calcNiceExtent=function(t){var e=this.getExtent();if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-864e5}this._innerSetExtent(e[0],e[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,e,n){t=t||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var r=xx.length,o=Math.min(xy(xx,this._approxInterval,0,r),r-1);this._interval=xx[o][1],this._intervalPrecision=xs(this._interval),this._minLevelUnit=xx[Math.max(o-1,0)][0]},e.prototype.parse=function(t){return tj(t)?t:+rj(t)},e.prototype.contain=function(t){return xh(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e}(xm),xx=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function x_(t,e,n,i){return lF(new Date(e),t,i).getTime()===lF(new Date(n),t,i).getTime()}function xb(t,e){return(t/=e?6e4:1e3)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}xf.registerClass(xv);var xw=Math.floor,xS=Math.ceil,xM=Math.pow,xC=Math.log,xk=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new xm,e}return to(e,t),e.prototype.getTicks=function(e){e=e||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),r=t.prototype.getTicks.call(this,e),o=this.base,a=this._originalScale._innerGetBreaks(),s=lA;return tR(r,function(t){var e,r=t.value,l=null,h=xM(o,r);if(r===n[0]&&this._fixMin?l=i[0]:r===n[1]&&this._fixMax&&(l=i[1]),s){var u=s.getTicksLogTransformBreak(t,o,a,xT);e=u.vBreak,null==l&&(l=u.brkRoundingCriterion)}return null!=l&&(h=xT(h,l)),{value:h,break:e}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(e,n){this._originalScale.setExtent(e,n);var i=xp(this.base,[e,n]);t.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var e=this.base,n=t.prototype.getExtent.call(this);n[0]=xM(e,n[0]),n[1]=xM(e,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=xT(n[0],i[0])),this._fixMax&&(n[1]=xT(n[1],i[1])),n},e.prototype.unionExtentFromData=function(t,e){this._originalScale.unionExtentFromData(t,e);var n=xp(this.base,t.getApproximateExtent(e),!0);this._innerUnionExtent(n)},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(isFinite(n)&&!(n<=0)){var i=Math.pow(10,rY(n));for(t/n*i<=.5&&(i*=10);!isNaN(i)&&1>Math.abs(i)&&Math.abs(i)>0;)i*=10;var r=[rz(xS(e[0]/i)*i),rz(xw(e[1]/i)*i)];this._interval=i,this._intervalPrecision=xs(i),this._niceExtent=r}},e.prototype.calcNiceExtent=function(e){t.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},e.prototype.contain=function(e){return e=xC(e)/xC(this.base),t.prototype.contain.call(this,e)},e.prototype.normalize=function(e){return e=xC(e)/xC(this.base),t.prototype.normalize.call(this,e)},e.prototype.scale=function(e){return e=t.prototype.scale.call(this,e),xM(this.base,e)},e.prototype.setBreaksFromOption=function(t){var e=lA;if(e){var n=e.logarithmicParseBreaksFromOption(t,this.base,tV(this.parse,this)),i=n.parsedOriginal,r=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(r)}},e.type="log",e}(xm);function xT(t,e){return rz(t,rF(e))}xf.registerClass(xk);var xI=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type;this._needCrossZero="interval"===t.type&&e.getNeedCrossZero&&e.getNeedCrossZero();var r=e.get("min",!0);null==r&&(r=e.get("startValue",!0));var o=this._modelMinRaw=r;tH(o)?this._modelMinNum=xO(t,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=xO(t,o));var a=this._modelMaxRaw=e.get("max",!0);if(tH(a)?this._modelMaxNum=xO(t,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=xO(t,a)),i)this._axisDataLen=e.getCategories().length;else{var s=e.get("boundaryGap"),l=tW(s)?s:[s||0,s||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[rg(l[0],1),rg(l[1],1)]}},t.prototype.calculate=function(){var t,e,n=this._isOrdinal,i=this._dataMin,r=this._dataMax,o=this._axisDataLen,a=this._boundaryGapInner,s=n?null:r-i||Math.abs(i),l="dataMin"===this._modelMinRaw?i:this._modelMinNum,h="dataMax"===this._modelMaxRaw?r:this._modelMaxNum,u=null!=l,c=null!=h;null==l&&(l=n?o?0:NaN:i-a[0]*s),null==h&&(h=n?o?o-1:NaN:r+a[1]*s),null!=l&&isFinite(l)||(l=NaN),null!=h&&isFinite(h)||(h=NaN);var d=(t=l)!=t||(e=h)!=e||n&&!o;this._needCrossZero&&(l>0&&h>0&&!u&&(l=0),l<0&&h<0&&!c&&(h=0));var p=this._determinedMin,f=this._determinedMax;return null!=p&&(l=p,u=!0),null!=f&&(h=f,c=!0),{min:l,max:h,minFixed:u,maxFixed:c,isBlank:d}},t.prototype.modifyDataMinMax=function(t,e){this[xD[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[xA[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),xA={min:"_determinedMin",max:"_determinedMax"},xD={min:"_dataMin",max:"_dataMax"};function xL(t,e,n){var i=t.rawExtentInfo;return i||(i=new xI(t,e,n),t.rawExtentInfo=i),i}function xO(t,e){return null==e?null:e!=e?NaN:t.parse(e)}function xP(t,e){var n=t.type,i=xL(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=y8("bar",a),l=!1;if(tP(s,function(t){l=l||t.getBaseAxis()===e.axis}),l){var h=function(t,e,n,i){var r=n.axis.getExtent(),o=Math.abs(r[1]-r[0]),a=function(t,e){if(t&&e)return t[y4(e)]}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;tP(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;tP(a,function(t){l=Math.max(t.offset+t.width,l)});var h=(s=Math.abs(s))+(l=Math.abs(l)),u=e-t,c=u/(1-(s+l)/o)-u;return e+=l/h*c,{min:t-=s/h*c,max:e}}(r,o,e,y6(s));r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function xR(t,e){var n=xP(t,e),i=n.extent,r=e.get("splitNumber");t instanceof xk&&(t.base=e.get("logBase"));var o=t.type,a=e.get("interval"),s="interval"===o||"time"===o;t.setBreaksFromOption(xG(e)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:s?e.get("minInterval"):null,maxInterval:s?e.get("maxInterval"):null}),null!=a&&t.setInterval&&t.setInterval(a)}function xN(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xg({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new xv({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(xf.getClass(e)||xm)}}function xE(t){var e=t.getLabelModel().get("formatter");if("time"===t.type){var n,i,r,o=tG(e)||tH(e)?e:(n=(n=e)||{},i={},r=!0,tP(lR,function(t){r&&(r=null==n[t])}),tP(lR,function(t,e){var o=n[t];i[t]={};for(var a=null,s=e;s>=0;s--){var l=lR[s],h=tY(o)&&!tW(o)?o[l]:o,u=void 0;tW(h)?a=(u=h.slice())[0]||"":tG(h)?u=[a=h]:(null==a?a=lL[t]:lD[l].test(a)||(a=i[l][l][0]+" "+a),u=[a],r&&(u[1]="{primary|"+a+"}")),i[t][l]=u}}),i);return function(e,n){return t.scale.getFormattedLabel(e,n,o)}}if(tG(e))return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")};if(!tH(e))return function(e){return t.scale.getLabel(e)};if("category"===t.type)return function(n,i){return e(xB(t,n),n.value-t.scale.getExtent()[0],null)};var a=lA;return function(n,i){var r=null;return a&&(r=a.makeAxisLabelFormatterParamBreak(r,n.break)),e(xB(t,n),i,r)}}function xB(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function xz(t){var e=t.get("interval");return null==e?"auto":e}function xV(t){return"category"===t.type&&0===xz(t.getLabelModel())}function xF(t,e){var n={};return tP(t.mapDimensionsAll(e),function(e){n[ym(t,e)]=!0}),tz(n)}function xW(t){return"middle"===t||"center"===t}function xH(t){return t.getShallow("show")}function xG(t){var e,n=t.get("breaks",!0);if(null!=n){return lA&&("x"===(e=t.axis).dim||"y"===e.dim||"z"===e.dim||"single"===e.dim)&&"category"!==e.type?n:void 0}}var xU=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return tR(this._dimList,function(t){return this._axes[t]},this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),tE(this.getAxes(),function(e){return e.scale.type===t})},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),xj=["x","y"];function xY(t){return("interval"===t.type||"time"===t.type)&&!t.hasBreaks()}var xX=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=xj,e}return to(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(xY(t)&&xY(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,h=(o[1]-r[1])/s,u=r[0]-n[0]*l,c=r[1]-i[0]*h,d=this._transform=[l,0,0,h,u,c];this._invTransform=e0([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new nu(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return ev(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e,n){if(n=n||[],this._invTransform)return ev(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new nu(i,r,o,a)},e}(xU),xZ=oi(),xq=oi();function xK(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function x$(t,e){var n=tR(e,function(e){return t.scale.parse(e)});return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function xJ(t,e,n){var i,r,o=x0(t),a=xz(e),s=1===n.kind;if(!s){var l=x2(o,a);if(l)return l}tH(a)?i=x6(t,a):(r="auto"===a?function(t,e){if(1===e.kind){var n=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return xq(t).autoInterval=n,!0}),n}var i=xq(t).autoInterval;return null!=i?i:xq(t).autoInterval=t.calculateCategoryInterval(e)}(t,n):a,i=x8(t,r));var h={labels:i,labelCategoryInterval:r};return s?n.out.noPxChangeTryDetermine.push(function(){return x5(o,a,h),!0}):x5(o,a,h),h}var xQ=x1("axisTick"),x0=x1("axisLabel");function x1(t){return function(e){return xq(e)[t]||(xq(e)[t]={list:[]})}}function x2(t,e){for(var n=0;n<t.list.length;n++)if(t.list[n].key===e)return t.list[n].value}function x5(t,e,n){return t.list.push({key:e,value:n}),n}function x3(t,e,n){return null==x4(t,e,n)}function x4(t,e,n){var i=xZ(t.model),r=t.getExtent(),o=i.lastAutoInterval,a=i.lastTickCount;if(null!=o&&null!=a&&1>=Math.abs(o-e)&&1>=Math.abs(a-n)&&o>e&&i.axisExtent0===r[0]&&i.axisExtent1===r[1])return o;i.lastTickCount=n,i.lastAutoInterval=e,i.axisExtent0=r[0],i.axisExtent1=r[1]}function x8(t,e,n){var i=xE(t),r=t.scale,o=r.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),h=o[0],u=r.count();0!==h&&l>1&&u/l>2&&(h=Math.round(Math.ceil(h/l)*l));var c=xV(t),d=a.get("showMinLabel")||c,p=a.get("showMaxLabel")||c;d&&h!==o[0]&&g(o[0]);for(var f=h;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t,time:void 0,break:void 0})}return p&&f-l!==o[1]&&g(o[1]),s}function x6(t,e,n){var i=t.scale,r=xE(t),o=[];return tP(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s,time:void 0,break:void 0})}),o}var x9=[0,1],x7=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return rW(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&"ordinal"===i.type&&_t(n=n.slice(),i.count()),rN(t,x9,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&_t(n=n.slice(),i.count());var r=rN(t,n,x9,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=function(t,e,n){var i=t.getTickModel().get("customValues");if(i){var r=t.scale.getExtent();return{ticks:tE(x$(t,i),function(t){return t>=r[0]&&t<=r[1]})}}return"category"===t.type?function(t,e){var n,i,r=xQ(t),o=xz(e),a=x2(r,o);if(a)return a;if((!e.get("show")||t.scale.isBlank())&&(n=[]),tH(o))n=x6(t,o,!0);else if("auto"===o){var s=xJ(t,t.getLabelModel(),xK(2));i=s.labelCategoryInterval,n=tR(s.labels,function(t){return t.tickValue})}else n=x8(t,i=o,!0);return x5(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:tR(t.scale.getTicks(n),function(t){return t.value})}}(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}).ticks,i=tR(n,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var r,o,a=e.length;if(t.onBand&&!n&&a){var s=t.getExtent();if(1===a)e[0].coord=s[0],e[0].onBand=!0,r=e[1]={coord:s[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,h=(e[a-1].coord-e[0].coord)/l;tP(e,function(t){t.coord-=h/2,t.onBand=!0});var u=t.scale.getExtent();o=1+u[1]-e[a-1].tickValue,r={coord:e[a-1].coord+h*o,tickValue:u[1]+1,onBand:!0},e.push(r)}var c=s[0]>s[1];d(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift()),i&&d(s[0],e[0].coord)&&e.unshift({coord:s[0],onBand:!0}),d(s[1],r.coord)&&(i?r.coord=s[1]:e.pop()),i&&d(r.coord,s[1])&&e.push({coord:s[1],onBand:!0})}function d(t,e){return t=rz(t),e=rz(e),c?t>e:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return t>0&&t<100||(t=5),tR(this.scale.getMinorTicks(t),function(t){return tR(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(t){return function(t,e){var n,i,r,o,a,s,l,h=t.getLabelModel().get("customValues");if(h){var u=xE(t),c=t.scale.getExtent();return{labels:tR(tE(x$(t,h),function(t){return t>=c[0]&&t<=c[1]}),function(e){var n={value:e};return{formattedLabel:u(n),rawLabel:t.scale.getLabel(n),tickValue:e,time:void 0,break:void 0}})}}return"category"===t.type?(n=t,i=e,r=n.getLabelModel(),o=xJ(n,r,i),!r.get("show")||n.scale.isBlank()?{labels:[]}:o):(s=(a=t).scale.getTicks(),l=xE(a),{labels:tR(s,function(t,e){return{formattedLabel:l(t,e),rawLabel:a.scale.getLabel(t),tickValue:t.value,time:t.time,break:t.break}})})}(this,t=t||xK(2)).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+ +!!this.onBand;return 0===n&&(n=1),Math.abs(Math.abs(t[1]-t[0]))/n},t.prototype.calculateCategoryInterval=function(t){return function(t,e){var n,i,r=e.kind,o=(i=(n=t).getLabelModel(),{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:i.get("rotate")||0,font:i.getFont()}),a=xE(t),s=(o.axisRotate-o.labelRotate)/180*Math.PI,l=t.scale,h=l.getExtent(),u=l.count();if(h[1]-h[0]<1)return 0;var c=1;u>40&&(c=Math.max(1,Math.floor(u/40)));for(var d=h[0],p=t.dataToCoord(d+1)-t.dataToCoord(d),f=Math.abs(p*Math.cos(s)),g=Math.abs(p*Math.sin(s)),m=0,y=0;d<=h[1];d+=c){var v=0,x=0,_=rc(a({value:d}),o.font,"center","top");v=1.3*_.width,x=1.3*_.height,m=Math.max(m,v,7),y=Math.max(y,x,7)}var b=m/f,w=y/g;isNaN(b)&&(b=1/0),isNaN(w)&&(w=1/0);var S=Math.max(0,Math.floor(Math.min(b,w)));if(1===r)return e.out.noPxChangeTryDetermine.push(tV(x3,null,t,S,u)),S;var M=x4(t,S,u);return null!=M?M:S}(this,t=t||xK(2))},t}();function _t(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var _e=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return to(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t[+("x"!==this.dim)]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(x7),_n="expandAxisBreak",_i="collapseAxisBreak",_r="toggleAxisBreak",_o="axisbreakchanged",_a={type:_n,event:_o,update:"update",refineEvent:_h},_s={type:_i,event:_o,update:"update",refineEvent:_h},_l={type:_r,event:_o,update:"update",refineEvent:_h};function _h(t,e,n,i){var r=[];return tP(t,function(t){r=r.concat(t.eventBreaks)}),{eventContent:{breaks:r}}}var _u=Math.PI,_c=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],_d=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],_p=oi(),_f=oi(),_g=function(){function t(t){this.recordMap={},this.resolveAxisNameOverlap=t}return t.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,i=this.recordMap,r=i[e]||(i[e]=[]);return r[n]||(r[n]={ready:{}})},t}(),_m=eX(),_y=new nu(0,0,0,0),_v=function(t,e,n,i,r,o){if(xW(t.nameLocation)){var a,s,l=o.stOccupiedRect;l&&_x((a={},s=o.transGroup.transform,a.transform=pm(a.transform,s),a.localRect=pg(a.localRect,l),a.rect=pg(a.rect,l),s&&a.rect.applyTransform(s),a.axisAligned=pp(s),a.obb=void 0,(a.label=a.label||{}).ignore=!1,a),i,r)}else __(o.labelInfoList,o.dirVec,i,r)};function _x(t,e,n){var i=new e1;g$(t,e,i,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&gY(e,i)}function __(t,e,n,i){for(var r=e1.dot(i,e)>=0,o=0,a=t.length;o<a;o++){var s=t[r?o:a-1-o];s.label.ignore||_x(s,n,i)}}var _b=function(){function t(t,e,n,i){this.group=new rT,this._axisModel=t,this._api=e,this._local={},this._shared=i||new _g(_v),this._resetCfgDetermined(n)}return t.prototype.updateCfg=function(t){var e=this._cfg.raw;e.position=t.position,e.labelOffset=t.labelOffset,this._resetCfgDetermined(e)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(t){var e=this._axisModel,n=e.getDefaultOption?e.getDefaultOption():{},i=tJ(t.axisName,e.get("name")),r=e.get("nameMoveOverlap");(null==r||"auto"===r)&&(r=tJ(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:tJ(t.nameDirection,1),tickDirection:tJ(t.tickDirection,1),labelDirection:tJ(t.labelDirection,1),labelOffset:tJ(t.labelOffset,0),silent:tJ(t.silent,!0),axisName:i,nameLocation:tQ(e.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:!!i&&r,optionHideOverlap:e.get(["axisLabel","hideOverlap"]),showMinorTicks:e.get(["minorTick","show"])};this._cfg=o;var a=new rT({x:o.position[0],y:o.position[1],rotation:o.rotation});a.updateTransform(),this._transformGroup=a;var s=this._shared.ensureRecord(e);s.transGroup=this._transformGroup,s.dirVec=new e1(Math.cos(-o.rotation),Math.sin(-o.rotation))},t.prototype.build=function(t,e){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),tP(_w,function(i){t[i]&&_S[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,e||{})}),this},t.innerTextLayout=function(t,e,n){var i,r,o=rH(e-t);return rG(o)?(r=n>0?"top":"bottom",i="center"):rG(o-_u)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o<_u?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),_w=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],_S={axisLine:function(t,e,n,i,r,o,a){var s=i.get(["axisLine","show"]);if("auto"===s&&(s=!0,null!=t.raw.axisLineAutoShow&&(s=!!t.raw.axisLineAutoShow)),s){var l=i.axis.getExtent(),h=o.transform,u=[l[0],0],c=[l[1],0],d=u[0]>c[0];h&&(ev(u,u,h),ev(c,c,h));var p=tI({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),f={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())xn.buildAxisBreakLine(i,r,o,f);else{var g=new dw(tI({shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]}},f));d4(g.shape,g.style.lineWidth),g.anid="line",r.add(g)}var m=i.get(["axisLine","symbol"]);if(null!=m){var y=i.get(["axisLine","symbolSize"]);tG(m)&&(m=[m,m]),(tG(y)||tj(y))&&(y=[y,y]);var v=fy(i.get(["axisLine","symbolOffset"])||0,y),x=y[0],_=y[1];tP([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-c[0])*(u[0]-c[0])+(u[1]-c[1])*(u[1]-c[1]))}],function(e,n){if("none"!==m[n]&&null!=m[n]){var i=fg(m[n],-x/2,-_/2,x,_,p.stroke,!0),o=e.r+e.offset,a=d?c:u;i.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),r.add(i)}})}}},axisTickLabelEstimate:function(t,e,n,i,r,o,a,s){_T(e,r,s)&&_M(t,e,n,i,r,o,a,1)},axisTickLabelDetermine:function(t,e,n,i,r,o,a,s){_T(e,r,s)&&_M(t,e,n,i,r,o,a,2);var l,h,u,c=function(t,e,n,i){var r=i.axis,o=i.getModel("axisTick"),a=o.get("show");if("auto"===a&&(a=!0,null!=t.raw.axisTickAutoShow&&(a=!!t.raw.axisTickAutoShow)),!a||r.scale.isBlank())return[];for(var s=o.getModel("lineStyle"),l=t.tickDirection*o.get("length"),h=_k(r.getTicksCoords(),n.transform,l,tA(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),u=0;u<h.length;u++)e.add(h[u]);return h}(t,r,o,i);l=t,h=e.labelLayoutList,u=c,l.showMinorTicks||tP(h,function(t){if(t&&t.label.ignore)for(var e=0;e<u.length;e++){var n=u[e],i=_f(n),r=_p(t.label);if(null!=i.tickValue&&!i.onBand&&i.tickValue===r.tickValue)return void _C(n)}}),function(t,e,n,i,r){var o=i.axis,a=i.getModel("minorTick");if(!(!t.showMinorTicks||o.scale.isBlank())){var s=o.getMinorTicksCoords();if(s.length)for(var l=a.getModel("lineStyle"),h=r*a.get("length"),u=tA(l.getLineStyle(),tA(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),c=0;c<s.length;c++)for(var d=_k(s[c],n.transform,h,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}}(t,r,o,i,t.tickDirection)},axisName:function(t,e,n,i,r,o,a,s){var l,h,u=n.ensureRecord(i);e.nameEl&&(r.remove(e.nameEl),e.nameEl=u.nameLayout=u.nameLocation=null);var c=t.axisName;if(c){var d,p,f,g,m,y,v,x,_,b=t.nameLocation,w=t.nameDirection,S=i.getModel("nameTextStyle"),M=i.get("nameGap")||0,C=i.axis.getExtent(),k=i.axis.inverse?-1:1,T=new e1(0,0),I=new e1(0,0);"start"===b?(T.x=C[0]-k*M,I.x=-k):"end"===b?(T.x=C[1]+k*M,I.x=k):(T.x=(C[0]+C[1])/2,T.y=t.labelOffset+w*M,I.y=w);var A=eX();I.transform(eJ(A,A,t.rotation));var D=i.get("nameRotate");null!=D&&(D=D*_u/180),xW(b)?l=_b.innerTextLayout(t.rotation,null!=D?D:t.rotation,w):(d=t.rotation,p=b,f=D||0,g=C,v=rH(f-d),x=g[0]>g[1],_="start"===p&&!x||"start"!==p&&x,rG(v-_u/2)?(y=_?"bottom":"top",m="center"):rG(v-1.5*_u)?(y=_?"top":"bottom",m="center"):(y="middle",m=v<1.5*_u&&v>_u/2?_?"left":"right":_?"right":"left"),l={rotation:v,textAlign:m,textVerticalAlign:y},null!=(h=t.raw.axisNameAvailableWidth)&&(isFinite(h=Math.abs(h/Math.sin(l.rotation)))||(h=null)));var L=S.getFont(),O=i.get("nameTruncate",!0)||{},P=O.ellipsis,R=t$(t.raw.nameTruncateMaxWidth,O.maxWidth,h),N=s.nameMarginLevel||0,E=new sn({x:T.x,y:T.y,rotation:l.rotation,silent:_b.isLabelSilent(i),style:lt(S,{text:c,font:L,overflow:"truncate",width:R,ellipsis:P,fill:S.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:S.get("align")||l.textAlign,verticalAlign:S.get("verticalAlign")||l.textVerticalAlign}),z2:1});if(pu({el:E,componentModel:i,itemName:c}),E.__fullText=c,E.anid="name",i.get("triggerEvent")){var B=_b.makeAxisEventDataBase(i);B.targetType="axisName",B.name=c,si(E).eventData=B}o.add(E),E.updateTransform(),e.nameEl=E;var z=u.nameLayout=gG({label:E,priority:E.z2,defaultAttr:{ignore:E.ignore},marginDefault:xW(b)?_c[N]:_d[N]});if(u.nameLocation=b,r.add(E),E.decomposeTransform(),t.shouldNameMoveOverlap&&z){var V=n.ensureRecord(i);n.resolveAxisNameOverlap(t,n,i,z,I,V)}}}};function _M(t,e,n,i,r,o,a,s){_I(e)||function(t,e,n,i,r,o){var a=r.axis,s=t$(t.raw.axisLabelShow,r.get(["axisLabel","show"])),l=new rT;n.add(l);var h=xK(i);if(!s||a.scale.isBlank())return _A(e,[],l,h);var u=r.getModel("axisLabel"),c=a.getViewLabels(h),d=(t$(t.raw.labelRotate,u.get("rotate"))||0)*_u/180,p=_b.innerTextLayout(t.rotation,d,t.labelDirection),f=r.getCategories&&r.getCategories(!0),g=[],m=r.get("triggerEvent"),y=1/0,v=-1/0;tP(c,function(t,e){var n,i="ordinal"===a.scale.type?a.scale.getRawOrdinalNumber(t.tickValue):t.tickValue,s=t.formattedLabel,h=t.rawLabel,d=u;if(f&&f[i]){var x=f[i];tY(x)&&x.textStyle&&(d=new lb(x.textStyle,u,r.ecModel))}var _=d.getTextColor()||r.get(["axisLine","lineStyle","color"]),b=d.getShallow("align",!0)||p.textAlign,w=tJ(d.getShallow("alignMinLabel",!0),b),S=tJ(d.getShallow("alignMaxLabel",!0),b),M=d.getShallow("verticalAlign",!0)||d.getShallow("baseline",!0)||p.textVerticalAlign,C=tJ(d.getShallow("verticalAlignMinLabel",!0),M),k=tJ(d.getShallow("verticalAlignMaxLabel",!0),M),T=10+((null==(n=t.time)?void 0:n.level)||0);y=Math.min(y,T),v=Math.max(v,T);var I=new sn({x:0,y:0,rotation:0,silent:_b.isLabelSilent(r),z2:T,style:lt(d,{text:s,align:0===e?w:e===c.length-1?S:b,verticalAlign:0===e?C:e===c.length-1?k:M,fill:tH(_)?_("category"===a.type?h:"value"===a.type?i+"":i,e):_})});I.anid="label_"+i;var A=_p(I);if(A.break=t.break,A.tickValue=i,A.layoutRotation=p.rotation,pu({el:I,componentModel:r,itemName:s,formatterParamsExtra:{isTruncated:function(){return I.isTruncated},value:h,tickIndex:e}}),m){var D,L,O,P,R=_b.makeAxisEventDataBase(r);R.targetType="axisLabel",R.value=h,R.tickIndex=e,t.break&&(R.break={start:t.break.parsedBreak.vmin,end:t.break.parsedBreak.vmax}),"category"===a.type&&(R.dataIndex=i),si(I).eventData=R,t.break&&(D=r,L=o,O=I,P=t.break,O.on("click",function(t){var e={type:_n,breaks:[{start:P.parsedBreak.breakOption.start,end:P.parsedBreak.breakOption.end}]};e[D.axis.dim+"AxisIndex"]=D.componentIndex,L.dispatchAction(e)}))}g.push(I),l.add(I)}),_A(e,tR(g,function(t){return{label:t,priority:_p(t).break?t.z2+(v-y+1):t.z2,defaultAttr:{ignore:t.ignore}}}),l,h)}(t,e,r,s,i,a);var l,h,u,c,d,p=e.labelLayoutList;l=t,h=i,u=p,c=o,d=h.get(["axisLabel","margin"]),tP(u,function(t,e){var n=gG(t);if(n){var i=n.label,r=_p(i);n.suggestIgnore=i.ignore,i.ignore=!1,ro(_D,_L),_D.x=h.axis.dataToCoord(r.tickValue),_D.y=l.labelOffset+l.labelDirection*d,_D.rotation=r.layoutRotation,c.add(_D),_D.updateTransform(),c.remove(_D),_D.decomposeTransform(),ro(i,_D),i.markRedraw(),gW(n,!0),gG(n)}}),function(t,e,n){var i=lA;if(i){var r=i.retrieveAxisBreakPairs(n,function(t){return t&&_p(t.label).break},!0),o=t.get(["breakLabelLayout","moveOverlap"],!0);(!0===o||"auto"===o)&&tP(r,function(i){xn.adjustBreakLabelPair(t.axis.inverse,e,[gG(n[i[0]]),gG(n[i[1]])])})}}(i,t.rotation,p);var f=t.optionHideOverlap;(function(t,e,n){if(!xV(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]),o=e.length;a(i,0,1),a(r,o-1,o-2)}function a(t,i,r){var o=gG(e[i]),a=gG(e[r]);if(o&&a){if(!1===t||o.suggestIgnore)return void _C(o.label);if(a.suggestIgnore)return void _C(a.label);if(!n){var s=[0,0,0,0];o=gX({marginForce:s},o),a=gX({marginForce:s},a)}g$(o,a,null,{touchThreshold:.1})&&(t?_C(a.label):_C(o.label))}}})(i,p,f),f&&gK(tE(p,function(t){return t&&!t.label.ignore})),function(t,e,n,i){var r,o=n.axis,a=e.ensureRecord(n),s=[],l=!!t.axisName&&xW(t.nameLocation);tP(i,function(t){var e=gG(t);if(e&&!e.label.ignore){s.push(e);var n=a.transGroup;l&&(n.transform?e0(_m,n.transform):eZ(_m),e.transform&&eK(_m,_m,e.transform),nu.copy(_y,e.localRect),_y.applyTransform(_m),r?r.union(_y):nu.copy(r=new nu(0,0,0,0),_y))}});var h=Math.abs(a.dirVec.x)>.1?"x":"y",u=a.transGroup[h];if(s.sort(function(t,e){return Math.abs(t.label[h]-u)-Math.abs(e.label[h]-u)}),l&&r){var c=o.getExtent(),d=Math.min(c[0],c[1]),p=Math.max(c[0],c[1])-d;r.union(new nu(d,0,p,1))}a.stOccupiedRect=r,a.labelInfoList=s}(t,n,i,p)}function _C(t){t&&(t.ignore=!0)}function _k(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l<t.length;l++){var h=t[l].coord;a[0]=h,a[1]=0,s[0]=h,s[1]=n,e&&(ev(a,a,e),ev(s,s,e));var u=new dw({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});d4(u.shape,u.style.lineWidth),u.anid=r+"_"+t[l].tickValue,o.push(u);var c=_f(u);c.onBand=!!t[l].onBand,c.tickValue=t[l].tickValue}return o}function _T(t,e,n){if(_I(t)){var i=t.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var r=!0,o=0;o<i.length;o++)r=r&&i[o]();if(r)return!1}i.length&&(e.remove(t.labelGroup),_A(t,null,null,null))}return!0}function _I(t){return!!t.labelLayoutList}function _A(t,e,n,i){t.labelLayoutList=e,t.labelGroup=n,t.axisLabelsCreationContext=i}var _D=new aq,_L=new aq;function _O(t,e,n){n=n||{};var i=e.axis,r={},o=i.getAxesOnZeroOf()[0],a=i.position,s=o?"onZero":a,l=i.dim,h=[t.x,t.x+t.width,t.y,t.y+t.height],u={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,d="x"===l?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[u.onZero]=Math.max(Math.min(p,d[1]),d[0])}r.position=["y"===l?d[u[s]]:h[0],"x"===l?d[u[s]]:h[3]],r.rotation=Math.PI/2*("x"!==l),r.labelDirection=r.tickDirection=r.nameDirection=({top:-1,bottom:1,left:-1,right:1})[a],r.labelOffset=o?d[u[a]]-d[u.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),t$(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var f=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===s?-f:f,r.z2=1,r}function _P(t){var e={xAxisModel:null,yAxisModel:null};return tP(e,function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,os).models[0];e[i]=o}),e}function _R(t,e,n){var i=xm.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,{expandToNicedExtent:!0}),a=r.length-1,s=i.getInterval.call(n),l=xP(t,e),h=l.extent,u=l.fixMin,c=l.fixMax;"log"===t.type&&(h=xp(t.base,h,!0)),t.setBreaksFromOption(xG(e)),t.setExtent(h[0],h[1]),t.calcNiceExtent({splitNumber:a,fixMin:u,fixMax:c});var d=i.getExtent.call(t);u&&(h[0]=d[0]),c&&(h[1]=d[1]);var p=i.getInterval.call(t),f=h[0],g=h[1];if(u&&c)p=(g-f)/a;else if(u)for(g=h[0]+p*a;g<h[1]&&isFinite(g)&&isFinite(h[1]);)p=xa(p),g=h[0]+p*a;else if(c)for(f=h[1]-p*a;f>h[0]&&isFinite(f)&&isFinite(h[0]);)p=xa(p),f=h[1]-p*a;else{t.getTicks().length-1>a&&(p=xa(p));var m=p*a;(f=rz((g=Math.ceil(h[1]/p)*p)-m))<0&&h[0]>=0?(f=0,g=rz(m)):g>0&&h[1]<=0&&(g=0,f=-rz(m))}var y=(r[0].value-o[0].value)/s,v=(r[a].value-o[a].value)/s;i.setExtent.call(t,f+p*y,g+p*v),i.setInterval.call(t,p),(y||v)&&i.setNiceExtent.call(t,f+p,g-p)}var _N=[[3,1],[0,2]],_E=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=xj,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=tz(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;xo(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(xR(l,s),xo(l)&&(e=a))}r.length&&(e||xR((e=r.pop()).scale,e.model),tP(r,function(t){_R(t.scale,t.model,e.scale)}))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};tP(n.x,function(t){_z(n,"y",t,r)}),tP(n.y,function(t){_z(n,"x",t,r)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=hp(t,e),r=this._rect=hu(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,a=this._coordsList,s=t.get("containLabel");if(_F(o,r),!n){var l=(u=r,c=a,d=o,p=s,f=e,g=new _g(_U),tP(d,function(t){return tP(t,function(t){xH(t.model)&&(t.axisBuilder=function(t,e,n,i,r,o){for(var a=_O(t,n),s=!1,l=!1,h=0;h<e.length;h++)xo(e[h].getOtherAxis(n.axis).scale)&&(s=l=!0,"category"===n.axis.type&&n.axis.onBand&&(l=!1));return a.axisLineAutoShow=s,a.axisTickAutoShow=l,a.defaultNameMoveOverlap=o,new _b(n,i,a,r)}(u,c,t.model,f,g,!p))})}),g),h=void 0;if(s)te?(te(this._axesList,r),_F(o,r)):h=_H(r.clone(),"axisLabel",null,r,o,l,i);else{var u,c,d,p,f,g,m,y,v,x,_,b,w=(m=t,y=r,v=i,"same"===(_=m.get("outerBoundsMode",!0))?x=y.clone():(null==_||"auto"===_)&&(x=hu(m.get("outerBounds",!0)||v$,v.refContainer)),{outerBoundsRect:x,parsedOuterBoundsContain:null==(b=m.get("outerBoundsContain",!0))||"auto"===b||0>tD(["all","axisLabel"],b)?"all":b,outerBoundsClamp:[rB(tJ(m.get("outerBoundsClampWidth",!0),vJ["0"]),y.width),rB(tJ(m.get("outerBoundsClampHeight",!0),vJ["1"]),y.height)]}),S=w.outerBoundsRect,M=w.parsedOuterBoundsContain,C=w.outerBoundsClamp;S&&(h=_H(S,M,C,r,o,l,i))}_G(r,o,2,null,h,i)}tP(this._coordsList,function(t){t.calcAffineTransform()})},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}tY(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,r=t.xAxisModel||i&&i.getReferringComponents("xAxis",os).models[0],o=t.yAxisModel||i&&i.getReferringComponents("yAxis",os).models[0],a=t.gridModel,s=this._coordsList;return i?0>tD(s,e=i.coordinateSystem)&&(e=null):r&&o?e=this.getCartesian(r.componentIndex,o.componentIndex):r?n=this.getAxis("x",r.componentIndex):o?n=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,n){var i=this,r=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(e.eachComponent("xAxis",l("x"),this),e.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}function l(e){return function(n,i){if(_B(n,t)){var l=n.get("position");"x"===e?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var h=new _e(e,xN(n),[0,0],n.get("type"),l),u="category"===h.type;h.onBand=u&&n.get("boundaryGap"),h.inverse=n.get("inverse"),n.axis=h,h.model=n,h.grid=r,h.index=i,r._axesList.push(h),a[e][i]=h,s[e]++}}}this._axesMap=a,tP(a.x,function(e,n){tP(a.y,function(r,o){var a="x"+n+"y"+o,s=new xX(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(e),s.addAxis(r)})})},t.prototype._updateScale=function(t,e){function n(t,e){tP(xF(t,e.dim),function(n){e.scale.unionExtentFromData(t,n)})}tP(this._axesList,function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setSortInfo(e)}}),t.eachSeries(function(t){if(t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type){var i=_P(t),r=i.xAxisModel,o=i.yAxisModel;if(_B(r,e)&&_B(o,e)){var a=this.getCartesian(r.componentIndex,o.componentIndex),s=t.getData(),l=a.getAxis("x"),h=a.getAxis("y");n(s,l),n(s,h)}}},this)},t.prototype.getTooltipAxes=function(t){var e=[],n=[];return tP(this.getCartesians(),function(i){var r=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(r);0>tD(e,r)&&e.push(r),0>tD(n,o)&&n.push(o)}),{baseAxes:e,otherAxes:n}},t.create=function(e,n){var i=[];return e.eachComponent("grid",function(r,o){var a=new t(r,e,n);a.name="grid_"+o,a.resize(r,n,!0),r.coordinateSystem=a,i.push(a)}),e.eachSeries(function(t){hi({targetModel:t,coordSysType:"cartesian2d",coordSysProvider:function(){var e=_P(t),n=e.xAxisModel,i=e.yAxisModel;return n.getCoordSysModel().coordinateSystem.getCartesian(n.componentIndex,i.componentIndex)}})}),i},t.dimensions=xj,t}();function _B(t,e){return t.getCoordSysModel()===e}function _z(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)_V(o[l])&&(r=o[l]);else for(var h in o)if(o.hasOwnProperty(h)&&_V(o[h])&&!i[u(o[h])]){r=o[h];break}r&&(i[u(r)]=!0)}function u(t){return t.dim+"_"+t.index}}function _V(t){var e,n,i;return t&&"category"!==t.type&&"time"!==t.type&&(n=(e=t.scale.getExtent())[0],i=e[1],!(n>0&&i>0||n<0&&i<0))}function _F(t,e){tP(t.x,function(t){return _W(t,e.x,e.width)}),tP(t.y,function(t){return _W(t,e.y,e.height)})}function _W(t,e,n){var i,r,o=[0,n],a=+!!t.inverse;t.setExtent(o[a],o[1-a]),r=(i=t.getExtent())[0]+i[1],t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return r-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return r-t+e}}function _H(t,e,n,i,r,o,a){_G(i,r,1,e,!1,a);var s=[0,0,0,0];h(0),h(1),u(i,0,NaN),u(i,1,NaN);var l=null==tB(s,function(t){return t>0});return ps(i,s,!0,!0,n),_F(r,i),l;function h(t){tP(r[dX[t]],function(e){if(xH(e.model)){var n=o.ensureRecord(e.model),i=n.labelInfoList;if(i)for(var r=0;r<i.length;r++){var a=i[r],s=e.scale.normalize(_p(a.label).tickValue);s=1===t?1-s:s,u(a.rect,t,s),u(a.rect,1-t,NaN)}var l=n.nameLayout;if(l){var s=xW(n.nameLocation)?.5:NaN;u(l.rect,t,s),u(l.rect,1-t,NaN)}}})}function u(e,n,i){var r=t[dX[n]]-e[dX[n]],o=e[dZ[n]]+e[dX[n]]-(t[dZ[n]]+t[dX[n]]);r=c(r,1-i),o=c(o,i);var a=_N[n][0],l=_N[n][1];s[a]=rP(s[a],r),s[l]=rP(s[l],o)}function c(t,e){return t>0&&e==e&&e>1e-4&&(t/=e),t}}function _G(t,e,n,i,r,o){var a=2===n;tP(e,function(e){return tP(e,function(e){if(xH(e.model)){var n,i;n=e.axisBuilder,i=_O(t,e.model),n.updateCfg(i),e.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:r})}})});var s={x:0,y:0};function l(e){s[dX[1-e]]=t[dZ[e]]<=.5*o.refContainer[dZ[e]]?0:1-e==1?2:1}l(0),l(1),tP(e,function(t,e){return tP(t,function(t){xH(t.model)&&(("all"===i||a)&&t.axisBuilder.build({axisName:!0},{nameMarginLevel:s[e]}),a&&t.axisBuilder.build({axisLine:!0}))})})}var _U=function(t,e,n,i,r,o){var a="x"===n.axis.dim?"y":"x";_v(t,e,n,i,r,o),xW(t.nameLocation)||tP(e.recordMap[a],function(t){t&&t.labelInfoList&&t.dirVec&&__(t.labelInfoList,t.dirVec,i,r)})};function _j(t,e){return"all"===t||tW(t)&&tD(t,e)>=0||t===e}function _Y(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[_Z(t)]}function _X(t){return!!t.get(["handle","show"])}function _Z(t){return t.type+"||"+t.id}var _q={},_K=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(e,n,i,r){this.axisPointerClass&&function(t){var e=_Y(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=_X(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var r=e.getAxisPointerClass(this.axisPointerClass);if(r){var o,a=(o=_Y(t))&&o.axisPointerModel;a?(this._axisPointer||(this._axisPointer=new r)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){_q[t]=e},e.getAxisPointerClass=function(t){return t&&_q[t]},e.type="axis",e}(cL),_$=oi();function _J(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=i.coordinateSystem.getRect(),h=r.getTicksCoords({tickModel:o,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(h.length){var u=s.length,c=_$(t).splitAreaColors,d=t9(),p=0;if(c)for(var f=0;f<h.length;f++){var g=c.get(h[f].tickValue);if(null!=g){p=(g+(u-1)*f)%u;break}}var m=r.toGlobalCoord(h[0].coord),y=a.getAreaStyle();s=tW(s)?s:[s];for(var f=1;f<h.length;f++){var v=r.toGlobalCoord(h[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;r.isHorizontal()?(x=m,_=l.y,b=v-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,w=v-_,m=_+w);var S=h[f-1].tickValue;null!=S&&d.set(S,p),e.add(new aq({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:tA({fill:s[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%u}_$(t).splitAreaColors=d}}}function _Q(t){_$(t).splitAreaColors=null}var _0=["splitArea","splitLine","minorSplitLine","breakArea"],_1=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return to(e,t),e.prototype.render=function(e,n,i,r){this.group.removeAll();var o=this._axisGroup;this._axisGroup=new rT,this.group.add(this._axisGroup),xH(e)&&(this._axisGroup.add(e.axis.axisBuilder.group),tP(_0,function(t){e.get([t,"show"])&&_2[t](this,this._axisGroup,e,e.getCoordSysModel(),i)},this),r&&"changeAxisOrder"===r.type&&r.isInitSort||pe(o,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r))},e.prototype.remove=function(){_Q(this)},e.type="cartesianAxis",e}(_K),_2={splitLine:function(t,e,n,i,r){var o=n.axis;if(!o.scale.isBlank()){var a=n.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),h=!1!==a.get("showMinLine"),u=!1!==a.get("showMaxLine");l=tW(l)?l:[l];for(var c=i.coordinateSystem.getRect(),d=o.isHorizontal(),p=0,f=o.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],m=[],y=s.getLineStyle(),v=0;v<f.length;v++){var x=o.toGlobalCoord(f[v].coord);if((0!==v||h)&&(v!==f.length-1||u)){var _=f[v].tickValue;d?(g[0]=x,g[1]=c.y,m[0]=x,m[1]=c.y+c.height):(g[0]=c.x,g[1]=x,m[0]=c.x+c.width,m[1]=x);var b=p++%l.length,w=new dw({anid:null!=_?"line_"+_:null,autoBatch:!0,shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},style:tA({stroke:l[b]},y),silent:!0});d4(w.shape,y.lineWidth),e.add(w)}}}},minorSplitLine:function(t,e,n,i,r){var o=n.axis,a=n.getModel("minorSplitLine").getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=o.isHorizontal(),h=o.getMinorTicksCoords();if(h.length)for(var u=[],c=[],d=a.getLineStyle(),p=0;p<h.length;p++)for(var f=0;f<h[p].length;f++){var g=o.toGlobalCoord(h[p][f].coord);l?(u[0]=g,u[1]=s.y,c[0]=g,c[1]=s.y+s.height):(u[0]=s.x,u[1]=g,c[0]=s.x+s.width,c[1]=g);var m=new dw({anid:"minor_line_"+h[p][f].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});d4(m.shape,d.lineWidth),e.add(m)}},splitArea:function(t,e,n,i,r){_J(t,e,n,i)},breakArea:function(t,e,n,i,r){var o=xn,a=n.axis.scale;o&&"ordinal"!==a.type&&o.rectCoordBuildBreakAxis(e,t,n,i.coordinateSystem.getRect(),r)}},_5=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="xAxis",e}(_1),_3=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=_5.type,e}return to(e,t),e.type="yAxis",e}(_1),_4=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return to(e,t),e.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new aq({shape:t.coordinateSystem.getRect(),style:tA({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(cL),_8={offset:0};function _6(t){t.registerComponentView(_4),t.registerComponentModel(vQ),t.registerCoordinateSystem("cartesian2d",_E),xi(t,"x",v1,_8),xi(t,"y",v1,_8),t.registerComponentView(_5),t.registerComponentView(_3),t.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var _9=oi();function _7(t,e,n,i){if(t instanceof _e){var r,o,a,s,l,h,u,c,d,p,f,g,m,y=t.scale.type;if("category"!==y&&"ordinal"!==y)return n}var v=t.model,x=v.get("jitter"),_=v.get("jitterOverlap"),b=v.get("jitterMargin")||0,w="ordinal"===t.scale.type?t.getBandWidth():null;if(x>0)if(_)return bt(n,x,w,i);else{return r=t,o=e,a=n,s=i,l=x,h=b,(u=_9(r)).items||(u.items=[]),d=be(c=u.items,o,a,s,l,h,1),p=be(c,o,a,s,l,h,-1),f=Math.abs(d-a)<Math.abs(p-a)?d:p,g="ordinal"===r.scale.type?r.getBandWidth():null,(m=Math.abs(f-a))>l/2||g&&m>g/2-s?bt(a,l,g,s):(c.push({fixedCoord:o,floatCoord:f,r:s}),f)}return n}function bt(t,e,n,i){return null===n?t+(Math.random()-.5)*e:t+(Math.random()-.5)*Math.min(Math.max(0,e),n-2*i)}function be(t,e,n,i,r,o,a){for(var s=n,l=0;l<t.length;l++){var h=t[l],u=e-h.fixedCoord,c=s-h.floatCoord,d=u*u+c*c,p=i+h.r+o;if(d<p*p){var f=h.floatCoord+Math.sqrt(p*p-u*u)*a;if(Math.abs(f-n)>r/2)return Number.MAX_VALUE;if(1===a&&f>s||-1===a&&f<s){s=f,l=-1;continue}}}return s}function bn(t){t.eachSeriesByType("scatter",function(t){var e=t.coordinateSystem;if(e&&("cartesian2d"===e.type||"single"===e.type)){var n,i,r,o,a,s=e.getBaseAxis?e.getBaseAxis():null;if(s&&(i=(n=t.coordinateSystem)&&n.type,o=(r=n&&n.getBaseAxis&&n.getBaseAxis())&&r.scale&&r.scale.type,a=s.model.get("jitter")>0,("cartesian2d"===i&&"ordinal"===o||"single"===i)&&a)){var l=t.getData();l.each(function(t){var e=s.dim,n=s.orient,i="horizontal"===n&&"category"!==s.type||"vertical"===n&&"category"===s.type,r=l.getItemLayout(t),o=l.getItemVisual(t,"symbolSize"),a=o instanceof Array?(o[1]+o[0])/2:o;if("y"===e||"single"===e&&i){var h=_7(s,r[0],r[1],a/2);l.setItemLayout(t,[r[0],h])}else if("x"===e||"single"===e&&!i){var h=_7(s,r[1],r[0],a/2);l.setItemLayout(t,[h,r[1]])}})}}})}function bi(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){var r=i.getIndicatorAxes();tP(r,function(t,o){e.each(e.mapDimension(r[o].dim),function(t,e){n[e]=n[e]||[];var r,a=i.dataToPoint(t,o);n[e][o]=br(a)?a:[(r=i).cx,r.cy]})}),e.each(function(t){var r,o=tB(n[t],function(t){return br(t)})||[(r=i).cx,r.cy];n[t].push(o.slice()),e.setItemLayout(t,n[t])})}})}function br(t){return!isNaN(t[0])&&!isNaN(t[1])}function bo(t){var e=t.polar;if(e){tW(e)||(e=[e]);var n=[];tP(e,function(e,i){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],tW(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):n.push(e)}),t.polar=n}tP(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}var ba=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=t.coordinateSystem,r=this.group,o=t.getData(),a=this._data;function s(e,n,i,r,o,a){i.removeAll();for(var s=0;s<n.length-1;s++){var l=function(t,e){var n=t.getItemVisual(e,"symbol")||"circle";if("none"!==n){var i=fm(t.getItemVisual(e,"symbolSize")),r=fg(n,-1,-1,2,2),o=t.getItemVisual(e,"symbolRotate")||0;return r.attr({style:{strokeNoScale:!0},z2:100,scaleX:i[0]/2,scaleY:i[1]/2,rotation:o*Math.PI/180||0}),r}}(r,o);l&&(l.__dimIdx=s,e[s]?(l.setPosition(e[s]),ti[a?"initProps":"updateProps"](l,{x:n[s][0],y:n[s][1]},t,o)):l.setPosition(n[s]),i.add(l))}}function l(t){return tR(t,function(t){return[i.cx,i.cy]})}o.diff(a).add(function(e){var n=o.getItemLayout(e);if(n){var i=new dg,r=new dv,a={shape:{points:n}};i.shape.points=l(n),r.shape.points=l(n),sQ(i,a,t,e),sQ(r,a,t,e);var h=new rT,u=new rT;h.add(r),h.add(i),h.add(u),s(r.shape.points,n,u,o,e,!0),o.setItemGraphicEl(e,h)}}).update(function(e,n){var i=a.getItemGraphicEl(n),r=i.childAt(0),l=i.childAt(1),h=i.childAt(2),u={shape:{points:o.getItemLayout(e)}};u.shape.points&&(s(r.shape.points,u.shape.points,h,o,e,!1),s3(l),s3(r),sJ(r,u,t),sJ(l,u,t),o.setItemGraphicEl(e,i))}).remove(function(t){r.remove(a.getItemGraphicEl(t))}).execute(),o.eachItemGraphicEl(function(t,e){var n=o.getItemModel(e),i=t.childAt(0),a=t.childAt(1),s=t.childAt(2),l=o.getItemVisual(e,"style"),h=l.fill;r.add(t),i.useStyle(tA(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:h})),sU(i,n,"lineStyle"),sU(a,n,"areaStyle");var u=n.getModel("areaStyle"),c=u.isEmpty()&&u.parentModel.isEmpty();a.ignore=c,tP(["emphasis","select","blur"],function(t){var e=n.getModel([t,"areaStyle"]),r=e.isEmpty()&&e.parentModel.isEmpty();a.ensureState(t).ignore=r&&c;var o=n.getModel([t,"lineStyle"]).getLineStyle();i.ensureState(t).style=o;var l=e.getAreaStyle();a.ensureState(t).style=l;var h=n.getModel([t,"itemStyle"]).getItemStyle();s.eachChild(function(e){e.ensureState(t).style=tC(h)})}),a.useStyle(tA(n.getModel("areaStyle").getAreaStyle(),{fill:h,opacity:.7,decal:l.decal}));var d=n.getModel("emphasis");s.eachChild(function(t){if(t instanceof aW){var i=t.style;t.useStyle(tI({image:i.image,x:i.x,y:i.y,width:i.width,height:i.height},l))}else t.useStyle(l),t.setColor(h),t.style.strokeNoScale=!0;var r=o.getStore().get(o.getDimensionIndex(t.__dimIdx),e);(null==r||isNaN(r))&&(r=""),s9(t,s7(n),{labelFetcher:o.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:r,inheritColor:h,defaultOpacity:l.opacity})}),sF(t,d.get("focus"),d.get("blurScope"),d.get("disabled"))}),this._data=o},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(pw),bs=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return to(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new vG(tV(this.getData,this),tV(this.getRawData,this))},e.prototype.getInitialData=function(t,e){return vH(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.coordinateSystem.getIndicatorAxes(),o=this.getData().getName(t),a=""===o?this.name:o,s=cm(this,t);return ch("section",{header:a,sortBlocks:!0,blocks:tR(r,function(e){var n=i.get(i.mapDimension(e.dim),t);return ch("nameValue",{markerType:"subItem",markerColor:s,name:e.name,value:n,sortParam:n})})})},e.prototype.getTooltipPosition=function(t){if(null!=t){for(var e=this.getData(),n=this.coordinateSystem,i=e.getValues(tR(n.dimensions,function(t){return e.mapDimension(t)}),t),r=0,o=i.length;r<o;r++)if(!isNaN(i[r])){var a=n.getIndicatorAxes();return n.coordToPoint(a[r].dataToCoord(i[r]),r)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(cS),bl=v6.value;function bh(t,e){return tA({show:e},t)}var bu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),r=this.get("axisTick"),o=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),u=this.get("triggerEvent"),c=tR(this.get("indicator")||[],function(c){null!=c.max&&c.max>0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=tA({color:c.color},a));var p=tk(tC(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:u},!1);if(tG(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else tH(l)&&(p.name=l(p.name,p));var g=new lb(p,null,this.ecModel);return tL(g,v0.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:hS.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:tk({lineStyle:{color:hS.color.neutral20}},bl.axisLine),axisLabel:bh(bl.axisLabel,!1),axisTick:bh(bl.axisTick,!1),splitLine:bh(bl.splitLine,!0),splitArea:bh(bl.splitArea,!0),indicator:[]},e}(h_),bc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t,n),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,e){var n=t.coordinateSystem;tP(tR(n.getIndicatorAxes(),function(t){var i=t.model.get("showName")?t.name:"";return new _b(t.model,e,{axisName:i,position:[n.cx,n.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){t.build(),this.group.add(t.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),h=o.get("show"),u=a.get("color"),c=s.get("color"),d=tW(u)?u:[u],p=tW(c)?c:[c],f=[],g=[];if("circle"===i)for(var m=n[0].getTicksCoords(),y=e.cx,v=e.cy,x=0;x<m.length;x++){if(l){var _=I(f,d,x);f[_].push(new c0({shape:{cx:y,cy:v,r:m[x].coord}}))}if(h&&x<m.length-1){var _=I(g,p,x);g[_].push(new dc({shape:{cx:y,cy:v,r0:m[x].coord,r:m[x+1].coord}}))}}else for(var b,w=tR(n,function(t,n){var i=t.getTicksCoords();return b=null==b?i.length-1:Math.min(i.length-1,b),tR(i,function(t){return e.coordToPoint(t.coord,n)})}),S=[],x=0;x<=b;x++){for(var M=[],C=0;C<n.length;C++)M.push(w[C][x]);if(M[0]&&M.push(M[0].slice()),l){var _=I(f,d,x);f[_].push(new dv({shape:{points:M}}))}if(h&&S){var _=I(g,p,x-1);g[_].push(new dg({shape:{points:M.concat(S)}}))}S=M.slice().reverse()}var k=a.getLineStyle(),T=s.getAreaStyle();tP(g,function(t,e){this.group.add(d5(t,{style:tA({stroke:"none",fill:p[e%p.length]},T),silent:!0}))},this),tP(f,function(t,e){this.group.add(d5(t,{style:tA({fill:"none",stroke:d[e%d.length]},k),silent:!0}))},this)}function I(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}},e.type="radar",e}(cL),bd=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.type="value",r.angle=0,r.name="",r}return to(e,t),e}(x7),bp=function(){function t(t,e,n){this.dimensions=[],this._model=t,this._indicatorAxes=tR(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new bd(n,new xm);return i.name=t.get("name"),i.model=t,t.axis=i,this.dimensions.push(n),i},this),this.resize(t,n)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},t.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},t.prototype.pointToData=function(t){var e,n=t[0]-this.cx,i=t[1]-this.cy,r=Math.sqrt(n*n+i*i);n/=r;for(var o=Math.atan2(-(i/=r),n),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var h=this._indicatorAxes[l],u=Math.abs(o-h.angle);u<a&&(e=h,s=l,a=u)}return[s,+(e&&e.coordToData(r))]},t.prototype.resize=function(t,e){var n=hp(t,e).refContainer,i=t.get("center"),r=Math.min(n.width,n.height)/2;this.cx=rE(i[0],n.width)+n.x,this.cy=rE(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(tG(o)||tj(o))&&(o=[0,o]),this.r0=rE(o[0],r),this.r=rE(o[1],r),tP(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;t.angle=Math.atan2(Math.sin(n),Math.cos(n))},this)},t.prototype.update=function(t,e){var n=this._indicatorAxes,i=this._model;tP(n,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e,r){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===i){var o=e.getData();tP(n,function(t){t.scale.unionExtentFromData(o,o.mapDimension(t.dim))})}},this);var r=i.get("splitNumber"),o=new xm;o.setExtent(0,r),o.setInterval(1),tP(n,function(t,e){_R(t.scale,t.model,o)})},t.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},t.dimensions=[],t}();function bf(t){t.registerCoordinateSystem("radar",bp),t.registerComponentModel(bu),t.registerComponentView(bc),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(t){e.setItemVisual(t,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}var bg=oi();gd({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ei);var bm={axisPointer:1,tooltip:1,brush:1};function by(t,e,n){var i=e.getComponentByElement(t.topTarget);if(!i||i===n||bm.hasOwnProperty(i.mainType))return!1;var r=i.coordinateSystem;if(!r||r.model===n)return!1;var o=py(i),a=py(n);return!(0>=(o.zlevel-a.zlevel||o.z-a.z))}var bv=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=tV(n._mousedownHandler,n),r=tV(n._mousemoveHandler,n),o=tV(n._mouseupHandler,n),a=tV(n._mousewheelHandler,n),s=tV(n._pinchHandler,n);return n.enable=function(t,n){var l=n.zInfo,h=py(l.component),u=h.z,c=h.zlevel,d={component:l.component,z:u,zlevel:c,z2:tJ(l.z2,-1/0)},p=tI({},n.triggerInfo);this._opt=tA(tI({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:d,triggerInfo:p}),null==t&&(t=!0),this._enabled&&this._controlType===t||(this._enabled=!0,this.disable(),(!0===t||"move"===t||"pan"===t)&&(bw(e,"mousedown",i,d),bw(e,"mousemove",r,d),bw(e,"mouseup",o,d)),(!0===t||"scale"===t||"zoom"===t)&&(bw(e,"mousewheel",a,d),bw(e,"pinch",s,d)))},n.disable=function(){this._enabled=!1,bS(e,"mousedown",i),bS(e,"mousemove",r),bS(e,"mouseup",o),bS(e,"mousewheel",a),bS(e,"pinch",s)},n}return to(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,e,n){var i=this._opt,r=i.zInfoParsed;if(by(t,i.api,r.component))return!1;var o=i.triggerInfo,a=o.roamTrigger,s=!1;return"global"===a&&(s=!0),s||(s=o.isInSelf(t,e,n)),s&&o.isInClip&&!o.isInClip(t,e,n)&&(s=!1),s},e.prototype._decideCursorStyle=function(t,e,n,i){var r=t.target;return!r&&this._checkPointer(t,e,n)?"grab":i?r&&r.cursor||"default":void 0},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(eG(t)||bx(t))){for(var e=t.target;e;){if(e.draggable)return;e=e.__hostTarget||e.parent}var n=t.offsetX,i=t.offsetY;this._checkPointer(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var e=this._zr;if(!("pinch"===t.gestureEvent||bg(e).globalPan||bx(t))){var n=t.offsetX,i=t.offsetY;if(!this._dragging||!bC("moveOnMouseMove",t,this._opt)){var r=this._decideCursorStyle(t,n,i,!1);r&&e.setCursorStyle(r);return}e.setCursorStyle("grabbing");var o=this._x,a=this._y,s=n-o,l=i-a;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&eH(t.event),t.__ecRoamConsumed=!0,bM(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:o,oldY:a,newX:n,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!bx(t)){var e=this._zr;if(!eG(t)){this._dragging=!1;var n=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);n&&e.setCursorStyle(n)}}},e.prototype._mousewheelHandler=function(t){if(!bx(t)){var e=bC("zoomOnMouseWheel",t,this._opt),n=bC("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(bg(this._zr).globalPan||bx(t))){var e=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,e,n,i,r){t._checkPointer(i,r.originX,r.originY)&&(eH(i.event),i.__ecRoamConsumed=!0,bM(t,e,n,i,r))},e}(eS);function bx(t){return t.__ecRoamConsumed}var b_=oi();function bb(t){var e=b_(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function bw(t,e,n,i){for(var r,o,a,s=bb(t).roam,l=s[e]=s[e]||[],h=0;h<l.length;h++){var u=l[h].zInfoParsed;if(0>=(u.zlevel-i.zlevel||u.z-i.z||u.z2-i.z2))break}l.splice(h,0,{listener:n,zInfoParsed:i}),r=t,o=e,(a=bb(r)).uniform[o]||r.on(o,a.uniform[o]=function(t){var e=a.roam[o];if(e)for(var n=0;n<e.length;n++)e[n].listener(t)})}function bS(t,e,n){for(var i=bb(t).roam[e]||[],r=0;r<i.length;r++)if(i[r].listener===n){i.splice(r,1),i.length||function(t,e){var n=bb(t).uniform;n[e]&&(t.off(e,n[e]),n[e]=null)}(t,e);return}}function bM(t,e,n,i,r){r.isAvailableBehavior=tV(bC,null,n,i),t.trigger(e,r)}function bC(t,e,n){var i=n[t];return!t||i&&(!tG(i)||e.event[i+"Key"])}function bk(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function bT(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;a*=e;var s=(a=bO(a,o))/t.zoom;t.zoom=a,bL(r,n,i,s),r.dirty()}function bI(t,e,n,i,r,o){var a=new nu(0,0,0,0);i.enable(t.get("roam"),{api:e,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(t,e,i){return a.copy(n.getBoundingRect()),a.applyTransform(n.getComputedTransform()),a.contain(e,i)},isInClip:function(t,e,n){return!o||o.contain(e,n)}}}),r.zoomLimit=t.get("scaleLimit");var s=t.coordinateSystem;r.zoom=s?s.getZoom():1;var l=t.subType+"Roam";i.off("pan").off("zoom").on("pan",function(n){bk(r,n.dx,n.dy),e.dispatchAction({seriesId:t.id,type:l,dx:n.dx,dy:n.dy})}).on("zoom",function(n){bT(r,n.scale,n.originX,n.originY),e.dispatchAction({seriesId:t.id,type:l,zoom:n.scale,originX:n.originX,originY:n.originY}),e.updateLabelLayout()})}function bA(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function bD(t,e,n){var i=t.getZoom(),r=t.getCenter(),o=e.zoom,a=t.projectedToPoint?t.projectedToPoint(r):t.dataToPoint(r);return null!=e.dx&&null!=e.dy&&(a[0]-=e.dx,a[1]-=e.dy,t.setCenter(bA(t,a))),null!=o&&(o=bO(i*o,n)/i,bL(t,e.originX,e.originY,o),t.updateTransform(),t.setCenter(bA(t,a)),t.setZoom(o*i)),{center:t.getCenter(),zoom:t.getZoom()}}function bL(t,e,n,i){t.x-=(e-t.x)*(i-1),t.y-=(n-t.y)*(i-1),t.scaleX*=i,t.scaleY*=i}function bO(t,e){if(e){var n=e.min||0;t=Math.max(Math.min(e.max||1/0,t),n)}return t}function bP(t){tG(t)&&(t=new DOMParser().parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var bR={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"},bN=tz(bR),bE={"alignment-baseline":"textBaseline","stop-color":"stopColor"},bB=tz(bE),bz=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n,i,r=bP(t);this._defsUsePending=[];var o=new rT;this._root=o;var a=[],s=r.getAttribute("viewBox")||"",l=parseFloat(r.getAttribute("width")||e.width),h=parseFloat(r.getAttribute("height")||e.height);isNaN(l)&&(l=null),isNaN(h)&&(h=null),bU(r,o,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,o,a,null,!1,!1),u=u.nextSibling;if(function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i[0].style[i[1]]=t[i[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],s){var c=bZ(s);c.length>=4&&(n={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(n&&null!=l&&null!=h&&(i=bQ(n,{x:0,y:0,width:l,height:h}),!e.ignoreViewBox)){var d=o;(o=new rT).add(d),d.scaleX=d.scaleY=i.scale,d.x=i.x,d.y=i.y}return e.ignoreRootClip||null==l||null==h||o.setClipPath(new aq({shape:{x:0,y:0,width:l,height:h}})),{root:o,width:l,height:h,viewBoxRect:n,viewBoxTransform:i,named:a}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var h=tn[s];if(h&&en(tn,s)){a=h.call(this,t,e);var u=t.getAttribute("name");if(u){var c={name:u,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=bV[s];if(d&&en(bV,s)){var p=d.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new aB({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});bH(e,n),bU(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":("central"===i||"mathematical"===i)&&(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(tn={g:function(t,e){var n=new rT;return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new aq;return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new c0;return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new dw;return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new c5;return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=bG(i));var r=new dg({shape:{points:n||[]},silent:!0});return bH(e,r),bU(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=bG(i));var r=new dv({shape:{points:n||[]},silent:!0});return bH(e,r),bU(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new aW;return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new rT;return bH(e,a),bU(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new rT;return bH(e,a),bU(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=new cZ(cK(t.getAttribute("d")||"",void 0));return bH(e,n),bU(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),bV={lineargradient:function(t){var e=new dP(parseInt(t.getAttribute("x1")||"0",10),parseInt(t.getAttribute("y1")||"0",10),parseInt(t.getAttribute("x2")||"10",10),parseInt(t.getAttribute("y2")||"0",10));return bF(t,e),bW(t,e),e},radialgradient:function(t){var e=new dR(parseInt(t.getAttribute("cx")||"0",10),parseInt(t.getAttribute("cy")||"0",10),parseInt(t.getAttribute("r")||"0",10));return bF(t,e),bW(t,e),e}};function bF(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function bW(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};bJ(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000",s=o.stopOpacity||n.getAttribute("stop-opacity");if(s){var l=ir(a);l&&l[3]&&(l[3]*=n8(s),a=iu(l,"rgba"))}e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function bH(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),tA(e.__inheritedStyle,t.__inheritedStyle))}function bG(t){for(var e=bZ(t),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),o=parseFloat(e[i+1]);n.push([r,o])}return n}function bU(t,e,n,i,r){var o=e.__inheritedStyle=e.__inheritedStyle||{},a={};1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=[],r=null;n.replace(bq,function(t,e,n){return i.push(e,n),""});for(var o=i.length-1;o>0;o-=2){var a=i[o],s=i[o-1],l=bZ(a);switch(r=r||eX(),s){case"translate":e$(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":eQ(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":eJ(r,r,-parseFloat(l[0])*bK,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":eK(r,[1,0,Math.tan(parseFloat(l[0])*bK),1,0,0],r);break;case"skewY":eK(r,[1,Math.tan(parseFloat(l[0])*bK),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),bJ(t,o,a),i||function(t,e,n){for(var i=0;i<bN.length;i++){var r=bN[i],o=t.getAttribute(r);null!=o&&(e[bR[r]]=o)}for(var i=0;i<bB.length;i++){var r=bB[i],o=t.getAttribute(r);null!=o&&(n[bE[r]]=o)}}(t,o,a)),e.style=e.style||{},null!=o.fill&&(e.style.fill=bY(e,"fill",o.fill,n)),null!=o.stroke&&(e.style.stroke=bY(e,"stroke",o.stroke,n)),tP(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=o[t]&&(e.style[t]=parseFloat(o[t]))}),tP(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(t){null!=o[t]&&(e.style[t]=o[t])}),r&&(e.__selfStyle=a),o.lineDash&&(e.style.lineDash=tR(bZ(o.lineDash),function(t){return parseFloat(t)})),("hidden"===o.visibility||"collapse"===o.visibility)&&(e.invisible=!0),"none"===o.display&&(e.ignore=!0)}var bj=/^url\(\s*#(.*?)\)/;function bY(t,e,n,i){var r=n&&n.match(bj);if(r){var o=t5(r[1]);i.push([t,e,o]);return}return"none"===n&&(n=null),n}var bX=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function bZ(t){return t.match(bX)||[]}var bq=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,bK=Math.PI/180,b$=/([^\s:;]+)\s*:\s*([^:;]+)/g;function bJ(t,e,n){var i,r=t.getAttribute("style");if(r)for(b$.lastIndex=0;null!=(i=b$.exec(r));){var o=i[1],a=en(bR,o)?bR[o]:null;a&&(e[a]=i[2]);var s=en(bE,o)?bE[o]:null;s&&(n[s]=i[2])}}function bQ(t,e){var n=Math.min(e.width/t.width,e.height/t.height);return{scale:n,x:-(t.x+t.width/2)*n+(e.x+e.width/2),y:-(t.y+t.height/2)*n+(e.y+e.height/2)}}function b0(t,e){return 1e-8>Math.abs(t-e)}function b1(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;o<t.length;o++){var a=t[o];i+=ak(r[0],r[1],a[0],a[1],e,n),r=a}var s=t[0];return b0(r[0],s[0])&&b0(r[1],s[1])||(i+=ak(r[0],r[1],s[0],s[1],e,n)),0!==i}var b2=[];function b5(t,e){for(var n=0;n<t.length;n++)ev(t[n],t[n],e)}function b3(t,e,n,i){for(var r=0;r<t.length;r++){var o=t[r];i&&(o=i.project(o)),o&&isFinite(o[0])&&isFinite(o[1])&&(ex(e,e,o),e_(n,n,o))}}var b4=function(){function t(t){this.name=t}return t.prototype.setCenter=function(t){this._center=t},t.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},t}(),b8=function(t,e){this.type="polygon",this.exterior=t,this.interiors=e},b6=function(t){this.type="linestring",this.points=t},b9=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.type="geoJSON",r.geometries=n,r._center=i&&[i[0],i[1]],r}return to(e,t),e.prototype.calcCenter=function(){for(var t,e=this.geometries,n=0,i=0;i<e.length;i++){var r=e[i],o=r.exterior,a=o&&o.length;a>n&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s<r;s++){var l=t[s][0],h=t[s][1],u=o*h-l*a;e+=u,n+=(o+l)*u,i+=(a+h)*u,o=l,a=h}return e?[n/e/3,i/e/3,e]:[t[0][0]||0,t[0][1]||0]}(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},e.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var n=[1/0,1/0],i=[-1/0,-1/0];return tP(this.geometries,function(e){"polygon"===e.type?b3(e.exterior,n,i,t):tP(e.points,function(e){b3(e,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),e=new nu(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=e),e},e.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;a:for(var i=0,r=n.length;i<r;i++){var o=n[i];if("polygon"===o.type){var a=o.exterior,s=o.interiors;if(b1(a,t[0],t[1])){for(var l=0;l<(s?s.length:0);l++)if(b1(s[l],t[0],t[1]))continue a;return!0}}}return!1},e.prototype.transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new nu(t,e,n,i),s=r.calculateTransform(a),l=this.geometries,h=0;h<l.length;h++){var u=l[h];"polygon"===u.type?(b5(u.exterior,s),tP(u.interiors,function(t){b5(t,s)})):tP(u.points,function(t){b5(t,s)})}(r=this._rect).copy(a),this._center=[r.x+r.width/2,r.y+r.height/2]},e.prototype.cloneShallow=function(t){null==t&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(b4),b7=function(t){function e(e,n){var i=t.call(this,e)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return to(e,t),e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),n=[e.x+e.width/2,e.y+e.height/2],i=eZ(b2),r=t;r&&!r.isGeoSVGGraphicRoot;)eK(i,r.getLocalTransform(),i),r=r.parent;return e0(i,i),ev(n,n,i),n},e}(b4),wt=t9(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),we=function(){function t(t,e){this.type="geoSVG",this._usedGraphicMap=t9(),this._freedGraphics=[],this._mapName=t,this._parsedXML=bP(e)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e,n,i,r=(e=t.named,n=[],i=t9(),tP(e,function(t){if(null==t.namedFrom){var e=new b7(t.name,t.el);n.push(e),i.set(t.name,e)}}),{regions:n,regionsMap:i}),o=r.regions,a=r.regionsMap;this._regions=o,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){try{var e;i=(n=t&&(e={ignoreViewBox:!0,ignoreRootClip:!0},new bz().parse(t,e))||{}).root,t2(null!=i)}catch(t){throw Error("Invalid svg format\n"+t.message)}var n,i,r=new rT;r.add(i),r.isGeoSVGGraphicRoot=!0;var o=n.width,a=n.height,s=n.viewBoxRect,l=this._boundingRect;if(!l){var h=void 0,u=void 0,c=void 0,d=void 0;if(null!=o?(h=0,c=o):s&&(h=s.x,c=s.width),null!=a?(u=0,d=a):s&&(u=s.y,d=s.height),null==h||null==u){var p=i.getBoundingRect();null==h&&(h=p.x,c=p.width),null==u&&(u=p.y,d=p.height)}l=this._boundingRect=new nu(h,u,c,d)}if(s){var f=bQ(s,l);i.scaleX=i.scaleY=f.scale,i.x=f.x,i.y=f.y}r.setClipPath(new aq({shape:l.plain()}));var g=[];return tP(n.named,function(t){var e;null!=wt.get(t.svgNodeTagLower)&&(g.push(t),(e=t.el).silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1}))}),{root:r,boundingRect:l,named:g}},t.prototype.useGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,n)),n},t.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},t}();function wn(t,e,n){for(var i=0;i<t.length;i++)t[i]=wi(t[i],e[i],n)}function wi(t,e,n){for(var i=[],r=e[0],o=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;l=l>>1^-(1&l),s=(s>>1^-(1&s))+r,l+=o,r=s,o=l,i.push([s/n,l/n])}return i}for(var wr=[126,25],wo="南海诸岛",wa=[[[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]]],ws=0;ws<wa.length;ws++)for(var wl=0;wl<wa[ws].length;wl++)wa[ws][wl][0]/=10.5,wa[ws][wl][1]/=-14,wa[ws][wl][0]+=wr[0],wa[ws][wl][1]+=wr[1];var wh={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]},wu=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],wc=function(){function t(t,e,n){var i;this.type="geoJSON",this._parsedMap=t9(),this._mapName=t,this._specialAreas=n,this._geoJSON=tG(i=e)?"u">typeof JSON&&JSON.parse?JSON.parse(i):Function("return ("+i+");")():i}return t.prototype.load=function(t,e){e=e||"name";var n=this._parsedMap.get(e);if(!n){var i=this._parseToRegions(e);n=this._parsedMap.set(e,{regions:i,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}(i)})}var r=t9(),o=[];return tP(n.regions,function(e){var n=e.name;t&&en(t,n)&&(e=e.cloneShallow(n=t[n])),o.push(e),r.set(n,e)}),{regions:o,boundingRect:n.boundingRect||new nu(0,0,0,0),regionsMap:r}},t.prototype._parseToRegions=function(t){var e,n,i=this._mapName,r=this._geoJSON;try{n=r?(e=r,tR(tE((e=function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;return null==e&&(e=1024),tP(t.features,function(t){var n=t.geometry,i=n.encodeOffsets,r=n.coordinates;if(i)switch(n.type){case"LineString":n.coordinates=wi(r,i,e);break;case"Polygon":case"MultiLineString":wn(r,i,e);break;case"MultiPolygon":tP(r,function(t,n){return wn(t,i[n],e)})}}),t.UTF8Encoding=!1,t}(e)).features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(e){var n=e.properties,i=e.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new b8(o[0],o.slice(1)));break;case"MultiPolygon":tP(i.coordinates,function(t){t[0]&&r.push(new b8(t[0],t.slice(1)))});break;case"LineString":r.push(new b6([i.coordinates]));break;case"MultiLineString":r.push(new b6(i.coordinates))}var a=new b9(n[t||"name"],r,n.cp);return a.properties=n,a})):[]}catch(t){throw Error("Invalid geoJson format\n"+t.message)}return!function(t,e){if("china"===t){for(var n=0;n<e.length;n++)if(e[n].name===wo)return;e.push(new b9(wo,tR(wa,function(t){return{type:"polygon",exterior:t}}),wr))}}(i,n),tP(n,function(t){var e=t.name;if("china"===i){var n=wh[t.name];if(n){var r=t.getCenter();r[0]+=n[0]/10.5,r[1]+=-n[1]/14,t.setCenter(r)}}"china"===i&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:wu[0]});var o=this._specialAreas&&this._specialAreas[e];o&&t.transformTo(o.left,o.top,o.width,o.height)},this),n},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}(),wd=t9(),wp=function(t,e,n){if(e.svg){var i=new we(t,e.svg);wd.set(t,i)}else{var r=e.geoJson||e.geoJSON;r&&!e.features?n=e.specialAreas:r=e;var i=new wc(t,r,n);wd.set(t,i)}},wf=function(t){return wd.get(t)},wg=function(t){var e=wd.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()},wm=function(t,e,n){var i=wd.get(t);return i?i.load(e,n):void 0},wy=["rect","circle","line","ellipse","polygon","polyline","path"],wv=t9(wy),w_=t9(wy.concat(["g"])),wb=t9(wy.concat(["g"])),ww=oi();function wS(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function wM(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var wC=function(){function t(t){var e=this.group=new rT,n=this._transformGroup=new rT;e.add(n),this.uid=lS("ec_map_draw"),this._controller=new bv(t.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new rT),n.add(this._svgGroup=new rT)}return t.prototype.draw=function(t,e,n,i,r){var o,a="geo"===t.mainType,s=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){s||e.getHostGeoModel()!==t||(s=e.getData())});var l=t.coordinateSystem,h=this._regionsGroup,u=this._transformGroup,c=l.getTransformInfo(),d=c.raw,p=c.roam,f=!h.childAt(0)||r;t.getShallow("clip",!0)?(o=l.getViewRect().clone(),this.group.setClipPath(new aq({shape:o.clone()}))):this.group.removeClipPath(),f?(u.x=p.x,u.y=p.y,u.scaleX=p.scaleX,u.scaleY=p.scaleY,u.dirty()):sJ(u,p,t);var g=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,m={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:g,isGeo:a,transformInfoRaw:d};"geoJSON"===l.resourceType?this._buildGeoJSON(m):"geoSVG"===l.resourceType&&this._buildSVG(m),this._updateController(t,o,e,n),this._updateMapSelectHandler(t,h,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=t9(),n=t9(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function h(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function u(t){return{shape:{points:function(t){for(var e=[],n=!l&&s&&s.project,i=0;i<t.length;++i){var r=h(t[i],n);r&&e.push(r)}return e}(t)}}}i.removeAll(),tP(t.geo.regions,function(r){var c=r.name,d=e.get(c),p=n.get(c)||{},f=p.dataIdx,g=p.regionModel;if(!d){d=e.set(c,new rT),i.add(d),f=a?a.indexOfName(c):null;var m=(g=t.isGeo?o.getRegionModel(c):a?a.getItemModel(f):null).get("silent",!0);null!=m&&(d.silent=m),n.set(c,{dataIdx:f,regionModel:g})}var y=[],v=[];tP(r.geometries,function(t){if("polygon"===t.type){var e=[t.exterior].concat(t.interiors||[]);l&&(e=wL(e,l)),tP(e,function(t){y.push(new dg(u(t)))})}else{var n=t.points;l&&(n=wL(n,l,!0)),tP(n,function(t){v.push(new dv(u(t)))})}});var x=h(r.getCenter(),s&&s.project);function _(e,n){if(e.length){var i=new dL({culling:!0,segmentIgnoreThreshold:1,shape:{paths:e}});d.add(i),wk(t,i,f,g),wT(t,i,c,g,o,f,x),n&&(wM(i),tP(i.states,wM))}}_(y),_(v,!0)}),e.each(function(e,i){var r=n.get(i),a=r.dataIdx,s=r.regionModel;wI(t,e,i,s,o,a),wA(t,e,i,s,o),wD(t,e,i,s,o)},this)},t.prototype._buildSVG=function(t){var e=t.geo.map,n=t.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var i=this._svgDispatcherMap=t9(),r=!1;tP(this._svgGraphicRecord.named,function(e){var n=e.name,o=t.mapOrGeoModel,a=t.data,s=e.svgNodeTagLower,l=e.el,h=a?a.indexOfName(n):null,u=o.getRegionModel(n);null!=wv.get(s)&&l instanceof o$&&wk(t,l,h,u),l instanceof o$&&(l.culling=!0);var c=u.get("silent",!0);null!=c&&(l.silent=c),l.z2EmphasisLift=0,e.namedFrom||(null!=wb.get(s)&&wT(t,l,n,u,o,h,null),wI(t,l,n,u,o,h),wA(t,l,n,u,o),null!=w_.get(s)&&("self"===wD(t,l,n,u,o)&&(r=!0),(i.get(n)||i.set(n,[])).push(l)))},this),this._enableBlurEntireSVG(r,t)},t.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var n=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(t){if(!t.isGroup){sI(t);var e=t.ensureState("blur").style||{};null==e.opacity&&null!=n&&(e.opacity=n),t.ensureState("emphasis")}})}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(t,e){if(null==t)return[];var n=e.coordinateSystem;if("geoJSON"===n.resourceType){var i=this._regionsGroupByName;if(i){var r=i.get(t);return r?[r]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},t.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},t.prototype._useSVG=function(t){var e=wf(t);if(e&&"geoSVG"===e.type){var n=e.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},t.prototype._freeSVG=function(){var t=this._svgMapName;if(null!=t){var e=wf(t);e&&"geoSVG"===e.type&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(t,e,n,i){var r=t.coordinateSystem,o=this._controller,a=this._controllerHost;a.zoomLimit=t.get("scaleLimit"),a.zoom=r.getZoom(),o.enable(t.get("roam")||!1,{api:i,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(t,e,n){return r.containPoint([e,n])},isInClip:function(t,n,i){return!e||e.contain(n,i)}}});var s=t.mainType;function l(){var e={type:"geoRoam",componentType:s};return e[s+"Id"]=t.id,e}o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,bk(a,t.dx,t.dy),i.dispatchAction(tI(l(),{dx:t.dx,dy:t.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(t){this._mouseDownFlag=!1,bT(a,t.scale,t.originX,t.originY),i.dispatchAction(tI(l(),{totalZoom:a.zoom,zoom:t.scale,originX:t.originX,originY:t.originY,animation:{duration:0}}))},this)},t.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=ww(e).ignore)})},t.prototype._updateMapSelectHandler=function(t,e,n,i){var r=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){r._mouseDownFlag=!0}),e.on("click",function(t){r._mouseDownFlag&&(r._mouseDownFlag=!1)}))},t}();function wk(t,e,n,i){var r=i.getModel("itemStyle"),o=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=wS(r),h=wS(o),u=wS(s),c=wS(a),d=t.data;if(d){var p=d.getItemVisual(n,"style"),f=d.getItemVisual(n,"decal");t.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),f&&(l.decal=fH(f,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=h,e.ensureState("select").style=u,e.ensureState("blur").style=c,sI(e)}function wT(t,e,n,i,r,o,a){var s=t.data,l=t.isGeo,h=s&&isNaN(s.get(s.mapDimension("value"),o)),u=s&&s.getItemLayout(o);if(l||h||u&&u.showLabel){var c=l?n:o,d=void 0;(!s||o>=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;s9(e,s7(i),{labelFetcher:d,labelDataIndex:c,defaultText:n},p);var f=e.getTextContent();if(f&&(ww(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function wI(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):si(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function wA(t,e,n,i,r){t.data||pu({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function wD(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o,a=i.getModel("emphasis"),s=a.get("focus");return sF(e,s,a.get("blurScope"),a.get("disabled")),t.isGeo&&((o=si(e)).componentMainType=r.mainType,o.componentIndex=r.componentIndex,o.componentHighDownName=n),s}function wL(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return n||s.polygonStart(),tP(t,function(t){s.lineStart();for(var e=0;e<t.length;e++)s.point(t[e][0],t[e][1]);s.lineEnd()}),n||s.polygonEnd(),r}var wO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&"geoRoam"===i.type&&this._mapDraw.resetForLabelLayout(),i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id){var o=this._mapDraw;o&&r.add(o.group)}else if(t.needsDrawMap){var o=this._mapDraw||new wC(n);r.add(o.group),o.draw(t,e,n,this,i),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,n){var i=t.originalData,r=this.group;i.each(i.mapDimension("value"),function(e,n){if(!isNaN(e)){var o=i.getItemLayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new c0({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+11*!s});if(!s){var h=t.mainSeries.getData(),u=i.getName(n),c=h.indexOfName(u),d=i.getItemModel(n),p=d.getModel("label"),f=h.getItemGraphicEl(c);s9(l,s7(d),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(c,n)}},defaultText:u}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(t){sk(l,t)}}r.add(l)}}})},e.type="map",e}(pw),wP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.getCenter())}},n}return to(e,t),e.prototype.getInitialData=function(t){for(var e=vH(this,{coordDimensions:["value"],encodeDefaulter:tF(hH,this)}),n=t9(),i=[],r=0,o=e.count();r<o;r++){var a=e.getName(r);n.set(a,r)}return tP(wm(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(t){var r,o=t.name,a=n.get(o),s=t.properties&&t.properties.echartsStyle;null==a?(r={name:o},i.push(r)):r=e.getRawDataItem(a),s&&tk(r,s)}),e.appendData(i),e},e.prototype.getHostGeoModel=function(){if(2!==hn(this).kind)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData(),r=this.getRawValue(t),o=i.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var h=a[l].originalData.indexOfName(o),u=i.mapDimension("value");isNaN(a[l].originalData.get(u,h))||s.push(a[l].name)}return ch("section",{header:s.join(", "),noHeader:!s.length,blocks:[ch("nameValue",{name:o,value:r})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var e=t.icon||"roundRect",n=fg(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill=hS.color.neutral00,n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:hS.color.tertiary},itemStyle:{borderWidth:.5,borderColor:hS.color.border,areaColor:hS.color.background},emphasis:{label:{show:!0,color:hS.color.primary},itemStyle:{areaColor:hS.color.highlight}},select:{label:{show:!0,color:hS.color.primary},itemStyle:{color:hS.color.highlight}},nameProperty:"name"},e}(cS);function wR(t){var e={};t.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),tP(e,function(t,e){for(var n,i,r,o=(n=tR(t,function(t){return t.getData()}),i=t[0].get("mapValueCalculation"),r={},tP(n,function(t){t.each(t.mapDimension("value"),function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)})}),n[0].map(n[0].mapDimension("value"),function(t,e){for(var o,a="ec-"+n[0].getName(e),s=0,l=1/0,h=-1/0,u=r[a].length,c=0;c<u;c++)l=Math.min(l,r[a][c]),h=Math.max(h,r[a][c]),s+=r[a][c];return o="min"===i?l:"max"===i?h:"average"===i?s/u:s,0===u?NaN:o})),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(var a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=0===a&&!t[a].getHostGeoModel(),t[a].setData(o.cloneShallow()),t[a].mainSeries=t[0]})}function wN(t){var e={};t.eachSeriesByType("map",function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!e[i]){var r={};tP(n.seriesGroup,function(e){var n=e.coordinateSystem,i=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&i.each(i.mapDimension("value"),function(t,e){var o=i.getName(e),a=n.getRegion(o);if(!(!a||isNaN(t))){var s=r[o]||0,l=n.dataToPoint(a.getCenter());r[o]=s+1,i.setItemLayout(e,{point:l,offset:s})}})});var o=n.getData();o.each(function(t){var e=o.getName(t),n=o.getItemLayout(t)||{};n.showLabel=!r[e],o.setItemLayout(t,n)}),e[i]=!0}})}var wE=function(t){function e(e,n){var i=t.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new ri,i._rawTransformable=new ri,i.name=e,i._opt=n,i}return to(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new nu(t,e,n,i),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new nu(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new nu(t,e,n,i));var a=o.parent;o.parent=null,o.decomposeTransform(),o.parent=a,this._updateTransform()},e.prototype.setCenter=function(t){var e=this._opt;e&&e.api&&e.ecModel&&e.ecModel.getShallow("legacyViewCoordSysCenterBase")&&t&&(t=[rE(t[0],e.api.getWidth()),rE(t[1],e.api.getWidth())]),this._centerOption=tC(t),this._updateCenterAndZoom()},e.prototype.setZoom=function(t){this._zoom=bO(t||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._centerOption,e=this._rect;t&&e&&(this._center=[rE(t[0],e.width,e.x),rE(t[1],e.height,e.y)]);var n=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,r=this.getDefaultCenter(),o=this.getCenter(),a=this.getZoom();o=ev([],o,n),r=ev([],r,n),i.originX=o[0],i.originY=o[1],i.x=r[0]-o[0],i.y=r[1]-o[1],i.scaleX=i.scaleY=a,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),eq(this.transform||(this.transform=[]),e.transform||eX()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],e0(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new ri;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?ev(n,t,i):ea(n,t)},e.prototype.pointToData=function(t,e,n){n=n||[];var i=this.invTransform;return i?ev(n,t,i):(n[0]=t[0],n[1]=t[1],n)},e.prototype.convertToPixel=function(t,e,n){var i=wB(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=wB(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(ri);function wB(t){var e=t.seriesModel;return e?e.coordinateSystem:null}var wz={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},wV=["lng","lat"],wF=function(t){function e(e,n,i){var r,o=t.call(this,e,{api:i.api,ecModel:i.ecModel})||this;o.dimensions=wV,o.type="geo",o._nameCoordMap=t9(),o.map=n;var a=i.projection,s=wm(n,i.nameMap,i.nameProperty),l=wf(n);o.resourceType=l?l.type:null;var h=o.regions=s.regions,u=wz[l.type];if(o._regionsMap=s.regionsMap,o.regions=s.regions,o.projection=a,a)for(var c=0;c<h.length;c++){var d=h[c].getBoundingRect(a);(r=r||d.clone()).union(d)}else r=s.boundingRect;return o.setBoundingRect(r.x,r.y,r.width,r.height),o.aspectScale=a?1:tJ(i.aspectScale,u.aspectScale),o._invertLongitute=!a&&u.invertLongitute,o}return to(e,t),e.prototype._transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._invertLongitute;r=r.clone(),o&&(r.y=-r.y-r.height);var a=this._rawTransformable;a.transform=r.calculateTransform(new nu(t,e,n,i));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,o&&(a.scaleY=-a.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var e=this.regions,n=0;n<e.length;n++){var i=e[n];if("geoJSON"===i.type&&i.contain(t))return e[n]}},e.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},e.prototype.getGeoCoord=function(t){var e=this._regionsMap.get(t);return this._nameCoordMap.get(t)||e&&e.getCenter()},e.prototype.dataToPoint=function(t,e,n){if(tG(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,e,n)}},e.prototype.pointToData=function(t,e,n){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t,n)},e.prototype.pointToProjected=function(e,n){return t.prototype.pointToData.call(this,e,0,n)},e.prototype.projectedToPoint=function(e,n,i){return t.prototype.dataToPoint.call(this,e,n,i)},e.prototype.convertToPixel=function(t,e,n){var i=wW(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=wW(e);return i===this?i.pointToData(n):null},e}(wE);function wW(t){var e=t.geoModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",os).models[0]||{}).coordinateSystem:null}function wH(t,e){var n,i,r,o=t.get("boundingCoords");if(null!=o){var a=o[0],s=o[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])){var l=this.projection;if(l){var h=a[0],u=a[1],c=s[0],d=s[1];a=[1/0,1/0],s=[-1/0,-1/0];var p=function(t,e,n,i){for(var r=n-t,o=i-e,h=0;h<=100;h++){var u=h/100,c=l.project([t+r*u,e+o*u]);ex(a,a,c),e_(s,s,c)}};p(h,u,c,u),p(c,u,c,d),p(c,d,h,d),p(h,d,c,u)}this.setBoundingRect(a[0],a[1],s[0]-a[0],s[1]-a[1])}}var f=this.getBoundingRect(),g=t.get("layoutCenter"),m=t.get("layoutSize"),y=hp(t,e).refContainer,v=f.width/f.height*this.aspectScale,x=!1;if(g&&m&&(n=[rE(g[0],y.width)+y.x,rE(g[1],y.height)+y.y],i=rE(m,Math.min(y.width,y.height)),isNaN(n[0])||isNaN(n[1])||isNaN(i)||(x=!0)),x)r={},v>1?(r.width=i,r.height=i/v):(r.height=i,r.width=i*v),r.y=n[1]-r.height/2,r.x=n[0]-r.width/2;else{var _=t.getBoxLayoutParams();_.aspect=v,r=hc(t,r=hu(_,y),v)}this.setViewRect(r.x,r.y,r.width,r.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}tL(wF,wE);var wG=new(function(){function t(){this.dimensions=wV}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",function(r,o){var a=r.get("map"),s=new wF(a+o,a,tI({nameMap:r.get("nameMap"),api:e,ecModel:t},i(r)));s.zoomLimit=r.get("scaleLimit"),n.push(s),r.coordinateSystem=s,s.model=r,s.resize=wH,s.resize(r,e)}),t.eachSeries(function(t){hi({targetModel:t,coordSysType:"geo",coordSysProvider:function(){var e="map"===t.subType?t.getHostGeoModel():t.getReferringComponents("geo",os).models[0];return e&&e.coordinateSystem},allowNotFound:!0})});var r={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}}),tP(r,function(r,o){var a=new wF(o,o,tI({nameMap:tT(tR(r,function(t){return t.get("nameMap")})),api:e,ecModel:t},i(r[0])));a.zoomLimit=t$.apply(null,tR(r,function(t){return t.get("scaleLimit")})),n.push(a),a.resize=wH,a.resize(r[0],e),tP(r,function(t){t.coordinateSystem=a,tP(t.get("geoCoord"),function(t,e){a.addGeoCoord(e,t)})})}),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=t9(),a=0;a<r.length;a++)o.set(r[a].name,r[a]);return tP(wm(e,n,i).regions,function(t){var e=t.name,n=o.get(e),i=t.properties&&t.properties.echartsStyle;n||(n={name:e},r.push(n)),i&&tk(n,i)}),r},t}()),wU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n);var i=wf(t.map);if(i&&"geoJSON"===i.type){var r=t.itemStyle=t.itemStyle||{};"color"in r||(r.color=t.defaultItemStyleColor||hS.color.backgroundTint)}r5(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,e=this.option;e.regions=wG.getFilledRegions(e.regions,e.map,e.nameMap,e.nameProperty);var n={};this._optionModelMap=tN(e.regions||[],function(e,i){var r=i.name;return r&&(e.set(r,new lb(i,t,t.ecModel)),i.selected&&(n[r]=!0)),e},t9()),e.selectedMap||(e.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new lb(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,e){var n=this.getRegionModel(t),i="normal"===e?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),r={name:t};return tH(i)?(r.status=e,i(r)):tG(i)?i.replace("{a}",null!=t?t:""):void 0},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var e=this.option,n=e.selectedMode;n&&("multiple"!==n&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},e.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var e=this.option.selectedMap;return!!(e&&e[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:hS.color.tertiary},itemStyle:{borderWidth:.5,borderColor:hS.color.border},emphasis:{label:{show:!0,color:hS.color.primary},itemStyle:{color:hS.color.highlight}},select:{label:{show:!0,color:hS.color.primary},itemStyle:{color:hS.color.highlight}},regions:[]},e}(h_),wj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.focusBlurEnabled=!0,n}return to(e,t),e.prototype.init=function(t,e){this._api=e},e.prototype.render=function(t,e,n,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new wC(n));var r=this._mapDraw;r.draw(t,e,n,this,i),r.group.on("click",this._handleRegionClick,this),r.group.silent=t.get("silent"),this.group.add(r.group),this.updateSelectStatus(t,e,n)},e.prototype._handleRegionClick=function(t){var e;fi(t.target,function(t){return null!=(e=si(t).eventData)},!0),e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},e.prototype.updateSelectStatus=function(t,e,n){var i=this;this._mapDraw.group.traverse(function(t){var e=si(t).eventData;if(e)return i._model.isSelected(e.name)?n.enterSelect(t):n.leaveSelect(t),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(cL);function wY(t,e,n){wp(t,e,n)}function wX(t){function e(e,n){n.update="geo:updateSelectStatus",t.registerAction(n,function(t,n){var i={},r=[];return n.eachComponent({mainType:"geo",query:t},function(n){n[e](t.name),tP(n.coordinateSystem.regions,function(t){i[t.name]=n.isSelected(t.name)||!1});var o=[];tP(i,function(t,e){i[e]&&o.push(e)}),r.push({geoIndex:n.componentIndex,name:o})}),{selected:i,allSelected:r,name:t.name}})}t.registerCoordinateSystem("geo",wG),t.registerComponentModel(wU),t.registerComponentView(wj),t.registerImpl("registerMap",wY),t.registerImpl("getMap",function(t){return wg(t)}),e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e,n){var i=t.componentType;i||(null!=t.geoId?i="geo":null!=t.seriesId&&(i="series")),i||(i="series"),e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var r=bD(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===i&&tP(e.seriesGroup,function(t){t.setCenter(r.center),t.setZoom(r.zoom)})}})})}function wZ(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,r=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){!function(t){for(var e=t.children,n=e.length,i=0,r=0;--n>=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,h=o.hierNode.modifier,u=a.hierNode.modifier,c=s.hierNode.modifier;s=wJ(s),o=wQ(o),s&&o;){r=wJ(r),a=wQ(a),r.hierNode.ancestor=t;var d,p,f,g=s.hierNode.prelim+c-o.hierNode.prelim-h+i(s,o);g>0&&(function(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}((d=s,p=t,f=n,d.hierNode.ancestor.parentNode===p.parentNode?d.hierNode.ancestor:f),t,g),h+=g,l+=g),c+=s.hierNode.modifier,h+=o.hierNode.modifier,l+=r.hierNode.modifier,u+=a.hierNode.modifier}s&&!wJ(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!wQ(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=h-u,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function wq(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function wK(t){return arguments.length?t:w0}function w$(t,e){return{x:e*Math.cos(t-=Math.PI/2),y:e*Math.sin(t)}}function wJ(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function wQ(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function w0(t,e){return t.parentNode===e.parentNode?1:2}var w1=function(){this.parentPoint=[],this.childPoints=[]},w2=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:hS.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new w1},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i){t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]);return}var s=e.orient,l=+("TB"!==s&&"BT"!==s),h=1-l,u=rE(e.forkPosition,1),c=[];c[l]=r[l],c[h]=r[h]+(a[h]-r[h])*u,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;d<i-1;d++){var p=n[d];t.moveTo(p[0],p[1]),c[l]=p[l],t.lineTo(c[0],c[1])}},e}(aN),w5=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._mainGroup=new rT,n}return to(e,t),e.prototype.init=function(t,e){this._controller=new bv(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,n){var i=t.getData(),r=t.layoutInfo,o=this._mainGroup;"radial"===t.get("layout")?(o.x=r.x+r.width/2,o.y=r.y+r.height/2):(o.x=r.x,o.y=r.y),this._updateViewCoordSys(t,n),this._updateController(t,null,e,n);var a=this._data;i.diff(a).add(function(e){w3(i,e)&&w4(i,e,null,o,t)}).update(function(e,n){var r=a.getItemGraphicEl(n);if(!w3(i,e)){r&&w9(a,n,r,o,t);return}w4(i,e,r,o,t)}).remove(function(e){var n=a.getItemGraphicEl(e);n&&w9(a,e,n,o,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&i.eachItemGraphicEl(function(e,i){e.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:i})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,e){var n=t.getData(),i=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])});var r=[],o=[];o9(i,r,o);var a=this._min,s=this._max;o[0]-r[0]==0&&(r[0]=a?a[0]:r[0]-1,o[0]=s?s[0]:o[0]+1),o[1]-r[1]==0&&(r[1]=a?a[1]:r[1]-1,o[1]=s?s[1]:o[1]+1);var l=t.coordinateSystem=new wE(null,{api:e,ecModel:t.ecModel});l.zoomLimit=t.get("scaleLimit"),l.setBoundingRect(r[0],r[1],o[0]-r[0],o[1]-r[1]),l.setCenter(t.get("center")),l.setZoom(t.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=r,this._max=o},e.prototype._updateController=function(t,e,n,i){var r=this;bI(t,i,this.group,this._controller,this._controllerHost,e),this._controller.on("zoom",function(e){r._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),n=this._getNodeGlobalScale(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scaleX||1;return((e.getZoom()-1)*n+1)/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(pw);function w3(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)}function w4(t,e,n,i,r){var o=!n,a=t.tree.getNodeByDataIndex(e),s=a.getModel(),l=a.getVisual("style").fill,h=!1===a.isExpand&&0!==a.children.length?l:hS.color.neutral00,u=t.tree.root,c=a.parentNode===u?a:a.parentNode||a,d=t.getItemGraphicEl(c.dataIndex),p=c.getLayout(),f=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:p,g=a.getLayout();o?((n=new yb(t,e,null,{symbolInnerColor:h,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(t,e,null,{symbolInnerColor:h,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,i.add(n),t.setItemGraphicEl(e,n),n.__oldX=n.x,n.__oldY=n.y,sJ(n,{x:g.x,y:g.y},r);var m=n.getSymbolPath();if("radial"===r.get("layout")){var y=u.children[0],v=y.getLayout(),x=y.children.length,_=void 0,b=void 0;if(g.x===v.x&&!0===a.isExpand&&y.children.length){var w={x:(y.children[0].getLayout().x+y.children[x-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[x-1].getLayout().y)/2};(_=Math.atan2(w.y-v.y,w.x-v.x))<0&&(_=2*Math.PI+_),(b=w.x<v.x)&&(_-=Math.PI)}else(_=Math.atan2(g.y-v.y,g.x-v.x))<0&&(_=2*Math.PI+_),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(b=g.x<v.x)&&(_-=Math.PI):(b=g.x>v.x)||(_-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),C=M.get("rotate"),k=Math.PI/180*C,T=m.getTextContent();T&&(m.setTextConfig({position:M.get("position")||S,rotation:null==C?-_:k,origin:"center"}),T.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),A="relative"===I?t7(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():null;A&&(si(n).focus=A),function(t,e,n,i,r,o,a,s){var l=e.getModel(),h=t.get("edgeShape"),u=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===h)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new dT({shape:w7(u,c,d,r,r)})),sJ(g,{shape:w7(u,c,d,o,a)},t));else if("polyline"===h&&"orthogonal"===u&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var m=e.children,y=[],v=0;v<m.length;v++){var x=m[v].getLayout();y.push([x.x,x.y])}g||(g=i.__edge=new w2({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:c,forkPosition:p}})),sJ(g,{shape:{parentPoint:[a.x,a.y],childPoints:y}},t)}g&&!("polyline"===h&&!e.isExpand)&&(g.useStyle(tA({strokeNoScale:!0,fill:null},f)),sU(g,l,"lineStyle"),sI(g),s.add(g))}(r,a,u,n,f,p,g,i),n.__edge&&(n.onHoverStateChange=function(e){if("blur"!==e){var i=a.parentNode&&t.getItemGraphicEl(a.parentNode.dataIndex);i&&1===i.hoverState||sk(n.__edge,e)}})}function w8(t,e,n,i,r){var o=w6(e.tree.root,t),a=o.source,s=o.sourceLayout,l=e.getItemGraphicEl(t.dataIndex);if(l){var h=e.getItemGraphicEl(a.dataIndex).__edge,u=l.__edge||(!1===a.isExpand||1===a.children.length?h:void 0),c=i.get("edgeShape"),d=i.get("layout"),p=i.get("orient"),f=i.get(["lineStyle","curveness"]);u&&("curve"===c?s1(u,{shape:w7(d,p,f,s,s),style:{opacity:0}},i,{cb:function(){n.remove(u)},removeOpt:r}):"polyline"===c&&"orthogonal"===i.get("layout")&&s1(u,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},i,{cb:function(){n.remove(u)},removeOpt:r}))}}function w6(t,e){for(var n,i=e.parentNode===t?e:e.parentNode||e;null==(n=i.getLayout());)i=i.parentNode===t?i:i.parentNode||i;return{source:i,sourceLayout:n}}function w9(t,e,n,i,r){var o=t.tree.getNodeByDataIndex(e),a=w6(t.tree.root,o).sourceLayout,s={duration:r.get("animationDurationUpdate"),easing:r.get("animationEasingUpdate")};s1(n,{x:a.x+1,y:a.y+1},r,{cb:function(){i.remove(n),t.setItemGraphicEl(e,null)},removeOpt:s}),n.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:s}),o.children.forEach(function(e){w8(e,t,i,r,s)}),w8(o,t,i,r,s)}function w7(t,e,n,i,r){if("radial"===t){h=i.rawX,c=i.rawY,u=r.rawX;var o,a,s,l,h,u,c,d=r.rawY,p=w$(h,c),f=w$(h,c+(d-c)*n),g=w$(u,d+(c-d)*n),m=w$(u,d);return{x1:p.x||0,y1:p.y||0,x2:m.x||0,y2:m.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return h=i.x,c=i.y,u=r.x,d=r.y,("LR"===e||"RL"===e)&&(o=h+(u-h)*n,a=c,s=u+(h-u)*n,l=d),("TB"===e||"BT"===e)&&(o=h,a=c+(d-c)*n,s=u,l=d+(c-d)*n),{x1:h,y1:c,x2:u,y2:d,cpx1:o,cpy1:a,cpx2:s,cpy2:l}}var St=oi();function Se(t,e){var n;if(n=this,St(n).mainData===n){var i=tI({},St(this).datas);i[this.dataType]=e,Sa(e,i,t)}else Ss(e,this.dataType,St(this).mainData,t);return e}function Sn(t,e){return t.struct&&t.struct.update(),e}function Si(t,e){return tP(St(e).datas,function(n,i){n!==e&&Ss(n.cloneShallow(),i,e,t)}),e}function Sr(t){var e=St(this).mainData;return null==t||null==e?e:St(e).datas[t]}function So(){var t=St(this).mainData;return null==t?[{data:t}]:tR(tz(St(t).datas),function(e){return{type:e,data:St(t).datas[e]}})}function Sa(t,e,n){St(t).datas={},tP(e,function(e,i){Ss(e,i,t,n)})}function Ss(t,e,n,i){St(n).datas[e]=t,St(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Sr,t.getLinkedDataAll=So}var Sl=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Sa(e,n,t),tP(n,function(n){tP(e.TRANSFERABLE_METHODS,function(e){n.wrapMethod(e,tF(Se,t))})}),e.wrapMethod("cloneShallow",tF(Si,t)),tP(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,tF(Sn,t))}),t2(n[e.dataType]===e)},Sh=function(){function t(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(t,e,n){tH(t)&&(n=e,e=t,t=null),tG(t=t||{})&&(t={order:t});var i,r=t.order||"preorder",o=this[t.attr||"children"];"preorder"===r&&(i=e.call(n,this));for(var a=0;!i&&a<o.length;a++)o[a].eachNode(t,e,n);"postorder"===r&&e.call(n,this)},t.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var r=n[e].getNodeById(t);if(r)return r}},t.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var r=n[e].contains(t);if(r)return r}},t.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},t.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},t.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},t.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},t.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e}return -1},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),Su=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,n,i){var r=new t(n),o=[],a=1;!function t(e,n){var i,s,l,h=e.value;a=Math.max(a,tW(h)?h.length:1),o.push(e);var u=new Sh(r7(e.name,""),r);n?(i=u,l=(s=n).children,i.parentNode!==s&&(l.push(i),i.parentNode=s)):r.root=u,r._nodes.push(u);var c=e.children;if(c)for(var d=0;d<c.length;d++)t(c[d],u)}(e),r.root.updateDepthAndHeight(0);var s=new yu(yc(o,{coordDimensions:["value"],dimensionsCount:a}).dimensions,n);return s.initData(o),i&&i(s),Sl({mainData:s,struct:r,structAttr:"tree"}),r.update(),r},t}();function Sc(t,e,n){if(t&&tD(e,t.type)>=0){var i=n.getData().tree.root,r=t.targetNode;if(tG(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function Sd(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Sp(t,e){return tD(Sd(t),e)>=0}function Sf(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var Sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return to(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=new lb(t.leaves||{},this,this.ecModel),i=Su.createTree(e,this,function(t){t.wrapMethod("getItemModel",function(t,e){var r=i.getNodeByDataIndex(e);return r&&r.children.length&&r.isExpand||(t.parentModel=n),t})}),r=0;i.eachNode("preorder",function(t){t.depth>r&&(r=t.depth)});var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return i.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=o}),i.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return ch("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Sf(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:hS.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(cS);function Sm(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function Sy(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=hp(t,e).refContainer,i=hu(t.getBoxLayoutParams(),n);t.layoutInfo=i;var r=t.get("layout"),o=0,a=0,s=null;"radial"===r?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,s=wK(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,s=wK());var l=t.getData().tree.root,h=l.children[0];if(h){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var r=n.length,o=r-1;o>=0;o--){var a=n[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(l),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)r.push(a[s])}for(;i=o.pop();)e(i,n)}(h,wZ,s),l.hierNode.modifier=-h.hierNode.prelim,Sm(h,wq);var u=h,c=h,d=h;Sm(h,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>c.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)});var p=u===c?1:s(u,c)/2,f=p-u.getLayout().x,g=0,m=0,y=0,v=0;if("radial"===r)g=o/(c.getLayout().x+p+f),m=a/(d.depth-1||1),Sm(h,function(t){y=(t.getLayout().x+f)*g,v=(t.depth-1)*m;var e=w$(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)});else{var x=t.getOrient();"RL"===x||"LR"===x?(m=a/(c.getLayout().x+p+f),g=o/(d.depth-1||1),Sm(h,function(t){v=(t.getLayout().x+f)*m,y="LR"===x?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})):("TB"===x||"BT"===x)&&(g=o/(c.getLayout().x+p+f),m=a/(d.depth-1||1),Sm(h,function(t){y=(t.getLayout().x+f)*g,v="TB"===x?(t.depth-1)*m:a-(t.depth-1)*m,t.setLayout({x:y,y:v},!0)}))}}}(t,e)})}function Sv(t){t.eachSeriesByType("tree",function(t){var e=t.getData();e.tree.eachNode(function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();tI(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)})})}var Sx=["treemapZoomToNode","treemapRender","treemapMove"];function S_(t){var e=t.getData().tree,n={};e.eachNode(function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=hK(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)})}var Sb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return to(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function t(e){var n=0;tP(e.children,function(e){t(e);var i=e.value;tW(i)&&(i=i[0]),n+=i});var i=e.value;tW(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),tW(e.value)?e.value[0]=i:e.value=i}(n);var i=t.levels||[],r=new lb({itemStyle:this.designatedVisualItemStyle={}},this,e),o=tR((i=t.levels=function(t,e){var n,i,r=r2(e.get("color")),o=r2(e.get(["aria","decal","decals"]));if(r){tP(t=t||[],function(t){var e=new lb(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)});var a=t[0]||(t[0]={});return n||(a.color=r.slice()),!i&&o&&(a.decal=o.slice()),t}}(i,e))||[],function(t){return new lb(t,r,e)},this),a=Su.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=a.getNodeByDataIndex(e);return t.parentModel=(n?o[n.depth]:null)||r,t})});return a.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return ch("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=Sf(this.getData().tree.getNodeByDataIndex(e),this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},tI(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=t9(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){S_(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:hS.size.l,top:hS.size.xxxl,right:hS.size.l,bottom:hS.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:hS.size.m,emptyItemWidth:25,itemStyle:{color:hS.color.backgroundShade,textStyle:{color:hS.color.secondary}},emphasis:{itemStyle:{color:hS.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:hS.color.neutral00,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:hS.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(cS),Sw=function(){function t(t){this.group=new rT,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),h=s.getModel(["itemStyle","textStyle"]),u=hp(t,e).refContainer,c={left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},d={emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=hu(c,u);this._prepare(n,d,l),this._renderContent(t,d,p,a,s,l,h,i),hf(o,c,u)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=r7(i.getModel().get("name"),""),o=Math.max(n.getTextRect(r).width+16,e.emptyItemWidth);e.totalWidth+=o+8,e.renderList.push({node:i,text:r,width:o})}},t.prototype._renderContent=function(t,e,n,i,r,o,a,s){for(var l=0,h=e.emptyItemWidth,u=t.get(["breadcrumb","height"]),c=e.totalWidth,d=e.renderList,p=r.getModel("itemStyle").getItemStyle(),f=d.length-1;f>=0;f--){var g,m,y,v=d[f],x=v.node,_=v.width,b=v.text;c>n.width&&(c-=_-h,_=h,b=null);var w=new dg({shape:{points:function(t,e,n,i,r){var o=[[i?t:t-5,0],[t+e,0],[t+e,0+n],[i?t:t-5,0+n]];return r||o.splice(2,0,[t+e+5,0+n/2]),i||o.push([t,0+n/2]),o}(l,_,u,f===d.length-1,0===f)},style:tA(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new sn({style:lt(o,{text:b})}),textConfig:{position:"inside"},z2:1e5,onclick:tF(s,x)});w.disableLabelAnimation=!0,w.getTextContent().ensureState("emphasis").style=lt(a,{text:b}),w.ensureState("emphasis").style=p,sF(w,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(w),g=w,m=t,y=x,si(g).eventData={componentType:"series",componentSubType:"treemap",componentIndex:m.componentIndex,seriesIndex:m.seriesIndex,seriesName:m.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:y&&y.dataIndex,name:y&&y.name},treePathInfo:y&&Sf(y,m)},l+=_+8}},t.prototype.remove=function(){this.group.removeAll()},t}(),SS=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i<r;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},t}(),SM="label",SC="upperLabel",Sk=oM([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),ST=function(t){var e=Sk(t);return e.stroke=e.fill=e.lineWidth=null,e},SI=oi(),SA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._state="ready",n._storage=SD(),n}return to(e,t),e.prototype.render=function(t,e,n,i){if(!(0>tD(e.findComponents({mainType:"series",subType:"treemap",query:i}),t))){this.seriesModel=t,this.api=n,this.ecModel=e;var r=Sc(i,["treemapZoomToNode","treemapRootToNode"],t),o=i&&i.type,a=t.layoutInfo,s=!this._oldTree,l=this._storage,h="treemapRootToNode"===o&&r&&l?{rootNodeGroup:l.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,u=this._giveContainerGroup(a),c=t.get("animation"),d=this._doRender(u,t,h);!c||s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(u,d,t,h),this._resetController(n),this._renderBreadcrumb(t,n,r)}},e.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new rT,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},e.prototype._doRender=function(t,e,n){var i,r,o=e.getData().tree,a=this._oldTree,s=SD(),l=SD(),h=this._storage,u=[];!function t(i,r,o,a,c){function d(t){return t.getId()}function p(d,p){var f=null!=d?i[d]:null,g=null!=p?r[p]:null,m=function(t,e,n,i,r,o,a,s,l,h){if(a){var u=a.getLayout(),c=t.getData(),d=a.getModel();if(c.setItemGraphicEl(a.dataIndex,null),u&&u.isInView){var p=u.width,f=u.height,g=u.borderWidth,m=u.invisible,y=a.getRawIndex(),v=s&&s.getRawIndex(),x=a.viewChildren,_=u.upperHeight,b=x&&x.length,w=d.getModel("itemStyle"),S=d.getModel(["emphasis","itemStyle"]),M=d.getModel(["blur","itemStyle"]),C=d.getModel(["select","itemStyle"]),k=w.get("borderRadius")||0,T=V("nodeGroup",rT);if(T){if(l.add(T),T.x=u.x||0,T.y=u.y||0,T.markRedraw(),SI(T).nodeWidth=p,SI(T).nodeHeight=f,u.isAboveViewRoot)return T;var I=V("background",aq,h,20);I&&function(e,n,i){var r=si(n);if(r.dataIndex=a.dataIndex,r.seriesIndex=t.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:k}),m)E(n);else{n.invisible=!1;var o=a.getVisual("style"),s=o.stroke,l=ST(w);l.fill=s;var h=Sk(S);h.fill=S.get("borderColor");var u=Sk(M);u.fill=M.get("borderColor");var c=Sk(C);if(c.fill=C.get("borderColor"),i){var d=p-2*g;B(n,s,o.opacity,{x:g,y:0,width:d,height:_})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=h,n.ensureState("blur").style=u,n.ensureState("select").style=c,sI(n)}e.add(n)}(T,I,b&&u.upperLabelHeight);var A=d.getModel("emphasis"),D=A.get("focus"),L=A.get("blurScope"),O=A.get("disabled"),P="ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():D;if(b)sY(T)&&sj(T,!1),I&&(sj(I,!O),c.setItemGraphicEl(a.dataIndex,I),sW(I,P,L));else{var R=V("content",aq,h,30);R&&function(e,n){var i=si(n);i.dataIndex=a.dataIndex,i.seriesIndex=t.seriesIndex;var r=Math.max(p-2*g,0),o=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:r,height:o,r:k}),m)E(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,h=ST(w);h.fill=l,h.decal=s.decal;var u=Sk(S),c=Sk(M),d=Sk(C);B(n,l,s.opacity,null),n.setStyle(h),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,sI(n)}e.add(n)}(T,R),I.disableMorphing=!0,I&&sY(I)&&sj(I,!1),sj(T,!O),c.setItemGraphicEl(a.dataIndex,T);var N=d.getShallow("cursor");N&&R.attr("cursor",N),sW(T,P,L)}return T}}}function E(t){t.invisible||o.push(t)}function B(e,n,i,r){var o=d.getModel(r?SC:SM),s=r7(d.get("name"),null),l=o.getShallow("show");s9(e,s7(d,r?SC:SM),{defaultText:l?s:null,inheritColor:n,defaultOpacity:i,labelFetcher:t,labelDataIndex:a.dataIndex});var h=e.getTextContent();if(h){var c=h.style,p=t1(c.padding||0);r&&(e.setTextConfig({layoutRect:r}),h.disableLabelLayout=!0),h.beforeUpdate=function(){var t=Math.max((r?r.width:e.shape.width)-p[1]-p[3],0),n=Math.max((r?r.height:e.shape.height)-p[0]-p[2],0);(c.width!==t||c.height!==n)&&h.setStyle({width:t,height:n})},c.truncateMinChar=2,c.lineOverflow="truncate",z(c,r,u);var f=h.getState("emphasis");z(f?f.style:null,r,u)}}function z(e,n,i){var r=e?e.text:null;if(!n&&i.isLeafRoot&&null!=r){var o=t.get("drillDownIcon",!0);e.text=o?o+" "+r:r}}function V(t,o,s,l){var h,u,c,d=null!=v&&n[t][v],p=r[t];return d?(n[t][v]=null,h=p,u=d,c=h[y]={},u instanceof rT?(c.oldX=u.x,c.oldY=u.y):c.oldShape=tI({},u.shape)):m||((d=new o)instanceof o$&&(d.z2=100*s+l),function(t,e){var n=t[y]={},o=a.parentNode,s=e instanceof rT;if(o&&(!i||"drillDown"===i.direction)){var l=0,h=0,u=r.background[o.getRawIndex()];!i&&u&&u.oldShape&&(l=u.oldShape.width,h=u.oldShape.height),s?(n.oldX=0,n.oldY=h):n.oldShape={x:l,y:h,width:0,height:0}}n.fadein=!s}(p,d)),e[t][y]=d}}(e,l,h,n,s,u,f,g,o,c);m&&t(f&&f.viewChildren||[],g&&g.viewChildren||[],m,a,c+1)}a?(r=i,tP(i,function(t,e){t.isRemoved()||p(e,e)})):new m4(r,i,d,d).add(p).update(p).remove(tF(p,null)).execute()}(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=(i=h,r=SD(),i&&tP(i,function(t,e){var n=r[e];tP(t,function(t){t&&(n.push(t),SI(t).willDelete=!0)})}),r);if(this._oldTree=o,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=o.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:c,renderFinally:function(){tP(c,function(t){tP(t,function(t){t.parent&&t.parent.remove(t)})}),tP(u,function(t){t.invisible=!0,t.dirty()})}}},e.prototype._doAnimation=function(t,e,n,i){var r=n.get("animationDurationUpdate"),o=n.get("animationEasing"),a=(tH(r)?0:r)||0,s=(tH(o)?null:o)||"cubicOut",l=new SS;tP(e.willDeleteEls,function(t,e){tP(t,function(t,n){if(!t.invisible){var r,o=t.parent,h=SI(o);if(i&&"drillDown"===i.direction)r=o===i.rootNodeGroup?{shape:{x:0,y:0,width:h.nodeWidth,height:h.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;h.willDelete||(u=h.nodeWidth/2,c=h.nodeHeight/2),r="nodeGroup"===e?{x:u,y:c,style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}r&&l.add(t,r,a,0,s)}})}),tP(this._storage,function(t,n){tP(t,function(t,i){var r=e.lastsForAnimation[n][i],o={};r&&(t instanceof rT?null!=r.oldX&&(o.x=t.x,o.y=t.y,t.x=r.oldX,t.y=r.oldY):(r.oldShape&&(o.shape=tI({},t.shape),t.setShape(r.oldShape)),r.fadein?(t.setStyle("opacity",0),o.style={opacity:1}):1!==t.style.opacity&&(o.style={opacity:1})),l.add(t,o,a,0,s))})},this),this._state="animating",l.finished(tV(function(){this._state="ready",e.renderFinally()},this)).start()},e.prototype._resetController=function(t){var e=this,n=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var r=this.seriesModel;n||((n=this._controller=new bv(t.getZr())).on("pan",tV(this._onPan,this)),n.on("zoom",tV(this._onZoom,this))),n.enable(r.get("roam"),{api:t,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(t,n,i){var r=e._containerGroup;return!!r&&r.getBoundingRect().contain(n-r.x,i-r.y)}}}),i.zoomLimit=r.get("scaleLimit"),i.zoom=r.get("zoom")},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(e){var n=e.getLayout();n&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,i=t.scale;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var a=new nu(o.x,o.y,o.width,o.height),s=null,l=this._controllerHost;s=l.zoomLimit;var h=l.zoom=l.zoom||1;if(h*=i,s){var u=s.min||0;h=Math.max(Math.min(s.max||1/0,h),u)}var c=h/l.zoom;l.zoom=h;var d=this.seriesModel.layoutInfo;e-=d.x,n-=d.y;var p=eX();e$(p,p,[-e,-n]),eQ(p,p,[c,c]),e$(p,p,[e,n]),a.applyTransform(p),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&l6(a,s)}}}}},this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;!n&&((n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Sw(this.group))).render(t,e,n.node,function(e){"animating"!==i._state&&(Sp(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=SD(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0])||!(o[0]<=a.x+a.width)||!(a.y<=o[1])||!(o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}},this),n},e.type="treemap",e}(pw);function SD(){return{nodeGroup:[],background:[],content:[]}}var SL=function(){function t(e){var n,i,r=e.mappingMethod,o=e.type,a=this.option=tC(e);this.type=o,this.mappingMethod=r,this._normalizeData=SW[r];var s=t.visualHandlers[o];this.applyVisual=s.applyVisual,this.getColorMapper=s.getColorMapper,this._normalizedToVisual=s._normalizedToVisual[r],"piecewise"===r?(SO(a),i=(n=a).pieceList,n.hasSpecialVisual=!1,tP(i,function(t,e){t.originIndex=e,null!=t.visual&&(n.hasSpecialVisual=!0)})):"category"===r?a.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(tP(e,function(t,e){n[t]=e}),!tW(i)){var r=[];tY(i)?tP(i,function(t,e){var i=n[e];r[null!=i?i:-1]=t}):r[-1]=i,i=SF(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(a):SO(a,!0):(t2("linear"!==r||a.dataExtent),SO(a))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return tV(this._normalizeData,this)},t.listVisualTypes=function(){return tz(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){tY(t)?tP(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=tW(e)?[]:tY(e)?{}:(r=!0,null);return t.eachVisual(e,function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a}),o},t.retrieveVisuals=function(e){var n,i={};return e&&tP(t.visualHandlers,function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)}),n?i:null},t.prepareVisualTypes=function(t){if(tW(t))t=t.slice();else{if(!tY(t))return[];var e=[];tP(t,function(t,n){e.push(n)}),t=e}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},t.dependsOn=function(t,e){return"color"===e?!!(t&&0===t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;o<a;o++){var s=e[o].value;if(null!=s){if(s===t||tG(s)&&s===t+"")return o;n&&S(s,o)}}for(var o=0,a=e.length;o<a;o++){var l,h,u,c,d,p,f,g,m,y,v,x,_=e[o],b=_.interval,w=_.close;if(b){if(b[0]===-1/0){if(l=w[1],h=t,u=b[1],l?h<=u:h<u)return o}else if(b[1]===1/0){if(c=w[0],d=b[0],p=t,c?d<=p:d<p)return o}else{if(f=w[0],g=b[0],m=t,(f?g<=m:g<m)&&(y=w[1],v=t,x=b[1],y?v<=x:v<x))return o}n&&S(b[0],o),n&&S(b[1],o)}}if(n)return t===1/0?e.length-1:t===-1/0?0:i;function S(e,n){var o=Math.abs(e-t);o<r&&(r=o,i=n)}},t.visualHandlers={color:{applyVisual:SN("color"),getColorMapper:function(){var t=this.option;return tV("category"===t.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),SE.call(this,t)}:function(e,n,i){var r=!!i;return n||(e=this._normalizeData(e)),i=is(e,t.parsedVisual,i),r?i:iu(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return iu(is(t,this.option.parsedVisual),"rgba")},category:SE,piecewise:function(t,e){var n=SV.call(this,e);return null==n&&(n=iu(is(t,this.option.parsedVisual),"rgba")),n},fixed:SB}},colorHue:SP(function(t,e){return il(t,e)}),colorSaturation:SP(function(t,e){return il(t,null,e)}),colorLightness:SP(function(t,e){return il(t,null,null,e)}),colorAlpha:SP(function(t,e){return ih(t,e)}),decal:{applyVisual:SN("decal"),_normalizedToVisual:{linear:null,category:SE,piecewise:null,fixed:null}},opacity:{applyVisual:SN("opacity"),_normalizedToVisual:Sz([0,1])},liftZ:{applyVisual:SN("liftZ"),_normalizedToVisual:{linear:SB,category:SB,piecewise:SB,fixed:SB}},symbol:{applyVisual:function(t,e,n){n("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:SR,category:SE,piecewise:function(t,e){var n=SV.call(this,e);return null==n&&(n=SR.call(this,t)),n},fixed:SB}},symbolSize:{applyVisual:SN("symbolSize"),_normalizedToVisual:Sz([0,1])}},t}();function SO(t,e){var n=t.visual,i=[];tY(n)?tP(n,function(t){i.push(t)}):null!=n&&i.push(n),e||1!==i.length||({color:1,symbol:1}).hasOwnProperty(t.type)||(i[1]=i[0]),SF(t,i)}function SP(t){return{applyVisual:function(e,n,i){var r=this.mapValueToVisual(e);i("color",t(n("color"),r))},_normalizedToVisual:Sz([0,1])}}function SR(t){var e=this.option.visual;return e[Math.round(rN(t,[0,1],[0,e.length-1],!0))]||{}}function SN(t){return function(e,n,i){i(t,this.mapValueToVisual(e))}}function SE(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function SB(){return this.option.visual[0]}function Sz(t){return{linear:function(e){return rN(e,t,this.option.visual,!0)},category:SE,piecewise:function(e,n){var i=SV.call(this,n);return null==i&&(i=rN(e,t,this.option.visual,!0)),i},fixed:SB}}function SV(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=SL.findPieceIndex(t,n),r=n[i];if(r&&r.visual)return r.visual[this.type]}}function SF(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=tR(e,function(t){return ir(t)||[0,0,0,1]})),e}var SW={linear:function(t){return rN(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=SL.findPieceIndex(t,e,!0);if(null!=n)return rN(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:ei},SH=oi(),SG={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||function t(e,n,i,r){var o=e.getModel(),a=e.getLayout(),s=e.hostTree.data;if(a&&!a.invisible&&a.isInView){var l,h,u,c,d,p,f,g=o.getModel("itemStyle"),m=(l=g,h=n,u=r,c=tI({},h),d=u.designatedVisualItemStyle,tP(["color","colorAlpha","colorSaturation"],function(t){d[t]=h[t];var e=l.get(t);d[t]=null,null!=e&&(c[t]=e)}),c),y=s.ensureUniqueItemVisual(e.dataIndex,"style"),v=g.get("borderColor"),x=g.get("borderColorSaturation");null!=x&&(p=x,v=null!=(f=SU(m))?il(f,null,null,p):null),y.stroke=v;var _=e.viewChildren;if(_&&_.length){var b=function(t,e,n,i){if(i&&i.length){var r=SY(t,"color")||null!=n.color&&"none"!==n.color&&(SY(t,"colorAlpha")||SY(t,"colorSaturation"));if(r){var o=t.get("visualMin"),a=t.get("visualMax"),s=e.dataExtent.slice();null!=o&&o<s[0]&&(s[0]=o),null!=a&&a>s[1]&&(s[1]=a);var l=t.get("colorMappingBy"),h={type:r.name,dataExtent:s,visual:r.range};"color"===h.type&&("index"===l||"id"===l)?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var u=new SL(h);return SH(u).drColorMappingBy=l,u}}}(o,a,m,_);tP(_,function(e,n){if(e.depth>=i.length||e===i[e.depth]){var a=function(t,e,n,i,r,o){var a=tI({},e);if(r){var s=r.type,l="color"===s&&SH(r).drColorMappingBy,h="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(h)}return a}(o,m,e,n,b,r);t(e,a,i,r)}})}else y.fill=SU(m)}}(e,{},t.getViewRoot().getAncestors(),t)}};function SU(t){var e=Sj(t,"color");if(e){var n=Sj(t,"colorAlpha"),i=Sj(t,"colorSaturation");return i&&(e=il(e,null,null,i)),n&&(e=ih(e,n)),e}}function Sj(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function SY(t,e){var n=t.get(e);return tW(n)&&n.length?{name:e,range:n}:null}var SX=Math.max,SZ=Math.min,Sq=["itemStyle","borderWidth"],SK=["itemStyle","gapWidth"],S$=["upperLabel","show"],SJ=["upperLabel","height"],SQ={seriesType:"treemap",reset:function(t,e,n,i){var r=t.option,o=hp(t,n).refContainer,a=hu(t.getBoxLayoutParams(),o),s=r.size||[],l=rE(t$(a.width,s[0]),o.width),h=rE(t$(a.height,s[1]),o.height),u=i&&i.type,c=Sc(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===u||"treemapMove"===u?i.rootRect:null,p=t.getViewRoot(),f=Sd(p);if("treemapMove"!==u){var g="treemapZoomToNode"===u?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;for(var l=i*r,h=l*t.option.zoomToNodeRatio;o=a.parentNode;){for(var u=0,c=o.children,d=0,p=c.length;d<p;d++)u+=c[d].getValue();var f=a.getValue();if(0===f)return s;h*=u/f;var g=o.getModel(),m=g.get(Sq),y=Math.max(m,S1(g));(h+=4*m*m+(3*m+y)*Math.pow(h,.5))>0x1fffffffffffff&&(h=0x1fffffffffffff),a=o}h<l&&(h=l);var v=Math.pow(h/l,.5);return[i*v,r*v]}(t,c,p,l,h):d?[d.width,d.height]:[l,h],m=r.sort;m&&"asc"!==m&&"desc"!==m&&(m="desc");var y={squareRatio:r.squareRatio,sort:m,leafDepth:r.leafDepth};p.hostTree.clearLayouts();var v={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(v),function t(e,n,i,r){if(!e.isRemoved()){var o,a,s=e.getLayout();o=s.width,a=s.height;var l=e.getModel(),h=l.get(Sq),u=l.get(SK)/2,c=S1(l),d=Math.max(h,c),p=h-u,f=d-u;e.setLayout({borderWidth:h,upperHeight:d,upperLabelHeight:c},!0);var g=(o=SX(o-2*p,0))*(a=SX(a-p-f,0)),m=function(t,e,n,i,r,o){var a,s,l=t.children||[],h=i.sort;"asc"!==h&&"desc"!==h&&(h=null);var u=null!=i.leafDepth&&i.leafDepth<=o;if(r&&!u)return t.viewChildren=[];a=l=tE(l,function(t){return!t.isRemoved()}),(s=h)&&a.sort(function(t,e){var n="asc"===s?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0===n?"asc"===s?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n});var c=function(t,e,n){for(var i,r=0,o=0,a=e.length;o<a;o++)r+=e[o].getValue();var s=t.get("visualDimension");return e&&e.length?"value"===s&&n?(i=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&i.reverse()):(i=[1/0,-1/0],tP(e,function(t){var e=t.getValue(s);e<i[0]&&(i[0]=e),e>i[1]&&(i[1]=e)})):i=[NaN,NaN],{sum:r,dataExtent:i}}(e,l,h);if(0===c.sum||(c.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var h=r["asc"===i?a-l-1:l].getValue();h/n*e<o&&(s=l,n-=h)}return"asc"===i?r.splice(0,a-s):r.splice(s,a-s),n}(e,n,c.sum,h,l),0===c.sum))return t.viewChildren=[];for(var d=0,p=l.length;d<p;d++){var f=l[d].getValue()/c.sum*n;l[d].setLayout({area:f})}return u&&(l.length&&t.setLayout({isLeafRoot:!0},!0),l.length=0),t.viewChildren=l,t.setLayout({dataExtent:c.dataExtent},!0),l}(e,l,g,n,i,r);if(m.length){var y={x:p,y:f,width:o,height:a},v=SZ(o,a),x=1/0,_=[];_.area=0;for(var b=0,w=m.length;b<w;){var S=m[b];_.push(S),_.area+=S.getLayout().area;var M=function(t,e,n){for(var i=0,r=1/0,o=0,a=void 0,s=t.length;o<s;o++)(a=t[o].getLayout().area)&&(a<r&&(r=a),a>i&&(i=a));var l=t.area*t.area,h=e*e*n;return l?SX(h*i/l,l/(h*r)):1/0}(_,v,n.squareRatio);M<=x?(b++,x=M):(_.area-=_.pop().getLayout().area,S0(_,v,y,u,!1),v=SZ(y.width,y.height),_.length=_.area=0,x=1/0)}if(_.length&&S0(_,v,y,u,!0),!i){var C=l.get("childrenVisibleMin");null!=C&&g<C&&(i=!0)}for(var b=0,w=m.length;b<w;b++)t(m[b],n,i,r+1)}}}(p,y,!1,0),v=p.getLayout(),tP(f,function(t,e){var n=(f[e+1]||p).getValue();t.setLayout(tI({dataExtent:[n,n],borderWidth:0,upperHeight:0},v))})}var x=t.getData().tree.root;x.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;var r=n.node,o=r.getLayout();if(!o)return i;for(var a=[o.width/2,o.height/2],s=r;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}(a,d,c),!0),t.setLayoutInfo(a),function t(e,n,i,r,o){var a=e.getLayout(),s=i[o],l=s&&s===e;if((!s||l)&&(o!==i.length||e===r)){e.setLayout({isInView:!0,invisible:!l&&!n.intersect(a),isAboveViewRoot:l},!0);var h=new nu(n.x-a.x,n.y-a.y,n.width,n.height);tP(e.viewChildren||[],function(e){t(e,h,i,r,o+1)})}}(x,new nu(-a.x,-a.y,n.getWidth(),n.getHeight()),f,p,0)}};function S0(t,e,n,i,r){var o=+(e!==n.width),a=1-o,s=["x","y"],l=["width","height"],h=n[s[o]],u=e?t.area/e:0;(r||u>n[l[a]])&&(u=n[l[a]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],f={},g=u?p.getLayout().area/u:0,m=f[l[a]]=SX(u-2*i,0),y=n[s[o]]+n[l[o]]-h,v=c===d-1||y<g?y:g,x=f[l[o]]=SX(v-2*i,0);f[s[a]]=n[s[a]]+SZ(i,m/2),f[s[o]]=h+SZ(i,x/2),h+=v,p.setLayout(f,!0)}n[s[a]]+=u,n[l[a]]-=u}function S1(t){return t.get(S$)?t.get(SJ):0}function S2(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getGraph().data,r=n.mapArray(n.getName);i.filterSelf(function(t){var n=i.getItemModel(t).getShallow("category");if(null!=n){tj(n)&&(n=r[n]);for(var o=0;o<e.length;o++)if(!e[o].isSelected(n))return!1}return!0})})}function S5(t){var e={};t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getData(),r={};n.each(function(i){var o=n.getName(i);r["ec-"+o]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(o,e)),n.setItemVisual(i,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],h=0;h<l.length;h++){var u=a.getShallow(l[h],!0);null!=u&&n.setItemVisual(i,l[h],u)}}),n.count()&&i.each(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){tG(e)&&(e=r["ec-"+e]);var o=n.getItemVisual(e,"style");tI(i.ensureUniqueItemVisual(t,"style"),o);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)i.setItemVisual(t,a[s],n.getItemVisual(e,a[s]))}})})}function S3(t){return t instanceof Array||(t=[t,t]),t}function S4(t){t.eachSeriesByType("graph",function(t){var e=t.getGraph(),n=t.getEdgeData(),i=S3(t.get("edgeSymbol")),r=S3(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(t){var i=n.getItemModel(t),r=e.getEdgeByIndex(t),o=S3(i.getShallow("symbol",!0)),a=S3(i.getShallow("symbolSize",!0)),s=i.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(t,"style");switch(tI(l,s),l.stroke){case"source":var h=r.node1.getVisual("style");l.stroke=h&&h.fill;break;case"target":var h=r.node2.getVisual("style");l.stroke=h&&h.fill}o[0]&&r.setVisual("fromSymbol",o[0]),o[1]&&r.setVisual("toSymbol",o[1]),a[0]&&r.setVisual("fromSymbolSize",a[0]),a[1]&&r.setVisual("toSymbolSize",a[1])})})}var S8=function(t){return t.get("autoCurveness")||null},S6=function(t,e){var n=S8(t),i=20,r=[];if(tj(n))i=n;else if(tW(n)){t.__curvenessList=n;return}e>i&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a<o;a++)r.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=r},S9=function(t,e,n){var i=[t.id,t.dataIndex].join("."),r=[e.id,e.dataIndex].join(".");return[n.uid,i,r].join("--\x3e")},S7=function(t){var e=t.split("--\x3e");return[e[0],e[2],e[1]].join("--\x3e")},Mt=function(t,e){var n=S9(t.node1,t.node2,e);return e.__edgeMap[n]},Me=function(t,e){var n=e.__edgeMap;return n[t]?n[t].length:0};function Mn(t,e,n,i){var r=S8(e),o=tW(r);if(!r)return null;var a=Mt(t,e);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var h=Me(S9(t.node1,t.node2,e),e)+Me(S9(t.node2,t.node1,e),e);S6(e,h),t.lineStyle=t.lineStyle||{};var u=S9(t.node1,t.node2,e),c=e.__curvenessList,d=o||h%2?0:1;if(a.isForward)return c[d+s];var p=Me(S7(u),e),f=c[s+p+d];return i?o?r&&0===r[0]?(p+d)%2?f:-f:((p%2?0:1)+d)%2?f:-f:(p+d)%2?f:-f:c[s+p+d]}function Mi(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),Mr(n,t)}}function Mr(t,e){t.eachEdge(function(t,n){var i=tQ(t.getModel().get(["lineStyle","curveness"]),-Mn(t,e,n,!0),0),r=es(t.node1.getLayout()),o=es(t.node2.getLayout()),a=[r,o];+i&&a.push([(r[0]+o[0])/2-(r[1]-o[1])*i,(r[1]+o[1])/2-(o[0]-r[0])*i]),t.setLayout(a)})}function Mo(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),r=[];tP(n.dimensions,function(t){r=r.concat(i.mapDimensionsAll(t))});for(var o=0;o<i.count();o++){for(var a=[],s=!1,l=0;l<r.length;l++){var h=i.get(r[l],o);isNaN(h)||(s=!0),a.push(h)}s?i.setItemLayout(o,n.dataToPoint(a)):i.setItemLayout(o,[NaN,NaN])}Mr(i.graph,t)}else e&&"none"!==e||Mi(t)})}function Ma(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,i=e.scaleX;return((e.getZoom()-1)*n+1)/i}function Ms(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Ml=Math.PI,Mh=[];function Mu(t,e,n,i){var r=t.coordinateSystem;if(!r||"view"===r.type){var o=r.getBoundingRect(),a=t.getData(),s=a.graph,l=o.width/2+o.x,h=o.height/2+o.y,u=Math.min(o.width,o.height)/2,c=a.count();if(a.setLayout({cx:l,cy:h}),c){if(n){var d=r.pointToData(i),p=[d[0]-l,d[1]-h];ef(p,p),ep(p,p,u),n.setLayout([l+p[0],h+p[1]],!0),Md(n,t.get(["circular","rotateLabel"]),l,h)}Mc[e](t,s,a,u,l,h,c),s.eachEdge(function(e,n){var i,r=tQ(e.getModel().get(["lineStyle","curveness"]),Mn(e,t,n),0),o=es(e.node1.getLayout()),a=es(e.node2.getLayout()),s=(o[0]+a[0])/2,u=(o[1]+a[1])/2;+r&&(r*=3,i=[l*r+s*(1-r),h*r+u*(1-r)]),e.setLayout([o,a,i])})}}}var Mc={value:function(t,e,n,i,r,o,a){var s=0,l=n.getSum("value"),h=2*Math.PI/(l||a);e.eachNode(function(t){var e=t.getValue("value"),n=h*(l?e:1)/2;s+=n,t.setLayout([i*Math.cos(s)+r,i*Math.sin(s)+o]),s+=n})},symbolSize:function(t,e,n,i,r,o,a){var s=0;Mh.length=a;var l=Ma(t);e.eachNode(function(t){var e=Ms(t);isNaN(e)&&(e=2),e<0&&(e=0);var n=Math.asin((e*=l)/2/i);isNaN(n)&&(n=Ml/2),Mh[t.dataIndex]=n,s+=2*n});var h=(2*Ml-s)/a/2,u=0;e.eachNode(function(t){var e=h+Mh[t.dataIndex];u+=e,t.getLayout()&&t.getLayout().fixed||t.setLayout([i*Math.cos(u)+r,i*Math.sin(u)+o]),u+=e})}};function Md(t,e,n,i){var r=t.getGraphicEl();if(r){var o=t.getModel().get(["label","rotate"])||0,a=r.getSymbolPath();if(e){var s=t.getLayout(),l=Math.atan2(s[1]-i,s[0]-n);l<0&&(l=2*Math.PI+l);var h=s[0]<n;h&&(l-=Math.PI);var u=h?"left":"right";a.setTextConfig({rotation:-l,position:u,origin:"center"});var c=a.ensureState("emphasis");tI(c.textConfig||(c.textConfig={}),{position:u})}else a.setTextConfig({rotation:o*=Math.PI/180})}}function Mp(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&Mu(t,"symbolSize")})}function Mf(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var n=t.preservedPoints||{},i=t.getGraph(),r=i.data,o=i.edgeData,a=t.getModel("force"),s=a.get("initLayout");t.preservedPoints?r.each(function(t){var e=r.getId(t);r.setItemLayout(t,n[e]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&Mu(t,"value"):Mi(t);var l=r.getDataExtent("value"),h=o.getDataExtent("value"),u=a.get("repulsion"),c=a.get("edgeLength"),d=tW(u)?u:[u,u],p=tW(c)?c:[c,c];p=[p[1],p[0]];var f=r.mapArray("value",function(t,e){var n=r.getItemLayout(e),i=rN(t,l,d);return isNaN(i)&&(i=(d[0]+d[1])/2),{w:i,rep:i,fixed:r.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),g=o.mapArray("value",function(e,n){var r=i.getEdgeByIndex(n),o=rN(e,h,p);isNaN(o)&&(o=(p[0]+p[1])/2);var a=r.getModel(),s=tQ(r.getModel().get(["lineStyle","curveness"]),-Mn(r,t,n,!0),0);return{n1:f[r.node1.dataIndex],n2:f[r.node2.dataIndex],d:o,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}}),m=function(t,e,n){for(var i,r,o=n.rect,a=o.width,s=o.height,l=[o.x+a/2,o.y+s/2],h=null==n.gravity?.1:n.gravity,u=0;u<t.length;u++){var c=t[u];c.p||(c.p=eo(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=es(c.p),c.edges=null}var d=null==n.friction?.6:n.friction,p=d;return{warmUp:function(){p=.8*d},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},beforeStep:function(t){i=t},afterStep:function(t){r=t},step:function(n){i&&i(t,e);for(var o=[],a=t.length,s=0;s<e.length;s++){var u=e[s];if(!u.ignoreForceLayout){var c=u.n1,d=u.n2;ec(o,d.p,c.p);var f=ed(o)-u.d,g=d.w/(c.w+d.w);isNaN(g)&&(g=0),ef(o,o),c.fixed||eu(c.p,c.p,o,g*f*p),d.fixed||eu(d.p,d.p,o,-(1-g)*f*p)}}for(var s=0;s<a;s++){var m=t[s];m.fixed||(ec(o,l,m.p),eu(m.p,m.p,o,h*p))}for(var s=0;s<a;s++)for(var c=t[s],y=s+1;y<a;y++){var d=t[y];ec(o,d.p,c.p);var f=ed(o);0===f&&(el(o,Math.random()-.5,Math.random()-.5),f=1);var v=(c.rep+d.rep)/f/f;c.fixed||eu(c.pp,c.pp,o,v),d.fixed||eu(d.pp,d.pp,o,-v)}for(var x=[],s=0;s<a;s++){var m=t[s];m.fixed||(ec(x,m.p,m.pp),eu(m.p,m.p,x,p),ea(m.pp,m.p))}var _=(p*=.992)<.01;r&&r(t,e,_),n&&n(_)}}}(f,g,{rect:e.getBoundingRect(),gravity:a.get("gravity"),friction:a.get("friction")});m.beforeStep(function(t,e){for(var n=0,r=t.length;n<r;n++)t[n].fixed&&ea(t[n].p,i.getNodeByIndex(n).getLayout())}),m.afterStep(function(t,e,o){for(var a=0,s=t.length;a<s;a++)t[a].fixed||i.getNodeByIndex(a).setLayout(t[a].p),n[r.getId(a)]=t[a].p;for(var a=0,s=e.length;a<s;a++){var l=e[a],h=i.getEdgeByIndex(a),u=l.n1.p,c=l.n2.p,d=h.getLayout();(d=d?d.slice():[])[0]=d[0]||[],d[1]=d[1]||[],ea(d[0],u),ea(d[1],c),+l.curveness&&(d[2]=[(u[0]+c[0])/2-(u[1]-c[1])*l.curveness,(u[1]+c[1])/2-(c[0]-u[0])*l.curveness]),h.setLayout(d)}}),t.forceLayout=m,t.preservedPoints=n,m.step()}else t.forceLayout=null})}function Mg(t,e){var n=[];return t.eachSeriesByType("graph",function(i){hi({targetModel:i,coordSysType:"view",coordSysProvider:function(){var r,o,a=i.getData(),s=a.mapArray(function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]}),l=[],h=[];o9(s,l,h),h[0]-l[0]==0&&(h[0]+=1,l[0]-=1),h[1]-l[1]==0&&(h[1]+=1,l[1]-=1);var u=(h[0]-l[0])/(h[1]-l[1]),c=(r=hp(i,e),o=hu(tI(i.getBoxLayoutParams(),{aspect:u}),r.refContainer),hc(i,o,u));isNaN(u)&&(l=[c.x,c.y],h=[c.x+c.width,c.y+c.height]);var d=h[0]-l[0],p=h[1]-l[1],f=new wE(null,{api:e,ecModel:t});return f.zoomLimit=i.get("scaleLimit"),f.setBoundingRect(l[0],l[1],d,p),f.setViewRect(c.x,c.y,c.width,c.height),f.setCenter(i.get("center")),f.setZoom(i.get("zoom")),n.push(f),f},isDefaultDataCoordSys:!0})}),n}var Mm=dw.prototype,My=dT.prototype,Mv=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function Mx(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}to(function(){return null!==p&&p.apply(this,arguments)||this},p=Mv);var M_=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return to(e,t),e.prototype.getDefaultStyle=function(){return{stroke:hS.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Mv},e.prototype.buildPath=function(t,e){Mx(e)?Mm.buildPath.call(this,t,e):My.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return Mx(this.shape)?Mm.pointAt.call(this,t):My.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=Mx(e)?[e.x2-e.x1,e.y2-e.y1]:My.tangentAt.call(this,t);return ef(n,n)},e}(aN),Mb=["fromSymbol","toSymbol"];function Mw(t){return"_"+t+"Type"}function MS(t,e,n){var i=e.getItemVisual(n,t);if(!i||"none"===i)return i;var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=fm(r),h=fy(a||0,l);return i+l+h+(o||"")+(s||"")}function MM(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=fm(r),h=fy(a||0,l),u=fg(i,-l[0]/2+h[0],-l[1]/2+h[1],l[0],l[1],null,s);return u.__specifiedRotation=null==o||isNaN(o)?void 0:o*Math.PI/180||0,u.name=t,u}}function MC(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var Mk=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createLine(e,n,i),r}return to(e,t),e.prototype._createLine=function(t,e,n){var i,r=t.hostModel,o=t.getItemLayout(e),a=t.getItemVisual(e,"z2"),s=(MC((i=new M_({name:"line",subPixelOptimize:!0})).shape,o),i);s.shape.percent=0,sQ(s,{z2:tJ(a,0),shape:{percent:1}},r,e),this.add(s),tP(Mb,function(n){var i=MM(n,t,e);this.add(i),this[Mw(n)]=MS(n,t,e)},this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};MC(a.shape,o),sJ(r,a,i,e),tP(Mb,function(n){var i=MS(n,t,e),r=Mw(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=MM(n,t,e);this.add(o)}this[r]=i},this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,u=n&&n.focus,c=n&&n.blurScope;if(!n||t.hasItemOption){var d=t.getItemModel(e),p=d.getModel("emphasis");o=p.getModel("lineStyle").getLineStyle(),a=d.getModel(["blur","lineStyle"]).getLineStyle(),s=d.getModel(["select","lineStyle"]).getLineStyle(),h=p.get("disabled"),u=p.get("focus"),c=p.get("blurScope"),l=s7(d)}var f=t.getItemVisual(e,"style"),g=f.stroke;r.useStyle(f),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,tP(Mb,function(t){var e=this.childOfName(t);if(e){e.setColor(g),e.style.opacity=f.opacity;for(var n=0;n<sh.length;n++){var i=sh[n],o=r.getState(i);if(o){var a=o.style||{},s=e.ensureState(i),l=s.style||(s.style={});null!=a.stroke&&(l[e.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}e.markRedraw()}},this);var m=i.getRawValue(e);s9(this,l,{labelDataIndex:e,labelFetcher:{getFormattedLabel:function(e,n){return i.getFormattedLabel(e,n,t.dataType)}},inheritColor:g||hS.color.neutral99,defaultOpacity:f.opacity,defaultText:(null==m?t.getName(e):isFinite(m)?rz(m):m)+""});var y=this.getTextContent();if(y){var v=l.normal;y.__align=y.style.align,y.__verticalAlign=y.style.verticalAlign,y.__position=v.get("position")||"middle";var x=v.get("distance");tW(x)||(x=[x,x]),y.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),sF(this,u,c,h)},e.prototype.highlight=function(){sL(this)},e.prototype.downplay=function(){sO(this)},e.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},e.prototype.setLinePoints=function(t){var e=this.childOfName("line");MC(e.shape,t),e.dirty()},e.prototype.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.getTextContent();if(t||e||n&&!n.ignore){for(var i=1,r=this.parent;r;)r.scaleX&&(i/=r.scaleX),r=r.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var a=o.shape.percent,s=o.pointAt(0),l=o.pointAt(a),h=ec([],l,s);if(ef(h,h),t&&(t.setPosition(s),w(t,0),t.scaleX=t.scaleY=i*a,t.markRedraw()),e&&(e.setPosition(l),w(e,1),e.scaleX=e.scaleY=i*a,e.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var u=void 0,c=void 0,d=n.__labelDistance,p=d[0]*i,f=d[1]*i,g=a/2,m=o.tangentAt(g),y=[m[1],-m[0]],v=o.pointAt(g);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=m[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var _=-Math.atan2(m[1],m[0]);l[0]<s[0]&&(_=Math.PI+_),n.rotation=_}var b=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-f,c="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=f,c="top";break;default:b=0,c="middle"}switch(n.__position){case"end":n.x=h[0]*p+l[0],n.y=h[1]*f+l[1],u=h[0]>.8?"left":h[0]<-.8?"right":"center",c=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":n.x=-h[0]*p+s[0],n.y=-h[1]*f+s[1],u=h[0]>.8?"right":h[0]<-.8?"left":"center",c=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*x+s[0],n.y=s[1]+b,u=m[0]<0?"right":"left",n.originX=-p*x,n.originY=-b;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=v[0],n.y=v[1]+b,u="center",n.originY=-b;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*x+l[0],n.y=l[1]+b,u=m[0]>=0?"right":"left",n.originX=p*x,n.originY=-b}n.scaleX=n.scaleY=i,n.setStyle({verticalAlign:n.__verticalAlign||c,align:n.__align||u})}}}function w(t,e){var n=t.__specifiedRotation;if(null==n){var i=o.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(rT),MT=function(){function t(t){this.group=new rT,this._LineCtor=t||Mk}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this.group,i=this._lineData;this._lineData=t,i||n.removeAll();var r=MI(t);t.diff(i).add(function(n){e._doAdd(t,n,r)}).update(function(n,o){e._doUpdate(i,t,o,n,r)}).remove(function(t){n.remove(i.getItemGraphicEl(t))}).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=MI(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){var e;t.isGroup||(e=t).animators&&e.animators.length>0||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i<t.end;i++)if(MD(e.getItemLayout(i))){var r=new this._LineCtor(e,i,this._seriesScope);r.traverse(n),this.group.add(r),e.setItemGraphicEl(i,r),this._progressiveEls.push(r)}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(t){pd(this._progressiveEls||this.group,t)},t.prototype._doAdd=function(t,e,n){if(MD(t.getItemLayout(e))){var i=new this._LineCtor(t,e,n);t.setItemGraphicEl(e,i),this.group.add(i)}},t.prototype._doUpdate=function(t,e,n,i,r){var o=t.getItemGraphicEl(n);MD(e.getItemLayout(i))?(o?o.updateData(e,i,r):o=new this._LineCtor(e,i,r),e.setItemGraphicEl(i,o),this.group.add(o)):this.group.remove(o)},t}();function MI(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:s7(e)}}function MA(t){return isNaN(t[0])||isNaN(t[1])}function MD(t){return t&&!MA(t[0])&&!MA(t[1])}var ML=[],MO=[],MP=[],MR=Math.abs;function MN(t,e,n){for(var i,r=t[0],o=t[1],a=t[2],s=1/0,l=n*n,h=.1,u=.1;u<=.9;u+=.1){ML[0]=nj(r[0],o[0],a[0],u),ML[1]=nj(r[1],o[1],a[1],u);var c=MR(em(ML,e)-l);c<s&&(s=c,i=u)}for(var d=0;d<32;d++){var p=i+h;MO[0]=nj(r[0],o[0],a[0],i),MO[1]=nj(r[1],o[1],a[1],i),MP[0]=nj(r[0],o[0],a[0],p),MP[1]=nj(r[1],o[1],a[1],p);var c=em(MO,e)-l;if(.01>MR(c))break;var f=em(MP,e)-l;h/=2,c<0?f>=0?i+=h:i-=h:f>=0?i-=h:i+=h}return i}function ME(t,e){var n=[],i=[[],[],[]],r=[[],[]],o=[];e/=2,t.eachEdge(function(t,a){var s=t.getLayout(),l=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");!s.__original&&(s.__original=[es(s[0]),es(s[1])],s[2]&&s.__original.push(es(s[2])));var u=s.__original;if(null!=s[2]){if(ea(i[0],u[0]),ea(i[1],u[2]),ea(i[2],u[1]),l&&"none"!==l){var c=Ms(t.node1),d=MN(i,u[0],c*e);nZ(i[0][0],i[1][0],i[2][0],d,n),i[0][0]=n[3],i[1][0]=n[4],nZ(i[0][1],i[1][1],i[2][1],d,n),i[0][1]=n[3],i[1][1]=n[4]}if(h&&"none"!==h){var c=Ms(t.node2),d=MN(i,u[1],c*e);nZ(i[0][0],i[1][0],i[2][0],d,n),i[1][0]=n[1],i[2][0]=n[2],nZ(i[0][1],i[1][1],i[2][1],d,n),i[1][1]=n[1],i[2][1]=n[2]}ea(s[0],i[0]),ea(s[1],i[2]),ea(s[2],i[1])}else{if(ea(r[0],u[0]),ea(r[1],u[1]),ec(o,r[1],r[0]),ef(o,o),l&&"none"!==l){var c=Ms(t.node1);eu(r[0],r[0],o,c*e)}if(h&&"none"!==h){var c=Ms(t.node2);eu(r[1],r[1],o,-c*e)}ea(s[0],r[0]),ea(s[1],r[1])}})}var MB=oi();function Mz(t,e){t&&(MB(t).bridge=e)}function MV(t){return"view"===t.type}var MF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(t,e){var n=new yk,i=new MT,r=this.group,o=new rT;this._controller=new bv(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),r.add(o),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=o,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=!1;this._model=t,this._api=n,this._active=!0;var a=this._getThumbnailInfo();a&&a.bridge.reset(n);var s=this._symbolDraw,l=this._lineDraw;if(MV(r)){var h={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?this._mainGroup.attr(h):sJ(this._mainGroup,h,t)}ME(t.getGraph(),Ma(t));var u=t.getData();s.updateData(u);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(null,t,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&(o=!0,this._startForceLayoutIteration(d,n,p));var f=t.get("layout");u.graph.eachNode(function(e){var r=e.dataIndex,o=e.getGraphicEl(),a=e.getModel();if(o){o.off("drag").off("dragend");var s=a.get("draggable");s&&o.on("drag",function(a){switch(f){case"force":d.warmUp(),i._layouting||i._startForceLayoutIteration(d,n,p),d.setFixed(r),u.setItemLayout(r,[o.x,o.y]);break;case"circular":u.setItemLayout(r,[o.x,o.y]),e.setLayout({fixed:!0},!0),Mu(t,"symbolSize",e,[a.offsetX,a.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(r,[o.x,o.y]),Mr(t.getGraph(),t),i.updateLayout(t)}}).on("dragend",function(){d&&d.setUnfixed(r)}),o.setDraggable(s,!!a.get("cursor")),"adjacency"===a.get(["emphasis","focus"])&&(si(o).focus=e.getAdjacentDataIndices())}}),u.graph.eachEdge(function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(si(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var g="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),m=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode(function(t){Md(t,g,m,y)}),this._firstRender=!1,o||this._renderThumbnail(t,n,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e,n){var i=this,r=!1;!function o(){t.step(function(t){i.updateLayout(i._model),(t||!r)&&(r=!0,i._renderThumbnail(i._model,e,i._symbolDraw,i._lineDraw)),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(o,16):o())})}()},e.prototype._updateController=function(t,e,n){var i=this._controller,r=this._controllerHost,o=e.coordinateSystem;MV(o)?(i.enable(e.get("roam"),{api:n,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(t,e,n){return o.containPoint([e,n])},isInClip:function(e,n,i){return!t||t.contain(n,i)}}}),r.zoomLimit=e.get("scaleLimit"),r.zoom=o.getZoom(),i.off("pan").off("zoom").on("pan",function(t){n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY})})):i.disable()},e.prototype.updateViewOnPan=function(t,e,n){this._active&&(bk(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,e,n){this._active&&(bT(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),ME(t.getGraph(),Ma(t)),this._lineDraw.updateLayout(),e.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=Ma(t);e.eachItemGraphicEl(function(t,e){t&&t.setSymbolScale(n)})},e.prototype.updateLayout=function(t){this._active&&(ME(t.getGraph(),Ma(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,e=t.coordinateSystem;if("view"===e.type){var n=function(t){if(t)return MB(t).bridge}(t);if(n)return{bridge:n,coordSys:e}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,e,n,i){var r=this._getThumbnailInfo();if(r){var o=new rT,a=n.group.children(),s=i.group.children(),l=new rT,h=new rT;o.add(h),o.add(l);for(var u=0;u<a.length;u++){var c=a[u],d=c.children()[0],p=c.x,f=c.y,g=tI(tC(d.shape),{width:d.scaleX,height:d.scaleY,x:p-d.scaleX/2,y:f-d.scaleY/2}),m=tC(d.style),y=new d.constructor({shape:g,style:m,z2:151});h.add(y)}for(var u=0;u<s.length;u++){var c=s[u],v=c.children()[0],m=tC(v.style),g=tC(v.shape),x=new M_({style:m,shape:g,z2:151});l.add(x)}r.bridge.renderContent({api:e,roamType:t.get("roam"),viewportRect:null,group:o,targetTrans:r.coordSys.transform})}},e.type="graph",e}(pw);function MW(t){return"_EC_"+t}var MH=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[MW(t)]){var i=new MG(t,e);return i.hostGraph=this,this.nodes.push(i),n[MW(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[MW(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if(tj(t)&&(t=this.nodes[t]),tj(e)&&(e=this.nodes[e]),t instanceof MG||(t=i[MW(t)]),e instanceof MG||(e=i[MW(e)]),t&&e){var o=t.id+"-"+e.id,a=new MU(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),r[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof MG&&(t=t.id),e instanceof MG&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r<i;r++)n[r].dataIndex>=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r<i;r++)n[r].dataIndex>=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof MG||(e=this._nodesMap[MW(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,e,null))for(var a=[e];a.length;)for(var s=a.shift(),l=s[r],o=0;o<l.length;o++){var h=l[o],u=h.node1===s?h.node2:h.node1;if(!u.__visited){if(t.call(i,u,s))return;a.push(u),u.__visited=!0}}}},t.prototype.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,r=0,o=n.length;r<o;r++)n[r].dataIndex=-1;for(var r=0,o=t.count();r<o;r++)n[t.getRawIndex(r)].dataIndex=r;e.filterSelf(function(t){var n=i[e.getRawIndex(t)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var r=0,o=i.length;r<o;r++)i[r].dataIndex=-1;for(var r=0,o=e.count();r<o;r++)i[e.getRawIndex(r)].dataIndex=r},t.prototype.clone=function(){for(var e=new t(this._directed),n=this.nodes,i=this.edges,r=0;r<n.length;r++)e.addNode(n[r].id,n[r].dataIndex);for(var r=0;r<i.length;r++){var o=i[r];e.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return e},t}(),MG=function(){function t(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},t.prototype.getTrajectoryDataIndices=function(){for(var t=t9(),e=t9(),n=0,i=this.edges.length;n<i;n++){var r=this.edges[n];if(!(r.dataIndex<0)){t.set(r.dataIndex,!0);for(var o=[r.node1],a=[r.node2],s=0;s<o.length;){var l=o[s];s++,e.set(l.dataIndex,!0);for(var h=l.inEdges,u=0,c=h.length,d=void 0,p=void 0;u<c;u++)(p=(d=h[u]).dataIndex)>=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(d.node1))}for(s=0;s<a.length;){var f=a[s];s++,e.set(f.dataIndex,!0);for(var g=f.outEdges,u=0,m=g.length,y=void 0,v=void 0;u<m;u++)(v=(y=g[u]).dataIndex)>=0&&!t.hasKey(v)&&(t.set(v,!0),a.push(y.node2))}}}return{edge:t.keys(),node:e.keys()}},t}(),MU=function(){function t(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}return t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var t=t9(),e=t9();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],r=0;r<n.length;){var o=n[r];r++,e.set(o.dataIndex,!0);for(var a=o.inEdges,s=0,l=a.length,h=void 0,u=void 0;s<l;s++)(u=(h=o.inEdges[s]).dataIndex)>=0&&!t.hasKey(u)&&(t.set(u,!0),n.push(h.node1))}for(r=0;r<i.length;){var c=i[r];r++,e.set(c.dataIndex,!0);for(var d=c.outEdges,s=0,l=d.length,p=void 0,f=void 0;s<l;s++)(f=(p=c.outEdges[s]).dataIndex)>=0&&!t.hasKey(f)&&(t.set(f,!0),i.push(p.node2))}return{edge:t.keys(),node:e.keys()}},t}();function Mj(t,e){return{getValue:function(n){var i=this[t][e];return i.getStore().get(i.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,i){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function MY(t,e,n,i,r){for(var o,a=new MH(i),s=0;s<t.length;s++)a.addNode(t$(t[s].id,t[s].name,s),s);for(var l=[],h=[],u=0,s=0;s<e.length;s++){var c=e[s],d=c.source,p=c.target;a.addEdge(d,p,u)&&(h.push(c),l.push(t$(r7(c.id,null),d+" > "+p)),u++)}var f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f||"matrix"===f)o=yy(t,n);else{var g=ht.get(f),m=g&&g.dimensions||[];0>tD(m,"value")&&m.concat(["value"]),(o=new yu(yc(t,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions,n)).initData(t)}var y=new yu(["value"],n);return y.initData(h,l),r&&r(o,y),Sl({mainData:o,struct:a,structAttr:"graph",datas:{node:o,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}tL(MG,Mj("hostGraph","data")),tL(MU,Mj("hostGraph","edgeData"));var MX=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return to(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new vG(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),r5(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&n){S8(this)&&(this.__curvenessList=[],this.__edgeMap={},S6(this));var o=MY(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=lb.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=o,i}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=o,t.getModel=i,t})});return tP(o.edges,function(t){!function(t,e,n,i){if(S8(n)){var r=S9(t,e,n),o=n.__edgeMap,a=o[S7(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)},this),o.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),ch("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return cx({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=tR(this.option.categories||[],function(t){return null!=t.value?t:tI({value:0},t)}),e=new yu(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:hS.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:hS.color.primary}}},e}(cS),MZ=function(t){function e(e,n,i){var r=t.call(this)||this;si(r).dataType="node",r.z2=2;var o=new sn;return r.setTextContent(o),r.updateData(e,n,i,!0),r}return to(e,t),e.prototype.updateData=function(t,e,n,i){var r=t.graph.getNodeByIndex(e),o=t.hostModel,a=r.getModel(),s=a.getModel("emphasis"),l=t.getItemLayout(e),h=tI(vh(a.getModel("itemStyle"),l,!0),l);if(isNaN(h.startAngle))return void this.setShape(h);i?this.setShape(h):sJ(this,{shape:h},o,e);var u=tI(vh(a.getModel("itemStyle"),l,!0),l);this.setShape(u),this.useStyle(t.getItemVisual(e,"style")),sU(this,a),this._updateLabel(o,a,r),t.setItemGraphicEl(e,this),sU(this,a,"itemStyle");var c=s.get("focus");sF(this,"adjacency"===c?r.getAdjacentDataIndices():c,s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e,n){var i,r=this.getTextContent(),o=n.getLayout(),a=(o.startAngle+o.endAngle)/2,s=Math.cos(a),l=Math.sin(a),h=e.getModel("label");r.ignore=!h.get("show");var u=s7(e),c=n.getVisual("style");s9(r,u,{labelFetcher:{getFormattedLabel:function(n,i,r,o,a,s){return t.getFormattedLabel(n,i,"node",o,tQ(a,u.normal&&u.normal.get("formatter"),e.get("name")),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:"startArc"});var d=h.get("position")||"outside",p=h.get("distance")||0;i="outside"===d?o.r+p:(o.r+o.r0)/2,this.textConfig={inside:"outside"!==d};var f="outside"!==d?h.get("align")||"center":s>0?"left":"right",g="outside"!==d?h.get("verticalAlign")||"middle":l>0?"top":"bottom";r.attr({x:s*i+o.cx,y:l*i+o.cy,rotation:0,style:{align:f,verticalAlign:g}})},e}(dl),Mq=function(t){function e(e,n,i,r){var o=t.call(this)||this;return si(o).dataType="edge",o.updateData(e,n,i,r,!0),o}return to(e,t),e.prototype.buildPath=function(t,e){t.moveTo(e.s1[0],e.s1[1]);var n=e.clockwise;t.arc(e.cx,e.cy,e.r,e.sStartAngle,e.sEndAngle,!n),t.bezierCurveTo((e.cx-e.s2[0])*.7+e.s2[0],(e.cy-e.s2[1])*.7+e.s2[1],(e.cx-e.t1[0])*.7+e.t1[0],(e.cy-e.t1[1])*.7+e.t1[1],e.t1[0],e.t1[1]),t.arc(e.cx,e.cy,e.r,e.tStartAngle,e.tEndAngle,!n),t.bezierCurveTo((e.cx-e.t2[0])*.7+e.t2[0],(e.cy-e.t2[1])*.7+e.t2[1],(e.cx-e.s1[0])*.7+e.s1[0],(e.cy-e.s1[1])*.7+e.s1[1],e.s1[0],e.s1[1]),t.closePath()},e.prototype.updateData=function(t,e,n,i,r){var o=t.hostModel,a=e.graph.getEdgeByIndex(n),s=a.getLayout(),l=a.node1.getModel(),h=e.getItemModel(a.dataIndex),u=h.getModel("lineStyle"),c=h.getModel("emphasis"),d=c.get("focus"),p=tI(vh(l.getModel("itemStyle"),s,!0),s);isNaN(p.sStartAngle)||isNaN(p.tStartAngle)?this.setShape(p):(r?(this.setShape(p),MK(this,a,t,u)):(s3(this),MK(this,a,t,u),sJ(this,{shape:p},o,n)),sF(this,"adjacency"===d?a.getAdjacentDataIndices():d,c.get("blurScope"),c.get("disabled")),sU(this,h,"lineStyle"),e.setItemGraphicEl(a.dataIndex,this))},e}(aN);function MK(t,e,n,i){var r=e.node1,o=e.node2,a=t.style;switch(t.setStyle(i.getLineStyle()),i.get("color")){case"source":a.fill=n.getItemVisual(r.dataIndex,"style").fill,a.decal=r.getVisual("style").decal;break;case"target":a.fill=n.getItemVisual(o.dataIndex,"style").fill,a.decal=o.getVisual("style").decal;break;case"gradient":var s=n.getItemVisual(r.dataIndex,"style").fill,l=n.getItemVisual(o.dataIndex,"style").fill;if(tG(s)&&tG(l)){var h=t.shape;a.fill=new dP((h.s1[0]+h.s2[0])/2,(h.s1[1]+h.s2[1])/2,(h.t1[0]+h.t2[0])/2,(h.t1[1]+h.t2[1])/2,[{offset:0,color:s},{offset:1,color:l}],!0)}}}var M$=Math.PI/180,MJ=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(t,e){},e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group,a=-t.get("startAngle")*M$;if(i.diff(r).add(function(t){if(i.getItemLayout(t)){var e=new MZ(i,t,a);si(e).dataIndex=t,o.add(e)}}).update(function(e,n){var s=r.getItemGraphicEl(n);if(!i.getItemLayout(e)){s&&s5(s,t,n);return}s?s.updateData(i,e,a):s=new MZ(i,e,a),o.add(s)}).remove(function(e){var n=r.getItemGraphicEl(e);n&&s5(n,t,e)}).execute(),!r){var s=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=rE(s[0],n.getWidth()),this.group.originY=rE(s[1],n.getHeight()),sQ(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,a)},e.prototype.renderEdges=function(t,e){var n=t.getData(),i=t.getEdgeData(),r=this._edgeData,o=this.group;i.diff(r).add(function(t){var r=new Mq(n,i,t,e);si(r).dataIndex=t,o.add(r)}).update(function(t,a){var s=r.getItemGraphicEl(a);s.updateData(n,i,t,e),o.add(s)}).remove(function(e){var n=r.getItemGraphicEl(e);n&&s5(n,t,e)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e}(pw),MQ=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new vG(tV(this.getData,this),tV(this.getRawData,this))},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},e.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&n)return MY(i,n,this,!0,function(t,e){var n=lb.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=r,t.getModel=i,t})}).data},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){var i=this.getDataParams(t,n);if("edge"===n){var r=this.getData(),o=r.graph.getEdgeByIndex(t),a=r.getName(o.node1.dataIndex),s=r.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),ch("nameValue",{name:l.join(" > "),value:i.value,noValue:null==i.value})}return ch("nameValue",{name:i.name,value:i.value,noValue:null==i.value})},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if("node"===n){var r=this.getData(),o=this.getGraph().getNodeByIndex(e);null==i.name&&(i.name=r.getName(e)),null==i.value&&(i.value=o.getLayout().value)}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(cS),M0=Math.PI/180;function M1(t,e){t.eachSeriesByType("chord",function(t){!function(t,e){var n=t.getData(),i=n.graph,r=t.getEdgeData();if(r.count()){var o=hh(t,e),a=o.cx,s=o.cy,l=o.r,h=o.r0,u=Math.max((t.get("padAngle")||0)*M0,0),c=Math.max((t.get("minAngle")||0)*M0,0),d=-t.get("startAngle")*M0,p=d+2*Math.PI,f=t.get("clockwise"),g=f?1:-1,m=[d,p];ax(m,!f);var y=m[0],v=m[1]-y,x=0===n.getSum("value")&&0===r.getSum("value"),_=[],b=0;i.eachEdge(function(t){var e=x?1:t.getValue("value");x&&(e>0||c)&&(b+=2);var n=t.node1.dataIndex,i=t.node2.dataIndex;_[n]=(_[n]||0)+e,_[i]=(_[i]||0)+e});var w=0;if(i.eachNode(function(t){var e=t.getValue("value");isNaN(e)||(_[t.dataIndex]=Math.max(e,_[t.dataIndex]||0)),!x&&(_[t.dataIndex]>0||c)&&b++,w+=_[t.dataIndex]||0}),0!==b&&0!==w){u*b>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-c*b)/b)),(u+c)*b>=Math.abs(v)&&(c=(Math.abs(v)-u*b)/b);var S=(v-u*b*g)/w,M=0,C=0,k=0,T=1/0;i.eachNode(function(t){var e=_[t.dataIndex]||0,n=S*(w?e:1)*g;Math.abs(n)<c?M+=c-Math.abs(n):(T=Math.min(T,Math.abs(n)-c),C+=Math.abs(n)-c,k+=Math.abs(n)),t.setLayout({angle:n,value:e})});var I=!1;if(M>C){var A=M/C;i.eachNode(function(t){var e=t.getLayout().angle;Math.abs(e)>=c?t.setLayout({angle:e*A,ratio:A},!0):t.setLayout({angle:c,ratio:0===c?1:e/c},!0)})}else i.eachNode(function(t){if(!I){var e=t.getLayout().angle,n=Math.min(e/k,1)*M;e-n<c&&(I=!0)}});var D=M;i.eachNode(function(t){if(!(D<=0)){var e=t.getLayout().angle;if(e>c&&c>0){var n=I?1:Math.min(e/k,1),i=Math.min(e-c,Math.min(D,M*n));D-=i,t.setLayout({angle:e-i,ratio:(e-i)/e},!0)}else c>0&&t.setLayout({angle:c,ratio:0===e?1:c/e},!0)}});var L=y,O=[];i.eachNode(function(t){var e=Math.max(t.getLayout().angle,c);t.setLayout({cx:a,cy:s,r0:h,r:l,startAngle:L,endAngle:L+e*g,clockwise:f},!0),O[t.dataIndex]=L,L+=(e+u)*g}),i.eachEdge(function(t){var e=x?1:t.getValue("value"),n=S*(w?e:1)*g,i=t.node1.dataIndex,r=O[i]||0,o=r+Math.abs((t.node1.getLayout().ratio||1)*n)*g,l=[a+h*Math.cos(r),s+h*Math.sin(r)],u=[a+h*Math.cos(o),s+h*Math.sin(o)],c=t.node2.dataIndex,d=O[c]||0,p=d+Math.abs((t.node2.getLayout().ratio||1)*n)*g,m=[a+h*Math.cos(d),s+h*Math.sin(d)],y=[a+h*Math.cos(p),s+h*Math.sin(p)];t.setLayout({s1:l,s2:u,sStartAngle:r,sEndAngle:o,t1:m,t2:y,tStartAngle:d,tEndAngle:p,cx:a,cy:s,r:h,value:e,clockwise:f}),O[i]=o,O[c]=p})}}}(t,e)})}var M2=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},M5=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return to(e,t),e.prototype.getDefaultShape=function(){return new M2},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(aN);function M3(t,e){var n=null==t?"":t+"";return e&&(tG(e)?n=e.replace("{value}",n):tH(e)&&(n=e(t))),n}var M4=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i,r,o=t.get(["axisLine","lineStyle","color"]),a=(i=t.get("center"),r=Math.min(n.getWidth(),n.getHeight()),{cx:rE(i[0],n.getWidth()),cy:rE(i[1],n.getHeight()),r:rE(t.get("radius"),r/2)});this._renderMain(t,e,n,o,a),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),u=h.get("roundCap")?va:dl,c=h.get("show"),d=h.getModel("lineStyle"),p=d.get("width"),f=[s,l];ax(f,!a),s=f[0];for(var g=(l=f[1])-s,m=s,y=[],v=0;c&&v<i.length;v++){var x=new u({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(i[v][0],0),1),cx:r.cx,cy:r.cy,clockwise:a,r0:r.r-p,r:r.r},silent:!0});x.setStyle({fill:i[v][1]}),x.setStyle(d.getLineStyle(["color","width"])),y.push(x),m=l}y.reverse(),tP(y,function(t){return o.add(t)});var _=function(t){var e;if(t<=0)return i[0][1];for(e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};this._renderTicks(t,e,n,_,r,s,l,a,p),this._renderTitleAndDetail(t,e,n,_,r),this._renderAnchor(t,r),this._renderPointer(t,e,n,_,r,s,l,a,p)},e.prototype._renderTicks=function(t,e,n,i,r,o,a,s,l){for(var h,u,c=this.group,d=r.cx,p=r.cy,f=r.r,g=+t.get("min"),m=+t.get("max"),y=t.getModel("splitLine"),v=t.getModel("axisTick"),x=t.getModel("axisLabel"),_=t.get("splitNumber"),b=v.get("splitNumber"),w=rE(y.get("length"),f),S=rE(v.get("length"),f),M=o,C=(a-o)/_,k=C/b,T=y.getModel("lineStyle").getLineStyle(),I=v.getModel("lineStyle").getLineStyle(),A=y.get("distance"),D=0;D<=_;D++){if(h=Math.cos(M),u=Math.sin(M),y.get("show")){var L=A?A+l:l,O=new dw({shape:{x1:h*(f-L)+d,y1:u*(f-L)+p,x2:h*(f-w-L)+d,y2:u*(f-w-L)+p},style:T,silent:!0});"auto"===T.stroke&&O.setStyle({stroke:i(D/_)}),c.add(O)}if(x.get("show")){var L=x.get("distance")+A,P=M3(rz(D/_*(m-g)+g),x.get("formatter")),R=i(D/_),N=h*(f-w-L)+d,E=u*(f-w-L)+p,B=x.get("rotate"),z=0;"radial"===B?(z=-M+2*Math.PI)>Math.PI/2&&(z+=Math.PI):"tangential"===B?z=-M-Math.PI/2:tj(B)&&(z=B*Math.PI/180),0===z?c.add(new sn({style:lt(x,{text:P,x:N,y:E,verticalAlign:u<-.8?"top":u>.8?"bottom":"middle",align:h<-.4?"left":h>.4?"right":"center"},{inheritColor:R}),silent:!0})):c.add(new sn({style:lt(x,{text:P,x:N,y:E,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:N,originY:E,rotation:z}))}if(v.get("show")&&D!==_){var L=v.get("distance");L=L?L+l:l;for(var V=0;V<=b;V++){var F=new dw({shape:{x1:(h=Math.cos(M))*(f-L)+d,y1:(u=Math.sin(M))*(f-L)+p,x2:h*(f-S-L)+d,y2:u*(f-S-L)+p},silent:!0,style:I});"auto"===I.stroke&&F.setStyle({stroke:i((D+V/b)/_)}),c.add(F),M+=k}M-=k}else M+=C}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var h=this.group,u=this._data,c=this._progressEls,d=[],p=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),m=t.getData(),y=m.mapDimension("value"),v=+t.get("min"),x=+t.get("max"),_=[v,x],b=[o,a];function w(e,n){var i,o=m.getItemModel(e).getModel("pointer"),a=rE(o.get("width"),r.r),s=rE(o.get("length"),r.r),l=t.get(["pointer","icon"]),h=o.get("offsetCenter"),u=rE(h[0],r.r),c=rE(h[1],r.r),d=o.get("keepAspect");return(i=l?fg(l,u-a/2,c-s,a,s,null,d):new M5({shape:{angle:-Math.PI/2,width:a,r:s,x:u,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?va:dl,i=f.get("overlap"),a=i?f.get("width"):l/m.count(),h=i?r.r-a:r.r-(t+1)*a,u=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:h,r:u}});return i&&(c.z2=rN(m.get(y,t),[v,x],[100,0],!0)),c}(g||p)&&(m.diff(u).add(function(e){var n=m.get(y,e);if(p){var i=w(e,o);sQ(i,{rotation:-((isNaN(+n)?b[0]:rN(n,_,b,!0))+Math.PI/2)},t),h.add(i),m.setItemGraphicEl(e,i)}if(g){var r=S(e,o);sQ(r,{shape:{endAngle:rN(n,_,b,f.get("clip"))}},t),h.add(r),sr(t.seriesIndex,m.dataType,e,r),d[e]=r}}).update(function(e,n){var i=m.get(y,e);if(p){var r=u.getItemGraphicEl(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,sJ(s,{rotation:-((isNaN(+i)?b[0]:rN(i,_,b,!0))+Math.PI/2)},t),h.add(s),m.setItemGraphicEl(e,s)}if(g){var l=c[n],v=S(e,l?l.shape.endAngle:o);sJ(v,{shape:{endAngle:rN(i,_,b,f.get("clip"))}},t),h.add(v),sr(t.seriesIndex,m.dataType,e,v),d[e]=v}}).execute(),m.each(function(t){var e=m.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(t),l=m.getItemVisual(t,"style"),h=l.fill;if(s instanceof aW){var u=s.style;s.useStyle(tI({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(h);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(rN(m.get(y,t),_,[0,1],!0))),s.z2EmphasisLift=0,sU(s,e),sF(s,r,o,a)}if(g){var c=d[t];c.useStyle(m.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,sU(c,e),sF(c,r,o,a)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=fg(r,e.cx-i/2+rE(o[0],e.r),e.cy-i/2+rE(o[1],e.r),i,i,null,a);s.z2=+!!n.get("showAbove"),s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),h=+t.get("max"),u=new rT,c=[],d=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add(function(t){c[t]=new sn({silent:!0}),d[t]=new sn({silent:!0})}).update(function(t,e){c[t]=o._titleEls[e],d[t]=o._detailEls[e]}).execute(),a.each(function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new rT,m=i(rN(o,[l,h],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var v=y.get("offsetCenter"),x=r.cx+rE(v[0],r.r),_=r.cy+rE(v[1],r.r),b=c[e];b.attr({z2:2*!f,style:lt(y,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(b)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),M=r.cx+rE(S[0],r.r),C=r.cy+rE(S[1],r.r),k=rE(w.get("width"),r.r),T=rE(w.get("height"),r.r),I=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:m,b=d[e],A=w.get("formatter");b.attr({z2:2*!f,style:lt(w,{x:M,y:C,text:M3(o,A),width:isNaN(k)?null:k,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:I})}),ll(b,{normal:w},o,function(t){return M3(t,A)}),p&&lh(b,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return M3(a?a.interpolatedValue:o,A)}}),g.add(b)}u.add(g)}),this.group.add(u),this._titleEls=c,this._detailEls=d},e.type="gauge",e}(pw),M8=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return to(e,t),e.prototype.getInitialData=function(t,e){return vH(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,hS.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:hS.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:hS.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:hS.color.axisLabel,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:hS.color.neutral00,borderWidth:0,borderColor:hS.color.theme["0"]}},title:{show:!0,offsetCenter:[0,"20%"],color:hS.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:hS.color.transparent,borderWidth:0,borderColor:hS.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:hS.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(cS),M6=["itemStyle","opacity"],M9=function(t){function e(e,n){var i=t.call(this)||this,r=new dv,o=new sn;return i.setTextContent(o),i.setTextGuideLine(r),i.updateData(e,n,!0),i}return to(e,t),e.prototype.updateData=function(t,e,n){var i=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e),a=r.getModel("emphasis"),s=r.get(M6);s=null==s?1:s,n||s3(this),this.useStyle(t.getItemVisual(e,"style")),this.style.lineJoin="round",n?(this.setShape({points:o.points}),this.style.opacity=0,sQ(this,{style:{opacity:s}},i,e)):sJ(this,{style:{opacity:s},shape:{points:o.points}},i,e),sU(this,r),this._updateLabel(t,e),sF(this,a.get("focus"),a.get("blurScope"),a.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this.getTextGuideLine(),i=this.getTextContent(),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e).label,s=t.getItemVisual(e,"style"),l=s.fill;s9(i,s7(o),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:s.opacity,defaultText:t.getName(e)},{normal:{align:a.textAlign,verticalAlign:a.verticalAlign}});var h="inherit"===o.getModel("label").get("color")?l:null;this.setTextConfig({local:!0,inside:!!a.inside,insideStroke:h,outsideFill:h});var u=a.linePoints;n.setShape({points:u}),this.textGuideLineConfig={anchor:u?new e1(u[0][0],u[0][1]):null},sJ(i,{style:{x:a.x,y:a.y}},r,e),i.attr({rotation:a.rotation,originX:a.x,originY:a.y,z2:10}),gz(this,gV(o),{stroke:l})},e}(dg),M7=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return to(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add(function(t){var e=new M9(i,t);i.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)}).remove(function(e){s5(r.getItemGraphicEl(e),t,e)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(pw),Ct=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new vG(tV(this.getData,this),tV(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return vH(this,{coordDimensions:["value"],encodeDefaulter:tF(hH,this)})},e.prototype._defaultLabelLine=function(t){r5(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:hS.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:hS.color.primary}}},e}(cS);function Ce(t,e){t.eachSeriesByType("funnel",function(t){var n,i=t.getData(),r=i.mapDimension("value"),o=t.get("sort"),a=hp(t,e),s=hu(t.getBoxLayoutParams(),a.refContainer),l=t.get("orient"),h=s.width,u=s.height,c=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),r=[],o="ascending"===e,a=0,s=t.count();a<s;a++)r[a]=a;return tH(e)?r.sort(e):"none"!==e&&r.sort(function(t,e){return o?i[t]-i[e]:i[e]-i[t]}),r}(i,o),d=s.x,p=s.y,f="horizontal"===l?[rE(t.get("minSize"),u),rE(t.get("maxSize"),u)]:[rE(t.get("minSize"),h),rE(t.get("maxSize"),h)],g=i.getDataExtent(r),m=t.get("min"),y=t.get("max");null==m&&(m=Math.min(g[0],0)),null==y&&(y=g[1]);var v=t.get("funnelAlign"),x=t.get("gap"),_=(("horizontal"===l?h:u)-x*(i.count()-1))/i.count(),b=function(t,e){if("horizontal"===l){var n,o=rN(i.get(r,t)||0,[m,y],f,!0),a=void 0;switch(v){case"top":a=p;break;case"center":a=p+(u-o)/2;break;case"bottom":a=p+(u-o)}return[[e,a],[e,a+o]]}var s=rN(i.get(r,t)||0,[m,y],f,!0);switch(v){case"left":n=d;break;case"center":n=d+(h-s)/2;break;case"right":n=d+h-s}return[[n,e],[n+s,e]]};"ascending"===o&&(_=-_,x=-x,"horizontal"===l?d+=h:p+=u,c=c.reverse());for(var w=0;w<c.length;w++){var S=c[w],M=c[w+1],C=i.getItemModel(S);if("horizontal"===l){var k=C.get(["itemStyle","width"]);null==k?k=_:(k=rE(k,h),"ascending"===o&&(k=-k));var T=b(S,d),I=b(M,d+k);d+=k+x,i.setItemLayout(S,{points:T.concat(I.slice().reverse())})}else{var A=C.get(["itemStyle","height"]);null==A?A=_:(A=rE(A,u),"ascending"===o&&(A=-A));var T=b(S,p),I=b(M,p+A);p+=A+x,i.setItemLayout(S,{points:T.concat(I.slice().reverse())})}}n=i.hostModel.get("orient"),i.each(function(t){var e,r,o,a,s=i.getItemModel(t),l=s.getModel("label").get("position"),h=s.getModel("labelLine"),u=i.getItemLayout(t),c=u.points,d="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(d)"insideLeft"===l?(r=(c[0][0]+c[3][0])/2+5,o=(c[0][1]+c[3][1])/2,e="left"):"insideRight"===l?(r=(c[1][0]+c[2][0])/2-5,o=(c[1][1]+c[2][1])/2,e="right"):(r=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,o=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,e="center"),a=[[r,o],[r,o]];else{var p=void 0,f=void 0,g=void 0,m=void 0,y=h.get("length");"left"===l?(p=(c[3][0]+c[0][0])/2,f=(c[3][1]+c[0][1])/2,r=(g=p-y)-5,e="right"):"right"===l?(p=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,r=(g=p+y)+5,e="left"):"top"===l?(p=(c[3][0]+c[0][0])/2,o=(m=(f=(c[3][1]+c[0][1])/2)-y)-5,e="center"):"bottom"===l?(p=(c[1][0]+c[2][0])/2,o=(m=(f=(c[1][1]+c[2][1])/2)+y)+5,e="center"):"rightTop"===l?(p="horizontal"===n?c[3][0]:c[1][0],f="horizontal"===n?c[3][1]:c[1][1],"horizontal"===n?(o=(m=f-y)-5,e="center"):(r=(g=p+y)+5,e="top")):"rightBottom"===l?(p=c[2][0],f=c[2][1],"horizontal"===n?(o=(m=f+y)+5,e="center"):(r=(g=p+y)+5,e="bottom")):"leftTop"===l?(p=c[0][0],f="horizontal"===n?c[0][1]:c[1][1],"horizontal"===n?(o=(m=f-y)-5,e="center"):(r=(g=p-y)-5,e="right")):"leftBottom"===l?(p="horizontal"===n?c[1][0]:c[3][0],f="horizontal"===n?c[1][1]:c[2][1],"horizontal"===n?(o=(m=f+y)+5,e="center"):(r=(g=p-y)-5,e="right")):(p=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,"horizontal"===n?(o=(m=f+y)+5,e="center"):(r=(g=p+y)+5,e="left")),"horizontal"===n?r=g=p:o=m=f,a=[[p,f],[g,m]]}u.label={linePoints:a,x:r,y:o,verticalAlign:"middle",textAlign:e,inside:d}})})}var Cn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._dataGroup=new rT,n._initialized=!1,n}return to(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._dataGroup,o=t.getData(),a=this._data,s=t.coordinateSystem,l=s.dimensions,h=Co(t);if(o.diff(a).add(function(t){Ca(Cr(o,r,t,l,s),o,t,h)}).update(function(e,n){var i=a.getItemGraphicEl(n),r=Ci(o,e,l,s);o.setItemGraphicEl(e,i),sJ(i,{shape:{points:r}},t,e),s3(i),Ca(i,o,e,h)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),!this._initialized){this._initialized=!0;var u,c,d,p,f,g,m,y=(u=s,c=t,d=function(){setTimeout(function(){r.removeClipPath()})},p=u.model,g=new aq({shape:{x:(f=u.getRect()).x,y:f.y,width:f.width,height:f.height}}),m="horizontal"===p.get("layout")?"width":"height",g.setShape(m,0),sQ(g,{shape:{width:f.width,height:f.height}},c,d),g);r.setClipPath(y)}this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,n){for(var i=e.getData(),r=e.coordinateSystem,o=r.dimensions,a=Co(e),s=this._progressiveEls=[],l=t.start;l<t.end;l++){var h=Cr(i,this._dataGroup,l,o,r);h.incremental=!0,Ca(h,i,l,a),s.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(pw);function Ci(t,e,n,i){for(var r=[],o=0;o<n.length;o++){var a,s=n[o],l=t.get(t.mapDimension(s),e);a=l,("category"===i.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(i.dataToPoint(l,s))}return r}function Cr(t,e,n,i,r){var o=new dv({shape:{points:Ci(t,n,i,r)},z2:10});return e.add(o),t.setItemGraphicEl(n,o),o}function Co(t){var e,n=t.get("smooth",!0);return!0===n&&(n=.3),(e=n=rK(n))!=e&&(n=0),{smooth:n}}function Ca(t,e,n,i){t.useStyle(e.getItemVisual(n,"style")),t.style.fill=null,t.setShape("smooth",i.smooth);var r=e.getItemModel(n),o=r.getModel("emphasis");sU(t,r,"lineStyle"),sF(t,o.get("focus"),o.get("blurScope"),o.get("disabled"))}var Cs=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return to(e,t),e.prototype.getInitialData=function(t,e){return yy(null,this,{useEncodeDefaulter:tV(Cl,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var e=this.coordinateSystem,n=this.getData(),i=[];return e.eachActiveState(n,function(e,r){t===e&&i.push(n.getRawIndex(r))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(cS);function Cl(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var n={};return tP(e.dimensions,function(t){var e=+t.replace("dim","");n[t]=e}),n}}var Ch=["lineStyle","opacity"],Cu={seriesType:"parallel",reset:function(t,e){var n=t.coordinateSystem,i={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,e){n.eachActiveState(e,function(t,n){var r=i[t];if("normal"===t&&e.hasItemOption){var o=e.getItemModel(n).get(Ch,!0);null!=o&&(r=o)}e.ensureUniqueItemVisual(n,"style").opacity=r},t.start,t.end)}}}};function Cc(t){var e;(function(t){if(!t.parallel){var e=!1;tP(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}})(t),tP(r2((e=t).parallelAxis),function(t){if(tY(t)){var n=t.parallelIndex||0,i=r2(e.parallel)[n];i&&i.parallelAxisDefault&&tk(t,i.parallelAxisDefault,!1)}})}var Cd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},tP(Cp,function(t,e){n.getZr().on(e,this._handlers[e]=tV(t,this))},this)),pO(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,e){pP(this,"_throttledDispatchExpand"),tP(this._handlers,function(t,n){e.getZr().off(n,t)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(tI({type:"parallelAxisExpand"},t))},e.type="parallel",e}(cL),Cp={mousedown:function(t){Cf(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Cf(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Cf(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Cf(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var Cg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&tk(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){tP(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];tP(tE(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(h_),Cm=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return to(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(x7);function Cy(t,e,n,i,r,o){t=t||0;var a,s=n[1]-n[0];if(null!=r&&(r=Cx(r,[0,s])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var l=Math.abs(e[1]-e[0]);l=Cx(l,[0,s]),r=o=Cx(l,[r,o]),i=0}e[0]=Cx(e[0],n),e[1]=Cx(e[1],n);var h=Cv(e,i);e[i]+=t;var u=r||0,c=n.slice();return h.sign<0?c[0]+=u:c[1]-=u,e[i]=Cx(e[i],c),a=Cv(e,i),null!=r&&(a.sign!==h.sign||a.span<r)&&(e[1-i]=e[i]+h.sign*r),a=Cv(e,i),null!=o&&a.span>o&&(e[1-i]=e[i]+a.sign*o),e}function Cv(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function Cx(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var C_=Math.min,Cb=Math.max,Cw=Math.floor,CS=Math.ceil,CM=Math.PI,CC=function(){function t(t,e,n){this.type="parallel",this._axesMap=t9(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;tP(i,function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new Cm(t,xN(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this},this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var i=n.getData();tP(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),xR(e.scale,e.model)},this)}},this)},t.prototype.resize=function(t,e){var n=hp(t,e).refContainer;this._rect=hu(t.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a=+("horizontal"!==o),s=n[r[a]],l=[0,s],h=this.dimensions.length,u=Ck(e.get("axisExpandWidth"),l),c=Ck(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,p=e.get("axisExpandWindow");p?(t=Ck(p[1]-p[0],l),p[1]=p[0]+t):(t=Ck(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||Cw(h/2))-t/2])[1]=p[0]+t);var f=(s-t)/(h-c);f<3&&(f=0);var g=[Cw(rz(p[0]/u,1))+1,CS(rz(p[1]/u,1))-1],m=f/u*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each(function(t){var e=[0,i.axisLength],n=+!!t.inverse;t.setExtent(e[n],e[1-n])}),tP(n,function(e,n){var o=(i.axisExpandable?function(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*o-e.axisExpandWindow[0],h=o,u=!0):(n=r-(a-1-t)*s,i=s),{position:n,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:i}}:function(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}})(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s=[a[r].x+t.x,a[r].y+t.y],l={horizontal:CM/2,vertical:0}[r],h=eX();eJ(h,h,l),e$(h,h,s),this._axesLayout[e]={position:s,rotation:l,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];tP(o,function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)});for(var l=this.hasAxisBrushed(),h=n;h<i;h++){var u=void 0;if(l){u="active";for(var c=t.getValues(a,h),d=0,p=o.length;d<p;d++)if("inactive"===s[d].getActiveState(c[d])){u="inactive";break}}else u="normal";e(u,h)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,r=t.length;i<r;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},t.prototype.axisCoordToPoint=function(t,e){return d7([t,0],this._axesLayout[e].transform)},t.prototype.getAxisLayout=function(t){return tC(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var e,n=this._makeLayoutInfo(),i=n.pixelDimIndex,r=n.axisExpandWindow.slice(),o=r[1]-r[0],a=[0,n.axisExpandWidth*(n.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:r};var s=t[i]-n.layoutBase-n.axisExpandWindow0Pos,l="slide",h=n.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),c=null!=u[0];if(h)c&&h&&s<o*u[0]?(l="jump",e=s-o*u[2]):c&&h&&s>o*(1-u[0])?(l="jump",e=s-o*(1-u[2])):(e=s-o*u[1])>=0&&(e=s-o*(1-u[1]))<=0&&(e=0),(e*=n.axisExpandWidth/h)?Cy(e,r,a,"all"):l="none";else{var d=r[1]-r[0];(r=[Cb(0,a[1]*s/d-d/2)])[1]=C_(a[1],r[0]+d),r[0]=r[1]-d}return{axisExpandWindow:r,behavior:l}},t}();function Ck(t,e){return C_(Cb(t,e[0]),e[1])}var CT={create:function(t,e){var n=[];return t.eachComponent("parallel",function(i,r){var o=new CC(i,t,e);o.name="parallel_"+r,o.resize(i,e),i.coordinateSystem=o,o.model=i,n.push(o)}),t.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",os).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},CI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return to(e,t),e.prototype.getAreaSelectStyle=function(){return oM([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=tC(t);if(e)for(var n=e.length-1;n>=0;n--)rV(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i<r;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"},e}(h_);tL(CI,v0);var CA=Math.min,CD=Math.max,CL=Math.pow,CO="globalPan",CP={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},CN={brushStyle:{lineWidth:2,stroke:hS.color.backgroundTint,fill:hS.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},CE=0,CB=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new rT,n._uid="brushController_"+CE++,tP(kt,function(t,e){this._handlers[e]=tV(t,this)},n),n}return to(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e,n=this._zr;this._enableGlobalPan||(e=this._uid,bg(n)[CO]=e),tP(this._handlers,function(t,e){n.on(e,t)}),this._brushType=t.brushType,this._brushOption=tk(tC(CN),t,!0)},e.prototype._doDisableBrush=function(){var t,e,n=this._zr;t=this._uid,(e=bg(n))[CO]===t&&(e[CO]=null),tP(this._handlers,function(t,e){n.off(e,t)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};tP(t,function(t){e[t.panelId]=tC(t)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=tR(t,function(t){return tk(tC(CN),t,!0)});var e=this._covers,n=this._covers=[],i=this,r=this._creatingCover;return new m4(e,t,function(t,e){return o(t.__brushOption,e)},o).add(a).update(a).remove(function(t){e[t]!==r&&i.group.remove(e[t])}).execute(),this;function o(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function a(o,a){var s=t[o];if(null!=a&&e[a]===r)n[o]=e[a];else{var l=n[o]=null!=a?(e[a].__brushOption=s,e[a]):CV(i,Cz(i,s));CH(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),CY(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(eS);function Cz(t,e){var n=kn[e.brushType].createCover(t,e);return n.__brushOption=e,CW(n,e),t.group.add(n),n}function CV(t,e){var n=CG(e);return n.endCreating&&(n.endCreating(t,e),CW(e,e.__brushOption)),e}function CF(t,e){var n=e.__brushOption;CG(e).updateCoverShape(t,e,n.range,n)}function CW(t,e){var n=e.z;null==n&&(n=1e4),t.traverse(function(t){t.z=n,t.z2=n})}function CH(t,e){CG(e).updateCommon(t,e),CF(t,e)}function CG(t){return kn[t.__brushOption.brushType]}function CU(t,e,n){var i,r=t._panels;if(!r)return!0;var o=t._transform;return tP(r,function(t){t.isTargetByCursor(e,n,o)&&(i=t)}),i}function Cj(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null==i||n[i]}function CY(t){var e=t._covers,n=e.length;return tP(e,function(e){t.group.remove(e)},t),e.length=0,!!n}function CX(t,e){var n=tR(t._covers,function(t){var e=t.__brushOption,n=tC(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function CZ(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Cq(t,e,n,i){var r=new rT;return r.add(new aq({name:"main",style:CQ(n),silent:!0,draggable:!0,cursor:"move",drift:tF(C2,t,e,r,["n","s","w","e"]),ondragend:tF(CX,e,{isEnd:!0})})),tP(i,function(n){r.add(new aq({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:tF(C2,t,e,r,n),ondragend:tF(CX,e,{isEnd:!0})}))}),r}function CK(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=CD(r,6),a=n[0][0],s=n[1][0],l=a-r/2,h=s-r/2,u=n[0][1],c=n[1][1],d=u-o+r/2,p=c-o+r/2,f=u-a,g=c-s,m=f+r,y=g+r;CJ(t,e,"main",a,s,f,g),i.transformable&&(CJ(t,e,"w",l,h,o,y),CJ(t,e,"e",d,h,o,y),CJ(t,e,"n",l,h,m,o),CJ(t,e,"s",l,p,m,o),CJ(t,e,"nw",l,h,o,o),CJ(t,e,"ne",d,h,o,o),CJ(t,e,"sw",l,p,o,o),CJ(t,e,"se",d,p,o,o))}function C$(t,e){var n=e.__brushOption,i=n.transformable,r=e.childAt(0);r.useStyle(CQ(n)),r.attr({silent:!i,cursor:i?"move":"default"}),tP([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var r,o,a,s=e.childOfName(n.join("")),l=1===n.length?C1(t,n[0]):(("e"===(a=[C1(r=t,(o=n)[0]),C1(r,o[1])])[0]||"w"===a[0])&&a.reverse(),a.join(""));s&&s.attr({silent:!i,invisible:!i,cursor:i?CR[l]+"-resize":null})})}function CJ(t,e,n,i,r,o,a){var s,l,h,u=e.childOfName(n);u&&u.setShape((l=CA((s=C4(t,e,[[i,r],[i+o,r+a]]))[0][0],s[1][0]),{x:l,y:h=CA(s[0][1],s[1][1]),width:CD(s[0][0],s[1][0])-l,height:CD(s[0][1],s[1][1])-h}))}function CQ(t){return tA({strokeNoScale:!0},t.brushStyle)}function C0(t,e,n,i){var r=[CA(t,n),CA(e,i)],o=[CD(t,n),CD(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function C1(t,e){return({left:"w",right:"e",top:"n",bottom:"s"})[pt({w:"left",e:"right",n:"top",s:"bottom"}[e],d9(t.group))]}function C2(t,e,n,i,r,o){var a=n.__brushOption,s=t.toRectRange(a.range),l=C3(e,r,o);tP(i,function(t){var e=CP[t];s[e[0]][e[1]]+=l[e[0]]}),a.range=t.fromRectRange(C0(s[0][0],s[1][0],s[0][1],s[1][1])),CH(e,n),CX(e,{isEnd:!1})}function C5(t,e,n,i){var r=e.__brushOption.range,o=C3(t,n,i);tP(r,function(t){t[0]+=o[0],t[1]+=o[1]}),CH(t,e),CX(t,{isEnd:!1})}function C3(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function C4(t,e,n){var i=Cj(t,e);return i&&!0!==i?i.clipPath(n,t._transform):tC(n)}function C8(t){var e=t.event;e.preventDefault&&e.preventDefault()}function C6(t,e,n){return t.childOfName("main").contain(e,n)}function C9(t,e,n,i){var r,o=t._creatingCover,a=t._creatingPanel,s=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return CL(r*r+o*o,.5)>6}(t)||o){if(a&&!o){"single"===s.brushMode&&CY(t);var l=tC(s);l.brushType=C7(l.brushType,a),l.panelId=!0===a?null:a.panelId,o=t._creatingCover=Cz(t,l),t._covers.push(o)}if(o){var h=kn[C7(t._brushType,a)];o.__brushOption.range=h.getCreatingRange(C4(t,o,t._track)),i&&(CV(t,o),h.updateCommon(t,o)),CF(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&CU(t,e,n)&&CY(t)&&(r={isEnd:i,removeOnClick:!0});return r}function C7(t,e){return"auto"===t?e.defaultBrushType:t}var kt={mousedown:function(t){if(this._dragging)ke(this,t);else if(!t.target||!t.target.draggable){C8(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=CU(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(!function(t,e,n){if(!(!t._brushType||(i=t,r=e.offsetX,o=e.offsetY,a=i._zr,r<0||r>a.getWidth()||o<0||o>a.getHeight()))){var i,r,o,a,s=t._zr,l=t._covers,h=CU(t,e,n);if(!t._dragging)for(var u=0;u<l.length;u++){var c=l[u].__brushOption;if(h&&(!0===h||c.panelId===h.panelId)&&kn[c.brushType].contain(l[u],n[0],n[1]))return}h&&s.setCursorStyle("crosshair")}}(this,t,i),this._dragging){C8(t);var r=C9(this,t,i,!1);r&&CX(this,r)}},mouseup:function(t){ke(this,t)}};function ke(t,e){if(t._dragging){C8(e);var n=e.offsetX,i=e.offsetY,r=t.group.transformCoordToLocal(n,i),o=C9(t,e,r,!0);t._dragging=!1,t._track=[],t._creatingCover=null,o&&CX(t,o)}}var kn={lineX:ki(0),lineY:ki(1),rect:{createCover:function(t,e){function n(t){return t}return Cq({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=CZ(t);return C0(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){CK(t,e,n,i)},updateCommon:C$,contain:C6},polygon:{createCover:function(t,e){var n=new rT;return n.add(new dv({name:"main",style:CQ(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new dg({name:"main",draggable:!0,drift:tF(C5,t,e),ondragend:tF(CX,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:C4(t,e,n)})},updateCommon:C$,contain:C6}};function ki(t){return{createCover:function(e,n){return Cq({toRectRange:function(e){var n=[e,[0,100]];return t&&n.reverse(),n},fromRectRange:function(e){return e[t]}},e,n,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var n=CZ(e);return[CA(n[0][t],n[1][t]),CD(n[0][t],n[1][t])]},updateCoverShape:function(e,n,i,r){var o,a=Cj(e,n);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,o];t&&l.reverse(),CK(e,n,l,r)},updateCommon:C$,contain:C6}}function kr(t){return t=ks(t),function(e){return pn(e,t)}}function ko(t,e){return t=ks(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function ka(t,e,n){var i=ks(t);return function(t,r){return i.contain(r[0],r[1])&&!by(t,e,n)}}function ks(t){return nu.create(t)}var kl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(e,n){t.prototype.init.apply(this,arguments),(this._brushController=new CB(n.getZr())).on("brush",tV(this._onBrush,this))},e.prototype.render=function(t,e,n,i){var r,o,a;if(r=t,o=e,!(a=i)||"axisAreaSelect"!==a.type||o.findComponents({mainType:"parallelAxis",query:a})[0]!==r){this.axisModel=t,this.api=n,this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new rT,this.group.add(this._axisGroup),t.get("show")){var l,h=(l=t,e.getComponent("parallel",l.get("parallelIndex"))),u=h.coordinateSystem,c=t.getAreaSelectStyle(),d=c.width,p=t.axis.dim,f=tI({strokeContainThreshold:d},u.getAxisLayout(p)),g=new _b(t,n,f);g.build(),this._axisGroup.add(g.group),this._refreshBrushController(f,c,t,h,d,n),pe(s,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,e,n,i,r,o){var a,s,l=n.axis.getExtent(),h=l[1]-l[0],u=Math.min(30,.1*Math.abs(h)),c=nu.create({x:l[0],y:-r/2,width:h,height:r});c.x-=u,c.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:kr(c),isTargetByCursor:ka(c,o,i),getLinearBrushOtherExtent:ko(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((s=(a=n).axis,tR(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[s.dataToCoord(t[0],!0),s.dataToCoord(t[1],!0)]}})))},e.prototype._onBrush=function(t){var e=t.areas,n=this.axisModel,i=n.axis,r=tR(e,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:r})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(cL),kh={type:"axisAreaSelect",event:"axisAreaSelected"},ku={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function kc(t){t.registerComponentView(Cd),t.registerComponentModel(Cg),t.registerCoordinateSystem("parallel",CT),t.registerPreprocessor(Cc),t.registerComponentModel(CI),t.registerComponentView(kl),xi(t,"parallel",CI,ku),t.registerAction(kh,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),t.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})})}var kd=function(){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},kp=function(t){function e(e){return t.call(this,e)||this}return to(e,t),e.prototype.getDefaultShape=function(){return new kd},e.prototype.buildPath=function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},e.prototype.highlight=function(){sL(this)},e.prototype.downplay=function(){sO(this)},e}(aN),kf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._mainGroup=new rT,n._focusAdjacencyDisabled=!1,n}return to(e,t),e.prototype.init=function(t,e){this._controller=new bv(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,n){var i,r,o,a,s=this,l=t.getGraph(),h=this._mainGroup,u=t.layoutInfo,c=u.width,d=u.height,p=t.getData(),f=t.getData("edge"),g=t.get("orient");this._model=t,h.removeAll(),h.x=u.x,h.y=u.y,this._updateViewCoordSys(t,n),bI(t,n,h,this._controller,this._controllerHost,null),l.eachEdge(function(e){var n,i,r,o,a,s,l,u,p=new kp,m=si(p);m.dataIndex=e.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var y=e.getModel(),v=y.getModel("lineStyle"),x=v.get("curveness"),_=e.node1.getLayout(),b=e.node1.getModel(),w=b.get("localX"),S=b.get("localY"),M=e.node2.getLayout(),C=e.node2.getModel(),k=C.get("localX"),T=C.get("localY"),I=e.getLayout();p.shape.extent=Math.max(1,I.dy),p.shape.orient=g,"vertical"===g?(n=(null!=w?w*c:_.x)+I.sy,i=(null!=S?S*d:_.y)+_.dy,r=(null!=k?k*c:M.x)+I.ty,o=null!=T?T*d:M.y,a=n,s=i*(1-x)+o*x,l=r,u=i*x+o*(1-x)):(n=(null!=w?w*c:_.x)+_.dx,i=(null!=S?S*d:_.y)+I.sy,r=null!=k?k*c:M.x,o=(null!=T?T*d:M.y)+I.ty,a=n*(1-x)+r*x,s=i,l=n*x+r*(1-x),u=o),p.setShape({x1:n,y1:i,x2:r,y2:o,cpx1:a,cpy1:s,cpx2:l,cpy2:u}),p.useStyle(v.getItemStyle()),kg(p.style,g,e);var A=""+y.get("value"),D=s7(y,"edgeLabel");s9(p,D,{labelFetcher:{getFormattedLabel:function(e,n,i,r,o,a){return t.getFormattedLabel(e,n,"edge",r,tQ(o,D.normal&&D.normal.get("formatter"),A),a)}},labelDataIndex:e.dataIndex,defaultText:A}),p.setTextConfig({position:"inside"});var L=y.getModel("emphasis");sU(p,y,"lineStyle",function(t){var n=t.getItemStyle();return kg(n,g,e),n}),h.add(p),f.setItemGraphicEl(e.dataIndex,p);var O=L.get("focus");sF(p,"adjacency"===O?e.getAdjacentDataIndices():"trajectory"===O?e.getTrajectoryDataIndices():O,L.get("blurScope"),L.get("disabled"))}),l.eachNode(function(e){var n=e.getLayout(),i=e.getModel(),r=i.get("localX"),o=i.get("localY"),a=i.getModel("emphasis"),s=i.get(["itemStyle","borderRadius"])||0,l=new aq({shape:{x:null!=r?r*c:n.x,y:null!=o?o*d:n.y,width:n.dx,height:n.dy,r:s},style:i.getModel("itemStyle").getItemStyle(),z2:10});s9(l,s7(i),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(e,n,"node")}},labelDataIndex:e.dataIndex,defaultText:e.id}),l.disableLabelAnimation=!0,l.setStyle("fill",e.getVisual("color")),l.setStyle("decal",e.getVisual("style").decal),sU(l,i),h.add(l),p.setItemGraphicEl(e.dataIndex,l),si(l).dataType="node";var u=a.get("focus");sF(l,"adjacency"===u?e.getAdjacentDataIndices():"trajectory"===u?e.getTrajectoryDataIndices():u,a.get("blurScope"),a.get("disabled"))}),p.eachItemGraphicEl(function(e,i){p.getItemModel(i).get("draggable")&&(e.drift=function(e,r){s._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:p.getRawIndex(i),localX:this.shape.x/c,localY:this.shape.y/d})},e.ondragend=function(){s._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move")}),!this._data&&t.isAnimationEnabled()&&h.setClipPath((i=h.getBoundingRect(),r=t,o=function(){h.removeClipPath()},sQ(a=new aq({shape:{x:i.x-10,y:i.y-10,width:0,height:i.height+20}}),{shape:{width:i.width+20}},r,o),a)),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,e){var n=t.layoutInfo,i=n.width,r=n.height,o=t.coordinateSystem=new wE(null,{api:e,ecModel:t.ecModel});o.zoomLimit=t.get("scaleLimit"),o.setBoundingRect(0,0,i,r),o.setCenter(t.get("center")),o.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY})},e.type="sankey",e}(pw);function kg(t,e,n){switch(t.fill){case"source":t.fill=n.node1.getVisual("color"),t.decal=n.node1.getVisual("style").decal;break;case"target":t.fill=n.node2.getVisual("color"),t.decal=n.node2.getVisual("style").decal;break;case"gradient":var i=n.node1.getVisual("color"),r=n.node2.getVisual("color");tG(i)&&tG(r)&&(t.fill=new dP(0,0,+("horizontal"===e),+("vertical"===e),[{color:i,offset:0},{color:r,offset:1}]))}}var km=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=t.levels||[];this.levelModels=[];for(var o=this.levelModels,a=0;a<r.length;a++)null!=r[a].depth&&r[a].depth>=0&&(o[r[a].depth]=new lb(r[a],this,e));return MY(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})}).data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return ch("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return ch("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);return null==i.value&&"node"===n&&(i.value=this.getGraph().getNodeByIndex(e).getLayout().value),i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:hS.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:hS.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(cS);function ky(t,e){t.eachSeriesByType("sankey",function(t){var n,i,r,o,a,s,l,h,u,c,d=t.get("nodeWidth"),p=t.get("nodeGap"),f=hp(t,e).refContainer,g=hu(t.getBoxLayoutParams(),f);t.layoutInfo=g;var m=g.width,y=g.height,v=t.getGraph(),x=v.nodes,_=v.edges;tP(x,function(t){var e=Math.max(kk(t.outEdges,kC),kk(t.inEdges,kC),t.getValue()||0);t.setLayout({value:e},!0)});var b=0!==tE(x,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations");n=x,i=_,r=d,o=p,a=m,s=y,l=b,h=t.get("orient"),function(t,e,n,i,r,o,a){for(var s,l,h,u=[],c=[],d=[],p=[],f=0,g=0;g<e.length;g++)u[g]=1;for(var g=0;g<t.length;g++)c[g]=t[g].inEdges.length,0===c[g]&&d.push(t[g]);for(var m=-1;d.length;){for(var y=0;y<d.length;y++){var v=d[y],x=v.hostGraph.data.getRawDataItem(v.dataIndex),_=null!=x.depth&&x.depth>=0;_&&x.depth>m&&(m=x.depth),v.setLayout({depth:_?x.depth:f},!0),"vertical"===o?v.setLayout({dy:n},!0):v.setLayout({dx:n},!0);for(var b=0;b<v.outEdges.length;b++){var w=v.outEdges[b];u[e.indexOf(w)]=0;var S=w.node2,M=t.indexOf(S);0==--c[M]&&0>p.indexOf(S)&&p.push(S)}}++f,d=p,p=[]}for(var g=0;g<u.length;g++)if(1===u[g])throw Error("Sankey is a DAG, the original data has cycle!");var C=m>f-1?m:f-1;a&&"left"!==a&&function(t,e,n){if("right"===e){for(var i,r,o=[],a=t,s=0;a.length;){for(var l=0;l<a.length;l++){var h=a[l];h.setLayout({skNodeHeight:s},!0);for(var u=0;u<h.inEdges.length;u++){var c=h.inEdges[u];0>o.indexOf(c.node1)&&o.push(c.node1)}}a=o,o=[],++s}tP(t,function(t){kv(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else{"justify"===e&&(i=t,r=n,tP(i,function(t){kv(t)||t.outEdges.length||t.setLayout({depth:r},!0)}))}}(t,a,C),s=t,l="vertical"===o?(r-n)/C:(i-n)/C,h=o,tP(s,function(t){var e=t.getLayout().depth*l;"vertical"===h?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(n,i,r,a,s,h,t.get("nodeAlign")),function(t,e,n,i,r,o,a){var s,l,h,u,c,d,p,f,g,m,y,v=(s=t,l=[],h="vertical"===a?"y":"x",(u=oc(s,function(t){return t.getLayout()[h]})).keys.sort(function(t,e){return t-e}),tP(u.keys,function(t){l.push(u.buckets.get(t))}),l);c=v,d=e,p=n,f=i,g=r,m=a,y=1/0,tP(c,function(t){var e=t.length,n=0;tP(t,function(t){n+=t.getLayout().value});var i="vertical"===m?(f-(e-1)*g)/n:(p-(e-1)*g)/n;i<y&&(y=i)}),tP(c,function(t){tP(t,function(t,e){var n=t.getLayout().value*y;"vertical"===m?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),tP(d,function(t){var e=t.getValue()*y;t.setLayout({dy:e},!0)}),kx(v,r,n,i,a);for(var x=1;o>0;o--)(function(t,e,n){tP(t.slice().reverse(),function(t){tP(t,function(t){if(t.outEdges.length){var i=kk(t.outEdges,k_,n)/kk(t.outEdges,kC);if(isNaN(i)){var r=t.outEdges.length;i=r?kk(t.outEdges,kb,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-kM(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-kM(t,n))*e;t.setLayout({y:a},!0)}}})})})(v,x*=.99,a),kx(v,r,n,i,a),function(t,e,n){tP(t,function(t){tP(t,function(t){if(t.inEdges.length){var i=kk(t.inEdges,kw,n)/kk(t.inEdges,kC);if(isNaN(i)){var r=t.inEdges.length;i=r?kk(t.inEdges,kS,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-kM(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-kM(t,n))*e;t.setLayout({y:a},!0)}}})})}(v,x,a),kx(v,r,n,i,a)}(n,i,s,a,o,l,h),u=n,c="vertical"===h?"x":"y",tP(u,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[c]-e.node2.getLayout()[c]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[c]-e.node1.getLayout()[c]})}),tP(u,function(t){var e=0,n=0;tP(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),tP(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})})}function kv(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function kx(t,e,n,i,r){var o="vertical"===r?"x":"y";tP(t,function(t){t.sort(function(t,e){return t.getLayout()[o]-e.getLayout()[o]});for(var a,s,l,h=0,u=t.length,c="vertical"===r?"dx":"dy",d=0;d<u;d++)(l=h-(s=t[d]).getLayout()[o])>0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),h=s.getLayout()[o]+s.getLayout()[c]+e;if((l=h-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),h=a;for(var d=u-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-h)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),h=s.getLayout()[o]}})}function k_(t,e){return kM(t.node2,e)*t.getValue()}function kb(t,e){return kM(t.node2,e)}function kw(t,e){return kM(t.node1,e)*t.getValue()}function kS(t,e){return kM(t.node1,e)}function kM(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function kC(t){return t.getValue()}function kk(t,e,n){for(var i=0,r=t.length,o=-1;++o<r;){var a=+e(t[o],n);isNaN(a)||(i+=a)}return i}function kT(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),n=e.nodes,i=e.edges;if(n.length){var r=1/0,o=-1/0;tP(n,function(t){var e=t.getLayout().value;e<r&&(r=e),e>o&&(o=e)}),tP(n,function(e){var n=new SL({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))})}i.length&&tP(i,function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)})})}var kI=function(){function t(){}return t.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&null!=e.get(t)},t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!this._hasEncodeRule("x")):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var l=["x","y"],h=+("horizontal"!==t.layout),u=this._baseAxisDim=l[h],c=l[1-h],d=[r,o],p=d[h].get("type"),f=d[1-h].get("type"),g=t.data;if(g&&i){var m=[];tP(g,function(t,e){var n;tW(t)?(n=t.slice(),t.unshift(e)):tW(t.value)?((n=tI({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,m.push(n)}),t.data=m}var y=this.defaultValueDimensions,v=[{name:u,type:m9(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:m9(f),dimsDef:y.slice()}];return vH(this,{coordDimensions:v,dimensionsCount:y.length+1,encodeDefaulter:tF(hW,v,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),kA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return to(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:hS.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:hS.color.shadow}},animationDuration:800},e}(cS);tL(kA,kI,!0);var kD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a=+("horizontal"===t.get("layout"));i.diff(o).add(function(t){if(i.hasValue(t)){var e=kP(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(!i.hasValue(t))return void r.remove(n);var s=i.getItemLayout(t);n?(s3(n),kR(s,n,i,t)):n=kP(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},e.type="boxplot",e}(pw),kL=function(){},kO=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return to(e,t),e.prototype.getDefaultShape=function(){return new kL},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(aN);function kP(t,e,n,i,r){var o,a,s,l=t.ends,h=new kO({shape:{points:r?(o=l,a=i,s=t,tR(o,function(t){return(t=t.slice())[a]=s.initBaseline,t})):l}});return kR(t,h,e,n,r),h}function kR(t,e,n,i,r){var o=n.hostModel;(0,ti[r?"initProps":"updateProps"])(e,{shape:{points:t.ends}},o,i),e.useStyle(n.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;var a=n.getItemModel(i),s=a.getModel("emphasis");sU(e,a),sF(e,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function kN(t){var e,n;tP((e=[],n=[],t.eachSeriesByType("boxplot",function(t){var i=t.getBaseAxis(),r=tD(n,i);r<0&&(r=n.length,n[r]=i,e[r]={axis:i,seriesModels:[]}),e[r].seriesModels.push(t)}),e),function(t){var e=t.seriesModels;e.length&&(function(t){var e,n=t.axis,i=t.seriesModels,r=i.length,o=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];if("category"===n.type)e=n.getBandWidth();else{var l=0;tP(i,function(t){l=Math.max(l,t.getData().count())});var h=n.getExtent();e=Math.abs(h[1]-h[0])/l}tP(i,function(t){var n=t.get("boxWidth");tW(n)||(n=[n,n]),s.push([rE(n[0],e)||0,rE(n[1],e)||0])});var u=.8*e-2,c=u/r*.3,d=(u-c*(r-1))/r,p=d/2-u/2;tP(i,function(t,e){a.push(p),p+=c+d,o.push(Math.min(Math.max(d,s[e][0]),s[e][1]))})}(t),tP(e,function(e,n){!function(t,e,n){var i=t.coordinateSystem,r=t.getData(),o=n/2,a=+("horizontal"!==t.get("layout")),s=1-a,l=["x","y"],h=r.mapDimension(l[a]),u=r.mapDimensionsAll(l[s]);if(null!=h&&!(u.length<5))for(var c=0;c<r.count();c++){var d=r.get(h,c),p=x(d,u[2],c),f=x(d,u[0],c),g=x(d,u[1],c),m=x(d,u[3],c),y=x(d,u[4],c),v=[];_(v,g,!1),_(v,m,!0),v.push(f,g,y,m),b(v,f),b(v,y),b(v,p),r.setItemLayout(c,{initBaseline:p[s],ends:v})}function x(t,n,o){var l,h=r.get(n,o),u=[];return u[a]=t,u[s]=h,isNaN(t)||isNaN(h)?l=[NaN,NaN]:(l=i.dataToPoint(u),l[a]+=e),l}function _(t,e,n){var i=e.slice(),r=e.slice();i[a]+=o,r[a]-=o,n?t.push(i,r):t.push(r,i)}function b(t,e){var n=e.slice(),i=e.slice();n[a]-=o,i[a]+=o,t.push(n,i)}}(e,t.boxOffsetList[n],t.boxWidthList[n])}))})}var kE={type:"echarts:boxplot",transform:function(t){var e=t.upstream;e.sourceFormat!==hR&&uC("");var n=function(t,e){for(var n=[],i=[],r=(e=e||{}).boundIQR,o="none"===r||0===r,a=0;a<t.length;a++){var s=rV(t[a].slice()),l=rZ(s,.25),h=rZ(s,.5),u=rZ(s,.75),c=s[0],d=s[s.length-1],p=(null==r?1.5:r)*(u-l),f=o?c:Math.max(c,l-p),g=o?d:Math.min(d,u+p),m=e.itemNameFormatter,y=tH(m)?m({value:a}):tG(m)?m.replace("{value}",a+""):a+"";n.push([y,f,l,h,u,g]);for(var v=0;v<s.length;v++){var x=s[v];if(x<f||x>g){var _=[y,x];i.push(_)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}},kB=["itemStyle","borderColor"],kz=["itemStyle","borderColor0"],kV=["itemStyle","borderColorDoji"],kF=["itemStyle","color"],kW=["itemStyle","color0"];function kH(t,e){return e.get(t>0?kF:kW)}function kG(t,e){return e.get(0===t?kV:t>0?kB:kz)}var kU={seriesType:"candlestick",plan:cO(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var n;null!=(n=t.next());){var i=e.getItemModel(n),r=e.getItemLayout(n).sign,o=i.getItemStyle();o.fill=kH(r,i),o.stroke=kG(r,i)||o.fill,tI(e.ensureUniqueItemVisual(n,"style"),o)}}}}},kj=["color","borderColor"],kY=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){pd(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e!==this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add(function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(!(o&&kK(s,a))){var l=kq(a,n,!0);sQ(l,{shape:{points:a.ends}},t,n),k$(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}}}).update(function(a,l){var h=n.getItemGraphicEl(l);if(!e.hasValue(a))return void i.remove(h);var u=e.getItemLayout(a);o&&kK(s,u)?i.remove(h):(h?(sJ(h,{shape:{points:u.ends}},t,a),s3(h)):h=kq(u,a),k$(h,e,a,r),i.add(h),e.setItemGraphicEl(a,h))}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),k0(t,this.group);var e=t.get("clip",!0)?yH(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=kq(i.getItemLayout(n),n);k$(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){k0(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(pw),kX=function(){},kZ=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return to(e,t),e.prototype.getDefaultShape=function(){return new kX},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(aN);function kq(t,e,n){var i,r,o=t.ends;return new kZ({shape:{points:n?(i=o,r=t,tR(i,function(t){return(t=t.slice())[1]=r.initBaseline,t})):o},z2:100})}function kK(t,e){for(var n=!0,i=0;i<e.ends.length;i++)if(t.contain(e.ends[i][0],e.ends[i][1])){n=!1;break}return n}function k$(t,e,n,i){var r=e.getItemModel(n);t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.__simpleBox=i,sU(t,r);var o=e.getItemLayout(n).sign;tP(t.states,function(t,e){var n=r.getModel(e),i=kH(o,n),a=kG(o,n)||i,s=t.style||(t.style={});i&&(s.fill=i),a&&(s.stroke=a)});var a=r.getModel("emphasis");sF(t,a.get("focus"),a.get("blurScope"),a.get("disabled"))}var kJ=function(){},kQ=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeCandlestickBox",n}return to(e,t),e.prototype.getDefaultShape=function(){return new kJ},e.prototype.buildPath=function(t,e){for(var n=e.points,i=0;i<n.length;)if(this.__sign===n[i++]){var r=n[i++];t.moveTo(r,n[i++]),t.lineTo(r,n[i++])}else i+=3},e}(aN);function k0(t,e,n,i){var r=t.getData(),o=r.getLayout("largePoints"),a=new kQ({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});e.add(a);var s=new kQ({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new kQ({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});e.add(l),k1(1,a,t,r),k1(-1,s,t,r),k1(0,l,t,r),i&&(a.incremental=!0,s.incremental=!0),n&&n.push(a,s)}function k1(t,e,n,i){var r=kG(t,n)||kH(t,n),o=n.getModel("itemStyle").getItemStyle(kj);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var k2=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return to(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(cS);function k5(t){t&&tW(t.series)&&tP(t.series,function(t){tY(t)&&"k"===t.type&&(t.type="candlestick")})}tL(k2,kI,!0);var k3={seriesType:"candlestick",plan:cO(),reset:function(t){var e,n,i,r,o,a,s,l,h=t.coordinateSystem,u=t.getData(),c=(e=t,n=u,o="category"===(r=e.getBaseAxis()).type?r.getBandWidth():Math.abs((i=r.getExtent())[1]-i[0])/n.count(),a=rE(tJ(e.get("barMaxWidth"),o),o),s=rE(tJ(e.get("barMinWidth"),1),o),null!=(l=e.get("barWidth"))?rE(l,o):Math.max(Math.min(o/2,a),s)),d=u.getDimensionIndex(u.mapDimension("x")),p=tR(u.mapDimensionsAll("y"),u.getDimensionIndex,u),f=p[0],g=p[1],m=p[2],y=p[3];if(u.setLayout({candleWidth:c,isSimpleBox:c<=1.3}),!(d<0)&&!(p.length<4))return{progress:t.pipelineContext.large?function(e,n){for(var i,r,o=yL(4*e.count),a=0,s=[],l=[],u=n.getStore(),c=!!t.get(["itemStyle","borderColorDoji"]);null!=(r=e.next());){var p=u.get(d,r),v=u.get(f,r),x=u.get(g,r),_=u.get(m,r),b=u.get(y,r);if(isNaN(p)||isNaN(_)||isNaN(b)){o[a++]=NaN,a+=3;continue}o[a++]=k4(u,r,v,x,g,c),s[0]=p,s[1]=_,i=h.dataToPoint(s,null,l),o[a++]=i?i[0]:NaN,o[a++]=i?i[1]:NaN,s[1]=b,i=h.dataToPoint(s,null,l),o[a++]=i?i[1]:NaN}n.setLayout("largePoints",o)}:function(t,e){for(var n,i=e.getStore();null!=(n=t.next());){var r=i.get(d,n),o=i.get(f,n),a=i.get(g,n),s=i.get(m,n),l=i.get(y,n),u=Math.min(o,a),p=Math.max(o,a),v=M(u,r),x=M(p,r),_=M(s,r),b=M(l,r),w=[];C(w,x,0),C(w,v,1),w.push(k(b),k(x),k(_),k(v));var S=!!e.getItemModel(n).get(["itemStyle","borderColorDoji"]);e.setItemLayout(n,{sign:k4(i,n,o,a,g,S),initBaseline:o>a?x[1]:v[1],ends:w,brushRect:function(t,e,n){var i=M(t,n),r=M(e,n);return i[0]-=c/2,r[0]-=c/2,{x:i[0],y:i[1],width:c,height:r[1]-i[1]}}(s,l,r)})}function M(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:h.dataToPoint(n)}function C(t,e,n){var i=e.slice(),r=e.slice();i[0]=d6(i[0]+c/2,1,!1),r[0]=d6(r[0]-c/2,1,!0),n?t.push(i,r):t.push(r,i)}function k(t){return t[0]=d6(t[0],1),t}}}}};function k4(t,e,n,i,r,o){return n>i?-1:n<i?1:o?0:e>0?t.get(r,e-1)<=i?1:-1:1}function k8(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var k6=function(t){function e(e,n){var i=t.call(this)||this,r=new yb(e,n),o=new rT;return i.add(r),i.add(o),i.updateData(e,n),i}return to(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),o=0;o<i;o++){var a=fg(e,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-o/i*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),r.add(a)}k8(r,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],r=0;r<i.length;r++){var o=i[r];if(e[o]!==t[o]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}k8(n,t)},e.prototype.highlight=function(){sL(this)},e.prototype.downplay=function(){sO(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,e){var n=this,i=t.hostModel;this.childAt(0).updateData(t,e);var r=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=fm(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"style"),h=l&&l.fill,u=o.getModel("emphasis");r.setScale(s),r.traverse(function(t){t.setStyle("fill",h)});var c=fy(t.getItemVisual(e,"symbolOffset"),s);c&&(r.x=c[0],r.y=c[1]),r.rotation=(t.getItemVisual(e,"symbolRotate")||0)*Math.PI/180||0;var d={};d.showEffectOn=i.get("showEffectOn"),d.rippleScale=o.get(["rippleEffect","scale"]),d.brushType=o.get(["rippleEffect","brushType"]),d.period=1e3*o.get(["rippleEffect","period"]),d.effectOffset=e/t.count(),d.z=i.getShallow("z")||0,d.zlevel=i.getShallow("zlevel")||0,d.symbolType=a,d.color=h,d.rippleEffectColor=o.get(["rippleEffect","color"]),d.rippleNumber=o.get(["rippleEffect","number"]),"render"===d.showEffectOn?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==d.showEffectOn&&n.startEffectAnimation(d):"normal"===t&&"render"!==d.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=d,sF(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(rT),k9=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(){this._symbolDraw=new yk(k6)},e.prototype.render=function(t,e,n){var i=t.getData(),r=this._symbolDraw;r.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(r.group)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,e,n){var i=t.getData();this.group.dirty();var r=yQ("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var e,n,i=t.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=(e=i.getRoamTransform(),eq(n=eX(),e),n),this.group.decomposeTransform())},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(pw),k7=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return to(e,t),e.prototype.getInitialData=function(t,e){return yy(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(cS),Tt=function(t){function e(e,n,i){var r=t.call(this)||this;return r.add(r.createLine(e,n,i)),r._updateEffectSymbol(e,n),r}return to(e,t),e.prototype.createLine=function(t,e,n){return new Mk(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");tW(i)||(i=[i,i]);var o=t.getItemVisual(e,"style"),a=n.get("color")||o&&o.stroke,s=this.childAt(1);this._symbolType!==r&&(this.remove(s),(s=fg(r,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.scaleX=i[0],s.scaleY=i[1],s.setColor(a),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var r=t.getItemLayout(n),o=1e3*e.get("period"),a=e.get("loop"),s=e.get("roundTrip"),l=e.get("constantSpeed"),h=t$(e.get("delay"),function(e){return e/t.count()*o/3});if(i.ignore=!0,this._updateAnimationPoints(i,r),l>0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var u=void 0;u=tH(h)?h(n):h,i.__t>0&&(u=-o*i.__t),this._animateSymbol(i,o,u,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,r){if(e>0){t.__t=0;var o=this,a=t.animate("",i).when(r?2*e:e,{__t:r?2:1}).delay(n).during(function(){o._updateSymbolPosition(t)});i||a.done(function(){o.remove(t)}),a.start()}},e.prototype._getLineLength=function(t){return eg(t.__p1,t.__cp1)+eg(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],a=o.slice();o[0]=nj(e[0],i[0],n[0],r),o[1]=nj(e[1],i[1],n[1],r);var s=t.__t<1?nY(e[0],i[0],n[0],r):nY(n[0],i[0],e[0],1-r),l=t.__t<1?nY(e[1],i[1],n[1],r):nY(n[1],i[1],e[1],1-r);t.rotation=-Math.atan2(l,s)-Math.PI/2,("line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)&&(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*eg(a,o),1===r&&(o[0]=a[0]+(o[0]-a[0])/2,o[1]=a[1]+(o[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*eg(e,o):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=o[0],t.y=o[1]},e.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},e}(rT),Te=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createPolyline(e,n,i),r}return to(e,t),e.prototype._createPolyline=function(t,e,n){var i=new dv({shape:{points:t.getItemLayout(e)}});this.add(i),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel;sJ(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},e.prototype._updateCommonStl=function(t,e,n){var i=this.childAt(0),r=t.getItemModel(e),o=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var h=r.getModel("emphasis");o=h.getModel("lineStyle").getLineStyle(),l=h.get("disabled"),a=h.get("focus"),s=h.get("blurScope")}i.useStyle(t.getItemVisual(e,"style")),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=o,sF(this,a,s,l)},e.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},e}(rT),Tn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return to(e,t),e.prototype.createLine=function(t,e,n){return new Te(t,e,n)},e.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,r=1;r<e.length;r++)i+=eg(e[r-1],e[r]),n.push(i);if(0===i){this._length=0;return}for(var r=0;r<n.length;r++)n[r]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var e,n=t.__t<1?t.__t:2-t.__t,i=this._points,r=this._offsets,o=i.length;if(r){var a=this._lastFrame;if(n<this._lastFramePercent){for(e=Math.min(a+1,o-1);e>=0&&!(r[e]<=n);e--);e=Math.min(e,o-2)}else{for(e=a;e<o&&!(r[e]>n);e++);e=Math.min(e-1,o-2)}var s=(n-r[e])/(r[e+1]-r[e]),l=i[e],h=i[e+1];t.x=l[0]*(1-s)+s*h[0],t.y=l[1]*(1-s)+s*h[1];var u=t.__t<1?h[0]-l[0]:l[0]-h[0],c=t.__t<1?h[1]-l[1]:l[1]-h[1];t.rotation=-Math.atan2(c,u)-Math.PI/2,this._lastFrame=e,this._lastFramePercent=n,t.ignore=!1}},e}(Tt),Ti=function(){this.polyline=!1,this.curveness=0,this.segs=[]},Tr=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return to(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:hS.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Ti},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n<i.length;){var o=i[n++];if(o>0){t.moveTo(i[n++],i[n++]);for(var a=1;a<o;a++)t.lineTo(i[n++],i[n++])}}else for(n=this._off;n<i.length;){var s=i[n++],l=i[n++],h=i[n++],u=i[n++];if(t.moveTo(s,l),r>0){var c=(s+h)/2-(l-u)*r,d=(l+u)/2-(h-s)*r;t.quadraticCurveTo(c,d,h,u)}else t.lineTo(h,u)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<i.length;){var l=i[s++];if(l>0)for(var h=i[s++],u=i[s++],c=1;c<l;c++){var d=i[s++],p=i[s++];if(ab(h,u,d,p,o,t,e))return a}a++}else for(var a=0,s=0;s<i.length;){var h=i[s++],u=i[s++],d=i[s++],p=i[s++];if(r>0){var f=(h+d)/2-(u-p)*r,g=(u+p)/2-(d-h)*r;if(aw(h,u,f,g,d,p,o,t,e))return a}else if(ab(h,u,d,p,o,t,e))return a;a++}return -1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return(t=n[0],e=n[1],i.contain(t,e))?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a<e.length;){var s=e[a++],l=e[a++];n=Math.min(s,n),r=Math.max(s,r),i=Math.min(l,i),o=Math.max(l,o)}t=this._rect=new nu(n,i,r,o)}return t},e}(aN),To=function(){function t(){this.group=new rT}return t.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,e){var n=this._newAdded[0],i=e.getLayout("linesPoints"),r=n&&n.shape.segs;if(r&&r.length<2e4){var o=r.length,a=new Float32Array(o+i.length);a.set(r),a.set(i,o),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:i}),this._setCommon(s,e),s.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new Tr({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("style");r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null);var o=si(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){o.dataIndex=null;var n=t.hoverDataIdx;n>0&&(o.dataIndex=n+t.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Ta={seriesType:"lines",plan:cO(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var h=0,u=r.start;u<r.end;u++)h+=t.getLineCoordsCount(u);s=new Float32Array(l+2*h)}else s=new Float32Array(4*l);for(var c=0,d=[],u=r.start;u<r.end;u++){var p=t.getLineCoords(u,a);n&&(s[c++]=p);for(var f=0;f<p;f++)d=e.dataToPoint(a[f],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setLayout("linesPoints",s)}else for(var u=r.start;u<r.end;u++){var g=o.getItemModel(u),p=t.getLineCoords(u,a),m=[];if(n)for(var y=0;y<p;y++)m.push(e.dataToPoint(a[y]));else{m[0]=e.dataToPoint(a[0]),m[1]=e.dataToPoint(a[1]);var v=g.get(["lineStyle","curveness"]);+v&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*v,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*v])}o.setItemLayout(u,m)}}}}}},Ts=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._updateLineDraw(i,t),o=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a>0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var h=t.get("clip",!0)&&yH(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=Ta.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new To:new MT(r?i?Tn:Te:i?Tt:Mk),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"!==e.painter.getType()&&null!=this._lastZlevel&&e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(pw),Tl="u"<typeof Uint32Array?Array:Uint32Array,Th="u"<typeof Float64Array?Array:Float64Array;function Tu(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=tR(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),tT([e,t[0],t[1]])}))}var Tc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return to(e,t),e.prototype.init=function(e){e.data=e.data||[],Tu(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(Tu(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=t7(this._flatCoords,e.flatCoords),this._flatCoordsOffset=t7(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r<i;r++)e[r]=e[r]||[],e[r][0]=this._flatCoords[n+2*r],e[r][1]=this._flatCoords[n+2*r+1];return i}for(var o=this._getCoordsFromItemModel(t),r=0;r<o.length;r++)e[r]=e[r]||[],e[r][0]=o[r][0],e[r][1]=o[r][1];return o.length},e.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),tj(t[0])){for(var n=t.length,i=new Tl(n),r=new Th(n),o=0,a=0,s=0,l=0;l<n;){s++;var h=t[l++];i[a++]=o+e,i[a++]=h;for(var u=0;u<h;u++){var c=t[l++],d=t[l++];r[o++]=c,r[o++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){var n=new yu(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(t,e,i,r){if(t instanceof Array)return NaN;n.hasItemOption=!0;var o=t.value;if(null!=o)return o instanceof Array?o[r]:o}),n},e.prototype.formatTooltip=function(t,e,n){var i=this.getData().getItemModel(t),r=i.get("name");if(r)return r;var o=i.get("fromName"),a=i.get("toName"),s=[];return null!=o&&s.push(o),null!=a&&s.push(a),ch("nameValue",{name:s.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(cS);function Td(t){return t instanceof Array||(t=[t,t]),t}var Tp={seriesType:"lines",reset:function(t){var e=Td(t.get("symbol")),n=Td(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=Td(n.getShallow("symbol",!0)),r=Td(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}},Tf=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=tc.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),h=this.pointSize+this.blurSize,u=this.canvas,c=u.getContext("2d"),d=t.length;u.width=e,u.height=n;for(var p=0;p<d;++p){var f=t[p],g=f[0],m=f[1],y=i(f[2]);c.globalAlpha=y,c.drawImage(a,g-h,m-h)}if(!u.width||!u.height)return u;for(var v=c.getImageData(0,0,u.width,u.height),x=v.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){var y=x[_+3]/256,M=4*Math.floor(255*y);if(y>0){var C=o(y)?s:l;y>0&&(y=y*S+w),x[_++]=C[M],x[_++]=C[M+1],x[_++]=C[M+2],x[_++]=C[M+3]*y*256}else _+=4}return c.putImageData(v,0,0),u},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=tc.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=hS.color.neutral99,i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function Tg(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var Tm=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(n){n===t&&(i=e)})}),this._progressiveEls=null,this.group.removeAll();var i,r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type||"matrix"===r.type?this._renderOnGridLike(t,n,0,t.getData().count()):Tg(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(Tg(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnGridLike(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){pd(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,e,n,i,r){var o,a,s,l,h=t.coordinateSystem,u=yG(h,"cartesian2d"),c=yG(h,"matrix");if(u){var d=h.getAxis("x"),p=h.getAxis("y");o=d.getBandWidth()+.5,a=p.getBandWidth()+.5,s=d.scale.getExtent(),l=p.scale.getExtent()}for(var f=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),_=s7(t),b=t.getModel("emphasis"),w=b.get("focus"),S=b.get("blurScope"),M=b.get("disabled"),C=u||c?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],k=n;k<i;k++){var T=void 0,I=g.getItemVisual(k,"style");if(u){var A=g.get(C[0],k),D=g.get(C[1],k);if(isNaN(g.get(C[2],k))||isNaN(A)||isNaN(D)||A<s[0]||A>s[1]||D<l[0]||D>l[1])continue;var L=h.dataToPoint([A,D]);T=new aq({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:I})}else if(c){var O,P=h.dataToLayout([g.get(C[0],k),g.get(C[1],k)]).rect;if((O=P.x)!=O)continue;T=new aq({z2:1,shape:P,style:I})}else{if(isNaN(g.get(C[1],k)))continue;var R,N,E=h.dataToLayout([g.get(C[0],k)]),P=E.contentRect||E.rect;if((R=P.x)!=R||(N=P.y)!=N)continue;T=new aq({z2:1,shape:P,style:I})}if(g.hasItemOption){var B=g.getItemModel(k),z=B.getModel("emphasis");m=z.getModel("itemStyle").getItemStyle(),y=B.getModel(["blur","itemStyle"]).getItemStyle(),v=B.getModel(["select","itemStyle"]).getItemStyle(),x=B.get(["itemStyle","borderRadius"]),w=z.get("focus"),S=z.get("blurScope"),M=z.get("disabled"),_=s7(B)}T.shape.r=x;var V=t.getRawValue(k),F="-";V&&null!=V[2]&&(F=V[2]+""),s9(T,_,{labelFetcher:t,labelDataIndex:k,defaultOpacity:I.opacity,defaultText:F}),T.ensureState("emphasis").style=m,T.ensureState("blur").style=y,T.ensureState("select").style=v,sF(T,w,S,M),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),f.add(T),g.setItemGraphicEl(k,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,n,i){var r,o,a,s,l,h,u,c=n.targetVisuals.inRange,d=n.targetVisuals.outOfRange,p=e.getData(),f=this._hmLayer||this._hmLayer||new Tf;f.blurSize=e.get("blurSize"),f.pointSize=e.get("pointSize"),f.minOpacity=e.get("minOpacity"),f.maxOpacity=e.get("maxOpacity");var g=t.getViewRect().clone(),m=t.getRoamTransform();g.applyTransform(m);var y=Math.max(g.x,0),v=Math.max(g.y,0),x=Math.min(g.width+g.x,i.getWidth()),_=Math.min(g.height+g.y,i.getHeight()),b=x-y,w=_-v,S=[p.mapDimension("lng"),p.mapDimension("lat"),p.mapDimension("value")],M=p.mapArray(S,function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=y,r[1]-=v,r.push(i),r}),C=n.getExtent(),k="visualMap.continuous"===n.type?(r=n.option.range,o=C[1]-C[0],r=[(r[0]-C[0])/o,(r[1]-C[0])/o],function(t){return t>=r[0]&&t<=r[1]}):(a=n.getPieceList(),s=n.option.selected,l=C[1]-C[0],h=(a=tR(a,function(t){return{interval:[(t.interval[0]-C[0])/l,(t.interval[1]-C[0])/l]}})).length,u=0,function(t){var e;for(e=u;e<h;e++){var n=a[e].interval;if(n[0]<=t&&t<=n[1]){u=e;break}}if(e===h)for(e=u-1;e>=0;e--){var n=a[e].interval;if(n[0]<=t&&t<=n[1]){u=e;break}}return e>=0&&e<h&&s[e]});f.update(M,b,w,c.color.getNormalizer(),{inRange:c.color.getColorMapper(),outOfRange:d.color.getColorMapper()},k);var T=new aW({style:{width:b,height:w,x:y,y:v,image:f.canvas},silent:!0});this.group.add(T)},e.type="heatmap",e}(pw),Ty=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.getInitialData=function(t,e){return yy(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ht.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:hS.color.primary}}},e}(cS),Tv=["itemStyle","borderWidth"],Tx=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],T_=new c0,Tb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Tx[+s],categoryDim:Tx[1-s]};r.diff(o).add(function(t){if(r.hasValue(t)){var e=TA(r,t),n=Tw(r,t,e,h),o=TO(r,h,n);r.setItemGraphicEl(t,o),i.add(o),TB(o,h,n)}}).update(function(t,e){var n,a,s,l,u,c=o.getItemGraphicEl(e);if(!r.hasValue(t))return void i.remove(c);var d=TA(r,t),p=Tw(r,t,d,h),f=TR(r,p);c&&f!==c.__pictorialShapeStr&&(i.remove(c),r.setItemGraphicEl(t,null),c=null),c?(n=c,a=h,l=(s=p).animationModel,u=s.dataIndex,sJ(n.__pictorialBundle,{x:s.bundlePosition[0],y:s.bundlePosition[1]},l,u),s.symbolRepeat?TC(n,a,s,!0):Tk(n,a,s,!0),TT(n,s,!0),TI(n,a,s,!0)):c=TO(r,h,p,!0),r.setItemGraphicEl(t,c),c.__pictorialSymbolMeta=p,i.add(c),TB(c,h,p)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&TP(o,t,e.__pictorialSymbolMeta.animationModel,e)}).execute();var u=t.get("clip",!0)?yH(t.coordinateSystem,!1,t):null;return u?i.setClipPath(u):i.removeClipPath(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){TP(i,si(e).dataIndex,t,e)}):n.removeAll()},e.type="pictorialBar",e}(pw);function Tw(t,e,n,i){var r,o,a,s,l,h,u,c,d,p,f,g,m,y,v,x,_,b,w,S,M,C=t.getItemLayout(e),k=n.get("symbolRepeat"),T=n.get("symbolClip"),I=n.get("symbolPosition")||"start",A=(n.get("symbolRotate")||0)*Math.PI/180||0,D=n.get("symbolPatternSize")||2,L=n.isAnimationEnabled(),O={dataIndex:e,layout:C,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:T,symbolRepeat:k,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:D,rotation:A,animationModel:L?n:null,hoverScale:L&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};(function(t,e,n,i,r){var o,a=i.valueDim,s=t.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),h=l.toGlobalCoord(l.dataToCoord(0)),u=1-(n[a.wh]<=0);if(tW(s)){var c=[TS(l,s[0])-h,TS(l,s[1])-h];c[1]<c[0]&&c.reverse(),o=c[u]}else o=null!=s?TS(l,s)-h:e?i.coordSysExtent[a.index][u]-h:n[a.wh];r.boundingLength=o,e&&(r.repeatCutLength=n[a.wh]);var d="x"===a.xy,p=l.inverse;r.pxSign=d&&!p||!d&&p?o>=0?1:-1:o>0?1:-1})(n,k,C,i,O),r=t,o=e,a=C,s=k,l=O.boundingLength,h=O.pxSign,u=D,c=i,d=O,f=c.valueDim,m=Math.abs(a[(g=c.categoryDim).wh]),(p=tW(y=r.getItemVisual(o,"symbolSize"))?y.slice():null==y?["100%","100%"]:[y,y])[g.index]=rE(p[g.index],m),p[f.index]=rE(p[f.index],s?m:Math.abs(l)),d.symbolSize=p,v=d.symbolScale=[p[0]/u,p[1]/u],v[f.index]*=(c.isHorizontal?-1:1)*h,x=n,_=O.symbolScale,b=A,w=i,S=O,(M=x.get(Tv)||0)&&(T_.attr({scaleX:_[0],scaleY:_[1],rotation:b}),T_.updateTransform(),M/=T_.getLineScale(),M*=_[w.valueDim.index]),S.valueLineWidth=M||0;var P=O.symbolSize,R=fy(n.get("symbolOffset"),P);return function(t,e,n,i,r,o,a,s,l,h,u){var c=h.categoryDim,d=h.valueDim,p=u.pxSign,f=Math.max(e[d.index]+a,0),g=f;if(i){var m=Math.abs(s),y=t$(t.get("symbolMargin"),"15%")+"",v=!1;y.lastIndexOf("!")===y.length-1&&(v=!0,y=y.slice(0,y.length-1));var x=rE(y,e[d.index]),_=Math.max(f+2*x,0),b=v?0:2*x,w=r$(i),S=w?i:Tz((m+b)/_);x=(m-S*f)/2/(v?S:Math.max(S-1,1)),_=f+2*x,b=v?0:2*x,w||"fixed"===i||(S=l?Tz((Math.abs(l)+b)/_):0),g=S*_-b,u.repeatTimes=S,u.symbolMargin=x}var M=g/2*p,C=u.pathPosition=[];C[c.index]=n[c.wh]/2,C[d.index]="start"===o?M:"end"===o?s-M:s/2,r&&(C[0]+=r[0],C[1]+=r[1]);var k=u.bundlePosition=[];k[c.index]=n[c.xy],k[d.index]=n[d.xy];var T=u.barRectShape=tI({},n);T[d.wh]=p*Math.max(Math.abs(n[d.wh]),Math.abs(C[d.index]+M)),T[c.wh]=n[c.wh];var I=u.clipShape={};I[c.xy]=-n[c.xy],I[c.wh]=h.ecSize[c.wh],I[d.xy]=0,I[d.wh]=n[d.wh]}(n,P,C,k,R,I,O.valueLineWidth,O.boundingLength,O.repeatCutLength,i,O),O}function TS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function TM(t){var e=t.symbolPatternSize,n=fg(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function TC(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,h=n.repeatTimes||0,u=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(TN(t,function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u<h?TE(t,null,f(u),n,i):TE(t,null,{scaleX:0,scaleY:0},n,i,function(){r.remove(t)}),u++});u<h;u++){var d=TM(n);d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=h,r.add(d);var p=f(u);TE(d,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,i)}function f(t){var e=s.slice(),i=n.pxSign,r=t;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(r=h-1-t),e[l.index]=c*(r-h/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Tk(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?TE(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=TM(n),r.add(o),TE(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function TT(t,e,n){var i=tI({},e.barRectShape),r=t.__pictorialBarRect;r?TE(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new aq({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function TI(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=tI({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)sJ(r,{shape:o},s,l);else{o[a.wh]=0,r=new aq({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var h={};h[a.wh]=n.clipShape[a.wh],ti[i?"updateProps":"initProps"](r,{shape:h},s,l)}}}function TA(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=TD,n.isAnimationEnabled=TL,n}function TD(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function TL(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function TO(t,e,n,i){var r=new rT,o=new rT;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?TC(r,e,n):Tk(r,e,n),TT(r,n,i),TI(r,e,n,i),r.__pictorialShapeStr=TR(t,n),r.__pictorialSymbolMeta=n,r}function TP(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];TN(i,function(t){o.push(t)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),tP(o,function(t){s1(t,{scaleX:0,scaleY:0},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function TR(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function TN(t,e,n){tP(t.__pictorialBundle.children(),function(i){i!==t.__pictorialBarRect&&e.call(n,i)})}function TE(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ti[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function TB(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),h=r.getShallow("cursor"),u=o.get("focus"),c=o.get("blurScope"),d=o.get("scale");TN(t,function(t){if(t instanceof aW){var e=t.style;t.useStyle(tI({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,h&&(t.cursor=h),t.z2=n.z2});var p=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,s9(f,s7(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:yx(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),sF(t,u,c,o.get("disabled"))}function Tz(t){var e=Math.round(t);return 1e-4>Math.abs(t-e)?e:Math.ceil(t)}var TV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return to(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=lM(vi.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:hS.color.primary}}}),e}(vi),TF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return to(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,h=s.boundaryGap;function u(t){return t.name}o.x=0,o.y=l.y+h[0];var c=new m4(this._layersSeries||[],a,u,u),d=[];function p(e,n,s){var l,h,u=r._layers;if("remove"===e)return void o.remove(u[n]);for(var c=[],p=[],f=a[n].indices,g=0;g<f.length;g++){var m=i.getItemLayout(f[g]),y=m.x,v=m.y0,x=m.y;c.push(y,v),p.push(y,v+x),l=i.getItemVisual(f[g],"style")}var _=i.getItemLayout(f[0]),b=t.getModel("label").get("margin"),w=t.getModel("emphasis");if("add"===e){var S,M,C,k,T=d[n]=new rT;h=new yV({shape:{points:c,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),T.add(h),o.add(T),t.isAnimationEnabled()&&h.setClipPath((S=h.getBoundingRect(),M=t,C=function(){h.removeClipPath()},sQ(k=new aq({shape:{x:S.x-10,y:S.y-10,width:0,height:S.height+20}}),{shape:{x:S.x-50,width:S.width+100,height:S.height+20}},M,C),k))}else{var T=u[s];h=T.childAt(0),o.add(T),d[n]=T,sJ(h,{shape:{points:c,stackedOnPoints:p}},t),s3(h)}s9(h,s7(t),{labelDataIndex:f[g-1],defaultText:i.getName(f[g-1]),inheritColor:l.fill},{normal:{verticalAlign:"middle"}}),h.setTextConfig({position:null,local:!0});var I=h.getTextContent();I&&(I.x=_.x-b,I.y=_.y0+_.y/2),h.useStyle(l),i.setItemGraphicEl(n,h),sU(h,t),sF(h,w.get("focus"),w.get("blurScope"),w.get("disabled"))}c.add(tV(p,this,"add")).update(tV(p,this,"update")).remove(tV(p,this,"remove")).execute(),this._layersSeries=a,this._layers=d},e.type="themeRiver",e}(pw),TW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new vG(tV(this.getData,this),tV(this.getRawData,this))},e.prototype.fixData=function(t){var e=t.length,n={},i=oc(t,function(t){return n.hasOwnProperty(t[0]+"")||(n[t[0]+""]=-1),t[2]}),r=[];i.buckets.each(function(t,e){r.push({name:e,dataList:t})});for(var o=r.length,a=0;a<o;++a){for(var s=r[a].name,l=0;l<r[a].dataList.length;++l){var h=r[a].dataList[l][0]+"";n[h]=a}for(var h in n)n.hasOwnProperty(h)&&n[h]!==a&&(n[h]=a,t[e]=[h,0,s],e++)}return t},e.prototype.getInitialData=function(t,e){for(var n=this.getReferringComponents("singleAxis",os).models[0].get("type"),i=tE(t.data,function(t){return void 0!==t[2]}),r=this.fixData(i||[]),o=[],a=this.nameMap=t9(),s=0,l=0;l<r.length;++l)o.push(r[l][2]),!a.get(r[l][2])&&(a.set(r[l][2],s),s++);var h=new yu(yc(r,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:m9(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,this);return h.initData(r),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),e=t.count(),n=[],i=0;i<e;++i)n[i]=i;var r=t.mapDimension("single"),o=oc(n,function(e){return t.get("name",e)}),a=[];return o.buckets.each(function(e,n){e.sort(function(e,n){return t.get(r,e)-t.get(r,n)}),a.push({name:n,indices:e})}),a},e.prototype.getAxisTooltipData=function(t,e,n){tW(t)||(t=t?[t]:[]);for(var i,r=this.getData(),o=this.getLayerSeries(),a=[],s=o.length,l=0;l<s;++l){for(var h=Number.MAX_VALUE,u=-1,c=o[l].indices.length,d=0;d<c;++d){var p=r.get(t[0],o[l].indices[d]),f=Math.abs(p-e);f<=h&&(i=p,h=f,u=o[l].indices[d])}a.push(u)}return{dataIndices:a,nestestValue:i}},e.prototype.formatTooltip=function(t,e,n){var i=this.getData();return ch("nameValue",{name:i.getName(t),value:i.get(i.mapDimension("value"),t)})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(cS);function TH(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},r=n.getRect();i.rect=r;var o=t.get("boundaryGap"),a=n.getAxis();i.boundaryGap=o,"horizontal"===a.orient?(o[0]=rE(o[0],r.height),o[1]=rE(o[1],r.height),TG(e,t,r.height-o[0]-o[1])):(o[0]=rE(o[0],r.width),o[1]=rE(o[1],r.width),TG(e,t,r.width-o[0]-o[1])),e.setLayout("layoutInfo",i)})}function TG(t,e,n){if(t.count())for(var i,r=e.coordinateSystem,o=e.getLayerSeries(),a=t.mapDimension("single"),s=t.mapDimension("value"),l=tR(o,function(e){return tR(e.indices,function(e){var n=r.dataToPoint(t.get(a,e));return n[1]=t.get(s,e),n})}),h=function(t){for(var e=t.length,n=t[0].length,i=[],r=[],o=0,a=0;a<n;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];s>o&&(o=s),i.push(s)}for(var h=0;h<n;++h)r[h]=(o-i[h])/2;o=0;for(var u=0;u<n;++u){var c=i[u]+r[u];c>o&&(o=c)}return{y0:r,max:o}}(l),u=h.y0,c=n/h.max,d=o.length,p=o[0].indices.length,f=0;f<p;++f){i=u[f]*c,t.setItemLayout(o[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:i,y:l[0][f][1]*c});for(var g=1;g<d;++g)i+=l[g-1][f][1]*c,t.setItemLayout(o[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:i,y:l[g][f][1]*c})}}var TU=function(t){function e(e,n,i,r){var o=t.call(this)||this;o.z2=2,o.textConfig={inside:!0},si(o).seriesIndex=n.seriesIndex;var a=new sn({z2:4,silent:e.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,e,n,i,r),o}return to(e,t),e.prototype.updateData=function(t,e,n,i,r){this.node=e,e.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var o=this;si(o).dataIndex=e.dataIndex;var a=e.getModel(),s=a.getModel("emphasis"),l=e.getLayout(),h=tI({},l);h.label=null;var u=e.getVisual("style");u.lineJoin="bevel";var c=e.getVisual("decal");c&&(u.decal=fH(c,r));var d=vh(a.getModel("itemStyle"),h,!0);tI(h,d),tP(sh,function(t){var e=o.ensureState(t),n=a.getModel([t,"itemStyle"]);e.style=n.getItemStyle();var i=vh(n,h);i&&(e.shape=i)}),t?(o.setShape(h),o.shape.r=l.r0,sQ(o,{shape:{r:l.r}},n,e.dataIndex)):(sJ(o,{shape:h},n),s3(o)),o.useStyle(u),this._updateLabel(n);var p=a.getShallow("cursor");p&&o.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var f=s.get("focus");sF(this,"relative"===f?t7(e.getAncestorsIndices(),e.getDescendantIndices()):"ancestor"===f?e.getAncestorsIndices():"descendant"===f?e.getDescendantIndices():f,s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t){var e=this,n=this.node.getModel(),i=n.getModel("label"),r=this.node.getLayout(),o=r.endAngle-r.startAngle,a=(r.startAngle+r.endAngle)/2,s=Math.cos(a),l=Math.sin(a),h=this,u=h.getTextContent(),c=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI;function p(t,e){var n=t.get(e);return null==n?i.get(e):n}u.ignore=!(i.get("show")&&!(null!=d&&Math.abs(o)<d)),tP(su,function(i){var d,f="normal"===i?n.getModel("label"):n.getModel([i,"label"]),g="normal"===i,m=g?u:u.ensureState(i),y=t.getFormattedLabel(c,i);g&&(y=y||e.node.name),m.style=lt(f,{},null,"normal"!==i,!0),y&&(m.style.text=y);var v=f.get("show");null==v||g||(m.ignore=!v);var x=p(f,"position"),_=g?h:h.states[i],b=_.style.fill;_.textConfig={outsideFill:"inherit"===f.get("color")?b:null,inside:"outside"!==x};var w=p(f,"distance")||0,S=p(f,"align"),M=p(f,"rotate"),C=.5*Math.PI,k=1.5*Math.PI,T=aM("tangential"===M?Math.PI/2-a:a),I=T>C&&!rG(T-C)&&T<k;"outside"===x?(d=r.r+w,S=I?"right":"left"):S&&"center"!==S?"left"===S?(d=r.r0+w,S=I?"right":"left"):"right"===S&&(d=r.r-w,S=I?"left":"right"):(d=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,S="center"),m.style.align=S,m.style.verticalAlign=p(f,"verticalAlign")||"middle",m.x=d*s+r.cx,m.y=d*l+r.cy;var A=0;"radial"===M?A=aM(-a)+(I?Math.PI:0):"tangential"===M?A=aM(Math.PI/2-a)+(I?Math.PI:0):tj(M)&&(A=M*Math.PI/180),m.rotation=aM(A)}),u.dirtyStyle()},e}(dl),Tj="sunburstRootToNode",TY="sunburstHighlight",TX=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n,i){var r,o,a=this;this.seriesModel=t,this.api=n,this.ecModel=e;var s=t.getData(),l=s.tree.root,h=t.getViewRoot(),u=this.group,c=t.get("renderLabelForZeroData"),d=[];h.eachNode(function(t){d.push(t)}),function(i,r){function o(t){return t.getId()}function a(o,a){!function(i,r){if(c||!i||i.getValue()||(i=null),i!==l&&r!==l){if(r&&r.piece){var o;i?(r.piece.updateData(!1,i,t,e,n),s.setItemGraphicEl(i.dataIndex,r.piece)):(o=r)&&o.piece&&(u.remove(o.piece),o.piece=null)}else if(i){var a=new TU(i,t,e,n);u.add(a),s.setItemGraphicEl(i.dataIndex,a)}}}(null==o?null:i[o],null==a?null:r[a])}(0!==i.length||0!==r.length)&&new m4(r,i,o,o).add(a).update(a).remove(tF(a,null)).execute()}(d,this._oldChildren||[]),r=l,(o=h).depth>0?(a.virtualPiece?a.virtualPiece.updateData(!1,r,t,e,n):(a.virtualPiece=new TU(r,t,e,n),u.add(a.virtualPiece)),o.piece.off("click"),a.virtualPiece.on("click",function(t){a._rootToNode(o.parentNode)})):a.virtualPiece&&(u.remove(a.virtualPiece),a.virtualPiece=null),this._initEvents(),this._oldChildren=d},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(e){var n=!1;t.seriesModel.getViewRoot().eachNode(function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");a&&l6(a,o.get("target",!0)||"_blank")}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Tj,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(pw),TZ=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return to(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function t(e){var n=0;tP(e.children,function(e){t(e);var i=e.value;tW(i)&&(i=i[0]),n+=i});var i=e.value;tW(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),tW(e.value)?e.value[0]=i:e.value=i}(n);var i=this._levelModels=tR(t.levels||[],function(t){return new lb(t,this,e)},this),r=Su.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=i[r.getNodeByDataIndex(e).depth];return n&&(t.parentModel=n),t})});return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments);return n.treePathInfo=Sf(this.getData().tree.getNodeByDataIndex(e),this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){S_(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(cS),Tq=Math.PI/180;function TK(t,e,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");tW(i)||(i=[0,i]),tW(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=rE(e[0],r),l=rE(e[1],o),h=rE(i[0],a/2),u=rE(i[1],a/2),c=-t.get("startAngle")*Tq,d=t.get("minAngle")*Tq,p=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,m=t.get("sort");null!=m&&function t(e,n){var i=e.children||[];e.children=function(t,e){if(tH(e)){var n=tR(t,function(t,e){var n=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return n}},index:e}});return n.sort(function(t,n){return e(t.params,n.params)}),tR(n,function(e){return t[e.index]})}var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}(i,n),i.length&&tP(e.children,function(e){t(e,n)})}(f,m);var y=0;tP(f.children,function(t){!isNaN(t.getValue())&&y++});var v=f.getValue(),x=Math.PI/(v||y)*2,_=f.depth>0,b=(u-h)/(f.height-(_?-1:1)||1),w=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=w?1:-1,C=function(e,n){if(e){var i=n;if(e!==p){var r=e.getValue(),o=0===v&&S?x:r*x;o<d&&(o=d),i=n+M*o;var u=e.depth-g-(_?-1:1),c=h+b*u,f=h+b*(u+1),m=t.getLevelModel(e);if(m){var y=m.get("r0",!0),k=m.get("r",!0),T=m.get("radius",!0);null!=T&&(y=T[0],k=T[1]),null!=y&&(c=rE(y,a/2)),null!=k&&(f=rE(k,a/2))}e.setLayout({angle:o,startAngle:n,endAngle:i,clockwise:w,cx:s,cy:l,r0:c,r:f})}if(e.children&&e.children.length){var I=0;tP(e.children,function(t){I+=C(t,n+I)})}return i-n}};if(_){var k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:w,cx:s,cy:l,r0:h,r:h+b})}C(f,c)})}function T$(t){var e={};t.eachSeriesByType("sunburst",function(t){var n=t.getData(),i=n.tree;i.eachNode(function(r){var o=r.getModel().getModel("itemStyle").getItemStyle();o.fill||(o.fill=function(t,n,i){if(0===t.depth)return hS.color.neutral50;for(var r=t;r&&r.depth>1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&tG(o)&&(o=ia(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),tI(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)})})}var TJ={color:"fill",borderColor:"stroke"},TQ={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},T0=oi(),T1=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return yy(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=T0(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(cS);function T2(t,e){return e=e||[0,0],tR(["x","y"],function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))},this)}function T5(t,e){return e=e||[0,0],tR([0,1],function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function T3(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function T4(t,e){return e=e||[0,0],tR(["Radius","Angle"],function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function T8(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||en(t,"text")))}function T6(t,e,n){var i,r,o;if("text"===e)o=t;else{o={},en(t,"text")&&(o.text=t.text),en(t,"rich")&&(o.rich=t.rich),en(t,"textFill")&&(o.fill=t.textFill),en(t,"textStroke")&&(o.stroke=t.textStroke),en(t,"fontFamily")&&(o.fontFamily=t.fontFamily),en(t,"fontSize")&&(o.fontSize=t.fontSize),en(t,"fontStyle")&&(o.fontStyle=t.fontStyle),en(t,"fontWeight")&&(o.fontWeight=t.fontWeight),r={type:"text",style:o,silent:!0},i={};var a=en(t,"textPosition");n?i.position=a?t.textPosition:"inside":a&&(i.position=t.textPosition),en(t,"textPosition")&&(i.position=t.textPosition),en(t,"textOffset")&&(i.offset=t.textOffset),en(t,"textRotation")&&(i.rotation=t.textRotation),en(t,"textDistance")&&(i.distance=t.textDistance)}return T9(o,t),tP(o.rich,function(t){T9(t,t)}),{textConfig:i,textContent:r}}function T9(t,e){e&&(e.font=e.textFont||e.font,en(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),en(e,"textAlign")&&(t.align=e.textAlign),en(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),en(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),en(e,"textWidth")&&(t.width=e.textWidth),en(e,"textHeight")&&(t.height=e.textHeight),en(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),en(e,"textPadding")&&(t.padding=e.textPadding),en(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),en(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),en(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),en(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),en(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),en(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),en(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function T7(t,e,n){t.textPosition=t.textPosition||n.position||"inside",null!=n.offset&&(t.textOffset=n.offset),null!=n.rotation&&(t.textRotation=n.rotation),null!=n.distance&&(t.textDistance=n.distance);var i=t.textPosition.indexOf("inside")>=0,r=t.fill||hS.color.neutral99;It(t,e);var o=null==t.textFill;return i?o&&(t.textFill=n.insideFill||hS.color.neutral00,!t.textStroke&&n.insideStroke&&(t.textStroke=n.insideStroke),t.textStroke||(t.textStroke=r),null==t.textStrokeWidth&&(t.textStrokeWidth=2)):(o&&(t.textFill=t.fill||n.outsideFill||hS.color.neutral00),!t.textStroke&&n.outsideStroke&&(t.textStroke=n.outsideStroke)),t.text=e.text,t.rich=e.rich,tP(e.rich,function(t){It(t,t)}),t}function It(t,e){e&&(en(e,"fill")&&(t.textFill=e.fill),en(e,"stroke")&&(t.textStroke=e.fill),en(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),en(e,"font")&&(t.font=e.font),en(e,"fontStyle")&&(t.fontStyle=e.fontStyle),en(e,"fontWeight")&&(t.fontWeight=e.fontWeight),en(e,"fontSize")&&(t.fontSize=e.fontSize),en(e,"fontFamily")&&(t.fontFamily=e.fontFamily),en(e,"align")&&(t.textAlign=e.align),en(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),en(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),en(e,"width")&&(t.textWidth=e.width),en(e,"height")&&(t.textHeight=e.height),en(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),en(e,"padding")&&(t.textPadding=e.padding),en(e,"borderColor")&&(t.textBorderColor=e.borderColor),en(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),en(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),en(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),en(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),en(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),en(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),en(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),en(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),en(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),en(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Ie={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},In=tz(Ie);tN(rr,function(t,e){return t[e]=1,t},{}),rr.join(", ");var Ii=["","style","shape","extra"],Ir=oi();function Io(t,e,n,i,r){var o=t+"Animation",a=sK(t,i,r)||{},s=Ir(e).userDuring;return a.duration>0&&(a.during=s?tV(Id,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),tI(a,n[o]),a}function Ia(t,e,n,i){var r,o,a=(i=i||{}).dataIndex,s=i.isInit,l=i.clearStyle,h=n.isAnimationEnabled(),u=Ir(t),c=e.style;u.userDuring=e.during;var d={},p={};if(function(t,e){for(var n=0;n<In.length;n++){var i=In[n],r=Ie[i],o=t[i];o&&(e[r[0]]=o[0],e[r[1]]=o[1])}for(var n=0;n<rr.length;n++){var a=rr[n];null!=t[a]&&(e[a]=t[a])}}(e,p),"compound"===t.type)for(var f=t.shape.paths,g=e.shape.paths,m=0;m<g.length;m++)If("shape",g[m],f[m]);else If("shape",e,p),If("extra",e,p);if(!s&&h&&(function(t,e,n){for(var i=e.transition,r=Ih(i)?rr:r2(i||[]),o=0;o<r.length;o++){var a=r[o];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=t[a];n[a]=s}}}(t,e,d),Ip("shape",t,e,d),Ip("extra",t,e,d),function(t,e,n,i){if(n){var r,o=t.style;if(o){var a=n.transition,s=e.transition;if(a&&!Ih(a)){var l=r2(a);r||(r=i.style={});for(var h=0;h<l.length;h++){var u=l[h],c=o[u];r[u]=c}}else if(t.getAnimationStyleProps&&(Ih(s)||Ih(a)||tD(s,"style")>=0)){var d=t.getAnimationStyleProps(),p=d?d.style:null;if(p){r||(r=i.style={});for(var f=tz(n),h=0;h<f.length;h++){var u=f[h];if(p[u]){var c=o[u];r[u]=c}}}}}}}(t,e,c,d)),p.style=c,function(t,e,n){var i=e.style;if(!t.isGroup&&i){if(n){t.useStyle({});for(var r=t.animators,o=0;o<r.length;o++){var a=r[o];"style"===a.targetName&&a.changeTarget(t.style)}}t.setStyle(i)}e&&(e.style=null,e&&t.attr(e),e.style=i)}(t,p,l),r=t,en(o=e,"silent")&&(r.silent=o.silent),en(o,"ignore")&&(r.ignore=o.ignore),r instanceof o$&&en(o,"invisible")&&(r.invisible=o.invisible),r instanceof aN&&en(o,"autoBatch")&&(r.autoBatch=o.autoBatch),h)if(s){var y={};tP(Ii,function(t){var n=t?e[t]:e;n&&n.enterFrom&&(t&&(y[t]=y[t]||{}),tI(t?y[t]:y,n.enterFrom))});var v=Io("enter",t,e,n,a);v.duration>0&&t.animateFrom(y,v)}else{var x=t,_=e,b=a||0,w=n,S=d;if(S){var M=Io("update",x,_,w,b);M.duration>0&&x.animateFrom(S,M)}}Is(t,e),c?t.dirty():t.markRedraw()}function Is(t,e){for(var n=Ir(t).leaveToProps,i=0;i<Ii.length;i++){var r=Ii[i],o=r?e[r]:e;o&&o.leaveTo&&(n||(n=Ir(t).leaveToProps={}),r&&(n[r]=n[r]||{}),tI(r?n[r]:n,o.leaveTo))}}function Il(t,e,n,i){if(t){var r=t.parent,o=Ir(t).leaveToProps;if(o){var a=Io("update",t,e,n,0);a.done=function(){r&&r.remove(t),i&&i()},t.animateTo(o,a)}else r&&r.remove(t),i&&i()}}function Ih(t){return"all"===t}var Iu={},Ic={setTransform:function(t,e){return Iu.el[t]=e,this},getTransform:function(t){return Iu.el[t]},setShape:function(t,e){var n=Iu.el;return(n.shape||(n.shape={}))[t]=e,n.dirtyShape&&n.dirtyShape(),this},getShape:function(t){var e=Iu.el.shape;if(e)return e[t]},setStyle:function(t,e){var n=Iu.el,i=n.style;return i&&(i[t]=e,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(t){var e=Iu.el.style;if(e)return e[t]},setExtra:function(t,e){return(Iu.el.extra||(Iu.el.extra={}))[t]=e,this},getExtra:function(t){var e=Iu.el.extra;if(e)return e[t]}};function Id(){var t=this.el;if(t){var e=Ir(t).userDuring,n=this.userDuring;if(e!==n){this.el=this.userDuring=null;return}Iu.el=t,n(Ic)}}function Ip(t,e,n,i){var r,o=n[t];if(o){var a=e[t];if(a){var s=n.transition,l=o.transition;if(l)if(r||(r=i[t]={}),Ih(l))tI(r,a);else for(var h=r2(l),u=0;u<h.length;u++){var c=h[u],d=a[c];r[c]=d}else if(Ih(s)||tD(s,t)>=0){r||(r=i[t]={});for(var p=tz(a),u=0;u<p.length;u++){var f,g,c=p[u],d=a[c];f=o[c],g=d,(tO(f)?f!==g:null!=f&&isFinite(f))&&(r[c]=d)}}}}}function If(t,e,n){var i=e[t];if(i)for(var r=n[t]={},o=tz(i),a=0;a<o.length;a++){var s=o[a];r[s]=iR(i[s])}}var Ig=oi(),Im=["percent","easing","shape","style","extra"];function Iy(t){t.stopAnimation("keyframe"),t.attr(Ig(t))}function Iv(t,e,n){if(n.isAnimationEnabled()&&e){if(tW(e))return void tP(e,function(e){Iv(t,e,n)});var i=e.keyframes,r=e.duration;if(n&&null==r){var o=sK("enter",n,0);r=o&&o.duration}if(i&&r){var a=Ig(t);tP(Ii,function(n){var o;n&&!t[n]||(i.sort(function(t,e){return t.percent-e.percent}),tP(i,function(i){var s=t.animators,l=n?i[n]:i;if(l){var h=tz(l);if(n||(h=tE(h,function(t){return 0>tD(Im,t)})),h.length){o||((o=t.animate(n,e.loop,!0)).scope="keyframe");for(var u=0;u<s.length;u++)s[u]!==o&&s[u].targetName===o.targetName&&s[u].stopTracks(h);n&&(a[n]=a[n]||{});var c=n?a[n]:a;tP(h,function(e){c[e]=((n?t[n]:t)||{})[e]}),o.whenWithKeys(r*i.percent,l,h,i.easing)}}}),o&&o.delay(e.delay||0).duration(r).start(e.easing))})}}}var Ix="emphasis",I_="normal",Ib="blur",Iw="select",IS=[I_,Ix,Ib,Iw],IM={normal:["itemStyle"],emphasis:[Ix,"itemStyle"],blur:[Ib,"itemStyle"],select:[Iw,"itemStyle"]},IC={normal:["label"],emphasis:[Ix,"label"],blur:[Ib,"label"],select:[Iw,"label"]},Ik=["x","y"],IT={normal:{},emphasis:{},blur:{},select:{}},II={cartesian2d:function(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:tV(T2,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:tV(T5,t)}}},single:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:tV(T3,t)}}},polar:function(t){var e=t.getRadiusAxis(),n=t.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:tV(T4,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)},layout:function(e,n){return t.dataToLayout(e,n)}}}},matrix:function(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e,n){return t.dataToPoint(e,n)},layout:function(e,n){return t.dataToLayout(e,n)}}}}};function IA(t){return t instanceof aN}function ID(t){return t instanceof o$}var IL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=IN(t,o,e,n);r||a.removeAll(),o.diff(r).add(function(e){IE(n,null,e,s(e,i),t,a,o)}).remove(function(e){var n=r.getItemGraphicEl(e);n&&Il(n,T0(n).option,t)}).update(function(e,l){IE(n,r.getItemGraphicEl(l),e,s(e,i),t,a,o)}).execute();var l=t.get("clip",!0)?yH(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=IN(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h<t.end;h++){var u=IE(null,null,h,a(h,r),e,this.group,o);u&&(u.traverse(l),s.push(u))}},e.prototype.eachRendered=function(t){pd(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,e,n,i){var r=e.element;if(null==r||n.name===r)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===r)return!0;return!1},e.type="custom",e}(pw);function IO(t){var e,n=t.type;if("path"===n){var i=t.shape,r=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,o=Ij(i);T0(e=d0(o,null,r,i.layout||"center")).customPathData=o}else if("image"===n)T0(e=new aW({})).customImagePath=t.style.image;else if("text"===n)e=new sn({});else if("group"===n)e=new rT;else if("compoundPath"===n){var i=t.shape;if(!i||!i.paths){var a="";uC(a)}e=new dL({shape:{paths:tR(i.paths,function(t){if("path"===t.type)return d0(t.shape.pathData,t,null);var e=dQ(t.type);return e||uC(""),new e})}})}else{var s=dQ(n);if(!s){var a="";uC(a)}e=new s}return T0(e).customGraphicType=n,e.name=t.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function IP(t,e,n,i,r,o,a){Iy(e);var s=r&&r.normal.cfg;s&&e.setTextConfig(s),i&&null==i.transition&&(i.transition=Ik);var l=i&&i.style;if(l){"text"===e.type&&(en(l,"textFill")&&(l.fill=l.textFill),en(l,"textStroke")&&(l.stroke=l.textStroke));var h=void 0,u=IA(e)?l.decal:null;t&&u&&(u.dirty=!0,h=fH(u,t)),l.__decalPattern=h}if(ID(e)&&l){var h=l.__decalPattern;h&&(l.decal=h)}Ia(e,i,o,{dataIndex:n,isInit:a,clearStyle:!0}),Iv(e,i.keyframeAnimation,o)}function IR(t,e,n,i,r){var o=e.isGroup?null:e,a=r&&r[t].cfg;if(o){var s=o.ensureState(t);if(!1===i){var l=o.getState(t);l&&(l.style=null)}else s.style=i||null;a&&(s.textConfig=a),sI(o)}}function IN(t,e,n,i){var r,o,a,s,l=t.get("renderItem");if("string"==typeof l){var h=gy[l];h&&(l=h)}var u=t.coordinateSystem,c={};u&&(c=u.prepareCustoms?u.prepareCustoms(u):II[u.type](u));for(var d=tA({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(t,n){return null==n&&(n=a),e.getStore().get(e.getDimensionIndex(t||0),n)},style:function(n,i){null==i&&(i=a);var r=e.getItemVisual(i,"style"),o=r&&r.fill,s=r&&r.opacity,l=b(i,I_).getItemStyle();null!=o&&(l.fill=o),null!=s&&(l.opacity=s);var h={inheritColor:tG(o)?o:hS.color.neutral99},u=w(i,I_),c=lt(u,null,h,!1,!0);c.text=u.getShallow("show")?tJ(t.getFormattedLabel(i,I_),yx(e,i)):null;var d=le(u,h,!1);return M(n,l),l=T7(l,c,d),n&&S(l,n),l.legacy=!0,l},ordinalRawValue:function(t,n){null==n&&(n=a),t=t||0;var i=e.getDimensionInfo(t);if(!i){var r=e.getDimensionIndex(t);return r>=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),s=i&&i.ordinalMeta;return s?s.categories[o]:o},styleEmphasis:function(n,i){null==i&&(i=a);var r=b(i,Ix).getItemStyle(),o=w(i,Ix),s=lt(o,null,null,!0,!0);s.text=o.getShallow("show")?tQ(t.getFormattedLabel(i,Ix),t.getFormattedLabel(i,I_),yx(e,i)):null;var l=le(o,null,!0);return M(n,r),r=T7(r,s,l),n&&S(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=a),en(TJ,t)){var i=e.getItemVisual(n,"style");return i?i[TJ[t]]:null}if(en(TQ,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===u.type)return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o<t.count||0;o++)e.push(tA({bandWidth:r,axisKey:i,stackId:y5+o},t));for(var a=y9(e),s=[],o=0;o<t.count;o++){var l=a[i][y5+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(tA({axis:u.getBaseAxis()},t))},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return la(t,n)}},c.api||{}),p={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:c.coordSys,dataInsideLength:e.count(),encode:(r=t.getData(),o={},tP(r.dimensions,function(t){var e=r.getDimensionInfo(t);if(!e.isExtraCoord){var n=e.coordDim;(o[n]=o[n]||[])[e.coordDimIndex]=r.getDimensionIndex(t)}}),o),itemPayload:t.get("itemPayload")||{}},f={},g={},m={},y={},v=0;v<IS.length;v++){var x=IS[v];m[x]=t.getModel(IM[x]),y[x]=t.getModel(IC[x])}function _(t){return t===a?s||(s=e.getItemModel(t)):e.getItemModel(t)}function b(t,n){return e.hasItemOption?t===a?f[n]||(f[n]=_(t).getModel(IM[n])):_(t).getModel(IM[n]):m[n]}function w(t,n){return e.hasItemOption?t===a?g[n]||(g[n]=_(t).getModel(IC[n])):_(t).getModel(IC[n]):y[n]}return function(t,n){return a=t,s=null,f={},g={},l&&l(tA({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:n?n.type:null},p),d)};function S(t,e){for(var n in e)en(e,n)&&(t[n]=e[n])}function M(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function IE(t,e,n,i,r,o,a){if(!i)return void o.remove(e);var s=IB(t,e,n,i,r,o);return s&&a.setItemGraphicEl(n,s),s&&sF(s,i.focus,i.blurScope,i.emphasisDisabled),s}function IB(t,e,n,i,r,o){var a,s=-1,l=e;e&&Iz(e,i,r)&&(s=tD(o.childrenRef(),e),e=null);var h=!e,u=e;u?u.clearStates():(u=IO(i),l&&((a=u).copyTransform(l),ID(a)&&ID(l)&&(a.setStyle(l.style),a.z=l.z,a.z2=l.z2,a.zlevel=l.zlevel,a.invisible=l.invisible,a.ignore=l.ignore,IA(a)&&IA(l)&&a.setShape(l.shape)))),!1===i.morph?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),i.tooltipDisabled&&(u.tooltipDisabled=!0),IT.normal.cfg=IT.normal.conOpt=IT.emphasis.cfg=IT.emphasis.conOpt=IT.blur.cfg=IT.blur.conOpt=IT.select.cfg=IT.select.conOpt=null,IT.isLegacy=!1,function(t,e,n,i,r,o){if(!t.isGroup&&"compoundPath"!==t.type){IV(n,null,o),IV(n,Ix,o);var a=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,h=o.select.conOpt;if(null!=a||null!=s||null!=h||null!=l){var u=t.getTextContent();if(!1===a)u&&t.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},u?u.clearStates():(u=IO(a),t.setTextContent(u)),IP(null,u,e,a,null,i,r);for(var c=a&&a.style,d=0;d<IS.length;d++){var p=IS[d];if(p!==I_){var f=o[p].conOpt;IR(p,u,f,IW(a,f,p),null)}}c?u.dirty():u.markRedraw()}}}}(u,n,i,r,h,IT),function(t,e,n,i,r){var o=n.clipPath;if(!1===o)t&&t.getClipPath()&&t.removeClipPath();else if(o){var a=t.getClipPath();a&&Iz(a,o,i)&&(a=null),a||(a=IO(o),t.setClipPath(a)),IP(null,a,e,o,null,i,r)}}(u,n,i,r,h),IP(t,u,n,i,IT,r,h),en(i,"info")&&(T0(u).info=i.info);for(var c=0;c<IS.length;c++){var d=IS[c];if(d!==I_){var p=IF(i,d),f=IW(i,p,d);IR(d,u,p,f,IT)}}var g=u;if(!g.isGroup){var m=r.currentZ,y=r.currentZLevel;g.z=m,g.zlevel=y;var v=i.z2;null!=v&&(g.z2=v||0);for(var x=0;x<IS.length;x++)!function(t,e,n){var i=n===I_,r=i?e:IF(e,n),o=r?r.z2:null;null!=o&&((i?t:t.ensureState(n)).z2=o||0)}(g,i,IS[x])}return"group"===i.type&&function(t,e,n,i,r){var o=i.children,a=o?o.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,h=!1===s;if(a||l||h){if(l){return new m4((f={api:t,oldChildren:e.children()||[],newChildren:o||[],dataIndex:n,seriesModel:r,group:e}).oldChildren,f.newChildren,IH,IH,f).add(IG).update(IG).remove(IU).execute()}h&&e.removeAll();for(var u=0;u<a;u++){var c=o[u],d=e.childAt(u);c?(null==c.ignore&&(c.ignore=!1),IB(t,d,n,c,r,e)):d.ignore=!0}for(var p=e.childCount()-1;p>=u;p--){var f,g,m,y,v=e.childAt(p);g=e,m=v,y=r,m&&Il(m,T0(g).option,y)}}}(t,u,n,i,r),s>=0?o.replaceAt(u,s):o.add(u),u}function Iz(t,e,n){var i,r=T0(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&(i=a)&&(en(i,"pathData")||en(i,"d"))&&Ij(a)!==r.customPathData||"image"===o&&en(s,"image")&&s.image!==r.customImagePath}function IV(t,e,n){var i=e?IF(t,e):t,r=e?IW(t,i,Ix):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?IF(s,e):s:null;if(r&&(n.isLegacy||T8(r,o,!!a,!!l))){n.isLegacy=!0;var h=T6(r,o,!e);!a&&h.textConfig&&(a=h.textConfig),!l&&h.textContent&&(l=h.textContent)}if(!e&&l){var u=l;u.type||(u.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function IF(t,e){return e?t?t[e]:null:t}function IW(t,e,n){var i=e&&e.style;return null==i&&n===Ix&&t&&(i=t.styleEmphasis),i}function IH(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function IG(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;IB(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function IU(t){var e=this.context,n=e.oldChildren[t];n&&Il(n,T0(n).option,e.seriesModel)}function Ij(t){return t&&(t.pathData||t.d)}var IY=oi(),IX=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o){a&&a.hide(),s&&s.hide();return}a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=tF(IZ,e,u);this.updatePointerEl(a,l,c),this.updateLabelEl(a,l,c,e)}else a=this._group=new rT,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);I$(a,e,!0),this._renderHandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=_Y(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=IY(t).pointerEl=new ti[r.type](tC(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=IY(t).labelEl=new sn(tC(e.label));t.add(r),Iq(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=IY(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=IY(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),Iq(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a){r&&i.remove(r),this._handle=null;return}this._handle||(e=!0,r=this._handle=pr(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){eH(t.event)},onmousedown:tV(this._onHandleDragMove,this,0,0),drift:tV(this._onHandleDragMove,this),ondragend:tV(this._onHandleDragEnd,this)}),i.add(r)),I$(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");tW(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,pO(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){IZ(this._axisPointerModel,!e&&this._moveAnimation,this._handle,IK(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(IK(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(IK(i)),IY(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),pP(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function IZ(t,e,n,i){!function t(e,n){if(!(tY(e)&&tY(n)))return e===n;var i=!0;return tP(n,function(n,r){i=i&&t(e[r],n)}),!!i}(IY(n).lastProp,i)&&(IY(n).lastProp=i,e?sJ(n,i,t):(n.stopAnimation(),n.attr(i)))}function Iq(t,e){t[e.get(["label","show"])?"show":"hide"]()}function IK(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function I$(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function IJ(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function IQ(t,e,n,i,r){var o,a,s,l,h,u,c=I0(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),d=n.getModel("label"),p=t1(d.get("padding")||0),f=d.getFont(),g=rc(c,f),m=r.position,y=g.width+p[1]+p[3],v=g.height+p[0]+p[2],x=r.align;"right"===x&&(m[0]-=y),"center"===x&&(m[0]-=y/2);var _=r.verticalAlign;"bottom"===_&&(m[1]-=v),"middle"===_&&(m[1]-=v/2),o=m,a=y,s=v,h=(l=i).getWidth(),u=l.getHeight(),o[0]=Math.min(o[0]+a,h)-a,o[1]=Math.min(o[1]+s,u)-s,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0);var b=d.get("backgroundColor");b&&"auto"!==b||(b=e.get(["axisLine","lineStyle","color"])),t.label={x:m[0],y:m[1],style:lt(d,{text:c,font:f,fill:d.getTextColor(),padding:p,backgroundColor:b}),z2:10}}function I0(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:xB(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};tP(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),tG(a)?o=a.replace("{value}",o):tH(a)&&(o=a(s))}return o}function I1(t,e,n){var i=eX();return eJ(i,i,n.rotation),e$(i,i,n.position),d7([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function I2(t,e,n,i,r,o){var a=_b.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),IQ(e,i,r,o,{position:I1(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function I5(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function I3(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function I4(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var I8=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=I6(a,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var u=IJ(i),c=I9[s](o,h,l);c.style=u,t.graphicKey=c.type,t.pointer=c}I2(e,t,_O(a.getRect(),n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=_O(e.axis.grid.getRect(),e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=I1(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=I6(o,r).getOtherAxis(r).getGlobalExtent(),l=+("x"!==r.dim),h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];return c[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(IX);function I6(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var I9={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:I5([e,n[0]],[e,n[1]],I7(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:I3([e-i/2,n[0]],[i,r],I7(t))}}};function I7(t){return+("x"!==t.dim)}var At=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:hS.color.border,width:1,type:"dashed"},shadowStyle:{color:hS.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:hS.color.neutral00,padding:[5,7,5,7],backgroundColor:hS.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:hS.color.accent40,throttle:40}},e}(h_),Ae=oi();function An(t,e,n){if(!ts.node){var i=e.getZr();Ae(i).records||(Ae(i).records={}),function(t,e){Ae(t).initialized||(Ae(t).initialized=!0,n("click",tF(Ar,"click")),n("mousemove",tF(Ar,"mousemove")),n("globalout",Ai));function n(n,i){t.on(n,function(n){var r,o,a,s,l,h,u,c,d=(r=e,o={showTip:[],hideTip:[]},{dispatchAction:a=function(t){var e=o[t.type];e?e.push(t):(t.dispatchAction=a,r.dispatchAction(t))},pendings:o});tP(Ae(t).records,function(t){t&&i(t,n,d.dispatchAction)}),s=d.pendings,l=e,u=s.showTip.length,c=s.hideTip.length,u?h=s.showTip[u-1]:c&&(h=s.hideTip[c-1]),h&&(h.dispatchAction=null,l.dispatchAction(h))})}}(i,e),(Ae(i).records[t]||(Ae(i).records[t]={})).handler=n}}function Ai(t,e,n){t.handler("leave",null,n)}function Ar(t,e,n,i){e.handler(t,n,i)}function Ao(t,e){if(!ts.node){var n=e.getZr();(Ae(n).records||{})[t]&&(Ae(n).records[t]=null)}}var Aa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";An("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},e.prototype.remove=function(t,e){Ao("axisPointer",e)},e.prototype.dispose=function(t,e){Ao("axisPointer",e)},e.type="axisPointer",e}(cL);function As(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=on(o,t);if(null==a||a<0||tW(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var h=l.getBaseAxis(),u=l.getOtherAxis(h).dim,c=h.dim,d=+("x"===u||"radius"===u),p=o.mapDimension(c),f=[];f[d]=o.get(p,a),f[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(tR(l.dimensions,function(t){return o.mapDimension(t)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var Al=oi();function Ah(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t.dispatchAction||tV(n.dispatchAction,n),a=e.getComponent("axisPointer").coordSysAxesInfo;if(a){Af(r)&&(r=As({seriesIndex:t.seriesIndex,dataIndex:t.dataIndex},e).point);var s,l,h,u,c,d,p,f,g,m,y,v=Af(r),x=t.axesInfo,_=a.axesInfo,b="leave"===i||Af(r),w={},S={},M={list:[],map:{}},C={showPointer:tF(Ac,S),showTooltip:tF(Ad,M)};tP(a.coordSysMap,function(t,e){var n=v||t.containPoint(r);tP(a.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(x,t);if(!b&&n&&(!x||o)){var a=o&&o.value;null!=a||v||(a=i.pointToData(r)),null!=a&&Au(t,a,C,!1,w)}})});var k={};return tP(_,function(t,e){var n=t.linkGroup;n&&!S[e]&&tP(n.axesInfo,function(e,i){var r=S[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,Ap(e),Ap(t)))),k[t.key]=o}})}),tP(k,function(t,e){Au(_[e],t,C,!0,w)}),s=S,l=_,h=w.axesInfo=[],tP(l,function(t,e){var n=t.axisPointerModel.option,i=s[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&h.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(Af(e)||!t.list.length)return i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(M,r,t,o),u=_,d=(c=n).getZr(),p="axisPointerLastHighlights",f=Al(d)[p]||{},g=Al(d)[p]={},tP(u,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&tP(n.seriesDataIndices,function(t){g[t.seriesIndex+" | "+t.dataIndex]=t})}),m=[],y=[],tP(f,function(t,e){g[e]||y.push(t)}),tP(g,function(t,e){f[e]||m.push(t)}),y.length&&c.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:y}),m.length&&c.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:m}),w}}function Au(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var a,s,l,h,u,c,d,p,f=(a=e,h=(l=(s=t).axis).dim,u=a,c=[],d=Number.MAX_VALUE,p=-1,tP(s.seriesModels,function(t,e){var n,i,r=t.getData().mapDimensionsAll(h);if(t.getAxisTooltipData){var o=t.getAxisTooltipData(r,a,l);i=o.dataIndices,n=o.nestestValue}else{if(!(i=t.indicesOfNearest(h,r[0],a,"category"===l.type?.5:null)).length)return;n=t.getData().get(r[0],i[0])}if(null!=n&&isFinite(n)){var s=a-n,f=Math.abs(s);f<=d&&((f<d||s>=0&&p<0)&&(d=f,p=s,u=n,c.length=0),tP(i,function(e){c.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:c,snapToValue:u}),g=f.payloadBatch,m=f.snapToValue;g[0]&&null==r.seriesIndex&&tI(r,g[0]),!i&&t.snap&&o.containData(m)&&null!=m&&(e=m),n.showPointer(t,e,g),n.showTooltip(t,f,m)}}function Ac(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function Ad(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=_Z(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function Ap(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Af(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Ag(t){_K.registerAxisPointerClass("CartesianAxisPointer",I8),t.registerComponentModel(At),t.registerComponentView(Aa),t.registerPreprocessor(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!tW(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){var n,i,r,o,a,s,l,h,u;t.getComponent("axisPointer").coordSysAxesInfo=(i=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},r=t,o=e,a=r.getComponent("tooltip"),l=(s=r.getComponent("axisPointer")).get("link",!0)||[],h=[],tP(o.getCoordinateSystems(),function(t){if(t.axisPointerEnabled){var e=_Z(t.model),n=i.coordSysAxesInfo[e]={};i.coordSysMap[e]=t;var o=t.model.getModel("tooltip",a);if(tP(t.getAxes(),tF(p,!1,null)),t.getTooltipAxes&&a&&o.get("show")){var u="axis"===o.get("trigger"),c="cross"===o.get(["axisPointer","type"]),d=t.getTooltipAxes(o.get(["axisPointer","axis"]));(u||c)&&tP(d.baseAxes,tF(p,!c||"cross",u)),c&&tP(d.otherAxes,tF(p,"cross",!1))}}function p(e,a,u){var c=u.model.getModel("axisPointer",s),d=c.get("show");if(d&&("auto"!==d||e||_X(c))){null==a&&(a=c.get("triggerTooltip"));var p=(c=e?function(t,e,n,i,r,o){var a=e.getModel("axisPointer"),s={};tP(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=tC(a.get(t))}),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var h=a.get(["label","show"]);if(l.show=null==h||h,!o){var u=s.lineStyle=a.get("crossStyle");u&&tA(l,u.textStyle)}}return t.model.getModel("axisPointer",new lb(s,n,i))}(u,o,s,r,e,a):c).get("snap"),f=c.get("triggerEmphasis"),g=_Z(u.model),m=a||p||"category"===u.type,y=i.axesInfo[g]={key:g,axis:u,coordSys:t,axisPointerModel:c,triggerTooltip:a,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:_X(c),seriesModels:[],linkGroup:null};n[g]=y,i.seriesInvolved=i.seriesInvolved||m;var v=function(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(_j(o[i+"AxisId"],n.id)||_j(o[i+"AxisIndex"],n.componentIndex)||_j(o[i+"AxisName"],n.name))return r}}(l,u);if(null!=v){var x=h[v]||(h[v]={axesInfo:{}});x.axesInfo[g]=y,x.mapper=l[v].mapper,y.linkGroup=x}}}}),n.seriesInvolved&&(u=n,t.eachSeries(function(t){var e=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);e&&e.model&&"none"!==n&&!1!==n&&"item"!==n&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&tP(u.coordSysAxesInfo[_Z(e.model)],function(n){var i=n.axis;e.getAxis(i.dim)===i&&(n.seriesModels.push(t),null==n.seriesDataCount&&(n.seriesDataCount=0),n.seriesDataCount+=t.getData().count())})})),n)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Ah)}var Am=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),h=i.get("type");if(h&&"none"!==h){var u=IJ(i),c=Ay[h](o,a,l,s);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,n,i){var r,o,a,s=e.axis,l=s.dataToCoord(t),h=n.getAngleAxis().getExtent()[0];h=h/180*Math.PI;var u=n.getRadiusAxis().getExtent();if("radius"===s.dim){var c=eX();eJ(c,c,h),e$(c,c,[n.cx,n.cy]),r=d7([l,-i],c);var d=e.getModel("axisLabel").get("rotate")||0,p=_b.innerTextLayout(h,d*Math.PI/180,-1);o=p.textAlign,a=p.textVerticalAlign}else{var f=u[1];r=n.coordToPoint([f+i,l]);var g=n.cx,m=n.cy;o=Math.abs(r[0]-g)/f<.3?"center":r[0]>g?"left":"right",a=Math.abs(r[1]-m)/f<.3?"middle":r[1]>m?"top":"bottom"}return{position:r,align:o,verticalAlign:a}}(e,n,a,i.get(["label","margin"]));IQ(t,n,i,r,d)},e}(IX),Ay={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:I5(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:I4(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(-n+r/2)*o)}:{type:"Sector",shape:I4(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},Av=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(h_),Ax=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",os).models[0]},e.type="polarAxis",e}(h_);tL(Ax,v0);var A_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="angleAxis",e}(Ax),Ab=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="radiusAxis",e}(Ax),Aw=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return to(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)[+("radius"!==this.dim)]},e}(x7);Aw.prototype.dataToRadius=x7.prototype.dataToCoord,Aw.prototype.radiusToData=x7.prototype.coordToData;var AS=oi(),AM=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return to(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)[+("radius"!==this.dim)]},e.prototype.calculateCategoryInterval=function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),i=e.count();if(n[1]-n[0]<1)return 0;var r=n[0],o=Math.abs(this.dataToCoord(r+1)-this.dataToCoord(r)),a=Math.max(rc(null==r?"":r+"",t.getFont(),"center","top").height,7)/o;isNaN(a)&&(a=1/0);var s=Math.max(0,Math.floor(a)),l=AS(this.model),h=l.lastAutoInterval,u=l.lastTickCount;return null!=h&&null!=u&&1>=Math.abs(h-s)&&1>=Math.abs(u-i)&&h>s?s=h:(l.lastTickCount=i,l.lastAutoInterval=s),s},e}(x7);AM.prototype.dataToAngle=x7.prototype.dataToCoord,AM.prototype.angleToData=x7.prototype.coordToData;var AC=["radius","angle"],Ak=function(){function t(t){this.dimensions=AC,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Aw,this._angleAxis=new AM,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],n)},t.prototype.pointToData=function(t,e,n){n=n||[];var i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],e),n[1]=this._angleAxis.angleToData(i[1],e),n},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s;for(var l=Math.atan2(-(n/=s),e)/Math.PI*180,h=l<o?1:-1;l<o||l>a;)l+=360*h;return[s,l]},t.prototype.coordToPoint=function(t,e){e=e||[];var n=t[0],i=t[1]/180*Math.PI;return e[0]=Math.cos(i)*n+this.cx,e[1]=-Math.sin(i)*n+this.cy,e},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return o!==a&&r-1e-4<=o*o&&r+1e-4>=a*a},x:this.cx-e[1],y:this.cy-e[1],width:2*e[1],height:2*e[1]}},t.prototype.convertToPixel=function(t,e,n){return AT(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return AT(e)===this?this.pointToData(n):null},t}();function AT(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function AI(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();tP(xF(e,"radius"),function(t){r.scale.unionExtentFromData(e,t)}),tP(xF(e,"angle"),function(t){i.scale.unionExtentFromData(e,t)})}}),xR(i.scale,i.model),xR(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function AA(t,e){var n;if(t.type=e.get("type"),t.scale=xN(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=null!=(n=e.get("endAngle"))?n:i+(t.inverse?-360:360);t.setExtent(i,r)}e.axis=t,t.model=e}var AD={dimensions:AC,create:function(t,e){var n=[];return t.eachComponent("polar",function(t,i){var r,o,a,s,l,h,u=new Ak(i+"");u.update=AI;var c=u.getRadiusAxis(),d=u.getAngleAxis(),p=t.findAxisModel("radiusAxis"),f=t.findAxisModel("angleAxis");AA(c,p),AA(d,f),r=t.get("center"),o=hp(t,e).refContainer,u.cx=rE(r[0],o.width)+o.x,u.cy=rE(r[1],o.height)+o.y,a=u.getRadiusAxis(),s=Math.min(o.width,o.height)/2,null==(l=t.get("radius"))?l=[0,"100%"]:tW(l)||(l=[0,l]),h=[rE(l[0],s),rE(l[1],s)],a.inverse?a.setExtent(h[1],h[0]):a.setExtent(h[0],h[1]),n.push(u),t.coordinateSystem=u,u.model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",os).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},AL=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function AO(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function AP(t){return+!t.getRadiusAxis().inverse}function AR(t){var e=t[0],n=t[t.length-1];e&&n&&1e-4>Math.abs(Math.abs(e.coord-n.coord)-360)&&t.pop()}var AN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return to(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords({breakTicks:"none"}),a=n.getMinorTicksCoords(),s=tR(n.getViewLabels(),function(t){t=tC(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t});AR(s),AR(o),tP(AL,function(e){t.get([e,"show"])&&(!n.scale.isBlank()||"axisLine"===e)&&AE[e](this.group,t,i,o,a,r,s)},this)}},e.type="angleAxis",e}(_K),AE={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),h=Math.PI/180,u=l.getExtent(),c=AP(n),d=+!c,p=360===Math.abs(u[1]-u[0])?"Circle":"Arc";(a=0===o[d]?new ti[p]({shape:{cx:n.cx,cy:n.cy,r:o[c],startAngle:-u[0]*h,endAngle:-u[1]*h,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new dc({shape:{cx:n.cx,cy:n.cy,r:o[c],r0:o[d]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[AP(n)],h=tR(i,function(t){return new dw({shape:AO(n,[l,l+s],t.coord)})});t.add(d5(h,{style:tA(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),h=o[AP(n)],u=[],c=0;c<r.length;c++)for(var d=0;d<r[c].length;d++)u.push(new dw({shape:AO(n,[h,h+l],r[c][d].coord)}));t.add(d5(u,{style:tA(s.getModel("lineStyle").getLineStyle(),tA(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,n,i,r,o,a){var s=e.getCategories(!0),l=e.getModel("axisLabel"),h=l.get("margin"),u=e.get("triggerEvent");tP(a,function(i,r){var a=l,c=i.tickValue,d=o[AP(n)],p=n.coordToPoint([d+h,i.coord]),f=n.cx,g=n.cy,m=Math.abs(p[0]-f)/d<.3?"center":p[0]>f?"left":"right",y=Math.abs(p[1]-g)/d<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[c]){var v=s[c];tY(v)&&v.textStyle&&(a=new lb(v.textStyle,l,l.ecModel))}var x=new sn({silent:_b.isLabelSilent(e),style:lt(a,{x:p[0],y:p[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:y})});if(t.add(x),pu({el:x,componentModel:e,itemName:i.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:i.rawLabel,tickIndex:r}}),u){var _=_b.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=i.rawLabel,si(x).eventData=_}},this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=0;u<i.length;u++){var c=l++%s.length;h[c]=h[c]||[],h[c].push(new dw({shape:AO(n,o,i[u].coord)}))}for(var u=0;u<h.length;u++)t.add(d5(h[u],{style:tA({stroke:s[u%s.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var h=0;h<r[l].length;h++)s.push(new dw({shape:AO(n,o,r[l][h].coord)}));t.add(d5(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,n,i,r,o){if(i.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=Math.PI/180,c=-i[0].coord*u,d=Math.min(o[0],o[1]),p=Math.max(o[0],o[1]),f=e.get("clockwise"),g=1,m=i.length;g<=m;g++){var y=g===m?i[0].coord:i[g].coord,v=l++%s.length;h[v]=h[v]||[],h[v].push(new dl({shape:{cx:n.cx,cy:n.cy,r0:d,r:p,startAngle:c,endAngle:-y*u,clockwise:f},silent:!0})),c=-y*u}for(var g=0;g<h.length;g++)t.add(d5(h[g],{style:tA({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}},AB=["splitLine","splitArea","minorSplitLine"],Az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return to(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i,r,o,a=this._axisGroup,s=this._axisGroup=new rT;this.group.add(s);var l=t.axis,h=l.polar,u=h.getAngleAxis(),c=l.getTicksCoords(),d=l.getMinorTicksCoords(),p=u.getExtent()[0],f=l.getExtent(),g=(i=h,r=t,o=p,{position:[i.cx,i.cy],rotation:o/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:r.getModel("axisLabel").get("rotate"),z2:1}),m=new _b(t,n,g);m.build(),s.add(m.group),pe(a,s,t),tP(AB,function(e){t.get([e,"show"])&&!l.scale.isBlank()&&AV[e](this.group,t,h,p,f,c,d)},this)}},e.type="radiusAxis",e}(_K),AV={splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,h=n.getAngleAxis(),u=Math.PI/180,c=h.getExtent(),d=360===Math.abs(c[1]-c[0])?"Circle":"Arc";s=s instanceof Array?s:[s];for(var p=[],f=0;f<o.length;f++){var g=l++%s.length;p[g]=p[g]||[],p[g].push(new ti[d]({shape:{cx:n.cx,cy:n.cy,r:Math.max(o[f].coord,0),startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:h.inverse}}))}for(var f=0;f<p.length;f++)t.add(d5(p[f],{style:tA({stroke:s[f%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,n,i,r,o,a){if(a.length){for(var s=e.getModel("minorSplitLine").getModel("lineStyle"),l=[],h=0;h<a.length;h++)for(var u=0;u<a[h].length;u++)l.push(new c0({shape:{cx:n.cx,cy:n.cy,r:a[h][u].coord}}));t.add(d5(l,{style:tA({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(t,e,n,i,r,o){if(o.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=o[0].coord,c=1;c<o.length;c++){var d=l++%s.length;h[d]=h[d]||[],h[d].push(new dl({shape:{cx:n.cx,cy:n.cy,r0:u,r:o[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[c].coord}for(var c=0;c<h.length;c++)t.add(d5(h[c],{style:tA({fill:s[c%s.length]},a.getAreaStyle()),silent:!0}))}}};function AF(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function AW(t,e){return e.dim+t.model.componentIndex}var AH=function(t,e,n){var i,r,o,a={},s=(i=tE(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}),r={},tP(i,function(t,e){var n=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),a=AW(i,o),s=o.getExtent(),l="category"===o.type?o.getBandWidth():Math.abs(s[1]-s[0])/n.count(),h=r[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=h.stacks;r[a]=h;var c=AF(t);!u[c]&&h.autoWidthCount++,u[c]=u[c]||{width:0,maxWidth:0};var d=rE(t.get("barWidth"),l),p=rE(t.get("barMaxWidth"),l),f=t.get("barGap"),g=t.get("barCategoryGap");d&&!u[c].width&&(d=Math.min(h.remainedWidth,d),u[c].width=d,h.remainedWidth-=d),p&&(u[c].maxWidth=p),null!=f&&(h.gap=f),null!=g&&(h.categoryGap=g)}),o={},tP(r,function(t,e){o[e]={};var n,i=t.stacks,r=t.bandWidth,a=rE(t.categoryGap,r),s=rE(t.gap,1),l=t.remainedWidth,h=t.autoWidthCount,u=(l-a)/(h+(h-1)*s);u=Math.max(u,0),tP(i,function(t,e){var n=t.maxWidth;n&&n<u&&(n=Math.min(n,l),t.width&&(n=Math.min(n,t.width)),l-=n,t.width=n,h--)}),u=Math.max(u=(l-a)/(h+(h-1)*s),0);var c=0;tP(i,function(t,e){t.width||(t.width=u),n=t,c+=t.width*(1+s)}),n&&(c-=n.width*s);var d=-c/2;tP(i,function(t,n){o[e][n]=o[e][n]||{offset:d,width:t.width},d+=t.width*(1+s)})}),o);e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=AW(n,i),o=AF(t),l=s[r][o],h=l.offset,u=l.width,c=n.getOtherAxis(i),d=t.coordinateSystem.cx,p=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;a[o]=a[o]||[];for(var m=e.mapDimension(c.dim),y=e.mapDimension(i.dim),v=yg(e,m),x="radius"!==i.dim||!t.get("roundCap",!0),_=c.model.get("startValue"),b=c.dataToCoord(_||0),w=0,S=e.count();w<S;w++){var M=e.get(m,w),C=e.get(y,w),k=M>=0?"p":"n",T=b;v&&(a[o][C]||(a[o][C]={p:b,n:b}),T=a[o][C][k]);var I=void 0,A=void 0,D=void 0,L=void 0;if("radius"===c.dim){var O=c.dataToCoord(M)-b,P=i.dataToCoord(C);Math.abs(O)<f&&(O=(O<0?-1:1)*f),I=T,A=T+O,L=(D=P-h)-u,v&&(a[o][C][k]=A)}else{var R=c.dataToCoord(M,x)-b,N=i.dataToCoord(C);Math.abs(R)<g&&(R=(R<0?-1:1)*g),A=(I=N+h)+u,D=T,L=T+R,v&&(a[o][C][k]=L)}e.setItemLayout(w,{cx:d,cy:p,r0:I,r:A,startAngle:-D*Math.PI/180,endAngle:-L*Math.PI/180,clockwise:D>=L})}}})},AG={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},AU={splitNumber:5},Aj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="polar",e}(cL);function AY(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?h.vertical[o]:l[0],"horizontal"===a?h.horizontal[o]:l[3]],r.rotation=Math.PI/2*({horizontal:0,vertical:1})[a],r.labelDirection=r.tickDirection=r.nameDirection=({top:-1,bottom:1,right:1,left:-1})[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),t$(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var u=t.get(["axisLabel","rotate"]);return r.labelRotate="top"===o?-u:u,r.z2=1,r}var AX=["splitArea","splitLine","breakArea"],AZ=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return to(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new rT;var s=AY(e),l=new _b(e,i,s);l.build(),o.add(this._axisGroup),o.add(l.group),tP(AX,function(t){e.get([t,"show"])&&Aq[t](this,this.group,this._axisGroup,e,i)},this),pe(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){_Q(this)},e.type="singleAxis",e}(_K),Aq={splitLine:function(t,e,n,i,r){var o=i.axis;if(!o.scale.isBlank()){var a=i.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var h=s.get("width"),u=i.coordinateSystem.getRect(),c=o.isHorizontal(),d=[],p=0,f=o.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],m=[],y=0;y<f.length;++y){var v=o.toGlobalCoord(f[y].coord);c?(g[0]=v,g[1]=u.y,m[0]=v,m[1]=u.y+u.height):(g[0]=u.x,g[1]=v,m[0]=u.x+u.width,m[1]=v);var x=new dw({shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},silent:!0});d4(x.shape,h);var _=p++%l.length;d[_]=d[_]||[],d[_].push(x)}for(var b=s.getLineStyle(["color"]),y=0;y<d.length;++y)e.add(d5(d[y],{style:tA({stroke:l[y%l.length]},b),silent:!0}))}},splitArea:function(t,e,n,i,r){_J(t,n,i,i)},breakArea:function(t,e,n,i,r){var o=xn,a=i.axis.scale;o&&"ordinal"!==a.type&&o.rectCoordBuildBreakAxis(e,t,i,i.coordinateSystem.getRect(),r)}},AK=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},e}(h_);tL(AK,v0.prototype);var A$=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.position=o||"bottom",a}return to(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},e}(x7),AJ=["single"],AQ=function(){function t(t,e,n){this.type="single",this.dimension="single",this.dimensions=AJ,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=new A$(this.dimension,xN(t),[0,0],t.get("type"),t.get("position")),r="category"===i.type;i.onBand=r&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},t.prototype.update=function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();tP(e.mapDimensionsAll(this.dimension),function(t){this._axis.scale.unionExtentFromData(e,t)},this),xR(this._axis.scale,this._axis.model)}},this)},t.prototype.resize=function(t,e){var n=hp(t,e).refContainer;this._rect=hu(t.getBoxLayoutParams(),n),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],r=+!!e.inverse;e.setExtent(i[r],i[1-r]),this._updateAxisTransform(e,n?t.x:t.y)},t.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),i=n[0]+n[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return i-t+e}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t,e,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[+("horizontal"!==i.orient)])),n},t.prototype.dataToPoint=function(t,e,n){var i=this.getAxis(),r=this.getRect();n=n||[];var o=+("horizontal"!==i.orient);return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=0===o?r.y+r.height/2:r.x+r.width/2,n},t.prototype.convertToPixel=function(t,e,n){return A0(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return A0(e)===this?this.pointToData(n):null},t}();function A0(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var A1={create:function(t,e){var n=[];return t.eachComponent("singleAxis",function(i,r){var o=new AQ(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",os).models[0];t.coordinateSystem=e&&e.coordinateSystem}}),n},dimensions:AJ},A2=["x","y"],A5=["width","height"],A3=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=A6(a,1-A8(o)),l=a.dataToPoint(e)[0],h=i.get("type");if(h&&"none"!==h){var u=IJ(i),c=A4[h](o,l,s);c.style=u,t.graphicKey=c.type,t.pointer=c}I2(e,t,AY(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=AY(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=I1(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=A8(r),s=A6(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var h=A6(o,1-a),u=(h[1]+h[0])/2,c=[u,u];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(IX),A4={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:I5([e,n[0]],[e,n[1]],A8(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:I3([e-i/2,n[0]],[i,r],A8(t))}}};function A8(t){return+!t.isHorizontal()}function A6(t,e){var n=t.getRect();return[n[A2[e]],n[A2[e]]+n[A5[e]]]}var A9=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="single",e}(cL),A7=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(e,n,i){var r=hy(e);t.prototype.init.apply(this,arguments),Dt(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Dt(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:hS.color.axisLine,width:1,type:"solid"}},itemStyle:{color:hS.color.neutral00,borderWidth:1,borderColor:hS.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:hS.size.s,color:hS.color.secondary},monthLabel:{show:!0,position:"start",margin:hS.size.s,align:"center",formatter:null,color:hS.color.secondary},yearLabel:{show:!0,position:null,margin:hS.size.xl,formatter:null,color:hS.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(h_);function Dt(t,e){var n,i=t.cellSize;1===(n=tW(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=tR([0,1],function(t){return(null!=e[ha[t][0]]||null!=e[ha[t][1]]&&null!=e[ha[t][2]])&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});hm(t,e,{type:"box",ignoreSize:r})}var De=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToCalendarLayout([s],!1).tl,h=new aq({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(h)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=o.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToCalendarLayout([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r=+("horizontal"!==n);return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new dv({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToCalendarLayout([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){if(tG(t)&&t){var n;return n=t,tP(e,function(t,e){n=n.replace("{"+e+"}",t)}),n}return tH(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return("left"===i||"right"===i)&&(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u=+("horizontal"!==n),c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=new sn({z2:30,style:lt(r,{text:this._formatterLabel(p,f)}),silent:r.get("silent")});g.attr(this._yearTextPositionControl(g,c[a],n,a,o)),i.add(g)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),h=[this._tlpoints,this._blpoints];(!o||tG(o))&&(o&&(e=lk[o]||e),o=e.get(["time","monthAbbr"])||[]);var u=+("start"!==s),c=+("horizontal"!==n);a="start"===s?-a:a;for(var d="center"===l,p=r.get("silent"),f=0;f<h[u].length-1;f++){var g=h[u][f].slice(),m=this._firstDayOfMonth[f];if(d){var y=this._firstDayPoints[f];g[c]=(y[c]+h[0][f+1][c])/2}var v=r.get("formatter"),x=o[m.m-1],_={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:x},b=new sn({z2:30,style:tI(lt(r,{text:this._formatterLabel(v,_)}),this._monthTextPositionControl(g,d,n,s,a)),silent:p});i.add(b)}}},e.prototype._weekTextPositionControl=function(t,e,n,i,r){var o="center",a="middle",s=t[0],l=t[1],h="start"===n;return"horizontal"===e?(s=s+i+(h?1:-1)*r[0]/2,o=h?"right":"left"):(l=l+i+(h?1:-1)*r[1]/2,a=h?"bottom":"top"),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderWeekText=function(t,e,n,i,r){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,s=o.get("position"),l=o.get("nameMap"),h=o.get("margin"),u=a.getFirstDayOfWeek();(!l||tG(l))&&(l&&(e=lk[l]||e),l=e.get(["time","dayOfWeekShort"])||tR(e.get(["time","dayOfWeekAbbr"]),function(t){return t[0]}));var c=a.getNextNDay(n.end.time,7-n.lweek).time,d=[a.getCellWidth(),a.getCellHeight()];h=rE(h,Math.min(d[1],d[0])),"start"===s&&(c=a.getNextNDay(n.start.time,-(7+n.fweek)).time,h=-h);for(var p=o.get("silent"),f=0;f<7;f++){var g=a.getNextNDay(c,f),m=a.dataToCalendarLayout([g.time],!1).center,y=new sn({z2:30,style:tI(lt(o,{text:l[Math.abs((f+u)%7)]}),this._weekTextPositionControl(m,i,s,h,d)),silent:p});r.add(y)}}},e.type="calendar",e}(cL),Dn=function(){function t(e,n,i){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e,this._update(n,i)}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var e=(t=rj(t)).getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,r=t.getDate(),o=r<10?"0"+r:""+r,a=t.getDay();return{y:e+"",m:i,d:o,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+o,date:t}},t.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},t.prototype._update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],r=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];tP([0,1],function(t){h(r,t)&&(o[i[t]]=r[t]*a[t])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=hu(o,s);function h(t,e){return null!=t[e]&&"auto"!==t[e]}tP([0,1],function(t){h(r,t)||(r[t]=l[i[t]]/a[t])}),this._sw=r[0],this._sh=r[1]},t.prototype.dataToPoint=function(t,e,n){n=n||[],tW(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),r=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=r.start.time&&i.time<r.end.time+864e5))return n[0]=n[1]=NaN,n;var a=i.day,s=this._getRangeInfo([r.start.time,o]).nthWeek;return"vertical"===this._orient?(n[0]=this._rect.x+a*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+a*this._sh+this._sh/2),n},t.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},t.prototype.dataToLayout=function(t,e,n){var i=(n=n||{}).rect=n.rect||{},r=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,e);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,nu.copy(r,i),ps(r,this._lineWidth/2,!0,!0),n},t.prototype.dataToCalendarLayout=function(t,e){var n=this.dataToPoint(t,e);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},t.prototype.convertToPixel=function(t,e,n){var i=Di(e);return i===this?i.dataToPoint(n):null},t.prototype.convertToLayout=function(t,e,n){var i=Di(e);return i===this?i.dataToLayout(n):null},t.prototype.convertFromPixel=function(t,e,n){var i=Di(e);return i===this?i.pointToData(n):null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.prototype._initRangeOption=function(){var t,e=this._model.get("range");if(tW(e)&&1===e.length&&(e=e[0]),tW(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),r=i.date;r.setMonth(r.getMonth()+1);var o=this.getNextNDay(r,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/864e5)-Math.floor(n[0].time/864e5)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var h=Math.floor((i+n[0].day+6)/7),u=e?-h+1:h-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:h,nthWeek:u,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&e<i.fweek||t===i.weeks&&e>i.lweek)return null;var r=(t-1)*7-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachComponent(function(t,e){hi({targetModel:e,coordSysType:"calendar",coordSysProvider:hr})}),i},t.dimensions=["time","value"],t}();function Di(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var Dr={none:0,all:1,body:2,corner:3};function Do(t,e,n){var i=e[dX[n]].getCell(t);return!i&&tj(t)&&t<0&&(i=e[dX[1-n]].getUnitLayoutInfo(n,Math.round(t))),i}function Da(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function Ds(t,e,n,i,r){Dl(t[0],e,r,n,i,0),Dl(t[1],e,r,n,i,1)}function Dl(t,e,n,i,r,o){t[0]=1/0,t[1]=-1/0;var a=i[o],s=tW(a)?a:[a],l=s.length,h=!!n;if(l>=1?(Dh(t,e,s,h,r,o,0),l>1&&Dh(t,e,s,h,r,o,l-1)):t[0]=t[1]=NaN,h){var u,c,d=-r[dX[1-o]].getLocatorCount(o),p=r[dX[o]].getLocatorCount(o)-1;n===Dr.body?d=rP(0,d):n===Dr.corner&&(p=rO(-1,p)),p<d&&(d=p=NaN),(u=t[0])!=u&&(t[0]=d),(c=t[1])!=c&&(t[1]=p),t[0]=rP(rO(t[0],p),d),t[1]=rP(rO(t[1],p),d)}}function Dh(t,e,n,i,r,o,a){var s,l=Do(n[a],r,o);if(!l){t[0]=t[1]=NaN;return}var h=l.id[dX[o]],u=h,c=(s=l)&&(2===s.type||3===s.type)?s:null;c&&(u+=c.span[dX[o]]-1),t[0]=rO(t[0],h,u),t[1]=rP(t[1],h,u)}function Du(t,e){var n,i;return(n=t[e][0])!=n||(i=t[e][1])!=i}function Dc(t,e,n,i){e=e||Dd;for(var r=0;r<i;r++)e[r]=!1;for(;;){for(var o=!1,r=0;r<i;r++){var a,s,l=n[r];!e[r]&&l.cellMergeOwner&&(a=t,s=l.locatorRange,Dp(a[0],s[0])&&Dp(a[1],s[1])&&(a[0][0]=rO(a[0][0],s[0][0]),a[0][1]=rP(a[0][1],s[0][1]),a[1][0]=rO(a[1][0],s[1][0]),a[1][1]=rP(a[1][1],s[1][1]),1))&&(e[r]=!0,o=!0)}if(!o)break}}var Dd=[];function Dp(t,e){return t[1]>=e[0]&&t[0]<=e[1]}function Df(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Dg(t,e,n,i){var r=Do(e[i][0],n,i),o=Do(e[i][1],n,i);t[dX[i]]=t[dZ[i]]=NaN,r&&o&&(t[dX[i]]=r.xy,t[dZ[i]]=o.xy+o.wh-r.xy)}function Dm(t,e,n,i){return t[dX[e]]=n,t[dX[1-e]]=i,t}function Dy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var Dv=function(){function t(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=+("x"!==t),this._model=e,this._uniqueValueGen=(i=RegExp("^"+(n=t.toUpperCase())+"([0-9]+)$"),r=0,{calcDupBase:function(t){var e;null!=t&&(e=t.match(i))&&(r=rP(r,+e[1]+1))},ensureValueUnique:function(t,e){for(var i=t9(),o=0;o<t.length;o++){var a=t[o];(null==a||null!=i.get(a))&&(t[o]=a=""+n+r++,e[o].option=tA({value:a},e[o].option)),i.set(a,!0)}}});var n,i,r,o=e.get("data",!0);null==o||tW(o)||(o=[]),o?this._initByDimModelData(o):this._initBySeriesData()}return t.prototype._initByDimModelData=function(t){var e=this,n=e._cells,i=e._levels,r=[],o=0;e._leavesCount=function t(n,a,s){var l=0;return n&&tP(n,function(n,h){tG(n)?u={value:n}:tY(n)?(u=n,null==n.value||tG(n.value)||(u={value:null})):u={value:null};var u,c={type:3,ordinal:NaN,level:s,firstLeafLocator:a,id:new e1,span:Dm(new e1,e.dimIdx,1,1),option:u,xy:NaN,wh:NaN,dim:e,rect:Dy()};o++,(r[a]||(r[a]=[])).push(c),i[s]||(i[s]={type:1,xy:NaN,wh:NaN,option:null,id:new e1,dim:e});var d=Math.max(1,t(u.children,a,s+1));c.span[dX[e.dimIdx]]=d,l+=d,a+=d}),l}(t,0,0),function(){for(var t=[];n.length<o;)for(var i=0;i<r.length;i++){var a=r[i].pop();if(a){a.ordinal=t.length;var s=a.option.value;t.push(s),n.push(a),e._uniqueValueGen.calcDupBase(s)}}e._uniqueValueGen.ensureValueUnique(t,n);var l=e._ordinalMeta=new v7({categories:t,needCollect:!1,deduplication:!1});e._scale=new xg({ordinalMeta:l});for(var h=0;h<e._leavesCount;h++){var u=e._cells[h];u.type=2,u.span[dX[1-e.dimIdx]]=e._levels.length-u.level}e._initCellsId(),e._initLevelIdOptions()}()},t.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:1,xy:NaN,wh:NaN,option:null,id:new e1,dim:t}],t._initLevelIdOptions();var e=t._ordinalMeta=new v7({needCollect:!0,deduplication:!0,onCollect:function(e,n){var i=t._cells[n]={type:2,ordinal:n,level:0,firstLeafLocator:n,id:new e1,span:Dm(new e1,t.dimIdx,1,1),option:{value:e+""},xy:NaN,wh:NaN,dim:t,rect:Dy()};t._leavesCount++,t._setCellId(i)}});t._scale=new xg({ordinalMeta:e})},t.prototype._setCellId=function(t){var e=this._levels.length,n=this.dimIdx;Dm(t.id,n,t.firstLeafLocator,t.level-e)},t.prototype._initCellsId=function(){var t=this._levels.length,e=this.dimIdx;tP(this._cells,function(n){Dm(n.id,e,n.firstLeafLocator,n.level-t)})},t.prototype._initLevelIdOptions=function(){var t=this._levels.length,e=this.dimIdx,n=this._model.get("levels",!0);n=tW(n)?n:[],tP(this._levels,function(i,r){Dm(i.id,e,0,r-t),i.option=n[r]})},t.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},t.prototype.resetLayoutIterator=function(t,e,n,i){if(t=t||new op,e===this.dimIdx){var r=this._leavesCount,o=null!=n?Math.max(0,n):0;i=null!=i?Math.min(i,r):r,t.reset(this._cells,o,o+i)}else{var r=this._levels.length,o=null!=n?Math.max(0,n+r):0;i=null!=i?Math.min(i,r):r,t.reset(this._levels,o,o+i)}return t},t.prototype.resetCellIterator=function(t){return(t||new op).reset(this._cells,0)},t.prototype.resetLevelIterator=function(t){return(t||new op).reset(this._levels,0)},t.prototype.getLayout=function(t,e,n){var i=this.getUnitLayoutInfo(e,n);t[dX[e]]=i?i.xy:NaN,t[dZ[e]]=i?i.wh:NaN},t.prototype.getUnitLayoutInfo=function(t,e){return t===this.dimIdx?e<this._leavesCount?this._cells[e]:void 0:this._levels[e+this._levels.length]},t.prototype.getCell=function(t){var e=this._scale.parse(t);return e!=e?void 0:this._cells[e]},t.prototype.getLocatorCount=function(t){return t===this.dimIdx?this._leavesCount:this._levels.length},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t}(),Dx=function(){function t(t,e,n){this._model=e,this._dims=n,this._kind=t,this._cellMergeOwnerList=[]}return t.prototype._ensureCellMap=function(){var t=this,e=t._cellMap;return e||(e=t._cellMap=t9(),function(){var e=[],i=t._model.getShallow("data");i&&!tW(i)&&(i=null),tP(i,function(n,i){if(tY(n)&&tW(n.coord)){var r=Da([]);if(Ds(r,null,n.coord,t._dims,n.coordClamp?Dr[t._kind]:Dr.none),!(Du(r,0)||Du(r,1))){var o=n&&n.mergeCells,a={id:new e1,span:new e1,locatorRange:r,option:n,cellMergeOwner:o};Df(a,r),e.push(a)}}});for(var r=[],o=0;o<e.length;o++){var a=e[o];if(a.cellMergeOwner){var s=a.locatorRange;Dc(s,r,e,o);for(var l=0;l<o;l++)r[l]&&(e[l].cellMergeOwner=!1);if(s[0][0]!==a.id.x||s[1][0]!==a.id.y){a.cellMergeOwner=!1;var h=tI({},a.option);h.coord=null;var u={id:new e1,span:new e1,locatorRange:s,option:h,cellMergeOwner:!0};Df(u,s),e.push(u)}}}tP(e,function(e){var i=n(e.id.x,e.id.y);if(e.cellMergeOwner&&(i.cellMergeOwner=!0,i.span=e.span,i.locatorRange=e.locatorRange,i.spanRect=Dy(),t._cellMergeOwnerList.push(i)),e.cellMergeOwner||e.option)for(var r=0;r<e.span.y;r++)for(var o=0;o<e.span.x;o++){var a=n(e.id.x+o,e.id.y+r);a.option=e.option,e.cellMergeOwner&&(a.inSpanOf=i)}})}()),e;function n(t,n){var i=t+"|"+n,r=e.get(i);return r||(r=e.set(i,{id:new e1(t,n),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),r}},t.prototype.getCell=function(t){var e;return this._ensureCellMap().get((e=t[0],e+"|"+t[1]))},t.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},t.prototype.expandRangeByCellMerge=function(t){if(!Du(t,0)&&!Du(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){D_[0]=t[0][0],D_[1]=t[1][0];var e,n=this.getCell(D_),i=n&&n.inSpanOf;if(i)return void(e=i.locatorRange,t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1])}var r=this._cellMergeOwnerList;Dc(t,null,r,r.length)},t}(),D_=[],Db={show:!0,color:hS.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function Dw(t){return{color:"none",borderWidth:1,borderColor:t?"none":hS.color.borderTint}}var DS={show:!0,label:Db,itemStyle:Dw(!1),silent:void 0,dividerLineStyle:{width:1,color:hS.color.border}},DM={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:DS,y:DS,body:{label:Db,itemStyle:Dw(!1),silent:void 0},corner:{label:Db,itemStyle:Dw(!0),silent:void 0},backgroundStyle:{color:"none",borderColor:hS.color.axisLine,borderWidth:1}},DC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.optionUpdated=function(){var t=this._dimModels={x:new Dk(this.get("x",!0)||{}),y:new Dk(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var e={x:t.x.dim=new Dv("x",t.x),y:t.y.dim=new Dv("y",t.y)};this._body=new Dx("body",new lb(this.getShallow("body")),e),this._corner=new Dx("corner",new lb(this.getShallow("corner")),e)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=DM,e}(h_),Dk=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e}(lb),DT=Math.round,DI={normal:25,special:100},DA={normal:50,special:125},DD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e){this.group.removeAll();var n=this.group,i=t.coordinateSystem.getRect(),r=t.getDimensionModel("x"),o=t.getDimensionModel("y"),a=r.dim,s=o.dim;(function(t,e,n){function i(i){var r=e.getDimensionModel(dX[i]),o=r.dim;if(o.shouldShow())for(var a=r.getModel("itemStyle"),s=r.getModel("label"),l=e.getShallow("tooltip",!0),h=[],u=o.resetCellIterator();u.next();){var c=u.item,d={};nu.copy(d,c.rect),el(h,c.id.x,c.id.y),DL(h,e,t,n,c.option,a,s,r,d,c.option.value,DA,l)}}i(0),i(1)})(n,t,e),function(t,e,n,i,r){function o(n,i,o,a){var s=new lb(e.getShallow(n,!0)),l=s.getModel("itemStyle"),h=s.getModel("label"),u=new op,c=new op,d=[],p=e.getShallow("tooltip",!0);for(a.resetLayoutIterator(c,1);c.next();)for(o.resetLayoutIterator(u,0);u.next();){var f=u.item,g=c.item;el(d,f.id.x,g.id.y);var m=i.getCell(d);if(!m||!m.inSpanOf||m.inSpanOf===m){var y={};m&&m.span?nu.copy(y,m.spanRect):(f.dim.getLayout(y,0,d[0]),g.dim.getLayout(y,1,d[1]));var v=m?m.option:null;DL(d,e,t,r,v,l,h,s,y,v?v.value:null,DI,p)}}}o("body",e.getBody(),n,i),n.shouldShow()&&i.shouldShow()&&o("corner",e.getCorner(),i,n)}(n,t,a,s,e);var l=tJ(t.getShallow("borderZ2",!0),99),h=l-1,u=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);u.lineWidth=0;var c=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);c.fill="none";var d=DE(i.clone(),u,0),p=DE(i.clone(),c,l);d.silent=!0,p.silent=!0,n.add(d),n.add(p);var f=a.getUnitLayoutInfo(0,0),g=s.getUnitLayoutInfo(1,0);f&&g&&(a.shouldShow()&&n.add(DB({x1:i.x,y1:g.xy,x2:i.x+i.width,y2:g.xy},r.getModel("dividerLineStyle").getLineStyle(),h)),s.shouldShow()&&n.add(DB({x1:f.xy,y1:i.y,x2:f.xy,y2:i.y+i.height},o.getModel("dividerLineStyle").getLineStyle(),h)))},e.type="matrix",e}(cL);function DL(t,e,n,i,r,o,a,s,l,h,u,c){DP.option=r?r.itemStyle:null,DP.parentModel=o,DO.option=r,DO.parentModel=s;var d,p,f=tJ(DO.getShallow("z2"),r&&r.itemStyle?u.special:u.normal),g=c&&c.show,m=DE(l,DP.getItemStyle(),f);n.add(m);var y=DO.get("cursor");if(null!=y&&m.attr("cursor",y),null!=h){var v=h+"";if(DR.option=r?r.label:null,DR.parentModel=a,DR.ecModel=i,s9(m,{normal:DR},{defaultText:v,autoOverflowArea:!0,layoutRect:tC(m.shape)}),p=m.getTextContent()){p.z2=f+1;var x=p.style;if(x&&x.overflow&&"none"!==x.overflow&&x.lineOverflow){var _={};nu.copy(_,l),ps(_,((null==(d=m.style)?void 0:d.lineWidth)||0)/2,!0,!0),m.updateInnerText(),p.getLocalTransform(DN),e0(DN,DN),nu.applyTransform(_,_,DN),p.setClipPath(new aq({shape:_}))}}pu({el:m,componentModel:e,itemName:v,itemTooltipOption:c,formatterParamsExtra:{xyLocator:t.slice()}})}if(p){var b=DR.get("silent");null==b&&(b=!g),p.silent=b,p.ignoreHostSilent=!0}var w=DO.get("silent");null==w&&(w=!m.style||"none"===m.style.fill||!m.style.fill),m.silent=w,of(DO),of(DP),of(DR)}var DO=new lb,DP=new lb,DR=new lb,DN=[];function DE(t,e,n){var i=e.lineWidth;if(i){var r=t.x+t.width,o=t.y+t.height;t.x=aj(t.x,i,!0),t.y=aj(t.y,i,!0),t.width=aj(r,i,!0)-t.x,t.height=aj(o,i,!0)-t.y}return new aq({shape:t,style:e,z2:n})}function DB(t,e,n){var i=e.lineWidth;return i&&(DT(2*t.x1)===DT(2*t.x2)&&(t.x1=t.x2=aj(t.x1,i,!0)),DT(2*t.y1)===DT(2*t.y2)&&(t.y1=t.y2=aj(t.y1,i,!0))),new dw({shape:t,style:e,silent:!0,z2:n})}var Dz=function(){function t(e,n,i){this.dimensions=t.dimensions,this.type="matrix",this._model=e;var r=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:r.x.dim,y:r.y.dim},this._resize(e,i)}return t.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},t.create=function(e,n){var i=[];return e.eachComponent("matrix",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachComponent(function(t,e){hi({targetModel:e,coordSysType:"matrix",coordSysProvider:hr})}),i},t.prototype.getRect=function(){return this._rect},t.prototype._resize=function(t,e){var n=this._dims,i=this._dimModels,r=this._rect=hu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});DH(i,n,r,0),DH(i,n,r,1),DG(0,n),DG(1,n),DU(this._model.getBody(),n),DU(this._model.getCorner(),n)},t.prototype.dataToPoint=function(t,e,n){return n=n||[],this.dataToLayout(t,e,DV),n[0]=DV.rect.x+DV.rect.width/2,n[1]=DV.rect.y+DV.rect.height/2,n},t.prototype.dataToLayout=function(t,e,n){var i=this._dims,r=(n=n||{}).rect=n.rect||{};r.x=r.y=r.width=r.height=NaN;var o=n.matrixXYLocatorRange=Da(n.matrixXYLocatorRange);return tW(t)&&(Ds(o,null,t,i,tJ(e&&e.clamp,Dr.none)),e&&e.ignoreMergeCells||(e&&e.clamp===Dr.corner||this._model.getBody().expandRangeByCellMerge(o),e&&e.clamp===Dr.body||this._model.getCorner().expandRangeByCellMerge(o)),Dg(r,o,i,0),Dg(r,o,i,1)),n},t.prototype.pointToData=function(t,e,n){var i=this._dims;return DK(Dq,0,i,t,e&&e.clamp),DK(Dq,1,i,t,e&&e.clamp),(n=n||[])[0]=n[1]=NaN,Dq.y===DZ.inCorner&&Dq.x===DZ.inBody?D$(Dq,n,0,i):Dq.x===DZ.inCorner&&Dq.y===DZ.inBody?D$(Dq,n,1,i):(DJ(Dq,n,0,i),DJ(Dq,n,1,i)),n},t.prototype.convertToPixel=function(t,e,n,i){var r=DX(e);return r===this?r.dataToPoint(n,i):void 0},t.prototype.convertToLayout=function(t,e,n,i){var r=DX(e);return r===this?r.dataToLayout(n,i):void 0},t.prototype.convertFromPixel=function(t,e,n,i){var r=DX(e);return r===this?r.pointToData(n,i):void 0},t.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},t.dimensions=["x","y","value"],t}(),DV={rect:Dy()},DF=new op,DW=new op;function DH(t,e,n,i){for(var r=1-i,o=e[dX[i]],a=e[dX[r]],s=a.shouldShow(),l=o.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var h=a.resetLayoutIterator(null,i);h.next();)h.item.wh=h.item.xy=NaN;for(var u=n[dZ[i]],c=o.getLocatorCount(i)+a.getLocatorCount(i),d=new lb,p=a.resetLevelIterator();p.next();)d.option=p.item.option,d.parentModel=t[dX[r]],m(p.item,s?d.get("levelSize"):0);for(var f=new lb,g=o.resetCellIterator();g.next();)2===g.item.type&&(f.option=g.item.option,f.parentModel=void 0,m(g.item,f.get("size")));function m(t,e){var r,o,a,s=(r=e,o=i,DY(rB(r,(a=n)[dZ[o]]),a[dZ[o]]));s==s&&(t.wh=DY(s,u),u=DY(u-t.wh),c--)}var y=c?u/c:0,v=!c&&u>=1,x=n[dX[i]],_=o.getLocatorCount(i)-1,b=new op;for(a.resetLayoutIterator(b,i);b.next();)w(b.item);for(o.resetLayoutIterator(b,i);b.next();)w(b.item);function w(t){var e;(e=t.wh)!=e&&(t.wh=y),t.xy=x,t.id[dX[i]]!==_||v||(t.wh=n[dX[i]]+n[dZ[i]]-t.xy),x+=t.wh}}function DG(t,e){for(var n=e[dX[t]].resetCellIterator();n.next();){var i=n.item;Dj(i.rect,t,i.id,i.span,e),Dj(i.rect,1-t,i.id,i.span,e),3===i.type&&(i.xy=i.rect[dX[t]],i.wh=i.rect[dZ[t]])}}function DU(t,e){t.travelExistingCells(function(t){var n=t.span;if(n){var i=t.spanRect,r=t.id;Dj(i,0,r,n,e),Dj(i,1,r,n,e)}})}function Dj(t,e,n,i,r){t[dZ[e]]=0;var o=n[dX[e]]<0?r[dX[1-e]]:r[dX[e]],a=o.getUnitLayoutInfo(e,n[dX[e]]);if(t[dX[e]]=a.xy,t[dZ[e]]=a.wh,i[dX[e]]>1){var s=o.getUnitLayoutInfo(e,n[dX[e]]+i[dX[e]]-1);t[dZ[e]]=s.xy+s.wh-a.xy}}function DY(t,e){return Math.max(Math.min(t,tJ(e,1/0)),0)}function DX(t){var e=t.matrixModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var DZ={inBody:1,inCorner:2,outside:3},Dq={x:null,y:null,point:[]};function DK(t,e,n,i,r){var o=n[dX[e]],a=n[dX[1-e]],s=o.getUnitLayoutInfo(e,o.getLocatorCount(e)-1),l=o.getUnitLayoutInfo(e,0),h=a.getUnitLayoutInfo(e,-a.getLocatorCount(e)),u=a.shouldShow()?a.getUnitLayoutInfo(e,-1):null,c=t.point[e]=i[e];if(!l&&!u){t[dX[e]]=DZ.outside;return}if(r===Dr.body)return void(l?(t[dX[e]]=DZ.inBody,c=rO(s.xy+s.wh,rP(l.xy,c)),t.point[e]=c):t[dX[e]]=DZ.outside);if(r===Dr.corner)return void(u?(t[dX[e]]=DZ.inCorner,c=rO(u.xy+u.wh,rP(h.xy,c)),t.point[e]=c):t[dX[e]]=DZ.outside);var d=l?l.xy:u?u.xy+u.wh:NaN,p=h?h.xy:d,f=s?s.xy+s.wh:d;if(c<p){if(!r){t[dX[e]]=DZ.outside;return}c=p}else if(c>f){if(!r){t[dX[e]]=DZ.outside;return}c=f}t.point[e]=c,t[dX[e]]=d<=c&&c<=f?DZ.inBody:p<=c&&c<=d?DZ.inCorner:DZ.outside}function D$(t,e,n,i){var r=1-n;if(t[dX[n]]!==DZ.outside)for(i[dX[n]].resetCellIterator(DW);DW.next();){var o=DW.item;if(DQ(t.point[n],o.rect,n)&&DQ(t.point[r],o.rect,r)){e[n]=o.ordinal,e[r]=o.id[dX[r]];return}}}function DJ(t,e,n,i){if(t[dX[n]]!==DZ.outside)for((t[dX[n]]===DZ.inCorner?i[dX[1-n]]:i[dX[n]]).resetLayoutIterator(DF,n);DF.next();){var r,o;if(r=t.point[n],(o=DF.item).xy<=r&&r<=o.xy+o.wh){e[n]=DF.item.id[dX[n]];return}}}function DQ(t,e,n){return e[dX[n]]<=t&&t<=e[dX[n]]+e[dZ[n]]}function D0(t,e){var n;return tP(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}var D1=["transition","enterFrom","leaveTo"],D2=D1.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function D5(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?D1:D2,r=0;r<i.length;r++){var o=i[r];null==t[o]&&null!=e[o]&&(t[o]=e[o])}}var D3=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return to(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=r8(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];tP(a,function(t,e){var n=t.newOption;if(n){s.push(n);var i,o,a,l,h=t.existing;if(n.id=t.keyInfo.id,!n.type&&h&&(n.type=h.type),null==n.parentId){var u=n.parentOption;u?n.parentId=u.id:h&&(n.parentId=h.parentId)}n.parentOption=null,i=tI({},n),o=r[e],"merge"===(a=n.$action||"merge")?o?(tk(o,i,!0),hm(o,i,{ignoreSize:!0}),hv(n,o),D5(n,o),D5(n,o,"shape"),D5(n,o,"style"),D5(n,o,"extra"),n.clipPath=o.clipPath):r[e]=i:"replace"===a?r[e]=i:"remove"===a&&o&&(r[e]=null),l=r[e],l&&(l.hv=n.hv=[D0(n,["left","right"]),D0(n,["top","bottom"])],"group"===l.type&&(null==l.width&&(l.width=n.width=0),null==l.height&&(l.height=n.height=0)))}},this),n.elements=tE(r,function(t){return t&&delete t.$action,null!=t})},e.prototype._flatten=function(t,e,n){tP(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;i&&i.length&&this._flatten(i,e,t),delete t.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(h_),D4={path:null,compoundPath:null,group:rT,image:aW,text:sn},D8=oi(),D6=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(){this._elMap=t9()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group,r=t.get("z"),o=t.get("zlevel");tP(e,function(e){var a=r7(e.id,null),s=null!=a?n.get(a):null,l=r7(e.parentId,null),h=null!=l?n.get(l):i,u=e.type,c=e.style;"text"===u&&c&&e.hv&&e.hv[1]&&(c.textVerticalAlign=c.textBaseline=c.verticalAlign=c.align=null);var d=e.textContent,p=e.textConfig;if(c&&T8(c,u,!!p,!!d)){var f=T6(c,u,!0);!p&&f.textConfig&&(p=e.textConfig=f.textConfig),!d&&f.textContent&&(d=f.textContent)}var g=(M=tI({},M=e),tP(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(ho),function(t){delete M[t]}),M),m=e.$action||"merge",y="merge"===m,v="replace"===m;if(y){var x=!s,_=s;x?_=D7(a,h,e.type,n):(_&&(D8(_).isNew=!1),Iy(_)),_&&(Ia(_,g,t,{isInit:x}),Le(_,e,r,o))}else if(v){Lt(s,e,n,t);var b=D7(a,h,e.type,n);b&&(Ia(b,g,t,{isInit:!0}),Le(b,e,r,o))}else"remove"===m&&(Is(s,e),Lt(s,e,n,t));var w=n.get(a);if(w&&d)if(y){var S=w.getTextContent();S?S.attr(d):w.setTextContent(new sn(d))}else v&&w.setTextContent(new sn(d));if(w){var M,C,k,T,I,A=e.clipPath;if(A){var D=A.type,L=void 0,x=!1;if(y){var O=w.getClipPath();L=(x=!O||D8(O).type!==D)?D9(D):O}else v&&(x=!0,L=D9(D));w.setClipPath(L),Ia(L,A,t,{isInit:x}),Iv(L,A.keyframeAnimation,t)}var P=D8(w);w.setTextConfig(p),P.option=e,C=w,k=t,T=e,I=si(C).eventData,C.silent||C.ignore||I||(I=si(C).eventData={componentType:"graphic",componentIndex:k.componentIndex,name:C.name}),I&&(I.info=T.info),pu({el:w,componentModel:t,itemName:w.name,itemTooltipOption:e.tooltip}),Iv(w,e.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=["x","y"],l=0;l<n.length;l++){var h=n[l],u=r7(h.id,null),c=null!=u?r.get(u):null;if(c&&c.isGroup){var d=c.parent,p=d===i,f=D8(c),g=D8(d);f.width=rE(f.option.width,p?o:g.width)||0,f.height=rE(f.option.height,p?a:g.height)||0}}for(var l=n.length-1;l>=0;l--){var h=n[l],u=r7(h.id,null),c=null!=u?r.get(u):null;if(c){var d=c.parent,g=D8(d),m=d===i?{width:o,height:a}:{width:g.width,height:g.height},y={},v=hf(c,h,m,null,{hv:h.hv,boundingMode:h.bounding},y);if(!D8(c).isNew&&v){for(var x=h.transition,_={},b=0;b<s.length;b++){var w=s[b],S=y[w];x&&(Ih(x)||tD(x,w)>=0)?_[w]=S:c[w]=S}sJ(c,_,t,0)}else c.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each(function(n){Lt(n,D8(n).option,e,t._lastGraphicModel)}),this._elMap=t9()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(cL);function D9(t){var e=new(en(D4,t)?D4[t]:dQ(t))({});return D8(e).type=t,e}function D7(t,e,n,i){var r=D9(n);return e.add(r),i.set(t,r),D8(r).id=t,D8(r).isNew=!0,r}function Lt(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse(function(t){Lt(t,e,n,i)}),Il(t,e,i),n.removeKey(D8(t).id))}function Le(t,e,n,i){t.isGroup||tP([["cursor",o$.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],function(n){var i=n[0];en(e,i)?t[i]=tJ(e[i],n[1]):null==t[i]&&(t[i]=n[1])}),tP(tz(e),function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=tH(i)?i:null}}),en(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Ln=["x","y","radius","angle","single"],Li=["cartesian2d","polar","singleAxis"];function Lr(t){return t+"Axis"}function Lo(t){var e=t.ecModel,n={infoList:[],infoMap:t9()};return t.eachTargetAxis(function(t,i){var r=e.getComponent(Lr(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}}),n}var La=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),Ls=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return to(e,t),e.prototype.init=function(t,e,n){var i=Ll(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=Ll(t);tk(this.option,t,!0),tk(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;tP([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=t9();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return tP(Ln,function(n){var i=this.getReferringComponents(Lr(n),ol);if(i.specified){e=!0;var r=new La;tP(i.models,function(t){r.add(t.componentIndex)}),t.set(n,r)}},this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0,r="vertical"===e?"y":"x",o=n.findComponents({mainType:r+"Axis"});if(a(o,r),i){var o=n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}});a(o,"single")}function a(e,n){var r=e[0];if(r){var o=new La;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",os).models[0];a&&tP(e,function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",os).models[0]&&o.add(t.componentIndex)})}}}i&&tP(Ln,function(e){if(i){var r=n.findComponents({mainType:Lr(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new La;o.add(r[0].componentIndex),t.set(e,o),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(e){t||(t=e)},this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");tP([["start","startValue"],["end","endValue"]],function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(e,n){null==t&&(t=this.ecModel.getComponent(Lr(e),n))},this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each(function(n,i){tP(n.indexList,function(n){t.call(e,i,n)})})},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(Lr(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;tP([["start","startValue"],["end","endValue"]],function(i){(null!=t[i[0]]||null!=t[i[1]])&&(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;tP(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var r=n[i],o=this._targetAxisInfoMap.get(r),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(r,o.indexList[a]);if(s.hostedBy(this))return s;e||(e=s)}return e},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(h_);function Ll(t){var e={};return tP(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var Lh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="dataZoom.select",e}(Ls),Lu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(cL),Lc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="dataZoom.select",e}(Lu),Ld=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(tD(Li,e.get("coordinateSystem"))>=0){var n=Lr(this._dimName),i=e.getReferringComponents(n,os).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return tC(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];tP(["start","end"],function(l,h){var u=t[l],c=t[l+"Value"];"percent"===r[h]?(null==u&&(u=o[h]),c=i.parse(rN(u,o,n))):(e=!0,u=rN(c=null==c?n[h]:i.parse(c),n,o)),s[h]=null==c||isNaN(c)?n[h]:c,a[h]=null==u||isNaN(u)?o[h]:u}),rV(s),rV(a);var l=this._minMaxSpan;function h(t,e,n,r,o){var a=o?"Span":"ValueSpan";Cy(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=rN(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?h(s,a,n,o,!1):h(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e,n,i,r,o,a=this.getTargetSeriesModels();this._dataExtent=(e=this,n=this._dimName,i=[1/0,-1/0],tP(a,function(t){var e;e=t.getData(),e&&tP(xF(e,n),function(t){var n=e.getApproximateExtent(t);n[0]<i[0]&&(i[0]=n[0]),n[1]>i[1]&&(i[1]=n[1])})}),[(o=xL((r=e.getAxisModel()).axis.scale,r,i).calculate()).min,o.max]),this._updateMinMaxSpan();var s=this.calculateDataWindow(t.settledOption);this._valueWindow=s.valueWindow,this._percentWindow=s.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&tP(i,function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=tR(i,function(t){return e.getDimensionIndex(t)},e);e.filterSelf(function(t){for(var e,n,r,l=0;l<i.length;l++){var h=a.get(s[l],t),u=!isNaN(h),c=h<o[0],d=h>o[1];if(u&&!c&&!d)return!0;u&&(r=!0),c&&(e=!0),d&&(n=!0)}return r&&e&&n})}else tP(i,function(n){if("empty"===r)t.setData(e=e.map(n,function(t){var e;return(e=t)>=o[0]&&e<=o[1]?t:NaN}));else{var i={};i[n]=o,e.selectRange(i)}});tP(i,function(t){e.setApproximateExtent(o,t)})}})}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;tP(["min","max"],function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=rN(n[0]+o,n,[0,100],!0):null!=r&&(o=rN(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=rW(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}(),Lp={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=t.getComponent(Lr(i),r);e(i,r,o,n)})})}e(function(t,e,n,i){n.__dzAxisProxy=null});var n=[];e(function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new Ld(e,i,o,t),n.push(r.__dzAxisProxy))});var i=t9();return tP(n,function(t){tP(t.getTargetSeriesModels(),function(t){i.set(t.uid,t)})}),i},overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(e,n){t.getAxisProxy(e,n).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}},Lf=!1;function Lg(t){Lf||(Lf=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Lp),t.registerAction("dataZoom",function(t,e){tP(function(t,e){var n,i=t9(),r=[],o=t9();t.eachComponent({mainType:"dataZoom",query:e},function(t){o.get(t.uid)||s(t)});do n=!1,t.eachComponent("dataZoom",a);while(n);function a(t){var e;!o.get(t.uid)&&(e=!1,t.eachTargetAxis(function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)}),e)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis(function(t,e){(i.get(t)||i.set(t,[]))[e]=!0})}return r}(e,t),function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Lm(t){t.registerComponentModel(Lh),t.registerComponentView(Lc),Lg(t)}var Ly=function(){},Lv={},Lx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;tP(this.option.feature,function(t,n){var i=Lv[n];i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),tk(t,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:hS.color.border,borderRadius:0,borderWidth:0,padding:hS.size.m,itemSize:15,itemGap:hS.size.s,showTitle:!0,iconStyle:{borderColor:hS.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:hS.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(h_);function L_(t,e){var n=t1(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new aq({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var Lb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),h=[];tP(s,function(t,e){h.push(e)}),new m4(this._featureNames||[],h).add(f).update(f).remove(tF(f,null)).execute(),this._featureNames=h;var u=hp(t,n).refContainer,c=t.getBoxLayoutParams(),d=t.get("padding"),p=hu(c,u,d);hs(t.get("orient"),r,t.get("itemGap"),p.width,p.height),hf(r,c,u,d),r.add(L_(r.getBoundingRect(),t)),a||r.eachChild(function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!tH(l)&&e){var h=l.style||(l.style={}),u=rc(e,sn.makeFont(h)),c=t.x+r.x,d=t.y+r.y+o,p=!1;d+u.height>n.getHeight()&&(a.position="top",p=!0);var f=p?-5-u.height:o+10;c+u.width/2>n.getWidth()?(a.position=["100%",f],h.align="right"):c-u.width/2<0&&(a.position=[0,f],h.align="left")}})}function f(u,c){var d,p,f,g,m,y,v,x,_,b,w,S=h[u],M=h[c],C=s[S],k=new lb(C,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===S&&(C.title=i.newTitle),S&&!M){if(0===S.indexOf("my"))w={onclick:k.option.onclick,featureName:S};else{var T=Lv[S];if(!T)return;w=new T}l[S]=w}else if(!(w=l[M]))return;w.uid=lS("toolbox-feature"),w.model=k,w.ecModel=e,w.api=n;var I=w instanceof Ly;if(!S&&M){I&&w.dispose&&w.dispose(e,n);return}if(!k.get("show")||I&&w.unusable){I&&w.remove&&w.remove(e,n);return}d=k,p=w,f=S,y=d.getModel("iconStyle"),v=d.getModel(["emphasis","iconStyle"]),x=p instanceof Ly&&p.getIcons?p.getIcons():d.get("icon"),_=d.get("title")||{},tG(x)?(g={})[f]=x:g=x,tG(_)?(m={})[f]=_:m=_,b=d.iconPaths={},tP(g,function(i,s){var l=pr(i,{},{x:-o/2,y:-o/2,width:o,height:o});l.setStyle(y.getItemStyle()),l.ensureState("emphasis").style=v.getItemStyle();var h=new sn({style:{text:m[s],align:v.get("textAlign"),borderRadius:v.get("textBorderRadius"),padding:v.get("textPadding"),fill:null,font:la({fontStyle:v.get("textFontStyle"),fontFamily:v.get("textFontFamily"),fontSize:v.get("textFontSize"),fontWeight:v.get("textFontWeight")},e)},ignore:!0});l.setTextContent(h),pu({el:l,componentModel:t,itemName:s,formatterParamsExtra:{title:m[s]}}),l.__title=m[s],l.on("mouseover",function(){var e=v.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";h.setStyle({fill:v.get("textFill")||e.fill||e.stroke||hS.color.neutral99,backgroundColor:v.get("textBackgroundColor")}),l.setTextConfig({position:v.get("textPosition")||i}),h.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==d.get(["iconStatus",s])&&n.leaveEmphasis(this),h.hide()}),("emphasis"===d.get(["iconStatus",s])?sL:sO)(l),r.add(l),l.on("click",tV(p.onclick,p,e,n,s)),b[s]=l}),k.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?sL:sO)(i[t])},w instanceof Ly&&w.render&&w.render(k,e,n,i)}},e.prototype.updateView=function(t,e,n,i){tP(this._features,function(t){t instanceof Ly&&t.updateView&&t.updateView(t.model,e,n,i)})},e.prototype.remove=function(t,e){tP(this._features,function(n){n instanceof Ly&&n.remove&&n.remove(t,e)}),this.group.removeAll()},e.prototype.dispose=function(t,e){tP(this._features,function(n){n instanceof Ly&&n.dispose&&n.dispose(t,e)})},e.type="toolbox",e}(cL),Lw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||hS.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=ts.browser;if("function"!=typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=a.split(","),h=l[0].indexOf("base64")>-1,u=r?decodeURIComponent(l[1]):l[1];h&&(u=window.atob(u));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var d=u.length,p=new Uint8Array(d);d--;)p[d]=u.charCodeAt(d);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,c)}else{var g=document.createElement("iframe");document.body.appendChild(g);var m=g.contentWindow,y=m.document;y.open("image/svg+xml","replace"),y.write(u),y.close(),m.focus(),y.execCommand("SaveAs",!0,c),document.body.removeChild(g)}}else{var v=n.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(v&&v[0]||"")+'" /></body>',_=window.open();_.document.write(x),_.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=a;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:hS.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(Ly),LS="__ec_magicType_stack__",LM=[["line","bar"],["stack"]],LC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return tP(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i,r=this.model,o=r.get(["seriesIndex",n]);if(Lk[n]){var a={series:[]};tP(LM,function(t){tD(t,n)>=0&&tP(t,function(t){r.setIconStatus(t,"normal")})}),r.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(t){var e=t.subType,i=t.id,o=Lk[n](e,i,t,r);o&&(tA(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var h=l.dim+"Axis",u=t.getReferringComponents(h,os).models[0].componentIndex;a[h]=a[h]||[];for(var c=0;c<=u;c++)a[h][u]=a[h][u]||{};a[h][u].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(i=tk({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},e}(Ly),Lk={line:function(t,e,n,i){if("bar"===t)return tk({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return tk({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===LS;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),tk({id:e,stack:r?"":LS},i.get(["option","stack"])||{},!0)}};gd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var LT=Array(60).join("-");function LI(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var LA=RegExp("[ ]+","g"),LD=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.onclick=function(t,e){setTimeout(function(){e.dispatchAction({type:"hideTip"})});var n,i,r,o,a,s,l=e.getDom(),h=this.model;this._dom&&l.removeChild(this._dom);var u=document.createElement("div");u.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",u.style.backgroundColor=h.get("backgroundColor")||hS.color.neutral00;var c=document.createElement("h4"),d=h.get("lang")||[];c.innerHTML=d[0]||h.get("title"),c.style.cssText="margin:10px 20px",c.style.color=h.get("textColor");var p=document.createElement("div"),f=document.createElement("textarea");p.style.cssText="overflow:auto";var g=h.get("optionToContent"),m=h.get("contentToOption"),y={value:tE([(o=(s=(n={},i=[],r=[],t.eachRawSeries(function(t){var e=t.coordinateSystem;if(e&&("cartesian2d"===e.type||"polar"===e.type)){var o=e.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;n[a]||(n[a]={categoryAxis:o,valueAxis:e.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),n[a].series.push(t)}else i.push(t)}else i.push(t)}),{seriesGroupByCategoryAxis:n,other:i,meta:r})).seriesGroupByCategoryAxis,a=[],tP(o,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,r=[" "].concat(tR(t.series,function(t){return t.name})),o=[n.model.getCategories()];tP(t.series,function(t){var e=t.getRawData();o.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))});for(var s=[r.join(" ")],l=0;l<o[0].length;l++){for(var h=[],u=0;u<o.length;u++)h.push(o[u][l]);s.push(h.join(" "))}a.push(s.join("\n"))}),a.join("\n\n"+LT+"\n\n")),tR(s.other,function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,function(){for(var t=arguments.length,r=arguments[t-1],o=e.getName(r),a=0;a<t-1;a++)i[a]=arguments[a];n.push((o?o+" ":"")+i.join(" "))}),n.join("\n")}).join("\n\n"+LT+"\n\n")],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join("\n\n"+LT+"\n\n"),meta:s.meta};if(tH(g)){var v=g(e.getOption());tG(v)?p.innerHTML=v:tq(v)&&p.appendChild(v)}else{f.readOnly=h.get("readOnly");var x=f.style;x.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",x.color=h.get("textColor"),x.borderColor=h.get("textareaBorderColor"),x.backgroundColor=h.get("textareaColor"),f.value=y.value,p.appendChild(f)}var _=y.meta,b=document.createElement("div");b.style.cssText="position:absolute;bottom:5px;left:0;right:0";var w="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",S=document.createElement("div"),M=document.createElement("div");w+=";background-color:"+h.get("buttonColor")+";color:"+h.get("buttonTextColor");var C=this;function k(){l.removeChild(u),C._dom=null}eW(S,"click",k),eW(M,"click",function(){var t,n,i,r;if(null==m&&null!=g||null!=m&&null==g)return void k();try{tH(m)?t=m(p,e.getOption()):(n=f.value,i=n.split(RegExp("\n*"+LT+"\n*","g")),r={series:[]},tP(i,function(t,e){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(" ")>=0)return!0}(t)){var n=function(t){for(var e=t.split(/\n+/g),n=LI(e.shift()).split(LA),i=[],r=tR(n,function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=LI(e[o]).split(LA);i.push(a.shift());for(var s=0;s<a.length;s++)r[s]&&(r[s].data[o]=a[s])}return{series:r,categories:i}}(t),i=_[e],o=i.axisDim+"Axis";i&&(r[o]=r[o]||[],r[o][i.axisIndex]={data:n.categories},r.series=r.series.concat(n.series))}else{var n=function(t){for(var e=t.split(/\n+/g),n=LI(e.shift()),i=[],r=0;r<e.length;r++){var o=LI(e[r]);if(o){var a=o.split(LA),s="",l=void 0,h=!1;isNaN(a[0])?(h=!0,s=a[0],a=a.slice(1),i[r]={name:s,value:[]},l=i[r].value):l=i[r]=[];for(var u=0;u<a.length;u++)l.push(+a[u]);1===l.length&&(h?i[r].value=l[0]:i[r]=l[0])}}return{name:n,data:i}}(t);r.series.push(n)}}),t=r)}catch(t){throw k(),Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),k()}),S.innerHTML=d[1],M.innerHTML=d[2],M.style.cssText=S.style.cssText=w,h.get("readOnly")||b.appendChild(M),b.appendChild(S),u.appendChild(c),u.appendChild(p),u.appendChild(b),p.style.height=l.clientHeight-80+"px",l.appendChild(u),this._dom=u},e.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:hS.color.background,textColor:hS.color.primary,textareaColor:hS.color.background,textareaBorderColor:hS.color.border,buttonColor:hS.color.accent50,buttonTextColor:hS.color.neutral00}},e}(Ly);gd({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];tP(t.newOption.series,function(t){var i=e.getSeriesByName(t.name)[0];if(i){var r,o=i.get("data");n.push({name:t.name,data:(r=t.data,tR(r,function(t,e){var n=o&&o[e];if(!tY(n)||tW(n))return t;tY(t)&&!tW(t)||(t={value:t});var i=null!=n.name&&null==t.name;return t=tA(t,n),i&&delete t.name,t}))})}else n.push(tI({type:"scatter"},t))}),e.mergeOption(tA({series:n},t.newOption))});var LL=oi();function LO(t){var e=LL(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var LP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.onclick=function(t,e){LL(t).snapshots=null,e.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])}},e}(Ly);gd({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var LR=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LN=function(){function t(t,e,n){var i=this;this._targetInfoList=[];var r=LB(e,t);tP(Lz,function(t,e){(!n||!n.include||tD(n.include,e)>=0)&&t(r,i._targetInfoList)})}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=LW[t.brushType](0,n,e);t.__rangeOffset={offset:LG[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}),t},t.prototype.matchOutputRanges=function(t,e,n){tP(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&tP(i.coordSyses,function(i){var r=LW[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)})},this)},t.prototype.setInputRanges=function(t,e){tP(t,function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&!0!==n){t.panelId=n.panelId;var i,r,o,a,s,l=LW[t.brushType](0,n.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?LG[t.brushType](l.values,h.offset,(i=l.xyMinMax,r=h.xyMinMax,o=Lj(i),a=Lj(r),isNaN((s=[o[0]/a[0],o[1]/a[1]])[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s)):l.values}},this)},t.prototype.makePanelOpts=function(t,e){return tR(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:kr(i),isTargetByCursor:ka(i,t,n.coordSysModel),getLinearBrushOtherExtent:ko(i)}})},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&tD(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=LB(e,t),r=0;r<n.length;r++){var o=n[r],a=t.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<LV.length;s++)if(LV[s](i,o))return o}return!0},t}();function LE(t){return t[0]>t[1]&&t.reverse(),t}function LB(t,e){return oo(t,e,{includeMainTypes:LR})}var Lz={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=t9(),a={},s={};(n||i||r)&&(tP(n,function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0}),tP(i,function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0}),tP(r,function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),o.each(function(t){var r=t.coordinateSystem,o=[];tP(r.getCartesians(),function(t,e){(tD(n,t.getAxis("x").model)>=0||tD(i,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:LF.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){tP(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:LF.geo})})}},LV=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],LF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(d9(t)),e}},LW={lineX:tF(LH,0),lineY:tF(LH,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[LE([r[0],o[0]]),LE([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:tR(n,function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o}),xyMinMax:r}}};function LH(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=LE(tR([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var LG={lineX:tF(LU,0),lineY:tF(LU,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return tR(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}};function LU(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Lj(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var LY=r1+"toolbox-dataZoom_",LX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.render=function(t,e,n,i){var r,o,a,s,l,h,u,c,d;this._brushController||(this._brushController=new CB(n.getZr()),this._brushController.on("brush",tV(this._onBrush,this)).mount()),r=t,o=e,a=this,s=i,l=n,h=a._isZoomActive,s&&"takeGlobalCursor"===s.type&&(h="dataZoomSelect"===s.key&&s.dataZoomSelectActive),a._isZoomActive=h,r.setIconStatus("zoom",h?"emphasis":"normal"),u=new LN(Lq(r),o,{include:["grid"]}).makePanelOpts(l,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}),a._brushController.setPanels(u).enableBrush(!!h&&!!u.length&&{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}),c=t,d=e,c.setIconStatus("back",LO(d).length>1?"emphasis":"normal")},e.prototype.onclick=function(t,e,n){LZ[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n,i,r,o={},a=this.ecModel;this._brushController.updateCovers([]),new LN(Lq(this.model),a,{include:["grid"]}).matchOutputRanges(e,a,function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(s("x",n,e[0]),s("y",n,e[1])):s({lineX:"x",lineY:"y"}[i],n,e)}}),n=a,i=o,r=LO(n),tP(i,function(t,e){for(var i=r.length-1;i>=0&&!r[i][e];i--);if(i<0){var o=n.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(o){var a=o.getPercentRange();r[0][e]={dataZoomId:e,start:a[0],end:a[1]}}}}),r.push(i),this._dispatchZoomAction(o)}function s(t,e,n){var i,r,s,l=e.getAxis(t),h=l.model,u=(i=t,r=h,a.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,r.componentIndex)&&(s=t)}),s),c=u.findRepresentativeAxisProxy(h).getMinMaxSpan();(null!=c.minValueSpan||null!=c.maxValueSpan)&&(n=Cy(0,n.slice(),l.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),u&&(o[u.id]={dataZoomId:u.id,startValue:n[0],endValue:n[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];tP(t,function(t,n){e.push(tC(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:hS.color.backgroundTint}}},e}(Ly),LZ={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){var t,e,n;this._dispatchZoomAction((e=(t=LO(this.ecModel))[t.length-1],t.length>1&&t.pop(),n={},tP(e,function(e,i){for(var r=t.length-1;r>=0;r--)if(e=t[r][i]){n[i]=e;break}}),n))}};function Lq(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}f=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=oo(t,Lq(i));return tP(o.xAxisModels,function(t){return a(t,"xAxis","xAxisIndex")}),tP(o.yAxisModels,function(t){return a(t,"yAxis","yAxisIndex")}),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:LY+e+o};a[n]=o,r.push(a)}},t2(null==hY.get("dataZoom")&&f),hY.set("dataZoom",f);var LK=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:hS.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:hS.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:hS.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:hS.color.tertiary,fontSize:14}},e}(h_);function L$(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function LJ(t){if(ts.domSupported){for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}}var LQ=LJ(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function L0(t,e){if(!t)return e;e=l1(e,!0);var n=t.indexOf(e);return(t=-1===n?e:"-"+t.slice(0,n)+"-"+e).toLowerCase()}var L1=L0(LJ(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),L2=L0(LQ,"transform"),L5="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ts.transform3dSupported?"will-change:transform;":"");function L3(t,e,n){var i=t.toFixed(0)+"px",r=e.toFixed(0)+"px";if(!ts.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=ts.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+L2+":"+a+";":[["top",0],["left",0],[LQ,a]]}function L4(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&eA(eI,a,i,r,!0)&&eA(t,n,eI[0],eI[1])}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var L8=function(){function t(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ts.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),r=e.appendTo,o=r&&(tG(r)?document.querySelector(r):tq(r)?r:tH(r)&&r(t.getDom()));L4(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=i.handler;eF(i.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){if(!this._container){var e,n,i=this._api.getDom(),r=(e="position",(n=i.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(i))?e?n[e]:n:null),o=i.style;"absolute"!==o.position&&"absolute"!==r&&(o.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,i,r,o,a,s,l,h,u,c,d,p,f,g,m,y,v,x,_,b,w,S,M,C,k=this.el,T=k.style,I=this._styleCoord;k.innerHTML?T.cssText=L5+(n=!this._firstShow,i=this._longHide,r=this._enableDisplayTransition,o=[],a=t.get("transitionDuration"),s=t.get("backgroundColor"),l=t.get("shadowBlur"),h=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),d=t.getModel("textStyle"),p=cy(t,"html"),f=u+"px "+c+"px "+l+"px "+h,o.push("box-shadow:"+f),n&&a>0&&o.push((g="cubic-bezier(0.23,1,0.32,1)",m="",y="",r&&(y="opacity"+(m=" "+a/2+"s "+g)+",visibility"+m),i||(m=" "+a+"s "+g,y+=(y.length?",":"")+(ts.transformSupported?""+L2+m:",left"+m+",top"+m)),L1+":"+y)),s&&o.push("background-color:"+s),tP(["width","color","radius"],function(e){var n="border-"+e,i=l1(n),r=t.get(i);null!=r&&o.push(n+":"+r+("color"===e?"":"px"))}),o.push((v=[],x=d.get("fontSize"),(_=d.getTextColor())&&v.push("color:"+_),v.push("font:"+d.getFont()),b=tJ(d.get("lineHeight"),Math.round(3*x/2)),x&&v.push("line-height:"+b+"px"),w=d.get("textShadowColor"),S=d.get("textShadowBlur")||0,M=d.get("textShadowOffsetX")||0,C=d.get("textShadowOffsetY")||0,w&&S&&v.push("text-shadow:"+M+"px "+C+"px "+S+"px "+w),tP(["decoration","align"],function(t){var e=d.get(t);e&&v.push("text-"+t+":"+e)}),v.join(";"))),null!=p&&o.push("padding:"+t1(p).join("px ")+"px"),o.join(";")+";")+L3(I[0],I[1],!0)+"border-color:"+l8(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):T.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,r){var o=this.el;if(null==t){o.innerHTML="";return}var a="";if(tG(r)&&"item"===n.get("trigger")&&!L$(n)&&(a=function(t,e,n){if(!tG(n)||"inside"===n)return"";var i,r,o=t.get("backgroundColor"),a=t.get("borderWidth");e=l8(e);var s=i="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",l=Math.max(1.5*Math.round(a),6),h="",u=L2+":";tD(["left","right"],s)>-1?(h+="top:50%",u+="translateY(-50%) rotate("+(r="left"===s?-225:-45)+"deg)"):(h+="left:50%",u+="translateX(-50%) rotate("+(r="top"===s?225:45)+"deg)");var c=r*Math.PI/180,d=l+a,p=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c));h+=";"+s+":-"+Math.round(((p-Math.SQRT2*a)/2+Math.SQRT2*a-(p-d)/2)*100)/100+"px";var f=e+" solid "+a+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",h+";"+u+";","border-bottom:"+f,"border-right:"+f,"background-color:"+o+";"].join("")+'"></div>'}(n,i,r)),tG(t))o.innerHTML=t+a;else if(t){o.innerHTML="",tW(t)||(t=[t]);for(var s=0;s<t.length;s++)tq(t[s])&&t[s].parentNode!==o&&o.appendChild(t[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},t.prototype.moveTo=function(t,e){if(this.el){var n=this._styleCoord;if(L4(n,this._zr,this._container,t,e),null!=n[0]&&null!=n[1]){var i=this.el.style;tP(L3(n[0],n[1]),function(t){i[t[0]]=t[1]})}}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){var t=this,e=this.el.style;this._enableDisplayTransition?(e.visibility="hidden",e.opacity="0"):e.display="none",ts.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(tV(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;!function(t,e){function n(t){var e=t[eT];e&&(e.clearMarkers&&e.clearMarkers(),delete t[eT])}t&&n(t),e&&n(e)}(t&&t.painter&&t.painter.getViewportRoot(),this._container);var e=this.el;if(e){e.onmouseenter=e.onmousemove=e.onmouseleave=null;var n=e.parentNode;n&&n.removeChild(e)}this.el=this._container=null},t}(),L6=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),Ot(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,n,i,r){var o=this;tY(t)&&uC(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new sn({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:cy(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),tP(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(t){o.el.style[t]=n.get(t)}),tP(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(t){o.el.style[t]=a.get(t)||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})},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=L7(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},t.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;Ot(i,this._zr,t,e),t=i[0],e=i[1];var r=n.style,o=L9(r.borderWidth||0),a=L7(r);n.x=t+o+a.left,n.y=e+o+a.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(tV(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function L9(t){return Math.max(0,t)}function L7(t){var e=L9(t.shadowBlur||0),n=L9(t.shadowOffsetX||0),i=L9(t.shadowOffsetY||0);return{left:L9(e-n),right:L9(e+n),top:L9(e-i),bottom:L9(e+i)}}function Ot(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Oe=new aq({shape:{x:-1,y:-1,width:2,height:2}}),On=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(t,e){if(!ts.node&&e.getDom()){var n,i=t.getComponent("tooltip"),r=this._renderMode="auto"===(n=i.get("renderMode"))?ts.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===r?new L6(e):new L8(e,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,e,n){if(!ts.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?pO(this,"_updatePosition",50,"fixRate"):pP(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");An("itemTooltip",this._api,tV(function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!ts.node&&n.getDom()){var r=Or(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i,r=oa(t).queryOptionMap,o=r.keys()[0];if(o&&"series"!==o){var a=oh(e,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(e){var n=si(e).tooltipConfig;if(n&&n.name===t.name)return i=e,!0}),i))return{componentMainType:o,componentIndex:a.componentIndex,el:i}}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y)Oe.x=i.x,Oe.y=i.y,Oe.update(),si(Oe).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:Oe},r);else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=As(i,e),h=l.point[0],u=l.point[1];null!=h&&null!=u&&this._tryShow({offsetX:h,offsetY:u,target:l.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Or(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===Oi([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i,r,o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){if("legend"===si(n).ssrType)return;this._lastDataByCoordSys=null,fi(n,function(t){if(t.tooltipDisabled)return i=r=null,!0;i||r||(null!=si(t).dataIndex?i=t:null!=si(t).tooltipConfig&&(r=t))},!0),i?this._showSeriesItemTooltip(t,i,e):r?this._showComponentItemTooltip(t,r,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=tV(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=Oi([e.tooltipOption],i),a=this._renderMode,s=[],l=ch("section",{blocks:[],noHeader:!0}),h=[],u=new cv;tP(t,function(t){tP(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=I0(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=ch("section",{header:o,noHeader:!t5(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),tP(t.seriesDataIndices,function(l){var d=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=d.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=xB(e.axis,{value:r}),f.axisValueLabel=o,f.marker=u.makeTooltipMarker("item",l8(f.color),a);var g=uz(d.formatTooltip(p,!0,null)),m=g.frag;if(m){var y=Oi([d],i).get("valueFormatter");c.blocks.push(y?tI({valueFormatter:y},m):m)}g.text&&h.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),h.reverse();var c=e.position,d=cp(l,u,a,o.get("order"),n.get("useUTC"),o.get("textStyle"));d&&h.unshift(d);var p="richText"===a?"\n\n":"<br/>",f=h.join(p);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,f,s,Math.random()+"",r[0],r[1],c,null,u)})},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=si(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,h=r.dataType,u=s.getData(h),c=this._renderMode,d=t.positionDefault,p=Oi([u.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,h),m=new cv;g.marker=m.makeTooltipMarker("item",l8(g.color),c);var y=uz(s.formatTooltip(l,!1,h)),v=p.get("order"),x=p.get("valueFormatter"),_=y.frag,b=_?cp(x?tI({valueFormatter:x},_):_,m,c,v,i.get("useUTC"),p.get("textStyle")):y.text,w="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,b,g,w,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i="html"===this._renderMode,r=si(e),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(tG(o)){var s=o;o={content:s,formatter:s},a=!0}a&&i&&o.content&&((o=tC(o)).content=eP(o.content));var l=[o],h=this._ecModel.getComponent(r.componentMainType,r.componentIndex);h&&l.push(h),l.push({formatter:o.content});var u=t.positionDefault,c=Oi(l,this._tooltipModel,u?{position:u}:null),d=c.get("content"),p=Math.random()+"",f=new cv;this._showOrMove(c,function(){var n=tC(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,p,t.offsetX,t.offsetY,t.position,e,f)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var u=t.get("formatter");a=a||t.get("position");var c=e,d=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)).color;if(u)if(tG(u)){var p=t.ecModel.get("useUTC"),f=tW(n)?n[0]:n,g=f&&f.axisType&&f.axisType.indexOf("time")>=0;c=u,g&&(c=lz(f.axisValue,c,p)),c=l4(c,n,!0)}else if(tH(u)){var m=tV(function(e,i){e===this._ticket&&(h.setContent(i,l,t,d,a),this._updatePosition(t,a,r,o,h,n,s))},this);this._ticket=i,c=u(n,i,m)}else c=u;h.setContent(c,l,t,d,a),h.show(t,d),this._updatePosition(t,a,r,o,h,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i,r){return"axis"===n||tW(e)?{color:i||r}:tW(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),tH(e)&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),tW(e))n=rE(e[0],s),i=rE(e[1],l);else if(tY(e)){var p=e;p.width=h[0],p.height=h[1];var f=hu(p,{width:s,height:l});n=f.x,i=f.y,u=null,c=null}else if(tG(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,h=e.width,u=e.height;switch(t){case"inside":s=e.x+h/2-r/2,l=e.y+u/2-o/2;break;case"top":s=e.x+h/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+h/2-r/2,l=e.y+u+a;break;case"left":s=e.x-r-a,l=e.y+u/2-o/2;break;case"right":s=e.x+h+a,l=e.y+u/2-o/2}return[s,l]}(e,d,h,t.get("borderWidth"));n=g[0],i=g[1]}else{var m,y,v,x,_,b,w,S,M,C,g=(m=n,y=i,v=r,x=s,_=l,b=u?null:20,w=c?null:20,M=(S=v.getSize())[0],C=S[1],null!=b&&(m+M+b+2>x?m-=M+b:m+=b),null!=w&&(y+C+w>_?y-=C+w:y+=w),[m,y]);n=g[0],i=g[1]}if(u&&(n-=Oo(u)?h[0]/2:"right"===u?h[0]:0),c&&(i-=Oo(c)?h[1]/2:"bottom"===c?h[1]:0),L$(t)){var k,T,I,A,D,L,O,P,g=(k=n,T=i,I=r,A=s,D=l,O=(L=I.getSize())[0],P=L[1],k=Math.min(k+O,A)-O,T=Math.min(T+P,D)-P,[k=Math.max(k,0),T=Math.max(T,0)]);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&tP(n,function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&tP(a,function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&tP(a,function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}),i&&tP(t.seriesDataIndices,function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!ts.node&&e.getDom()&&(pP(this,"_updatePosition"),this._tooltipContent.dispose(),Ao("itemTooltip",e))},e.type="tooltip",e}(cL);function Oi(t,e,n){var i,r=e.ecModel;n?(i=new lb(n,r,r),i=new lb(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof lb&&(a=a.get("tooltip",!0)),tG(a)&&(a={formatter:a}),a&&(i=new lb(a,i,r)))}return i}function Or(t,e){return t.dispatchAction||tV(e.dispatchAction,e)}function Oo(t){return"center"===t||"middle"===t}var Oa=["rect","polygon","keep","clear"];function Os(t,e){var n=r2(t?t.brush:[]);if(n.length){var i,r,o=[];tP(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(o=o.concat(e))});var a=t&&t.toolbox;tW(a)&&(a=a[0]),a||(t.toolbox=[a={feature:{}}]);var s=a.feature||(a.feature={}),l=s.brush||(s.brush={}),h=l.type||(l.type=[]);h.push.apply(h,o),r={},tP(i=h,function(t){r[t]=1}),i.length=0,tP(r,function(t,e){i.push(e)}),e&&!h.length&&h.push.apply(h,Oa)}}function Ol(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function Oh(t,e,n){var i={};return tP(e,function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);tP(t[e],function(t,i){if(SL.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new SL(r),"opacity"===i&&((r=tC(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new SL(r))}})}),i}function Ou(t,e,n){var i;tP(n,function(t){e.hasOwnProperty(t)&&Ol(e[t])&&(i=!0)}),i&&tP(n,function(n){e.hasOwnProperty(n)&&Ol(e[n])?t[n]=tC(e[n]):delete t[n]})}var Oc={lineX:Od(0),lineY:Od(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&b1(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];if(b1(i,r,o)||b1(i,r+a,o)||b1(i,r,o+s)||b1(i,r+a,o+s)||nu.create(t).contain(l[0],l[1])||po(r,o,r+a,o,i)||po(r,o,r,o+s,i)||po(r+a,o,r+a,o+s,i)||po(r,o+s,r+a,o+s,i))return!0}}};function Od(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return Op(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]<s[0]&&s.reverse(),Op(s[0],a)||Op(s[1],a)||Op(a[0],s)||Op(a[1],s)}}}}function Op(t,e){return e[0]<=t&&t<=e[1]}var Of=["inBrush","outOfBrush"],Og="__ecBrushSelect",Om="__ecInBrushSelectEvent";function Oy(t){t.eachComponent({mainType:"brush"},function(e){(e.brushTargetManager=new LN(e.option,t)).setInputRanges(e.areas,t)})}function Ov(t,e,n){var i,r,o=[];t.eachComponent({mainType:"brush"},function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})}),Oy(t),t.eachComponent({mainType:"brush"},function(e,n){var a={brushId:e.id,brushIndex:n,brushName:e.name,areas:tC(e.areas),selected:[]};o.push(a);var s=e.option,l=s.brushLink,h=[],u=[],c=[],d=!1;n||(i=s.throttleType,r=s.throttleDelay);var p=tR(e.areas,function(t){var e,n,i=Ob[t.brushType],r=tA({boundingRect:i?i(t):void 0},t);return e=r.brushType,r.selectors=n={point:function(t){return Oc[e].point(t,n,r)},rect:function(t){return Oc[e].rect(t,n,r)}},r}),f=Oh(e.option,Of,function(t){t.mappingMethod="fixed"});function g(t){return"all"===l||!!h[t]}function m(t){return!!t.length}tW(l)&&tP(l,function(t){h[t]=1}),t.eachSeries(function(n,i){var r,o,a,s=c[i]=[];"parallel"===n.subType?(r=n,o=i,a=r.coordinateSystem,d=d||a.hasAxisBrushed(),g(o)&&a.eachActiveState(r.getData(),function(t,e){"active"===t&&(u[e]=1)})):function(n,i,r){if(!(!n.brushSelector||(o=e,a=i,null!=(s=o.option.seriesIndex)&&"all"!==s&&(tW(s)?0>tD(s,a):a!==s)))&&(tP(p,function(i){e.brushTargetManager.controlSeries(i,n,t)&&r.push(i),d=d||m(r)}),g(i)&&m(r))){var o,a,s,l=n.getData();l.each(function(t){O_(n,r,l,t)&&(u[t]=1)})}}(n,i,s)}),t.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};a.selected.push(n);var i=c[e],r=t.getData(),o=g(e)?function(t){return u[t]?(n.dataIndex.push(r.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(e){return O_(t,i,r,e)?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(e)?d:m(i))&&function(t,e,n,i){var r,o={};function a(t){return p9(n,r,t)}function s(t,e){ft(n,r,t,e)}tP(t,function(t){var n=SL.prepareVisualTypes(e[t]);o[t]=n}),n.each(function(t,l){r=t;var h=n.getRawDataItem(r);if(!h||!1!==h.visualMap)for(var u=i.call(void 0,t),c=e[u],d=o[u],p=0,f=d.length;p<f;p++){var g=d[p];c[g]&&c[g].applyVisual(t,a,s)}})}(Of,f,r,o)})}),function(t,e,n,i,r){if(r){var o=t.getZr();o[Om]||(o[Og]||(o[Og]=Ox),pO(o,Og,n,e)(t,i))}}(e,i,r,o,n)}function Ox(t,e){if(!t.isDisposed()){var n=t.getZr();n[Om]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[Om]=!1}}function O_(t,e,n,i){for(var r=0,o=e.length;r<o;r++){var a=e[r];if(t.brushSelector(i,n,a.selectors,a))return!0}}var Ob={rect:function(t){return Ow(t.range)},polygon:function(t){for(var e,n=t.range,i=0,r=n.length;i<r;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=n[i];o[0]<e[0][0]&&(e[0][0]=o[0]),o[0]>e[0][1]&&(e[0][1]=o[0]),o[1]<e[1][0]&&(e[1][0]=o[1]),o[1]>e[1][1]&&(e[1][1]=o[1])}return e&&Ow(e)}};function Ow(t){return new nu(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var OS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new CB(e.getZr())).on("brush",tV(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){Oy(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:tC(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:tC(n),$from:e})},e.type="brush",e}(cL),OM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return to(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;e||Ou(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=tR(t,function(t){return OC(this.option,t)},this))},e.prototype.setBrushOption=function(t){this.brushOption=OC(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:hS.color.backgroundTint,borderColor:hS.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:hS.color.disabled},e}(h_);function OC(t,e){return tk({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new lb(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Ok=["rect","polygon","lineX","lineY","keep","clear"],OT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return to(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length}),this._brushType=i,this._brushMode=r,tP(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return tP(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:Ok.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(Ly),OI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return to(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:hS.size.m,backgroundColor:hS.color.transparent,borderColor:hS.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:hS.color.primary},subtextStyle:{fontSize:12,color:hS.color.quaternary}},e}(h_),OA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=tJ(t.get("textBaseline"),t.get("textVerticalAlign")),l=new sn({style:lt(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new sn({style:lt(o,{text:u,fill:o.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!d&&!f,c.silent=!p&&!f,d&&l.on("click",function(){l6(d,"_"+t.get("target"))}),p&&c.on("click",function(){l6(p,"_"+t.get("subtarget"))}),si(l).eventData=si(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),u&&i.add(c);var g=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var y=hu(m,hp(t,n).refContainer,t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?y.x+=y.width:"center"===a&&(y.x+=y.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?y.y+=y.height:"middle"===s&&(y.y+=y.height/2),s=s||"top"),i.x=y.x,i.y=y.y,i.markRedraw();var v={align:a,verticalAlign:s};l.setStyle(v),c.setStyle(v),g=i.getBoundingRect();var x=y.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new aq({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(cL),OD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return to(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],tP(n,function(e,n){var i,o=r7(r4(e),"");tY(e)?(i=tC(e)).value=n:i=n,t.push(i),r.push(o)})):t=n,(this._data=new yu([{name:"value",type:{category:"ordinal",time:"time",value:"number"}[i]||"number"}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:hS.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:hS.color.secondary},data:[]},e}(h_),OL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="timeline.slider",e.defaultOption=lM(OD.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:hS.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:hS.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:hS.color.tertiary},itemStyle:{color:hS.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:hS.color.accent50,borderColor:hS.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:hS.color.accent50,borderColor:hS.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:hS.color.accent60},itemStyle:{color:hS.color.accent60,borderColor:hS.color.accent60},controlStyle:{color:hS.color.accent70,borderColor:hS.color.accent70}},progress:{lineStyle:{color:hS.color.accent30},itemStyle:{color:hS.color.accent40}},data:[]}),e}(OD);tL(OL,uB.prototype);var OO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="timeline",e}(cL),OP=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return to(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(x7),OR=Math.PI,ON=oi(),OE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return ch("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},tP(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](i,r,a,t)},this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a,s,l=t.get(["label","position"]),h=t.get("orient"),u=(n=t,i=e,hu(n.getBoxLayoutParams(),hp(n,i).refContainer,n.get("padding"))),c={horizontal:"center",vertical:(r=null==l||"auto"===l?"horizontal"===h?u.y+u.height/2<e.getHeight()/2?"-":"+":u.x+u.width/2<e.getWidth()/2?"+":"-":tG(l)?({horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}})[h][l]:l)>=0||"+"===r?"left":"right"},d="vertical"===h?u.height:u.width,p=t.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,y=g+m,v=t.get(["label","rotate"])||0;v=v*OR/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,M=d;"left"===x||"bottom"===x?(_&&(o=[0,0],S+=y),b&&(a=[S,0],S+=y)):(_&&(o=[M-g,0],M-=y),b&&(a=[0,0],S+=y)),w&&(s=[M-g,0],M-=y);var C=[S,M];return t.get("inverse")&&C.reverse(),{viewRect:u,mainLength:d,orient:h,rotation:({horizontal:0,vertical:OR/2})[h],labelRotation:v,labelPosOpt:r,labelAlign:t.get(["label","align"])||c[h],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||({horizontal:r>=0||"+"===r?"top":"bottom",vertical:"middle"})[h],playPosition:o,prevBtnPosition:a,nextBtnPosition:s,axisExtent:C,controlSize:g,controlGap:m}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=eX(),a=r.x,s=r.y+r.height;e$(o,o,[-a,-s]),eJ(o,o,-OR/2),e$(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=m(r),h=m(n.getBoundingRect()),u=m(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=l[0][0];var p=t.labelPosOpt;if(null==p||tG(p)){var f=+("+"!==p);y(c,h,l,1,f),y(d,u,l,1,1-f)}else{var f=p>=0?0:1;y(c,h,l,1,f),d[1]=c[1]+p}function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xg({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new xv({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new xm}}(e,i);r.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new OP("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new rT;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new dw({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:tI({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new dw({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:tA({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],tP(a,function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),h=s.getModel(["emphasis","itemStyle"]),u=s.getModel(["progress","itemStyle"]),c=OB(s,l,e,{x:a,y:0,onclick:tV(r._changeTimeline,r,t.value)});c.ensureState("emphasis").style=h.getItemStyle(),c.ensureState("progress").style=u.getItemStyle(),sV(c);var d=si(c);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(c)})},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],tP(a,function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),h=s.getModel(["emphasis","label"]),u=s.getModel(["progress","label"]),c=new sn({x:n.dataToCoord(i.tickValue),y:0,rotation:t.labelRotation-t.rotation,onclick:tV(r._changeTimeline,r,a),silent:!1,style:lt(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});c.ensureState("emphasis").style=lt(h),c.ensureState("progress").style=lt(u),e.add(c),sV(c),ON(c).dataIndex=a,r._tickLabels.push(c)})}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),h=i.get("inverse",!0);function u(t,n,l,h){if(t){var u,c,d,p,f,g,m=rg(tJ(i.get(["controlStyle",n+"BtnSize"]),r),r),y=(u=i,c=n+"Icon",d=[0,-m/2,m,m],f=(p={x:t[0],y:t[1],originX:r/2,originY:0,rotation:h?-o:0,rectHover:!0,style:a,onclick:l}).style,g=pr(u.get(["controlStyle",c]),p||{},new nu(d[0],d[1],d[2],d[3])),f&&g.setStyle(f),g);y.ensureState("emphasis").style=s,e.add(y),sV(y)}}u(t.nextBtnPosition,"next",tV(this._changeTimeline,this,h?"-":"+")),u(t.prevBtnPosition,"prev",tV(this._changeTimeline,this,h?"+":"-")),u(t.playPosition,l?"stop":"play",tV(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this;this._currentPointer=OB(a,a,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=tV(s._handlePointerDrag,s),t.ondragend=tV(s._handlePointerDragend,s),Oz(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){Oz(t,s._progressLine,o,n,i)}})},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=rV(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var r=this._progressLine;r&&(r.shape.x2=n,r.dirty());var o=this._findNearestTick(n),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var e=t.model;t._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){return d7(t,this._mainGroup.getLocalTransform(),!0)},e.prototype._findNearestTick=function(t){var e,n=this.model.getData(),i=1/0,r=this._axis;return n.each(["value"],function(n,o){var a=Math.abs(r.dataToCoord(n)-t);a<i&&(i=a,e=o)}),e},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var i=0;i<e.length;i++)e&&e[i]&&e[i].toggleState("progress",i<t);if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",ON(n[i]).dataIndex<=t)},e.type="timeline.slider",e}(OO);function OB(t,e,n,i,r,o){var a=e.get("color");r?(r.setColor(a),n.add(r),o&&o.onUpdate(r)):((r=fg(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(r),o&&o.onCreate(r));var s=e.getItemStyle(["color"]);r.setStyle(s),i=tk({rectHover:!0,z2:100},i,!0);var l=fm(t.get("symbolSize"));i.scaleX=l[0]/2,i.scaleY=l[1]/2;var h=fy(t.get("symbolOffset"),l);h&&(i.x=(i.x||0)+h[0],i.y=(i.y||0)+h[1]);var u=t.get("symbolRotate");return i.rotation=(u||0)*Math.PI/180||0,r.attr(i),r.updateTransform(),r}function Oz(t,e,n,i,r,o){if(!t.dragging){var a=r.getModel("checkpointStyle"),s=i.dataToCoord(r.getData().get("value",n));if(o||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function OV(t){var e=t&&t.timeline;tW(e)||(e=e?[e]:[]),tP(e,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};if(n[e]&&(t.axisType=n[e],delete t.type),OF(t),OW(t,"controlPosition")){var i=t.controlStyle||(t.controlStyle={});OW(i,"position")||(i.position=t.controlPosition),"none"!==i.position||OW(i,"show")||(i.show=!1,delete i.position),delete t.controlPosition}tP(t.data||[],function(t){tY(t)&&!tW(t)&&(!OW(t,"value")&&OW(t,"name")&&(t.value=t.name),OF(t))})}(t)})}function OF(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},r=i.normal||(i.normal={}),o={normal:1,emphasis:1};tP(i,function(t,e){o[e]||OW(r,e)||(r[e]=t)}),n.label&&!OW(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function OW(t,e){return t.hasOwnProperty(e)}function OH(t,e){if(!t)return!1;for(var n=tW(t)?t:[t],i=0;i<n.length;i++)if(n[i]&&n[i][e])return!0;return!1}function OG(t){r5(t,"label",["show"])}var OU=oi(),Oj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return to(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(ts.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},e.prototype._mergeOption=function(t,e,n,i){var r=this.mainType;n||e.eachSeries(function(t){var n=t.get(this.mainType,!0),o=OU(t)[r];if(!n||!n.data){OU(t)[r]=null;return}o?o._mergeOption(n,e,!0):(i&&OG(n),tP(n.data,function(t){t instanceof Array?(OG(t[0]),OG(t[1])):OG(t)}),tI(o=this.createMarkerModelFromSeries(n,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),o.__hostSeries=t),OU(t)[r]=o},this)},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t),o=i.getName(t);return ch("section",{header:this.name,blocks:[ch("nameValue",{name:o,value:r,noName:!o,noValue:null==r})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,e){var n=uB.prototype.getDataParams.call(this,t,e),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(t,e){return OU(t)[e]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(h_);tL(Oj,uB.prototype);var OY=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Oj);function OX(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function OZ(t,e,n,i,r,o,a){var s=[],l=yg(e,r)?e.getCalculationInfo("stackResultDimension"):r,h=O0(e,l,t),u=e.hostModel.indicesOfNearest(n,l,h)[0];s[o]=e.get(i,u),s[a]=e.get(l,u);var c=e.get(r,u),d=rF(e.get(r,u));return(d=Math.min(d,20))>=0&&(s[a]=+s[a].toFixed(d)),[s,c]}var Oq={min:tF(OZ,"min"),max:tF(OZ,"max"),average:tF(OZ,"average"),median:tF(OZ,"median")};function OK(t,e){if(e){var n,i=t.getData(),r=t.coordinateSystem,o=r&&r.dimensions;if(!(!isNaN(parseFloat((n=e).x))&&!isNaN(parseFloat(n.y)))&&!tW(e.coord)&&tW(o)){var a=O$(e,i,r,t);if((e=tC(e)).type&&Oq[e.type]&&a.baseAxis&&a.valueAxis){var s=tD(o,a.baseAxis.dim),l=tD(o,a.valueAxis.dim),h=Oq[e.type](i,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,s,l);e.coord=h[0],e.value=h[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&tW(o))for(var u=e.coord,c=0;c<2;c++)Oq[u[c]]&&(u[c]=O0(i,i.mapDimension(o[c]),u[c]));else{e.coord=[];var d=t.getBaseAxis();if(d&&e.type&&Oq[e.type]){var p=r.getOtherAxis(d);p&&(e.value=O0(i,i.mapDimension(p.dim),e.type))}}return e}}function O$(t,e,n,i){var r,o,a,s={};return null!=t.valueIndex||null!=t.valueDim?(s.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,s.valueAxis=n.getAxis((r=i,o=s.valueDataDim,(a=r.getData().getDimensionInfo(o))&&a.coordDim)),s.baseAxis=n.getOtherAxis(s.valueAxis),s.baseDataDim=e.mapDimension(s.baseAxis.dim)):(s.baseAxis=i.getBaseAxis(),s.valueAxis=n.getOtherAxis(s.baseAxis),s.baseDataDim=e.mapDimension(s.baseAxis.dim),s.valueDataDim=e.mapDimension(s.valueAxis.dim)),s}function OJ(t,e){return!t||!t.containData||!e.coord||!!OX(e)||t.containData(e.coord)}function OQ(t,e){return t?function(t,n,i,r){return uH(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return uH(t.value,e[r])}}function O0(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,function(t,e){!isNaN(t)&&(i+=t,r++)}),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)[+("max"===n)]}var O1=oi(),O2=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.init=function(){this.markerGroupMap=t9()},e.prototype.render=function(t,e,n){var i,r,o,a=this,s=this.markerGroupMap;s.each(function(t){O1(t).keep=!1}),e.eachSeries(function(t){var i=Oj.getMarkerModelFromSeries(t,a.type);i&&a.renderSeries(t,i,e,n)}),s.each(function(t){O1(t).keep||a.group.remove(t.group)}),i=e,r=s,o=this.type,i.eachSeries(function(t){var e=Oj.getMarkerModelFromSeries(t,o),n=r.get(t.id);if(e&&n&&n.group){var i=py(e),a=i.z,s=i.zlevel;px(n.group,a,s)}})},e.prototype.markKeep=function(t){O1(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;tP(t,function(t){var i=Oj.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl(function(t){t&&(e?sC(t,sb):sC(t,sw))})})},e.type="marker",e}(cL);function O5(t,e,n){var i=e.coordinateSystem,r=n.getWidth(),o=n.getHeight(),a=i&&i.getArea&&i.getArea();t.each(function(n){var s,l=t.getItemModel(n),h="coordinate"===l.get("relativeTo"),u=h?a?a.width:0:r,c=h?a?a.height:0:o,d=h&&a?a.x:0,p=h&&a?a.y:0,f=rE(l.get("x"),u)+d,g=rE(l.get("y"),c)+p;if(isNaN(f)||isNaN(g)){if(e.getMarkerPosition)s=e.getMarkerPosition(t.getValues(t.dimensions,n));else if(i){var m=t.get(i.dimensions[0],n),y=t.get(i.dimensions[1],n);s=i.dataToPoint([m,y])}}else s=[f,g];isNaN(f)||(s[0]=f),isNaN(g)||(s[1]=g),t.setItemLayout(n,s)})}var O3=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=Oj.getMarkerModelFromSeries(t,"markPoint");e&&(O5(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())},this)},e.prototype.renderSeries=function(t,e,n,i){var r,o,a,s,l,h,u,c=t.coordinateSystem,d=t.id,p=t.getData(),f=this.markerGroupMap,g=f.get(d)||f.set(d,new yk),m=(r=c,o=t,a=e,l=new yu(s=r?tR(r&&r.dimensions,function(t){return tI(tI({},o.getData().getDimensionInfo(o.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})}):[{name:"value",type:"float"}],a),h=tR(a.get("data"),tF(OK,o)),r&&(h=tE(h,tF(OJ,r))),u=OQ(!!r,s),l.initData(h,null,u),l);e.setData(m),O5(e.getData(),t,i),m.each(function(t){var n=m.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),s=n.getShallow("symbolKeepAspect");if(tH(i)||tH(r)||tH(o)||tH(a)){var l=e.getRawValue(t),h=e.getDataParams(t);tH(i)&&(i=i(l,h)),tH(r)&&(r=r(l,h)),tH(o)&&(o=o(l,h)),tH(a)&&(a=a(l,h))}var u=n.getModel("itemStyle").getItemStyle(),c=n.get("z2"),d=p7(p,"color");u.fill||(u.fill=d),m.setItemVisual(t,{z2:tJ(c,0),symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:a,symbolKeepAspect:s,style:u})}),g.updateData(m),this.group.add(g.group),m.eachItemGraphicEl(function(t){t.traverse(function(t){si(t).dataModel=e})}),this.markKeep(g),g.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(O2),O4=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Oj),O8=oi(),O6=function(t,e,n,i){var r,o=t.getData();if(tW(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=t$(i.yAxis,i.xAxis);else{var h=O$(i,o,e,t);s=h.valueAxis;var u=ym(o,h.valueDataDim);l=O0(o,u,a)}var c=+("x"!==s.dim),d=1-c,p=tC(i),f={coord:[]};p.type=null,p.coord=[],p.coord[d]=-1/0,f.coord[d]=1/0;var g=n.get("precision");g>=0&&tj(l)&&(l=+l.toFixed(Math.min(g,20))),p.coord[c]=f.coord[c]=l,r=[p,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var m=[OK(t,r[0]),OK(t,r[1]),tI({},r[2])];return m[2].type=m[2].type||null,tk(m[2],m[0]),tk(m[2],m[1]),m};function O9(t){return!isNaN(t)&&!isFinite(t)}function O7(t,e,n,i){var r=1-t,o=i.dimensions[t];return O9(e[r])&&O9(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function Pt(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(O7(1,n,i,t)||O7(0,n,i,t)))return!0}return OJ(t,e[0])&&OJ(t,e[1])}function Pe(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=rE(s.get("x"),r.getWidth()),h=rE(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(h)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);o=a.dataToPoint([c,d])}if(yG(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y"),u=a.dimensions;O9(t.get(u[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[+!n]):O9(t.get(u[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[+!n]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];t.setItemLayout(e,o)}var Pn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=Oj.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=O8(e).from,o=O8(e).to;r.each(function(e){Pe(r,e,!0,t,n),Pe(o,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,e,n,i){var r,o,a,s,l,h,u,c,d,p=t.coordinateSystem,f=t.id,g=t.getData(),m=this.markerGroupMap,y=m.get(f)||m.set(f,new MT);this.group.add(y.group);var v=(r=p,o=t,a=e,l=new yu(s=r?tR(r&&r.dimensions,function(t){return tI(tI({},o.getData().getDimensionInfo(o.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})}):[{name:"value",type:"float"}],a),h=new yu(s,a),u=new yu([],a),c=tR(a.get("data"),tF(O6,o,r,a)),r&&(c=tE(c,tF(Pt,r))),d=OQ(!!r,s),l.initData(tR(c,function(t){return t[0]}),null,d),h.initData(tR(c,function(t){return t[1]}),null,d),u.initData(tR(c,function(t){return t[2]})),u.hasItemOption=!0,{from:l,to:h,line:u}),x=v.from,_=v.to,b=v.line;O8(e).from=x,O8(e).to=_,e.setData(b);var w=e.get("symbol"),S=e.get("symbolSize"),M=e.get("symbolRotate"),C=e.get("symbolOffset");function k(e,n,r){var o=e.getItemModel(n);Pe(e,n,r,t,i);var a=o.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=p7(g,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:tJ(o.get("symbolOffset",!0),C[+!r]),symbolRotate:tJ(o.get("symbolRotate",!0),M[+!r]),symbolSize:tJ(o.get("symbolSize"),S[+!r]),symbol:tJ(o.get("symbol",!0),w[+!r]),style:a})}tW(w)||(w=[w,w]),tW(S)||(S=[S,S]),tW(M)||(M=[M,M]),tW(C)||(C=[C,C]),v.from.each(function(t){k(x,t,!0),k(_,t,!1)}),b.each(function(t){var e=b.getItemModel(t),n=e.getModel("lineStyle").getLineStyle();b.setItemLayout(t,[x.getItemLayout(t),_.getItemLayout(t)]);var i=e.get("z2");null==n.stroke&&(n.stroke=x.getItemVisual(t,"style").fill),b.setItemVisual(t,{z2:tJ(i,0),fromSymbolKeepAspect:x.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:x.getItemVisual(t,"symbolOffset"),fromSymbolRotate:x.getItemVisual(t,"symbolRotate"),fromSymbolSize:x.getItemVisual(t,"symbolSize"),fromSymbol:x.getItemVisual(t,"symbol"),toSymbolKeepAspect:_.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:_.getItemVisual(t,"symbolOffset"),toSymbolRotate:_.getItemVisual(t,"symbolRotate"),toSymbolSize:_.getItemVisual(t,"symbolSize"),toSymbol:_.getItemVisual(t,"symbol"),style:n})}),y.updateData(b),v.line.eachItemGraphicEl(function(t){si(t).dataModel=e,t.traverse(function(t){si(t).dataModel=e})}),this.markKeep(y),y.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(O2),Pi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Oj),Pr=oi(),Po=function(t,e,n,i){var r=i[0],o=i[1];if(r&&o){var a=OK(t,r),s=OK(t,o),l=a.coord,h=s.coord;l[0]=t$(l[0],-1/0),l[1]=t$(l[1],-1/0),h[0]=t$(h[0],1/0),h[1]=t$(h[1],1/0);var u=tT([{},a,s]);return u.coord=[a.coord,s.coord],u.x0=a.x,u.y0=a.y,u.x1=s.x,u.y1=s.y,u}};function Pa(t){return!isNaN(t)&&!isFinite(t)}function Ps(t,e,n,i){var r=1-t;return Pa(e[r])&&Pa(n[r])}function Pl(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};if(yG(t,"cartesian2d"))return!!(n&&i&&(Ps(1,n,i,t)||Ps(0,n,i,t)))||!t||!t.containZone||!r.coord||!o.coord||!!OX(r)||!!OX(o)||t.containZone(r.coord,o.coord);return OJ(t,r)||OJ(t,o)}function Ph(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=rE(s.get(n[0]),r.getWidth()),h=rE(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(h)){if(i.getMarkerPosition){var u=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),d=a.clampData(u),p=a.clampData(c),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?c[0]:u[0]:f[0]=d[0]>p[0]?u[0]:c[0],"y0"===n[1]?f[1]=d[1]>p[1]?c[1]:u[1]:f[1]=d[1]>p[1]?u[1]:c[1],o=i.getMarkerPosition(f,n,!0)}else{var g=t.get(n[0],e),m=t.get(n[1],e),y=[g,m];a.clampData&&a.clampData(y,y),o=a.dataToPoint(y,!0)}if(yG(a,"cartesian2d")){var v=a.getAxis("x"),x=a.getAxis("y"),g=t.get(n[0],e),m=t.get(n[1],e);Pa(g)?o[0]=v.toGlobalCoord(v.getExtent()[+("x0"!==n[0])]):Pa(m)&&(o[1]=x.toGlobalCoord(x.getExtent()[+("y0"!==n[1])]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];return o}var Pu=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=Oj.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each(function(e){var r=tR(Pu,function(r){return Ph(i,e,r,t,n)});i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)})}},this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new rT});this.group.add(l.group),this.markKeep(l);var h=function(t,e,n){if(t){var i,r,o=tR(t&&t.dimensions,function(t){var n=e.getData();return tI(tI({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})});i=new yu(r=tR(["x0","y0","x1","y1"],function(t,e){return{name:t,type:o[e%2].type}}),n)}else i=new yu(r=[{name:"value",type:"float"}],n);var a=tR(n.get("data"),tF(Po,e,t,n));t&&(a=tE(a,tF(Pl,t)));var s=t?function(t,e,n,i){return uH(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return uH(t.value,r[i])};return i.initData(a,null,s),i.hasItemOption=!0,i}(r,t,e);e.setData(h),h.each(function(e){var n=tR(Pu,function(n){return Ph(h,e,n,t,i)}),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),u=s.getExtent(),c=[o.parse(h.get("x0",e)),o.parse(h.get("x1",e))],d=[s.parse(h.get("y0",e)),s.parse(h.get("y1",e))];rV(c),rV(d);var p=!(l[0]>c[1]||l[1]<c[0]||u[0]>d[1]||u[1]<d[0]);h.setItemLayout(e,{points:n,allClipped:!p});var f=h.getItemModel(e),g=f.getModel("itemStyle").getItemStyle(),m=f.get("z2"),y=p7(a,"color");!g.fill&&(g.fill=y,tG(g.fill)&&(g.fill=ih(g.fill,.4))),g.stroke||(g.stroke=y),h.setItemVisual(e,"style",g),h.setItemVisual(e,"z2",tJ(m,0))}),h.diff(Pr(l).data).add(function(t){var e=h.getItemLayout(t),n=h.getItemVisual(t,"z2");if(!e.allClipped){var i=new dg({z2:tJ(n,0),shape:{points:e.points}});h.setItemGraphicEl(t,i),l.group.add(i)}}).update(function(t,n){var i=Pr(l).data.getItemGraphicEl(n),r=h.getItemLayout(t),o=h.getItemVisual(t,"z2");r.allClipped?i&&l.group.remove(i):(i?sJ(i,{z2:tJ(o,0),shape:{points:r.points}},e,t):i=new dg({shape:{points:r.points}}),h.setItemGraphicEl(t,i),l.group.add(i))}).remove(function(t){var e=Pr(l).data.getItemGraphicEl(t);l.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,n){var i=h.getItemModel(n),r=h.getItemVisual(n,"style");t.useStyle(h.getItemVisual(n,"style")),s9(t,s7(i),{labelFetcher:e,labelDataIndex:n,defaultText:h.getName(n)||"",inheritColor:tG(r.fill)?ih(r.fill,1):hS.color.neutral99}),sU(t,i),sF(t,null,null,i.get(["emphasis","disabled"])),si(t).dataModel=e}),Pr(l).data=h,l.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(O2),Pd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return to(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),tW(e)&&tP(e,function(t,i){var r;tG(t)&&(t={type:t}),e[i]=tk(t,"all"===(r=t.type)?{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])}:"inverse"===r?{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}:void 0)})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var e=[],n=[];t.eachRawSeries(function(i){var r,o=i.name;if(n.push(o),i.legendVisualProvider){var a=i.legendVisualProvider.getAllNames();t.isSeriesFiltered(i)||(n=n.concat(a)),a.length?e=e.concat(a):r=!0}else r=!0;r&&ot(i)&&e.push(i.name)}),this._availableNames=n;var i=this.get("data")||e,r=t9(),o=tR(i,function(t){return((tG(t)||tj(t))&&(t={name:t}),r.get(t.name))?null:(r.set(t.name,!0),new lb(t,this,this.ecModel))},this);this._data=tE(o,function(t){return!!t})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&tP(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},e.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,e=this.option.selected;tP(t,function(t){e[t.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;tP(t,function(t){var n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]})},e.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&tD(this._availableNames,t)>=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:hS.size.m,align:"auto",backgroundColor:hS.color.transparent,borderColor:hS.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:hS.color.disabled,inactiveBorderColor:hS.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:hS.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:hS.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:hS.color.tertiary,borderWidth:1,borderColor:hS.color.border},emphasis:{selectorLabel:{show:!0,color:hS.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(h_),Pp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return to(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new rT),this.group.add(this._selectorGroup=new rT),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);a&&(!s||"auto"===s)&&(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=hp(t,n).refContainer,h=t.getBoxLayoutParams(),u=t.get("padding"),c=hu(h,l,u),d=this.layoutInner(t,r,c,i,a,s),p=hu(tA({width:d.width,height:d.height},h),l,u);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=L_(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=t9(),h=e.get("selectedMode"),u=e.get("triggerEvent"),c=[];n.eachRawSeries(function(t){t.get("legendHoverLink")||c.push(t.id)}),tP(e.getData(),function(r,o){var a=this,d=r.get("name");if(!this.newlineDisabled&&(""===d||"\n"===d)){var p=new rT;p.newline=!0,s.add(p);return}var f=n.getSeriesByName(d)[0];if(!l.get(d))if(f){var g=f.getData(),m=g.getVisual("legendLineStyle")||{},y=g.getVisual("legendIcon"),v=g.getVisual("style"),x=this._createItem(f,d,o,r,e,t,m,v,y,h,i);x.on("click",tF(Pf,d,null,i,c)).on("mouseover",tF(Pm,f.name,null,i,c)).on("mouseout",tF(Py,f.name,null,i,c)),n.ssr&&x.eachChild(function(t){var e=si(t);e.seriesIndex=f.seriesIndex,e.dataIndex=o,e.ssrType="legend"}),u&&x.eachChild(function(t){a.packEventData(t,e,f,o,d)}),l.set(d,!0)}else n.eachRawSeries(function(a){var s=this;if(!l.get(d)&&a.legendVisualProvider){var p=a.legendVisualProvider;if(!p.containName(d))return;var f=p.indexOfName(d),g=p.getItemVisual(f,"style"),m=p.getItemVisual(f,"legendIcon"),y=ir(g.fill);y&&0===y[3]&&(y[3]=.2,g=tI(tI({},g),{fill:iu(y,"rgba")}));var v=this._createItem(a,d,o,r,e,t,{},g,m,h,i);v.on("click",tF(Pf,null,d,i,c)).on("mouseover",tF(Pm,null,d,i,c)).on("mouseout",tF(Py,null,d,i,c)),n.ssr&&v.eachChild(function(t){var e=si(t);e.seriesIndex=a.seriesIndex,e.dataIndex=o,e.ssrType="legend"}),u&&v.eachChild(function(t){s.packEventData(t,e,a,o,d)}),l.set(d,!0)}},this)},this),r&&this._createSelector(r,e,i,o,a)},e.prototype.packEventData=function(t,e,n,i,r){var o={componentType:"legend",componentIndex:e.componentIndex,dataIndex:i,value:r,seriesIndex:n.seriesIndex};si(t).eventData=o},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();tP(t,function(t){var i=t.type,r=new sn({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect",legendId:e.id})}});o.add(r),s9(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),sV(r)})},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,h,u){var c=t.visualDrawType,d=r.get("itemWidth"),p=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),y=i.get("icon"),v=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=2*(e.lineWidth>0)),tP(t,function(n,i){"inherit"===t[i]&&(t[i]=e[i])})}var l=e.getModel("itemStyle"),h=l.getItemStyle(),u=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");h.decal=c&&"inherit"!==c?fH(c,a):i.decal,"inherit"===h.fill&&(h.fill=i[r]),"inherit"===h.stroke&&(h.stroke=i[u]),"inherit"===h.opacity&&(h.opacity=("fill"===r?i:n).opacity),s(h,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===h.fill&&(h.fill=i.fill),"auto"===h.stroke&&(h.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=h[u];h.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:h.lineWidth,h.fill=e.get("inactiveColor"),h.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:h,lineStyle:p}}(l=y||l||"roundRect",i,a,s,c,f,u),x=new rT,_=i.getModel("textStyle");if(tH(t.getLegendIcon)&&(!y||"inherit"===y))x.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:g,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:m}));else{var b,w,S,M="inherit"===y&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;x.add(((S=fg(w=(b={itemWidth:d,itemHeight:p,icon:l,iconRotate:M,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:m}).icon||"roundRect",0,0,b.itemWidth,b.itemHeight,b.itemStyle.fill,b.symbolKeepAspect)).setStyle(b.itemStyle),S.rotation=(b.iconRotate||0)*Math.PI/180,S.setOrigin([b.itemWidth/2,b.itemHeight/2]),w.indexOf("empty")>-1&&(S.style.stroke=S.style.fill,S.style.fill=hS.color.neutral00,S.style.lineWidth=2),S))}var C=r.get("formatter"),k=e;tG(C)&&C?k=C.replace("{name}",null!=e?e:""):tH(C)&&(k=C(e));var T=f?_.getTextColor():i.get("inactiveColor");x.add(new sn({style:lt(_,{text:k,x:"left"===o?d+5:-5,y:p/2,fill:T,align:o,verticalAlign:"middle"},{inheritColor:T})}));var I=new aq({shape:x.getBoundingRect(),style:{fill:"transparent"}}),A=i.getModel("tooltip");return A.get("show")&&pu({el:I,componentModel:r,itemName:e,itemTooltipOption:A.option}),x.add(I),x.eachChild(function(t){t.silent=!0}),I.silent=!h,this.getContentGroup().add(x),sV(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();hs(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),h=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),!r)return a.x=h[0],a.y=h[1],this.group.getBoundingRect();hs("horizontal",s,t.get("selectorItemGap",!0));var u=s.getBoundingRect(),c=[-u.x,-u.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?c[p]+=l[f]+d:h[p]+=u[f]+d,c[1-p]+=l[g]/2-u[g]/2,s.x=c[0],s.y=c[1],a.x=h[0],a.y=h[1];var y={x:0,y:0};return y[f]=l[f]+d+u[f],y[g]=Math.max(l[g],u[g]),y[m]=Math.min(0,u[m]+c[1-p]),y},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(cL);function Pf(t,e,n,i){Py(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),Pm(t,e,n,i)}function Pg(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i<r&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function Pm(t,e,n,i){Pg(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function Py(t,e,n,i){Pg(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function Pv(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function Px(t,e,n){var i="allSelect"===t||"inverseSelect"===t,r={},o=[];n.eachComponent({mainType:"legend",query:e},function(n){i?n[t]():n[t](e.name),P_(n,r),o.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(t){tP(r,function(e,n){t[e?"select":"unSelect"](n)}),P_(t,a)}),i?{selected:a,legendIndex:o}:{name:e.name,selected:a}}function P_(t,e){var n=e||{};return tP(t.getData(),function(e){var i=e.get("name");if("\n"!==i&&""!==i){var r=t.isSelected(i);en(n,i)?n[i]=n[i]&&r:n[i]=r}}),n}function Pb(t){t.registerComponentModel(Pd),t.registerComponentView(Pp),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,Pv),t.registerSubTypeDefaulter("legend",function(){return"plain"}),t.registerAction("legendToggleSelect","legendselectchanged",tF(Px,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",tF(Px,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",tF(Px,"inverseSelect")),t.registerAction("legendSelect","legendselected",tF(Px,"select")),t.registerAction("legendUnSelect","legendunselected",tF(Px,"unSelect"))}var Pw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(e,n,i){var r=hy(e);t.prototype.init.call(this,e,n,i),PS(this,e,r)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),PS(this,this.option,e)},e.type="legend.scroll",e.defaultOption=lM(Pd.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:hS.color.accent50,pageIconInactiveColor:hS.color.accent10,pageIconSize:15,pageTextStyle:{color:hS.color.tertiary},animationDurationUpdate:800}),e}(Pd);function PS(t,e,n){var i=t.getOrient(),r=[1,1];r[i.index]=0,hm(e,n,{type:"box",ignoreSize:!!r})}var PM=["width","height"],PC=["x","y"],Pk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!0,n._currentIndex=0,n}return to(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new rT),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rT)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(e,n,i,r,o,a,s){var l=this;t.prototype.renderInner.call(this,e,n,i,r,o,a,s);var h=this._controllerGroup,u=n.get("pageIconSize",!0),c=tW(u)?u:[u,u];p("pagePrev",0);var d=n.getModel("pageTextStyle");function p(t,e){var i=pr(n.get("pageIcons",!0)[n.getOrient().name][e],{onclick:tV(l._pageGo,l,t+"DataIndex",n,r)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});i.name=t,h.add(i)}h.add(new sn({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getSelectorGroup(),s=t.getOrient().index,l=PM[s],h=PC[s],u=PM[1-s],c=PC[1-s];r&&hs("horizontal",a,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=tC(n);r&&(g[l]=n[l]-p[l]-d);var m=this._layoutContentAndController(t,i,g,s,l,u,c,h);if(r){if("end"===o)f[s]+=m[l]+d;else{var y=p[l]+d;f[s]-=y,m[h]-=y}m[l]+=p[l]+d,f[1-s]+=m[c]+m[u]/2-p[u]/2,m[u]=Math.max(m[u],p[u]),m[c]=Math.min(m[c],p[c]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,e,n,i,r,o,a,s){var l=this.getContentGroup(),h=this._containerGroup,u=this._controllerGroup;hs(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),hs("horizontal",u,t.get("pageButtonItemGap",!0));var c=l.getBoundingRect(),d=u.getBoundingRect(),p=this._showController=c[r]>n[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],m=[-d.x,-d.y],y=tJ(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?m[i]+=n[r]-d[r]:g[i]+=d[r]+y),m[1-i]+=c[o]/2-d[o]/2,l.setPosition(f),h.setPosition(g),u.setPosition(m);var v={x:0,y:0};if(v[r]=p?n[r]:c[r],v[o]=Math.max(c[o],d[o]),v[a]=Math.min(0,d[a]+m[1-i]),h.__rectSize=n[r],p){var x={x:0,y:0};x[r]=Math.max(n[r]-d[r]-y,0),x[o]=v[o],h.setClipPath(new aq({shape:x})),h.__rectSize=x[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&sJ(l,{x:_.contentPosition[0],y:_.contentPosition[1]},p?t:null),this._updatePageInfoView(t,_),v},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;tP(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",tG(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=PM[r],a=PC[r],s=this._findTargetItemIndex(e),l=n.children(),h=l[s],u=l.length,c=+!!u,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=v(h);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,y=null;f<=u;++f)(!(y=v(l[f]))&&m.e>g.s+i||y&&!x(y,g.s))&&(g=m.i>g.i?m:y)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=y;for(var f=s-1,g=p,m=p,y=null;f>=-1;--f)(!(y=v(l[f]))||!x(m,y.s))&&g.i<m.i&&(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=y;return d;function v(t){if(t){var e=t.getBoundingRect(),n=e[a]+t[a];return{s:n,e:n+e[o],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){var e,n;return this._showController?(this.getContentGroup().eachChild(function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)}),null!=e?e:n):0},e.type="legend.scroll",e}(Pp);function PT(t){g_(Pb),t.registerComponentModel(Pw),t.registerComponentView(Pk),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}var PI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="dataZoom.inside",e.defaultOption=lM(Ls.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Ls),PA=oi();function PD(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function PL(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function PO(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}var PP=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return to(e,t),e.prototype.render=function(e,n,i){var r;(t.prototype.render.apply(this,arguments),e.noTarget())?this._clear():(this.range=e.getPercentRange(),r={pan:tV(PR.pan,this),zoom:tV(PR.zoom,this),scrollMove:tV(PR.scrollMove,this)},PA(i).coordSysRecordMap.each(function(t){var n=t.dataZoomInfoMap.get(e.uid);n&&(n.getRange=r)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=PA(t).coordSysRecordMap,i=n.keys(),r=0;r<i.length;r++){var o=i[r],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=e.uid;s.get(l)&&(s.removeKey(l),s.keys().length||PD(n,a))}}}(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Lu),PR={zoom:function(t,e,n,i){var r=this.range,o=r.slice(),a=t.axisModels[0];if(a){var s=PE[e](null,[i.originX,i.originY],a,n,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],h=Math.max(1/i.scale,0);o[0]=(o[0]-l)*h+l,o[1]=(o[1]-l)*h+l;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Cy(0,o,[0,100],0,u.minSpan,u.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1])return o}},pan:PN(function(t,e,n,i,r,o){var a=PE[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:PN(function(t,e,n,i,r,o){return PE[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta})};function PN(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s&&(Cy(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]))return a}}var PE={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function PB(t){Lg(t),t.registerComponentModel(PI),t.registerComponentView(PP),t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=PA(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=t9());i.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(t){tP(Lo(t).infoList,function(n){var r,o,a,s=n.model.uid,l=i.get(s)||i.set(s,(a=(o={model:r=n.model,containsPoint:tF(PO,r),dispatchAction:tF(PL,e),dataZoomInfoMap:null,controller:null}).controller=new bv(e.getZr()),tP(["pan","zoom","scrollMove"],function(t){a.on(t,function(e){var n=[];o.dataZoomInfoMap.each(function(i){if(e.isAvailableBehavior(i.model.option)){var r=(i.getRange||{})[t],a=r&&r(i.dzReferCoordSysInfo,o.model.mainType,o.controller,e);!i.model.get("disabled",!0)&&a&&n.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}}),n.length&&o.dispatchAction(n)})}),o));(l.dataZoomInfoMap||(l.dataZoomInfoMap=t9())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})})}),i.each(function(t){var n,r,o,a,s,l=t.controller,h=t.dataZoomInfoMap;if(h){var u=h.keys()[0];null!=u&&(s=h.get(u))}if(!s)return void PD(i,t);var c=(r="type_",o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0,h.each(function(t){var e=t.model,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o[r+i]>o[r+n]&&(n=i),a=a&&e.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}});l.enable(c.controlType,c.opt),pO(t,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Pz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=lM(Ls.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:hS.color.accent10,borderRadius:0,backgroundColor:hS.color.transparent,dataBackground:{lineStyle:{color:hS.color.accent30,width:.5},areaStyle:{color:hS.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:hS.color.accent40,width:.5},areaStyle:{color:hS.color.accent20,opacity:.3}},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:hS.color.neutral00,borderColor:hS.color.accent20},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:hS.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:hS.color.tertiary},brushSelect:!0,brushStyle:{color:hS.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:hS.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(Ls),PV="horizontal",PF="vertical",PW=["line","bar","candlestick","scatter"],PH={easing:"cubicOut",duration:100,delay:0},PG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return to(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=tV(this._onBrush,this),this._onBrushEnd=tV(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),pO(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1===e.get("show"))return void this.group.removeAll();if(e.noTarget()){this._clear(),this.group.removeAll();return}r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){pP(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new rT;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect"),i=hp(t,e).refContainer,r=this._findCoordRect(),o=t.get("defaultLocationEdgeGap",!0)||0,a=this._orient===PV?{right:i.width-r.x-r.width,top:i.height-30-o-7*!!n,width:r.width,height:30}:{right:o,top:r.y,width:30,height:r.height},s=hy(t.option);tP(["right","top","width","height"],function(t){"ph"===s[t]&&(s[t]=a[t])});var l=hu(s,i);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===PF&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==PV||r?n===PV&&r?{scaleY:a?1:-1,scaleX:-1}:n!==PF||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new aq({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new aq({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:tV(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var h,u=r.getDataExtent(t.thisDim),c=r.getDataExtent(a),d=(c[1]-c[0])*.3;c=[c[0]-d,c[1]+d];var p=[0,e[1]],f=[0,e[0]],g=[[e[0],0],[0,0]],m=[],y=f[1]/Math.max(1,r.count()-1),v=e[0]/(u[1]-u[0]),x="time"===t.thisAxis.type,_=-y,b=Math.round(r.count()/e[0]);r.each([t.thisDim,a],function(t,e,n){if(b>0&&n%b){x||(_+=y);return}_=x?(t-u[0])*v:_+y;var i=null==e||isNaN(e)||""===e,r=i?0:rN(e,c,p,!0);i&&!h&&n?(g.push([g[g.length-1][0],0]),m.push([m[m.length-1][0],0])):!i&&h&&(g.push([_,0]),m.push([_,0])),i||(g.push([_,r]),m.push([_,r])),h=i}),s=this._shadowPolygonPts=g,l=this._shadowPolylinePts=m}this._shadowData=r,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var w=this.dataZoomModel,S=0;S<3;S++){var M=function(t){var e=w.getModel(t?"selectedDataBackground":"dataBackground"),n=new rT,i=new dg({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new dv({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}(1===S);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}}}},e.prototype._prepareDataShadowInfo=function(){var t,e=this.dataZoomModel,n=e.get("showDataShadow");if(!1!==n){var i=this.ecModel;return e.eachTargetAxis(function(r,o){tP(e.getAxisProxy(r,o).getTargetSeriesModels(),function(e){if(!t&&!(!0!==n&&0>tD(PW,e.get("type")))){var a,s=i.getComponent(Lr(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],h=e.coordinateSystem;null!=l&&h.getOtherAxis&&(a=h.getOtherAxis(s).inverse),l=e.getData().mapDimension(l);var u=e.getData().mapDimension(r);t={thisAxis:s,series:e,thisDim:u,otherDim:l,otherAxisInverse:a}}},this)},this),t}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,h=a.get("brushSelect"),u=e.filler=new aq({silent:h,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(u),r.add(new aq({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:hS.color.transparent}})),tP([0,1],function(e){var o=a.get("handleIcon");!fd[o]&&0>o.indexOf("path://")&&0>o.indexOf("image://")&&(o="path://"+o);var s=fg(o,-1,0,2,2,null,!0);s.attr({cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:tV(this._onDragMove,this,e),ondragend:tV(this._onDragEnd,this),onmouseover:tV(this._showDataInfo,this,!0),onmouseout:tV(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),h=a.get("handleSize");this._handleHeight=rE(h,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),sV(s);var u=a.get("handleColor");null!=u&&(s.style.fill=u),r.add(n[e]=s);var c=a.getModel("textStyle"),d=(a.get("handleLabel")||{}).show||!1;t.add(i[e]=new sn({silent:!0,invisible:!d,style:lt(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))},this);var c=u;if(h){var d=rE(a.get("moveHandleSize"),o[1]),p=e.moveHandle=new aq({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),f=.8*d,g=e.moveHandleIcon=fg(a.get("moveHandleIcon"),-f/2,-f/2,f,f,hS.color.neutral00,!0);g.silent=!0,g.y=o[1]+d/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(d,10));(c=e.moveZone=new aq({invisible:!0,shape:{y:o[1]-m,height:d+m}})).on("mouseover",function(){s.enterEmphasis(p)}).on("mouseout",function(){s.leaveEmphasis(p)}),r.add(p),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:"default",drift:tV(this._onDragMove,this,"all"),ondragstart:tV(this._showDataInfo,this,!0),ondragend:tV(this._onDragEnd,this),onmouseover:tV(this._showDataInfo,this,!0),onmouseout:tV(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[rN(t[0],[0,100],e,!0),rN(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Cy(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?rN(o.minSpan,a,r,!0):null,null!=o.maxSpan?rN(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=rV([rN(i[0],r,a,!0),rN(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=rV(n.slice()),r=this._size;tP([0,1],function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;l<a.length;l++){var h=a[l],u=h.getClipPath();u||(u=new aq,h.setClipPath(u)),u.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:r[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var e=this.dataZoomModel,n=this._displayables,i=n.handleLabels,r=this._orient,o=["",""];if(e.get("showDetail")){var a=e.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,h=t?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=rV(this._handleEnds.slice());function c(t){var e=d9(n.handles[t].parent,this.group),a=pt(0===t?"right":"left",e),s=this._handleWidth/2+5,l=d7([u[t]+(0===t?-s:s),this._size[1]/2],e);i[t].setStyle({x:l[0],y:l[1],verticalAlign:r===PV?"middle":a,align:r===PV?a:"center",text:o[t]})}c.call(this,0),c.call(this,1)},e.prototype._formatLabel=function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),r=n.get("labelPrecision");(null==r||"auto"===r)&&(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(r,20));return tH(i)?i(t,o):tG(i)?i.replace("{value}",o):o},e.prototype._showDataInfo=function(t){var e=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,i=t||this._dragging?n:e,r=this._displayables,o=r.handleLabels;o[0].attr("invisible",!i),o[1].attr("invisible",!i),r.moveHandle&&this.api[i?"enterEmphasis":"leaveEmphasis"](r.moveHandle,1)},e.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,eH(i.event);var r=d7([e,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(t,r[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var e=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0)&&!(n[0]>e[0])&&!(n[1]<0)&&!(n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new e1(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(new Date-this._brushStartTime<200&&5>Math.abs(n.width))){var i=this._getViewExtent(),r=[0,100],o=this._handleEnds=[n.x,n.x+n.width],a=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Cy(0,o,i,0,null!=a.minSpan?rN(a.minSpan,r,i,!0):null,null!=a.maxSpan?rN(a.maxSpan,r,i,!0):null),this._range=rV([rN(o[0],i,r,!0),rN(o[1],i,r,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(eH(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new aq({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),h=this._size;s[0]=Math.max(Math.min(h[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?PH:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=Lo(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(Lu);function PU(t){t.registerComponentModel(Pz),t.registerComponentView(PG),Lg(t)}var Pj={color:{active:["#006edd","#e0ffff"],inactive:[hS.color.transparent]},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]}},PY=function(t,e,n){var i=tC((Pj[t]||{})[e]);return n&&tW(i)?i[i.length-1]:i},PX=SL.mapVisual,PZ=SL.eachVisual,Pq=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return to(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;e||Ou(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=tV(t,this),this.controllerVisuals=Oh(this.option.controller,e,t),this.targetVisuals=Oh(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,e=this.option.seriesIndex;return null==e&&null==t&&(e="all"),tR(oh(this.ecModel,"series",{index:e,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models,function(t){return t.componentIndex})},e.prototype.eachTargetSeries=function(t,e){tP(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)},this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries(function(n){n===t&&(e=!0)}),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],tW(t)&&(t=t.slice(),i=!0);var l=e?t:i?[h(t[0]),h(t[1])]:h(t);if(tG(s))return s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l);if(tH(s))return i?s(t[0],t[1]):s(t);if(!i)return l;if(t[0]===a[0])return n[0]+" "+l[1];if(t[1]===a[1])return n[1]+" "+l[0];return l[0]+" - "+l[1];function h(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=rV([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});tk(i,n),tk(r,n);var o=this.isCategory();function a(n){tW(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),(function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},tP(i,function(t,e){if(SL.isValidType(e)){var n=PY(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}).call(this,i,"inRange","outOfRange"),(function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";tP(this.stateList,function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&tC(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&tC(n)||(o?s[0]:[s[0],s[0]])),l.symbol=PX(l.symbol,function(t){return"none"===t?r:t});var h=l.symbolSize;if(null!=h){var u=-1/0;PZ(h,function(t){t>u&&(u=t)}),l.symbolSize=PX(h,function(t){return rN(t,[0,u],[0,s[0]],!0)})}},this)}).call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:hS.color.transparent,borderColor:hS.color.borderTint,contentColor:hS.color.theme["0"],inactiveColor:hS.color.disabled,borderWidth:0,padding:hS.size.m,textGap:10,precision:0,textStyle:{color:hS.color.secondary}},e}(h_),PK=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=20),(null==e[1]||isNaN(e[1]))&&(e[1]=140)},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):tW(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),tP(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=rV((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},e.prototype.getValueState=function(t){var e=this.option.range,n=this.getExtent(),i=tJ(this.option.unboundedRange,!0);return(i&&e[0]<=n[0]||e[0]<=t)&&(i&&e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries(function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},e.prototype.getVisualMeta=function(t){var e=P$(this,"outOfRange",this.getExtent()),n=P$(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;a<l&&(!n.length||e[a]<=n[0]);a++)e[a]<n[o]&&r(e[a],"outOfRange");for(var h=1;o<s;o++,h=0)h&&i.length&&r(n[o],"outOfRange"),r(n[o],"inRange");for(var h=1;a<l;a++)(!n.length||n[n.length-1]<e[a])&&(h&&(i.length&&r(i[i.length-1].value,"outOfRange"),h=0),r(e[a],"outOfRange"));var u=i.length;return{stops:i,outerColors:[u?i[0].color:"transparent",u?i[u-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=lM(Pq.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:hS.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:hS.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:hS.color.shadow}}),e}(Pq);function P$(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,r=n[0],o=[],a=0;a<=200&&r<n[1];a++)o.push(r),r+=i;return o.push(n[1]),o}var PJ=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return to(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e},e.prototype.render=function(t,e,n,i){(this.visualMapModel=t,!1===t.get("show"))?this.group.removeAll():this.doRender(t,e,n,i)},e.prototype.renderBackground=function(t){var e=this.visualMapModel,n=t1(e.get("padding")||0),i=t.getBoundingRect();t.add(new aq({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,e,n){var i=(n=n||{}).forceState,r=this.visualMapModel,o={};function a(t){return o[t]}function s(t,e){o[t]=e}"color"===e&&(o.color=r.get("contentColor"));var l=r.controllerVisuals[i||r.getValueState(t)];return tP(SL.prepareVisualTypes(l),function(i){var r=l[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",r=l.__alphaForOpacity),SL.dependsOn(i,e)&&r&&r.applyVisual(t,a,s)}),o[e]},e.prototype.positionGroup=function(t){var e=this.visualMapModel,n=hp(e,this.api).refContainer;hf(t,e.getBoxLayoutParams(),n)},e.prototype.doRender=function(t,e,n,i){},e.type="visualMap",e}(cL),PQ=[["left","right","width"],["top","bottom","height"]];function P0(t,e,n){var i=t.option,r=i.align;if(null!=r&&"auto"!==r)return r;for(var o={width:e.getWidth(),height:e.getHeight()},a=+("horizontal"===i.orient),s=PQ[a],l=[0,null,10],h={},u=0;u<3;u++)h[PQ[1-a][u]]=l[u],h[s[u]]=2===u?n[0]:i[s[u]];var c=[["x","width",3],["y","height",0]][a],d=hu(h,o,i.padding);return s[(d.margin[c[2]]||0)+d[c[0]]+.5*d[c[1]]<.5*o[c[1]]?0:1]}function P1(t,e){return tP(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var P2=Math.min,P5=Math.max,P3=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return to(e,t),e.prototype.init=function(e,n){t.prototype.init.call(this,e,n),this._hoverLinkFromSeriesMouseOver=tV(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=tV(this._hideIndicator,this)},e.prototype.doRender=function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},e.prototype._renderEndsText=function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var r=this.visualMapModel,o=r.get("textGap"),a=r.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-o:a[1]+o],s),h=this._applyTransform(0===n?"bottom":"top",s),u=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new sn({style:lt(c,{x:l[0],y:l[1],verticalAlign:c.get("verticalAlign")||("horizontal"===u?"middle":h),align:c.get("align")||("horizontal"===u?h:"center"),text:i})}))}},e.prototype._renderBar=function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,r=this._orient,o=this._useHandle,a=P0(e,this.api,i),s=n.mainGroup=this._createBarGroup(a),l=new rT;s.add(l),l.add(n.outOfRange=P4()),l.add(n.inRange=P4(null,o?P6(this._orient):null,tV(this._dragHandle,this,"all",!1),tV(this._dragHandle,this,"all",!0))),l.setClipPath(new aq({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var h=e.textStyleModel.getTextRect("国"),u=P5(h.width,h.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(e,s,0,i,u,r),this._createHandle(e,s,1,i,u,r)),this._createIndicator(e,s,i,u,r),t.add(s)},e.prototype._createHandle=function(t,e,n,i,r,o){var a=tV(this._dragHandle,this,n,!1),s=tV(this._dragHandle,this,n,!0),l=rg(t.get("handleSize"),i[0]),h=fg(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),u=P6(this._orient);h.attr({cursor:u,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){eH(t.event)}}),h.x=i[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),sj(h,!0),e.add(h);var c=new sn({cursor:u,draggable:!0,drift:a,onmousemove:function(t){eH(t.event)},ondragend:s,style:lt(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});c.ensureState("blur").style={opacity:.1},c.stateTransition={duration:200},this.group.add(c);var d=[l,0],p=this._shapes;p.handleThumbs[n]=h,p.handleLabelPoints[n]=d,p.handleLabels[n]=c},e.prototype._createIndicator=function(t,e,n,i,r){var o=rg(t.get("indicatorSize"),n[0]),a=fg(t.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=t.getModel("indicatorStyle").getItemStyle();if(a instanceof aW){var l=a.style;a.useStyle(tI({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);e.add(a);var h=new sn({silent:!0,invisible:!0,style:lt(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});this.group.add(h);var u=[("horizontal"===r?i/2:6)+n[0]/2,0],c=this._shapes;c.indicator=a,c.indicatorLabel=h,c.indicatorLabelPoint=u,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,r[1]),this._hideIndicator(),this._updateView()}!this.visualMapModel.get("realtime")===e&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():P8(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[rN(e[0],n,i,!0),rN(e[1],n,i,!0)]},e.prototype._updateInterval=function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,r=[0,n.itemSize[1]];Cy(e,i,r,t,0);var o=n.getExtent();this._dataInterval=[rN(i[0],r,o,!0),rN(i[1],r,o,!0)]},e.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,r=[0,e.itemSize[1]],o=t?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,r,"outOfRange");i.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),i.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(o,a)},e.prototype._createBarVisual=function(t,e,n,i){var r={forceState:i,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,r),a=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(n,a);return{barColor:new dP(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},e.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var r=1;r<100;r++){var o=t[0]+i*r;if(o>t[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new rT("horizontal"===e&&!n?{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2}:"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"===e&&!n?{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"left"===t?1:-1})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent(),l=this._applyTransform("left",n.mainGroup);tP([0,1],function(h){var u=r[h];u.setStyle("fill",e.handlesColor[h]),u.y=t[h];var c=rN(t[h],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var p=d7(n.handleLabelPoints[h],d9(u,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-d)/2:-((a[0]-d)/2);p[1]+=f}o[h].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,h=l.indicator;if(h){h.attr("invisible",!1);var u=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=rN(t,o,s,!0),p=a[0]-c/2,f={x:h.x,y:h.y};h.y=d,h.x=p;var g=d7(l.indicatorLabelPoint,d9(h,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var y=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:v?y:"middle",align:v?"center":y});var x={x:p,y:d,style:{fill:u}},_={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};h.x=f.x,h.y=f.y,h.animateTo(x,b),m.animateTo(_,b)}else h.attr(x),m.attr(_);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;S<w.length;S++)this.api.enterBlur(w[S])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([e.offsetX,e.offsetY],t._shapes.mainGroup,!0,!0);i[1]=P2(P5(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,t._dragging||t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,e){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var r,o,a,s,l,h=[0,i[1]],u=n.getExtent();t=P2(P5(h[0],t),h[1]);var c=(r=n,o=u,a=h,s=6,(l=r.get("hoverLinkDataSize"))&&(s=rN(l,o,a,!0)/2),s),d=[t-c,t+c],p=rN(t,h,u,!0),f=[rN(d[0],h,u,!0),rN(d[1],h,u,!0)];d[0]<h[0]&&(f[0]=-1/0),d[1]>h[1]&&(f[1]=1/0),e&&(f[0]===-1/0?this._showIndicator(p,f[1],"< ",c):f[1]===1/0?this._showIndicator(p,f[0],"> ",c):this._showIndicator(p,p,"≈ ",c));var g=this._hoverLinkDataIndices,m=[];(e||P8(n))&&(m=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var y=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i<r;i++){var o=r7(t[i].seriesId,null);if(null==o)return;for(var a=r2(t[i].dataIndex),s=n&&n[o],l=0,h=a.length;l<h;l++){var u=a[l];s&&s[u]?s[u]=null:(e[o]||(e[o]={}))[u]=1}}}function o(t,e){var n=[];for(var i in t)if(t.hasOwnProperty(i)&&null!=t[i])if(e)n.push(+i);else{var r=o(t[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}}(g,m);this._dispatchHighDown("downplay",P1(y[0],n)),this._dispatchHighDown("highlight",P1(y[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){if(fi(t.target,function(t){var n=si(t);if(null!=n.dataIndex)return e=n,!0},!0),e){var e,n=this.ecModel.getSeriesByIndex(e.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var r=n.getData(e.dataType),o=r.getStore().get(i.getDataDimensionIndex(r),e.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n<e.length;n++)this.api.leaveBlur(e[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",P1(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,e,n,i){var r=d9(e,i?null:this.group);return tW(t)?d7(t,r,n):pt(t,r,n)},e.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(PJ);function P4(t,e,n,i){return new dg({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){eH(t.event)},ondragend:i})}function P8(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function P6(t){return"vertical"===t?"ns-resize":"ew-resize"}var P9={type:"selectDataRange",event:"dataRangeSelected",update:"update"},P7=function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})},Rt=[{createOnAllSeries:!0,reset:function(t,e){var n=[];return e.eachComponent("visualMap",function(e){var i,r,o,a,s,l=t.pipelineContext;!e.isTargetSeries(t)||l&&l.large||n.push((i=e.stateList,r=e.targetVisuals,o=tV(e.getValueState,e),a=e.getDataDimensionIndex(t.getData()),s={},tP(i,function(t){var e=SL.prepareVisualTypes(r[t]);s[t]=e}),{progress:function(t,e){function n(t){return p9(e,h,t)}function i(t,n){ft(e,h,t,n)}null!=a&&(l=e.getDimensionIndex(a));for(var l,h,u=e.getStore();null!=(h=t.next());){var c=e.getRawDataItem(h);if(!c||!1!==c.visualMap)for(var d=null!=a?u.get(l,h):h,p=o(d),f=r[p],g=s[p],m=0,y=g.length;m<y;m++){var v=g[m];f[v]&&f[v].applyVisual(d,n,i)}}}}))}),n}},{createOnAllSeries:!0,reset:function(t,e){var n=t.getData(),i=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var r=e.getVisualMeta(tV(Re,null,t,e))||{stops:[],outerColors:[]},o=e.getDataDimensionIndex(n);o>=0&&(r.dimension=o,i.push(r))}}),t.getData().setVisual("visualMeta",i)}}];function Re(t,e,n,i){for(var r=e.targetVisuals[i],o=SL.prepareVisualTypes(r),a={color:p7(t.getData(),"color")},s=0,l=o.length;s<l;s++){var h=o[s],u=r["opacity"===h?"__alphaForOpacity":h];u&&u.applyVisual(n,c,d)}return a.color;function c(t){return a[t]}function d(t,e){a[t]=e}}function Rn(t){var e=t&&t.visualMap;tW(e)||(e=e?[e]:[]),tP(e,function(t){if(t){Ri(t,"splitList")&&!Ri(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&tW(e)&&tP(e,function(t){tY(t)&&(Ri(t,"start")&&!Ri(t,"min")&&(t.min=t.start),Ri(t,"end")&&!Ri(t,"max")&&(t.max=t.end))})}})}function Ri(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var Rr=!1;function Ro(t){Rr||(Rr=!0,t.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),t.registerAction(P9,P7),tP(Rt,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(Rn))}function Ra(t){t.registerComponentModel(PK),t.registerComponentView(P3),Ro(t)}var Rs=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return to(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Rl[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=tC(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=tR(this._pieceList,function(t){return t=tC(t),"inRange"!==e&&(t.visual=null),t}))})},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=SL.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}tP(e.pieces,function(t){tP(i,function(e){t.hasOwnProperty(e)&&(n[e]=1)})}),tP(n,function(t,n){var i=!1;tP(this.stateList,function(t){i=i||o(e,t,n)||o(e.target,t,n)},this),i||tP(this.stateList,function(t){(e[t]||(e[t]={}))[n]=PY(n,"inRange"===t?"active":"inactive",r)})},this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,tP(i,function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)},this),"single"===n.selectedMode){var o=!1;tP(i,function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=tC(t)},e.prototype.getValueState=function(t){var e=SL.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries(function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(e,i){SL.findPieceIndex(e,n)===t&&r.push(i)},this),e.push({seriesId:i.id,dataIndex:r})},this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return tP(r,function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])},this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=lM(Pq.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Pq),Rl={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;e.splitNumber=r=Math.max(parseInt(r,10),1);for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a<r;s+=o,a++){var l=a===r-1?i[1]:s+o;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),rq(t),tP(t,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(t){var e=this.option;tP(e.categories,function(e){t.push({text:this.formatValueText(e,!0),value:e})},this),Rh(e,t)},pieces:function(t){var e=this.option;tP(e.pieces,function(e,n){tY(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var r=i.value=e.value;i.interval=[r,r],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;u<2;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==o[u];d++)o[u]=e[c[d]],a[u]=s[d],h[u]=2===d;null==o[u]&&(o[u]=l[u])}h[0]&&o[1]===1/0&&(a[0]=0),h[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=SL.retrieveVisuals(e),t.push(i)},this),Rh(e,t),rq(t),tP(t,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};function Rh(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var Ru=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=this._getItemAlign(),o=e.itemSize,a=this._getViewData(),s=a.endsText,l=t$(e.get("showLabel",!0),!s),h=!e.get("selectedMode");s&&this._renderEndsText(t,s[0],o,l,r),tP(a.viewPieceList,function(a){var s=a.piece,u=new rT;u.onclick=tV(this._onItemClick,this,s),this._enableHoverLink(u,a.indexInModelPieceList);var c=e.getRepresentValue(s);if(this._createItemSymbol(u,c,[0,0,o[0],o[1]],h),l){var d=this.visualMapModel.getValueState(c),p=i.get("align")||r;u.add(new sn({style:lt(i,{x:"right"===p?-n:o[0]+n,y:o[1]/2,text:s.text,verticalAlign:i.get("verticalAlign")||"middle",align:p,opacity:tJ(i.get("opacity"),"outOfRange"===d?.5:1)}),silent:h}))}t.add(u)},this),s&&this._renderEndsText(t,s[1],o,l,r),hs(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:P1(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return P0(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new rT,a=this.visualMapModel.textStyleModel;o.add(new sn({style:lt(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=tR(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n,i){var r=fg(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color"));r.silent=i,t.add(r)},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=tC(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,tP(r,function(t,e){r[e]=e===o})):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(PJ);function Rc(t){t.registerComponentModel(Rs),t.registerComponentView(Ru),Ro(t)}var Rd=function(){function t(t){this._thumbnailModel=t}return t.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},t.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:pv(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(t,e){var n=e.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},t}(),Rp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return to(e,t),e.prototype.optionUpdated=function(t,e){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new Rd(this);this._target=null,this.ecModel.eachSeries(function(t){Mz(t,null)}),this.shouldShow()&&Mz(this.getTarget().baseMapProvider,t)},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?"graph"!==t.subType&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:hS.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:hS.color.neutral30,borderColor:hS.color.neutral40,opacity:.3},z:10},e}(h_),Rf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return to(e,t),e.prototype.render=function(t,e,n){if(this._api=n,this._model=t,this._coordSys||(this._coordSys=new wE),!this._isEnabled())return void this._clear();this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var r=t.getModel("itemStyle"),o=r.getItemStyle();null==o.fill&&(o.fill=e.get("backgroundColor")||hS.color.neutral00);var a=hp(t,n).refContainer,s=hu(hl(t,!0),a),l=o.lineWidth||0,h=this._contentRect=ps(s.clone(),l/2,!0,!0),u=new rT;i.add(u),u.setClipPath(new aq({shape:h.plain()}));var c=this._targetGroup=new rT;u.add(c);var d=s.plain();d.r=r.getShallow("borderRadius",!0),i.add(this._bgRect=new aq({style:o,shape:d,silent:!1,cursor:"grab"}));var p=t.getModel("windowStyle"),f=p.getShallow("borderRadius",!0);u.add(this._windowRect=new aq({shape:{x:0,y:0,width:0,height:0,r:f},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),Rm(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),Rm(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(t&&t.renderVersion===this._renderVersion){var e=this._targetGroup,n=this._coordSys,i=this._contentRect;if(e.removeAll(),t){var r=t.group,o=r.getBoundingRect();e.add(r),this._bgRect.z2=t.z2Range.min-10,n.setBoundingRect(o.x,o.y,o.width,o.height);var a=hu({left:"center",top:"center",aspect:o.width/o.height},i);n.setViewRect(a.x,a.y,a.width,a.height),r.attr(n.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var e=this._bridgeRendered;e&&e.renderVersion===t.renderVersion&&(e.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(t&&t.renderVersion===this._renderVersion){var e=e0([],t.targetTrans),n=eK([],this._coordSys.transform,e);this._transThisToTarget=e0([],n);var i=t.viewportRect;(i=i?i.clone():new nu(0,0,this._api.getWidth(),this._api.getHeight())).applyTransform(n);var r=this._windowRect,o=r.shape.r;r.setShape(tA({r:o},i))}},e.prototype._resetRoamController=function(t){var e=this,n=this._api,i=this._roamController;(i||(i=this._roamController=new bv(n.getZr())),t&&this._isEnabled())?(i.enable(t,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(t,n,i){return e._contentRect.contain(n,i)}}}),i.off("pan").off("zoom").on("pan",tV(this._onPan,this)).on("zoom",tV(this._onZoom,this))):i.disable()},e.prototype._onPan=function(t){var e=this._transThisToTarget;if(this._isEnabled()&&e){var n=ev([],[t.oldX,t.oldY],e),i=ev([],[t.oldX-t.dx,t.oldY-t.dy],e);this._api.dispatchAction(Rg(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},e.prototype._onZoom=function(t){var e=this._transThisToTarget;if(this._isEnabled()&&e){var n=ev([],[t.originX,t.originY],e);this._api.dispatchAction(Rg(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:n[0],originY:n[1]}))}},e.prototype._isEnabled=function(){var t=this._model;return!!t&&!!t.shouldShow()&&!!t.getTarget().baseMapProvider},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(cL);function Rg(t,e){var n={type:"series"===t.mainType?t.subType+"Roam":t.mainType+"Roam"};return n[t.mainType+"Id"]=t.id,tI(n,e),n}function Rm(t,e){var n=py(t);px(e.group,n.z,n.zlevel)}var Ry={label:{enabled:!0},decal:{show:!1}},Rv=oi(),Rx={};function R_(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=tC(Ry);tk(i.label,t.getLocaleModel().get("aria"),!1),tk(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=t9();t.eachSeries(function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Rv(t).scope=n}}),t.eachRawSeries(function(e){if(!t.isSeriesFiltered(e)){if(tH(e.enableAriaDecal))return void e.enableAriaDecal();var n=e.getData();if(e.isColorBySeries()){var i=hK(e.ecModel,e.name,Rx,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",h(r,i))}else{var o=e.getRawData(),a={},s=Rv(e).scope;n.each(function(t){a[n.getRawIndex(t)]=t});var l=o.count();o.each(function(t){var i=a[t],r=o.getName(t)||t+"",u=hK(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",h(c,u))})}}function h(t,e){var n=t?tI(tI({},e),t):e;return n.dirty=!0,n}})}}(),function(){var i,o=e.getZr().dom;if(o){var a=t.getLocaleModel().get("aria"),s=n.getModel("label");if(s.option=tA(s.option,a),s.get("enabled")){if(o.setAttribute("role","img"),s.get("description"))return o.setAttribute("aria-label",s.get("description"));var l,h=t.getSeriesCount(),u=s.get(["data","maxCount"])||10,c=Math.min(h,s.get(["series","maxCount"])||10);if(h<1)return;var d=((l=t.get("title"))&&l.length&&(l=l[0]),l&&l.text);i=d?r(s.get(["general","withTitle"]),{title:d}):s.get(["general","withoutTitle"]);var p=[];i+=r(h>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:h}),t.eachSeries(function(e,n){if(n<c){var i,o,a=void 0,l=e.get("name")?"withName":"withoutName";a=r(a=h>1?s.get(["series","multiple",l]):s.get(["series","single",l]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(i=e.subType,(o=t.getLocaleModel().get(["series","typeNames"]))[i]||o.chart)});var d=e.getData();d.count()>u?a+=r(s.get(["data","partialData"]),{displayCnt:u}):a+=s.get(["data","allData"]);for(var f=s.get(["data","separator","middle"]),g=s.get(["data","separator","end"]),m=s.get(["data","excludeDimensionId"]),y=[],v=0;v<d.count();v++)if(v<u){var x=d.getName(v),_=m?tE(d.getValues(v),function(t,e){return -1===tD(m,e)}):d.getValues(v),b=s.get(["data",x?"withName":"withoutName"]);y.push(r(b,{name:x,value:_.join(f)}))}a+=y.join(f)+g,p.push(a)}});var f=s.getModel(["series","multiple","separator"]),g=f.get("middle"),m=f.get("end");i+=p.join(g)+m,o.setAttribute("aria-label",i)}}}()}function r(t,e){if(!tG(t))return t;var n=t;return tP(e,function(t,e){n=n.replace(RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}}function Rb(t){if(t&&t.aria){var e=t.aria;null!=e.show&&(e.enabled=e.show),e.label=e.label||{},tP(["description","general","series","data"],function(t){null!=e[t]&&(e.label[t]=e[t])})}}var Rw={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},RS=function(){function t(t){null==(this._condVal=tG(t)?new RegExp(t):"[object RegExp]"===tf.call(t)?t:null)&&uC("")}return t.prototype.evaluate=function(t){var e=typeof t;return tG(e)?this._condVal.test(t):!!tj(e)&&this._condVal.test(t+"")},t}(),RM=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),RC=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},t}(),Rk=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},t}(),RT=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),RI=function(){function t(){}return t.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},t}();function RA(t,e){if(!0===t||!1===t){var n,i,r,o,a,s=new RM;return s.value=t,s}if(tY(n=t)&&!tO(n)||uC(""),t.and)return RD("and",t,e);if(t.or)return RD("or",t,e);if(t.not){return i=t,r=e,function(t){return tY(t)&&!tO(t)}(o=i.not)||uC(""),(a=new RT).child=RA(o,r),a.child||uC(""),a}return function(t,e){for(var n=e.prepareGetValue(t),i=[],r=tz(t),o=t.parser,a=o?uG.get(o):null,s=0;s<r.length;s++){var l=r[s];if(!("parser"===l||e.valueGetterAttrMap.get(l))){var h=en(Rw,l)?Rw[l]:l,u=t[l],c=a?a(u):u,d=("eq"===h||"ne"===h?new uX("eq"===h,c):en(uU,h)?new uj(h,c):null)||"reg"===h&&new RS(c);d||uC(""),i.push(d)}}i.length||uC("");var p=new RI;return p.valueGetterParam=n,p.valueParser=a,p.getValue=e.getValue,p.subCondList=i,p}(t,e)}function RD(t,e,n){var i=e[t];tW(i)||uC(""),i.length||uC("");var r="and"===t?new RC:new Rk;return r.children=tR(i,function(t){return RA(t,n)}),r.children.length||uC(""),r}var RL=function(){function t(t,e){this._cond=RA(t,e)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}(),RO={type:"echarts:filter",transform:function(t){for(var e,n=t.upstream,i=new RL(t.config,{valueGetterAttrMap:t9({dimension:!0}),prepareGetValue:function(t){var e=t.dimension;en(t,"dimension")||uC("");var i=n.getDimensionInfo(e);return i||uC(""),{dimIdx:i.index}},getValue:function(t){return n.retrieveValueFromItem(e,t.dimIdx)}}),r=[],o=0,a=n.count();o<a;o++)e=n.getRawDataItem(o),i.evaluate()&&r.push(e);return{data:r}}},RP={type:"echarts:sort",transform:function(t){var e=t.upstream,n=r2(t.config);n.length||uC("");var i=[];tP(n,function(t){var n=t.dimension,r=t.order,o=t.parser,a=t.incomparable;null==n&&uC(""),"asc"!==r&&"desc"!==r&&uC(""),a&&"min"!==a&&"max"!==a&&uC(""),"asc"!==r&&"desc"!==r&&uC("");var s=e.getDimensionInfo(n);s||uC("");var l=o?uG.get(o):null;o&&!l&&uC(""),i.push({dimIdx:s.index,parser:l,comparator:new uY(r,a)})});var r=e.sourceFormat;r!==hR&&r!==hN&&uC("");for(var o=[],a=0,s=e.count();a<s;a++)o.push(e.getRawDataItem(a));return o.sort(function(t,n){for(var r=0;r<i.length;r++){var o=i[r],a=e.retrieveValueFromItem(t,o.dimIdx),s=e.retrieveValueFromItem(n,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var l=o.comparator.evaluate(a,s);if(0!==l)return l}return 0}),{data:o}}},RR=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return to(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new ce(this),cn(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),cn(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:hV},e}(h_),RN=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return to(e,t),e.type="dataset",e}(cL),RE=a_.CMD;function RB(t,e){return 1e-5>Math.abs(t-e)}function Rz(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],h=0,u=0,c=0,d=0;function p(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function f(t,n,i,r){RB(t,i)&&RB(n,r)||e.push(t,n,i,r,i,r)}for(var g=0;g<s;){var m=a[g++],y=1===g;switch(y&&(h=a[g],u=a[g+1],c=h,d=u,(m===RE.L||m===RE.C||m===RE.Q)&&(e=[c,d])),m){case RE.M:h=c=a[g++],u=d=a[g++],p(c,d);break;case RE.L:f(h,u,n=a[g++],i=a[g++]),h=n,u=i;break;case RE.C:e.push(a[g++],a[g++],a[g++],a[g++],h=a[g++],u=a[g++]);break;case RE.Q:n=a[g++],i=a[g++],r=a[g++],o=a[g++],e.push(h+2/3*(n-h),u+2/3*(i-u),r+2/3*(n-r),o+2/3*(i-o),r,o),h=r,u=o;break;case RE.A:var v=a[g++],x=a[g++],_=a[g++],b=a[g++],w=a[g++],S=a[g++]+w;g+=1;var M=!a[g++];n=Math.cos(w)*_+v,i=Math.sin(w)*b+x,y?p(c=n,d=i):f(h,u,n,i),h=Math.cos(S)*_+v,u=Math.sin(S)*b+x;for(var C=(M?-1:1)*Math.PI/2,k=w;M?k>S:k<S;k+=C){var T=M?Math.max(k+C,S):Math.min(k+C,S);!function(t,n,i,r,o,a){var s=4*Math.tan(Math.abs(n-t)/4)/3,l=n<t?-1:1,h=Math.cos(t),u=Math.sin(t),c=Math.cos(n),d=Math.sin(n),p=c*o+i,f=d*a+r,g=o*s*l,m=a*s*l;e.push(h*o+i-g*u,u*a+r+m*h,p+g*d,f-m*c,p,f)}(k,T,v,x,_,b)}break;case RE.R:c=h=a[g++],d=u=a[g++],n=c+a[g++],i=d+a[g++],p(n,d),f(n,d,n,i),f(n,i,c,i),f(c,i,c,d),f(c,d,n,d);break;case RE.Z:e&&f(h,u,c,d),h=c,u=d}}return e&&e.length>2&&l.push(e),l}function RV(t,e,n){var i=Math.ceil(Math.sqrt(Math.abs(t[e]/t[1-e])*n)),r=Math.floor(n/i);0===r&&(r=1,i=n);for(var o=[],a=0;a<i;a++)o.push(r);var s=n-i*r;if(s>0)for(var a=0;a<s;a++)o[a%i]+=1;return o}function RF(t,e,n){for(var i=t.r0,r=t.r,o=t.startAngle,a=Math.abs(t.endAngle-o),s=a*r,l=r-i,h=s>Math.abs(l),u=RV([s,l],+!h,e),c=(h?a:l)/u.length,d=0;d<u.length;d++)for(var p=(h?l:a)/u[d],f=0;f<u[d];f++){var g={};h?(g.startAngle=o+c*d,g.endAngle=o+c*(d+1),g.r0=i+p*f,g.r=i+p*(f+1)):(g.startAngle=o+p*f,g.endAngle=o+p*(f+1),g.r0=i+c*d,g.r=i+c*(d+1)),g.clockwise=t.clockwise,g.cx=t.cx,g.cy=t.cy,n.push(g)}}function RW(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function RH(t){var e=t.points,n=[],i=[];o9(e,n,i);var r=new nu(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,h=new e1,u=new e1;return o>a?(h.x=u.x=s+o/2,h.y=l,u.y=l+a):(h.y=u.y=l+a/2,h.x=s,u.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;o<i;o++){var a=t[o],s=t[(o+1)%i],l=function(t,e,n,i,r,o,a,s){var l=n-t,h=i-e,u=a-r,c=s-o,d=u*h-l*c;if(1e-6>Math.abs(d))return null;var p=((t-r)*c-u*(e-o))/d;return p<0||p>1?null:new e1(p*l+t,p*h+e)}(a[0],a[1],s[0],s[1],e.x,e.y,n.x,n.y);l&&r.push({projPt:function(t,e,n){var i=new e1;e1.sub(i,n,e),i.normalize();var r=new e1;return e1.sub(r,t,e),r.dot(i)}(l,e,n),pt:l,idx:o})}if(r.length<2)return[{points:t},{points:t}];r.sort(function(t,e){return t.projPt-e.projPt});var h=r[0],u=r[r.length-1];if(u.idx<h.idx){var c=h;h=u,u=c}for(var d=[h.pt.x,h.pt.y],p=[u.pt.x,u.pt.y],f=[d],g=[p],o=h.idx+1;o<=u.idx;o++)RW(f,t[o].slice());RW(f,p),RW(f,d);for(var o=u.idx+1;o<=h.idx+i;o++)RW(g,t[o%i].slice());return RW(g,d),RW(g,p),[{points:f},{points:g}]}(e,h,u)}function RG(t,e,n,i){if(1===n)i.push(e);else{var r=Math.floor(n/2),o=t(e);RG(t,o[0],r,i),RG(t,o[1],n-r,i)}return i}function RU(t,e){for(var n=t.length,i=t[n-2],r=t[n-1],o=[],a=0;a<e.length;)o[a++]=i,o[a++]=r;return o}function Rj(t){for(var e=0,n=0,i=0,r=t.length,o=0,a=r-2;o<r;a=o,o+=2){var s=t[a],l=t[a+1],h=t[o],u=t[o+1],c=s*u-h*l;e+=c,n+=(s+h)*c,i+=(l+u)*c}return 0===e?[t[0]||0,t[1]||0]:[n/e/3,i/e/3,e]}function RY(t){return t.__isCombineMorphing}var RX="__mOriginal_";function RZ(t,e,n){var i=RX+e,r=t[i]||t[e];t[i]||(t[i]=t[e]);var o=n.replace,a=n.after,s=n.before;t[e]=function(){var t,e=arguments;return s&&s.apply(this,e),t=o?o.apply(this,e):r.apply(this,e),a&&a.apply(this,e),t}}function Rq(t,e){var n=RX+e;t[n]&&(t[e]=t[n],t[n]=null)}function RK(t,e){for(var n=0;n<t.length;n++)for(var i=t[n],r=0;r<i.length;){var o=i[r],a=i[r+1];i[r++]=e[0]*o+e[2]*a+e[4],i[r++]=e[1]*o+e[3]*a+e[5]}}function R$(t,e){var n=t.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),r=function(t,e){for(var n,i,r,o=[],a=[],s=0;s<Math.max(t.length,e.length);s++){var l=t[s],h=e[s],u=void 0,c=void 0;l?h?(u=(n=function(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=[],o=[],a=n<i?t:e,s=Math.min(n,i),l=Math.abs(i-n)/6,h=Math.ceil(l/((s-2)/6))+1,u=[a[0],a[1]],c=l,d=2;d<s;){var p=a[d-2],f=a[d-1],g=a[d++],m=a[d++],y=a[d++],v=a[d++],x=a[d++],_=a[d++];if(c<=0){u.push(g,m,y,v,x,_);continue}for(var b=Math.min(c,h-1)+1,w=1;w<=b;w++){var S=w/b;nG(p,g,y,x,S,r),nG(f,m,v,_,S,o),p=r[3],f=o[3],u.push(r[1],o[1],r[2],o[2],p,f),g=r[5],m=o[5],y=r[6],v=o[6]}c-=b-1}return a===t?[u,e]:[t,u]}(l,h))[0],c=n[1],i=u,r=c):(c=RU(r||l,l),u=l):(u=RU(i||h,h),c=h),o.push(u),a.push(c)}return[o,a]}(Rz(n),Rz(i)),o=r[0],a=r[1],s=t.getComputedTransform(),l=e.getComputedTransform();s&&RK(o,s),l&&RK(a,l),RZ(e,"updateTransform",{replace:function(){this.transform=null}}),e.transform=null;var h=function(t,e,n){for(var i,r=[],o=0;o<t.length;o++){var a=t[o],s=e[o],l=Rj(a),h=Rj(s);null==i&&(i=l[2]<0!=h[2]<0);var u=[],c=[],d=0,p=1/0,f=[],g=a.length;i&&(a=function(t){for(var e=[],n=t.length,i=0;i<n;i+=2)e[i]=t[n-i-2],e[i+1]=t[n-i-1];return e}(a));for(var m=6*function(t,e,n,i){for(var r=(t.length-2)/6,o=1/0,a=0,s=t.length,l=s-2,h=0;h<r;h++){for(var u=6*h,c=0,d=0;d<s;d+=2){var p=0===d?u:(u+d-2)%l+2,f=t[p]-n[0],g=t[p+1]-n[1],m=e[d]-i[0],y=e[d+1]-i[1],v=m-f,x=y-g;c+=v*v+x*x}c<o&&(o=c,a=h)}return a}(a,s,l,h),y=g-2,v=0;v<y;v+=2){var x=(m+v)%y+2;u[v+2]=a[x]-l[0],u[v+3]=a[x+1]-l[1]}u[0]=a[m]-l[0],u[1]=a[m+1]-l[1];for(var _=n/10,b=-n/2;b<=n/2;b+=_){for(var w=Math.sin(b),S=Math.cos(b),M=0,v=0;v<a.length;v+=2){var C=u[v],k=u[v+1],T=s[v]-h[0],I=s[v+1]-h[1],A=T*S-I*w,D=T*w+I*S;f[v]=A,f[v+1]=D;var L=A-C,O=D-k;M+=L*L+O*O}if(M<p){p=M,d=b;for(var P=0;P<f.length;P++)c[P]=f[P]}}r.push({from:u,to:c,fromCp:l,toCp:h,rotation:-d})}return r}(o,a,Math.PI),u=[];RZ(e,"buildPath",{replace:function(t){for(var n=e.__morphT,i=1-n,r=[],o=0;o<h.length;o++){var a=h[o],s=a.from,l=a.to,c=a.rotation*n,d=a.fromCp,p=a.toCp,f=Math.sin(c),g=Math.cos(c);ey(r,d,p,n);for(var m=0;m<s.length;m+=2){var y=s[m],v=s[m+1],x=l[m],_=l[m+1],b=y*i+x*n,w=v*i+_*n;u[m]=b*g-w*f+r[0],u[m+1]=b*f+w*g+r[1]}var S=u[0],M=u[1];t.moveTo(S,M);for(var m=2;m<s.length;){var x=u[m++],_=u[m++],C=u[m++],k=u[m++],T=u[m++],I=u[m++];S===x&&M===_&&C===T&&k===I?t.lineTo(T,I):t.bezierCurveTo(x,_,C,k,T,I),S=T,M=I}}}})}function RJ(t,e,n){if(!t||!e)return e;var i=n.done,r=n.during;return R$(t,e),e.__morphT=0,e.animateTo({__morphT:1},tA({during:function(t){e.dirtyShape(),r&&r(t)},done:function(){Rq(e,"buildPath"),Rq(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape(),i&&i()}},n)),e}function RQ(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=tR(t,function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]});return tR(o,function(o,a){return{cp:o,z:function(t,e,n,i,r,o){t=r===n?0:Math.round(32767*(t-n)/(r-n)),e=o===i?0:Math.round(32767*(e-i)/(o-i));for(var a,s=0,l=32768;l>0;l/=2){var h=0,u=0;(t&l)>0&&(h=1),(e&l)>0&&(u=1),s+=l*l*(3*h^u),0===u&&(1===h&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}(o[0],o[1],e,n,i,r),path:t[a]}}).sort(function(t,e){return t.z-e.z}).map(function(t){return t.path})}function R0(t){return function(t,e){var n,i=[],r=t.shape;switch(t.type){case"rect":!function(t,e,n){for(var i=t.width,r=t.height,o=i>r,a=RV([i,r],+!o,e),s=o?"width":"height",l=o?"height":"width",h=o?"x":"y",u=o?"y":"x",c=t[s]/a.length,d=0;d<a.length;d++)for(var p=t[l]/a[d],f=0;f<a[d];f++){var g={};g[h]=d*c,g[u]=f*p,g[s]=c,g[l]=p,g.x+=t.x,g.y+=t.y,n.push(g)}}(r,e,i),n=aq;break;case"sector":RF(r,e,i),n=dl;break;case"circle":RF({r0:0,r:r.r,startAngle:0,endAngle:2*Math.PI,cx:r.cx,cy:r.cy},e,i),n=dl;break;default:var o=t.getComputedTransform(),a=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=tR(function(t,e){var n=Rz(t),i=[];e=e||1;for(var r=0;r<n.length;r++){var o=n[r],a=[],s=o[0],l=o[1];a.push(s,l);for(var h=2;h<o.length;){var u=o[h++],c=o[h++],d=o[h++],p=o[h++],f=o[h++],g=o[h++];!function t(e,n,i,r,o,a,s,l,h,u){if(RB(e,i)&&RB(n,r)&&RB(o,s)&&RB(a,l))return void h.push(s,l);var c=2/u,d=c*c,p=s-e,f=l-n,g=Math.sqrt(p*p+f*f);p/=g,f/=g;var m=i-e,y=r-n,v=o-s,x=a-l,_=m*m+y*y,b=v*v+x*x;if(_<d&&b<d)return void h.push(s,l);var w=p*m+f*y,S=-p*v-f*x;if(_-w*w<d&&w>=0&&b-S*S<d&&S>=0)return void h.push(s,l);var M=[],C=[];nG(e,i,o,s,.5,M),nG(n,r,a,l,.5,C),t(M[0],C[0],M[1],C[1],M[2],C[2],M[3],C[3],h,u),t(M[4],C[4],M[5],C[5],M[6],C[6],M[7],C[7],h,u)}(s,l,u,c,d,p,f,g,a,e),s=f,l=g}i.push(a)}return i}(t.getUpdatedPathProxy(),a),function(t){for(var e=[],n=0;n<t.length;)e.push([t[n++],t[n++]]);return e}),l=s.length;if(0===l)RG(RH,{points:s[0]},e,i);else if(l===e)for(var h=0;h<l;h++)i.push({points:s[h]});else{var u=0,c=tR(s,function(t){var e=[],n=[];o9(t,e,n);var i=(n[1]-e[1])*(n[0]-e[0]);return u+=i,{poly:t,area:i}});c.sort(function(t,e){return e.area-t.area});for(var d=e,h=0;h<l;h++){var p=c[h];if(d<=0)break;var f=h===l-1?d:Math.ceil(p.area/u*e);f<0||(RG(RH,{points:p.poly},f,i),d-=f)}}n=dg}if(!n){for(var g=[],m=0;m<e;m++)g.push(c$(t));return g}for(var y=[],h=0;h<i.length;h++){var v=new n;v.setShape(i[h]),v.setStyle(t.style),v.z=t.z,v.z2=t.z2,v.zlevel=t.zlevel,y.push(v)}return y}(t.path,t.count)}function R1(){return{fromIndividuals:[],toIndividuals:[],count:0}}function R2(t,e){for(var n=[],i=t.length,r=0;r<i;r++)n.push({one:t[r],many:[]});for(var r=0;r<e.length;r++){var o=e[r].length,a=void 0;for(a=0;a<o;a++)n[a%i].many.push(e[r][a])}for(var s=0,r=i-1;r>=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1)if(!s)return n;else s=0;var o=l.length,h=Math.ceil(o/2);n[r].many=l.slice(h,o),n[s].many=l.slice(0,h),s++}return n}var R5={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i<t.count;i++){var r=c$(t.path);r.setStyle("opacity",n),e.push(r)}return e},split:null};function R3(t,e,n,i,r,o){if(t.length&&e.length){var a,s,l=sK("update",i,r);if(l&&l.duration>0){var h=i.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},l);tW(t[0])&&(a=t,s=e),tW(e[0])&&(a=e,s=t);for(var c=a?a===t:t.length>e.length,d=a?R2(s,a):R2(c?e:t,[c?t:e]),p=0,f=0;f<d.length;f++)p+=d[f].many.length;for(var g=0,f=0;f<d.length;f++)(function t(e,i,r,a,s){var l=e.many,c=e.one;if(1!==l.length||s)for(var d=tA({dividePath:R5[n],individualDelay:h&&function(t,e,n,i){return h(t+r,a)}},u),p=i?function(t,e,n){var i=[];!function t(e){for(var n=0;n<e.length;n++){var r=e[n];RY(r)?t(r.childrenRef()):r instanceof aN&&i.push(r)}}(t);var r=i.length;if(!r)return R1();var o=(n.dividePath||R0)({path:e,count:r});if(o.length!==r)return console.error("Invalid morphing: unmatched splitted path"),R1();i=RQ(i),o=RQ(o);for(var a=n.done,s=n.during,l=n.individualDelay,h=new ri,u=0;u<r;u++){var c=i[u],d=o[u];d.parent=e,d.copyTransform(h),l||R$(c,d)}function p(t){for(var e=0;e<o.length;e++)o[e].addSelfToZr(t)}function f(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Rq(e,"addSelfToZr"),Rq(e,"removeSelfFromZr")}e.__isCombineMorphing=!0,e.childrenRef=function(){return o},RZ(e,"addSelfToZr",{after:function(t){p(t)}}),RZ(e,"removeSelfFromZr",{after:function(t){for(var e=0;e<o.length;e++)o[e].removeSelfFromZr(t)}});var g=o.length;if(l)for(var m=g,y=function(){0==--m&&(f(),a&&a())},u=0;u<g;u++){var v=l?tA({delay:(n.delay||0)+l(u,g,i[u],o[u]),done:y},n):n;RJ(i[u],o[u],v)}else e.__morphT=0,e.animateTo({__morphT:1},tA({during:function(t){for(var n=0;n<g;n++){var i=o[n];i.__morphT=e.__morphT,i.dirtyShape()}s&&s(t)},done:function(){f();for(var e=0;e<t.length;e++)Rq(t[e],"updateTransform");a&&a()}},n));return e.__zr&&p(e.__zr),{fromIndividuals:i,toIndividuals:o,count:g}}(l,c,d):function(t,e,n){var i=e.length,r=[],o=n.dividePath||R0;if(RY(t)){!function t(e){for(var n=0;n<e.length;n++){var i=e[n];RY(i)?t(i.childrenRef()):i instanceof aN&&r.push(i)}}(t.childrenRef());var a=r.length;if(a<i)for(var s=0,l=a;l<i;l++)r.push(c$(r[s++%a]));r.length=i}else{r=o({path:t,count:i});for(var h=t.getComputedTransform(),l=0;l<r.length;l++)r[l].setLocalTransform(h);if(r.length!==i)return console.error("Invalid morphing: unmatched splitted path"),R1()}r=RQ(r),e=RQ(e);for(var u=n.individualDelay,l=0;l<i;l++){var c=u?tA({delay:(n.delay||0)+u(l,i,r[l],e[l])},n):n;RJ(r[l],e[l],c)}return{fromIndividuals:r,toIndividuals:e,count:e.length}}(c,l,d),f=p.fromIndividuals,g=p.toIndividuals,m=f.length,y=0;y<m;y++){var v=h?tA({delay:h(y,m)},u):u;o(f[y],g[y],i?l[y]:e.one,i?e.one:l[y],v)}else{var x=i?l[0]:c,_=i?c:l[0];if(RY(x))t({many:[x],one:_},!0,r,a,!0);else{var v=h?tA({delay:h(r,a)},u):u;RJ(x,_,v),o(x,_,x,_,v)}}})(d[f],c,g,p),g+=d[f].many.length}}}function R4(t){if(!t)return[];if(tW(t)){for(var e=[],n=0;n<t.length;n++)e.push(R4(t[n]));return e}var i=[];return t.traverse(function(t){t instanceof aN&&!t.disableMorphing&&!t.invisible&&!t.ignore&&i.push(t)}),i}var R8=oi();function R6(t,e,n,i){var r=function(t,e){for(var n=t.dimensions,i=0;i<n.length;i++){var r=t.getDimensionInfo(n[i]);if(r&&0===r.otherDims[e])return n[i]}}(t,i?"itemChildGroupId":"itemGroupId");if(r){var o=t,a=e,s=r,l=o.getDimensionInfo(s),h=l&&l.ordinalMeta;if(l){var u=o.get(l.name,a);return h&&h.categories[u]||u+""}return}var c=t.getRawDataItem(e),d=i?"childGroupId":"groupId";return c&&c[d]?c[d]+"":i?void 0:n||t.getId(e)}function R9(t){var e=[];return tP(t,function(t){var n=t.data,i=t.dataGroupId;if(!(n.count()>1e4))for(var r=n.getIndices(),o=0;o<r.length;o++)e.push({data:n,groupId:R6(n,o,i,!1),childGroupId:R6(n,o,i,!0),divide:t.divide,dataIndex:o})}),e}function R7(t,e,n){t.traverse(function(t){t instanceof aN&&sQ(t,{style:{opacity:0}},e,{dataIndex:n,isFrom:!0})})}function Nt(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Ne(t){t.stopAnimation(),t.isGroup&&t.traverse(function(t){t.stopAnimation()})}function Nn(t,e,n){var i=R9(t),r=R9(e);function o(t,e,n,i,r){(n||t)&&e.animateFrom({style:n&&n!==t?tI(tI({},n.style),t.style):t.style},r)}var a=!1,s=0,l=t9(),h=t9();i.forEach(function(t){t.groupId&&l.set(t.groupId,!0),t.childGroupId&&h.set(t.childGroupId,!0)});for(var u=0;u<r.length;u++){var c=r[u].groupId;if(h.get(c)){s=1;break}var d=r[u].childGroupId;if(d&&l.get(d)){s=2;break}}function p(t,e){return function(n){var i=n.data,r=n.dataIndex;return e?i.getId(r):t?1===s?n.childGroupId:n.groupId:2===s?n.childGroupId:n.groupId}}var f=function(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++){var r=t[i],o=e[i];if(r.data.getId(r.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}(i,r),g={};if(!f)for(var u=0;u<r.length;u++){var m=r[u],y=m.data.getItemGraphicEl(m.dataIndex);y&&(g[y.id]=!0)}function v(t,e){var n,s=i[e],l=r[t],h=l.data.hostModel,u=s.data.getItemGraphicEl(s.dataIndex),c=l.data.getItemGraphicEl(l.dataIndex);if(u===c){c&&(n=sK("update",h,l.dataIndex))&&c.traverse(function(t){if(t instanceof o$){var e=sq(t).oldStyle;e&&t.animateFrom({style:e},n)}});return}u&&g[u.id]||c&&(Ne(c),u?(Ne(u),Nt(u),a=!0,R3(R4(u),R4(c),l.divide,h,t,o)):R7(c,h,t))}new m4(i,r,p(!0,f),p(!1,f),null,"multiple").update(v).updateManyToOne(function(t,e){var n=r[t],s=n.data,l=s.hostModel,h=s.getItemGraphicEl(n.dataIndex),u=tE(tR(e,function(t){return i[t].data.getItemGraphicEl(i[t].dataIndex)}),function(t){return t&&t!==h&&!g[t.id]});h&&(Ne(h),u.length?(tP(u,function(t){Ne(t),Nt(t)}),a=!0,R3(R4(u),R4(h),n.divide,l,t,o)):R7(h,l,n.dataIndex))}).updateOneToMany(function(t,e){var n=i[e],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!g[s.id]){var l=tE(tR(t,function(t){return r[t].data.getItemGraphicEl(r[t].dataIndex)}),function(t){return t&&t!==s}),h=r[t[0]].data.hostModel;l.length&&(tP(l,function(t){return Ne(t)}),s?(Ne(s),Nt(s),a=!0,R3(R4(s),R4(l),n.divide,h,t[0],o)):tP(l,function(e){return R7(e,h,t[0])}))}}).updateManyToMany(function(t,e){new m4(e,t,function(t){return i[t].data.getId(i[t].dataIndex)},function(t){return r[t].data.getId(r[t].dataIndex)}).update(function(n,i){v(t[n],e[i])}).execute()}).execute(),a&&tP(e,function(t){var e=t.data.hostModel,i=e&&n.getViewOfSeriesModel(e),r=sK("update",e,0);i&&e.isAnimationEnabled()&&r&&r.duration>0&&i.group.traverse(function(t){t instanceof aN&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)})})}function Ni(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Nr(t){return tW(t)?t.sort().join(","):t}function No(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function Na(t,e){for(var n=0;n<t.length;n++)if(null!=e.seriesIndex&&e.seriesIndex===t[n].seriesIndex||null!=e.seriesId&&e.seriesId===t[n].id)return n}var Ns=function(){function t(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return t.prototype.setBreaks=function(t){this.breaks=t.breaks},t.prototype.update=function(t){e=this,n=t,i=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},a={S:{tpAbs:(o=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}})(),tpPrct:o()},E:{tpAbs:o(),tpPrct:o()}},tP(e.breaks,function(t){var e=t.gapParsed;"tpPrct"===e.type&&(i+=e.val);var o=Np(t,n);if(o){var s=o.vmin!==t.vmin,l=o.vmax!==t.vmax,h=o.vmax-o.vmin;if(s&&l);else if(s||l){var u=s?"S":"E";a[u][e.type].has=!0,a[u][e.type].span=h,a[u][e.type].inExtFrac=h/(t.vmax-t.vmin),a[u][e.type].val=e.val}else r[e.type].span+=h,r[e.type].val+=e.val}}),s=i*(0+(n[1]-n[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0)),tP(e.breaks,function(t){var e=t.gapParsed;"tpPrct"===e.type&&(t.gapReal=0!==i?Math.max(s,0)*e.val/i:0),"tpAbs"===e.type&&(t.gapReal=e.val),null==t.gapReal&&(t.gapReal=0)});var e,n,i,r,o,a,s,l=this._elapsedExtent;l[0]=this.elapse(t[0]),l[1]=this.elapse(t[1])},t.prototype.hasBreaks=function(){return!!this.breaks.length},t.prototype.calcNiceTickMultiple=function(t,e){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<t&&t<i.vmax)return e(t,i.vmax)}return 0},t.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},t.prototype.normalize=function(t){var e=this._elapsedExtent[1]-this._elapsedExtent[0];return 0===e?.5:(this.elapse(t)-this._elapsedExtent[0])/e},t.prototype.scale=function(t){return this.unelapse(t*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},t.prototype.elapse=function(t){for(var e=Nh,n=Nu,i=!0,r=0;r<this.breaks.length;r++){var o=this.breaks[r];if(t<=o.vmax){t>o.vmin?e+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:e+=t-n,n=o.vmax,i=!1;break}e+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(e+=t-n),e},t.prototype.unelapse=function(t){for(var e=Nh,n=Nu,i=!0,r=0,o=0;o<this.breaks.length;o++){var a=this.breaks[o],s=e+a.vmin-n,l=s+a.gapReal;if(t<=l){r=t>s?a.vmin+(t-s)/(l-s)*(a.vmax-a.vmin):n+t-e,n=a.vmax,i=!1;break}e=l,n=a.vmax}return i&&(r=n+t-e),r},t}();function Nl(){return new Ns}var Nh=0,Nu=0;function Nc(t,e,n,i,r,o){"no"!==t&&tP(n,function(n){var a=Np(n,o);if(a)for(var s=e.length-1;s>=0;s--){var l=i(e[s]),h=3*r/4;l>a.vmin-h&&l<a.vmax+h&&("preserve_extent_bound"!==t||l!==o[0]&&l!==o[1])&&e.splice(s,1)}})}function Nd(t,e,n,i){tP(e,function(e){var r=Np(e,n);r&&(t.push({value:r.vmin,break:{type:"vmin",parsedBreak:r},time:i?i(r):void 0}),t.push({value:r.vmax,break:{type:"vmax",parsedBreak:r},time:i?i(r):void 0}))}),e.length&&t.sort(function(t,e){return t.value-e.value})}function Np(t,e){var n=Math.max(t.vmin,e[0]),i=Math.min(t.vmax,e[1]);return n<i||n===i&&n>e[0]&&n<e[1]?{vmin:n,vmax:i,breakOption:t.breakOption,gapParsed:t.gapParsed,gapReal:t.gapReal}:null}function Nf(t,e,n){var i=[];if(!t)return{breaks:i};tP(t,function(t){if(t&&null!=t.start&&null!=t.end&&!t.isExpanded){var r={breakOption:tC(t),vmin:e(t.start),vmax:e(t.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(null!=t.gap){var o=!1;if(tG(t.gap)){var a=t5(t.gap);if(a.match(/%$/)){var s,l=parseFloat(a)/100;(s=l)>=0&&s<1-1e-5||(l=0),r.gapParsed.type="tpPrct",r.gapParsed.val=l,o=!0}}if(!o){var h=e(t.gap);(!isFinite(h)||h<0)&&(h=0),r.gapParsed.type="tpAbs",r.gapParsed.val=h}}if(r.vmin===r.vmax&&(r.gapParsed.type="tpAbs",r.gapParsed.val=0),n&&n.noNegative&&tP(["vmin","vmax"],function(t){r[t]<0&&(r[t]=0)}),r.vmin>r.vmax){var u=r.vmax;r.vmax=r.vmin,r.vmin=u}i.push(r)}}),i.sort(function(t,e){return t.vmin-e.vmin});var r=-1/0;return tP(i,function(t,e){r>t.vmin&&(i[e]=null),r=t.vmax}),{breaks:i.filter(function(t){return!!t})}}function Ng(t,e){return Nm(e)===Nm(t)}function Nm(t){return t.start+"_\0_"+t.end}function Ny(t,e,n){var i=[];tP(t,function(t,n){var r=e(t);r&&"vmin"===r.type&&i.push([n])}),tP(t,function(n,r){var o=e(n);if(o&&"vmax"===o.type){var a=tB(i,function(n){return Ng(e(t[n[0]]).parsedBreak.breakOption,o.parsedBreak.breakOption)});a&&a.push(r)}});var r=[];return tP(i,function(e){2===e.length&&r.push(n?e:[t[e[0]],t[e[1]]])}),r}function Nv(t,e,n,i){if(t.break){var r,o,a=t.break.parsedBreak,s=tB(n,function(e){return Ng(e.breakOption,t.break.parsedBreak.breakOption)}),l=i(Math.pow(e,a.vmin),s.vmin),h=i(Math.pow(e,a.vmax),s.vmax),u={type:a.gapParsed.type,val:"tpAbs"===a.gapParsed.type?rz(Math.pow(e,a.vmin+a.gapParsed.val))-l:a.gapParsed.val};r={type:t.break.type,parsedBreak:{breakOption:a.breakOption,vmin:l,vmax:h,gapParsed:u,gapReal:a.gapReal}},o=s[t.break.type]}return{brkRoundingCriterion:o,vBreak:r}}function Nx(t,e,n){var i={noNegative:!0},r=Nf(t,n,i),o=Nf(t,n,i),a=Math.log(e);return o.breaks=tR(o.breaks,function(t){var e=Math.log(t.vmin)/a,n=Math.log(t.vmax)/a,i={type:t.gapParsed.type,val:"tpAbs"===t.gapParsed.type?Math.log(t.vmin+t.gapParsed.val)/a-e:t.gapParsed.val};return{vmin:e,vmax:n,gapParsed:i,gapReal:t.gapReal,breakOption:t.breakOption}}),{parsedOriginal:r,parsedLogged:o}}var N_={vmin:"start",vmax:"end"};function Nb(t,e){return e&&((t=t||{}).break={type:N_[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}var Nw=oi();function NS(t,e,n,i,r){var o=n.axis;if(!o.scale.isBlank()&&lA){var a=lA.retrieveAxisBreakPairs(o.scale.getTicks({breakTicks:"only_break"}),function(t){return t.break},!1);if(a.length){var s=n.getModel("breakArea"),l=s.get("zigzagAmplitude"),h=s.get("zigzagMinSpan"),u=s.get("zigzagMaxSpan");u=Math.max(h=Math.max(2,h||0),u||0);var c=s.get("expandOnClick"),d=s.get("zigzagZ"),p=s.getModel("itemStyle").getItemStyle(),f=p.stroke,g=p.lineWidth,m=p.lineDash,y=p.fill,v=new rT({ignoreModelZ:!0}),x=o.isHorizontal(),_=Nw(e).visualList||(Nw(e).visualList=[]);tP(_,function(t){return t.shouldRemove=!0});for(var b=0;b<a.length;b++)!function(t){var e,s=a[t][0].break.parsedBreak,b=[];b[0]=o.toGlobalCoord(o.dataToCoord(s.vmin,!0)),b[1]=o.toGlobalCoord(o.dataToCoord(s.vmax,!0)),b[1]<b[0]&&b.reverse();var w=((e=tB(_,function(t){return lA.identifyAxisBreak(t.parsedBreak.breakOption,s.breakOption)}))||_.push(e={zigzagRandomList:[],parsedBreak:s,shouldRemove:!1}),e);w.shouldRemove=!1;var S=new rT;(function(t,e,n,r,o,a){var s={stroke:f,lineWidth:g,lineDash:m,fill:"none"},c=+!o,v=1-c,x=i[dX[v]]+i[dZ[v]];function _(t){var e=[],n=[];e[c]=n[c]=t,e[v]=i[dX[v]],n[v]=x;var r={x1:e[0],y1:e[1],x2:n[0],y2:n[1]};return aG(r,r,{lineWidth:1}),e[0]=r.x1,e[1]=r.y1,e[c]}n=_(n),r=_(r);for(var b=[],w=[],S=!0,M=i[dX[v]],C=0;;C++){var k=M===i[dX[v]],T=M>=x;T&&(M=x);var I=[],A=[];I[c]=n,A[c]=r,k||T||(I[c]+=S?-l:l,A[c]-=S?l:-l),I[v]=M,A[v]=M,b.push(I),w.push(A);var D=void 0;if(C<t.length?D=t[C]:(D=Math.random(),t.push(D)),M+=D*(u-h)+h,S=!S,T)break}var L=lA.serializeAxisBreakIdentifier(a.breakOption);if(e.add(new dv({anid:"break_a_"+L,shape:{points:b},style:s,z:d})),0!==a.gapReal){e.add(new dv({anid:"break_b_"+L,shape:{points:w},style:s,z:d}));var O=w.slice();O.reverse();var P=b.concat(O);e.add(new dg({anid:"break_c_"+L,shape:{points:P},style:{fill:y,opacity:p.opacity},z:d}))}})(w.zigzagRandomList,S,b[0],b[1],x,s),c&&S.on("click",function(){var t={type:_n,breaks:[{start:s.breakOption.start,end:s.breakOption.end}]};t[o.dim+"AxisIndex"]=n.componentIndex,r.dispatchAction(t)}),S.silent=!c,v.add(S)}(b);t.add(v);for(var w=_.length-1;w>=0;w--)_[w].shouldRemove&&_.splice(w,1)}}}function NM(t,e,n,i){var r=t.axis,o=n.transform;t2(i.style);var a=r.getExtent();r.inverse&&(a=a.slice()).reverse();var s=tR(lA.retrieveAxisBreakPairs(r.scale.getTicks({breakTicks:"only_break"}),function(t){return t.break},!1),function(t){var e=t[0].break.parsedBreak,n=[r.dataToCoord(e.vmin,!0),r.dataToCoord(e.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:lA.serializeAxisBreakIdentifier(e.breakOption)}});s.sort(function(t,e){return t.coordPair[0]-e.coordPair[0]});for(var l=a[0],h=null,u=0;u<s.length;u++){var c=s[u],d=Math.max(c.coordPair[0],a[0]),p=Math.min(c.coordPair[1],a[1]);l<=d&&f(l,d,h,c),l=p,h=c}function f(t,n,r,a){function s(t,e){o&&(ev(t,t,o),ev(e,e,o))}function l(t,e){var n={x1:t[0],y1:t[1],x2:e[0],y2:e[1]};aG(n,n,i.style),t[0]=n.x1,t[1]=n.y1,e[0]=n.x2,e[1]=n.y2}var h=[t,0],u=[n,0],c=[t,5],d=[n,5];s(h,c),l(h,c),s(u,d),l(u,d),l(h,u);var p=new dw(tI({shape:{x1:h[0],y1:h[1],x2:u[0],y2:u[1]}},i));e.add(p),p.anid="breakLine_"+(r?r.brkId:"\0")+"_\0_"+(a?a.brkId:"\0")}l<=a[1]&&f(l,a[1],h,null)}function NC(t,e,n){if(!tB(n,function(t){return!t})){var i=new e1;if(g$(n[0],n[1],i,{direction:-(t?e+Math.PI:e),touchThreshold:0,bidirectional:!1})){var r=eX();eJ(r,r,-e);var o=tR(n,function(t){return t.transform?eK(eX(),r,t.transform):r}),a=.5;if(g(0)||g(1)){var s=tR(n,function(t,e){var n=t.localRect.clone();return n.applyTransform(o[e]),n}),l=new e1;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(r);var h=i.clone().transform(r),u=(s[0].x+s[1].x+(h.x>=0?s[0].width:s[1].width)+h.x)/2-l.x,c=Math.min(u,u-h.x),d=Math.max(u,u-h.x);a=(u-(d<0?d:c>0?c:0))/h.x}var p=new e1,f=new e1;e1.scale(p,i,-a),e1.scale(f,i,1-a),gY(n[0],p),gY(n[1],f)}}function g(t){var e=n[0].localRect;return 1e-5>Math.abs(new e1(e[dZ[t]]*o[0][0],e[dZ[t]]*o[0][1]).y)}}function Nk(t,e){var n={breaks:[]};return tP(e.breaks,function(i){if(i){var r=tB(t.get("breaks",!0),function(t){return lA.identifyAxisBreak(t,i)});if(r){var o=e.type,a={isExpanded:!!r.isExpanded};r.isExpanded=o===_n||o!==_i&&(o===_r?!r.isExpanded:r.isExpanded),n.breaks.push({start:r.start,end:r.end,isExpanded:!!r.isExpanded,old:a})}}}),n}function NT(t,e){tP(t,function(t){if(!t.model.get(["axisLabel","inside"])){var n=function(t){var e,n,i,r=t.model,o=t.scale;if(!(!r.get(["axisLabel","show"])||o.isBlank())){var a=o.getExtent();n=o instanceof xg?o.count():(e=o.getTicks()).length;var s=t.getLabelModel(),l=xE(t),h=1;n>40&&(h=Math.ceil(n/40));for(var u=0;u<n;u+=h){var c=l(e?e[u]:{value:a[0]+u},u),d=function(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new nu(t.x,t.y,o,a)}(s.getTextRect(c),s.get("rotate")||0);i?i.union(d):i=d}return i}}(t);if(n){var i=t.isHorizontal()?"height":"width",r=t.model.get(["axisLabel","margin"]);e[i]-=n[i]+r,"top"===t.position?e.y+=n.height+r:"left"===t.position&&(e.x+=n.width+r)}}})}g_([function(t){t.registerPainter("canvas",g7)}]),g_([function(t){t.registerPainter("svg",m1)}]),g_([function(t){t.registerChartView(yJ),t.registerSeriesModel(yv),t.registerLayout(yQ("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,y2("line"))},function(t){t.registerChartView(vd),t.registerSeriesModel(vr),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,tF(y7,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,vt("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,y2("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)})})},function(t){t.registerChartView(vW),t.registerSeriesModel(vj),fe("pie",t.registerAction),t.registerLayout(tF(vD,"pie")),t.registerProcessor(vO("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf(function(t){var e=n.mapDimension("value"),i=n.get(e,t);return!tj(i)||!!isNaN(i)||!(i<0)})}})},function(t){g_(_6),t.registerSeriesModel(vY),t.registerChartView(vK),t.registerLayout(yQ("scatter"))},function(t){g_(bf),t.registerChartView(ba),t.registerSeriesModel(bs),t.registerLayout(bi),t.registerProcessor(vO("radar")),t.registerPreprocessor(bo)},function(t){g_(wX),t.registerChartView(wO),t.registerSeriesModel(wP),t.registerLayout(wN),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,wR),fe("map",t.registerAction)},function(t){t.registerChartView(w5),t.registerSeriesModel(Sg),t.registerLayout(Sy),t.registerVisual(Sv),t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=t.dataIndex,i=e.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=bD(e.coordinateSystem,t,e.get("scaleLimit"));e.setCenter(n.center),e.setZoom(n.zoom)})})},function(t){t.registerSeriesModel(Sb),t.registerChartView(SA),t.registerVisual(SG),t.registerLayout(SQ);for(var e=0;e<Sx.length;e++)t.registerAction({type:Sx[e],update:"updateView"},ei);t.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},function(e,n){var i=Sc(t,["treemapZoomToNode","treemapRootToNode"],e);if(i){var r=e.getViewRoot();r&&(t.direction=Sp(r,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}})})},function(t){t.registerChartView(MF),t.registerSeriesModel(MX),t.registerProcessor(S2),t.registerVisual(S5),t.registerVisual(S4),t.registerLayout(Mo),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Mp),t.registerLayout(Mf),t.registerCoordinateSystem("graphView",{dimensions:wE.dimensions,create:Mg}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ei),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ei),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",query:t},function(e){var i=n.getViewOfSeriesModel(e);i&&(null!=t.dx&&null!=t.dy&&i.updateViewOnPan(e,n,t),null!=t.zoom&&null!=t.originX&&null!=t.originY&&i.updateViewOnZoom(e,n,t));var r=bD(e.coordinateSystem,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom)})})},function(t){t.registerChartView(MJ),t.registerSeriesModel(MQ),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,M1),t.registerProcessor(vO("chord"))},function(t){t.registerChartView(M4),t.registerSeriesModel(M8)},function(t){t.registerChartView(M7),t.registerSeriesModel(Ct),t.registerLayout(Ce),t.registerProcessor(vO("funnel"))},function(t){g_(kc),t.registerChartView(Cn),t.registerSeriesModel(Cs),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Cu)},function(t){t.registerChartView(kf),t.registerSeriesModel(km),t.registerLayout(ky),t.registerVisual(kT),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){var n=bD(e.coordinateSystem,t,e.get("scaleLimit"));e.setCenter(n.center),e.setZoom(n.zoom)})})},function(t){t.registerSeriesModel(kA),t.registerChartView(kD),t.registerLayout(kN),t.registerTransform(kE)},function(t){t.registerChartView(kY),t.registerSeriesModel(k2),t.registerPreprocessor(k5),t.registerVisual(kU),t.registerLayout(k3)},function(t){t.registerChartView(k9),t.registerSeriesModel(k7),t.registerLayout(yQ("effectScatter"))},function(t){t.registerChartView(Ts),t.registerSeriesModel(Tc),t.registerLayout(Ta),t.registerVisual(Tp)},function(t){t.registerChartView(Tm),t.registerSeriesModel(Ty)},function(t){t.registerChartView(Tb),t.registerSeriesModel(TV),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,tF(y7,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,vt("pictorialBar"))},function(t){t.registerChartView(TF),t.registerSeriesModel(TW),t.registerLayout(TH),t.registerProcessor(vO("themeRiver"))},function(t){t.registerChartView(TX),t.registerSeriesModel(TZ),t.registerLayout(tF(TK,"sunburst")),t.registerProcessor(tF(vO,"sunburst")),t.registerVisual(T$),t.registerAction({type:Tj,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,n){var i=Sc(t,[Tj],e);if(i){var r=e.getViewRoot();r&&(t.direction=Sp(r,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}})}),t.registerAction({type:TY,update:"none"},function(t,e,n){t=tI({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e){var n=Sc(t,[TY],e);n&&(t.dataIndex=n.node.dataIndex)}),n.dispatchAction(tI(t,{type:"highlight"}))}),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(t,e,n){t=tI({},t),n.dispatchAction(tI(t,{type:"downplay"}))})},function(t){t.registerChartView(IL),t.registerSeriesModel(T1)}]),g_(function(t){g_(_6),g_(Ag)}),g_(function(t){g_(Ag),_K.registerAxisPointerClass("PolarAxisPointer",Am),t.registerCoordinateSystem("polar",AD),t.registerComponentModel(Av),t.registerComponentView(Aj),xi(t,"angle",A_,AG),xi(t,"radius",Ab,AU),t.registerComponentView(AN),t.registerComponentView(Az),t.registerLayout(tF(AH,"bar"))}),g_(wX),g_(function(t){g_(Ag),_K.registerAxisPointerClass("SingleAxisPointer",A3),t.registerComponentView(A9),t.registerComponentView(AZ),t.registerComponentModel(AK),xi(t,"single",AK,AK.defaultOption),t.registerCoordinateSystem("single",A1)}),g_(kc),g_(function(t){t.registerComponentModel(A7),t.registerComponentView(De),t.registerCoordinateSystem("calendar",Dn)}),g_(function(t){t.registerComponentModel(DC),t.registerComponentView(DD),t.registerCoordinateSystem("matrix",Dz)}),g_(function(t){t.registerComponentModel(D3),t.registerComponentView(D6),t.registerPreprocessor(function(t){var e=t.graphic;tW(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}),g_(function(t){t.registerComponentModel(Lx),t.registerComponentView(Lb),Lv.saveAsImage=Lw,Lv.magicType=LC,Lv.dataView=LD,Lv.dataZoom=LX,Lv.restore=LP,g_(Lm)}),g_(function(t){g_(Ag),t.registerComponentModel(LK),t.registerComponentView(On),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ei),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ei)}),g_(Ag),g_(function(t){t.registerComponentView(OS),t.registerComponentModel(OM),t.registerPreprocessor(Os),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Ov),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ei),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ei),Lv.brush=OT}),g_(function(t){t.registerComponentModel(OI),t.registerComponentView(OA)}),g_(function(t){t.registerComponentModel(OL),t.registerComponentView(OE),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,n){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),tA({currentIndex:i.option.currentIndex},t)}),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)}),t.registerPreprocessor(OV)}),g_(function(t){t.registerComponentModel(OY),t.registerComponentView(O3),t.registerPreprocessor(function(t){OH(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}),g_(function(t){t.registerComponentModel(O4),t.registerComponentView(Pn),t.registerPreprocessor(function(t){OH(t.series,"markLine")&&(t.markLine=t.markLine||{})})}),g_(function(t){t.registerComponentModel(Pi),t.registerComponentView(Pc),t.registerPreprocessor(function(t){OH(t.series,"markArea")&&(t.markArea=t.markArea||{})})}),g_(function(t){g_(Pb),g_(PT)}),g_(function(t){g_(PB),g_(PU)}),g_(PB),g_(PU),g_(function(t){g_(Ra),g_(Rc)}),g_(Ra),g_(Rc),g_(function(t){t.registerComponentModel(Rp),t.registerComponentView(Rf)}),g_(function(t){t.registerPreprocessor(Rb),t.registerVisual(t.PRIORITY.VISUAL.ARIA,R_)}),g_(function(t){t.registerTransform(RO),t.registerTransform(RP)}),g_(function(t){t.registerComponentModel(RR),t.registerComponentView(RN)}),g_(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){tP(r2(n.seriesTransition),function(t){tP(r2(t.to),function(t){for(var e=n.updatedSeries,i=0;i<e.length;i++)(null!=t.seriesIndex&&t.seriesIndex===e[i].seriesIndex||null!=t.seriesId&&t.seriesId===e[i].id)&&(e[i][cw]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(t,e,n){var i=R8(e);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var r=n.seriesTransition;if(r)tP(r2(r),function(t){var r,o;r=[],o=[],tP(r2(t.from),function(t){var e=Na(i.oldSeries,t);e>=0&&r.push({dataGroupId:i.oldDataGroupIds[e],data:i.oldData[e],divide:No(i.oldData[e]),groupIdDim:t.dimension})}),tP(r2(t.to),function(t){var e=Na(n.updatedSeries,t);if(e>=0){var r=n.updatedSeries[e].getData();o.push({dataGroupId:i.oldDataGroupIds[e],data:r,divide:No(r),groupIdDim:t.dimension})}}),r.length>0&&o.length>0&&Nn(r,o,e)});else{var o,a,s,l=(o=t9(),a=t9(),s=t9(),tP(i.oldSeries,function(t,e){var n=i.oldDataGroupIds[e],r=i.oldData[e],o=Ni(t),l=Nr(o);a.set(l,{dataGroupId:n,data:r}),tW(o)&&tP(o,function(t){s.set(t,{key:l,dataGroupId:n,data:r})})}),tP(n.updatedSeries,function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),n=t.getData(),i=Ni(t),r=Nr(i),l=a.get(r);if(l)o.set(r,{oldSeries:[{dataGroupId:l.dataGroupId,divide:No(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:No(n),data:n}]});else if(tW(i)){var h=[];tP(i,function(t){var e=a.get(t);e.data&&h.push({dataGroupId:e.dataGroupId,divide:No(e.data),data:e.data})}),h.length&&o.set(r,{oldSeries:h,newSeries:[{dataGroupId:e,data:n,divide:No(n)}]})}else{var u=s.get(i);if(u){var c=o.get(u.key);c||(c={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:No(u.data)}],newSeries:[]},o.set(u.key,c)),c.newSeries.push({dataGroupId:e,data:n,divide:No(n)})}}}}),o);tP(l.keys(),function(t){var n=l.get(t);Nn(n.oldSeries,n.newSeries,e)})}tP(n.updatedSeries,function(t){t[cw]&&(t[cw]=!1)})}for(var h=t.getSeries(),u=i.oldSeries=[],c=i.oldDataGroupIds=[],d=i.oldData=[],p=0;p<h.length;p++){var f=h[p].getData();1e4>f.count()&&(u.push(h[p]),c.push(h[p].get("dataGroupId")),d.push(f))}})}),g_(g8),g_(function(t){function e(t,e){var n=[],i=oo(e,t);function r(e,r){tP(i[e],function(e){tP(e.updateAxisBreaks(t).breaks,function(t){var i;n.push(tA(((i={})[r]=e.componentIndex,i),t))})})}return r("xAxisModels","xAxisIndex"),r("yAxisModels","yAxisIndex"),r("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}t.registerAction(_a,e),t.registerAction(_s,e),t.registerAction(_l,e),lA||(lA={createScaleBreakContext:Nl,pruneTicksByBreak:Nc,addBreaksToTicks:Nd,parseAxisBreakOption:Nf,identifyAxisBreak:Ng,serializeAxisBreakIdentifier:Nm,retrieveAxisBreakPairs:Ny,getTicksLogTransformBreak:Nv,logarithmicParseBreaksFromOption:Nx,makeAxisLabelFormatterParamBreak:Nb}),xn||(xn={adjustBreakLabelPair:NC,buildAxisBreakLine:NM,rectCoordBuildBreakAxis:NS,updateModelAxisBreak:Nk})}),g_(function(){te=NT}),g_(function(t){t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,bn)})}}]);