@sme.up/ketchup2 2.0.0-SNAPSHOT-20251023073535 → 2.0.0-SNAPSHOT-20251024082955

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 (113) hide show
  1. package/dist/{_basePickBy-CEMCYj0i.js → _basePickBy-CB6A5vGx.js} +2 -2
  2. package/dist/{_basePickBy-DL0vN7Ts.cjs → _basePickBy-DW06ZuN1.cjs} +1 -1
  3. package/dist/{_baseUniq-C5GcnfrR.cjs → _baseUniq-C54DG2e9.cjs} +1 -1
  4. package/dist/{_baseUniq-BYHhayFy.js → _baseUniq-DiwZCgb7.js} +1 -1
  5. package/dist/{arc-CPKVbV4G.cjs → arc-C4wMxOHu.cjs} +1 -1
  6. package/dist/{arc-2VbnYl-Y.js → arc-w38Gnznw.js} +1 -1
  7. package/dist/{architecture-O4VJ6CD3-DhnaFY0W.cjs → architecture-O4VJ6CD3-CdADKwFb.cjs} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-5TnrFYtv.js → architecture-O4VJ6CD3-HlQCIpj6.js} +1 -1
  9. package/dist/{architectureDiagram-VXUJARFQ-D7xutKyS.js → architectureDiagram-VXUJARFQ-C6ZiXwmG.js} +3 -3
  10. package/dist/{architectureDiagram-VXUJARFQ-BcEn_UbL.cjs → architectureDiagram-VXUJARFQ-CUAzJ6hr.cjs} +1 -1
  11. package/dist/{blockDiagram-VD42YOAC-DNdx2TRR.cjs → blockDiagram-VD42YOAC-3DBOr3zI.cjs} +1 -1
  12. package/dist/{blockDiagram-VD42YOAC-DqDl1x8v.js → blockDiagram-VD42YOAC-CPy8raBI.js} +5 -5
  13. package/dist/{c4Diagram-YG6GDRKO-CfTGmWHk.js → c4Diagram-YG6GDRKO-C4h9NOt5.js} +2 -2
  14. package/dist/{c4Diagram-YG6GDRKO-B3Jeo15d.cjs → c4Diagram-YG6GDRKO-CmgWeaNY.cjs} +1 -1
  15. package/dist/{channel-CmMLtk6g.js → channel-BW71aarC.js} +1 -1
  16. package/dist/channel-D9Q8wMqW.cjs +1 -0
  17. package/dist/{chunk-4BX2VUAB-CWXwpGby.cjs → chunk-4BX2VUAB-Kur9_7Xi.cjs} +1 -1
  18. package/dist/{chunk-4BX2VUAB-BFFOZvGz.js → chunk-4BX2VUAB-ulh4s_Cm.js} +1 -1
  19. package/dist/{chunk-55IACEB6-DmuDpHNo.js → chunk-55IACEB6--_p16JXc.js} +1 -1
  20. package/dist/{chunk-55IACEB6-CgD-9c0i.cjs → chunk-55IACEB6-DJmZE2ir.cjs} +1 -1
  21. package/dist/{chunk-B4BG7PRW-BzbPmqtn.js → chunk-B4BG7PRW-BvGaQBw1.js} +4 -4
  22. package/dist/{chunk-B4BG7PRW-wL-ElUae.cjs → chunk-B4BG7PRW-D4p15_hR.cjs} +1 -1
  23. package/dist/{chunk-DI55MBZ5-W-blfQAv.js → chunk-DI55MBZ5-CqU8ztre.js} +3 -3
  24. package/dist/{chunk-DI55MBZ5-CbcVfYvu.cjs → chunk-DI55MBZ5-DAE5FNXm.cjs} +1 -1
  25. package/dist/{chunk-FMBD7UC4-CtcFIeF6.cjs → chunk-FMBD7UC4-DT7GIEYJ.cjs} +1 -1
  26. package/dist/{chunk-FMBD7UC4-DKG1_x-4.js → chunk-FMBD7UC4-wy5bQmP5.js} +1 -1
  27. package/dist/{chunk-QN33PNHL-Mb_SrAAF.js → chunk-QN33PNHL-CleEw7q0.js} +1 -1
  28. package/dist/{chunk-QN33PNHL-H-04U5F5.cjs → chunk-QN33PNHL-DNTg28lX.cjs} +1 -1
  29. package/dist/{chunk-QZHKN3VN-LIsaEwAM.cjs → chunk-QZHKN3VN-BhQTjhfO.cjs} +1 -1
  30. package/dist/{chunk-QZHKN3VN-Ba0Y-oYK.js → chunk-QZHKN3VN-Bzcltncy.js} +1 -1
  31. package/dist/{chunk-TZMSLE5B-guHNFyRg.cjs → chunk-TZMSLE5B-CNPXwZK2.cjs} +1 -1
  32. package/dist/{chunk-TZMSLE5B-_0W8o3kU.js → chunk-TZMSLE5B-Y72TmcgL.js} +1 -1
  33. package/dist/{classDiagram-v2-WZHVMYZB-BCcGH5WE.js → classDiagram-2ON5EDUG-7L9CL_Rw.js} +2 -2
  34. package/dist/{classDiagram-2ON5EDUG-C8TmrEiw.cjs → classDiagram-2ON5EDUG-DrwrRciN.cjs} +1 -1
  35. package/dist/{classDiagram-2ON5EDUG-BCcGH5WE.js → classDiagram-v2-WZHVMYZB-7L9CL_Rw.js} +2 -2
  36. package/dist/{classDiagram-v2-WZHVMYZB-C8TmrEiw.cjs → classDiagram-v2-WZHVMYZB-DrwrRciN.cjs} +1 -1
  37. package/dist/clone-Bhh8P35V.cjs +1 -0
  38. package/dist/{clone-u3qZo49S.js → clone-DrQjHpoQ.js} +1 -1
  39. package/dist/{cose-bilkent-S5V4N54A-_37OJKjd.cjs → cose-bilkent-S5V4N54A-DeVJYdgH.cjs} +1 -1
  40. package/dist/{cose-bilkent-S5V4N54A-CA-p-zlc.js → cose-bilkent-S5V4N54A-DxGD-g0T.js} +1 -1
  41. package/dist/{dagre-6UL2VRFP-DdbyUP4X.js → dagre-6UL2VRFP-CRVZ49VA.js} +6 -6
  42. package/dist/{dagre-6UL2VRFP-DBECV6XE.cjs → dagre-6UL2VRFP-DS9wji35.cjs} +1 -1
  43. package/dist/{diagram-PSM6KHXK-CVYq9Tvv.js → diagram-PSM6KHXK-BVQI8vYZ.js} +4 -4
  44. package/dist/{diagram-PSM6KHXK-C8B-eFsD.cjs → diagram-PSM6KHXK-Cw2-YUn8.cjs} +1 -1
  45. package/dist/{diagram-QEK2KX5R-CBKRaHIY.cjs → diagram-QEK2KX5R-CUI73LoW.cjs} +1 -1
  46. package/dist/{diagram-QEK2KX5R-DdRltUrd.js → diagram-QEK2KX5R-tADKf4Ev.js} +3 -3
  47. package/dist/{diagram-S2PKOQOG-WFoxegfI.js → diagram-S2PKOQOG-CdIntPY6.js} +3 -3
  48. package/dist/{diagram-S2PKOQOG-CIv3S0ya.cjs → diagram-S2PKOQOG-DErRWKBa.cjs} +1 -1
  49. package/dist/{erDiagram-Q2GNP2WA-Bg--uXq8.js → erDiagram-Q2GNP2WA-CKN8hKAx.js} +4 -4
  50. package/dist/{erDiagram-Q2GNP2WA-C-JGaGrK.cjs → erDiagram-Q2GNP2WA-CTuUl_QF.cjs} +1 -1
  51. package/dist/{flowDiagram-NV44I4VS-O59CggiG.js → flowDiagram-NV44I4VS-Cc4cpPOK.js} +5 -5
  52. package/dist/{flowDiagram-NV44I4VS-CR5WUf-l.cjs → flowDiagram-NV44I4VS-xwivlLNh.cjs} +1 -1
  53. package/dist/{ganttDiagram-LVOFAZNH-BIXnxZob.cjs → ganttDiagram-LVOFAZNH-B3q7Pdot.cjs} +1 -1
  54. package/dist/{ganttDiagram-LVOFAZNH-CzfI2iXJ.js → ganttDiagram-LVOFAZNH-DM0cwQh4.js} +2 -2
  55. package/dist/{gitGraph-ZV4HHKMB-85LF9Rky.cjs → gitGraph-ZV4HHKMB-C-M7dxfK.cjs} +1 -1
  56. package/dist/{gitGraph-ZV4HHKMB-BFERRSTj.js → gitGraph-ZV4HHKMB-CNFcSGtf.js} +1 -1
  57. package/dist/{gitGraphDiagram-NY62KEGX-BIlXhtsM.js → gitGraphDiagram-NY62KEGX-BcKnwS6z.js} +4 -4
  58. package/dist/{gitGraphDiagram-NY62KEGX-CQGXDV_P.cjs → gitGraphDiagram-NY62KEGX-CoPwJElV.cjs} +1 -1
  59. package/dist/{graph-BJkvBuAL.cjs → graph-DvsqdoZ0.cjs} +1 -1
  60. package/dist/{graph-Dg0PDtZI.js → graph-JpHVxdcx.js} +2 -2
  61. package/dist/{index-BRIuRp1M.cjs → index-3_z0TTii.cjs} +9 -9
  62. package/dist/{index-CbbrhFEo.js → index-CrESDGMl.js} +38 -38
  63. package/dist/{info-63CPKGFF-DMQpcRYM.cjs → info-63CPKGFF-DPvBlQwP.cjs} +1 -1
  64. package/dist/info-63CPKGFF-_Ey7RHEZ.js +5 -0
  65. package/dist/{infoDiagram-F6ZHWCRC-LFoITbm1.cjs → infoDiagram-F6ZHWCRC-B_aTHTdj.cjs} +1 -1
  66. package/dist/{infoDiagram-F6ZHWCRC-2PaY2Alp.js → infoDiagram-F6ZHWCRC-CPRXgY8e.js} +2 -2
  67. package/dist/{journeyDiagram-XKPGCS4Q--5SFkAnV.js → journeyDiagram-XKPGCS4Q-6szdazn4.js} +4 -4
  68. package/dist/{journeyDiagram-XKPGCS4Q-DNOG8-ZS.cjs → journeyDiagram-XKPGCS4Q-CQ4Y-k4a.cjs} +1 -1
  69. package/dist/{kanban-definition-3W4ZIXB7-C6qCaB1p.js → kanban-definition-3W4ZIXB7-Byswe7il.js} +2 -2
  70. package/dist/{kanban-definition-3W4ZIXB7-DOahyFi4.cjs → kanban-definition-3W4ZIXB7-DXN7Vy5Q.cjs} +1 -1
  71. package/dist/ketchup2.cjs.js +1 -1
  72. package/dist/ketchup2.css +1 -1
  73. package/dist/ketchup2.es.js +1 -1
  74. package/dist/{layout-CqY1_WPy.cjs → layout-BUfrBg_9.cjs} +1 -1
  75. package/dist/{layout-Dth747Mf.js → layout-DIDhMSLo.js} +4 -4
  76. package/dist/{linear-DHcasPQI.js → linear-BurJ_7kN.js} +1 -1
  77. package/dist/{linear-CrSKpLV9.cjs → linear-Z_fTldyJ.cjs} +1 -1
  78. package/dist/{mermaid-parser.core-CpCMNWAX.js → mermaid-parser.core-DAtk9qMo.js} +11 -11
  79. package/dist/{mermaid-parser.core-C11AoA-w.cjs → mermaid-parser.core-MvuJ8G2H.cjs} +2 -2
  80. package/dist/{mindmap-definition-VGOIOE7T-C1NARCjn.cjs → mindmap-definition-VGOIOE7T-D6nZ6h88.cjs} +1 -1
  81. package/dist/{mindmap-definition-VGOIOE7T-yRd0uiAI.js → mindmap-definition-VGOIOE7T-Dq6MevDE.js} +3 -3
  82. package/dist/{packet-HUATNLJX-DxQt3S_N.js → packet-HUATNLJX-B8X3FsH2.js} +1 -1
  83. package/dist/{packet-HUATNLJX-B2FjZo4F.cjs → packet-HUATNLJX-CrXFvbPH.cjs} +1 -1
  84. package/dist/pie-WTHONI2E-DUgsVZCn.js +5 -0
  85. package/dist/{pie-WTHONI2E-oinWCLRj.cjs → pie-WTHONI2E-DipxMgJq.cjs} +1 -1
  86. package/dist/{pieDiagram-ADFJNKIX-DqAfHtK0.cjs → pieDiagram-ADFJNKIX-B7xpaxNI.cjs} +1 -1
  87. package/dist/{pieDiagram-ADFJNKIX-kmAHUrIr.js → pieDiagram-ADFJNKIX-BCEoLOot.js} +4 -4
  88. package/dist/{quadrantDiagram-AYHSOK5B-DTf5lgAY.cjs → quadrantDiagram-AYHSOK5B-CU8xKahB.cjs} +1 -1
  89. package/dist/{quadrantDiagram-AYHSOK5B-De0oM6q1.js → quadrantDiagram-AYHSOK5B-DrC5-XfC.js} +2 -2
  90. package/dist/radar-NJJJXTRR-Bbqodl0E.js +5 -0
  91. package/dist/{radar-NJJJXTRR-CwmaMIBg.cjs → radar-NJJJXTRR-BeuQyBM9.cjs} +1 -1
  92. package/dist/{requirementDiagram-UZGBJVZJ-CX8YD9z1.js → requirementDiagram-UZGBJVZJ-BX6-Cx3r.js} +3 -3
  93. package/dist/{requirementDiagram-UZGBJVZJ-BjnnfTMn.cjs → requirementDiagram-UZGBJVZJ-CqgqKYA2.cjs} +1 -1
  94. package/dist/{sankeyDiagram-TZEHDZUN-DZ4DbfBj.js → sankeyDiagram-TZEHDZUN-3ZxpVRqr.js} +1 -1
  95. package/dist/{sankeyDiagram-TZEHDZUN-Dy1v62Bk.cjs → sankeyDiagram-TZEHDZUN-MIgYhwV5.cjs} +1 -1
  96. package/dist/{sequenceDiagram-WL72ISMW-eqA8jOPu.cjs → sequenceDiagram-WL72ISMW-BKgsh2l9.cjs} +1 -1
  97. package/dist/{sequenceDiagram-WL72ISMW-DsbqIVk5.js → sequenceDiagram-WL72ISMW-Cyr8lu5s.js} +3 -3
  98. package/dist/{stateDiagram-FKZM4ZOC-CtJZwCOh.js → stateDiagram-FKZM4ZOC-DV3pktq2.js} +4 -4
  99. package/dist/{stateDiagram-FKZM4ZOC-DYHMI_zf.cjs → stateDiagram-FKZM4ZOC-DiXsXUVx.cjs} +1 -1
  100. package/dist/{stateDiagram-v2-4FDKWEC3-Dr43yAwI.cjs → stateDiagram-v2-4FDKWEC3-4nWAmjxL.cjs} +1 -1
  101. package/dist/{stateDiagram-v2-4FDKWEC3-Bzo3sysK.js → stateDiagram-v2-4FDKWEC3-dUB0IqRl.js} +2 -2
  102. package/dist/{timeline-definition-IT6M3QCI-BFcRbJtT.js → timeline-definition-IT6M3QCI-DA_oEwkt.js} +2 -2
  103. package/dist/{timeline-definition-IT6M3QCI-2Xo8kDck.cjs → timeline-definition-IT6M3QCI-bLKCHO3E.cjs} +1 -1
  104. package/dist/{treemap-75Q7IDZK-ChZaWhuI.cjs → treemap-75Q7IDZK-D-L-Y4hN.cjs} +1 -1
  105. package/dist/{treemap-75Q7IDZK-B-fFrjMn.js → treemap-75Q7IDZK-DlmWIw2L.js} +1 -1
  106. package/dist/{xychartDiagram-PRI3JC2R-B2X5wgYU.cjs → xychartDiagram-PRI3JC2R-hzr1xce0.cjs} +1 -1
  107. package/dist/{xychartDiagram-PRI3JC2R-CbHyJiEP.js → xychartDiagram-PRI3JC2R-loDrkbCG.js} +2 -2
  108. package/package.json +1 -1
  109. package/dist/channel-EXEQnISW.cjs +0 -1
  110. package/dist/clone-CyYfnDpf.cjs +0 -1
  111. package/dist/info-63CPKGFF-C7qPW8G8.js +0 -5
  112. package/dist/pie-WTHONI2E-cF3Das01.js +0 -5
  113. package/dist/radar-NJJJXTRR-C8I7zLb3.js +0 -5
@@ -42,7 +42,7 @@ object-assign
42
42
  (c) Sindre Sorhus
43
43
  @license MIT
44
44
  */var vx,uL;function TY(){if(uL)return vx;uL=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return vx=i()?Object.assign:function(a,o){for(var s,l=n(a),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var h in s)t.call(s,h)&&(l[h]=s[h]);if(e){u=e(s);for(var f=0;f<u.length;f++)r.call(s,u[f])&&(l[u[f]]=s[u[f]])}}return l},vx}var gx,cL;function i2(){if(cL)return gx;cL=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gx=e,gx}var mx,hL;function p5(){return hL||(hL=1,mx=Function.call.bind(Object.prototype.hasOwnProperty)),mx}var yx,fL;function kY(){if(fL)return yx;fL=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=i2(),r={},n=p5();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(n(a,c)){var h;try{if(typeof a[c]!="function"){var f=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}h=a[c](o,c,l,s,null,t)}catch(p){h=p}if(h&&!(h instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+h.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},yx=i,yx}var _x,dL;function AY(){if(dL)return _x;dL=1;var e=d5(),t=TY(),r=i2(),n=p5(),i=kY(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return _x=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function h(V){var I=V&&(u&&V[u]||V[c]);if(typeof I=="function")return I}var f="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:y(),arrayOf:_,element:x(),elementType:b(),instanceOf:S,node:T(),objectOf:C,oneOf:w,oneOfType:k,shape:L,exact:D};function p(V,I){return V===I?V!==0||1/V===1/I:V!==V&&I!==I}function v(V,I){this.message=V,this.data=I&&typeof I=="object"?I:{},this.stack=""}v.prototype=Error.prototype;function g(V){if(process.env.NODE_ENV!=="production")var I={},B=0;function G(W,J,Q,tt,it,X,rt){if(tt=tt||f,X=X||Q,rt!==r){if(l){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var vt=tt+":"+Q;!I[vt]&&B<3&&(a("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+tt+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[vt]=!0,B++)}}return J[Q]==null?W?J[Q]===null?new v("The "+it+" `"+X+"` is marked as required "+("in `"+tt+"`, but its value is `null`.")):new v("The "+it+" `"+X+"` is marked as required in "+("`"+tt+"`, but its value is `undefined`.")):null:V(J,Q,tt,it,X)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function m(V){function I(B,G,H,W,J,Q){var tt=B[G],it=P(tt);if(it!==V){var X=F(tt);return new v("Invalid "+W+" `"+J+"` of type "+("`"+X+"` supplied to `"+H+"`, expected ")+("`"+V+"`."),{expectedType:V})}return null}return g(I)}function y(){return g(o)}function _(V){function I(B,G,H,W,J){if(typeof V!="function")return new v("Property `"+J+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var Q=B[G];if(!Array.isArray(Q)){var tt=P(Q);return new v("Invalid "+W+" `"+J+"` of type "+("`"+tt+"` supplied to `"+H+"`, expected an array."))}for(var it=0;it<Q.length;it++){var X=V(Q,it,H,W,J+"["+it+"]",r);if(X instanceof Error)return X}return null}return g(I)}function x(){function V(I,B,G,H,W){var J=I[B];if(!s(J)){var Q=P(J);return new v("Invalid "+H+" `"+W+"` of type "+("`"+Q+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return g(V)}function b(){function V(I,B,G,H,W){var J=I[B];if(!e.isValidElementType(J)){var Q=P(J);return new v("Invalid "+H+" `"+W+"` of type "+("`"+Q+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return g(V)}function S(V){function I(B,G,H,W,J){if(!(B[G]instanceof V)){var Q=V.name||f,tt=$(B[G]);return new v("Invalid "+W+" `"+J+"` of type "+("`"+tt+"` supplied to `"+H+"`, expected ")+("instance of `"+Q+"`."))}return null}return g(I)}function w(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function I(B,G,H,W,J){for(var Q=B[G],tt=0;tt<V.length;tt++)if(p(Q,V[tt]))return null;var it=JSON.stringify(V,function(rt,Z){var vt=F(Z);return vt==="symbol"?String(Z):Z});return new v("Invalid "+W+" `"+J+"` of value `"+String(Q)+"` "+("supplied to `"+H+"`, expected one of "+it+"."))}return g(I)}function C(V){function I(B,G,H,W,J){if(typeof V!="function")return new v("Property `"+J+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var Q=B[G],tt=P(Q);if(tt!=="object")return new v("Invalid "+W+" `"+J+"` of type "+("`"+tt+"` supplied to `"+H+"`, expected an object."));for(var it in Q)if(n(Q,it)){var X=V(Q,it,H,W,J+"."+it,r);if(X instanceof Error)return X}return null}return g(I)}function k(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var I=0;I<V.length;I++){var B=V[I];if(typeof B!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(B)+" at index "+I+"."),o}function G(H,W,J,Q,tt){for(var it=[],X=0;X<V.length;X++){var rt=V[X],Z=rt(H,W,J,Q,tt,r);if(Z==null)return null;Z.data&&n(Z.data,"expectedType")&&it.push(Z.data.expectedType)}var vt=it.length>0?", expected one of type ["+it.join(", ")+"]":"";return new v("Invalid "+Q+" `"+tt+"` supplied to "+("`"+J+"`"+vt+"."))}return g(G)}function T(){function V(I,B,G,H,W){return E(I[B])?null:new v("Invalid "+H+" `"+W+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return g(V)}function A(V,I,B,G,H){return new v((V||"React class")+": "+I+" type `"+B+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function L(V){function I(B,G,H,W,J){var Q=B[G],tt=P(Q);if(tt!=="object")return new v("Invalid "+W+" `"+J+"` of type `"+tt+"` "+("supplied to `"+H+"`, expected `object`."));for(var it in V){var X=V[it];if(typeof X!="function")return A(H,W,J,it,F(X));var rt=X(Q,it,H,W,J+"."+it,r);if(rt)return rt}return null}return g(I)}function D(V){function I(B,G,H,W,J){var Q=B[G],tt=P(Q);if(tt!=="object")return new v("Invalid "+W+" `"+J+"` of type `"+tt+"` "+("supplied to `"+H+"`, expected `object`."));var it=t({},B[G],V);for(var X in it){var rt=V[X];if(n(V,X)&&typeof rt!="function")return A(H,W,J,X,F(rt));if(!rt)return new v("Invalid "+W+" `"+J+"` key `"+X+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(B[G],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Z=rt(Q,X,H,W,J+"."+X,r);if(Z)return Z}return null}return g(I)}function E(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(E);if(V===null||s(V))return!0;var I=h(V);if(I){var B=I.call(V),G;if(I!==V.entries){for(;!(G=B.next()).done;)if(!E(G.value))return!1}else for(;!(G=B.next()).done;){var H=G.value;if(H&&!E(H[1]))return!1}}else return!1;return!0;default:return!1}}function N(V,I){return V==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function P(V){var I=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":N(I,V)?"symbol":I}function F(V){if(typeof V>"u"||V===null)return""+V;var I=P(V);if(I==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return I}function O(V){var I=F(V);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function $(V){return!V.constructor||!V.constructor.name?f:V.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},_x}var xx,pL;function DY(){if(pL)return xx;pL=1;var e=i2();function t(){}function r(){}return r.resetWarningCache=t,xx=function(){function n(o,s,l,u,c,h){if(h!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},xx}var vL;function LY(){if(vL)return gv.exports;if(vL=1,process.env.NODE_ENV!=="production"){var e=d5(),t=!0;gv.exports=AY()(e.isElement,t)}else gv.exports=DY()();return gv.exports}var mr=LY(),MY=function(t){var r=t?.ownerDocument||document;return r.defaultView||window},EY=function(t,r){for(var n in t)if(!(n in r))return!0;for(var i in r)if(t[i]!==r[i])return!0;return!1},IY=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],yv="http://www.w3.org/2000/svg",gL="http://www.w3.org/1999/xlink",a2=function(e){function t(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a))||this,n.initialState={hasError:!1,isLoading:!0},n.state=n.initialState,n._isMounted=!1,n.reactWrapper=void 0,n.nonReactWrapper=void 0,n.refCallback=function(s){n.reactWrapper=s},n}dY(t,e);var r=t.prototype;return r.renderSVG=function(){var i=this;if(this.reactWrapper instanceof MY(this.reactWrapper).Node){var a=this.props,o=a.desc,s=a.evalScripts,l=a.httpRequestWithCredentials,u=a.renumerateIRIElements,c=a.src,h=a.title,f=a.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,v=this.props.afterInjection,g=this.props.wrapper,m,y;g==="svg"?(m=document.createElementNS(yv,g),m.setAttribute("xmlns",yv),m.setAttribute("xmlns:xlink",gL),y=document.createElementNS(yv,g)):(m=document.createElement(g),y=document.createElement(g)),m.appendChild(y),y.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(m);var _=function(w){if(i.removeSVG(),!i._isMounted){d(w);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){d(w)})},x=function(w,C){if(w){_(w);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{v(C)}catch(k){_(k)}})},b=function(w){if(w.setAttribute("role","img"),o){var C=w.querySelector(":scope > desc");C&&w.removeChild(C);var k=document.createElement("desc");k.innerHTML=o,w.prepend(k)}if(h){var T=w.querySelector(":scope > title");T&&w.removeChild(T);var A=document.createElement("title");A.innerHTML=h,w.prepend(A)}try{p(w)}catch(L){_(L)}};SY(y,{afterEach:x,beforeEach:b,cacheRequests:f,evalScripts:s,httpRequestWithCredentials:l,renumerateIRIElements:u})}},r.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(i){var a=this;EY(Pm({},i),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var a=i.fallback;i.httpRequestWithCredentials;var o=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var s=i.wrapper,l=fY(i,IY),u=s;return dv.createElement(u,Pm({},l,{ref:this.refCallback},s==="svg"?{xmlns:yv,xmlnsXlink:gL}:{}),this.state.isLoading&&o&&dv.createElement(o,null),this.state.hasError&&a&&dv.createElement(a,null))},t}(dv.Component);a2.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};a2.propTypes={afterInjection:mr.func,beforeInjection:mr.func,desc:mr.string,evalScripts:mr.oneOf(["always","once","never"]),fallback:mr.oneOfType([mr.func,mr.object,mr.string]),httpRequestWithCredentials:mr.bool,loading:mr.oneOfType([mr.func,mr.object,mr.string]),onError:mr.func,renumerateIRIElements:mr.bool,src:mr.string.isRequired,title:mr.string,useRequestCache:mr.bool,wrapper:mr.oneOf(["div","span","svg"])};let LS={assets:"/"};const PY=e=>{LS={...LS,...e}},RY=e=>{const t=`${LS.assets}/${e}`.replace(/\/+/g,"/");return t.endsWith(".svg")?t:t+".svg"},Fu={"smp-icon":"_smp-icon_xmhk0_1","smp-icon-rotated":"_smp-icon-rotated_xmhk0_10","smp-icon-base":"_smp-icon-base_xmhk0_14","smp-icon-interactable":"_smp-icon-interactable_xmhk0_17","smp-icon-danger":"_smp-icon-danger_xmhk0_30","smp-icon-warning":"_smp-icon-warning_xmhk0_34","smp-icon-onDanger":"_smp-icon-onDanger_xmhk0_42","smp-icon-onPrimary":"_smp-icon-onPrimary_xmhk0_46","smp-icon-primary":"_smp-icon-primary_xmhk0_50","smp-icon-spin":"_smp-icon-spin_xmhk0_54","smp-image-interactable":"_smp-image-interactable_xmhk0_59"},me=j.memo(({icon:e,width:t,height:r,placeholderIcon:n,color:i,disabled:a,state:o="base",rotated:s=!1,onClick:l,isInteractable:u=!1,spin:c=!1,title:h,tabIndex:f,link:d})=>{const[p,v]=j.useState(!1),g=L=>L?.toLowerCase().endsWith(".svg")||!L?.includes("/"),m=L=>L?.startsWith("http")||L?.startsWith("/"),y={img:`${Fu[u?"smp-image-interactable":""]}`,svg:`${Fu["smp-icon"]} ${o?`${Fu[`smp-icon-${o}`]}`:""} ${s?Fu["smp-icon-rotated"]:""} ${u?Fu["smp-icon-interactable"]:""} ${c?Fu["smp-icon-spin"]:""}`},_=L=>{!a&&u&&l&&l(L)},x=L=>{!a&&u&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),_(L))},b=p?n:e,S=g(b),C=m(b)?b:RY(`assets/svg/${b}`),k=()=>z.jsx(a2,{src:C,onError:()=>v(!0),width:t||"0.875rem",height:r||"0.875rem",wrapper:"svg",title:h,role:"application",fill:i,"aria-disabled":a,className:y.svg,onClick:_,onKeyDown:x,tabIndex:f}),T=()=>z.jsx("img",{src:b,width:t||"14px",height:r||"auto",alt:h,onError:()=>v(!0),onClick:_,className:y.img,title:h,onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&_(L)}});return(()=>{const L=d?.startsWith("https://")||d?.startsWith("http://")||d?.startsWith("#")||d?.startsWith("/"),D=S?k():T(),E=h?z.jsx("span",{title:h,children:D}):D;return L?z.jsx("a",{href:d,children:E}):E})()});function Ri({children:e}){const[t,r]=j.useState(!1);return j.useEffect(()=>{r(!0)},[]),t?sY.createPortal(e,document.body):null}function Ni({position:e="bottom",open:t=!1}){const r=j.useRef(null),n=j.useRef(null),i=n.current?.getBoundingClientRect().height,[a,o]=j.useState(0),s=j.useCallback(()=>{const l=r.current,u=n.current;if(!l||!u)return;const{top:c,left:h,width:f,height:d}=l.getBoundingClientRect();o(f);const p=u.offsetHeight,v=u.offsetWidth;if(v===0||p===0){requestAnimationFrame(s);return}const g=window.scrollY,m=window.scrollX,y=window.innerWidth,_=window.innerHeight;let x=c+g,b=h+m,S=e;const w={top:c-p<0,bottom:c+d+p>_,left:h-v<0,right:h+f+v>y};switch(e){case"top":w.top&&!w.bottom&&(S="bottom");break;case"bottom":w.bottom&&!w.top&&(S="top");break;case"left":w.left&&!w.right&&(S="right");break;case"right":w.right&&!w.left&&(S="left");break}switch(S){case"top":x=c+g-p;break;case"bottom":x=c+g+d;break;case"left":b=h+m-v;break;case"right":b=h+m+f;break}x=Math.max(g,Math.min(x,g+_-p)),b=Math.max(m,Math.min(b,m+y-v)),requestAnimationFrame(()=>{u.style.transform=`translate(${b}px, ${x}px)`,u.style.opacity="1"})},[e]);return j.useLayoutEffect(()=>{if(!t)return;let l;const u=()=>{const h=r.current,f=n.current;h&&f?s():l=requestAnimationFrame(u)};l=requestAnimationFrame(u);const c=new MutationObserver(()=>{s()});return n.current&&c.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{cancelAnimationFrame(l),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),c.disconnect()}},[s,t,i]),{anchorRef:r,targetRef:n,anchorWidth:a}}const bx={"smp-label":"_smp-label_zl3eb_1","smp-label-disabled":"_smp-label-disabled_zl3eb_6","smp-label-wrapper":"_smp-label-wrapper_zl3eb_10"},Sx={"smp-helper-text":"_smp-helper-text_1karg_7","smp-helper-text-disabled":"_smp-helper-text-disabled_1karg_19"},O0=({helperText:e,disabled:t,state:r,id:n})=>{const i={container:`${Sx["smp-helper-text"]} ${t?Sx["smp-helper-text-disabled"]:""} ${r?`${Sx["smp-helper-text"]}-${r}`:""}`};return z.jsx("label",{className:i.container,id:n,children:e})},NY={"smp-helper-tooltip":"_smp-helper-tooltip_2mlq3_1"},OY=({helperTooltip:e,ref:t})=>{const r={container:`${NY["smp-helper-tooltip"]}`};return z.jsx("div",{className:r.container,ref:t,children:z.jsx(O0,{helperText:e})})},Io=({label:e,disabled:t,htmlFor:r,helper:n=""})=>{const[i,a]=j.useState(!1),{anchorRef:o,targetRef:s}=Ni({position:"right",open:i}),l={container:`${bx["smp-label"]} ${t?bx["smp-label-disabled"]:""}`,labelWrapper:bx["smp-label-wrapper"]};return z.jsxs("div",{className:l.labelWrapper,children:[z.jsx("label",{className:l.container,htmlFor:r,children:e}),n&&z.jsx("div",{ref:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:z.jsx(me,{icon:"info_outline",tabIndex:0,width:14,isInteractable:!0,onClick:()=>{a(u=>!u)}})}),z.jsx(Ri,{children:i&&n&&z.jsx(OY,{helperTooltip:n,ref:s})})]})},In={"smp-layout":"_smp-layout_wqmhx_1","smp-layout-horizontal":"_smp-layout-horizontal_wqmhx_9","smp-layout-vertical":"_smp-layout-vertical_wqmhx_15","smp-layout-section-grid":"_smp-layout-section-grid_wqmhx_20","smp-layout-section-vertical":"_smp-layout-section-vertical_wqmhx_24","smp-layout-section-horizontal":"_smp-layout-section-horizontal_wqmhx_28","smp-layout-cell-container":"_smp-layout-cell-container_wqmhx_33","smp-layout-section-flex":"_smp-layout-section-flex_wqmhx_37","smp-grid-template-cols":"_smp-grid-template-cols_wqmhx_55","smp-grid-template-rows":"_smp-grid-template-rows_wqmhx_59","smp-layout-section-with-title":"_smp-layout-section-with-title_wqmhx_63","smp-layout-section-title":"_smp-layout-section-title_wqmhx_69","smp-layout-inline":"_smp-layout-inline_wqmhx_75"},BY=(e,t)=>{const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r},v5=(e,t)=>e.map(r=>{if(r.sections?.length)return{...r,sections:v5(r.sections,t),content:r.content};let n=r.sections,i=r.content;return r.content?.length&&r.columns&&+r.columns>1&&(n=BY(r.content.filter(o=>t.includes(o.id||"")),+r.columns).map((o,s)=>({...r,id:`${r.id}-${s}`,content:o,gridCols:r.columns,horizontal:!0})),i=[]),{...r,sections:n,content:i}}),mL=(e,t)=>{if(!t)return{};const r=e.some(n=>n.dim)?e.map(n=>n.dim||"auto").join(" "):`repeat(${e.length}, 1fr)`;return{[t]:r}},yL=e=>e.some(t=>t.dim&&!t.dim.endsWith("%")),_L=e=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[e],FY={base:{ghost:"base",outlined:"base",raised:"base"},danger:{ghost:"danger",outlined:"danger",raised:"onDanger"},primary:{ghost:"primary",outlined:"primary",raised:"onPrimary"}},xL=(e,t)=>FY[e][t],Wa={"smp-button-container":"_smp-button-container_zd415_1","smp-button-extraSmall":"_smp-button-extraSmall_zd415_17","smp-button-small":"_smp-button-small_zd415_22","smp-button-base":"_smp-button-base_zd415_27","smp-button-large":"_smp-button-large_zd415_32","smp-button-extraLarge":"_smp-button-extraLarge_zd415_37","smp-button-fullWidth":"_smp-button-fullWidth_zd415_42","smp-button-squared":"_smp-button-squared_zd415_46","smp-buttonType-raised":"_smp-buttonType-raised_zd415_53","smp-buttonVariant-base":"_smp-buttonVariant-base_zd415_55","smp-buttonActive":"_smp-buttonActive_zd415_77","smp-buttonVariant-primary":"_smp-buttonVariant-primary_zd415_84","smp-buttonVariant-danger":"_smp-buttonVariant-danger_zd415_113","smp-buttonExt-oneButton-horizontal":"_smp-buttonExt-oneButton-horizontal_zd415_153","smp-buttonExt-oneButton-vertical":"_smp-buttonExt-oneButton-vertical_zd415_163","smp-buttonType-outlined":"_smp-buttonType-outlined_zd415_186","smp-buttonType-ghost":"_smp-buttonType-ghost_zd415_256"},Be=({bindValue:e,onClick:t,ariaLabel:r,icon:n,placeholderIcon:i,disabled:a,sizing:o="base",variant:s="primary",appearance:l="raised",showIcon:u=!0,showText:c=!0,fullWidth:h=!1,loading:f=!1,justify:d="center",title:p,optionalDisplayValue:v,squared:g=!1,submit:m=!1,active:y=!1,buttonExt:_})=>{const x={container:`${Wa["smp-button"]} ${Wa["smp-button-container"]} ${o?Wa[`smp-button-${o}`]:""} ${s?Wa[`smp-buttonVariant-${s}`]:""} ${l?Wa[`smp-buttonType-${l}`]:""} ${h?Wa["smp-button-fullWidth"]:""} ${Jo[`smp-justifyContent-${d}`]} ${g&&!c?Wa["smp-button-squared"]:""} ${y?Wa["smp-buttonActive"]:""} ${_?Wa[`smp-buttonExt-${_}`]:""}`};return z.jsx("button",{"data-component":"button",type:m?"submit":"button",className:x.container,onClick:t,"aria-label":r,disabled:a,"aria-busy":f,title:p||v,children:f?z.jsx(me,{icon:"spinner",state:xL(s,l),spin:!0}):z.jsxs(z.Fragment,{children:[n&&u&&z.jsx(me,{icon:n,placeholderIcon:i,disabled:a,state:xL(s,l),width:_L(o),height:_L(o)}),c&&z.jsx("span",{children:v||e})]})})},$Y={titleLarge:"h2",title:"h3",body:"h6",label:"label",code:"code"},$u={"smp-typography":"_smp-typography_1ahus_1","smp-typography-body":"_smp-typography-body_1ahus_8","smp-text-number":"_smp-text-number_1ahus_11","smp-typography-title":"_smp-typography-title_1ahus_16","smp-typography-titleLarge":"_smp-typography-titleLarge_1ahus_20","smp-typography-label":"_smp-typography-label_1ahus_24","smp-typography-disabled":"_smp-typography-disabled_1ahus_29","smp-typography-left":"_smp-typography-left_1ahus_33","smp-typography-center":"_smp-typography-center_1ahus_37","smp-typography-right":"_smp-typography-right_1ahus_41","smp-typography-toolbar":"_smp-typography-toolbar_1ahus_46","smp-text-negative":"_smp-text-negative_1ahus_51"},o2="smp-toolbar",VY=["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter","Escape"," "],MS=e=>e.replace(`${o2}-`,"").split("-").map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),zY=e=>`${o2}-${e.filter(t=>!isNaN(t)).join("-")}`,Rm=(e,t)=>t?`${t}-${e}`:`${o2}-${e}`,GY=(e,t)=>t?`${t}-${e}`:`toolbar-item-${e}`,ES=e=>!!e.fun&&e.forcedLeaf===!1&&!(e.children&&e.children.length>0),IS=(e,t,r,n)=>{if(!e||t.length===0)return e;const i={...e};i.children=[...e.children??[]];let a=i.children;const o=[],s=[];for(let l=0;l<t.length;l++){const u=t[l],c=a[u];if(!c)break;const h={...c};if(l===t.length-1){if(a[u]=r(h),n){const f=a.map((d,p)=>p===u?a[p]:n({...d}));if(l===0)i.children=f;else{const d=o[o.length-1],p=s[s.length-1];d[p]={...d[p],children:f}}}}else h.children=[...h.children??[]],a[u]=h,o.push(a),s.push(u),a=h.children}return i},Zg=(e,t)=>{e.current.has(t)&&requestAnimationFrame(()=>{e.current.get(t)?.focus()})};function WY(e,t,r){return{handleKeyDown:j.useCallback(async(i,a,o)=>{if(!VY.includes(i.key))return;i.preventDefault(),i.stopPropagation();const s=t.current.get(o),l=MS(o);if(s)switch(i.key){case"ArrowDown":case"ArrowUp":{const c=l[l.length-1]+(i.key==="ArrowDown"?1:-1);if(c>=0){const h=o.split("-");h.pop();const f=`${h.join("-")}-${c}`;Zg(t,f)}break}case"ArrowRight":{r(a,o),Zg(t,Rm(0,o));break}case"ArrowLeft":case"Escape":{l.pop();const u=zY(l);t.current.has(u)&&(e(c=>c&&IS(c,l,h=>({...h,isExpanded:!1}))),Zg(t,u));break}}},[r,t,e])}}const ve={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BREADCRUMBS:"BRD",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",EDITOR:"EDT",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",LABEL:"LBL",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",MULTI_CONFIG:"CFM",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",BUTTON_GROUP:"BTO",TIME:"TIM",FILE_UPLOAD:"FUP",PASSWORD:"PWD",TREE:"TRE"},kc={CODE_ONLY:"CodeOnly",DESC_ONLY:"DescOnly",BOTH:"Both"},Ac={TN:"TN",TM:"TM",PM:"PM",TS:"TS",TT:"TT"},HY={ON_LOADING:"OnLoading"},jY={obj:{t:"",p:"",k:""},fun:"",isEditable:!1,shape:ve.TEXT_FIELD,icon:"error",value:"No data found"};function UY(e,t,r){const n=async(s,l)=>{if(!ES(s))a(l,{isExpanded:!0});else if(t){a(l,{isLoading:!0});try{const u=await t(s);a(l,{isLoading:!1,children:u?.children&&u.children.length>0?u.children:[jY],isExpanded:!0},{isExpanded:!1})}catch(u){console.error("Failed to load dynamic node data:",u),a(l,{isLoading:!1})}}},i=s=>{a(s,{isExpanded:!1})},a=(s,l,u)=>{e(c=>c&&IS(c,MS(s),f=>({...f,...l}),u?f=>({...f,...u}):void 0))};return{handleNodeExpand:n,handleMouseLeave:i,onToolbarRadioLeafNodeClick:(s,l,u)=>{e(c=>c&&IS(c,MS(l),f=>{const d={...f,obj:{t:f.obj?.t||"",p:f.obj?.p||"",k:u.obj?.k||""}};return r?.(d),d}))}}}const g5=e=>{const t=j.useRef(null);return j.useEffect(()=>()=>{t.current&&clearTimeout(t.current)},[]),n=>{t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{n()},e)}},Pp=(e,t,r)=>{if(e==""&&(t==""||t==null))return"";if(r)switch(r){case"CodeOnly":return e||"";case"DescOnly":return t||"";case"Both":return`${e} - ${t}`}return e||""},Cx={key:"f4",ctrlKey:!1,altKey:!1},Pn={"smp-textfield-wrapper":"_smp-textfield-wrapper_1plx2_4","smp-textfield":"_smp-textfield_1plx2_4","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1plx2_29","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1plx2_35","smp-textfield-small":"_smp-textfield-small_1plx2_40","smp-textfield-base":"_smp-textfield-base_1plx2_45","smp-textfield-large":"_smp-textfield-large_1plx2_50","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1plx2_55","smp-textfield-input":"_smp-textfield-input_1plx2_61","smp-textfield-decode-wrapper":"_smp-textfield-decode-wrapper_1plx2_82","smp-textfield-outlined":"_smp-textfield-outlined_1plx2_91","smp-textfield-danger":"_smp-textfield-danger_1plx2_102","smp-textfield-readOnly":"_smp-textfield-readOnly_1plx2_106","smp-textfield-disabled":"_smp-textfield-disabled_1plx2_121","smp-textfield-fullWidth":"_smp-textfield-fullWidth_1plx2_130","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_1plx2_134"},m5=j.createContext({}),YY=()=>j.useContext(m5),mi=({id:e,disabled:t=!1,bindValue:r,optionalDisplayValue:n,icon:i,placeholder:a,isEditable:o=!0,shapeIcon:s,sizing:l="base",state:u,variant:c,tooltip:h=!1,rotatedShapeIcon:f=!1,ref:d,inputRef:p,inputType:v="text",ariaLabel:g="input field",label:m,helperText:y=!1,error:_,appearance:x="base",isClearable:b=!1,fullWidth:S=!1,_dataComponent:w="textfield",min:C,max:k,step:T,inputMode:A="text",width:L,autocomplete:D,size:E,maxLength:N,style:P,onBlur:F,onChange:O,onKeyDown:$,onShapeIconClick:V,onClick:I,onConfirmedChange:B,...G})=>{const[H,W]=j.useState(!1),{anchorRef:J,targetRef:Q}=Ni({position:"bottom",open:H}),tt=j.useId(),it=`${tt}-helper`,X=_?"danger":u,rt=y||!!_,Z=le=>{O?.({bindValue:le.target.value})},vt=()=>{r&&r!=""&&O?.({bindValue:""})},kt=le=>{le.key.toLowerCase()===Cx.key.toLowerCase()&&Cx.ctrlKey===le.ctrlKey&&Cx.altKey===le.altKey&&(le.preventDefault(),W(!0)),le.key=="Enter"&&B?.({bindValue:r}),$?.(le)},{onAdvanceResearchLoadInitialData:Wt,onAdvanceResearchLeafNodeClick:Ht,advanceResearchAutoSelect:ue}=YY(),Fe=le=>{if(Ht){const Nr=p&&"current"in p&&p.current?p.current.value:r;Ht(le,Nr)}W(!1)},We=()=>{if(Wt){const le=G.obj??{t:"",p:"",k:""};return Wt(e||"",le)}return Promise.resolve({type:"SmeupDataTree",children:[]})},Tr={wrapper:`${Pn["smp-textfield-wrapper"]} ${S?Pn["smp-textfield-fullWidth"]:""}`,container:`${Pn["smp-textfield"]} ${t?Pn["smp-textfield-disabled"]:""} ${a?Pn["smp-textfield-placeholder"]:""} ${l?Pn[`smp-textfield-${l}`]:""} ${X?Pn[`smp-textfield-${X}`]:""} ${x?Pn[`smp-textfield-${x}`]:""} ${o?"":Pn["smp-textfield-readOnly"]} ${h?Pn["smp-textfield-top-right-indicator"]:""}`,input:`${Pn["smp-textfield-input"]}`,decodeWrapper:` ${n?Pn["smp-textfield-decode-wrapper"]:""}`};if(c&&(c!=="notSelectable"||o)){const le=Pn[`smp-textfield-variant-${c}`];le&&(Tr.container+=` ${le}`)}const Nt=L?{"--smp-textField-width-base":L,...P}:P,ee=z.jsxs("div",{className:Tr.container,ref:d,style:Nt,children:[i&&z.jsx(me,{icon:i,disabled:t}),z.jsx("input",{id:tt,name:e,type:v,value:r,placeholder:a,onChange:Z,onBlur:F,className:Tr.input,disabled:t,readOnly:!o,onKeyDown:kt,"aria-label":g,ref:p,"aria-describedby":rt?it:void 0,min:C,max:k,step:T,inputMode:A,autoComplete:D,size:E,maxLength:N,onClick:I}),b&&z.jsx(me,{icon:"clear",onClick:vt,tabIndex:0,isInteractable:!0}),s&&z.jsx(me,{icon:s,disabled:t,onClick:V,rotated:f,isInteractable:o,tabIndex:0})]});return z.jsxs("div",{className:Tr.wrapper,"data-component":w,children:[m&&z.jsx(Io,{label:m,disabled:t,htmlFor:tt,helper:G.helper}),z.jsxs("div",{className:Tr.decodeWrapper,ref:J,children:[ee,z.jsx(Sr,{bindValue:n||"",variant:"body",role:"note"}),H&&z.jsx(Ri,{children:z.jsx(s2,{ref:Q,autoSelect:ue,onToolbarLoadInitialData:We,onToolbarLeafNodeClick:Fe,onToolbarClickOutside:()=>W(!1)})})]}),rt&&z.jsx(O0,{helperText:_,disabled:t,state:X,id:it})]})};function y5({items:e,itemHeight:t,containerHeight:r,overscan:n=5}){const[i,a]=j.useState(0),o=j.useRef(null),s=e.length*t,l=Math.max(0,Math.floor(i/t)-n),u=Math.min(e.length-1,Math.floor((i+r)/t)+n),c=[];for(let d=l;d<=u;d++)c.push({item:e[d],index:d,offsetTop:d*t});const h=j.useCallback(d=>{const p=d.target.scrollTop;a(p)},[]),f=d=>{if(!o.current)return;const p=d*t,v=p+t,g=o.current,m=g.scrollTop,y=m+r;p<m?g.scrollTop=p:v>y&&(g.scrollTop=v-r)};return{virtualItems:c,containerProps:{ref:o,style:{maxHeight:`${r}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:h},innerProps:{style:{height:`${s}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:i,viewportHeight:r,totalHeight:s,startIndex:l,endIndex:u},scrollToIndex:f}}function qY(e,t,r="14px IBM Plex Sans, sans-serif",n=32){const a=document.createElement("canvas").getContext("2d");if(!a)return 200;a.font=r;let o=0;for(const s of e){const l=Pp(s.obj?.k,s.decode,t),u=a.measureText(l);o=Math.max(o,u.width)}return Math.ceil(o+n)}const Vu={"smp-list":"_smp-list_1ntom_1","smp-list-floating":"_smp-list-floating_1ntom_7","smp-list-container":"_smp-list-container_1ntom_15","smp-list-listItem":"_smp-list-listItem_1ntom_20","smp-list-listItem-left":"_smp-list-listItem-left_1ntom_40"},XY=10,B0=({id:e,options:t,displayMode:r="Both",ref:n,showFilter:i,selectedIndex:a=null,activeIndex:o=[],width:s,onClick:l,onKeyDown:u,onOpen:c,isOpen:h,floating:f=!1,showLeadingIcon:d=!1})=>{const[p,v]=j.useState(""),g=40,[m,y]=j.useState(a!==null?a:-1),[_,x]=j.useState(s||200),b=j.useRef(null),S=j.useRef(null),w=i!==void 0?i:t.length>XY,C=j.useMemo(()=>{if(!p)return t;const $=V=>typeof V=="string"&&V.toLowerCase().includes(p.toLowerCase());return t.filter(V=>r==="CodeOnly"?$(V.obj?.k):r==="DescOnly"?$(V.decode):!!($(V.obj?.k)||$(V.decode)))},[p,t,r]),k=$=>{v($)},{virtualItems:T,containerProps:A,innerProps:L,scrollToIndex:D}=y5({items:C,itemHeight:g,containerHeight:200,overscan:5});j.useEffect(()=>{a!==null&&a!==m&&y(a)},[a]),j.useEffect(()=>{m>=0&&m<C.length&&D(m)},[m,C]),j.useEffect(()=>{h&&(c?.(S?.current),b?.current&&b.current.focus())},[h,b,c]),j.useEffect(()=>{const $=qY(t,r);x($)},[t,r]);const E=$=>{if($.key==="ArrowDown"||$.key==="ArrowUp"){$.preventDefault();let V=m;$.key==="ArrowDown"?V=m<C.length-1?m+1:0:$.key==="ArrowUp"&&(V=m>0?m-1:C.length-1),y(V)}else $.key==="Enter"?m>=0&&m<C.length&&l?.(C[m]):$.key==="Escape"&&($.preventDefault(),$.stopPropagation());u&&u($)},N=$=>{E($)},P=$=>{E($)},F={wrapper:`${Vu["smp-list"]} ${f?Vu["smp-list-floating"]:""}`,container:`${Vu["smp-list-container"]}`,virtualScroll:`${Vu["smp-list-virtualScroll"]}`,listItem:`${Vu["smp-list-listItem"]}`,listItemLeft:`${Vu["smp-list-listItem-left"]}`},O=f?Math.max(s||0,200):s;return z.jsxs("div",{id:e,ref:n,className:F.wrapper,"data-component":"list",style:{width:f?_:"200px",minWidth:O},children:[w&&z.jsx(mi,{bindValue:p,placeholder:"Search...",fullWidth:!0,onChange:$=>k($.bindValue),onKeyDown:N,inputRef:b}),z.jsx("div",{...A,className:F.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:P,"aria-activedescendant":m>=0&&m<C.length?C[m]?.obj?.k:void 0,children:z.jsx("div",{...L,className:F.virtualScroll,children:T.map(({item:$,index:V,offsetTop:I})=>{const B=$.obj?.k?o.includes($.obj.k):!1;return z.jsxs("li",{ref:m===V?S:null,role:"option",id:V+"li","aria-selected":m===V?"true":"false",tabIndex:-1,className:`${F.listItem} ${m===V?"selected-item":""}`,"aria-label":$.obj?.k+"-"+$.decode,style:{height:`${g}px`,lineHeight:`calc(${g}px - 2*2px)`,transform:`translateY(${I}px)`},onClick:()=>{l?.($),y(V)},children:[z.jsxs("div",{className:F.listItemLeft,children:[d&&z.jsx(me,{icon:$.icon||"",width:16,placeholderIcon:$.placeholderIcon||""}),Pp($.obj?.k,$?.decode||$?.value,r)]}),B&&z.jsx(me,{icon:"check",width:16})]},V+"li")})})})]})},Ja={"smp-floating-toolbar-container":"_smp-floating-toolbar-container_s0udi_11","smp-toolbar-node-content":"_smp-toolbar-node-content_s0udi_29","smp-clickable":"_smp-clickable_s0udi_49","smp-not-clickable":"_smp-not-clickable_s0udi_59","smp-toolbar-node-children-container":"_smp-toolbar-node-children-container_s0udi_69","smp-expanded":"_smp-expanded_s0udi_89","smp-toolbar-node":"_smp-toolbar-node_s0udi_29","smp-toolbar-node-icon-text-container":"_smp-toolbar-node-icon-text-container_s0udi_147","smp-toolbar-node-text":"_smp-toolbar-node-text_s0udi_161"},ZY=({node:e,index:t,level:r,parentId:n,toolbarNodesRefs:i,handleKeyDown:a,handleNodeExpand:o,handleMouseLeave:s,onToolbarLeafNodeClick:l,onToolbarRadioLeafNodeClick:u,renderToolbarNodes:c})=>{const h=Rm(t,n??""),f=(e.children?.length??0)>0,d=!f&&!e?.isLoading&&!ES(e),{anchorRef:p,targetRef:v}=Ni({open:e.isExpanded??!1,position:"right"}),g={node:Ja["smp-toolbar-node"],nodeContent:Ja["smp-toolbar-node-content"],clickable:Ja["smp-clickable"],notClickable:Ja["smp-not-clickable"],iconTextContainer:Ja["smp-toolbar-node-icon-text-container"],nodeText:Ja["smp-toolbar-node-text"],childrenContainer:Ja["smp-toolbar-node-children-container"],expanded:Ja["smp-expanded"]};return e?.shape===ve.RADIO?z.jsx("div",{ref:m=>{m&&i.current.set(h,m)},className:g.node,role:"radiogroup","data-node-id":h,tabIndex:-1,"smp-id":GY(t,n??""),children:z.jsx(B0,{options:e.options?e.options:[],isOpen:!0,"data-node-id":h,displayMode:kc.DESC_ONLY,selectedIndex:e.options?.findIndex(m=>m.obj?.k===e.obj?.k),activeIndex:[e.obj.k],onClick:m=>{u(e,h,m)}},h)},h):z.jsx(z.Fragment,{children:z.jsxs("div",{ref:m=>{m&&i.current.set(h,m)},className:g.node,tabIndex:0,role:"menuitem","data-nodeid":h,"smp-id":`toolbar-item-${t}`,"aria-expanded":e?.isExpanded,onKeyDown:m=>a(m,e,h),onMouseEnter:()=>{o(e,h)},onMouseLeave:()=>{s(h)},onClick:()=>{d&&l?.(e)},children:[z.jsxs("div",{className:`${g.nodeContent} ${d?g.clickable:g.notClickable}`,ref:p,children:[z.jsxs("div",{className:g.iconTextContainer,children:[z.jsx(me,{icon:e.icon??""}),z.jsx("span",{className:g.nodeText,children:z.jsx(Sr,{variant:"body",bindValue:e.value||""})})]}),e.isLoading?z.jsx(me,{icon:"spinner",spin:!0}):f||ES(e)?z.jsx(me,{icon:"chevron-right"}):z.jsx(me,{icon:""})]}),f&&z.jsx(Ri,{children:z.jsx("div",{className:`${g.childrenContainer} ${e.isExpanded?g.expanded:""}`,ref:v,style:{"--smp-toolbar-z-index":`${1001+r}`},children:c(r+1,e.children??[],h)})})]},h)})},Dh=(e,t,r)=>{j.useEffect(()=>{if(!t)return;const n=i=>{e?.some(o=>{if(typeof o=="object"&&o!==null&&"current"in o){const s=o?.current;return s&&s.contains(i.target)}})||r()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,r,t])},s2=({data:e,ref:t,autoSelect:r,onToolbarLoadNodeData:n,onToolbarLeafNodeClick:i,onToolbarLoadInitialData:a,onToolbarClickOutside:o})=>{const s=j.useRef(new Map),[l,u]=j.useState([]),[c,h]=j.useState(e),f=j.useCallback(x=>{x?.current&&u(b=>b.some(S=>S.current===x.current)?b:[...b,x])},[]);Dh(l,!0,()=>{u([]),o?.()}),j.useEffect(()=>{c&&s.current.forEach(x=>{x&&f({current:x})})},[c,f]);const{handleNodeExpand:d,handleMouseLeave:p,onToolbarRadioLeafNodeClick:v}=UY(h,n,i),{handleKeyDown:g}=WY(h,s,d),m=g5(400),y={floatingContainer:Ja["smp-floating-toolbar-container"]};j.useEffect(()=>{if(!c&&a){const x=a();x&&typeof x.then=="function"&&x.then(b=>{r&&b?.children&&b.children.length===1&&typeof i=="function"?i(b.children[0]):h(b)}).catch(b=>{console.error("Errore nel caricamento dati iniziali - Toolbar",b)}),Zg(s,Rm(0))}},[e,m,a,c,r,i]);const _=j.useCallback((x,b,S=null)=>b?.length?z.jsx(z.Fragment,{children:b.map((w,C)=>z.jsx(ZY,{node:w,index:C,level:x,parentId:S,toolbarNodesRefs:s,handleKeyDown:g,handleNodeExpand:d,handleMouseLeave:p,onToolbarLeafNodeClick:i,onToolbarRadioLeafNodeClick:v,renderToolbarNodes:_},Rm(C,S??"")))}):null,[g,d,p,i,v]);return!c||!c?.children?.length?null:z.jsx("div",{ref:t,className:`${t?y.floatingContainer:null}`,"aria-label":"Toolbar","data-component":"toolbar","smp-id":"toolbar-menu",children:_(0,c.children)})},bL=/_G?(?:\d{2}[A-Z0-9]\d{2}_|\*(?:BOLD|ERROR|ITALIC|UNDERLINE)_)|_n_/g;function KY(e){return/_G?(?:\d{2}[A-Z0-9]\d{2}_|\*(?:BOLD|ERROR|ITALIC|UNDERLINE)_)|_n_/.test(e)}function JY(e){const t=[];let r=0,n,i=null;for(;n=bL.exec(e);){const a=n.index;if(a>r){const s=e.substring(r,a);i?i.content+=s:t.push({content:s})}const o=n[0];if(o==="_n_")i?(i.closed=!0,i=null):t.push({content:""});else{const s=o.replace(/^_G?/,"").replace(/_$/,"");i&&(i.closed=!0),i={tag:s,content:""},t.push(i)}r=bL.lastIndex}if(r<e.length){const a=e.substring(r);i?i.content+=a:t.push({content:a})}return i&&(i.closed=!0),t}function QY(e){return JY(e)?.map((t,r)=>{const n=t.content||"";if(t.tag){const i=eq(t.tag);return z.jsx("span",{"data-gcell-code":t.tag,style:i,children:n},r)}return z.jsx("span",{children:n},r)})}const tq=/^[a-zA-Z0-9]+$/,SL={"*BOLD":{fontWeight:"bold"},"*ERROR":{color:"white",backgroundColor:"red"},"*UNDERLINE":{textDecoration:"underline"},"*ITALIC":{fontStyle:"italic"}};function eq(e){if(!e)return{};if(SL[e])return SL[e];if(!tq.test(e))return{};let t={};return e.split("").forEach((r,n)=>{switch(n){case 0:t.color=`var(--smp-gcell-color-${r})`;break;case 1:t=rq(t,r);break;case 2:t.background=`var(--smp-gcell-background-color-${r})`;break;case 3:t.fontFamily=`var(--smp-gcell-font-family-${r})`;break}}),t}function rq(e,t){switch(t){case"1":return{...e,fontWeight:"bold"};case"2":return{...e,fontStyle:"italic"};case"3":return{...e,textDecoration:"underline"};default:return e}}const Sr=({variant:e="body",bindValue:t,color:r,role:n,className:i,style:a,toolbar:o,justifiedContent:s,onToolbarLeafNodeClick:l,onToolbarLoadInitialData:u,onToolbarLoadNodeData:c,onAiIconClick:h,...f})=>{const d=$Y[e],[p,v]=j.useState(!1),{anchorRef:g,targetRef:m}=Ni({position:"bottom",open:p}),y=b=>b?b.split(" ").filter(Boolean).map(S=>$u[S]||S).join(" "):"",_={container:`${$u["smp-typography"]} ${e?$u[`smp-typography-${e}`]:""} ${f.disabled?$u["smp-typography-disabled"]:""} ${s?$u[`smp-typography-${s}`]:""} ${y(i)}`,toolbar:`${$u["smp-typography-toolbar"]} `},x=b=>{l&&l(b),v(!1)};return z.jsxs(z.Fragment,{children:[z.jsxs(d,{"data-component":"typography",className:_.container,disabled:f.disabled,style:{"--smp-typography-color-base":r,...a},role:n,children:[KY(t)?QY(t):t,o&&z.jsx("div",{"smp-id":"toolbar-button",ref:g,className:_.toolbar,children:z.jsx(me,{tabIndex:0,icon:"more_vert",isInteractable:!0,onClick:b=>{b.stopPropagation(),v(!0)}})}),h&&z.jsx("div",{"smp-id":"typography-ai-icon",className:_.toolbar,children:z.jsx(me,{tabIndex:0,icon:"smeup-ai",title:"Smeup AI",isInteractable:!0,onClick:b=>{b.stopPropagation(),h()}})})]}),p&&z.jsx(Ri,{children:z.jsx(s2,{ref:m,onToolbarLeafNodeClick:x,onToolbarLoadNodeData:c,onToolbarLoadInitialData:u,onToolbarClickOutside:()=>v(!1)})})]})},qi={"smp-tabbar-container":"_smp-tabbar-container_ly1md_1","smp-tabbar-scroll-button":"_smp-tabbar-scroll-button_ly1md_9","smp-tabbar-scroll-buttonRight":"_smp-tabbar-scroll-buttonRight_ly1md_14","smp-tabbar-scroll-buttonLeft":"_smp-tabbar-scroll-buttonLeft_ly1md_18","smp-tabbar-list-wrapper":"_smp-tabbar-list-wrapper_ly1md_22","smp-tabbar-list":"_smp-tabbar-list_ly1md_22","smp-tabbar-tab":"_smp-tabbar-tab_ly1md_39","smp-active":"_smp-active_ly1md_63","smp-tabbar-tab-extraSmall":"_smp-tabbar-tab-extraSmall_ly1md_76","smp-tabbar-tab-small":"_smp-tabbar-tab-small_ly1md_81","smp-tabbar-tab-base":"_smp-tabbar-tab-base_ly1md_86","smp-tabbar-tab-large":"_smp-tabbar-tab-large_ly1md_91","smp-tabbar-tab-extraLarge":"_smp-tabbar-tab-extraLarge_ly1md_96"},_5=({data:e,sizing:t="large",selectedIndex:r,onTabChange:n,onToolbarLoadInitialData:i,onToolbarLoadNodeData:a,onToolbarLeafNodeClick:o,onTabAiIconClick:s})=>{const[l,u]=j.useState(r??0),[c,h]=j.useState(!1),[f,d]=j.useState(!1),p=j.useRef(null);if(j.useEffect(()=>{const b=p.current;if(!b)return;y();const S=()=>y();return b.addEventListener("scroll",S),window.addEventListener("resize",y),()=>{b.removeEventListener("scroll",S),window.removeEventListener("resize",y)}},[]),j.useEffect(()=>{r!==void 0&&u(r)},[r]),!e.children||e.children.length===0)return z.jsx("div",{className:"tab-bar-empty",children:"No tabs available"});const v={container:qi["smp-tabbar-container"],listWrapper:qi["smp-tabbar-list-wrapper"],list:qi["smp-tabbar-list"],tab:`${qi["smp-tabbar-tab"]} ${t?qi[`smp-tabbar-tab-${t}`]:""}`,scrollButtonRight:`${qi["smp-tabbar-scroll-button"]} ${qi["smp-tabbar-scroll-buttonRight"]}`,scrollButtonLeft:`${qi["smp-tabbar-scroll-button"]} ${qi["smp-tabbar-scroll-buttonLeft"]}`,active:qi["smp-active"]},g=100,m=2,y=()=>{const b=p.current;b&&(h(b.scrollLeft>0),d(b.scrollLeft+b.clientWidth<b.scrollWidth-m))},_=()=>{p.current?.scrollBy({left:-g,behavior:"smooth"})},x=()=>{p.current?.scrollBy({left:g,behavior:"smooth"})};return z.jsxs("div",{className:v.container,role:"tabpanel","data-component":"tab-bar",children:[c&&z.jsx("div",{className:v.scrollButtonLeft,children:z.jsx(Be,{bindValue:"",optionalDisplayValue:"<",onClick:_,variant:"base",sizing:t})}),z.jsx("div",{className:v.listWrapper,children:z.jsx("div",{className:v.list,ref:p,role:"tablist",children:e.children.map((b,S)=>{const w=b.data?.agentCode;return z.jsxs("button",{type:"button","data-comp-id-tab":b.data?.["data-comp-id"]??void 0,className:`${S===l?v.active:""} ${v.tab} `,role:"tab","aria-selected":S===l,tabIndex:S===l?0:-1,onClick:()=>{n?.(S,b),u(S)},children:[b.icon&&z.jsx(me,{icon:b.icon,placeholderIcon:b.placeholderIcon}),z.jsx(Sr,{variant:"body",bindValue:b.decode||`Tab ${S+1}`,...b.data?.toolbar===!0&&l===S?{toolbar:!0,onToolbarLeafNodeClick:o,onToolbarLoadInitialData:i,onToolbarLoadNodeData:a}:{},...w&&s&&l===S?{onAiIconClick:()=>s(w)}:{}})]},S)})})}),f&&z.jsx("div",{className:v.scrollButtonRight,children:z.jsx(Be,{bindValue:"",optionalDisplayValue:">",onClick:x,variant:"base",sizing:t})})]})},Nm=({children:e,layout:t={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(e)?e.map(r=>({id:r.props.id})):[{id:e.props.id}]}]}})=>{const[r,n]=j.useState(0),i={};j.Children.forEach(e,p=>{j.isValidElement(p)&&(i[p.props.id]=p)});const a="--smp-grid-template-cols",o="--smp-grid-template-rows",s=v5(t.sections??[],Object.keys(i)),l=p=>p.reduce((v,g)=>{let m="",y={},_={},x="";return g.sections?.length?(m=In["smp-layout-section-grid"],y=l(g.sections),g.gridCols===void 0&&(x=In[g.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],g.horizontal||yL(g.sections)?_=mL(g.sections,g.horizontal?a:o):_={[a]:"auto",[o]:"auto"})):g.content?.length&&(g.gridCols!==void 0&&g.gridCols>0?(m=In["smp-layout-section-grid"],x=In["smp-grid-template-cols"],_={[a]:`repeat(${g.gridCols}, 1fr)`}):m=In["smp-layout-section-flex"]),{...v,...y,[g.id||""]:{classes:`${m} ${In[g.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${x} ${g.justify?`${Jo[`smp-justifyContent-${g.justify}`]}`:""} ${g.align?`${Jo[`smp-alignItems-${g.align}`]}`:""}`,styles:_}}},{}),u=l(s),c=`${In["smp-layout"]} ${t.horizontal?In["smp-layout-horizontal"]:In["smp-layout-vertical"]} ${t.inline?In["smp-layout-inline"]:""}`;let h={};(t.horizontal||yL(t.sections||[]))&&(h=mL(s,t.horizontal?a:o));const f=(p,v)=>{const g=z.jsx("div",{"smp-id":`section-${p.id}`,className:u[p.id||""].classes,style:u[p.id||""].styles,children:p.sections?.length?p.sections.map(m=>f(m)):p.content?.map(m=>d(m,p.justify,p.align))},`section-${p.id}`);return p.title&&!v?z.jsxs("div",{className:In["smp-layout-section-with-title"],children:[z.jsx("span",{className:`${In["smp-layout-section-title"]} ${p.justify?Jo[`smp-justifyContent-${p.justify}`]:""} ${p.align?Jo[`smp-alignItems-${p.align}`]:""}`,children:z.jsx(Io,{label:p.title})}),g]},`title-section-${p.id}`):g},d=(p,v,g)=>{const m=i[p.id||""];if(!m)return null;const _={gridColumnStart:(p.colSpan&&p.colSpan>0?`span ${p.colSpan}`:p.colStart&&p.colStart<1?"1":void 0)??p.colStart,gridColumnEnd:p.colEnd&&p.colEnd>0?p.colEnd:void 0},x=`${In["smp-layout-cell-container"]} ${v?Jo[`smp-justifyContent-${v}`]:""} ${g?Jo[`smp-alignItems-${g}`]:""}`;return z.jsx("div",{className:x,style:_,"smp-id":p.id,children:m},p.id)};return z.jsxs("div",{className:c,style:h,"smp-id":"layout",children:[t.sectionsType==="tab"&&t.sections&&t?.sections.length>1&&z.jsx(_5,{data:{type:"SmeupDataTree",children:s.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0,toolbar:!1}))},selectedIndex:r,onTabChange:n}),t.sectionsType?f(s[r],!0):s.map(p=>f(p))]})},nq={"smp-appbar":"_smp-appbar_ui0tb_1"};var x5=(e=>(e.Auto="auto",e.Always="always",e))(x5||{});const sf={"smp-breadcrumbs":"_smp-breadcrumbs_825j3_1","smp-breadcrumb-item":"_smp-breadcrumb-item_825j3_6","smp-breadcrumb-link":"_smp-breadcrumb-link_825j3_12","smp-breadcrumb-ellipsis":"_smp-breadcrumb-ellipsis_825j3_26"},iq=e=>e?.type==="SmeupDataTree",aq=e=>e?.type==="SmeupDataTable",Kg={obj:{t:"",p:"",k:""},decode:"",shape:void 0},b5=(e,t=1)=>e.reduce((r,n)=>{const i=n.children?.length?b5(n.children,t+1):t;return Math.max(r,i)},t),bo=e=>{if(aq(e)){const t=e,r=t.columns.filter(a=>a.visible!==!1),n=r[0]?.name??"",i=r[1]?.name??n;return t.rows.reduce((a,o)=>{const s={...o.cells?.[n],decode:o.cells?.[i]?.value||o.cells?.[n].obj?.k};return[...a,s]},[])}else if(iq(e))return S5(e.children??[])},S5=e=>e?.map(t=>({...t,decode:t.decode||t.value||t.obj?.k||"",children:S5(t.children??[])})),w5=({data:e,fun:t,onOptionsRequest:r,onClick:n,options:i,CollapseThr:a,CollapseMode:o=x5.Auto,onToolbarLeafNodeClick:s,onToolbarLoadNodeData:l,onToolbarLoadInitialData:u})=>{const c=e?.children||i,[h,f]=j.useState(c);j.useEffect(()=>{f(c)},[c]);const d=j.useRef(null),[p,v]=j.useState(!1),[g,m]=j.useState(0);j.useEffect(()=>{!h&&r&&t&&r(t,void 0).then(P=>f(bo(P)||[])).catch(P=>{console.error("Errore nel caricamento delle opzioni per Breadcrumbs",P)})},[h,t,r]);const{anchorRef:y,targetRef:_,anchorWidth:x}=Ni({position:"bottom",open:p}),b=j.useCallback(()=>{v(!1),d?.current?.focus()},[]);Dh([_],p,()=>b());const S={breadcrumbs:sf["smp-breadcrumbs"],breacrumbItem:sf["smp-breadcrumb-item"],link:sf["smp-breadcrumb-link"],lastElement:sf["smp-breadcrumb-current"],ellipsis:sf["smp-breadcrumb-ellipsis"]},w=P=>{P.key==="Escape"&&b()},C=P=>{n?.(P)},k=P=>{const F=Math.max(Number(a)||3,3);let O=!1,$;const V=P&&P[P.length-1];let I;switch(o){case"always":I=P&&P.slice(0,P.length-1),O=!!(I&&I.length>0);break;case"auto":default:O=P&&P.length>F,$=P&&P.length>1?P[0]:void 0,I=P&&P.slice(1,P.length-1);break}return{shouldCollapse:O,first:$,last:V,middleItems:I}},T=P=>{P?.focus()},A=(P,F,O)=>{if(!P)return;const $=P?.decode||P?.value||P?.obj?.k;return z.jsxs("li",{className:S.breacrumbItem,"aria-current":O?"page":void 0,children:[(P?.icon||P?.placeholderIcon)&&z.jsx(me,{icon:P.icon||"",placeholderIcon:P.placeholderIcon||"",width:16}),P?.fun&&!O?z.jsx("a",{href:"/",onClick:V=>{V.preventDefault(),C?.(P)},className:S.link,children:z.jsx(Sr,{variant:"body",bindValue:$||""})}):z.jsx("div",{className:S.lastElement,children:z.jsx(Sr,{variant:"body",bindValue:$||"",toolbar:O&&!!u,onToolbarLeafNodeClick:s,onToolbarLoadNodeData:l,onToolbarLoadInitialData:u})})]},F)},{shouldCollapse:L,first:D,last:E,middleItems:N}=k(h);return z.jsx("nav",{"aria-label":"Breadcrumbs",children:z.jsxs("ol",{className:S.breadcrumbs,children:[A(D,0,!1),L&&z.jsxs("li",{ref:d,className:`${S.breacrumbItem} ${S.ellipsis}`,children:[z.jsx("div",{ref:y,"aria-label":"Show more breadcrumbs",children:z.jsx(me,{icon:"more_horiz",isInteractable:!0,tabIndex:0,onClick:P=>{P.preventDefault(),v(F=>!F),m(0)}})}),p&&z.jsx(Ri,{children:z.jsx(B0,{options:N||[],onClick:C,ref:_,width:x,showFilter:!1,onKeyDown:w,onOpen:T,isOpen:p,floating:!0,selectedIndex:g,displayMode:"DescOnly",showLeadingIcon:!0})})]}),!L&&N?.map((P,F)=>A(P,F+1,!1)),A(E,h&&h.length-1||0,!0)]})})},PS=e=>e?e.t=="D8"||e.t=="A8":!1,C5=e=>e?e.t=="NR":!1,oq=e=>e?e.t=="I1":!1,sq=e=>{if(e){const t=e.split(";");if(t.length>=3)return{t:t[0],p:t[1],k:t.slice(2).join(";")}}return{t:"",p:"",k:""}};class Om{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){return new Om(t,!!(t&&(t.k=="1"||t.k=="true")))}getValue(){return this.value}getLegacyValue(){if(this.class?.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function lq(e,t){if(Dc(e)){const c=new Date(e);if(!isNaN(c.getTime()))return c}const r=new Date;let n;/[/-]/.test(e)?n=e.split(/[/-]/).map((h,f)=>f<2&&h.length===1?"0"+h:h).join(""):n=e.replaceAll("/","").replaceAll("-","");let i="DDMMYYYY";t==="en"&&(i="MMDDYYYY");const a=i.indexOf("DD"),o=i.indexOf("MM");let s=0,l=0,u="";switch(n.length){case 1:case 2:return s=parseInt(n),r.setDate(s),_v(r)?r:e;case 3:case 4:return s=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),o===0?(r.setMonth(s-1),r.setDate(l)):a===0&&(r.setMonth(l-1),r.setDate(s)),_v(r)?r:e;case 5:case 6:{s=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),Number(n.substring(4))>=50?u="19"+n.substring(4):u="20"+n.substring(4);let c=0,h=0;return o===0?(c=l,h=s-1,r.setFullYear(parseInt(u),h,c)):a===0&&(c=s,h=l-1,r.setFullYear(parseInt(u),h,c)),eh(s,h,parseInt(u))&&_v(r)?r:e}case 7:case 8:{s=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),u=n.substring(4);let c=0,h=0;return o===0?(c=l,h=s-1,r.setFullYear(parseInt(u),h,c)):a===0&&(c=s,h=l-1,r.setFullYear(parseInt(u),h,c)),eh(c,h,parseInt(u))&&_v(r)?r:e}}return e}function Dc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&e.length===10}function _v(e){return e instanceof Date&&!isNaN(e.getTime())}function uq(e){if(!/^\d{8}$/.test(e))return!1;const t=parseInt(e.slice(0,4),10),r=parseInt(e.slice(4,6),10),n=parseInt(e.slice(6,8),10);return eh(n,r-1,t)}function cq(e){if(!/^\d{6}$/.test(e))return!1;const t=parseInt(Bm(e.substring(0,2))+e.substring(0,2),10),r=parseInt(e.slice(2,4),10),n=parseInt(e.slice(4,6),10);return eh(n,r-1,t)}function hq(e){if(!/^\d{6}$/.test(e))return!1;const t=parseInt(Bm(e.substring(4,6))+e.substring(4,6),10),r=parseInt(e.slice(2,4),10),n=parseInt(e.slice(0,2),10);return eh(n,r-1,t)}function fq(e){if(!/^\d{8}$/.test(e))return!1;const t=parseInt(e.slice(4,8),10),r=parseInt(e.slice(2,4),10),n=parseInt(e.slice(0,2),10);return eh(n,r-1,t)}function Bm(e){return parseInt(e.substring(0,2))>39?"19":"20"}function eh(e,t,r){const n=[31,dq(r)?29:28,31,30,31,30,31,31,30,31,30,31];return!(t<0||t>11||e<1||e>n[t])}function dq(e){return e%4===0&&(e%100!==0||e%400===0)}function pq(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return isNaN(t)||isNaN(Number(r))||isNaN(Number(n))?e.toString():`${t}-${r}-${n}`}class rh{class;date;constructor(t,r){this.class=t,this.date=r}static fromDataObj(t){if(t){const r=wL.get(`${t.t}${t.p}`);if(r)return new rh(t,r.legacyToIso(t.k));throw new Error(`Date creation from ${t.t}${t.p} not implemented yet`)}else throw new Error("Date creation from obj undefined not implemented yet")}getLegacyValue(){if(this.class){const t=wL.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}throw new Error("Date object not implemented for obj undefined")}getValue(){return this.date}}const wL=new Map([["D8*YYMD",{legacyToIso(e){return uq(e)&&`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`||e},isoToLegacy(e){return Dc(e)&&e.replaceAll("-","")||e}}],["D8*YMD",{legacyToIso(e){return cq(e)?`${Bm(e.substring(0,2))+e.substring(0,2)}-${e.substring(2,4)}-${e.substring(4,6)}`:e},isoToLegacy(e){if(Dc(e)){const t=e.split("-");return t[0].substring(2)+t[1]+t[2]}return e}}],["D8*DMY",{legacyToIso(e){return hq(e)?`${Bm(e.substring(4,6))+e.substring(4,6)}-${e.substring(2,4)}-${e.substring(0,2)}`:e},isoToLegacy(e){if(Dc(e)){const t=e.split("-");return t[2]+t[1]+t[0].substring(2)}return e}}],["D8*DMYY",{legacyToIso(e){return fq(e)?`${e.substring(4,8)}-${e.substring(2,4)}-${e.substring(0,2)}`:e},isoToLegacy(e){if(Dc(e)){const t=e.split("-");return t[2]+t[1]+t[0]}return e}}],["A8",{legacyToIso(e){return e},isoToLegacy(e){return e}}]]);class Jl{class;value;decimalSeparator;constructor(t,r,n="."){this.class=t,this.value=r,this.decimalSeparator=n}static fromDataObj(t,r){if(t){const n=r==="."?",":".";if(t.k==="")return new Jl(t,void 0,r);let i=t.k.trim();const a=i.endsWith("-");a&&(i=i.slice(0,-1));const s=i.replace(new RegExp(`\\${n}`,"g"),"").replace(r,"."),l=parseFloat(s),u=a?-l:l;return new Jl(t,u,r)}throw new Error("Number not implemented for obj undefined")}getLegacyValue(){return this.value!=null?this.value.toString().replace(".",this.decimalSeparator):""}getValue(){return this.value}}function vq(e){return typeof e=="string"&&/^\d{6}$/.test(e)}class Fm{class;time;constructor(t,r){this.class=t,this.time=r}static fromDataObj(t){if(t){const r=CL.get(`${t.t}${t.p}`);if(r)return new Fm(t,r.legacyToIso(t.k));throw new Error(`time creation from ${t.t}${t.p} not implemented yet`)}throw new Error("time creation from obj undefined not implemented yet")}getLegacyValue(){if(this.class){const t=CL.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}throw new Error("Time object not implemented for obj undefined")}getValue(){return this.time}}const CL=new Map([["I12",{legacyToIso(e){return vq(e)&&`${e.substring(0,2)}:${e.substring(2,4)}:${e.substring(4,6)}`||e},isoToLegacy(e){return e.replaceAll(":","")||e}}]]),re=e=>typeof e=="string",lf=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},TL=e=>e==null?"":""+e,gq=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},mq=/###/g,kL=e=>e&&e.indexOf("###")>-1?e.replace(mq,"."):e,AL=e=>!e||re(e),Sd=(e,t,r)=>{const n=re(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(AL(e))return{};const a=kL(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return AL(e)?{}:{obj:e,k:kL(n[i])}},DL=(e,t,r)=>{const{obj:n,k:i}=Sd(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Sd(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Sd(e,o,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},yq=(e,t,r,n)=>{const{obj:i,k:a}=Sd(e,t,Object);i[a]=i[a]||[],i[a].push(r)},$m=(e,t)=>{const{obj:r,k:n}=Sd(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},_q=(e,t,r)=>{const n=$m(e,r);return n!==void 0?n:$m(t,r)},T5=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?re(e[n])||e[n]instanceof String||re(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):T5(e[n],t[n],r):e[n]=t[n]);return e},zu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var xq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const bq=e=>re(e)?e.replace(/[&<>"'\/]/g,t=>xq[t]):e;class Sq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const wq=[" ",",","?","!",";"],Cq=new Sq(20),Tq=(e,t,r)=>{t=t||"",r=r||"";const n=wq.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=Cq.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},RS=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=a;l<n.length;++l)if(l!==a&&(s+=r),s+=n[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;a+=l-a+1;break}i=o}return i},Gd=e=>e?.replace("_","-"),kq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Vm{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||kq,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(re(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new Vm(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Vm(this.logger,t)}}var da=new Vm;class F0{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i.apply(i,[t,...r])})}}class LL extends F0{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,i={}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],n&&(Array.isArray(n)?s.push(...n):re(n)&&a?s.push(...n.split(a)):s.push(n)));const l=$m(this.data,s);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),l||!o||!re(n)?l:RS(this.data?.[t]?.[r],n,a)}addResource(t,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,r];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),DL(this.data,s,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n,i={silent:!1}){for(const a in n)(re(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a,o={silent:!1,skipCopy:!1}){let s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let l=$m(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?T5(l,n,a):l={...l,...n},DL(this.data,s,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var k5={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{t=this.processors[a]?.process(t,r,n,i)??t}),t}};const A5=Symbol("i18next/PATH_KEY");function Aq(){const e=[],t=Object.create(null);let r;return t.get=(n,i)=>(r?.revoke?.(),i===A5?e:(e.push(i),r=Proxy.revocable(n,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function NS(e,t){const{[A5]:r}=e(Aq());return r.join(t?.keySeparator??".")}const ML={},Tx=e=>!re(e)&&typeof e!="boolean"&&typeof e!="number";class zm extends F0{constructor(t,r={}){super(),gq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=da.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};if(t==null)return!1;const i=this.resolve(t,n);if(i?.res===void 0)return!1;const a=Tx(i.res);return!(n.returnObjects===!1&&a)}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Tq(t,n,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:re(a)?[a]:a};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(i)}return{key:t,namespaces:re(a)?[a]:a}}translate(t,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=NS(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const h=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return f?a?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;const d=this.resolve(t,i);let p=d?.res;const v=d?.usedKey||s,g=d?.exactUsedKey||s,m=["[object Number]","[object Function]","[object RegExp]"],y=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!re(i.count),b=zm.hasDefaultValue(i),S=x?this.pluralResolver.getSuffix(h,i.count,i):"",w=i.ordinal&&x?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",C=x&&!i.ordinal&&i.count===0,k=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${w}`]||i.defaultValue;let T=p;_&&!p&&b&&(T=k);const A=Tx(T),L=Object.prototype.toString.apply(T);if(_&&T&&A&&m.indexOf(L)<0&&!(re(y)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,T,{...i,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(d.res=D,d.usedParams=this.getUsedParamsDetails(i),d):D}if(o){const D=Array.isArray(T),E=D?[]:{},N=D?g:v;for(const P in T)if(Object.prototype.hasOwnProperty.call(T,P)){const F=`${N}${o}${P}`;b&&!p?E[P]=this.translate(F,{...i,defaultValue:Tx(k)?k[P]:void 0,joinArrays:!1,ns:l}):E[P]=this.translate(F,{...i,joinArrays:!1,ns:l}),E[P]===F&&(E[P]=T[P])}p=E}}else if(_&&re(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,i,n));else{let D=!1,E=!1;!this.isValidLookup(p)&&b&&(D=!0,p=k),this.isValidLookup(p)||(E=!0,p=s);const P=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:p,F=b&&k!==p&&this.options.updateMissing;if(E||D||F){if(this.logger.log(F?"updateKey":"missingKey",h,u,s,F?k:p),o){const I=this.resolve(s,{...i,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let I=0;I<$.length;I++)O.push($[I]);else this.options.saveMissingTo==="all"?O=this.languageUtils.toResolveHierarchy(i.lng||this.language):O.push(i.lng||this.language);const V=(I,B,G)=>{const H=b&&G!==p?G:P;this.options.missingKeyHandler?this.options.missingKeyHandler(I,u,B,H,F,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(I,u,B,H,F,i),this.emit("missingKey",I,u,B,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?O.forEach(I=>{const B=this.pluralResolver.getSuffixes(I,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(G=>{V([I],s+G,i[`defaultValue${G}`]||k)})}):V(O,s,k))}p=this.extendTranslation(p,t,i,d,n),E&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${s}`),(E||D)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,D?p:void 0,i))}return a?(d.res=p,d.usedParams=this.getUsedParamsDetails(i),d):p}extendTranslation(t,r,n,i,a){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=re(t)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const h=t.match(this.interpolator.nestingRegexp);u=h&&h.length}let c=n.replace&&!re(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,n.lng||this.language||i.usedLng,n),l){const h=t.match(this.interpolator.nestingRegexp),f=h&&h.length;u<f&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>a?.[0]===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${r[0]}`),null):this.translate(...h,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s=re(o)?[o]:o;return t!=null&&s?.length&&n.applyPostProcessor!==!1&&(t=k5.handle(s,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,i,a,o,s;return re(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;i=c;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const f=r.count!==void 0&&!re(r.count),d=f&&!r.ordinal&&r.count===0,p=r.context!==void 0&&(re(r.context)||typeof r.context=="number")&&r.context!=="",v=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(g=>{this.isValidLookup(n)||(s=g,!ML[`${v[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(ML[`${v[0]}-${g}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,m,g,r);else{let x;f&&(x=this.pluralResolver.getSuffix(m,r.count,r));const b=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&x.indexOf(S)===0&&y.push(c+x.replace(S,this.options.pluralSeparator)),y.push(c+x),d&&y.push(c+b)),p){const w=`${c}${this.options.contextSeparator||"_"}${r.context}`;y.push(w),f&&(r.ordinal&&x.indexOf(S)===0&&y.push(w+x.replace(S,this.options.pluralSeparator)),y.push(w+x),d&&y.push(w+b))}}let _;for(;_=y.pop();)this.isValidLookup(n)||(a=_,n=this.getResource(m,g,_,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!re(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class EL{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=da.create("languageUtils")}getScriptPartFromCode(t){if(t=Gd(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Gd(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(re(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),re(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return re(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):re(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const IL={zero:0,one:1,two:2,few:3,many:4,other:5},PL={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Dq{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=da.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=Gd(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),PL;if(!t.match(/-|_/))return PL;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>IL[i]-IL[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,r,n={}){const i=this.getRule(t,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const RL=(e,t,r,n=".",i=!0)=>{let a=_q(e,t,r);return!a&&i&&re(r)&&(a=RS(e,r,n),a===void 0&&(a=RS(t,r,n))),a},kx=e=>e.replace(/\$/g,"$$$$");class Lq{constructor(t={}){this.logger=da.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=r!==void 0?r:bq,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?zu(a):o||"{{",this.suffix=s?zu(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?zu(f):d||zu("$t("),this.nestingSuffix=p?zu(p):v||zu(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r?.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=d=>{if(d.indexOf(this.formatSeparator)<0){const m=RL(r,l,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const p=d.split(this.formatSeparator),v=p.shift().trim(),g=p.join(this.formatSeparator).trim();return this.format(RL(r,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...i,...r,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>kx(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?kx(this.escape(d)):kx(d)}].forEach(d=>{for(s=0;a=d.regex.exec(t);){const p=a[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const g=c(t,a,i);o=re(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(h){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!re(o)&&!this.useRawValueToEscape&&(o=TL(o));const v=d.safeValue(o);if(t=t.replace(a[0],v),h?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,r,n={}){let i,a,o;const s=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const h=l.split(new RegExp(`${c}[ ]*{`));let f=`{${h[1]}`;l=h[0],f=this.interpolate(f,o);const d=f.match(/'/g),p=f.match(/"/g);((d?.length??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!re(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(l=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&!re(a))return a;re(a)||(a=TL(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),l.length&&(a=l.reduce((c,h)=>this.format(c,h,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const Mq=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},NL=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=t[o];return s||(s=e(Gd(n),i),t[o]=s),s(r)}},Eq=e=>(t,r,n)=>e(Gd(r),n)(t);class Iq{constructor(t={}){this.logger=da.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?NL:Eq;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return s=>o.format(s)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return s=>o.format(s)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return s=>o.format(s)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return s=>o.format(s,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return s=>o.format(s)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=NL(r)}format(t,r,n,i={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:c}=Mq(l);if(this.formats[u]){let h=s;try{const f=i?.formatParams?.[i.interpolationkey]||{},d=f.locale||f.lng||i.locale||i.lng||n;h=this.formats[u](s,d,{...c,...i,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const Pq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Rq extends F0{constructor(t,r,n,i={}){super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=da.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},s={},l={};return t.forEach(u=>{let c=!0;r.forEach(h=>{const f=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),a[f]===void 0&&(a[f]=!0),l[h]===void 0&&(l[h]=!0)))}),c||(s[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const s={};this.queue.forEach(l=>{yq(l.loaded,[a],o),Pq(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(h=>{s[u][h]===void 0&&(s[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n,i=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(t,r);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,r,s)}prepareLoading(t,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();re(t)&&(t=this.languageUtils.toResolveHierarchy(t)),re(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,r,n,i,a,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){const l={...o,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,r,n,i,l):c=u(t,r,n,i),c&&typeof c.then=="function"?c.then(h=>s(null,h)).catch(s):s(null,c)}catch(c){s(c)}else u(t,r,n,i,s,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const OL=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),re(e[1])&&(t.defaultValue=e[1]),re(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),BL=e=>(re(e.ns)&&(e.ns=[e.ns]),re(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),re(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),xv=()=>{},Nq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class Wd extends F0{constructor(t={},r){if(super(),this.options=BL(t),this.services={},this.logger=da,this.modules={external:[]},Nq(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(re(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=OL();this.options={...n,...this.options,...BL(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?da.init(i(this.modules.logger),this.options):da.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Iq;const c=new EL(this.options);this.store=new LL(this.options.resources,this.options);const h=this.services;h.logger=da,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new Dq(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(h.formatter=i(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Lq(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Rq(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.languageDetector&&(h.languageDetector=i(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=i(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new zm(this.services,this.options),this.translator.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,r||(r=xv),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const s=lf(),l=()=>{const u=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(h),r(c,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,r=xv){let n=r;const i=re(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,r,n){const i=lf();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=xv),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&k5.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=lf();this.emit("languageChanging",t);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===t&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(s,(...u)=>this.t(...u))},o=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const l=re(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(re(s)?[s]:s);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,c=>{a(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const i=(a,o,...s)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([a,o].concat(s)):l={...o},l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||i.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(a)?c=a.map(h=>(typeof h=="function"&&(h=NS(h,{...this.options,...o})),`${l.keyPrefix}${u}${h}`)):(typeof a=="function"&&(a=NS(a,{...this.options,...o})),c=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a),this.t(c,l)};return re(t)?i.lng=t:i.lngs=t,i.ns=r,i.keyPrefix=n,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=lf();return this.options.ns?(re(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=lf();re(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const a=i.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new EL(OL());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new Wd(t,r)}cloneInstance(t={},r=xv){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new Wd(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,h)=>(c[h]={...l[u][h]},c),l[u]),l),{});a.store=new LL(s,i),a.services.resourceStore=a.store}return a.translator=new zm(a.services,i),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const cr=Wd.createInstance();cr.createInstance=Wd.createInstance;cr.createInstance;cr.dir;cr.init;cr.loadResources;cr.reloadResources;cr.use;cr.changeLanguage;cr.getFixedT;cr.t;cr.exists;cr.setDefaultNamespace;cr.hasLoadedNamespace;cr.loadNamespaces;cr.loadLanguages;const Oq={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Bq={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Fq={AddSubGroup:"Aggiungi sottogruppo",AddFilter:"Aggiungi Filtro",Operator:{String:{Starts:"Inizia per",Contains:"Contiene",Equals:"È uguale a"},Number:{Greater:"Maggiore di",GreaterOrEqual:"Maggiore o uguale a",Less:"Minore di",LessOrEqual:"Minore o uguale a",Equals:"Uguale a",NotEquals:"Diverso da"},Date:{Before:"Prima del",After:"Dopo del",On:"Il giorno"}}},$q={SelectFiles:"Scegli",DropAreaLabel:"Trascina i file qua oppure clicca su Scegli",Upload:"Carica",Cancel:"Annulla",Retry:"Riprova",FileTooLarge:"Dimensione del file non consentita"},Vq={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido",ConfirmButton:"Conferma",AutocompleteDefaultPlaceholder:"Inserisci codice o descrizione",ChipsInputDefaultPlaceholder:"Inserisci il valore e premi invio",NotificationWidgetNoMessages:"Nessuna notifica",NotificationWidgetDismissAll:"Cancella tutto"},zq={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Oq,Month:Bq,FilterBuilder:Fq,FileUpload:$q,Generic:Vq},Gq={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Wq={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},Hq={AddSubGroup:"Add Sub Group",AddFilter:"Add Filter",Operator:{String:{Starts:"Starts with",Contains:"Contains",Equals:"Equal to"},Number:{Greater:"Greater than",GreaterOrEqual:"Greater or equal than",Less:"Less than",LessOrEqual:"Less or equal than",Equals:"Equal to",NotEquals:"Other than"},Date:{Before:"Before date",After:"After date",On:"On"}}},jq={SelectFiles:"Choose",DropAreaLabel:"Drop file here or click to Choose",Upload:"Upload",Cancel:"Cancel",Retry:"Retry",FileTooLarge:"File too large"},Uq={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid",ConfirmButton:"Confirm",AutocompleteDefaultPlaceholder:"Type code or description",ChipsInputDefaultPlaceholder:"Insert value and press enter",NotificationWidgetNoMessages:"No notifications",NotificationWidgetDismissAll:"Dismiss all"},Yq={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Gq,Month:Wq,FilterBuilder:Hq,FileUpload:jq,Generic:Uq};function FL(e,t){return new RegExp(qq(e),t)}function qq(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xq(e){if(!e)return{};const t={};let r="",n="",i=0,a=!0;for(const o of e)a&&o!=="("&&o!==")"?r+=o:o==="("?(i===0?a=!1:n+=o,i++):o===")"?(i===1?(t[r.trim()]=n,a=!0,r="",n=""):n+=o,i--):n+=o;return t}const Zq=(e,t,r)=>{let n=e;return isNaN(n)||(t!=null&&(n=Math.max(n,t)),r!=null&&(n=Math.min(n,r))),n},Kq=(e,t)=>{const n=Intl.NumberFormat(e).formatToParts(1000.1),i=n.find(o=>o.type==="group")?.value??",",a=t??n.find(o=>o.type==="decimal")?.value??".";return{groupingChar:i,decimalChar:a}};function Jq(e,t,r,n){let i=t;const a=tX(e,r);if(!i){const s=Math.abs(a);s-Math.floor(s)?i="0,0.00":i="0,0"}const o=eX(i);return new Intl.NumberFormat(n,o).format(a)}const Qq=(e,t,r)=>{if(!e)return NaN;let n=e.replace(/\s/g,""),i=r;const a=(n.match(/\./g)||[]).length,o=(n.match(/,/g)||[]).length;if(a&&o)i=n.lastIndexOf(".")>n.lastIndexOf(",")?".":",";else if(!n.includes(r)){const l=n.includes(".")?".":",",u=l==="."?a:o;u>1||u===1&&l===t&&n.length-n.lastIndexOf(l)-1===3||(i=l)}const s=i==="."?",":".";return n=n.replace(new RegExp(`\\${s}`,"g"),""),i!=="."&&(n=n.replace(new RegExp(`\\${i}`,"g"),".")),parseFloat(n)};function tX(e,t,r,n,i){let a=e;if(typeof a!="number"){let s;t&&n===void 0?s=",":s=".";const l=s=="."?",":".";a=a.replace(FL(l,"g"),""),a=a.replace(FL(s,"g"),"."),a=Number(a)}const o=Number(a);return isNaN(o)?NaN:o}function eX(e){const t={};e.includes(",")?t.useGrouping=!0:t.useGrouping=!1;const r=e.indexOf(".");if(r>-1){const i=(e.substring(r+1).match(/0/g)||[]).length;t.minimumFractionDigits=i,t.maximumFractionDigits=i}else t.minimumFractionDigits=0,t.maximumFractionDigits=0;return t}cr.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(e,t,r,n)=>{const i=n?.type??"number";try{switch(i){case"date":{const a=e instanceof Date?e:new Date(e);return new Intl.DateTimeFormat(r,{dateStyle:t||"short"}).format(a)}default:case"number":{const a=n?.inputIsLocalized??!1;return Jq(e,t,a,r)}}}catch{return e}}},resources:{en:{translation:Yq},it:{translation:zq}}});const rX=(e,t,r,n)=>cr.format(e,t,r||cr.language,n),nX=(e,t)=>cr.t(e,t);function zi(){const e=j.useCallback((n,i,a,o)=>rX(n,i,a||void 0,o),[]),t=j.useCallback(()=>cr.languages[0],[]),r=j.useCallback((n,i)=>nX(n,i),[]);return{format:e,getCurrentLanguage:t,translate:r}}var pa=(e=>(e.CALENDAR_FOR="Date.CalendarFor",e.CLOSE="Generic.Close",e.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",e.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",e.CONFIRM_BUTTON="Generic.ConfirmButton",e.AUTOCOMPLETE_DEFAULT_PLACEHOLDER="Generic.AutocompleteDefaultPlaceholder",e.CHIPS_INPUT_DEFAULT_PLACEHOLDER="Generic.ChipsInputDefaultPlaceholder",e.NOTIFICATION_WIDGET_NO_MESSAGES="Generic.NotificationWidgetNoMessages",e.NOTIFICATION_WIDGET_DISMISS_ALL="Generic.NotificationWidgetDismissAll",e))(pa||{}),Tn=(e=>(e.ADD_SUB_GROUP="FilterBuilder.AddSubGroup",e.ADD_FILTER="FilterBuilder.AddFilter",e.STRING_STARTS="FilterBuilder.Operator.String.Starts",e.STRING_CONTAINS="FilterBuilder.Operator.String.Contains",e.STRING_EQUALS="FilterBuilder.Operator.String.Equals",e.NUMBER_EQUALS="FilterBuilder.Operator.Number.Equals",e.NUMBER_NOTEQUALS="FilterBuilder.Operator.Number.NotEquals",e.NUMBER_GREATER="FilterBuilder.Operator.Number.Greater",e.NUMBER_GREATER_OR_EQUAL="FilterBuilder.Operator.Number.GreaterOrEqual",e.NUMBER_LESS="FilterBuilder.Operator.Number.Less",e.NUMBER_LESS_OR_EQUAL="FilterBuilder.Operator.Number.LessOrEqual",e.DATE_BEFORE="FilterBuilder.Operator.Date.Before",e.DATE_AFTER="FilterBuilder.Operator.Date.After",e.DATE_ON="FilterBuilder.Operator.Date.On",e))(Tn||{}),nn=(e=>(e.MONDAY="Day.Monday",e.MONDAY_SHORT="Day.MondayShort",e.TUESDAY="Day.Tuesday",e.TUESDAY_SHORT="Day.TuesdayShort",e.WEDNESDAY="Day.Wednesday",e.WEDNESDAY_SHORT="Day.WednesdayShort",e.THURSDAY="Day.Thursday",e.THURSDAY_SHORT="Day.ThursdayShort",e.FRIDAY="Day.Friday",e.FRIDAY_SHORT="Day.FridayShort",e.SATURDAY="Day.Saturday",e.SATURDAY_SHORT="Day.SaturdayShort",e.SUNDAY="Day.Sunday",e.SUNDAY_SHORT="Day.SundayShort",e))(nn||{}),Bn=(e=>(e.JANUARY="Month.January",e.FEBRUARY="Month.February",e.MARCH="Month.March",e.APRIL="Month.April",e.MAY="Month.May",e.JUNE="Month.June",e.JULY="Month.July",e.AUGUST="Month.August",e.SEPTEMBER="Month.September",e.OCTOBER="Month.October",e.NOVEMBER="Month.November",e.DECEMBER="Month.December",e))(Bn||{}),OS=(e=>(e.PREVIOUS_DAY="Date.PreviousDay",e.PREVIOUS_WEEK="Date.PreviousWeek",e.PREVIOUS_MONTH="Date.PreviousMonth",e.PREVIOUS_YEAR="Date.PreviousYear",e.NEXT_DAY="Date.NextDay",e.NEXT_WEEK="Date.NextWeek",e.NEXT_MONTH="Date.NextMonth",e.NEXT_YEAR="Date.NextYear",e.YESTERDAY="Date.Yesterday",e.TODAY="Date.Today",e.TOMORROW="Date.Tomorrow",e))(OS||{}),xi=(e=>(e.SELECT_FILES="FileUpload.SelectFiles",e.DROP_AREA_LABEL="FileUpload.DropAreaLabel",e.UPLOAD="FileUpload.Upload",e.CANCEL="FileUpload.Cancel",e.RETRY="FileUpload.Retry",e.FILE_TOO_LARGE="FileUpload.FileTooLarge",e))(xi||{});class Ql{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){if(t)return new Ql(t,t.k==""?[]:t.k.split(";"));throw new Error("time creation from obj undefined not implemented yet")}static fromString(t){return new Ql({t:"",p:""},t.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const vl=(e,t)=>({...e,obj:{t:t.objClass?.t?t.objClass.t:e.obj?.t||"",p:t.objClass?.p?t.objClass.p:e.obj?.p||"",k:t.bindValue},decode:t.optionalDisplayValue??e.decode,fun:t.fun??e.fun}),$L=e=>{const t=Ql.fromDataObj(e.obj),r=e.decode?Ql.fromString(e.decode).getValue():[];return t.getValue().map((n,i)=>({bindValue:n,optionalDisplayValue:r.length>=i?r[i]:""}))},iX=(e,t)=>{const r=new Ql(e.obj,t.map(i=>i.bindValue)).getLegacyValue(),n=new Ql(e.obj,t.map(i=>i.optionalDisplayValue?i.optionalDisplayValue:"")).getLegacyValue();return vl(e,{bindValue:r,optionalDisplayValue:n})},_s=e=>({bindValue:e.obj?.k||"",objClass:{t:e.obj?.t||"",p:e.obj?.p||""},fun:e.fun,optionalDisplayValue:e.decode}),l2=({bindValue:e,optionalDisplayValue:t,options:r=[],listDisplayMode:n="Both",isClearable:i=!1,minimumChars:a=1,isEditable:o=!0,fun:s,_changeOnEnter:l=!1,onChange:u,onConfirmedChange:c,onOptionsRequest:h,onBlur:f,_multiActiveIndex:d,autoSelectOptionIndex:p,...v})=>{const g=j.useRef(null),[m,y]=j.useState(e),[_,x]=j.useState(t),{translate:b}=zi(),[S,w]=j.useState(!1),[C,k]=j.useState(r),[T,A]=j.useState(0),[L,D]=j.useState([e]),{anchorRef:E,targetRef:N,anchorWidth:P}=Ni({position:"bottom",open:S}),F=j.useCallback(()=>{w(!1),g?.current?.focus()},[]);Dh([N],S,()=>F());const O=g5(400);j.useEffect(()=>{p!=null&&(h?h(s,void 0).then(W=>{const J=bo(W)||[];k(J),p<J.length&&B(J[p])}):p<r.length&&B(r[p]))},[]),j.useEffect(()=>{l||y(e)},[e,l]);const $=W=>{W.length>=a?V(W):F(),y(W),x(""),l||u?.({bindValue:W,optionalDisplayValue:t})},V=W=>{O(async()=>{if(s&&h){const J=await h(s,W),Q=bo(J)||[];k(Q),A(Q.length>0?0:-1),w(!0)}else w(J=>!J)})},I=()=>{S||f?.()},B=W=>{l?(y(""),x("")):(y(W.obj?.k||""),x(W.decode)),u?.(_s(W)),c?.(_s(W));const J=C.findIndex(Q=>Q.obj?.k===W.obj?.k);A(J),D([W.obj?.k||""]),F()},G=W=>{W.key==="Escape"&&(F(),A(-1))},H=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),S)){const J=W.key==="ArrowDown"?(T+1)%C.length:(T-1+C.length)%C.length;A(J)}switch(W.key){case"Enter":T>=0&&T<C.length?B(C[T]):l&&(u?.({bindValue:m,optionalDisplayValue:""}),c?.({bindValue:m,optionalDisplayValue:""}),F(),y(""),x(""));break;case"Escape":F(),A(-1);break}};return z.jsxs("div",{"data-component":"autocomplete",children:[z.jsx(mi,{...v,bindValue:m,optionalDisplayValue:_,isEditable:o,shapeIcon:"magnify",placeholder:b(pa.AUTOCOMPLETE_DEFAULT_PLACEHOLDER),ref:E,isClearable:i,inputRef:g,onChange:W=>$(W.bindValue),onConfirmedChange:c,onKeyDown:H,onBlur:I,onShapeIconClick:()=>V(m),"aria-autocomplete":"list",maxLength:-1}),S&&z.jsx(Ri,{children:z.jsx(B0,{options:C,displayMode:n,onClick:B,ref:N,selectedIndex:T,activeIndex:d||L,width:P,showFilter:!1,onKeyDown:G,isOpen:S,floating:!0})})]})},ze=e=>e==null?!1:typeof e=="string"?e.toLocaleLowerCase()=="yes"||e.toLocaleLowerCase()=="true":e,bv={"smp-button-group-container":"_smp-button-group-container_kn9qg_1","smp-button-group-options-container":"_smp-button-group-options-container_kn9qg_7","smp-button-group-vertical":"_smp-button-group-vertical_kn9qg_12"},D5=({bindValue:e,disabled:t=!1,label:r,displayMode:n="DescOnly",BtoVer:i="false",options:a,onOptionsRequest:o,fun:s,helper:l,...u})=>{const[c,h]=j.useState(a),f=j.useId(),d=v=>{t||(u.onChange?.(_s(v)),u.onConfirmedChange?.(_s(v)))};j.useEffect(()=>{!c&&o&&s&&o(s,void 0).then(v=>h(bo(v))).catch(v=>{console.error("Error during loading options (button group)",v)})},[c,o,s]);const p={container:`${bv["smp-button-group-container"]} ${ze(i)?bv["smp-button-group-vertical"]:""}`,optionsContainer:`${bv["smp-button-group-options-container"]} ${ze(i)?bv["smp-button-group-vertical"]:""}`};return z.jsxs("div",{"data-component":"button-group","smp-id":"buttonGroup-container",className:p.container,id:f,children:[r&&z.jsx(Io,{label:r,disabled:t,htmlFor:f,helper:l}),z.jsx("div",{className:p.optionsContainer,children:c?.map(v=>z.jsx(Be,{appearance:"raised",variant:"base",active:e===v.obj?.k,onClick:()=>d(v),bindValue:v.obj?.k||"",optionalDisplayValue:Pp(v.obj?.k,v.decode,n),disabled:t,justify:ze(i)?"start":"center",icon:v.icon,buttonExt:`oneButton-${ze(i)?"vertical":"horizontal"}`},v.obj?.k))})]})},VL={"smp-button-list":"_smp-button-list_1ql17_1","smp-button-list-row":"_smp-button-list-row_1ql17_7","smp-button-list-column":"_smp-button-list-column_1ql17_11"},L5=({data:e,options:t,fun:r,direction:n="row",disposition:i="start",sizing:a,variant:o,appearance:s,showText:l,showIcon:u,fullWidth:c,disabled:h,justify:f,squared:d,onClick:p,onOptionsRequest:v})=>{const g=e?.children||t,[m,y]=j.useState(g);j.useEffect(()=>{y(g)},[g]),j.useEffect(()=>{!m&&v&&r&&v(r,void 0).then(b=>y(bo(b)||[])).catch(b=>{console.error("Errore nel caricamento delle opzioni per ButtonList",b)})},[m,r,v]);const _={container:`${VL["smp-button-list"]} ${VL[`smp-button-list-${n}`]} ${Jo[`smp-justifyContent-${i}`]}`},x=m?.map((b,S)=>{const w={bindValue:b.obj?.k||"",optionalDisplayValue:b.decode??b.value??b.obj?.k??"",fun:b.fun,icon:b.icon,variant:o,appearance:s,showText:l,showIcon:u,fullWidth:c,disabled:h,sizing:a,justify:f,squared:d,onClick:()=>{p?.(b)}};return z.jsx(Be,{...w},`button-${S}`)});return z.jsx("div",{role:"list","data-component":"button-list",className:_.container,children:x})},Ax={"smp-checkbox-container":"_smp-checkbox-container_1gt40_6","smp-checkbox-wrapper":"_smp-checkbox-wrapper_1gt40_14","smp-checkbox-danger":"_smp-checkbox-danger_1gt40_61"},$0=({bindValue:e,_dataComponent:t="checkbox",disabled:r,label:n,isEditable:i=!0,helper:a,error:o,state:s="base",onChange:l,onBlur:u,onConfirmedChange:c,variant:h="checkbox"})=>{const f=j.useId(),d=m=>{i&&(l?.(m.target.checked),c?.(m.target.checked))},p=!!o,v=p?"danger":s,g={container:`${Ax["smp-checkbox-container"]}`,labelAndInputWrapper:`${Ax["smp-checkbox-wrapper"]}`,inputState:`${Ax[`smp-checkbox-${v}`]}`};return z.jsxs("div",{className:g.container,children:[z.jsxs("div",{className:g.labelAndInputWrapper,"data-component":t,children:[z.jsx("input",{className:g.inputState,"data-component":"checkbox","data-state":v,type:"checkbox",checked:e,onChange:d,onBlur:u,role:h==="switch"?"switch":"checkbox",id:f}),n&&z.jsx(Io,{label:n,disabled:r,htmlFor:f,helper:a})]}),p&&z.jsx(O0,{helperText:o,disabled:r,state:v,id:`${f}-helper`})]})};function u2(e,t){const r=j.useRef(null);j.useEffect(()=>{if(!e)return;const n=typeof t=="object"&&t!==null&&"current"in t?t.current:null;if(!n)return;r.current=document.activeElement;const i=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null):[];(()=>{const u=i();u.length>0&&requestAnimationFrame(()=>u[0].focus())})();const o=u=>{if(u.key==="Escape"||u.key!=="Tab")return;const c=i();if(c.length===0)return;const h=c[0],f=c[c.length-1];u.shiftKey&&document.activeElement===h?(u.preventDefault(),f.focus()):!u.shiftKey&&document.activeElement===f&&(u.preventDefault(),h.focus())},s=u=>{if(n&&!n.contains(u.target)){u.preventDefault();const c=i();c.length>0&&c[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",s);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",s),document.body.style.overflow=l,r.current&&requestAnimationFrame(()=>{r.current?.focus()})}},[e,t])}const Gm=({bindValue:e,onChange:t,options:r=[],optionalDisplayValue:n,isEditable:i,listDisplayMode:a="Both",autoSelectOptionIndex:o,fun:s,onOptionsRequest:l,onConfirmedChange:u,multiActiveIndex:c,...h})=>{const f=j.useRef(null),[d,p]=j.useState(!1),[v,g]=j.useState(r),[m,y]=j.useState(-1),[_,x]=j.useState([e]),b=j.useId(),{anchorRef:S,targetRef:w,anchorWidth:C}=Ni({position:"bottom",open:d}),k=j.useCallback(()=>{p(!1),f?.current?.focus()},[]);Dh([w,S],d,()=>k()),u2(d,w),j.useEffect(()=>{o!=null&&(l&&(!v||v.length==0)?l(s,void 0).then(E=>{const N=bo(E)||[];g(N),o<N.length&&T(N[o])}):o<v.length&&T(r[o]))},[]);const T=E=>{t?.(_s(E)),u?.(_s(E));const N=v.findIndex(P=>P.obj?.k===E.obj?.k);y(N),x([E.obj?.k||""]),k()},A=E=>{E.key==="Escape"&&(k(),y(-1))},L=E=>{(E.key==="ArrowDown"||E.key==="ArrowUp")&&(E.preventDefault(),D())},D=()=>{i&&(s&&l?d?p(!1):l(s,void 0).then(E=>{const N=bo(E)||[];g(N),y(N.length>0?0:-1),p(!0)}):p(E=>!E))};return z.jsxs("div",{role:"combobox","aria-expanded":d,"aria-controls":b,"aria-owns":b,"data-component":"combobox",children:[z.jsx(mi,{...h,bindValue:e,optionalDisplayValue:n,onShapeIconClick:D,onKeyDown:L,onClick:D,shapeIcon:"arrow_drop_down",rotatedShapeIcon:d,isEditable:i,ref:S,inputRef:f,autocomplete:"off","aria-autocomplete":"list",variant:"notSelectable"}),d&&z.jsx(Ri,{children:z.jsx(B0,{id:b,options:v,displayMode:a,ref:w,isOpen:d,selectedIndex:m,activeIndex:c||_,width:C,onClick:T,onKeyDown:A,floating:!0})})]})},_i={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1eguc_1","smp-datepickercalendar":"_smp-datepickercalendar_1eguc_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_1eguc_15","smp-datepickercalendar-th":"_smp-datepickercalendar-th_1eguc_27","smp-datepickercalendar-td":"_smp-datepickercalendar-td_1eguc_38","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_1eguc_57","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_1eguc_63","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_1eguc_68","smp-datepickercalendar-label":"_smp-datepickercalendar-label_1eguc_78"};function aX({selectedDate:e,onDateChange:t,disabledDateRanges:r=[],initialValue:n,targetRef:i}){const{translate:a}=zi(),o=()=>{if(!n)return;const $=new Date(n);return isNaN($.getTime())?void 0:$},[s]=j.useState(new Date),[l,u]=j.useState(e||o()||new Date),[c,h]=j.useState(l?l.getMonth():new Date().getMonth()),[f,d]=j.useState(l?l.getFullYear():new Date().getFullYear()),[p,v]=j.useState(l?l.getDate():null),g=j.useRef(null),m=j.useRef([]),y=[a(Bn.JANUARY),a(Bn.FEBRUARY),a(Bn.MARCH),a(Bn.APRIL),a(Bn.MAY),a(Bn.JUNE),a(Bn.JULY),a(Bn.AUGUST),a(Bn.SEPTEMBER),a(Bn.OCTOBER),a(Bn.NOVEMBER),a(Bn.DECEMBER)],_=[{value:a(nn.SUNDAY_SHORT),full:a(nn.SUNDAY)},{value:a(nn.MONDAY_SHORT),full:a(nn.MONDAY)},{value:a(nn.TUESDAY_SHORT),full:a(nn.TUESDAY)},{value:a(nn.WEDNESDAY_SHORT),full:a(nn.WEDNESDAY)},{value:a(nn.THURSDAY_SHORT),full:a(nn.THURSDAY)},{value:a(nn.FRIDAY_SHORT),full:a(nn.FRIDAY)},{value:a(nn.SATURDAY_SHORT),full:a(nn.SATURDAY)}],x=$=>r.some(V=>{const I=V.start.getTime(),B=V.end.getTime(),G=$.getTime();return G>=I&&G<=B}),b=$=>{x($)||(u($),v($.getDate()),t&&t(pq($)))},S=()=>{c===0?(h(11),d(f-1)):h(c-1),v(1)},w=()=>{c===11?(h(0),d(f+1)):h(c+1),v(1)},C=($,V)=>new Date($,V+1,0).getDate(),k=($,V)=>new Date($,V,1).getDay(),T=$=>{const V=E.findIndex(I=>I!==null&&I.getDate()===$);V!==-1&&m.current[V]&&(m.current[V]?.focus(),v($))},A=($,V)=>{const I=E[V];if(!I)return;const B=C(f,c),G=I.getDate();switch($.key){case"ArrowRight":$.preventDefault();{let H=G+1,W=new Date(f,c,H);if(H>B){const J=c===11?f+1:f,Q=c===11?0:c+1;H=1,W=new Date(J,Q,H),w(),setTimeout(()=>{L(1,"forward")},0);return}x(W)?L(H,"forward"):T(H)}break;case"Tab":break;case"ArrowLeft":$.preventDefault();{let H=G-1,W=new Date(f,c,H);if(H<1){const J=c===0?f-1:f,Q=c===0?11:c-1,tt=C(J,Q);H=tt,W=new Date(J,Q,H),S(),setTimeout(()=>{L(tt,"backward")},0);return}x(W)?L(H,"backward"):T(H)}break;case"ArrowUp":$.preventDefault();{let H=G-7,W=new Date(f,c,H);if(H<1){const J=c===0?f-1:f,Q=c===0?11:c-1;H=C(J,Q)+H,W=new Date(J,Q,H),S(),setTimeout(()=>{L(H,"backward")},0);return}x(W)?L(H,"backward"):T(H)}break;case"ArrowDown":$.preventDefault();{let H=G+7,W=new Date(f,c,H);if(H>B){const J=c===11?f+1:f,Q=c===11?0:c+1;H=H-B,W=new Date(J,Q,H),w(),setTimeout(()=>{L(H,"forward")},0);return}x(W)?L(H,"forward"):T(H)}break;case"Home":$.preventDefault(),L(1,"forward");break;case"End":$.preventDefault(),L(B,"backward");break;case"PageUp":$.preventDefault(),S(),setTimeout(()=>{const H=C(c===0?f-1:f,c===0?11:c-1),W=Math.min(G,H);L(W,"forward")},0);break;case"PageDown":$.preventDefault(),w(),setTimeout(()=>{const H=C(c===11?f+1:f,c===11?0:c+1),W=Math.min(G,H);L(W,"forward")},0);break;case" ":case"Space":if(x(I))return;v(I.getDate()),u(I);break;case"Enter":$.preventDefault(),b(I);break}},L=($,V)=>{const I=C(f,c);if(V==="forward"){for(let B=$;B<=I;B++){const G=new Date(f,c,B);if(!x(G)){T(B);return}}w(),setTimeout(()=>{L(1,"forward")},0)}else{for(let W=$;W>=1;W--){const J=new Date(f,c,W);if(!x(J)){T(W);return}}const B=c===0?f-1:f,G=c===0?11:c-1,H=C(B,G);S(),setTimeout(()=>{L(H,"backward")},0)}},E=(()=>{const $=C(f,c),V=k(f,c),I=[];for(let B=0;B<V;B++)I.push(null);for(let B=1;B<=$;B++){const G=new Date(f,c,B);I.push(G)}return I})(),N=[];let P=[];E.forEach(($,V)=>{if(P.push($),P.length===7||V===E.length-1){for(;P.length<7;)P.push(null);N.push(P),P=[]}}),j.useEffect(()=>{if(p!==null){const $=E.findIndex(V=>V!==null&&V.getDate()===p);$!==-1&&m.current[$]&&m.current[$]?.focus()}},[c,f,p,E]);const F={label:`${_i["smp-datepickercalendar-label"]}`,wrapper:`${_i["smp-datepickercalendar"]} ${_i["smp-datepickercalendar-position"]}`,calendar:`${_i["smp-datepickercalendar"]}`,table:`${_i["smp-datepickercalendar-table"]}`,th:`${_i["smp-datepickercalendar-th"]}`,td:($,V,I,B)=>`${_i["smp-datepickercalendar-td"]}
45
+ Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Z=rt(Q,X,H,W,J+"."+X,r);if(Z)return Z}return null}return g(I)}function E(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(E);if(V===null||s(V))return!0;var I=h(V);if(I){var B=I.call(V),G;if(I!==V.entries){for(;!(G=B.next()).done;)if(!E(G.value))return!1}else for(;!(G=B.next()).done;){var H=G.value;if(H&&!E(H[1]))return!1}}else return!1;return!0;default:return!1}}function N(V,I){return V==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function P(V){var I=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":N(I,V)?"symbol":I}function F(V){if(typeof V>"u"||V===null)return""+V;var I=P(V);if(I==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return I}function O(V){var I=F(V);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function $(V){return!V.constructor||!V.constructor.name?f:V.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},_x}var xx,pL;function DY(){if(pL)return xx;pL=1;var e=i2();function t(){}function r(){}return r.resetWarningCache=t,xx=function(){function n(o,s,l,u,c,h){if(h!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},xx}var vL;function LY(){if(vL)return gv.exports;if(vL=1,process.env.NODE_ENV!=="production"){var e=d5(),t=!0;gv.exports=AY()(e.isElement,t)}else gv.exports=DY()();return gv.exports}var mr=LY(),MY=function(t){var r=t?.ownerDocument||document;return r.defaultView||window},EY=function(t,r){for(var n in t)if(!(n in r))return!0;for(var i in r)if(t[i]!==r[i])return!0;return!1},IY=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],yv="http://www.w3.org/2000/svg",gL="http://www.w3.org/1999/xlink",a2=function(e){function t(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=e.call.apply(e,[this].concat(a))||this,n.initialState={hasError:!1,isLoading:!0},n.state=n.initialState,n._isMounted=!1,n.reactWrapper=void 0,n.nonReactWrapper=void 0,n.refCallback=function(s){n.reactWrapper=s},n}dY(t,e);var r=t.prototype;return r.renderSVG=function(){var i=this;if(this.reactWrapper instanceof MY(this.reactWrapper).Node){var a=this.props,o=a.desc,s=a.evalScripts,l=a.httpRequestWithCredentials,u=a.renumerateIRIElements,c=a.src,h=a.title,f=a.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,v=this.props.afterInjection,g=this.props.wrapper,m,y;g==="svg"?(m=document.createElementNS(yv,g),m.setAttribute("xmlns",yv),m.setAttribute("xmlns:xlink",gL),y=document.createElementNS(yv,g)):(m=document.createElement(g),y=document.createElement(g)),m.appendChild(y),y.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(m);var _=function(w){if(i.removeSVG(),!i._isMounted){d(w);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){d(w)})},x=function(w,C){if(w){_(w);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{v(C)}catch(k){_(k)}})},b=function(w){if(w.setAttribute("role","img"),o){var C=w.querySelector(":scope > desc");C&&w.removeChild(C);var k=document.createElement("desc");k.innerHTML=o,w.prepend(k)}if(h){var T=w.querySelector(":scope > title");T&&w.removeChild(T);var A=document.createElement("title");A.innerHTML=h,w.prepend(A)}try{p(w)}catch(L){_(L)}};SY(y,{afterEach:x,beforeEach:b,cacheRequests:f,evalScripts:s,httpRequestWithCredentials:l,renumerateIRIElements:u})}},r.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(i){var a=this;EY(Pm({},i),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var a=i.fallback;i.httpRequestWithCredentials;var o=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var s=i.wrapper,l=fY(i,IY),u=s;return dv.createElement(u,Pm({},l,{ref:this.refCallback},s==="svg"?{xmlns:yv,xmlnsXlink:gL}:{}),this.state.isLoading&&o&&dv.createElement(o,null),this.state.hasError&&a&&dv.createElement(a,null))},t}(dv.Component);a2.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};a2.propTypes={afterInjection:mr.func,beforeInjection:mr.func,desc:mr.string,evalScripts:mr.oneOf(["always","once","never"]),fallback:mr.oneOfType([mr.func,mr.object,mr.string]),httpRequestWithCredentials:mr.bool,loading:mr.oneOfType([mr.func,mr.object,mr.string]),onError:mr.func,renumerateIRIElements:mr.bool,src:mr.string.isRequired,title:mr.string,useRequestCache:mr.bool,wrapper:mr.oneOf(["div","span","svg"])};let LS={assets:"/"};const PY=e=>{LS={...LS,...e}},RY=e=>{const t=`${LS.assets}/${e}`.replace(/\/+/g,"/");return t.endsWith(".svg")?t:t+".svg"},Fu={"smp-icon":"_smp-icon_xmhk0_1","smp-icon-rotated":"_smp-icon-rotated_xmhk0_10","smp-icon-base":"_smp-icon-base_xmhk0_14","smp-icon-interactable":"_smp-icon-interactable_xmhk0_17","smp-icon-danger":"_smp-icon-danger_xmhk0_30","smp-icon-warning":"_smp-icon-warning_xmhk0_34","smp-icon-onDanger":"_smp-icon-onDanger_xmhk0_42","smp-icon-onPrimary":"_smp-icon-onPrimary_xmhk0_46","smp-icon-primary":"_smp-icon-primary_xmhk0_50","smp-icon-spin":"_smp-icon-spin_xmhk0_54","smp-image-interactable":"_smp-image-interactable_xmhk0_59"},me=j.memo(({icon:e,width:t,height:r,placeholderIcon:n,color:i,disabled:a,state:o="base",rotated:s=!1,onClick:l,isInteractable:u=!1,spin:c=!1,title:h,tabIndex:f,link:d})=>{const[p,v]=j.useState(!1),g=L=>L?.toLowerCase().endsWith(".svg")||!L?.includes("/"),m=L=>L?.startsWith("http")||L?.startsWith("/"),y={img:`${Fu[u?"smp-image-interactable":""]}`,svg:`${Fu["smp-icon"]} ${o?`${Fu[`smp-icon-${o}`]}`:""} ${s?Fu["smp-icon-rotated"]:""} ${u?Fu["smp-icon-interactable"]:""} ${c?Fu["smp-icon-spin"]:""}`},_=L=>{!a&&u&&l&&l(L)},x=L=>{!a&&u&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),_(L))},b=p?n:e,S=g(b),C=m(b)?b:RY(`assets/svg/${b}`),k=()=>z.jsx(a2,{src:C,onError:()=>v(!0),width:t||"0.875rem",height:r||"0.875rem",wrapper:"svg",title:h,role:"application",fill:i,"aria-disabled":a,className:y.svg,onClick:_,onKeyDown:x,tabIndex:f}),T=()=>z.jsx("img",{src:b,width:t||"14px",height:r||"auto",alt:h,onError:()=>v(!0),onClick:_,className:y.img,title:h,onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&_(L)}});return(()=>{const L=d?.startsWith("https://")||d?.startsWith("http://")||d?.startsWith("#")||d?.startsWith("/"),D=S?k():T(),E=h?z.jsx("span",{title:h,children:D}):D;return L?z.jsx("a",{href:d,children:E}):E})()});function Ri({children:e}){const[t,r]=j.useState(!1);return j.useEffect(()=>{r(!0)},[]),t?sY.createPortal(e,document.body):null}function Ni({position:e="bottom",open:t=!1}){const r=j.useRef(null),n=j.useRef(null),i=n.current?.getBoundingClientRect().height,[a,o]=j.useState(0),s=j.useCallback(()=>{const l=r.current,u=n.current;if(!l||!u)return;const{top:c,left:h,width:f,height:d}=l.getBoundingClientRect();o(f);const p=u.offsetHeight,v=u.offsetWidth;if(v===0||p===0){requestAnimationFrame(s);return}const g=window.scrollY,m=window.scrollX,y=window.innerWidth,_=window.innerHeight;let x=c+g,b=h+m,S=e;const w={top:c-p<0,bottom:c+d+p>_,left:h-v<0,right:h+f+v>y};switch(e){case"top":w.top&&!w.bottom&&(S="bottom");break;case"bottom":w.bottom&&!w.top&&(S="top");break;case"left":w.left&&!w.right&&(S="right");break;case"right":w.right&&!w.left&&(S="left");break}switch(S){case"top":x=c+g-p;break;case"bottom":x=c+g+d;break;case"left":b=h+m-v;break;case"right":b=h+m+f;break}x=Math.max(g,Math.min(x,g+_-p)),b=Math.max(m,Math.min(b,m+y-v)),requestAnimationFrame(()=>{u.style.transform=`translate(${b}px, ${x}px)`,u.style.opacity="1"})},[e]);return j.useLayoutEffect(()=>{if(!t)return;let l;const u=()=>{const h=r.current,f=n.current;h&&f?s():l=requestAnimationFrame(u)};l=requestAnimationFrame(u);const c=new MutationObserver(()=>{s()});return n.current&&c.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{cancelAnimationFrame(l),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),c.disconnect()}},[s,t,i]),{anchorRef:r,targetRef:n,anchorWidth:a}}const bx={"smp-label":"_smp-label_zl3eb_1","smp-label-disabled":"_smp-label-disabled_zl3eb_6","smp-label-wrapper":"_smp-label-wrapper_zl3eb_10"},Sx={"smp-helper-text":"_smp-helper-text_1karg_7","smp-helper-text-disabled":"_smp-helper-text-disabled_1karg_19"},O0=({helperText:e,disabled:t,state:r,id:n})=>{const i={container:`${Sx["smp-helper-text"]} ${t?Sx["smp-helper-text-disabled"]:""} ${r?`${Sx["smp-helper-text"]}-${r}`:""}`};return z.jsx("label",{className:i.container,id:n,children:e})},NY={"smp-helper-tooltip":"_smp-helper-tooltip_2mlq3_1"},OY=({helperTooltip:e,ref:t})=>{const r={container:`${NY["smp-helper-tooltip"]}`};return z.jsx("div",{className:r.container,ref:t,children:z.jsx(O0,{helperText:e})})},Io=({label:e,disabled:t,htmlFor:r,helper:n=""})=>{const[i,a]=j.useState(!1),{anchorRef:o,targetRef:s}=Ni({position:"right",open:i}),l={container:`${bx["smp-label"]} ${t?bx["smp-label-disabled"]:""}`,labelWrapper:bx["smp-label-wrapper"]};return z.jsxs("div",{className:l.labelWrapper,children:[z.jsx("label",{className:l.container,htmlFor:r,children:e}),n&&z.jsx("div",{ref:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:z.jsx(me,{icon:"info_outline",tabIndex:0,width:14,isInteractable:!0,onClick:()=>{a(u=>!u)}})}),z.jsx(Ri,{children:i&&n&&z.jsx(OY,{helperTooltip:n,ref:s})})]})},In={"smp-layout":"_smp-layout_wqmhx_1","smp-layout-horizontal":"_smp-layout-horizontal_wqmhx_9","smp-layout-vertical":"_smp-layout-vertical_wqmhx_15","smp-layout-section-grid":"_smp-layout-section-grid_wqmhx_20","smp-layout-section-vertical":"_smp-layout-section-vertical_wqmhx_24","smp-layout-section-horizontal":"_smp-layout-section-horizontal_wqmhx_28","smp-layout-cell-container":"_smp-layout-cell-container_wqmhx_33","smp-layout-section-flex":"_smp-layout-section-flex_wqmhx_37","smp-grid-template-cols":"_smp-grid-template-cols_wqmhx_55","smp-grid-template-rows":"_smp-grid-template-rows_wqmhx_59","smp-layout-section-with-title":"_smp-layout-section-with-title_wqmhx_63","smp-layout-section-title":"_smp-layout-section-title_wqmhx_69","smp-layout-inline":"_smp-layout-inline_wqmhx_75"},BY=(e,t)=>{const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r},v5=(e,t)=>e.map(r=>{if(r.sections?.length)return{...r,sections:v5(r.sections,t),content:r.content};let n=r.sections,i=r.content;return r.content?.length&&r.columns&&+r.columns>1&&(n=BY(r.content.filter(o=>t.includes(o.id||"")),+r.columns).map((o,s)=>({...r,id:`${r.id}-${s}`,content:o,gridCols:r.columns,horizontal:!0})),i=[]),{...r,sections:n,content:i}}),mL=(e,t)=>{if(!t)return{};const r=e.some(n=>n.dim)?e.map(n=>n.dim||"auto").join(" "):`repeat(${e.length}, 1fr)`;return{[t]:r}},yL=e=>e.some(t=>t.dim&&!t.dim.endsWith("%")),_L=e=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[e],FY={base:{ghost:"base",outlined:"base",raised:"base"},danger:{ghost:"danger",outlined:"danger",raised:"onDanger"},primary:{ghost:"primary",outlined:"primary",raised:"onPrimary"}},xL=(e,t)=>FY[e][t],Wa={"smp-button-container":"_smp-button-container_zd415_1","smp-button-extraSmall":"_smp-button-extraSmall_zd415_17","smp-button-small":"_smp-button-small_zd415_22","smp-button-base":"_smp-button-base_zd415_27","smp-button-large":"_smp-button-large_zd415_32","smp-button-extraLarge":"_smp-button-extraLarge_zd415_37","smp-button-fullWidth":"_smp-button-fullWidth_zd415_42","smp-button-squared":"_smp-button-squared_zd415_46","smp-buttonType-raised":"_smp-buttonType-raised_zd415_53","smp-buttonVariant-base":"_smp-buttonVariant-base_zd415_55","smp-buttonActive":"_smp-buttonActive_zd415_77","smp-buttonVariant-primary":"_smp-buttonVariant-primary_zd415_84","smp-buttonVariant-danger":"_smp-buttonVariant-danger_zd415_113","smp-buttonExt-oneButton-horizontal":"_smp-buttonExt-oneButton-horizontal_zd415_153","smp-buttonExt-oneButton-vertical":"_smp-buttonExt-oneButton-vertical_zd415_163","smp-buttonType-outlined":"_smp-buttonType-outlined_zd415_186","smp-buttonType-ghost":"_smp-buttonType-ghost_zd415_256"},Be=({bindValue:e,onClick:t,ariaLabel:r,icon:n,placeholderIcon:i,disabled:a,sizing:o="base",variant:s="primary",appearance:l="raised",showIcon:u=!0,showText:c=!0,fullWidth:h=!1,loading:f=!1,justify:d="center",title:p,optionalDisplayValue:v,squared:g=!1,submit:m=!1,active:y=!1,buttonExt:_})=>{const x={container:`${Wa["smp-button"]} ${Wa["smp-button-container"]} ${o?Wa[`smp-button-${o}`]:""} ${s?Wa[`smp-buttonVariant-${s}`]:""} ${l?Wa[`smp-buttonType-${l}`]:""} ${h?Wa["smp-button-fullWidth"]:""} ${Jo[`smp-justifyContent-${d}`]} ${g&&!c?Wa["smp-button-squared"]:""} ${y?Wa["smp-buttonActive"]:""} ${_?Wa[`smp-buttonExt-${_}`]:""}`};return z.jsx("button",{"data-component":"button",type:m?"submit":"button",className:x.container,onClick:t,"aria-label":r,disabled:a,"aria-busy":f,title:p||v,children:f?z.jsx(me,{icon:"spinner",state:xL(s,l),spin:!0}):z.jsxs(z.Fragment,{children:[n&&u&&z.jsx(me,{icon:n,placeholderIcon:i,disabled:a,state:xL(s,l),width:_L(o),height:_L(o)}),c&&z.jsx("span",{children:v||e})]})})},$Y={titleLarge:"h2",title:"h3",body:"h6",label:"label",code:"code"},$u={"smp-typography":"_smp-typography_1ahus_1","smp-typography-body":"_smp-typography-body_1ahus_8","smp-text-number":"_smp-text-number_1ahus_11","smp-typography-title":"_smp-typography-title_1ahus_16","smp-typography-titleLarge":"_smp-typography-titleLarge_1ahus_20","smp-typography-label":"_smp-typography-label_1ahus_24","smp-typography-disabled":"_smp-typography-disabled_1ahus_29","smp-typography-left":"_smp-typography-left_1ahus_33","smp-typography-center":"_smp-typography-center_1ahus_37","smp-typography-right":"_smp-typography-right_1ahus_41","smp-typography-toolbar":"_smp-typography-toolbar_1ahus_46","smp-text-negative":"_smp-text-negative_1ahus_51"},o2="smp-toolbar",VY=["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter","Escape"," "],MS=e=>e.replace(`${o2}-`,"").split("-").map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),zY=e=>`${o2}-${e.filter(t=>!isNaN(t)).join("-")}`,Rm=(e,t)=>t?`${t}-${e}`:`${o2}-${e}`,GY=(e,t)=>t?`${t}-${e}`:`toolbar-item-${e}`,ES=e=>!!e.fun&&e.forcedLeaf===!1&&!(e.children&&e.children.length>0),IS=(e,t,r,n)=>{if(!e||t.length===0)return e;const i={...e};i.children=[...e.children??[]];let a=i.children;const o=[],s=[];for(let l=0;l<t.length;l++){const u=t[l],c=a[u];if(!c)break;const h={...c};if(l===t.length-1){if(a[u]=r(h),n){const f=a.map((d,p)=>p===u?a[p]:n({...d}));if(l===0)i.children=f;else{const d=o[o.length-1],p=s[s.length-1];d[p]={...d[p],children:f}}}}else h.children=[...h.children??[]],a[u]=h,o.push(a),s.push(u),a=h.children}return i},Zg=(e,t)=>{e.current.has(t)&&requestAnimationFrame(()=>{e.current.get(t)?.focus()})};function WY(e,t,r){return{handleKeyDown:j.useCallback(async(i,a,o)=>{if(!VY.includes(i.key))return;i.preventDefault(),i.stopPropagation();const s=t.current.get(o),l=MS(o);if(s)switch(i.key){case"ArrowDown":case"ArrowUp":{const c=l[l.length-1]+(i.key==="ArrowDown"?1:-1);if(c>=0){const h=o.split("-");h.pop();const f=`${h.join("-")}-${c}`;Zg(t,f)}break}case"ArrowRight":{r(a,o),Zg(t,Rm(0,o));break}case"ArrowLeft":case"Escape":{l.pop();const u=zY(l);t.current.has(u)&&(e(c=>c&&IS(c,l,h=>({...h,isExpanded:!1}))),Zg(t,u));break}}},[r,t,e])}}const ve={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BREADCRUMBS:"BRD",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",EDITOR:"EDT",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",LABEL:"LBL",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",MULTI_CONFIG:"CFM",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",BUTTON_GROUP:"BTO",TIME:"TIM",FILE_UPLOAD:"FUP",PASSWORD:"PWD",TREE:"TRE"},kc={CODE_ONLY:"CodeOnly",DESC_ONLY:"DescOnly",BOTH:"Both"},Ac={TN:"TN",TM:"TM",PM:"PM",TS:"TS",TT:"TT"},HY={ON_LOADING:"OnLoading"},jY={obj:{t:"",p:"",k:""},fun:"",isEditable:!1,shape:ve.TEXT_FIELD,icon:"error",value:"No data found"};function UY(e,t,r){const n=async(s,l)=>{if(!ES(s))a(l,{isExpanded:!0});else if(t){a(l,{isLoading:!0});try{const u=await t(s);a(l,{isLoading:!1,children:u?.children&&u.children.length>0?u.children:[jY],isExpanded:!0},{isExpanded:!1})}catch(u){console.error("Failed to load dynamic node data:",u),a(l,{isLoading:!1})}}},i=s=>{a(s,{isExpanded:!1})},a=(s,l,u)=>{e(c=>c&&IS(c,MS(s),f=>({...f,...l}),u?f=>({...f,...u}):void 0))};return{handleNodeExpand:n,handleMouseLeave:i,onToolbarRadioLeafNodeClick:(s,l,u)=>{e(c=>c&&IS(c,MS(l),f=>{const d={...f,obj:{t:f.obj?.t||"",p:f.obj?.p||"",k:u.obj?.k||""}};return r?.(d),d}))}}}const g5=e=>{const t=j.useRef(null);return j.useEffect(()=>()=>{t.current&&clearTimeout(t.current)},[]),n=>{t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{n()},e)}},Pp=(e,t,r)=>{if(e==""&&(t==""||t==null))return"";if(r)switch(r){case"CodeOnly":return e||"";case"DescOnly":return t||"";case"Both":return`${e} - ${t}`}return e||""},Cx={key:"f4",ctrlKey:!1,altKey:!1},Pn={"smp-textfield-wrapper":"_smp-textfield-wrapper_1plx2_4","smp-textfield":"_smp-textfield_1plx2_4","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1plx2_29","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1plx2_35","smp-textfield-small":"_smp-textfield-small_1plx2_40","smp-textfield-base":"_smp-textfield-base_1plx2_45","smp-textfield-large":"_smp-textfield-large_1plx2_50","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1plx2_55","smp-textfield-input":"_smp-textfield-input_1plx2_61","smp-textfield-decode-wrapper":"_smp-textfield-decode-wrapper_1plx2_82","smp-textfield-outlined":"_smp-textfield-outlined_1plx2_91","smp-textfield-danger":"_smp-textfield-danger_1plx2_102","smp-textfield-readOnly":"_smp-textfield-readOnly_1plx2_106","smp-textfield-disabled":"_smp-textfield-disabled_1plx2_121","smp-textfield-fullWidth":"_smp-textfield-fullWidth_1plx2_130","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_1plx2_134"},m5=j.createContext({}),YY=()=>j.useContext(m5),mi=({id:e,disabled:t=!1,bindValue:r,optionalDisplayValue:n,icon:i,placeholder:a,isEditable:o=!0,shapeIcon:s,sizing:l="base",state:u,variant:c,tooltip:h=!1,rotatedShapeIcon:f=!1,ref:d,inputRef:p,inputType:v="text",ariaLabel:g="input field",label:m,helperText:y=!1,error:_,appearance:x="base",isClearable:b=!1,fullWidth:S=!1,_dataComponent:w="textfield",min:C,max:k,step:T,inputMode:A="text",width:L,autocomplete:D,size:E,maxLength:N,style:P,onBlur:F,onChange:O,onKeyDown:$,onShapeIconClick:V,onClick:I,onConfirmedChange:B,...G})=>{const[H,W]=j.useState(!1),{anchorRef:J,targetRef:Q}=Ni({position:"bottom",open:H}),tt=j.useId(),it=`${tt}-helper`,X=_?"danger":u,rt=y||!!_,Z=le=>{O?.({bindValue:le.target.value})},vt=()=>{r&&r!=""&&O?.({bindValue:""})},kt=le=>{le.key.toLowerCase()===Cx.key.toLowerCase()&&Cx.ctrlKey===le.ctrlKey&&Cx.altKey===le.altKey&&(le.preventDefault(),W(!0)),le.key=="Enter"&&B?.({bindValue:r}),$?.(le)},{onAdvanceResearchLoadInitialData:Wt,onAdvanceResearchLeafNodeClick:Ht,advanceResearchAutoSelect:ue}=YY(),Fe=le=>{if(Ht){const Nr=p&&"current"in p&&p.current?p.current.value:r;Ht(le,Nr)}W(!1)},We=()=>{if(Wt){const le=G.obj??{t:"",p:"",k:""};return Wt(e||"",le)}return Promise.resolve({type:"SmeupDataTree",children:[]})},Tr={wrapper:`${Pn["smp-textfield-wrapper"]} ${S?Pn["smp-textfield-fullWidth"]:""}`,container:`${Pn["smp-textfield"]} ${t?Pn["smp-textfield-disabled"]:""} ${a?Pn["smp-textfield-placeholder"]:""} ${l?Pn[`smp-textfield-${l}`]:""} ${X?Pn[`smp-textfield-${X}`]:""} ${x?Pn[`smp-textfield-${x}`]:""} ${o?"":Pn["smp-textfield-readOnly"]} ${h?Pn["smp-textfield-top-right-indicator"]:""}`,input:`${Pn["smp-textfield-input"]}`,decodeWrapper:` ${n?Pn["smp-textfield-decode-wrapper"]:""}`};if(c&&(c!=="notSelectable"||o)){const le=Pn[`smp-textfield-variant-${c}`];le&&(Tr.container+=` ${le}`)}const Nt=L?{"--smp-textField-width-base":L,...P}:P,ee=z.jsxs("div",{className:Tr.container,ref:d,style:Nt,children:[i&&z.jsx(me,{icon:i,disabled:t}),z.jsx("input",{id:tt,name:e,type:v,value:r,placeholder:a,onChange:Z,onBlur:F,className:Tr.input,disabled:t,readOnly:!o,onKeyDown:kt,"aria-label":g,ref:p,"aria-describedby":rt?it:void 0,min:C,max:k,step:T,inputMode:A,autoComplete:D,size:E,maxLength:N,onClick:I}),b&&z.jsx(me,{icon:"clear",onClick:vt,tabIndex:0,isInteractable:!0}),s&&z.jsx(me,{icon:s,disabled:t,onClick:V,rotated:f,isInteractable:o,tabIndex:0})]});return z.jsxs("div",{className:Tr.wrapper,"data-component":w,children:[m&&z.jsx(Io,{label:m,disabled:t,htmlFor:tt,helper:G.helper}),z.jsxs("div",{className:Tr.decodeWrapper,ref:J,children:[ee,z.jsx(Sr,{bindValue:n||"",variant:"body",role:"note"}),H&&z.jsx(Ri,{children:z.jsx(s2,{ref:Q,autoSelect:ue,onToolbarLoadInitialData:We,onToolbarLeafNodeClick:Fe,onToolbarClickOutside:()=>W(!1)})})]}),rt&&z.jsx(O0,{helperText:_,disabled:t,state:X,id:it})]})};function y5({items:e,itemHeight:t,containerHeight:r,overscan:n=5}){const[i,a]=j.useState(0),o=j.useRef(null),s=e.length*t,l=Math.max(0,Math.floor(i/t)-n),u=Math.min(e.length-1,Math.floor((i+r)/t)+n),c=[];for(let d=l;d<=u;d++)c.push({item:e[d],index:d,offsetTop:d*t});const h=j.useCallback(d=>{const p=d.target.scrollTop;a(p)},[]),f=d=>{if(!o.current)return;const p=d*t,v=p+t,g=o.current,m=g.scrollTop,y=m+r;p<m?g.scrollTop=p:v>y&&(g.scrollTop=v-r)};return{virtualItems:c,containerProps:{ref:o,style:{maxHeight:`${r}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:h},innerProps:{style:{height:`${s}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:i,viewportHeight:r,totalHeight:s,startIndex:l,endIndex:u},scrollToIndex:f}}function qY(e,t,r="14px IBM Plex Sans, sans-serif",n=32){const a=document.createElement("canvas").getContext("2d");if(!a)return 200;a.font=r;let o=0;for(const s of e){const l=Pp(s.obj?.k,s.decode,t),u=a.measureText(l);o=Math.max(o,u.width)}return Math.ceil(o+n)}const Vu={"smp-list":"_smp-list_1ntom_1","smp-list-floating":"_smp-list-floating_1ntom_7","smp-list-container":"_smp-list-container_1ntom_15","smp-list-listItem":"_smp-list-listItem_1ntom_20","smp-list-listItem-left":"_smp-list-listItem-left_1ntom_40"},XY=10,B0=({id:e,options:t,displayMode:r="Both",ref:n,showFilter:i,selectedIndex:a=null,activeIndex:o=[],width:s,onClick:l,onKeyDown:u,onOpen:c,isOpen:h,floating:f=!1,showLeadingIcon:d=!1})=>{const[p,v]=j.useState(""),g=40,[m,y]=j.useState(a!==null?a:-1),[_,x]=j.useState(s||200),b=j.useRef(null),S=j.useRef(null),w=i!==void 0?i:t.length>XY,C=j.useMemo(()=>{if(!p)return t;const $=V=>typeof V=="string"&&V.toLowerCase().includes(p.toLowerCase());return t.filter(V=>r==="CodeOnly"?$(V.obj?.k):r==="DescOnly"?$(V.decode):!!($(V.obj?.k)||$(V.decode)))},[p,t,r]),k=$=>{v($)},{virtualItems:T,containerProps:A,innerProps:L,scrollToIndex:D}=y5({items:C,itemHeight:g,containerHeight:200,overscan:5});j.useEffect(()=>{a!==null&&a!==m&&y(a)},[a]),j.useEffect(()=>{m>=0&&m<C.length&&D(m)},[m,C]),j.useEffect(()=>{h&&(c?.(S?.current),b?.current&&b.current.focus())},[h,b,c]),j.useEffect(()=>{const $=qY(t,r);x($)},[t,r]);const E=$=>{if($.key==="ArrowDown"||$.key==="ArrowUp"){$.preventDefault();let V=m;$.key==="ArrowDown"?V=m<C.length-1?m+1:0:$.key==="ArrowUp"&&(V=m>0?m-1:C.length-1),y(V)}else $.key==="Enter"?m>=0&&m<C.length&&l?.(C[m]):$.key==="Escape"&&($.preventDefault(),$.stopPropagation());u&&u($)},N=$=>{E($)},P=$=>{E($)},F={wrapper:`${Vu["smp-list"]} ${f?Vu["smp-list-floating"]:""}`,container:`${Vu["smp-list-container"]}`,virtualScroll:`${Vu["smp-list-virtualScroll"]}`,listItem:`${Vu["smp-list-listItem"]}`,listItemLeft:`${Vu["smp-list-listItem-left"]}`},O=f?Math.max(s||0,200):s;return z.jsxs("div",{id:e,ref:n,className:F.wrapper,"data-component":"list",style:{width:f?_:"200px",minWidth:O},children:[w&&z.jsx(mi,{bindValue:p,placeholder:"Search...",fullWidth:!0,onChange:$=>k($.bindValue),onKeyDown:N,inputRef:b}),z.jsx("div",{...A,className:F.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:P,"aria-activedescendant":m>=0&&m<C.length?C[m]?.obj?.k:void 0,children:z.jsx("div",{...L,className:F.virtualScroll,children:T.map(({item:$,index:V,offsetTop:I})=>{const B=$.obj?.k?o.includes($.obj.k):!1;return z.jsxs("li",{ref:m===V?S:null,role:"option",id:V+"li","aria-selected":m===V?"true":"false",tabIndex:-1,className:`${F.listItem} ${m===V?"selected-item":""}`,"aria-label":$.obj?.k+"-"+$.decode,style:{height:`${g}px`,lineHeight:`calc(${g}px - 2*2px)`,transform:`translateY(${I}px)`},onClick:()=>{l?.($),y(V)},children:[z.jsxs("div",{className:F.listItemLeft,children:[d&&z.jsx(me,{icon:$.icon||"",width:16,placeholderIcon:$.placeholderIcon||""}),Pp($.obj?.k,$?.decode||$?.value,r)]}),B&&z.jsx(me,{icon:"check",width:16})]},V+"li")})})})]})},Ja={"smp-floating-toolbar-container":"_smp-floating-toolbar-container_1mq7d_11","smp-toolbar-node-content":"_smp-toolbar-node-content_1mq7d_33","smp-clickable":"_smp-clickable_1mq7d_53","smp-not-clickable":"_smp-not-clickable_1mq7d_63","smp-toolbar-node-children-container":"_smp-toolbar-node-children-container_1mq7d_73","smp-expanded":"_smp-expanded_1mq7d_97","smp-toolbar-node":"_smp-toolbar-node_1mq7d_33","smp-toolbar-node-icon-text-container":"_smp-toolbar-node-icon-text-container_1mq7d_155","smp-toolbar-node-text":"_smp-toolbar-node-text_1mq7d_169"},ZY=({node:e,index:t,level:r,parentId:n,toolbarNodesRefs:i,handleKeyDown:a,handleNodeExpand:o,handleMouseLeave:s,onToolbarLeafNodeClick:l,onToolbarRadioLeafNodeClick:u,renderToolbarNodes:c})=>{const h=Rm(t,n??""),f=(e.children?.length??0)>0,d=!f&&!e?.isLoading&&!ES(e),{anchorRef:p,targetRef:v}=Ni({open:e.isExpanded??!1,position:"right"}),g={node:Ja["smp-toolbar-node"],nodeContent:Ja["smp-toolbar-node-content"],clickable:Ja["smp-clickable"],notClickable:Ja["smp-not-clickable"],iconTextContainer:Ja["smp-toolbar-node-icon-text-container"],nodeText:Ja["smp-toolbar-node-text"],childrenContainer:Ja["smp-toolbar-node-children-container"],expanded:Ja["smp-expanded"]};return e?.shape===ve.RADIO?z.jsx("div",{ref:m=>{m&&i.current.set(h,m)},className:g.node,role:"radiogroup","data-node-id":h,tabIndex:-1,"smp-id":GY(t,n??""),children:z.jsx(B0,{options:e.options?e.options:[],isOpen:!0,"data-node-id":h,displayMode:kc.DESC_ONLY,selectedIndex:e.options?.findIndex(m=>m.obj?.k===e.obj?.k),activeIndex:[e.obj.k],onClick:m=>{u(e,h,m)}},h)},h):z.jsx(z.Fragment,{children:z.jsxs("div",{ref:m=>{m&&i.current.set(h,m)},className:g.node,tabIndex:0,role:"menuitem","data-nodeid":h,"smp-id":`toolbar-item-${t}`,"aria-expanded":e?.isExpanded,onKeyDown:m=>a(m,e,h),onMouseEnter:()=>{o(e,h)},onMouseLeave:()=>{s(h)},onClick:()=>{d&&l?.(e)},children:[z.jsxs("div",{className:`${g.nodeContent} ${d?g.clickable:g.notClickable}`,ref:p,children:[z.jsxs("div",{className:g.iconTextContainer,children:[z.jsx(me,{icon:e.icon??""}),z.jsx("span",{className:g.nodeText,children:z.jsx(Sr,{variant:"body",bindValue:e.value||""})})]}),e.isLoading?z.jsx(me,{icon:"spinner",spin:!0}):f||ES(e)?z.jsx(me,{icon:"chevron-right"}):z.jsx(me,{icon:""})]}),f&&z.jsx(Ri,{children:z.jsx("div",{className:`${g.childrenContainer} ${e.isExpanded?g.expanded:""}`,ref:v,style:{"--smp-toolbar-z-index":`${1001+r}`},children:c(r+1,e.children??[],h)})})]},h)})},Dh=(e,t,r)=>{j.useEffect(()=>{if(!t)return;const n=i=>{e?.some(o=>{if(typeof o=="object"&&o!==null&&"current"in o){const s=o?.current;return s&&s.contains(i.target)}})||r()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,r,t])},s2=({data:e,ref:t,autoSelect:r,onToolbarLoadNodeData:n,onToolbarLeafNodeClick:i,onToolbarLoadInitialData:a,onToolbarClickOutside:o})=>{const s=j.useRef(new Map),[l,u]=j.useState([]),[c,h]=j.useState(e),f=j.useCallback(x=>{x?.current&&u(b=>b.some(S=>S.current===x.current)?b:[...b,x])},[]);Dh(l,!0,()=>{u([]),o?.()}),j.useEffect(()=>{c&&s.current.forEach(x=>{x&&f({current:x})})},[c,f]);const{handleNodeExpand:d,handleMouseLeave:p,onToolbarRadioLeafNodeClick:v}=UY(h,n,i),{handleKeyDown:g}=WY(h,s,d),m=g5(400),y={floatingContainer:Ja["smp-floating-toolbar-container"]};j.useEffect(()=>{if(!c&&a){const x=a();x&&typeof x.then=="function"&&x.then(b=>{r&&b?.children&&b.children.length===1&&typeof i=="function"?i(b.children[0]):h(b)}).catch(b=>{console.error("Errore nel caricamento dati iniziali - Toolbar",b)}),Zg(s,Rm(0))}},[e,m,a,c,r,i]);const _=j.useCallback((x,b,S=null)=>b?.length?z.jsx(z.Fragment,{children:b.map((w,C)=>z.jsx(ZY,{node:w,index:C,level:x,parentId:S,toolbarNodesRefs:s,handleKeyDown:g,handleNodeExpand:d,handleMouseLeave:p,onToolbarLeafNodeClick:i,onToolbarRadioLeafNodeClick:v,renderToolbarNodes:_},Rm(C,S??"")))}):null,[g,d,p,i,v]);return!c||!c?.children?.length?null:z.jsx("div",{ref:t,className:`${t?y.floatingContainer:null}`,"aria-label":"Toolbar","data-component":"toolbar","smp-id":"toolbar-menu",children:_(0,c.children)})},bL=/_G?(?:\d{2}[A-Z0-9]\d{2}_|\*(?:BOLD|ERROR|ITALIC|UNDERLINE)_)|_n_/g;function KY(e){return/_G?(?:\d{2}[A-Z0-9]\d{2}_|\*(?:BOLD|ERROR|ITALIC|UNDERLINE)_)|_n_/.test(e)}function JY(e){const t=[];let r=0,n,i=null;for(;n=bL.exec(e);){const a=n.index;if(a>r){const s=e.substring(r,a);i?i.content+=s:t.push({content:s})}const o=n[0];if(o==="_n_")i?(i.closed=!0,i=null):t.push({content:""});else{const s=o.replace(/^_G?/,"").replace(/_$/,"");i&&(i.closed=!0),i={tag:s,content:""},t.push(i)}r=bL.lastIndex}if(r<e.length){const a=e.substring(r);i?i.content+=a:t.push({content:a})}return i&&(i.closed=!0),t}function QY(e){return JY(e)?.map((t,r)=>{const n=t.content||"";if(t.tag){const i=eq(t.tag);return z.jsx("span",{"data-gcell-code":t.tag,style:i,children:n},r)}return z.jsx("span",{children:n},r)})}const tq=/^[a-zA-Z0-9]+$/,SL={"*BOLD":{fontWeight:"bold"},"*ERROR":{color:"white",backgroundColor:"red"},"*UNDERLINE":{textDecoration:"underline"},"*ITALIC":{fontStyle:"italic"}};function eq(e){if(!e)return{};if(SL[e])return SL[e];if(!tq.test(e))return{};let t={};return e.split("").forEach((r,n)=>{switch(n){case 0:t.color=`var(--smp-gcell-color-${r})`;break;case 1:t=rq(t,r);break;case 2:t.background=`var(--smp-gcell-background-color-${r})`;break;case 3:t.fontFamily=`var(--smp-gcell-font-family-${r})`;break}}),t}function rq(e,t){switch(t){case"1":return{...e,fontWeight:"bold"};case"2":return{...e,fontStyle:"italic"};case"3":return{...e,textDecoration:"underline"};default:return e}}const Sr=({variant:e="body",bindValue:t,color:r,role:n,className:i,style:a,toolbar:o,justifiedContent:s,onToolbarLeafNodeClick:l,onToolbarLoadInitialData:u,onToolbarLoadNodeData:c,onAiIconClick:h,...f})=>{const d=$Y[e],[p,v]=j.useState(!1),{anchorRef:g,targetRef:m}=Ni({position:"bottom",open:p}),y=b=>b?b.split(" ").filter(Boolean).map(S=>$u[S]||S).join(" "):"",_={container:`${$u["smp-typography"]} ${e?$u[`smp-typography-${e}`]:""} ${f.disabled?$u["smp-typography-disabled"]:""} ${s?$u[`smp-typography-${s}`]:""} ${y(i)}`,toolbar:`${$u["smp-typography-toolbar"]} `},x=b=>{l&&l(b),v(!1)};return z.jsxs(z.Fragment,{children:[z.jsxs(d,{"data-component":"typography",className:_.container,disabled:f.disabled,style:{"--smp-typography-color-base":r,...a},role:n,children:[KY(t)?QY(t):t,o&&z.jsx("div",{"smp-id":"toolbar-button",ref:g,className:_.toolbar,children:z.jsx(me,{tabIndex:0,icon:"more_vert",isInteractable:!0,onClick:b=>{b.stopPropagation(),v(!0)}})}),h&&z.jsx("div",{"smp-id":"typography-ai-icon",className:_.toolbar,children:z.jsx(me,{tabIndex:0,icon:"smeup-ai",title:"Smeup AI",isInteractable:!0,onClick:b=>{b.stopPropagation(),h()}})})]}),p&&z.jsx(Ri,{children:z.jsx(s2,{ref:m,onToolbarLeafNodeClick:x,onToolbarLoadNodeData:c,onToolbarLoadInitialData:u,onToolbarClickOutside:()=>v(!1)})})]})},qi={"smp-tabbar-container":"_smp-tabbar-container_ly1md_1","smp-tabbar-scroll-button":"_smp-tabbar-scroll-button_ly1md_9","smp-tabbar-scroll-buttonRight":"_smp-tabbar-scroll-buttonRight_ly1md_14","smp-tabbar-scroll-buttonLeft":"_smp-tabbar-scroll-buttonLeft_ly1md_18","smp-tabbar-list-wrapper":"_smp-tabbar-list-wrapper_ly1md_22","smp-tabbar-list":"_smp-tabbar-list_ly1md_22","smp-tabbar-tab":"_smp-tabbar-tab_ly1md_39","smp-active":"_smp-active_ly1md_63","smp-tabbar-tab-extraSmall":"_smp-tabbar-tab-extraSmall_ly1md_76","smp-tabbar-tab-small":"_smp-tabbar-tab-small_ly1md_81","smp-tabbar-tab-base":"_smp-tabbar-tab-base_ly1md_86","smp-tabbar-tab-large":"_smp-tabbar-tab-large_ly1md_91","smp-tabbar-tab-extraLarge":"_smp-tabbar-tab-extraLarge_ly1md_96"},_5=({data:e,sizing:t="large",selectedIndex:r,onTabChange:n,onToolbarLoadInitialData:i,onToolbarLoadNodeData:a,onToolbarLeafNodeClick:o,onTabAiIconClick:s})=>{const[l,u]=j.useState(r??0),[c,h]=j.useState(!1),[f,d]=j.useState(!1),p=j.useRef(null);if(j.useEffect(()=>{const b=p.current;if(!b)return;y();const S=()=>y();return b.addEventListener("scroll",S),window.addEventListener("resize",y),()=>{b.removeEventListener("scroll",S),window.removeEventListener("resize",y)}},[]),j.useEffect(()=>{r!==void 0&&u(r)},[r]),!e.children||e.children.length===0)return z.jsx("div",{className:"tab-bar-empty",children:"No tabs available"});const v={container:qi["smp-tabbar-container"],listWrapper:qi["smp-tabbar-list-wrapper"],list:qi["smp-tabbar-list"],tab:`${qi["smp-tabbar-tab"]} ${t?qi[`smp-tabbar-tab-${t}`]:""}`,scrollButtonRight:`${qi["smp-tabbar-scroll-button"]} ${qi["smp-tabbar-scroll-buttonRight"]}`,scrollButtonLeft:`${qi["smp-tabbar-scroll-button"]} ${qi["smp-tabbar-scroll-buttonLeft"]}`,active:qi["smp-active"]},g=100,m=2,y=()=>{const b=p.current;b&&(h(b.scrollLeft>0),d(b.scrollLeft+b.clientWidth<b.scrollWidth-m))},_=()=>{p.current?.scrollBy({left:-g,behavior:"smooth"})},x=()=>{p.current?.scrollBy({left:g,behavior:"smooth"})};return z.jsxs("div",{className:v.container,role:"tabpanel","data-component":"tab-bar",children:[c&&z.jsx("div",{className:v.scrollButtonLeft,children:z.jsx(Be,{bindValue:"",optionalDisplayValue:"<",onClick:_,variant:"base",sizing:t})}),z.jsx("div",{className:v.listWrapper,children:z.jsx("div",{className:v.list,ref:p,role:"tablist",children:e.children.map((b,S)=>{const w=b.data?.agentCode;return z.jsxs("button",{type:"button","data-comp-id-tab":b.data?.["data-comp-id"]??void 0,className:`${S===l?v.active:""} ${v.tab} `,role:"tab","aria-selected":S===l,tabIndex:S===l?0:-1,onClick:()=>{n?.(S,b),u(S)},children:[b.icon&&z.jsx(me,{icon:b.icon,placeholderIcon:b.placeholderIcon}),z.jsx(Sr,{variant:"body",bindValue:b.decode||`Tab ${S+1}`,...b.data?.toolbar===!0&&l===S?{toolbar:!0,onToolbarLeafNodeClick:o,onToolbarLoadInitialData:i,onToolbarLoadNodeData:a}:{},...w&&s&&l===S?{onAiIconClick:()=>s(w)}:{}})]},S)})})}),f&&z.jsx("div",{className:v.scrollButtonRight,children:z.jsx(Be,{bindValue:"",optionalDisplayValue:">",onClick:x,variant:"base",sizing:t})})]})},Nm=({children:e,layout:t={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(e)?e.map(r=>({id:r.props.id})):[{id:e.props.id}]}]}})=>{const[r,n]=j.useState(0),i={};j.Children.forEach(e,p=>{j.isValidElement(p)&&(i[p.props.id]=p)});const a="--smp-grid-template-cols",o="--smp-grid-template-rows",s=v5(t.sections??[],Object.keys(i)),l=p=>p.reduce((v,g)=>{let m="",y={},_={},x="";return g.sections?.length?(m=In["smp-layout-section-grid"],y=l(g.sections),g.gridCols===void 0&&(x=In[g.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],g.horizontal||yL(g.sections)?_=mL(g.sections,g.horizontal?a:o):_={[a]:"auto",[o]:"auto"})):g.content?.length&&(g.gridCols!==void 0&&g.gridCols>0?(m=In["smp-layout-section-grid"],x=In["smp-grid-template-cols"],_={[a]:`repeat(${g.gridCols}, 1fr)`}):m=In["smp-layout-section-flex"]),{...v,...y,[g.id||""]:{classes:`${m} ${In[g.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${x} ${g.justify?`${Jo[`smp-justifyContent-${g.justify}`]}`:""} ${g.align?`${Jo[`smp-alignItems-${g.align}`]}`:""}`,styles:_}}},{}),u=l(s),c=`${In["smp-layout"]} ${t.horizontal?In["smp-layout-horizontal"]:In["smp-layout-vertical"]} ${t.inline?In["smp-layout-inline"]:""}`;let h={};(t.horizontal||yL(t.sections||[]))&&(h=mL(s,t.horizontal?a:o));const f=(p,v)=>{const g=z.jsx("div",{"smp-id":`section-${p.id}`,className:u[p.id||""].classes,style:u[p.id||""].styles,children:p.sections?.length?p.sections.map(m=>f(m)):p.content?.map(m=>d(m,p.justify,p.align))},`section-${p.id}`);return p.title&&!v?z.jsxs("div",{className:In["smp-layout-section-with-title"],children:[z.jsx("span",{className:`${In["smp-layout-section-title"]} ${p.justify?Jo[`smp-justifyContent-${p.justify}`]:""} ${p.align?Jo[`smp-alignItems-${p.align}`]:""}`,children:z.jsx(Io,{label:p.title})}),g]},`title-section-${p.id}`):g},d=(p,v,g)=>{const m=i[p.id||""];if(!m)return null;const _={gridColumnStart:(p.colSpan&&p.colSpan>0?`span ${p.colSpan}`:p.colStart&&p.colStart<1?"1":void 0)??p.colStart,gridColumnEnd:p.colEnd&&p.colEnd>0?p.colEnd:void 0},x=`${In["smp-layout-cell-container"]} ${v?Jo[`smp-justifyContent-${v}`]:""} ${g?Jo[`smp-alignItems-${g}`]:""}`;return z.jsx("div",{className:x,style:_,"smp-id":p.id,children:m},p.id)};return z.jsxs("div",{className:c,style:h,"smp-id":"layout",children:[t.sectionsType==="tab"&&t.sections&&t?.sections.length>1&&z.jsx(_5,{data:{type:"SmeupDataTree",children:s.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0,toolbar:!1}))},selectedIndex:r,onTabChange:n}),t.sectionsType?f(s[r],!0):s.map(p=>f(p))]})},nq={"smp-appbar":"_smp-appbar_ui0tb_1"};var x5=(e=>(e.Auto="auto",e.Always="always",e))(x5||{});const sf={"smp-breadcrumbs":"_smp-breadcrumbs_825j3_1","smp-breadcrumb-item":"_smp-breadcrumb-item_825j3_6","smp-breadcrumb-link":"_smp-breadcrumb-link_825j3_12","smp-breadcrumb-ellipsis":"_smp-breadcrumb-ellipsis_825j3_26"},iq=e=>e?.type==="SmeupDataTree",aq=e=>e?.type==="SmeupDataTable",Kg={obj:{t:"",p:"",k:""},decode:"",shape:void 0},b5=(e,t=1)=>e.reduce((r,n)=>{const i=n.children?.length?b5(n.children,t+1):t;return Math.max(r,i)},t),bo=e=>{if(aq(e)){const t=e,r=t.columns.filter(a=>a.visible!==!1),n=r[0]?.name??"",i=r[1]?.name??n;return t.rows.reduce((a,o)=>{const s={...o.cells?.[n],decode:o.cells?.[i]?.value||o.cells?.[n].obj?.k};return[...a,s]},[])}else if(iq(e))return S5(e.children??[])},S5=e=>e?.map(t=>({...t,decode:t.decode||t.value||t.obj?.k||"",children:S5(t.children??[])})),w5=({data:e,fun:t,onOptionsRequest:r,onClick:n,options:i,CollapseThr:a,CollapseMode:o=x5.Auto,onToolbarLeafNodeClick:s,onToolbarLoadNodeData:l,onToolbarLoadInitialData:u})=>{const c=e?.children||i,[h,f]=j.useState(c);j.useEffect(()=>{f(c)},[c]);const d=j.useRef(null),[p,v]=j.useState(!1),[g,m]=j.useState(0);j.useEffect(()=>{!h&&r&&t&&r(t,void 0).then(P=>f(bo(P)||[])).catch(P=>{console.error("Errore nel caricamento delle opzioni per Breadcrumbs",P)})},[h,t,r]);const{anchorRef:y,targetRef:_,anchorWidth:x}=Ni({position:"bottom",open:p}),b=j.useCallback(()=>{v(!1),d?.current?.focus()},[]);Dh([_],p,()=>b());const S={breadcrumbs:sf["smp-breadcrumbs"],breacrumbItem:sf["smp-breadcrumb-item"],link:sf["smp-breadcrumb-link"],lastElement:sf["smp-breadcrumb-current"],ellipsis:sf["smp-breadcrumb-ellipsis"]},w=P=>{P.key==="Escape"&&b()},C=P=>{n?.(P)},k=P=>{const F=Math.max(Number(a)||3,3);let O=!1,$;const V=P&&P[P.length-1];let I;switch(o){case"always":I=P&&P.slice(0,P.length-1),O=!!(I&&I.length>0);break;case"auto":default:O=P&&P.length>F,$=P&&P.length>1?P[0]:void 0,I=P&&P.slice(1,P.length-1);break}return{shouldCollapse:O,first:$,last:V,middleItems:I}},T=P=>{P?.focus()},A=(P,F,O)=>{if(!P)return;const $=P?.decode||P?.value||P?.obj?.k;return z.jsxs("li",{className:S.breacrumbItem,"aria-current":O?"page":void 0,children:[(P?.icon||P?.placeholderIcon)&&z.jsx(me,{icon:P.icon||"",placeholderIcon:P.placeholderIcon||"",width:16}),P?.fun&&!O?z.jsx("a",{href:"/",onClick:V=>{V.preventDefault(),C?.(P)},className:S.link,children:z.jsx(Sr,{variant:"body",bindValue:$||""})}):z.jsx("div",{className:S.lastElement,children:z.jsx(Sr,{variant:"body",bindValue:$||"",toolbar:O&&!!u,onToolbarLeafNodeClick:s,onToolbarLoadNodeData:l,onToolbarLoadInitialData:u})})]},F)},{shouldCollapse:L,first:D,last:E,middleItems:N}=k(h);return z.jsx("nav",{"aria-label":"Breadcrumbs",children:z.jsxs("ol",{className:S.breadcrumbs,children:[A(D,0,!1),L&&z.jsxs("li",{ref:d,className:`${S.breacrumbItem} ${S.ellipsis}`,children:[z.jsx("div",{ref:y,"aria-label":"Show more breadcrumbs",children:z.jsx(me,{icon:"more_horiz",isInteractable:!0,tabIndex:0,onClick:P=>{P.preventDefault(),v(F=>!F),m(0)}})}),p&&z.jsx(Ri,{children:z.jsx(B0,{options:N||[],onClick:C,ref:_,width:x,showFilter:!1,onKeyDown:w,onOpen:T,isOpen:p,floating:!0,selectedIndex:g,displayMode:"DescOnly",showLeadingIcon:!0})})]}),!L&&N?.map((P,F)=>A(P,F+1,!1)),A(E,h&&h.length-1||0,!0)]})})},PS=e=>e?e.t=="D8"||e.t=="A8":!1,C5=e=>e?e.t=="NR":!1,oq=e=>e?e.t=="I1":!1,sq=e=>{if(e){const t=e.split(";");if(t.length>=3)return{t:t[0],p:t[1],k:t.slice(2).join(";")}}return{t:"",p:"",k:""}};class Om{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){return new Om(t,!!(t&&(t.k=="1"||t.k=="true")))}getValue(){return this.value}getLegacyValue(){if(this.class?.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function lq(e,t){if(Dc(e)){const c=new Date(e);if(!isNaN(c.getTime()))return c}const r=new Date;let n;/[/-]/.test(e)?n=e.split(/[/-]/).map((h,f)=>f<2&&h.length===1?"0"+h:h).join(""):n=e.replaceAll("/","").replaceAll("-","");let i="DDMMYYYY";t==="en"&&(i="MMDDYYYY");const a=i.indexOf("DD"),o=i.indexOf("MM");let s=0,l=0,u="";switch(n.length){case 1:case 2:return s=parseInt(n),r.setDate(s),_v(r)?r:e;case 3:case 4:return s=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),o===0?(r.setMonth(s-1),r.setDate(l)):a===0&&(r.setMonth(l-1),r.setDate(s)),_v(r)?r:e;case 5:case 6:{s=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),Number(n.substring(4))>=50?u="19"+n.substring(4):u="20"+n.substring(4);let c=0,h=0;return o===0?(c=l,h=s-1,r.setFullYear(parseInt(u),h,c)):a===0&&(c=s,h=l-1,r.setFullYear(parseInt(u),h,c)),eh(s,h,parseInt(u))&&_v(r)?r:e}case 7:case 8:{s=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),u=n.substring(4);let c=0,h=0;return o===0?(c=l,h=s-1,r.setFullYear(parseInt(u),h,c)):a===0&&(c=s,h=l-1,r.setFullYear(parseInt(u),h,c)),eh(c,h,parseInt(u))&&_v(r)?r:e}}return e}function Dc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&e.length===10}function _v(e){return e instanceof Date&&!isNaN(e.getTime())}function uq(e){if(!/^\d{8}$/.test(e))return!1;const t=parseInt(e.slice(0,4),10),r=parseInt(e.slice(4,6),10),n=parseInt(e.slice(6,8),10);return eh(n,r-1,t)}function cq(e){if(!/^\d{6}$/.test(e))return!1;const t=parseInt(Bm(e.substring(0,2))+e.substring(0,2),10),r=parseInt(e.slice(2,4),10),n=parseInt(e.slice(4,6),10);return eh(n,r-1,t)}function hq(e){if(!/^\d{6}$/.test(e))return!1;const t=parseInt(Bm(e.substring(4,6))+e.substring(4,6),10),r=parseInt(e.slice(2,4),10),n=parseInt(e.slice(0,2),10);return eh(n,r-1,t)}function fq(e){if(!/^\d{8}$/.test(e))return!1;const t=parseInt(e.slice(4,8),10),r=parseInt(e.slice(2,4),10),n=parseInt(e.slice(0,2),10);return eh(n,r-1,t)}function Bm(e){return parseInt(e.substring(0,2))>39?"19":"20"}function eh(e,t,r){const n=[31,dq(r)?29:28,31,30,31,30,31,31,30,31,30,31];return!(t<0||t>11||e<1||e>n[t])}function dq(e){return e%4===0&&(e%100!==0||e%400===0)}function pq(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return isNaN(t)||isNaN(Number(r))||isNaN(Number(n))?e.toString():`${t}-${r}-${n}`}class rh{class;date;constructor(t,r){this.class=t,this.date=r}static fromDataObj(t){if(t){const r=wL.get(`${t.t}${t.p}`);if(r)return new rh(t,r.legacyToIso(t.k));throw new Error(`Date creation from ${t.t}${t.p} not implemented yet`)}else throw new Error("Date creation from obj undefined not implemented yet")}getLegacyValue(){if(this.class){const t=wL.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}throw new Error("Date object not implemented for obj undefined")}getValue(){return this.date}}const wL=new Map([["D8*YYMD",{legacyToIso(e){return uq(e)&&`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`||e},isoToLegacy(e){return Dc(e)&&e.replaceAll("-","")||e}}],["D8*YMD",{legacyToIso(e){return cq(e)?`${Bm(e.substring(0,2))+e.substring(0,2)}-${e.substring(2,4)}-${e.substring(4,6)}`:e},isoToLegacy(e){if(Dc(e)){const t=e.split("-");return t[0].substring(2)+t[1]+t[2]}return e}}],["D8*DMY",{legacyToIso(e){return hq(e)?`${Bm(e.substring(4,6))+e.substring(4,6)}-${e.substring(2,4)}-${e.substring(0,2)}`:e},isoToLegacy(e){if(Dc(e)){const t=e.split("-");return t[2]+t[1]+t[0].substring(2)}return e}}],["D8*DMYY",{legacyToIso(e){return fq(e)?`${e.substring(4,8)}-${e.substring(2,4)}-${e.substring(0,2)}`:e},isoToLegacy(e){if(Dc(e)){const t=e.split("-");return t[2]+t[1]+t[0]}return e}}],["A8",{legacyToIso(e){return e},isoToLegacy(e){return e}}]]);class Jl{class;value;decimalSeparator;constructor(t,r,n="."){this.class=t,this.value=r,this.decimalSeparator=n}static fromDataObj(t,r){if(t){const n=r==="."?",":".";if(t.k==="")return new Jl(t,void 0,r);let i=t.k.trim();const a=i.endsWith("-");a&&(i=i.slice(0,-1));const s=i.replace(new RegExp(`\\${n}`,"g"),"").replace(r,"."),l=parseFloat(s),u=a?-l:l;return new Jl(t,u,r)}throw new Error("Number not implemented for obj undefined")}getLegacyValue(){return this.value!=null?this.value.toString().replace(".",this.decimalSeparator):""}getValue(){return this.value}}function vq(e){return typeof e=="string"&&/^\d{6}$/.test(e)}class Fm{class;time;constructor(t,r){this.class=t,this.time=r}static fromDataObj(t){if(t){const r=CL.get(`${t.t}${t.p}`);if(r)return new Fm(t,r.legacyToIso(t.k));throw new Error(`time creation from ${t.t}${t.p} not implemented yet`)}throw new Error("time creation from obj undefined not implemented yet")}getLegacyValue(){if(this.class){const t=CL.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}throw new Error("Time object not implemented for obj undefined")}getValue(){return this.time}}const CL=new Map([["I12",{legacyToIso(e){return vq(e)&&`${e.substring(0,2)}:${e.substring(2,4)}:${e.substring(4,6)}`||e},isoToLegacy(e){return e.replaceAll(":","")||e}}]]),re=e=>typeof e=="string",lf=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},TL=e=>e==null?"":""+e,gq=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},mq=/###/g,kL=e=>e&&e.indexOf("###")>-1?e.replace(mq,"."):e,AL=e=>!e||re(e),Sd=(e,t,r)=>{const n=re(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(AL(e))return{};const a=kL(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return AL(e)?{}:{obj:e,k:kL(n[i])}},DL=(e,t,r)=>{const{obj:n,k:i}=Sd(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Sd(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Sd(e,o,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},yq=(e,t,r,n)=>{const{obj:i,k:a}=Sd(e,t,Object);i[a]=i[a]||[],i[a].push(r)},$m=(e,t)=>{const{obj:r,k:n}=Sd(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},_q=(e,t,r)=>{const n=$m(e,r);return n!==void 0?n:$m(t,r)},T5=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?re(e[n])||e[n]instanceof String||re(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):T5(e[n],t[n],r):e[n]=t[n]);return e},zu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var xq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const bq=e=>re(e)?e.replace(/[&<>"'\/]/g,t=>xq[t]):e;class Sq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const wq=[" ",",","?","!",";"],Cq=new Sq(20),Tq=(e,t,r)=>{t=t||"",r=r||"";const n=wq.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=Cq.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},RS=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=a;l<n.length;++l)if(l!==a&&(s+=r),s+=n[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;a+=l-a+1;break}i=o}return i},Gd=e=>e?.replace("_","-"),kq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Vm{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||kq,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(re(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new Vm(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Vm(this.logger,t)}}var da=new Vm;class F0{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i.apply(i,[t,...r])})}}class LL extends F0{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,i={}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],n&&(Array.isArray(n)?s.push(...n):re(n)&&a?s.push(...n.split(a)):s.push(n)));const l=$m(this.data,s);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),l||!o||!re(n)?l:RS(this.data?.[t]?.[r],n,a)}addResource(t,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,r];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),DL(this.data,s,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n,i={silent:!1}){for(const a in n)(re(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a,o={silent:!1,skipCopy:!1}){let s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let l=$m(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?T5(l,n,a):l={...l,...n},DL(this.data,s,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var k5={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{t=this.processors[a]?.process(t,r,n,i)??t}),t}};const A5=Symbol("i18next/PATH_KEY");function Aq(){const e=[],t=Object.create(null);let r;return t.get=(n,i)=>(r?.revoke?.(),i===A5?e:(e.push(i),r=Proxy.revocable(n,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function NS(e,t){const{[A5]:r}=e(Aq());return r.join(t?.keySeparator??".")}const ML={},Tx=e=>!re(e)&&typeof e!="boolean"&&typeof e!="number";class zm extends F0{constructor(t,r={}){super(),gq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=da.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};if(t==null)return!1;const i=this.resolve(t,n);if(i?.res===void 0)return!1;const a=Tx(i.res);return!(n.returnObjects===!1&&a)}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Tq(t,n,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:re(a)?[a]:a};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(i)}return{key:t,namespaces:re(a)?[a]:a}}translate(t,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=NS(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const h=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return f?a?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;const d=this.resolve(t,i);let p=d?.res;const v=d?.usedKey||s,g=d?.exactUsedKey||s,m=["[object Number]","[object Function]","[object RegExp]"],y=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!re(i.count),b=zm.hasDefaultValue(i),S=x?this.pluralResolver.getSuffix(h,i.count,i):"",w=i.ordinal&&x?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",C=x&&!i.ordinal&&i.count===0,k=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${w}`]||i.defaultValue;let T=p;_&&!p&&b&&(T=k);const A=Tx(T),L=Object.prototype.toString.apply(T);if(_&&T&&A&&m.indexOf(L)<0&&!(re(y)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,T,{...i,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(d.res=D,d.usedParams=this.getUsedParamsDetails(i),d):D}if(o){const D=Array.isArray(T),E=D?[]:{},N=D?g:v;for(const P in T)if(Object.prototype.hasOwnProperty.call(T,P)){const F=`${N}${o}${P}`;b&&!p?E[P]=this.translate(F,{...i,defaultValue:Tx(k)?k[P]:void 0,joinArrays:!1,ns:l}):E[P]=this.translate(F,{...i,joinArrays:!1,ns:l}),E[P]===F&&(E[P]=T[P])}p=E}}else if(_&&re(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,i,n));else{let D=!1,E=!1;!this.isValidLookup(p)&&b&&(D=!0,p=k),this.isValidLookup(p)||(E=!0,p=s);const P=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:p,F=b&&k!==p&&this.options.updateMissing;if(E||D||F){if(this.logger.log(F?"updateKey":"missingKey",h,u,s,F?k:p),o){const I=this.resolve(s,{...i,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let I=0;I<$.length;I++)O.push($[I]);else this.options.saveMissingTo==="all"?O=this.languageUtils.toResolveHierarchy(i.lng||this.language):O.push(i.lng||this.language);const V=(I,B,G)=>{const H=b&&G!==p?G:P;this.options.missingKeyHandler?this.options.missingKeyHandler(I,u,B,H,F,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(I,u,B,H,F,i),this.emit("missingKey",I,u,B,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?O.forEach(I=>{const B=this.pluralResolver.getSuffixes(I,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(G=>{V([I],s+G,i[`defaultValue${G}`]||k)})}):V(O,s,k))}p=this.extendTranslation(p,t,i,d,n),E&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${s}`),(E||D)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,D?p:void 0,i))}return a?(d.res=p,d.usedParams=this.getUsedParamsDetails(i),d):p}extendTranslation(t,r,n,i,a){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=re(t)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const h=t.match(this.interpolator.nestingRegexp);u=h&&h.length}let c=n.replace&&!re(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,n.lng||this.language||i.usedLng,n),l){const h=t.match(this.interpolator.nestingRegexp),f=h&&h.length;u<f&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>a?.[0]===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${r[0]}`),null):this.translate(...h,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s=re(o)?[o]:o;return t!=null&&s?.length&&n.applyPostProcessor!==!1&&(t=k5.handle(s,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,i,a,o,s;return re(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;i=c;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const f=r.count!==void 0&&!re(r.count),d=f&&!r.ordinal&&r.count===0,p=r.context!==void 0&&(re(r.context)||typeof r.context=="number")&&r.context!=="",v=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(g=>{this.isValidLookup(n)||(s=g,!ML[`${v[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(ML[`${v[0]}-${g}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,m,g,r);else{let x;f&&(x=this.pluralResolver.getSuffix(m,r.count,r));const b=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&x.indexOf(S)===0&&y.push(c+x.replace(S,this.options.pluralSeparator)),y.push(c+x),d&&y.push(c+b)),p){const w=`${c}${this.options.contextSeparator||"_"}${r.context}`;y.push(w),f&&(r.ordinal&&x.indexOf(S)===0&&y.push(w+x.replace(S,this.options.pluralSeparator)),y.push(w+x),d&&y.push(w+b))}}let _;for(;_=y.pop();)this.isValidLookup(n)||(a=_,n=this.getResource(m,g,_,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!re(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class EL{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=da.create("languageUtils")}getScriptPartFromCode(t){if(t=Gd(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Gd(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(re(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),re(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return re(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):re(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const IL={zero:0,one:1,two:2,few:3,many:4,other:5},PL={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Dq{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=da.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=Gd(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),PL;if(!t.match(/-|_/))return PL;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>IL[i]-IL[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,r,n={}){const i=this.getRule(t,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const RL=(e,t,r,n=".",i=!0)=>{let a=_q(e,t,r);return!a&&i&&re(r)&&(a=RS(e,r,n),a===void 0&&(a=RS(t,r,n))),a},kx=e=>e.replace(/\$/g,"$$$$");class Lq{constructor(t={}){this.logger=da.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=r!==void 0?r:bq,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?zu(a):o||"{{",this.suffix=s?zu(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?zu(f):d||zu("$t("),this.nestingSuffix=p?zu(p):v||zu(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r?.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=d=>{if(d.indexOf(this.formatSeparator)<0){const m=RL(r,l,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const p=d.split(this.formatSeparator),v=p.shift().trim(),g=p.join(this.formatSeparator).trim();return this.format(RL(r,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...i,...r,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>kx(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?kx(this.escape(d)):kx(d)}].forEach(d=>{for(s=0;a=d.regex.exec(t);){const p=a[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const g=c(t,a,i);o=re(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(h){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!re(o)&&!this.useRawValueToEscape&&(o=TL(o));const v=d.safeValue(o);if(t=t.replace(a[0],v),h?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,r,n={}){let i,a,o;const s=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const h=l.split(new RegExp(`${c}[ ]*{`));let f=`{${h[1]}`;l=h[0],f=this.interpolate(f,o);const d=f.match(/'/g),p=f.match(/"/g);((d?.length??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&!re(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(l=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&!re(a))return a;re(a)||(a=TL(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),l.length&&(a=l.reduce((c,h)=>this.format(c,h,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const Mq=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},NL=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=t[o];return s||(s=e(Gd(n),i),t[o]=s),s(r)}},Eq=e=>(t,r,n)=>e(Gd(r),n)(t);class Iq{constructor(t={}){this.logger=da.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?NL:Eq;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return s=>o.format(s)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return s=>o.format(s)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return s=>o.format(s)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return s=>o.format(s,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return s=>o.format(s)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=NL(r)}format(t,r,n,i={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:c}=Mq(l);if(this.formats[u]){let h=s;try{const f=i?.formatParams?.[i.interpolationkey]||{},d=f.locale||f.lng||i.locale||i.lng||n;h=this.formats[u](s,d,{...c,...i,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const Pq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Rq extends F0{constructor(t,r,n,i={}){super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=da.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},s={},l={};return t.forEach(u=>{let c=!0;r.forEach(h=>{const f=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),a[f]===void 0&&(a[f]=!0),l[h]===void 0&&(l[h]=!0)))}),c||(s[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const s={};this.queue.forEach(l=>{yq(l.loaded,[a],o),Pq(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(h=>{s[u][h]===void 0&&(s[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n,i=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(t,r);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,r,s)}prepareLoading(t,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();re(t)&&(t=this.languageUtils.toResolveHierarchy(t)),re(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,r,n,i,a,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){const l={...o,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,r,n,i,l):c=u(t,r,n,i),c&&typeof c.then=="function"?c.then(h=>s(null,h)).catch(s):s(null,c)}catch(c){s(c)}else u(t,r,n,i,s,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const OL=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),re(e[1])&&(t.defaultValue=e[1]),re(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),BL=e=>(re(e.ns)&&(e.ns=[e.ns]),re(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),re(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),xv=()=>{},Nq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class Wd extends F0{constructor(t={},r){if(super(),this.options=BL(t),this.services={},this.logger=da,this.modules={external:[]},Nq(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(re(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=OL();this.options={...n,...this.options,...BL(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?da.init(i(this.modules.logger),this.options):da.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Iq;const c=new EL(this.options);this.store=new LL(this.options.resources,this.options);const h=this.services;h.logger=da,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new Dq(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(h.formatter=i(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Lq(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Rq(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.languageDetector&&(h.languageDetector=i(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=i(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new zm(this.services,this.options),this.translator.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,r||(r=xv),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const s=lf(),l=()=>{const u=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(h),r(c,h)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,r=xv){let n=r;const i=re(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,r,n){const i=lf();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=xv),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&k5.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=lf();this.emit("languageChanging",t);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===t&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(s,(...u)=>this.t(...u))},o=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const l=re(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(re(s)?[s]:s);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,c=>{a(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const i=(a,o,...s)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([a,o].concat(s)):l={...o},l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||i.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(a)?c=a.map(h=>(typeof h=="function"&&(h=NS(h,{...this.options,...o})),`${l.keyPrefix}${u}${h}`)):(typeof a=="function"&&(a=NS(a,{...this.options,...o})),c=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a),this.t(c,l)};return re(t)?i.lng=t:i.lngs=t,i.ns=r,i.keyPrefix=n,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=lf();return this.options.ns?(re(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=lf();re(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const a=i.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new EL(OL());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new Wd(t,r)}cloneInstance(t={},r=xv){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new Wd(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,h)=>(c[h]={...l[u][h]},c),l[u]),l),{});a.store=new LL(s,i),a.services.resourceStore=a.store}return a.translator=new zm(a.services,i),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const cr=Wd.createInstance();cr.createInstance=Wd.createInstance;cr.createInstance;cr.dir;cr.init;cr.loadResources;cr.reloadResources;cr.use;cr.changeLanguage;cr.getFixedT;cr.t;cr.exists;cr.setDefaultNamespace;cr.hasLoadedNamespace;cr.loadNamespaces;cr.loadLanguages;const Oq={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Bq={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Fq={AddSubGroup:"Aggiungi sottogruppo",AddFilter:"Aggiungi Filtro",Operator:{String:{Starts:"Inizia per",Contains:"Contiene",Equals:"È uguale a"},Number:{Greater:"Maggiore di",GreaterOrEqual:"Maggiore o uguale a",Less:"Minore di",LessOrEqual:"Minore o uguale a",Equals:"Uguale a",NotEquals:"Diverso da"},Date:{Before:"Prima del",After:"Dopo del",On:"Il giorno"}}},$q={SelectFiles:"Scegli",DropAreaLabel:"Trascina i file qua oppure clicca su Scegli",Upload:"Carica",Cancel:"Annulla",Retry:"Riprova",FileTooLarge:"Dimensione del file non consentita"},Vq={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido",ConfirmButton:"Conferma",AutocompleteDefaultPlaceholder:"Inserisci codice o descrizione",ChipsInputDefaultPlaceholder:"Inserisci il valore e premi invio",NotificationWidgetNoMessages:"Nessuna notifica",NotificationWidgetDismissAll:"Cancella tutto"},zq={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Oq,Month:Bq,FilterBuilder:Fq,FileUpload:$q,Generic:Vq},Gq={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Wq={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},Hq={AddSubGroup:"Add Sub Group",AddFilter:"Add Filter",Operator:{String:{Starts:"Starts with",Contains:"Contains",Equals:"Equal to"},Number:{Greater:"Greater than",GreaterOrEqual:"Greater or equal than",Less:"Less than",LessOrEqual:"Less or equal than",Equals:"Equal to",NotEquals:"Other than"},Date:{Before:"Before date",After:"After date",On:"On"}}},jq={SelectFiles:"Choose",DropAreaLabel:"Drop file here or click to Choose",Upload:"Upload",Cancel:"Cancel",Retry:"Retry",FileTooLarge:"File too large"},Uq={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid",ConfirmButton:"Confirm",AutocompleteDefaultPlaceholder:"Type code or description",ChipsInputDefaultPlaceholder:"Insert value and press enter",NotificationWidgetNoMessages:"No notifications",NotificationWidgetDismissAll:"Dismiss all"},Yq={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Gq,Month:Wq,FilterBuilder:Hq,FileUpload:jq,Generic:Uq};function FL(e,t){return new RegExp(qq(e),t)}function qq(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xq(e){if(!e)return{};const t={};let r="",n="",i=0,a=!0;for(const o of e)a&&o!=="("&&o!==")"?r+=o:o==="("?(i===0?a=!1:n+=o,i++):o===")"?(i===1?(t[r.trim()]=n,a=!0,r="",n=""):n+=o,i--):n+=o;return t}const Zq=(e,t,r)=>{let n=e;return isNaN(n)||(t!=null&&(n=Math.max(n,t)),r!=null&&(n=Math.min(n,r))),n},Kq=(e,t)=>{const n=Intl.NumberFormat(e).formatToParts(1000.1),i=n.find(o=>o.type==="group")?.value??",",a=t??n.find(o=>o.type==="decimal")?.value??".";return{groupingChar:i,decimalChar:a}};function Jq(e,t,r,n){let i=t;const a=tX(e,r);if(!i){const s=Math.abs(a);s-Math.floor(s)?i="0,0.00":i="0,0"}const o=eX(i);return new Intl.NumberFormat(n,o).format(a)}const Qq=(e,t,r)=>{if(!e)return NaN;let n=e.replace(/\s/g,""),i=r;const a=(n.match(/\./g)||[]).length,o=(n.match(/,/g)||[]).length;if(a&&o)i=n.lastIndexOf(".")>n.lastIndexOf(",")?".":",";else if(!n.includes(r)){const l=n.includes(".")?".":",",u=l==="."?a:o;u>1||u===1&&l===t&&n.length-n.lastIndexOf(l)-1===3||(i=l)}const s=i==="."?",":".";return n=n.replace(new RegExp(`\\${s}`,"g"),""),i!=="."&&(n=n.replace(new RegExp(`\\${i}`,"g"),".")),parseFloat(n)};function tX(e,t,r,n,i){let a=e;if(typeof a!="number"){let s;t&&n===void 0?s=",":s=".";const l=s=="."?",":".";a=a.replace(FL(l,"g"),""),a=a.replace(FL(s,"g"),"."),a=Number(a)}const o=Number(a);return isNaN(o)?NaN:o}function eX(e){const t={};e.includes(",")?t.useGrouping=!0:t.useGrouping=!1;const r=e.indexOf(".");if(r>-1){const i=(e.substring(r+1).match(/0/g)||[]).length;t.minimumFractionDigits=i,t.maximumFractionDigits=i}else t.minimumFractionDigits=0,t.maximumFractionDigits=0;return t}cr.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(e,t,r,n)=>{const i=n?.type??"number";try{switch(i){case"date":{const a=e instanceof Date?e:new Date(e);return new Intl.DateTimeFormat(r,{dateStyle:t||"short"}).format(a)}default:case"number":{const a=n?.inputIsLocalized??!1;return Jq(e,t,a,r)}}}catch{return e}}},resources:{en:{translation:Yq},it:{translation:zq}}});const rX=(e,t,r,n)=>cr.format(e,t,r||cr.language,n),nX=(e,t)=>cr.t(e,t);function zi(){const e=j.useCallback((n,i,a,o)=>rX(n,i,a||void 0,o),[]),t=j.useCallback(()=>cr.languages[0],[]),r=j.useCallback((n,i)=>nX(n,i),[]);return{format:e,getCurrentLanguage:t,translate:r}}var pa=(e=>(e.CALENDAR_FOR="Date.CalendarFor",e.CLOSE="Generic.Close",e.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",e.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",e.CONFIRM_BUTTON="Generic.ConfirmButton",e.AUTOCOMPLETE_DEFAULT_PLACEHOLDER="Generic.AutocompleteDefaultPlaceholder",e.CHIPS_INPUT_DEFAULT_PLACEHOLDER="Generic.ChipsInputDefaultPlaceholder",e.NOTIFICATION_WIDGET_NO_MESSAGES="Generic.NotificationWidgetNoMessages",e.NOTIFICATION_WIDGET_DISMISS_ALL="Generic.NotificationWidgetDismissAll",e))(pa||{}),Tn=(e=>(e.ADD_SUB_GROUP="FilterBuilder.AddSubGroup",e.ADD_FILTER="FilterBuilder.AddFilter",e.STRING_STARTS="FilterBuilder.Operator.String.Starts",e.STRING_CONTAINS="FilterBuilder.Operator.String.Contains",e.STRING_EQUALS="FilterBuilder.Operator.String.Equals",e.NUMBER_EQUALS="FilterBuilder.Operator.Number.Equals",e.NUMBER_NOTEQUALS="FilterBuilder.Operator.Number.NotEquals",e.NUMBER_GREATER="FilterBuilder.Operator.Number.Greater",e.NUMBER_GREATER_OR_EQUAL="FilterBuilder.Operator.Number.GreaterOrEqual",e.NUMBER_LESS="FilterBuilder.Operator.Number.Less",e.NUMBER_LESS_OR_EQUAL="FilterBuilder.Operator.Number.LessOrEqual",e.DATE_BEFORE="FilterBuilder.Operator.Date.Before",e.DATE_AFTER="FilterBuilder.Operator.Date.After",e.DATE_ON="FilterBuilder.Operator.Date.On",e))(Tn||{}),nn=(e=>(e.MONDAY="Day.Monday",e.MONDAY_SHORT="Day.MondayShort",e.TUESDAY="Day.Tuesday",e.TUESDAY_SHORT="Day.TuesdayShort",e.WEDNESDAY="Day.Wednesday",e.WEDNESDAY_SHORT="Day.WednesdayShort",e.THURSDAY="Day.Thursday",e.THURSDAY_SHORT="Day.ThursdayShort",e.FRIDAY="Day.Friday",e.FRIDAY_SHORT="Day.FridayShort",e.SATURDAY="Day.Saturday",e.SATURDAY_SHORT="Day.SaturdayShort",e.SUNDAY="Day.Sunday",e.SUNDAY_SHORT="Day.SundayShort",e))(nn||{}),Bn=(e=>(e.JANUARY="Month.January",e.FEBRUARY="Month.February",e.MARCH="Month.March",e.APRIL="Month.April",e.MAY="Month.May",e.JUNE="Month.June",e.JULY="Month.July",e.AUGUST="Month.August",e.SEPTEMBER="Month.September",e.OCTOBER="Month.October",e.NOVEMBER="Month.November",e.DECEMBER="Month.December",e))(Bn||{}),OS=(e=>(e.PREVIOUS_DAY="Date.PreviousDay",e.PREVIOUS_WEEK="Date.PreviousWeek",e.PREVIOUS_MONTH="Date.PreviousMonth",e.PREVIOUS_YEAR="Date.PreviousYear",e.NEXT_DAY="Date.NextDay",e.NEXT_WEEK="Date.NextWeek",e.NEXT_MONTH="Date.NextMonth",e.NEXT_YEAR="Date.NextYear",e.YESTERDAY="Date.Yesterday",e.TODAY="Date.Today",e.TOMORROW="Date.Tomorrow",e))(OS||{}),xi=(e=>(e.SELECT_FILES="FileUpload.SelectFiles",e.DROP_AREA_LABEL="FileUpload.DropAreaLabel",e.UPLOAD="FileUpload.Upload",e.CANCEL="FileUpload.Cancel",e.RETRY="FileUpload.Retry",e.FILE_TOO_LARGE="FileUpload.FileTooLarge",e))(xi||{});class Ql{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){if(t)return new Ql(t,t.k==""?[]:t.k.split(";"));throw new Error("time creation from obj undefined not implemented yet")}static fromString(t){return new Ql({t:"",p:""},t.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const vl=(e,t)=>({...e,obj:{t:t.objClass?.t?t.objClass.t:e.obj?.t||"",p:t.objClass?.p?t.objClass.p:e.obj?.p||"",k:t.bindValue},decode:t.optionalDisplayValue??e.decode,fun:t.fun??e.fun}),$L=e=>{const t=Ql.fromDataObj(e.obj),r=e.decode?Ql.fromString(e.decode).getValue():[];return t.getValue().map((n,i)=>({bindValue:n,optionalDisplayValue:r.length>=i?r[i]:""}))},iX=(e,t)=>{const r=new Ql(e.obj,t.map(i=>i.bindValue)).getLegacyValue(),n=new Ql(e.obj,t.map(i=>i.optionalDisplayValue?i.optionalDisplayValue:"")).getLegacyValue();return vl(e,{bindValue:r,optionalDisplayValue:n})},_s=e=>({bindValue:e.obj?.k||"",objClass:{t:e.obj?.t||"",p:e.obj?.p||""},fun:e.fun,optionalDisplayValue:e.decode}),l2=({bindValue:e,optionalDisplayValue:t,options:r=[],listDisplayMode:n="Both",isClearable:i=!1,minimumChars:a=1,isEditable:o=!0,fun:s,_changeOnEnter:l=!1,onChange:u,onConfirmedChange:c,onOptionsRequest:h,onBlur:f,_multiActiveIndex:d,autoSelectOptionIndex:p,...v})=>{const g=j.useRef(null),[m,y]=j.useState(e),[_,x]=j.useState(t),{translate:b}=zi(),[S,w]=j.useState(!1),[C,k]=j.useState(r),[T,A]=j.useState(0),[L,D]=j.useState([e]),{anchorRef:E,targetRef:N,anchorWidth:P}=Ni({position:"bottom",open:S}),F=j.useCallback(()=>{w(!1),g?.current?.focus()},[]);Dh([N],S,()=>F());const O=g5(400);j.useEffect(()=>{p!=null&&(h?h(s,void 0).then(W=>{const J=bo(W)||[];k(J),p<J.length&&B(J[p])}):p<r.length&&B(r[p]))},[]),j.useEffect(()=>{l||y(e)},[e,l]);const $=W=>{W.length>=a?V(W):F(),y(W),x(""),l||u?.({bindValue:W,optionalDisplayValue:t})},V=W=>{O(async()=>{if(s&&h){const J=await h(s,W),Q=bo(J)||[];k(Q),A(Q.length>0?0:-1),w(!0)}else w(J=>!J)})},I=()=>{S||f?.()},B=W=>{l?(y(""),x("")):(y(W.obj?.k||""),x(W.decode)),u?.(_s(W)),c?.(_s(W));const J=C.findIndex(Q=>Q.obj?.k===W.obj?.k);A(J),D([W.obj?.k||""]),F()},G=W=>{W.key==="Escape"&&(F(),A(-1))},H=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),S)){const J=W.key==="ArrowDown"?(T+1)%C.length:(T-1+C.length)%C.length;A(J)}switch(W.key){case"Enter":T>=0&&T<C.length?B(C[T]):l&&(u?.({bindValue:m,optionalDisplayValue:""}),c?.({bindValue:m,optionalDisplayValue:""}),F(),y(""),x(""));break;case"Escape":F(),A(-1);break}};return z.jsxs("div",{"data-component":"autocomplete",children:[z.jsx(mi,{...v,bindValue:m,optionalDisplayValue:_,isEditable:o,shapeIcon:"magnify",placeholder:b(pa.AUTOCOMPLETE_DEFAULT_PLACEHOLDER),ref:E,isClearable:i,inputRef:g,onChange:W=>$(W.bindValue),onConfirmedChange:c,onKeyDown:H,onBlur:I,onShapeIconClick:()=>V(m),"aria-autocomplete":"list",maxLength:-1}),S&&z.jsx(Ri,{children:z.jsx(B0,{options:C,displayMode:n,onClick:B,ref:N,selectedIndex:T,activeIndex:d||L,width:P,showFilter:!1,onKeyDown:G,isOpen:S,floating:!0})})]})},ze=e=>e==null?!1:typeof e=="string"?e.toLocaleLowerCase()=="yes"||e.toLocaleLowerCase()=="true":e,bv={"smp-button-group-container":"_smp-button-group-container_kn9qg_1","smp-button-group-options-container":"_smp-button-group-options-container_kn9qg_7","smp-button-group-vertical":"_smp-button-group-vertical_kn9qg_12"},D5=({bindValue:e,disabled:t=!1,label:r,displayMode:n="DescOnly",BtoVer:i="false",options:a,onOptionsRequest:o,fun:s,helper:l,...u})=>{const[c,h]=j.useState(a),f=j.useId(),d=v=>{t||(u.onChange?.(_s(v)),u.onConfirmedChange?.(_s(v)))};j.useEffect(()=>{!c&&o&&s&&o(s,void 0).then(v=>h(bo(v))).catch(v=>{console.error("Error during loading options (button group)",v)})},[c,o,s]);const p={container:`${bv["smp-button-group-container"]} ${ze(i)?bv["smp-button-group-vertical"]:""}`,optionsContainer:`${bv["smp-button-group-options-container"]} ${ze(i)?bv["smp-button-group-vertical"]:""}`};return z.jsxs("div",{"data-component":"button-group","smp-id":"buttonGroup-container",className:p.container,id:f,children:[r&&z.jsx(Io,{label:r,disabled:t,htmlFor:f,helper:l}),z.jsx("div",{className:p.optionsContainer,children:c?.map(v=>z.jsx(Be,{appearance:"raised",variant:"base",active:e===v.obj?.k,onClick:()=>d(v),bindValue:v.obj?.k||"",optionalDisplayValue:Pp(v.obj?.k,v.decode,n),disabled:t,justify:ze(i)?"start":"center",icon:v.icon,buttonExt:`oneButton-${ze(i)?"vertical":"horizontal"}`},v.obj?.k))})]})},VL={"smp-button-list":"_smp-button-list_1ql17_1","smp-button-list-row":"_smp-button-list-row_1ql17_7","smp-button-list-column":"_smp-button-list-column_1ql17_11"},L5=({data:e,options:t,fun:r,direction:n="row",disposition:i="start",sizing:a,variant:o,appearance:s,showText:l,showIcon:u,fullWidth:c,disabled:h,justify:f,squared:d,onClick:p,onOptionsRequest:v})=>{const g=e?.children||t,[m,y]=j.useState(g);j.useEffect(()=>{y(g)},[g]),j.useEffect(()=>{!m&&v&&r&&v(r,void 0).then(b=>y(bo(b)||[])).catch(b=>{console.error("Errore nel caricamento delle opzioni per ButtonList",b)})},[m,r,v]);const _={container:`${VL["smp-button-list"]} ${VL[`smp-button-list-${n}`]} ${Jo[`smp-justifyContent-${i}`]}`},x=m?.map((b,S)=>{const w={bindValue:b.obj?.k||"",optionalDisplayValue:b.decode??b.value??b.obj?.k??"",fun:b.fun,icon:b.icon,variant:o,appearance:s,showText:l,showIcon:u,fullWidth:c,disabled:h,sizing:a,justify:f,squared:d,onClick:()=>{p?.(b)}};return z.jsx(Be,{...w},`button-${S}`)});return z.jsx("div",{role:"list","data-component":"button-list",className:_.container,children:x})},Ax={"smp-checkbox-container":"_smp-checkbox-container_1gt40_6","smp-checkbox-wrapper":"_smp-checkbox-wrapper_1gt40_14","smp-checkbox-danger":"_smp-checkbox-danger_1gt40_61"},$0=({bindValue:e,_dataComponent:t="checkbox",disabled:r,label:n,isEditable:i=!0,helper:a,error:o,state:s="base",onChange:l,onBlur:u,onConfirmedChange:c,variant:h="checkbox"})=>{const f=j.useId(),d=m=>{i&&(l?.(m.target.checked),c?.(m.target.checked))},p=!!o,v=p?"danger":s,g={container:`${Ax["smp-checkbox-container"]}`,labelAndInputWrapper:`${Ax["smp-checkbox-wrapper"]}`,inputState:`${Ax[`smp-checkbox-${v}`]}`};return z.jsxs("div",{className:g.container,children:[z.jsxs("div",{className:g.labelAndInputWrapper,"data-component":t,children:[z.jsx("input",{className:g.inputState,"data-component":"checkbox","data-state":v,type:"checkbox",checked:e,onChange:d,onBlur:u,role:h==="switch"?"switch":"checkbox",id:f}),n&&z.jsx(Io,{label:n,disabled:r,htmlFor:f,helper:a})]}),p&&z.jsx(O0,{helperText:o,disabled:r,state:v,id:`${f}-helper`})]})};function u2(e,t){const r=j.useRef(null);j.useEffect(()=>{if(!e)return;const n=typeof t=="object"&&t!==null&&"current"in t?t.current:null;if(!n)return;r.current=document.activeElement;const i=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null):[];(()=>{const u=i();u.length>0&&requestAnimationFrame(()=>u[0].focus())})();const o=u=>{if(u.key==="Escape"||u.key!=="Tab")return;const c=i();if(c.length===0)return;const h=c[0],f=c[c.length-1];u.shiftKey&&document.activeElement===h?(u.preventDefault(),f.focus()):!u.shiftKey&&document.activeElement===f&&(u.preventDefault(),h.focus())},s=u=>{if(n&&!n.contains(u.target)){u.preventDefault();const c=i();c.length>0&&c[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",s);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",s),document.body.style.overflow=l,r.current&&requestAnimationFrame(()=>{r.current?.focus()})}},[e,t])}const Gm=({bindValue:e,onChange:t,options:r=[],optionalDisplayValue:n,isEditable:i,listDisplayMode:a="Both",autoSelectOptionIndex:o,fun:s,onOptionsRequest:l,onConfirmedChange:u,multiActiveIndex:c,...h})=>{const f=j.useRef(null),[d,p]=j.useState(!1),[v,g]=j.useState(r),[m,y]=j.useState(-1),[_,x]=j.useState([e]),b=j.useId(),{anchorRef:S,targetRef:w,anchorWidth:C}=Ni({position:"bottom",open:d}),k=j.useCallback(()=>{p(!1),f?.current?.focus()},[]);Dh([w,S],d,()=>k()),u2(d,w),j.useEffect(()=>{o!=null&&(l&&(!v||v.length==0)?l(s,void 0).then(E=>{const N=bo(E)||[];g(N),o<N.length&&T(N[o])}):o<v.length&&T(r[o]))},[]);const T=E=>{t?.(_s(E)),u?.(_s(E));const N=v.findIndex(P=>P.obj?.k===E.obj?.k);y(N),x([E.obj?.k||""]),k()},A=E=>{E.key==="Escape"&&(k(),y(-1))},L=E=>{(E.key==="ArrowDown"||E.key==="ArrowUp")&&(E.preventDefault(),D())},D=()=>{i&&(s&&l?d?p(!1):l(s,void 0).then(E=>{const N=bo(E)||[];g(N),y(N.length>0?0:-1),p(!0)}):p(E=>!E))};return z.jsxs("div",{role:"combobox","aria-expanded":d,"aria-controls":b,"aria-owns":b,"data-component":"combobox",children:[z.jsx(mi,{...h,bindValue:e,optionalDisplayValue:n,onShapeIconClick:D,onKeyDown:L,onClick:D,shapeIcon:"arrow_drop_down",rotatedShapeIcon:d,isEditable:i,ref:S,inputRef:f,autocomplete:"off","aria-autocomplete":"list",variant:"notSelectable"}),d&&z.jsx(Ri,{children:z.jsx(B0,{id:b,options:v,displayMode:a,ref:w,isOpen:d,selectedIndex:m,activeIndex:c||_,width:C,onClick:T,onKeyDown:A,floating:!0})})]})},_i={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1eguc_1","smp-datepickercalendar":"_smp-datepickercalendar_1eguc_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_1eguc_15","smp-datepickercalendar-th":"_smp-datepickercalendar-th_1eguc_27","smp-datepickercalendar-td":"_smp-datepickercalendar-td_1eguc_38","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_1eguc_57","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_1eguc_63","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_1eguc_68","smp-datepickercalendar-label":"_smp-datepickercalendar-label_1eguc_78"};function aX({selectedDate:e,onDateChange:t,disabledDateRanges:r=[],initialValue:n,targetRef:i}){const{translate:a}=zi(),o=()=>{if(!n)return;const $=new Date(n);return isNaN($.getTime())?void 0:$},[s]=j.useState(new Date),[l,u]=j.useState(e||o()||new Date),[c,h]=j.useState(l?l.getMonth():new Date().getMonth()),[f,d]=j.useState(l?l.getFullYear():new Date().getFullYear()),[p,v]=j.useState(l?l.getDate():null),g=j.useRef(null),m=j.useRef([]),y=[a(Bn.JANUARY),a(Bn.FEBRUARY),a(Bn.MARCH),a(Bn.APRIL),a(Bn.MAY),a(Bn.JUNE),a(Bn.JULY),a(Bn.AUGUST),a(Bn.SEPTEMBER),a(Bn.OCTOBER),a(Bn.NOVEMBER),a(Bn.DECEMBER)],_=[{value:a(nn.SUNDAY_SHORT),full:a(nn.SUNDAY)},{value:a(nn.MONDAY_SHORT),full:a(nn.MONDAY)},{value:a(nn.TUESDAY_SHORT),full:a(nn.TUESDAY)},{value:a(nn.WEDNESDAY_SHORT),full:a(nn.WEDNESDAY)},{value:a(nn.THURSDAY_SHORT),full:a(nn.THURSDAY)},{value:a(nn.FRIDAY_SHORT),full:a(nn.FRIDAY)},{value:a(nn.SATURDAY_SHORT),full:a(nn.SATURDAY)}],x=$=>r.some(V=>{const I=V.start.getTime(),B=V.end.getTime(),G=$.getTime();return G>=I&&G<=B}),b=$=>{x($)||(u($),v($.getDate()),t&&t(pq($)))},S=()=>{c===0?(h(11),d(f-1)):h(c-1),v(1)},w=()=>{c===11?(h(0),d(f+1)):h(c+1),v(1)},C=($,V)=>new Date($,V+1,0).getDate(),k=($,V)=>new Date($,V,1).getDay(),T=$=>{const V=E.findIndex(I=>I!==null&&I.getDate()===$);V!==-1&&m.current[V]&&(m.current[V]?.focus(),v($))},A=($,V)=>{const I=E[V];if(!I)return;const B=C(f,c),G=I.getDate();switch($.key){case"ArrowRight":$.preventDefault();{let H=G+1,W=new Date(f,c,H);if(H>B){const J=c===11?f+1:f,Q=c===11?0:c+1;H=1,W=new Date(J,Q,H),w(),setTimeout(()=>{L(1,"forward")},0);return}x(W)?L(H,"forward"):T(H)}break;case"Tab":break;case"ArrowLeft":$.preventDefault();{let H=G-1,W=new Date(f,c,H);if(H<1){const J=c===0?f-1:f,Q=c===0?11:c-1,tt=C(J,Q);H=tt,W=new Date(J,Q,H),S(),setTimeout(()=>{L(tt,"backward")},0);return}x(W)?L(H,"backward"):T(H)}break;case"ArrowUp":$.preventDefault();{let H=G-7,W=new Date(f,c,H);if(H<1){const J=c===0?f-1:f,Q=c===0?11:c-1;H=C(J,Q)+H,W=new Date(J,Q,H),S(),setTimeout(()=>{L(H,"backward")},0);return}x(W)?L(H,"backward"):T(H)}break;case"ArrowDown":$.preventDefault();{let H=G+7,W=new Date(f,c,H);if(H>B){const J=c===11?f+1:f,Q=c===11?0:c+1;H=H-B,W=new Date(J,Q,H),w(),setTimeout(()=>{L(H,"forward")},0);return}x(W)?L(H,"forward"):T(H)}break;case"Home":$.preventDefault(),L(1,"forward");break;case"End":$.preventDefault(),L(B,"backward");break;case"PageUp":$.preventDefault(),S(),setTimeout(()=>{const H=C(c===0?f-1:f,c===0?11:c-1),W=Math.min(G,H);L(W,"forward")},0);break;case"PageDown":$.preventDefault(),w(),setTimeout(()=>{const H=C(c===11?f+1:f,c===11?0:c+1),W=Math.min(G,H);L(W,"forward")},0);break;case" ":case"Space":if(x(I))return;v(I.getDate()),u(I);break;case"Enter":$.preventDefault(),b(I);break}},L=($,V)=>{const I=C(f,c);if(V==="forward"){for(let B=$;B<=I;B++){const G=new Date(f,c,B);if(!x(G)){T(B);return}}w(),setTimeout(()=>{L(1,"forward")},0)}else{for(let W=$;W>=1;W--){const J=new Date(f,c,W);if(!x(J)){T(W);return}}const B=c===0?f-1:f,G=c===0?11:c-1,H=C(B,G);S(),setTimeout(()=>{L(H,"backward")},0)}},E=(()=>{const $=C(f,c),V=k(f,c),I=[];for(let B=0;B<V;B++)I.push(null);for(let B=1;B<=$;B++){const G=new Date(f,c,B);I.push(G)}return I})(),N=[];let P=[];E.forEach(($,V)=>{if(P.push($),P.length===7||V===E.length-1){for(;P.length<7;)P.push(null);N.push(P),P=[]}}),j.useEffect(()=>{if(p!==null){const $=E.findIndex(V=>V!==null&&V.getDate()===p);$!==-1&&m.current[$]&&m.current[$]?.focus()}},[c,f,p,E]);const F={label:`${_i["smp-datepickercalendar-label"]}`,wrapper:`${_i["smp-datepickercalendar"]} ${_i["smp-datepickercalendar-position"]}`,calendar:`${_i["smp-datepickercalendar"]}`,table:`${_i["smp-datepickercalendar-table"]}`,th:`${_i["smp-datepickercalendar-th"]}`,td:($,V,I,B)=>`${_i["smp-datepickercalendar-td"]}
46
46
  ${$?_i["smp-datepickercalendar-td-today"]:""}
47
47
  ${V?_i["smp-datepickercalendar-td-selected"]:""}
48
48
  ${I?_i["smp-datepickercalendar-td-focused"]:""}
@@ -289,8 +289,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error
289
289
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const l=e.height/2,u=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*o>Math.abs(n-t.x)*l){let h=r.y<t.y?t.y-l-i:i-l-t.y;s=c*h/u;const f={x:r.x<t.x?r.x+s:r.x-c+s,y:r.y<t.y?r.y+u-h:r.y-u+h};return s===0&&(f.x=t.x,f.y=t.y),c===0&&(f.x=t.x),u===0&&(f.y=t.y),ot.debug(`abc89 top/bottom calc, Q ${u}, q ${h}, R ${c}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-n:s=n-o-t.x;let h=u*s/c,f=r.x<t.x?r.x+c-s:r.x-c+s,d=r.y<t.y?r.y+h:r.y-h;return ot.debug(`sides calc abc89, Q ${u}, q ${h}, R ${c}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),c===0&&(f=t.x),u===0&&(d=t.y),{x:f,y:d}}},"intersection"),uE=M((e,t)=>{ot.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(ot.info("abc88 checking point",a,t),!Bot(t,a)&&!i){const o=Fot(t,n,a);ot.debug("abc88 inside",a,n,o),ot.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?ot.warn("abc88 no intersect",o,r):r.push(o),i=!0}else ot.warn("abc88 outside",a,n),n=a,i||r.push(a)}),ot.debug("returning points",r),r},"cutPathAtIntersect");function WG(e){const t=[],r=[];for(let n=1;n<e.length-1;n++){const i=e[n-1],a=e[n],o=e[n+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}M(WG,"extractCornerPoints");var cE=M(function(e,t,r){const n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),$ot=M(function(e){const{cornerPointPositions:t}=WG(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){const i=e[n-1],a=e[n+1],o=e[n],s=cE(i,o,5),l=cE(a,o,5),u=l.x-s.x,c=l.y-s.y;r.push(s);const h=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){ot.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));const d=5;o.x===s.x?f={x:u<0?s.x-d+h:s.x+d-h,y:c<0?s.y-h:s.y+h}:f={x:u<0?s.x-h:s.x+h,y:c<0?s.y-d+h:s.y+d-h}}else ot.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(f,l)}else r.push(e[n]);return r},"fixCorners"),Vot=M((e,t,r)=>{const n=e-t-r,i=2,a=2,o=i+a,s=Math.floor(n/o),l=Array(s).fill(`${i} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),HG=M(function(e,t,r,n,i,a,o,s=!1){const{handDrawnSeed:l}=_e();let u=t.points,c=!1;const h=i;var f=a;const d=[];for(const E in t.cssCompiledStyles)z2(E)||d.push(t.cssCompiledStyles[E]);ot.debug("UIO intersect check",t.points,f.x,h.x),f.intersect&&h.intersect&&!s&&(u=u.slice(1,t.points.length-1),u.unshift(h.intersect(u[0])),ot.debug("Last point UIO",t.start,"-->",t.end,u[u.length-1],f,f.intersect(u[u.length-1])),u.push(f.intersect(u[u.length-1])));const p=btoa(JSON.stringify(u));t.toCluster&&(ot.info("to cluster abc88",r.get(t.toCluster)),u=uE(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(ot.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=uE(u.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let v=u.filter(E=>!Number.isNaN(E.y));v=$ot(v);let g=kd;switch(g=ty,t.curve){case"linear":g=ty;break;case"basis":g=kd;break;case"cardinal":g=t3;break;case"bumpX":g=X$;break;case"bumpY":g=Z$;break;case"catmullRom":g=r3;break;case"monotoneX":g=l3;break;case"monotoneY":g=u3;break;case"natural":g=h3;break;case"step":g=f3;break;case"stepAfter":g=p3;break;case"stepBefore":g=d3;break;default:g=kd}const{x:m,y}=QV(t),_=Y$().x(m).y(y).curve(g);let x;switch(t.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(t.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let b,S=t.curve==="rounded"?jG(UG(v,t),5):_(v);const w=Array.isArray(t.style)?t.style:[t.style];let C=w.find(E=>E?.startsWith("stroke:")),k=!1;if(t.look==="handDrawn"){const E=Mt.svg(e);Object.assign([],v);const N=E.path(S,{roughness:.3,seed:l});x+=" transition",b=ge(N).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",w?w.reduce((F,O)=>F+";"+O,""):"");let P=b.attr("d");b.attr("d",P),e.node().appendChild(b.node())}else{const E=d.join(";"),N=w?w.reduce((B,G)=>B+G+";",""):"";let P="";t.animate&&(P=" edge-animation-fast"),t.animation&&(P=" edge-animation-"+t.animation);const F=(E?E+";"+N+";":N)+";"+(w?w.reduce((B,G)=>B+";"+G,""):"");b=e.append("path").attr("d",S).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")+(P??"")).attr("style",F),C=F.match(/stroke:([^;]+)/)?.[1],k=t.animate===!0||!!t.animation||E.includes("animation");const O=b.node(),$=typeof O.getTotalLength=="function"?O.getTotalLength():0,V=MM[t.arrowTypeStart]||0,I=MM[t.arrowTypeEnd]||0;if(t.look==="neo"&&!k){const G=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Vot($,V,I):`0 ${V} ${$-V-I} ${I}`}; stroke-dashoffset: 0;`;b.attr("style",G+b.attr("style"))}}b.attr("data-edge",!0),b.attr("data-et","edge"),b.attr("data-id",t.id),b.attr("data-points",p),t.showPoints&&v.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let T="";(_e().flowchart.arrowMarkerAbsolute||_e().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ot.info("arrowTypeStart",t.arrowTypeStart),ot.info("arrowTypeEnd",t.arrowTypeEnd),Rot(b,t,T,o,n,C);const A=Math.floor(u.length/2),L=u[A];si.isLabelCoordinateInPath(L,b.attr("d"))||(c=!0);let D={};return c&&(D.updatedPath=u),D.originalPath=t.points,D},"insertEdge");function jG(e,t){if(e.length<2)return"";let r="";const n=e.length,i=1e-5;for(let a=0;a<n;a++){const o=e[a],s=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===n-1)r+=`L${o.x},${o.y}`;else{const u=o.x-s.x,c=o.y-s.y,h=l.x-o.x,f=l.y-o.y,d=Math.hypot(u,c),p=Math.hypot(h,f);if(d<i||p<i){r+=`L${o.x},${o.y}`;continue}const v=u/d,g=c/d,m=h/p,y=f/p,_=v*m+g*y,x=Math.max(-1,Math.min(1,_)),b=Math.acos(x);if(b<i||Math.abs(Math.PI-b)<i){r+=`L${o.x},${o.y}`;continue}const S=Math.min(t/Math.sin(b/2),d/2,p/2),w=o.x-v*S,C=o.y-g*S,k=o.x+m*S,T=o.y+y*S;r+=`L${w},${C}`,r+=`Q${o.x},${o.y} ${k},${T}`}}return r}M(jG,"generateRoundedPath");function Nw(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,n=t.y-e.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}M(Nw,"calculateDeltaAndAngle");function UG(e,t){const r=e.map(i=>({...i}));if(e.length>=2&&Yr[t.arrowTypeStart]){const i=Yr[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=Nw(a,o),l=i*Math.cos(s),u=i*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+u}const n=e.length;if(n>=2&&Yr[t.arrowTypeEnd]){const i=Yr[t.arrowTypeEnd],a=e[n-1],o=e[n-2],{angle:s}=Nw(o,a),l=i*Math.cos(s),u=i*Math.sin(s);r[n-1].x=a.x-l,r[n-1].y=a.y-u}return r}M(UG,"applyMarkerOffsetsToPoints");var zot=M((e,t,r,n)=>{t.forEach(i=>{nst[i](e,r,n)})},"insertMarkers"),Got=M((e,t,r)=>{ot.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Wot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Hot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),jot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Uot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Yot=M((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),qot=M((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Xot=M((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Zot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Kot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Jot=M((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Qot=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),tst=M((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),est=M((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
290
290
  L20,10
291
291
  M20,10
292
- L0,20`)},"requirement_arrow"),rst=M((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),nst={extension:Got,composition:Wot,aggregation:Hot,dependency:jot,lollipop:Uot,point:Yot,circle:qot,cross:Xot,barb:Zot,only_one:Kot,zero_or_one:Jot,one_or_more:Qot,zero_or_more:tst,requirement_arrow:est,requirement_contains:rst},YG=zot,ist={common:yu,getConfig:zr,insertCluster:S4,insertEdge:HG,insertEdgeLabel:zG,insertMarkers:YG,insertNode:vk,interpolateToCurve:Y2,labelHelper:Yt,log:ot,positionEdgeLabel:GG},np={},qG=M(e=>{for(const t of e)np[t.name]=t},"registerLayoutLoaders"),ast=M(()=>{qG([{name:"dagre",loader:M(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-DBECV6XE.cjs")),"loader")},{name:"cose-bilkent",loader:M(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-_37OJKjd.cjs")),"loader")}])},"registerDefaultLayoutLoaders");ast();var ost=M(async(e,t)=>{if(!(e.layoutAlgorithm in np))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=np[e.layoutAlgorithm];return(await r.loader()).render(e,t,ist,{algorithm:r.algorithm})},"render"),sst=M((e="",{fallback:t="dagre"}={})=>{if(e in np)return e;if(t in np)return ot.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),XG="comm",ZG="rule",KG="decl",lst="@import",ust="@namespace",cst="@keyframes",hst="@layer",JG=Math.abs,gk=String.fromCharCode;function QG(e){return e.trim()}function um(e,t,r){return e.replace(t,r)}function fst(e,t,r){return e.indexOf(t,r)}function zc(e,t){return e.charCodeAt(t)|0}function ch(e,t,r){return e.slice(t,r)}function la(e){return e.length}function dst(e){return e.length}function Rv(e,t){return t.push(e),e}var g_=1,hh=1,tW=0,pi=0,or=0,Bh="";function mk(e,t,r,n,i,a,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:g_,column:hh,length:o,return:"",siblings:s}}function pst(){return or}function vst(){return or=pi>0?zc(Bh,--pi):0,hh--,or===10&&(hh=1,g_--),or}function Li(){return or=pi<tW?zc(Bh,pi++):0,hh++,or===10&&(hh=1,g_++),or}function rs(){return zc(Bh,pi)}function cm(){return pi}function m_(e,t){return ch(Bh,e,t)}function ip(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gst(e){return g_=hh=1,tW=la(Bh=e),pi=0,[]}function mst(e){return Bh="",e}function Xx(e){return QG(m_(pi-1,Ow(e===91?e+2:e===40?e+1:e)))}function yst(e){for(;(or=rs())&&or<33;)Li();return ip(e)>2||ip(or)>3?"":" "}function _st(e,t){for(;--t&&Li()&&!(or<48||or>102||or>57&&or<65||or>70&&or<97););return m_(e,cm()+(t<6&&rs()==32&&Li()==32))}function Ow(e){for(;Li();)switch(or){case e:return pi;case 34:case 39:e!==34&&e!==39&&Ow(or);break;case 40:e===41&&Ow(e);break;case 92:Li();break}return pi}function xst(e,t){for(;Li()&&e+or!==57;)if(e+or===84&&rs()===47)break;return"/*"+m_(t,pi-1)+"*"+gk(e===47?e:Li())}function bst(e){for(;!ip(rs());)Li();return m_(e,pi)}function Sst(e){return mst(hm("",null,null,null,[""],e=gst(e),0,[0],e))}function hm(e,t,r,n,i,a,o,s,l){for(var u=0,c=0,h=o,f=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Li()){case 40:if(p!=108&&zc(w,h-1)==58){fst(w+=um(Xx(y),"&","&\f"),"&\f",JG(u?s[u-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:w+=Xx(y);break;case 9:case 10:case 13:case 32:w+=yst(p);break;case 92:w+=_st(cm()-1,7);continue;case 47:switch(rs()){case 42:case 47:Rv(wst(xst(Li(),cm()),t,r,l),l),(ip(p||1)==5||ip(rs()||1)==5)&&la(w)&&ch(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*v:s[u++]=la(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=um(w,/\f/g,"")),d>0&&(la(w)-h||v===0&&p===47)&&Rv(d>32?fE(w+";",n,r,h-1,l):fE(um(w," ","")+";",n,r,h-2,l),l);break;case 59:w+=";";default:if(Rv(S=hE(w,t,r,u,c,i,s,_,x=[],b=[],h,a),a),y===123)if(c===0)hm(w,t,S,S,x,a,h,s,b);else{switch(f){case 99:if(zc(w,3)===110)break;case 108:if(zc(w,2)===97)break;default:c=0;case 100:case 109:case 115:}c?hm(e,S,S,n&&Rv(hE(e,S,S,0,0,i,s,_,i,x=[],h,b),b),i,b,h,s,n?x:b):hm(w,S,S,S,[""],b,0,s,b)}}u=c=d=0,v=m=1,_=w="",h=o;break;case 58:h=1+la(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&vst()==125)continue}switch(w+=gk(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[u++]=(la(w)-1)*m,m=1;break;case 64:rs()===45&&(w+=Xx(Li())),f=rs(),c=h=la(_=w+=bst(cm())),y++;break;case 45:p===45&&la(w)==2&&(v=0)}}return a}function hE(e,t,r,n,i,a,o,s,l,u,c,h){for(var f=i-1,d=i===0?a:[""],p=dst(d),v=0,g=0,m=0;v<n;++v)for(var y=0,_=ch(e,f+1,f=JG(g=o[v])),x=e;y<p;++y)(x=QG(g>0?d[y]+" "+_:um(_,/&\f/g,d[y])))&&(l[m++]=x);return mk(e,t,r,i===0?ZG:s,l,u,c,h)}function wst(e,t,r,n){return mk(e,t,r,XG,gk(pst()),ch(e,2,-2),0,n)}function fE(e,t,r,n,i){return mk(e,t,r,KG,ch(e,0,n),ch(e,n+1,-1),n,i)}function Bw(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Cst(e,t,r,n){switch(e.type){case hst:if(e.children.length)break;case lst:case ust:case KG:return e.return=e.return||e.value;case XG:return"";case cst:return e.return=e.value+"{"+Bw(e.children,n)+"}";case ZG:if(!la(e.value=e.props.join(",")))return""}return la(r=Bw(e.children,n))?e.return=e.value+"{"+r+"}":""}var Tst=uz(Object.keys,Object),kst=Object.prototype,Ast=kst.hasOwnProperty;function eW(e){if(!Fp(e))return Tst(e);var t=[];for(var r in Object(e))Ast.call(e,r)&&r!="constructor"&&t.push(r);return t}var Fw=bu(Ba,"DataView"),$w=bu(Ba,"Promise"),by=bu(Ba,"Set"),Vw=bu(Ba,"WeakMap"),dE="[object Map]",Dst="[object Object]",pE="[object Promise]",vE="[object Set]",gE="[object WeakMap]",mE="[object DataView]",Lst=xu(Fw),Mst=xu(Qd),Est=xu($w),Ist=xu(by),Pst=xu(Vw);exports.getTag=_u;(Fw&&exports.getTag(new Fw(new ArrayBuffer(1)))!=mE||Qd&&exports.getTag(new Qd)!=dE||$w&&exports.getTag($w.resolve())!=pE||by&&exports.getTag(new by)!=vE||Vw&&exports.getTag(new Vw)!=gE)&&(exports.getTag=function(e){var t=_u(e),r=t==Dst?e.constructor:void 0,n=r?xu(r):"";if(n)switch(n){case Lst:return mE;case Mst:return dE;case Est:return pE;case Ist:return vE;case Pst:return gE}return t});var Rst="[object Map]",Nst="[object Set]",Ost=Object.prototype,Bst=Ost.hasOwnProperty;function zw(e){if(e==null)return!0;if($p(e)&&(ep(e)||typeof e=="string"||typeof e.splice=="function"||o_(e)||s_(e)||tp(e)))return!e.length;var t=exports.getTag(e);if(t==Rst||t==Nst)return!e.size;if(Fp(e))return!eW(e).length;for(var r in e)if(Bst.call(e,r))return!1;return!0}var rW="c4",Fst=M(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),$st=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-B3Jeo15d.cjs"));return{id:rW,diagram:e}},"loader"),Vst={id:rW,detector:Fst,loader:$st},zst=Vst,nW="flowchart",Gst=M((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Wst=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-CR5WUf-l.cjs"));return{id:nW,diagram:e}},"loader"),Hst={id:nW,detector:Gst,loader:Wst},jst=Hst,iW="flowchart-v2",Ust=M((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),Yst=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-CR5WUf-l.cjs"));return{id:iW,diagram:e}},"loader"),qst={id:iW,detector:Ust,loader:Yst},Xst=qst,aW="er",Zst=M(e=>/^\s*erDiagram/.test(e),"detector"),Kst=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-C-JGaGrK.cjs"));return{id:aW,diagram:e}},"loader"),Jst={id:aW,detector:Zst,loader:Kst},Qst=Jst,oW="gitGraph",tlt=M(e=>/^\s*gitGraph/.test(e),"detector"),elt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-CQGXDV_P.cjs"));return{id:oW,diagram:e}},"loader"),rlt={id:oW,detector:tlt,loader:elt},nlt=rlt,sW="gantt",ilt=M(e=>/^\s*gantt/.test(e),"detector"),alt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-BIXnxZob.cjs"));return{id:sW,diagram:e}},"loader"),olt={id:sW,detector:ilt,loader:alt},slt=olt,lW="info",llt=M(e=>/^\s*info/.test(e),"detector"),ult=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-LFoITbm1.cjs"));return{id:lW,diagram:e}},"loader"),clt={id:lW,detector:llt,loader:ult},uW="pie",hlt=M(e=>/^\s*pie/.test(e),"detector"),flt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-DqAfHtK0.cjs"));return{id:uW,diagram:e}},"loader"),dlt={id:uW,detector:hlt,loader:flt},cW="quadrantChart",plt=M(e=>/^\s*quadrantChart/.test(e),"detector"),vlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-DTf5lgAY.cjs"));return{id:cW,diagram:e}},"loader"),glt={id:cW,detector:plt,loader:vlt},mlt=glt,hW="xychart",ylt=M(e=>/^\s*xychart(-beta)?/.test(e),"detector"),_lt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-B2X5wgYU.cjs"));return{id:hW,diagram:e}},"loader"),xlt={id:hW,detector:ylt,loader:_lt},blt=xlt,fW="requirement",Slt=M(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),wlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-BjnnfTMn.cjs"));return{id:fW,diagram:e}},"loader"),Clt={id:fW,detector:Slt,loader:wlt},Tlt=Clt,dW="sequence",klt=M(e=>/^\s*sequenceDiagram/.test(e),"detector"),Alt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-eqA8jOPu.cjs"));return{id:dW,diagram:e}},"loader"),Dlt={id:dW,detector:klt,loader:Alt},Llt=Dlt,pW="class",Mlt=M((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Elt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-C8TmrEiw.cjs"));return{id:pW,diagram:e}},"loader"),Ilt={id:pW,detector:Mlt,loader:Elt},Plt=Ilt,vW="classDiagram",Rlt=M((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Nlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-C8TmrEiw.cjs"));return{id:vW,diagram:e}},"loader"),Olt={id:vW,detector:Rlt,loader:Nlt},Blt=Olt,gW="state",Flt=M((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),$lt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-DYHMI_zf.cjs"));return{id:gW,diagram:e}},"loader"),Vlt={id:gW,detector:Flt,loader:$lt},zlt=Vlt,mW="stateDiagram",Glt=M((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Wlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-Dr43yAwI.cjs"));return{id:mW,diagram:e}},"loader"),Hlt={id:mW,detector:Glt,loader:Wlt},jlt=Hlt,yW="journey",Ult=M(e=>/^\s*journey/.test(e),"detector"),Ylt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-DNOG8-ZS.cjs"));return{id:yW,diagram:e}},"loader"),qlt={id:yW,detector:Ult,loader:Ylt},Xlt=qlt,Zlt=M((e,t,r)=>{ot.debug(`rendering svg for syntax error
293
- `);const n=v3(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),g2(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),_W={draw:Zlt},Klt=_W,Jlt={db:{},renderer:_W,parser:{parse:M(()=>{},"parse")}},Qlt=Jlt,xW="flowchart-elk",tut=M((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),eut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-CR5WUf-l.cjs"));return{id:xW,diagram:e}},"loader"),rut={id:xW,detector:tut,loader:eut},nut=rut,bW="timeline",iut=M(e=>/^\s*timeline/.test(e),"detector"),aut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-2Xo8kDck.cjs"));return{id:bW,diagram:e}},"loader"),out={id:bW,detector:iut,loader:aut},sut=out,SW="mindmap",lut=M(e=>/^\s*mindmap/.test(e),"detector"),uut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-C1NARCjn.cjs"));return{id:SW,diagram:e}},"loader"),cut={id:SW,detector:lut,loader:uut},hut=cut,wW="kanban",fut=M(e=>/^\s*kanban/.test(e),"detector"),dut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-DOahyFi4.cjs"));return{id:wW,diagram:e}},"loader"),put={id:wW,detector:fut,loader:dut},vut=put,CW="sankey",gut=M(e=>/^\s*sankey(-beta)?/.test(e),"detector"),mut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-Dy1v62Bk.cjs"));return{id:CW,diagram:e}},"loader"),yut={id:CW,detector:gut,loader:mut},_ut=yut,TW="packet",xut=M(e=>/^\s*packet(-beta)?/.test(e),"detector"),but=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-CIv3S0ya.cjs"));return{id:TW,diagram:e}},"loader"),Sut={id:TW,detector:xut,loader:but},kW="radar",wut=M(e=>/^\s*radar-beta/.test(e),"detector"),Cut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-CBKRaHIY.cjs"));return{id:kW,diagram:e}},"loader"),Tut={id:kW,detector:wut,loader:Cut},AW="block",kut=M(e=>/^\s*block(-beta)?/.test(e),"detector"),Aut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-DNdx2TRR.cjs"));return{id:AW,diagram:e}},"loader"),Dut={id:AW,detector:kut,loader:Aut},Lut=Dut,DW="architecture",Mut=M(e=>/^\s*architecture/.test(e),"detector"),Eut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-BcEn_UbL.cjs"));return{id:DW,diagram:e}},"loader"),Iut={id:DW,detector:Mut,loader:Eut},Put=Iut,LW="treemap",Rut=M(e=>/^\s*treemap/.test(e),"detector"),Nut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-C8B-eFsD.cjs"));return{id:LW,diagram:e}},"loader"),Out={id:LW,detector:Rut,loader:Nut},yE=!1,y_=M(()=>{yE||(yE=!0,Ym("error",Qlt,e=>e.toLowerCase().trim()==="error"),Ym("---",{db:{clear:M(()=>{},"clear")},styles:{},renderer:{draw:M(()=>{},"draw")},parser:{parse:M(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:M(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),GS(nut,hut,Put),GS(zst,vut,Blt,Plt,Qst,slt,clt,dlt,Tlt,Llt,Xst,jst,sut,nlt,jlt,zlt,Xlt,mlt,_ut,Sut,blt,Lut,Tut,Out))},"addDiagrams"),But=M(async()=>{ot.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(tu).map(async([r,{detector:n,loader:i}])=>{if(i)try{YS(r)}catch{try{const{diagram:a,id:o}=await i();Ym(o,a,n)}catch(a){throw ot.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete tu[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){ot.error(`Failed to load ${t.length} external diagrams`);for(const r of t)ot.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Fut="graphics-document document";function MW(e,t){e.attr("role",Fut),t!==""&&e.attr("aria-roledescription",t)}M(MW,"setA11yDiagramInfo");function EW(e,t,r,n){if(e.insert!==void 0){if(r){const i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){const i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}M(EW,"addSVGa11yTitleDescription");var Kl,Gw=(Kl=class{constructor(t,r,n,i,a){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(t,r={}){const n=zr(),i=p2(t,n);t=Fit(t)+`
292
+ L0,20`)},"requirement_arrow"),rst=M((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),nst={extension:Got,composition:Wot,aggregation:Hot,dependency:jot,lollipop:Uot,point:Yot,circle:qot,cross:Xot,barb:Zot,only_one:Kot,zero_or_one:Jot,one_or_more:Qot,zero_or_more:tst,requirement_arrow:est,requirement_contains:rst},YG=zot,ist={common:yu,getConfig:zr,insertCluster:S4,insertEdge:HG,insertEdgeLabel:zG,insertMarkers:YG,insertNode:vk,interpolateToCurve:Y2,labelHelper:Yt,log:ot,positionEdgeLabel:GG},np={},qG=M(e=>{for(const t of e)np[t.name]=t},"registerLayoutLoaders"),ast=M(()=>{qG([{name:"dagre",loader:M(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-DS9wji35.cjs")),"loader")},{name:"cose-bilkent",loader:M(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-DeVJYdgH.cjs")),"loader")}])},"registerDefaultLayoutLoaders");ast();var ost=M(async(e,t)=>{if(!(e.layoutAlgorithm in np))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=np[e.layoutAlgorithm];return(await r.loader()).render(e,t,ist,{algorithm:r.algorithm})},"render"),sst=M((e="",{fallback:t="dagre"}={})=>{if(e in np)return e;if(t in np)return ot.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),XG="comm",ZG="rule",KG="decl",lst="@import",ust="@namespace",cst="@keyframes",hst="@layer",JG=Math.abs,gk=String.fromCharCode;function QG(e){return e.trim()}function um(e,t,r){return e.replace(t,r)}function fst(e,t,r){return e.indexOf(t,r)}function zc(e,t){return e.charCodeAt(t)|0}function ch(e,t,r){return e.slice(t,r)}function la(e){return e.length}function dst(e){return e.length}function Rv(e,t){return t.push(e),e}var g_=1,hh=1,tW=0,pi=0,or=0,Bh="";function mk(e,t,r,n,i,a,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:g_,column:hh,length:o,return:"",siblings:s}}function pst(){return or}function vst(){return or=pi>0?zc(Bh,--pi):0,hh--,or===10&&(hh=1,g_--),or}function Li(){return or=pi<tW?zc(Bh,pi++):0,hh++,or===10&&(hh=1,g_++),or}function rs(){return zc(Bh,pi)}function cm(){return pi}function m_(e,t){return ch(Bh,e,t)}function ip(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gst(e){return g_=hh=1,tW=la(Bh=e),pi=0,[]}function mst(e){return Bh="",e}function Xx(e){return QG(m_(pi-1,Ow(e===91?e+2:e===40?e+1:e)))}function yst(e){for(;(or=rs())&&or<33;)Li();return ip(e)>2||ip(or)>3?"":" "}function _st(e,t){for(;--t&&Li()&&!(or<48||or>102||or>57&&or<65||or>70&&or<97););return m_(e,cm()+(t<6&&rs()==32&&Li()==32))}function Ow(e){for(;Li();)switch(or){case e:return pi;case 34:case 39:e!==34&&e!==39&&Ow(or);break;case 40:e===41&&Ow(e);break;case 92:Li();break}return pi}function xst(e,t){for(;Li()&&e+or!==57;)if(e+or===84&&rs()===47)break;return"/*"+m_(t,pi-1)+"*"+gk(e===47?e:Li())}function bst(e){for(;!ip(rs());)Li();return m_(e,pi)}function Sst(e){return mst(hm("",null,null,null,[""],e=gst(e),0,[0],e))}function hm(e,t,r,n,i,a,o,s,l){for(var u=0,c=0,h=o,f=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Li()){case 40:if(p!=108&&zc(w,h-1)==58){fst(w+=um(Xx(y),"&","&\f"),"&\f",JG(u?s[u-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:w+=Xx(y);break;case 9:case 10:case 13:case 32:w+=yst(p);break;case 92:w+=_st(cm()-1,7);continue;case 47:switch(rs()){case 42:case 47:Rv(wst(xst(Li(),cm()),t,r,l),l),(ip(p||1)==5||ip(rs()||1)==5)&&la(w)&&ch(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*v:s[u++]=la(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=um(w,/\f/g,"")),d>0&&(la(w)-h||v===0&&p===47)&&Rv(d>32?fE(w+";",n,r,h-1,l):fE(um(w," ","")+";",n,r,h-2,l),l);break;case 59:w+=";";default:if(Rv(S=hE(w,t,r,u,c,i,s,_,x=[],b=[],h,a),a),y===123)if(c===0)hm(w,t,S,S,x,a,h,s,b);else{switch(f){case 99:if(zc(w,3)===110)break;case 108:if(zc(w,2)===97)break;default:c=0;case 100:case 109:case 115:}c?hm(e,S,S,n&&Rv(hE(e,S,S,0,0,i,s,_,i,x=[],h,b),b),i,b,h,s,n?x:b):hm(w,S,S,S,[""],b,0,s,b)}}u=c=d=0,v=m=1,_=w="",h=o;break;case 58:h=1+la(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&vst()==125)continue}switch(w+=gk(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[u++]=(la(w)-1)*m,m=1;break;case 64:rs()===45&&(w+=Xx(Li())),f=rs(),c=h=la(_=w+=bst(cm())),y++;break;case 45:p===45&&la(w)==2&&(v=0)}}return a}function hE(e,t,r,n,i,a,o,s,l,u,c,h){for(var f=i-1,d=i===0?a:[""],p=dst(d),v=0,g=0,m=0;v<n;++v)for(var y=0,_=ch(e,f+1,f=JG(g=o[v])),x=e;y<p;++y)(x=QG(g>0?d[y]+" "+_:um(_,/&\f/g,d[y])))&&(l[m++]=x);return mk(e,t,r,i===0?ZG:s,l,u,c,h)}function wst(e,t,r,n){return mk(e,t,r,XG,gk(pst()),ch(e,2,-2),0,n)}function fE(e,t,r,n,i){return mk(e,t,r,KG,ch(e,0,n),ch(e,n+1,-1),n,i)}function Bw(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Cst(e,t,r,n){switch(e.type){case hst:if(e.children.length)break;case lst:case ust:case KG:return e.return=e.return||e.value;case XG:return"";case cst:return e.return=e.value+"{"+Bw(e.children,n)+"}";case ZG:if(!la(e.value=e.props.join(",")))return""}return la(r=Bw(e.children,n))?e.return=e.value+"{"+r+"}":""}var Tst=uz(Object.keys,Object),kst=Object.prototype,Ast=kst.hasOwnProperty;function eW(e){if(!Fp(e))return Tst(e);var t=[];for(var r in Object(e))Ast.call(e,r)&&r!="constructor"&&t.push(r);return t}var Fw=bu(Ba,"DataView"),$w=bu(Ba,"Promise"),by=bu(Ba,"Set"),Vw=bu(Ba,"WeakMap"),dE="[object Map]",Dst="[object Object]",pE="[object Promise]",vE="[object Set]",gE="[object WeakMap]",mE="[object DataView]",Lst=xu(Fw),Mst=xu(Qd),Est=xu($w),Ist=xu(by),Pst=xu(Vw);exports.getTag=_u;(Fw&&exports.getTag(new Fw(new ArrayBuffer(1)))!=mE||Qd&&exports.getTag(new Qd)!=dE||$w&&exports.getTag($w.resolve())!=pE||by&&exports.getTag(new by)!=vE||Vw&&exports.getTag(new Vw)!=gE)&&(exports.getTag=function(e){var t=_u(e),r=t==Dst?e.constructor:void 0,n=r?xu(r):"";if(n)switch(n){case Lst:return mE;case Mst:return dE;case Est:return pE;case Ist:return vE;case Pst:return gE}return t});var Rst="[object Map]",Nst="[object Set]",Ost=Object.prototype,Bst=Ost.hasOwnProperty;function zw(e){if(e==null)return!0;if($p(e)&&(ep(e)||typeof e=="string"||typeof e.splice=="function"||o_(e)||s_(e)||tp(e)))return!e.length;var t=exports.getTag(e);if(t==Rst||t==Nst)return!e.size;if(Fp(e))return!eW(e).length;for(var r in e)if(Bst.call(e,r))return!1;return!0}var rW="c4",Fst=M(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),$st=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-CmgWeaNY.cjs"));return{id:rW,diagram:e}},"loader"),Vst={id:rW,detector:Fst,loader:$st},zst=Vst,nW="flowchart",Gst=M((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Wst=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-xwivlLNh.cjs"));return{id:nW,diagram:e}},"loader"),Hst={id:nW,detector:Gst,loader:Wst},jst=Hst,iW="flowchart-v2",Ust=M((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),Yst=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-xwivlLNh.cjs"));return{id:iW,diagram:e}},"loader"),qst={id:iW,detector:Ust,loader:Yst},Xst=qst,aW="er",Zst=M(e=>/^\s*erDiagram/.test(e),"detector"),Kst=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-CTuUl_QF.cjs"));return{id:aW,diagram:e}},"loader"),Jst={id:aW,detector:Zst,loader:Kst},Qst=Jst,oW="gitGraph",tlt=M(e=>/^\s*gitGraph/.test(e),"detector"),elt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-CoPwJElV.cjs"));return{id:oW,diagram:e}},"loader"),rlt={id:oW,detector:tlt,loader:elt},nlt=rlt,sW="gantt",ilt=M(e=>/^\s*gantt/.test(e),"detector"),alt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-B3q7Pdot.cjs"));return{id:sW,diagram:e}},"loader"),olt={id:sW,detector:ilt,loader:alt},slt=olt,lW="info",llt=M(e=>/^\s*info/.test(e),"detector"),ult=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-B_aTHTdj.cjs"));return{id:lW,diagram:e}},"loader"),clt={id:lW,detector:llt,loader:ult},uW="pie",hlt=M(e=>/^\s*pie/.test(e),"detector"),flt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-B7xpaxNI.cjs"));return{id:uW,diagram:e}},"loader"),dlt={id:uW,detector:hlt,loader:flt},cW="quadrantChart",plt=M(e=>/^\s*quadrantChart/.test(e),"detector"),vlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-CU8xKahB.cjs"));return{id:cW,diagram:e}},"loader"),glt={id:cW,detector:plt,loader:vlt},mlt=glt,hW="xychart",ylt=M(e=>/^\s*xychart(-beta)?/.test(e),"detector"),_lt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-hzr1xce0.cjs"));return{id:hW,diagram:e}},"loader"),xlt={id:hW,detector:ylt,loader:_lt},blt=xlt,fW="requirement",Slt=M(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),wlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-CqgqKYA2.cjs"));return{id:fW,diagram:e}},"loader"),Clt={id:fW,detector:Slt,loader:wlt},Tlt=Clt,dW="sequence",klt=M(e=>/^\s*sequenceDiagram/.test(e),"detector"),Alt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-BKgsh2l9.cjs"));return{id:dW,diagram:e}},"loader"),Dlt={id:dW,detector:klt,loader:Alt},Llt=Dlt,pW="class",Mlt=M((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Elt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-DrwrRciN.cjs"));return{id:pW,diagram:e}},"loader"),Ilt={id:pW,detector:Mlt,loader:Elt},Plt=Ilt,vW="classDiagram",Rlt=M((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Nlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-DrwrRciN.cjs"));return{id:vW,diagram:e}},"loader"),Olt={id:vW,detector:Rlt,loader:Nlt},Blt=Olt,gW="state",Flt=M((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),$lt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-DiXsXUVx.cjs"));return{id:gW,diagram:e}},"loader"),Vlt={id:gW,detector:Flt,loader:$lt},zlt=Vlt,mW="stateDiagram",Glt=M((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Wlt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-4nWAmjxL.cjs"));return{id:mW,diagram:e}},"loader"),Hlt={id:mW,detector:Glt,loader:Wlt},jlt=Hlt,yW="journey",Ult=M(e=>/^\s*journey/.test(e),"detector"),Ylt=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-CQ4Y-k4a.cjs"));return{id:yW,diagram:e}},"loader"),qlt={id:yW,detector:Ult,loader:Ylt},Xlt=qlt,Zlt=M((e,t,r)=>{ot.debug(`rendering svg for syntax error
293
+ `);const n=v3(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),g2(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),_W={draw:Zlt},Klt=_W,Jlt={db:{},renderer:_W,parser:{parse:M(()=>{},"parse")}},Qlt=Jlt,xW="flowchart-elk",tut=M((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),eut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-xwivlLNh.cjs"));return{id:xW,diagram:e}},"loader"),rut={id:xW,detector:tut,loader:eut},nut=rut,bW="timeline",iut=M(e=>/^\s*timeline/.test(e),"detector"),aut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-bLKCHO3E.cjs"));return{id:bW,diagram:e}},"loader"),out={id:bW,detector:iut,loader:aut},sut=out,SW="mindmap",lut=M(e=>/^\s*mindmap/.test(e),"detector"),uut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-D6nZ6h88.cjs"));return{id:SW,diagram:e}},"loader"),cut={id:SW,detector:lut,loader:uut},hut=cut,wW="kanban",fut=M(e=>/^\s*kanban/.test(e),"detector"),dut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-DXN7Vy5Q.cjs"));return{id:wW,diagram:e}},"loader"),put={id:wW,detector:fut,loader:dut},vut=put,CW="sankey",gut=M(e=>/^\s*sankey(-beta)?/.test(e),"detector"),mut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-MIgYhwV5.cjs"));return{id:CW,diagram:e}},"loader"),yut={id:CW,detector:gut,loader:mut},_ut=yut,TW="packet",xut=M(e=>/^\s*packet(-beta)?/.test(e),"detector"),but=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-DErRWKBa.cjs"));return{id:TW,diagram:e}},"loader"),Sut={id:TW,detector:xut,loader:but},kW="radar",wut=M(e=>/^\s*radar-beta/.test(e),"detector"),Cut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-CUI73LoW.cjs"));return{id:kW,diagram:e}},"loader"),Tut={id:kW,detector:wut,loader:Cut},AW="block",kut=M(e=>/^\s*block(-beta)?/.test(e),"detector"),Aut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-3DBOr3zI.cjs"));return{id:AW,diagram:e}},"loader"),Dut={id:AW,detector:kut,loader:Aut},Lut=Dut,DW="architecture",Mut=M(e=>/^\s*architecture/.test(e),"detector"),Eut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-CUAzJ6hr.cjs"));return{id:DW,diagram:e}},"loader"),Iut={id:DW,detector:Mut,loader:Eut},Put=Iut,LW="treemap",Rut=M(e=>/^\s*treemap/.test(e),"detector"),Nut=M(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-Cw2-YUn8.cjs"));return{id:LW,diagram:e}},"loader"),Out={id:LW,detector:Rut,loader:Nut},yE=!1,y_=M(()=>{yE||(yE=!0,Ym("error",Qlt,e=>e.toLowerCase().trim()==="error"),Ym("---",{db:{clear:M(()=>{},"clear")},styles:{},renderer:{draw:M(()=>{},"draw")},parser:{parse:M(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:M(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),GS(nut,hut,Put),GS(zst,vut,Blt,Plt,Qst,slt,clt,dlt,Tlt,Llt,Xst,jst,sut,nlt,jlt,zlt,Xlt,mlt,_ut,Sut,blt,Lut,Tut,Out))},"addDiagrams"),But=M(async()=>{ot.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(tu).map(async([r,{detector:n,loader:i}])=>{if(i)try{YS(r)}catch{try{const{diagram:a,id:o}=await i();Ym(o,a,n)}catch(a){throw ot.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete tu[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){ot.error(`Failed to load ${t.length} external diagrams`);for(const r of t)ot.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Fut="graphics-document document";function MW(e,t){e.attr("role",Fut),t!==""&&e.attr("aria-roledescription",t)}M(MW,"setA11yDiagramInfo");function EW(e,t,r,n){if(e.insert!==void 0){if(r){const i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){const i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}M(EW,"addSVGa11yTitleDescription");var Kl,Gw=(Kl=class{constructor(t,r,n,i,a){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(t,r={}){const n=zr(),i=p2(t,n);t=Fit(t)+`
294
294
  `;try{YS(i)}catch{const u=RZ(i);if(!u)throw new X5(`Diagram ${i} not found.`);const{id:c,diagram:h}=await u();Ym(c,h)}const{db:a,parser:o,renderer:s,init:l}=YS(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new Kl(i,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},M(Kl,"Diagram"),Kl),_E=[],$ut=M(()=>{_E.forEach(e=>{e()}),_E=[]},"attachFunctions"),Vut=M(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function IW(e){const t=e.match(q5);if(!t)return{text:e,metadata:{}};let r=JV(t[1],{schema:KV})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}M(IW,"extractFrontMatter");var zut=M(e=>e.replace(/\r\n?/g,`
295
295
  `).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Gut=M(e=>{const{text:t,metadata:r}=IW(e),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:t}},"processFrontmatter"),Wut=M(e=>{const t=si.detectInit(e)??{},r=si.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Dit(e),directive:t}},"processDirectives");function yk(e){const t=zut(e),r=Gut(t),n=Wut(r.text),i=l_(r.config,n.directive);return e=Vut(n.text),{code:e,title:r.title,config:i}}M(yk,"preprocessDiagram");function PW(e){const t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}M(PW,"toBase64");var Hut=5e4,jut="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Uut="sandbox",Yut="loose",qut="http://www.w3.org/2000/svg",Xut="http://www.w3.org/1999/xlink",Zut="http://www.w3.org/1999/xhtml",Kut="100%",Jut="100%",Qut="border:0;margin:0;",tct="margin:0",ect="allow-top-navigation-by-user-activation allow-popups",rct='The "iframe" tag is not supported by your browser.',nct=["foreignobject"],ict=["dominant-baseline"];function _k(e){const t=yk(e);return jm(),XZ(t.config??{}),t}M(_k,"processAndSetConfigs");async function RW(e,t){y_();try{const{code:r,config:n}=_k(e);return{diagramType:(await OW(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}M(RW,"parse");var xE=M((e,t,r=[])=>`
296
296
  .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),act=M((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
@@ -356,10 +356,10 @@ echarts.use([`+L+"]);":"Unknown series "+A))}return}if(h==="tooltip"){if(_){proc
356
356
 
357
357
  `];function rr(e,t){return t.type=e,t}function WC(e){return e.type==="section"}function m8(e){return WC(e)?ogt:sgt}function y8(e){if(WC(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return R(e.blocks,function(i){var a=y8(i);a>=t&&(t=a+ +(n&&(!a||WC(i)&&!i.noHeader)))}),t}return 0}function ogt(e,t,r,n){var i=t.noHeader,a=lgt(y8(t)),o=[],s=t.blocks||[];ft(!s||nt(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ct(u,l)){var c=new c8(u[l],null);s.sort(function(v,g){return c.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(v,g){var m=t.valueFormatter,y=m8(v)(m?et(et({},e),{valueFormatter:m}):e,v,g>0?a.html:0,n);y!=null&&o.push(y)});var h=e.renderMode==="richText"?o.join(a.richText):HC(n,o.join(""),i?r:a.html);if(i)return h;var f=NC(t.header,"ordinal",e.useUTC),d=g8(n,e.renderMode).nameStyle,p=v8(n);return e.renderMode==="richText"?_8(e,f,d)+a.richText+h:HC(n,'<div style="'+d+";"+p+';">'+ln(f)+"</div>"+h,r)}function sgt(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(x){return x=nt(x)?x:[x],at(x,function(b,S){return NC(b,nt(d)?d[S]:d,u)})};if(!(a&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||U.color.secondary,i),f=a?"":NC(l,"ordinal",u),d=t.valueType,p=o?[]:c(t.value,t.dataIndex),v=!s||!a,g=!s&&a,m=g8(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":h)+(a?"":_8(e,f,y))+(o?"":hgt(e,p,v,g,_)):HC(n,(s?"":h)+(a?"":ugt(f,!s,y))+(o?"":cgt(p,v,g,_)),r)}}function bP(e,t,r,n,i,a){if(e){var o=m8(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function lgt(e){return{html:igt[e],richText:agt[e]}}function HC(e,t,r){var n='<div style="clear:both"></div>',i="margin: "+r+"px 0 0",a=v8(e);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function ugt(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+ln(e)+"</span>"}function cgt(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=nt(e)?e:[e],'<span style="'+a+";"+n+'">'+at(e,function(o){return ln(o)}).join("&nbsp;&nbsp;")+"</span>"}function _8(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function hgt(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(nt(t)?t.join(" "):t,a)}function x8(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return vu(n)}function b8(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var qb=function(){function e(){this.richTextStyles={},this._nextStyleNameId=DH()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=qpt({color:r,type:t,renderMode:n,markerId:i});return lt(a)?a:(process.env.NODE_ENV!=="production"&&ft(i),this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};nt(r)?R(r,function(a){return et(n,a)}):et(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function S8(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=nt(s),u=x8(t,r),c,h,f,d;if(o>1||l&&!o){var p=fgt(s,t,r,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var v=i.getDimensionInfo(a[0]);d=c=mh(i,r,a[0]),h=v.type}else d=c=l?s[0]:s;var g=Pk(t),m=g&&t.name||"",y=i.getName(r),_=n?m:y;return rr("section",{header:m,noHeader:n||!g,sortParam:d,blocks:[rr("nameValue",{markerType:"item",markerColor:u,name:_,noName:!ci(_),value:c,valueType:h,dataIndex:r})].concat(f||[])})}function fgt(e,t,r,n,i){var a=t.getData(),o=Da(e,function(h,f,d){var p=a.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(h){c(mh(a,r,h),h)}):R(e,c);function c(h,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(rr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Wo=qt();function ig(e,t){return e.getName(t)||e.getId(t)}var Tm="__universalTransitionEnabled",Ae=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Bd({count:pgt,reset:vgt}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Wo(this).sourceManager=new p8(this);a.prepareSource();var o=this.getInitialData(r,i);wP(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&ft(o,"getInitialData returned invalid data."),Wo(this).dataBeforeProcessed=o,SP(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=dp(this),a=i?Du(r):{},o=this.subType;Zt.hasClass(o)&&(o+="Series"),zt(r,n.getTheme().get(this.subType)),zt(r,this.getDefaultOption()),uu(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Pa(r,a,i)},t.prototype.mergeOption=function(r,n){r=zt(this.option,r,!0),this.fillDataTextStyle(r.data);var i=dp(this);i&&Pa(this.option,r,i);var a=Wo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);wP(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Wo(this).dataBeforeProcessed=o,SP(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!yn(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&uu(r[i],"label",n)},t.prototype.getInitialData=function(r,n){},t.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},t.prototype.getData=function(r){var n=jC(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Wo(this).data},t.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},t.prototype.setData=function(r){var n=jC(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Wo(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return pt(r)},t.prototype.getSourceManager=function(){return Wo(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Wo(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},t.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],h=1/0,f=-1,d=0;return o.each(n,function(p,v){var g=l.dataToCoord(p),m=u-g,y=Math.abs(m);y<=a&&((y<h||y===h&&m>=0&&f<0)&&(h=y,f=m,d=0),m===f&&(c[d++]=v))}),c.length=d,c},t.prototype.formatTooltip=function(r,n,i){return S8({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Qt.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=lA.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=ig(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=te(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[ig(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Tm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){xt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var h=n[c],f=ig(r,h);u[f]=!0,this._selectedDataIndicesMap[f]=r.getRawIndex(h)}}else if(s==="single"||s===!0){var d=n[l-1],f=ig(r,d);o.selectedMap=(i={},i[f]=!0,i),this._selectedDataIndicesMap=(a={},a[f]=r.getRawIndex(d),a)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Zt.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Zt);ir(Ae,Y_);ir(Ae,lA);FH(Ae,Zt);function SP(e){var t=e.name;Pk(e)||(e.name=dgt(e)||t)}function dgt(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function pgt(e){return e.model.getRawData().count()}function vgt(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),ggt}function ggt(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function wP(e,t){R(ap(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Bt(mgt,t))})}function mgt(e,t){var r=jC(e);return r&&r.setOutputEnd((t||this).count()),t}function jC(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Ee=function(){function e(){this.group=new yt,this.uid=Uh("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();Nk(Ee);M_(Ee);function qh(){var e=qt();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var w8=qt(),ygt=qh(),ye=function(){function e(){this.group=new yt,this.uid=Uh("viewChart"),this.renderTask=Bd({plan:_gt,reset:xgt}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&ie("Unknown dataType "+i.dataType);return}TP(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&ie("Unknown dataType "+i.dataType);return}TP(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){Bs(this.group,t)},e.markUpdateMethod=function(t,r){w8(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function CP(e,t,r){e&&Ts(e)&&(t==="emphasis"?Ao:Do)(e,r)}function TP(e,t,r){var n=cu(e,t),i=t&&t.highlightKey!=null?zdt(t.highlightKey):null;n!=null?R(xe(n),function(a){CP(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){CP(a,r,i)})}Nk(ye,["dispose"]);M_(ye);function _gt(e){return ygt(e.model)}function xgt(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&w8(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),bgt[l]}var bgt={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Uy="\0__throttleOriginMethod",kP="\0__throttleRate",AP="\0__throttleType";function dA(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function h(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var f=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),l=this,u=d;var v=c||t,g=c||r;c=null,s=n-(g?i:a)-v,clearTimeout(o),g?o=setTimeout(h,v):s>=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function Xh(e,t,r,n){var i=e[t];if(i){var a=i[Uy]||i,o=i[AP],s=i[kP];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=dA(a,r,n==="debounce"),i[Uy]=a,i[AP]=n,i[kP]=r}return i}}function vp(e,t){var r=e[t];r&&r[Uy]&&(r.clear&&r.clear(),e[t]=r[Uy])}var DP=qt(),LP={itemStyle:hu(T6,!0),lineStyle:hu(C6,!0)},Sgt={lineStyle:"stroke",itemStyle:"fill"};function C8(e,t){var r=e.visualStyleMapper||LP[t];return r||(console.warn("Unknown style type '"+t+"'."),LP.itemStyle)}function T8(e,t){var r=e.visualDrawType||Sgt[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var wgt={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=C8(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=T8(e,n),u=o[l],c=mt(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||mt(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||mt(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var v=e.getDataParams(p),g=et({},o);g[l]=c(v),d.setItemVisual(p,"style",g)}}}},Mf=new ne,Cgt={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=C8(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Mf.option=l[n];var u=i(Mf),c=o.ensureUniqueItemVisual(s,"style");et(c,u),Mf.option.decal&&(o.setItemVisual(s,"decal",Mf.option.decal),Mf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Tgt={performRawSeries:!0,overallReset:function(e){var t=pt();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),DP(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=DP(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=T8(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();f[l]=r.getColorFromPalette(d,o,p)}})}})}},ag=Math.PI;function kgt(e,t){t=t||{},wt(t,{text:"loading",textColor:U.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:U.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new yt,n=new Ut({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new oe({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ut({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new $_({shape:{startAngle:-ag/2,endAngle:-ag/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:ag*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ag*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var k8=function(){function e(t,r,n,i){this._stageTaskMap=pt(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=pt();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),ft(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;R(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(g){s(i,g)&&(g.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var v=o.getPerformArgs(f,i.block);p.each(function(g){g.perform(v)}),f.perform(v)&&(a=!0)}else h&&h.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=pt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||Bd({plan:Egt,reset:Igt,count:Rgt}));d.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,d)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Bd({reset:Agt});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=pt(),u=t.seriesType,c=t.getTargetSeries,h=!0,f=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),ft(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,R(n.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(f=!0,Bd({reset:Dgt,onDirty:Mgt})));m.context={model:v,overallProgress:h},m.agent=o,m.__block=h,a._pipe(v,m)}f&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return mt(t)&&(t={overallReset:t,seriesType:Ngt(t)}),t.uid=Uh("stageHandler"),r&&(t.visualType=r),t},e}();function Agt(e){e.overallReset(e.ecModel,e.api,e.payload)}function Dgt(e){return e.overallProgress&&Lgt}function Lgt(){this.agent.dirty(),this.getDownstream().dirty()}function Mgt(){this.agent&&this.agent.dirty()}function Egt(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Igt(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=xe(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?at(t,function(r,n){return A8(n)}):Pgt}var Pgt=A8(0);function A8(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function Rgt(e){return e.data.count()}function Ngt(e){Yy=null;try{e(gp,D8)}catch{}return Yy}var gp={},D8={},Yy;L8(gp,uA);L8(D8,Q6);gp.eachSeriesByType=gp.eachRawSeriesByType=function(e){Yy=e};gp.eachComponent=function(e){e.mainType==="series"&&e.subType&&(Yy=e.subType)};function L8(e,t){for(var r in t.prototype)e[r]=Ye}var bt=U.darkColor,Ogt=bt.background,Ef=function(){return{axisLine:{lineStyle:{color:bt.axisLine}},splitLine:{lineStyle:{color:bt.axisSplitLine}},splitArea:{areaStyle:{color:[bt.backgroundTint,bt.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:bt.axisMinorSplitLine}},axisLabel:{color:bt.axisLabel},axisName:{}}},MP={label:{color:bt.secondary},itemStyle:{borderColor:bt.borderTint},dividerLineStyle:{color:bt.border}},M8={darkMode:!0,color:bt.theme,backgroundColor:Ogt,axisPointer:{lineStyle:{color:bt.border},crossStyle:{color:bt.borderShade},label:{color:bt.tertiary}},legend:{textStyle:{color:bt.secondary},pageTextStyle:{color:bt.tertiary}},textStyle:{color:bt.secondary},title:{textStyle:{color:bt.primary},subtextStyle:{color:bt.quaternary}},toolbox:{iconStyle:{borderColor:bt.accent50}},tooltip:{backgroundColor:bt.neutral20,defaultBorderColor:bt.border,textStyle:{color:bt.tertiary}},dataZoom:{borderColor:bt.accent10,textStyle:{color:bt.tertiary},brushStyle:{color:bt.backgroundTint},handleStyle:{color:bt.neutral00,borderColor:bt.accent20},moveHandleStyle:{color:bt.accent40},emphasis:{handleStyle:{borderColor:bt.accent50}},dataBackground:{lineStyle:{color:bt.accent30},areaStyle:{color:bt.accent20}},selectedDataBackground:{lineStyle:{color:bt.accent50},areaStyle:{color:bt.accent30}}},visualMap:{textStyle:{color:bt.secondary},handleStyle:{borderColor:bt.neutral30}},timeline:{lineStyle:{color:bt.accent10},label:{color:bt.tertiary},controlStyle:{color:bt.accent30,borderColor:bt.accent30}},calendar:{itemStyle:{color:bt.neutral00,borderColor:bt.neutral20},dayLabel:{color:bt.tertiary},monthLabel:{color:bt.secondary},yearLabel:{color:bt.secondary}},matrix:{x:MP,y:MP,backgroundColor:{borderColor:bt.axisLine},body:{itemStyle:{borderColor:bt.borderTint}}},timeAxis:Ef(),logAxis:Ef(),valueAxis:Ef(),categoryAxis:Ef(),line:{symbol:"circle"},graph:{color:bt.theme},gauge:{title:{color:bt.secondary},axisLine:{lineStyle:{color:[[1,bt.neutral05]]}},axisLabel:{color:bt.axisLabel},detail:{color:bt.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:bt.background}},radar:function(){var e=Ef();return e.axisName={color:bt.axisLabel},e.axisLine.lineStyle.color=bt.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:bt.neutral20,textStyle:{color:bt.secondary}},emphasis:{itemStyle:{color:bt.neutral30}}}},sunburst:{itemStyle:{borderColor:bt.background}},map:{itemStyle:{borderColor:bt.border,areaColor:bt.neutral10},label:{color:bt.tertiary},emphasis:{label:{color:bt.primary},itemStyle:{areaColor:bt.highlight}},select:{label:{color:bt.primary},itemStyle:{areaColor:bt.highlight}}},geo:{itemStyle:{borderColor:bt.border,areaColor:bt.neutral10},emphasis:{label:{color:bt.primary},itemStyle:{areaColor:bt.highlight}},select:{label:{color:bt.primary},itemStyle:{color:bt.highlight}}}};M8.categoryAxis.splitLine.show=!1;var Bgt=function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(lt(t)){var a=ma(t);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};R(t,function(l,u){for(var c=!1,h=0;h<o.length;h++){var f=o[h],d=u.lastIndexOf(f);if(d>0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(r.mainType=p,r[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),UC=["symbol","symbolSize","symbolRotate","symbolOffset"],EP=UC.concat(["symbolKeepAspect"]),Fgt={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<UC.length;o++){var s=UC[o],l=e.get(s);mt(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(et({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var u=te(i);function c(h,f){for(var d=e.getRawValue(f),p=e.getDataParams(f),v=0;v<u.length;v++){var g=u[v];h.setItemVisual(f,g,i[g](d,p))}}return{dataEach:a?c:null}}},$gt={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<EP.length;s++){var l=EP[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function pA(e,t,r){switch(r){case"color":var n=e.getItemVisual(t,"style");return n[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function Kp(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function E8(e,t,r,n){switch(r){case"color":var i=e.ensureUniqueItemVisual(t,"style");i[e.getVisual("drawType")]=n,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,r,n);break;default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function I8(e,t){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}R([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=et({},i),process.env.NODE_ENV!=="production"&&Ze(i.type,n[1]),o.dispatchAction(et(i,{type:n[1],seriesIndex:r(a,i)}))})})}function tc(e,t,r,n,i){var a=e+t;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&Ea("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var h=o.getData(),f=cu(h,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:nt(f)?h.getName(f[0]):h.getName(f),selected:lt(l)?l:et({},l)})}}))}function Vgt(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(tc("map","selectchanged",t,i,n),tc("pie","selectchanged",t,i,n)):n.fromAction==="select"?(tc("map","selected",t,i,n),tc("pie","selected",t,i,n)):n.fromAction==="unselect"&&(tc("map","unselected",t,i,n),tc("pie","unselected",t,i,n))})}function Fl(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var zgt=Math.round(Math.random()*9),Ggt=typeof Object.defineProperty=="function",Wgt=function(){function e(){this._id="__ec_inner_"+zgt++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return Ggt?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e}(),Hgt=Kt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n+a),e.lineTo(r-i,n+a),e.closePath()}}),jgt=Kt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n),e.lineTo(r,n+a),e.lineTo(r-i,n),e.closePath()}}),Ugt=Kt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),f=Math.cos(u),d=o*.6,p=o*.7;e.moveTo(r-c,l+s),e.arc(r,l,o,Math.PI-u,Math.PI*2+u),e.bezierCurveTo(r+c-h*d,l+s+f*d,r,n-p,r,n),e.bezierCurveTo(r,n-p,r-c+h*d,l+s+f*d,r-c,l+s),e.closePath()}}),Ygt=Kt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;e.moveTo(i,a),e.lineTo(i+o,a+r),e.lineTo(i,a+r/4*3),e.lineTo(i-o,a+r),e.lineTo(i,a),e.closePath()}}),qgt={line:Qe,rect:Ut,roundRect:Ut,square:Ut,circle:Bo,diamond:jgt,pin:Ugt,arrow:Ygt,triangle:Hgt},Xgt={line:function(e,t,r,n,i){i.x1=e,i.y1=t+n/2,i.x2=e+r,i.y2=t+n/2},rect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n},roundRect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(e,t,r,n,i){var a=Math.min(r,n);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.r=Math.min(r,n)/2},diamond:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n},pin:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},arrow:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},triangle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n}},qy={};R(qgt,function(e,t){qy[t]=new e});var Zgt=Kt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=Ry(e,t,r),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(e,t,r){var n=t.symbolType;if(n!=="none"){var i=qy[n];i||(n="rect",i=qy[n]),Xgt[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function Kgt(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||U.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function nr(e,t,r,n,i,a,o){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var l;return e.indexOf("image://")===0?l=p6(e.slice(8),new Ct(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=hp(e.slice(7),{},new Ct(t,r,n,i),o?"center":"cover"):l=new Zgt({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=Kgt,a&&l.setColor(a),l}function Zh(e){return nt(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Mu(e,t){if(e!=null)return nt(e)||(e=[e,e]),[st(e[0],t[0])||0,st(dt(e[1],e[0]),t[1])||0]}function $l(e){return isFinite(e)}function Jgt(e,t,r){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=$l(n)?n:0,i=$l(i)?i:1,a=$l(a)?a:0,o=$l(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function Qgt(e,t,r){var n=r.width,i=r.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=$l(o)?o:.5,s=$l(s)?s:.5,l=l>=0&&$l(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function YC(e,t,r){for(var n=t.type==="radial"?Qgt(e,t,r):Jgt(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function tmt(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function og(e){return parseInt(e,10)}function Oc(e,t,r){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(e);return(e[i]||og(s[n])||og(e.style[n]))-(og(s[a])||0)-(og(s[o])||0)|0}function emt(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:ae(e)?[e]:nt(e)?e:null}function vA(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&emt(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=at(r,function(a){return a/i}),n/=i)}return[r,n]}var rmt=new Ia(!0);function Xy(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function IP(e){return typeof e=="string"&&e!=="none"}function Zy(e){var t=e.fill;return t!=null&&t!=="none"}function PP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function RP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function qC(e,t,r){var n=Ok(t.image,t.__image,r);if(E_(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*fm),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function nmt(e,t,r,n){var i,a=Xy(r),o=Zy(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||rmt,h=t.__dirty;if(!n){var f=r.fill,d=r.stroke,p=o&&!!f.colorStops,v=a&&!!d.colorStops,g=o&&!!f.image,m=a&&!!d.image,y=void 0,_=void 0,x=void 0,b=void 0,S=void 0;(p||v)&&(S=t.getBoundingRect()),p&&(y=h?YC(e,f,S):t.__canvasFillGradient,t.__canvasFillGradient=y),v&&(_=h?YC(e,d,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(x=h||!t.__canvasFillPattern?qC(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=x),m&&(b=h||!t.__canvasStrokePattern?qC(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),p?e.fillStyle=y:g&&(x?e.fillStyle=x:o=!1),v?e.strokeStyle=_:m&&(b?e.strokeStyle=b:a=!1)}var w=t.getGlobalScale();c.setScale(w[0],w[1],t.segmentIgnoreThreshold);var C,k;e.setLineDash&&r.lineDash&&(i=vA(t),C=i[0],k=i[1]);var T=!0;(u||h&Sc)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),T=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),T&&c.rebuildPath(e,l?s:1),C&&(e.setLineDash(C),e.lineDashOffset=k),n||(r.strokeFirst?(a&&RP(e,r),o&&PP(e,r)):(o&&PP(e,r),a&&RP(e,r))),C&&e.setLineDash([])}function imt(e,t,r){var n=t.__image=Ok(r.image,t.__image,t,t.onload);if(!(!n||!E_(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,h=o-u,f=s-c;e.drawImage(n,u,c,h,f,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function amt(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Co,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=vA(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Xy(r)&&e.strokeText(i,r.x,r.y),Zy(r)&&e.fillText(i,r.x,r.y)):(Zy(r)&&e.fillText(i,r.x,r.y),Xy(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var NP=["shadowBlur","shadowOffsetX","shadowOffsetY"],OP=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function P8(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Mn(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Hl.opacity:o}(n||t.blend!==r.blend)&&(a||(Mn(e,i),a=!0),e.globalCompositeOperation=t.blend||Hl.blend);for(var s=0;s<NP.length;s++){var l=NP[s];(n||t[l]!==r[l])&&(a||(Mn(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(Mn(e,i),a=!0),e.shadowColor=t.shadowColor||Hl.shadowColor),a}function BP(e,t,r,n,i){var a=mp(t,i.inHover),o=n?null:r&&mp(r,i.inHover)||{};if(a===o)return!1;var s=P8(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(Mn(e,i),s=!0),IP(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(Mn(e,i),s=!0),IP(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(Mn(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==u&&(s||(Mn(e,i),s=!0),e.lineWidth=u)}for(var c=0;c<OP.length;c++){var h=OP[c],f=h[0];(n||a[f]!==o[f])&&(s||(Mn(e,i),s=!0),e[f]=a[f]||h[1])}return s}function omt(e,t,r,n,i){return P8(e,mp(t,i.inHover),r&&mp(r,i.inHover),n,i)}function R8(e,t){var r=t.transform,n=e.dpr||1;r?e.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):e.setTransform(n,0,0,n,0,0)}function smt(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),R8(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function lmt(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var FP=1,$P=2,VP=3,zP=4;function umt(e){var t=Zy(e),r=Xy(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function Mn(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function mp(e,t){return t&&e.__hoverStyle||e.style}function N8(e,t){Vl(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Vl(e,t,r,n){var i=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Vn,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||tmt(a,o))&&(o&&o.length&&(Mn(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(Mn(e,r),e.save(),smt(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=t instanceof Kt&&t.autoBatch&&umt(t.style);s||lmt(i,u.transform)?(Mn(e,r),R8(e,t)):c||Mn(e,r);var h=mp(t,r.inHover);t instanceof Kt?(r.lastDrawType!==FP&&(l=!0,r.lastDrawType=FP),BP(e,t,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&e.beginPath(),nmt(e,t,h,c),c&&(r.batchFill=h.fill||"",r.batchStroke=h.stroke||"")):t instanceof vh?(r.lastDrawType!==VP&&(l=!0,r.lastDrawType=VP),BP(e,t,u,l,r),amt(e,t,h)):t instanceof Rr?(r.lastDrawType!==$P&&(l=!0,r.lastDrawType=$P),omt(e,t,u,l,r),imt(e,t,h)):t.getTemporalDisplayables&&(r.lastDrawType!==zP&&(l=!0,r.lastDrawType=zP),cmt(e,t,r)),c&&n&&Mn(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function cmt(e,t,r){var n=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Vl(e,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Vl(e,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Xb=new Wgt,GP=new fh(100),WP=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function yh(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&Xb.delete(e);var a=Xb.get(e);if(a)return a;var o=wt(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,Xb.set(e,s),e.dirty=!1,s;function l(u){for(var c=[r],h=!0,f=0;f<WP.length;++f){var d=o[WP[f]];if(d!=null&&!nt(d)&&!lt(d)&&!ae(d)&&typeof d!="boolean"){h=!1;break}c.push(d)}var p;if(h){p=c.join(",")+(i?"-svg":"");var v=GP.get(p);v&&(i?u.svgElement=v:u.image=v)}var g=B8(o.dashArrayX),m=hmt(o.dashArrayY),y=O8(o.symbol),_=fmt(g),x=F8(m),b=!i&&Bi.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=k(),C;b&&(b.width=w.width*r,b.height=w.height*r,C=b.getContext("2d")),T(),h&&GP.put(p,b||S),u.image=b,u.svgElement=S,u.svgWidth=w.width,u.svgHeight=w.height;function k(){for(var A=1,L=0,D=_.length;L<D;++L)A=rI(A,_[L]);for(var E=1,L=0,D=y.length;L<D;++L)E=rI(E,y[L].length);A*=E;var N=x*_.length*y.length;if(process.env.NODE_ENV!=="production"){var P=function(F){console.warn("Calculated decal size is greater than "+F+" due to decal option settings so "+F+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+F+" to be larger to avoid incontinuity.")};A>o.maxTileWidth&&P("maxTileWidth"),N>o.maxTileHeight&&P("maxTileHeight")}return{width:Math.max(1,Math.min(A,o.maxTileWidth)),height:Math.max(1,Math.min(N,o.maxTileHeight))}}function T(){C&&(C.clearRect(0,0,b.width,b.height),o.backgroundColor&&(C.fillStyle=o.backgroundColor,C.fillRect(0,0,b.width,b.height)));for(var A=0,L=0;L<m.length;++L)A+=m[L];if(A<=0)return;for(var D=-x,E=0,N=0,P=0;D<w.height;){if(E%2===0){for(var F=N/2%y.length,O=0,$=0,V=0;O<w.width*2;){for(var I=0,L=0;L<g[P].length;++L)I+=g[P][L];if(I<=0)break;if($%2===0){var B=(1-o.symbolSize)*.5,G=O+g[P][$]*B,H=D+m[E]*B,W=g[P][$]*o.symbolSize,J=m[E]*o.symbolSize,Q=V/2%y[F].length;tt(G,H,W,J,y[F][Q])}O+=g[P][$],++V,++$,$===g[P].length&&($=0)}++P,P===g.length&&(P=0)}D+=m[E],++N,++E,E===m.length&&(E=0)}function tt(it,X,rt,Z,vt){var kt=i?1:r,Wt=nr(vt,it*kt,X*kt,rt*kt,Z*kt,o.color,o.symbolKeepAspect);if(i){var Ht=n.painter.renderOneToVNode(Wt);Ht&&S.children.push(Ht)}else N8(C,Wt)}}}}function O8(e){if(!e||e.length===0)return[["rect"]];if(lt(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!lt(e[r])){t=!1;break}if(t)return O8([e]);for(var n=[],r=0;r<e.length;++r)lt(e[r])?n.push([e[r]]):n.push(e[r]);return n}function B8(e){if(!e||e.length===0)return[[0,0]];if(ae(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!ae(e[n])){r=!1;break}if(r)return B8([e]);for(var i=[],n=0;n<e.length;++n)if(ae(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=at(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function hmt(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(ae(e)){var t=Math.ceil(e);return[t,t]}var r=at(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function fmt(e){return at(e,function(t){return F8(t)})}function F8(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}function dmt(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=yh(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=yh(i,t)}}})}var Ci=new yi,Ky={};function pmt(e,t){process.env.NODE_ENV!=="production"&&Ky[e]&&ie("Already has an implementation of "+e+"."),Ky[e]=t}function vmt(e){return process.env.NODE_ENV!=="production"&&(Ky[e]||ie("Implementation of "+e+" doesn't exists.")),Ky[e]}var $8={};function gmt(e,t){$8[e]=t}function mmt(e){return $8[e]}var ymt=1,_mt=800,xmt=900,bmt=1e3,Smt=2e3,wmt=5e3,V8=1e3,Cmt=1100,gA=2e3,z8=3e3,Tmt=4e3,X_=4500,kmt=4600,Amt=5e3,Dmt=6e3,G8=7e3,Lmt={PROCESSOR:{FILTER:bmt,SERIES_FILTER:_mt,STATISTIC:wmt},VISUAL:{LAYOUT:V8,PROGRESSIVE_LAYOUT:Cmt,GLOBAL:gA,CHART:z8,POST_CHART_LAYOUT:kmt,COMPONENT:Tmt,BRUSH:Amt,CHART_ITEM:X_,ARIA:Dmt,DECAL:G8}},ar="__flagInMainProcess",sg="__mainProcessVersion",Dr="__pendingUpdate",Zb="__needsUpdateStatus",HP=/^[a-zA-Z0-9_]+$/,Kb="__connectUpdateStatus",jP=0,Mmt=1,Emt=2;function W8(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){Cn(this.id);return}return j8(this,e,t)}}function H8(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return j8(this,e,t)}}function j8(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),yi.prototype[t].apply(e,r)}var U8=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(yi),Y8=U8.prototype;Y8.on=H8("on");Y8.off=H8("off");var cl,Jb,lg,qa,ug,Qb,t1,ec,rc,UP,YP,e1,qP,cg,XP,q8,Kn,ZP,nc,X8=function(e){q(t,e);function t(r,n,i){var a=e.call(this,new Bgt)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;if(a[sg]=1,process.env.NODE_ENV!=="production"){var u=Qt.hasGlobalWindow?window:global;u&&(o=dt(u.__ECHARTS__DEFAULT__RENDERER__,o),s=dt(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=dt(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr&&sft(function(d){var p=At(d),v=p.dataIndex;if(v!=null){var g=pt();return g.set("series_index",p.seriesIndex),g.set("data_index",v),p.ssrType&&g.set("ssr_type",p.ssrType),g}});var c=a._zr=JE(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:dt(i.useDirtyRect,l),useCoarsePointer:dt(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=dA(ut(c.flush,c),17),a._updateTheme(n),a._locale=Npt(i.locale||k6),a._coordSysMgr=new Yh;var h=a._api=XP(a);function f(d,p){return d.__prio-p.__prio}return vm(t0,f),vm(ZC,f),a._scheduler=new k8(a,h,ZC,t0),a._messageCenter=new U8,a._initEvents(),a.resize=ut(a.resize,a),c.animation.on("frame",a._onframe,a),UP(c,a),YP(c,a),Cy(a),a}return t.prototype._onframe=function(){if(!this._disposed){ZP(this);var r=this._scheduler;if(this[Dr]){var n=this[Dr].silent;this[ar]=!0,nc(this);try{cl(this),qa.update.call(this,null,this[Dr].updateParams)}catch(l){throw this[ar]=!1,this[Dr]=null,l}this._zr.flush(),this[ar]=!1,this[Dr]=null,ec.call(this,n),rc.call(this,n)}else if(r.unfinished){var i=ymt,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),Qb(this,a),r.performVisualTasks(a),cg(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(this[ar]){process.env.NODE_ENV!=="production"&&ie("`setOption` should not be called during main process.");return}if(this._disposed){Cn(this.id);return}var a,o,s;if(xt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[ar]=!0,nc(this),!this._model||n){var l=new yvt(this._api),u=this._theme,c=this._model=new uA;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},KC);var h={seriesTransition:s,optionChanged:!0};if(i)this[Dr]={silent:a,updateParams:h},this[ar]=!1,this.getZr().wakeUp();else{try{cl(this),qa.update.call(this,null,h)}catch(f){throw this[Dr]=null,this[ar]=!1,f}this._ssr||this._zr.flush(),this[Dr]=null,this[ar]=!1,ec.call(this,a),rc.call(this,a)}},t.prototype.setTheme=function(r,n){if(this[ar]){process.env.NODE_ENV!=="production"&&ie("`setTheme` should not be called during main process.");return}if(this._disposed){Cn(this.id);return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[Dr]&&(a==null&&(a=this[Dr].silent),o=this[Dr].updateParams,this[Dr]=null),this[ar]=!0,nc(this);try{this._updateTheme(r),i.setTheme(this._theme),cl(this),qa.update.call(this,{type:"setTheme"},o)}catch(s){throw this[ar]=!1,s}this[ar]=!1,ec.call(this,a),rc.call(this,a)}},t.prototype._updateTheme=function(r){lt(r)&&(r=Z8[r]),r&&(r=_t(r),r&&e8(r,!0),this._theme=r)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Qt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&Ze("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){Cn(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){Cn(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(KP[i]){var l=s,u=s,c=-s,h=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Fd,function(_,x){if(_.group===i){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(_t(r)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),h=o(S.bottom,h),f.push({dom:b,left:S.left,top:S.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,v=h-u,g=Bi.createCanvas(),m=JE(g,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:v}),n){var y="";return R(f,function(_){var x=_.left-l,b=_.top-u;y+='<g transform="translate('+x+","+b+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new Ut({shape:{x:0,y:0,width:p,height:v},style:{fill:r.connectedBackgroundColor}})),R(f,function(_){var x=new Rr({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});m.add(x)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return ug(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return ug(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return ug(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){Cn(this.id);return}var i=this._model,a,o=Wc(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?a=a||h.containPoint(n,u):process.env.NODE_ENV!=="production"&&Ne(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Ne(l+": containPoint is not supported")},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Wc(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||Ne("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?pA(s,l,n):Kp(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;R(Imt,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Fl(l,function(v){var g=At(v);if(g&&g.dataIndex!=null){var m=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=m&&m.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=et({},g.eventData),!0},!0),u){var h=u.componentType,f=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=u.seriesIndex);var d=h&&f!=null&&s.getComponent(h,f),p=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(d&&p)&&Ne("model or view can not be found by params"),u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(XC,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),Vgt(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){Cn(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){Cn(this.id);return}this._disposed=!0;var r=this.getDom();r&&NH(this.getDom(),yA,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Fd[n.id]},t.prototype.resize=function(r){if(this[ar]){process.env.NODE_ENV!=="production"&&ie("`resize` should not be called during main process.");return}if(this._disposed){Cn(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Dr]&&(a==null&&(a=this[Dr].silent),i=!0,this[Dr]=null),this[ar]=!0,nc(this);try{i&&cl(this),qa.update.call(this,{type:"resize",animation:et({duration:0},r&&r.animation)})}catch(o){throw this[ar]=!1,o}this[ar]=!1,ec.call(this,a),rc.call(this,a)}},t.prototype.showLoading=function(r,n){if(this._disposed){Cn(this.id);return}if(xt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!JC[r]){process.env.NODE_ENV!=="production"&&Ne("Loading effects "+r+" not exists.");return}var i=JC[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},t.prototype.hideLoading=function(){if(this._disposed){Cn(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=et({},r);return n.type=Qy[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){Cn(this.id);return}if(xt(n)||(n={silent:!!n}),!!Jy[r.type]&&this._model){if(this[ar]){this._pendingActions.push(r);return}var i=n.silent;t1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Qt.browser.weChat&&this._throttledZrFlush(),ec.call(this,i),rc.call(this,i)}},t.prototype.updateLabelLayout=function(){Ci.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){Cn(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&ft(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){cl=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),Jb(h,!0),Jb(h,!1),f.plan()},Jb=function(h,f){for(var d=h._model,p=h._scheduler,v=f?h._componentsViews:h._chartsViews,g=f?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<v.length;_++)v[_].__alive=!1;f?d.eachComponent(function(S,w){S!=="series"&&x(w)}):d.eachSeries(x);function x(S){var w=S.__requireNewView;S.__requireNewView=!1;var C="_ec_"+S.id+"_"+S.type,k=!w&&g[C];if(!k){var T=ma(S.type),A=f?Ee.getClass(T.main,T.sub):ye.getClass(T.sub);process.env.NODE_ENV!=="production"&&ft(A,T.sub+" does not exist."),k=new A,k.init(d,y),g[C]=k,v.push(k),m.add(k.group)}S.__viewId=k.__id=C,k.__alive=!0,k.__model=S,k.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!f&&p.prepareView(k,S,d,y)}for(var _=0;_<v.length;){var b=v[_];b.__alive?_++:(!f&&b.renderTask.dispose(),m.remove(b.group),b.dispose(d,y),v.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},lg=function(h,f,d,p,v){var g=h._model;if(g.setUpdatePayload(d),!p){R([].concat(h._componentsViews).concat(h._chartsViews),b);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=d.excludeSeriesId,x;_!=null&&(x=pt(),R(xe(_),function(S){var w=ur(S,null);w!=null&&x.set(w,!0)})),g&&g.eachComponent(y,function(S){var w=x&&x.get(S.id)!=null;if(!w)if(RI(d))if(S instanceof Ae)d.type===jl&&!d.notBlur&&!S.get(["emphasis","disabled"])&&Pdt(S,d,h._api);else{var C=Wk(S.mainType,S.componentIndex,d.name,h._api),k=C.focusSelf,T=C.dispatchers;d.type===jl&&k&&!d.notBlur&&TC(S.mainType,S.componentIndex,h._api),T&&R(T,function(A){d.type===jl?Ao(A):Do(A)})}else AC(d)&&S instanceof Ae&&(Odt(S,d,h._api),II(S),Kn(h))},h),g&&g.eachComponent(y,function(S){var w=x&&x.get(S.id)!=null;w||b(h[p==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},h);function b(S){S&&S.__alive&&S[f]&&S[f](S.__model,g,h._api,d)}},qa={prepareAndUpdate:function(h){cl(this),qa.update.call(this,h,h&&{optionChanged:h.newOption!=null})},update:function(h,f){var d=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(h),m.restoreData(d,h),m.performSeriesTasks(d),g.create(d,p),m.performDataProcessorTasks(d,h),Qb(this,d),g.update(d,p),n(d),m.performVisualTasks(d,h);var y=d.get("backgroundColor")||"transparent";v.setBackgroundColor(y);var _=d.get("darkMode");_!=null&&_!=="auto"&&v.setDarkMode(_),e1(this,d,p,h,f),Ci.trigger("afterupdate",d,p)}},updateTransform:function(h){var f=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(h);var v=[];d.eachComponent(function(m,y){if(m!=="series"){var _=f.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,d,p,h);x&&x.update&&v.push(_)}else v.push(_)}});var g=pt();d.eachSeries(function(m){var y=f._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,d,p,h);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),n(d),this._scheduler.performVisualTasks(d,h,{setDirty:!0,dirtyMap:g}),cg(this,d,p,h,{},g),Ci.trigger("afterupdate",d,p)}},updateView:function(h){var f=this._model;f&&(f.setUpdatePayload(h),ye.markUpdateMethod(h,"updateView"),n(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0}),e1(this,f,this._api,h,{}),Ci.trigger("afterupdate",f,this._api))},updateVisual:function(h){var f=this,d=this._model;d&&(d.setUpdatePayload(h),d.eachSeries(function(p){p.getData().clearAllVisual()}),ye.markUpdateMethod(h,"updateVisual"),n(d),this._scheduler.performVisualTasks(d,h,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,v){if(p!=="series"){var g=f.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,d,f._api,h)}}),d.eachSeries(function(p){var v=f._chartsMap[p.__viewId];v.updateVisual(p,d,f._api,h)}),Ci.trigger("afterupdate",d,this._api))},updateLayout:function(h){qa.update.call(this,h)}};function r(h,f,d,p,v){if(h._disposed){Cn(h.id);return}for(var g=h._model,m=h._coordSysMgr.getCoordinateSystems(),y,_=Wc(g,d),x=0;x<m.length;x++){var b=m[x];if(b[f]&&(y=b[f](g,_,p,v))!=null)return y}process.env.NODE_ENV!=="production"&&Ne("No coordinate system that supports "+f+" found by the given finder.")}ug=r,Qb=function(h,f){var d=h._chartsMap,p=h._scheduler;f.eachSeries(function(v){p.updateStreamModes(v,d[v.__viewId])})},t1=function(h,f){var d=this,p=this.getModel(),v=h.type,g=h.escapeConnect,m=Jy[v],y=(m.update||"update").split(":"),_=y.pop(),x=y[0]!=null&&ma(y[0]);this[ar]=!0,nc(this);var b=[h],S=!1;h.batch&&(S=!0,b=at(h.batch,function(P){return P=wt(et({},P),h),P.batch=null,P}));var w=[],C,k=[],T=m.nonRefinedEventType,A=AC(h),L=RI(h);if(L&&r6(this._api),R(b,function(P){var F=m.action(P,p,d._api);if(m.refineEvent?k.push(F):C=F,C=C||et({},P),C.type=T,w.push(C),L){var O=Rk(h),$=O.queryOptionMap,V=O.mainTypeSpecified,I=V?$.keys()[0]:"series";lg(d,_,P,I),Kn(d)}else A?(lg(d,_,P,"series"),Kn(d)):x&&lg(d,_,P,x.main,x.sub)}),_!=="none"&&!L&&!A&&!x)try{this[Dr]?(cl(this),qa.update.call(this,h),this[Dr]=null):qa[_].call(this,h)}catch(P){throw this[ar]=!1,P}if(S?C={type:T,escapeConnect:g,batch:w}:C=w[0],this[ar]=!1,!f){var D=void 0;if(m.refineEvent){var E=m.refineEvent(k,h,p,this._api).eventContent;ft(xt(E)),D=wt({type:m.refinedEventType},E),D.fromAction=h.type,D.fromActionPayload=h,D.escapeConnect=!0}var N=this._messageCenter;N.trigger(C.type,C),D&&N.trigger(D.type,D)}},ec=function(h){for(var f=this._pendingActions;f.length;){var d=f.shift();t1.call(this,d,h)}},rc=function(h){!h&&this.trigger("updated")},UP=function(h,f){h.on("rendered",function(d){f.trigger("rendered",d),h.animation.isFinished()&&!f[Dr]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},YP=function(h,f){h.on("mouseover",function(d){var p=d.target,v=Fl(p,Ts);v&&(Rdt(v,d,f._api),Kn(f))}).on("mouseout",function(d){var p=d.target,v=Fl(p,Ts);v&&(Ndt(v,d,f._api),Kn(f))}).on("click",function(d){var p=d.target,v=Fl(p,function(y){return At(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=At(v);f._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function n(h){h.clearColorPalette(),h.eachSeries(function(f){f.clearColorPalette()})}function i(h){var f=[],d=[],p=!1;if(h.eachComponent(function(y,_){var x=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();p=p||!!S,(y==="series"?d:f).push({zlevel:x,z:b,idx:_.componentIndex,type:y,key:S})}),p){var v=f.concat(d),g,m;vm(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),R(v,function(y){var _=h.getComponent(y.type,y.idx),x=y.zlevel,b=y.key;g!=null&&(x=Math.max(g,x)),b?(x===g&&b!==m&&x++,m=b):m&&(x===g&&x++,m=""),g=x,_.setZLevel(x)})}}e1=function(h,f,d,p,v){i(f),qP(h,f,d,p,v),R(h._chartsViews,function(g){g.__alive=!1}),cg(h,f,d,p,v),R(h._chartsViews,function(g){g.__alive||g.remove(f,d)})},qP=function(h,f,d,p,v,g){R(g||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,f,d,p),l(y,m),c(y,m)})},cg=function(h,f,d,p,v,g){var m=h._scheduler;v=et(v||{},{updatedSeries:f.getSeries()}),Ci.trigger("series:beforeupdate",f,d,v);var y=!1;f.eachSeries(function(_){var x=h._chartsMap[_.__viewId];x.__alive=!0;var b=x.renderTask;m.updatePayload(b,p),u(_,x),g&&g.get(_.uid)&&b.dirty(),b.perform(m.getPerformArgs(b))&&(y=!0),x.group.silent=!!_.get("silent"),s(_,x),II(_)}),m.unfinished=y||m.unfinished,Ci.trigger("series:layoutlabels",f,d,v),Ci.trigger("series:transition",f,d,v),f.eachSeries(function(_){var x=h._chartsMap[_.__viewId];l(_,x),c(_,x)}),o(h,f),Ci.trigger("series:afterupdate",f,d,v)},Kn=function(h){h[Zb]=!0,h.getZr().wakeUp()},nc=function(h){h[sg]=(h[sg]+1)%1e3},ZP=function(h){h[Zb]&&(h.getZr().storage.traverse(function(f){Hc(f)||a(f)}),h[Zb]=!1)};function a(h){for(var f=[],d=h.currentStates,p=0;p<d.length;p++){var v=d[p];v==="emphasis"||v==="blur"||v==="select"||f.push(v)}h.selected&&h.states.select&&f.push("select"),h.hoverState===O_&&h.states.emphasis?f.push("emphasis"):h.hoverState===Hp&&h.states.blur&&f.push("blur"),h.useStates(f)}function o(h,f){var d=h._zr,p=d.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>f.get("hoverLayerThreshold")&&!Qt.node&&!Qt.worker&&f.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function l(h,f){if(!h.preventAutoZ){var d=pu(h);f.eachRendered(function(p){return G_(p,d.z,d.zlevel),!0})}}function u(h,f){f.eachRendered(function(d){if(!Hc(d)){var p=d.getTextContent(),v=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),v=d.get("duration"),g=v>0?{duration:v,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Hc(m))return;if(m instanceof Kt&&Gdt(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}m.__dirty&&a(m)}})}XP=function(h){return new(function(f){q(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return h._model.getComponent(v.mainType,v.index);p=p.parent}},d.prototype.enterEmphasis=function(p,v){Ao(p,v),Kn(h)},d.prototype.leaveEmphasis=function(p,v){Do(p,v),Kn(h)},d.prototype.enterBlur=function(p){JH(p),Kn(h)},d.prototype.leaveBlur=function(p){Gk(p),Kn(h)},d.prototype.enterSelect=function(p){QH(p),Kn(h)},d.prototype.leaveSelect=function(p){t6(p),Kn(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d.prototype.getMainProcessVersion=function(){return h[sg]},d}(Q6))(h)},q8=function(h){function f(d,p){for(var v=0;v<d.length;v++){var g=d[v];g[Kb]=p}}R(Qy,function(d,p){h._messageCenter.on(p,function(v){if(KP[h.group]&&h[Kb]!==jP){if(v&&v.escapeConnect)return;var g=h.makeActionFromEvent(v),m=[];R(Fd,function(y){y!==h&&y.group===h.group&&m.push(y)}),f(m,jP),R(m,function(y){y[Kb]!==Mmt&&y.dispatchAction(g)}),f(m,Emt)}})})}}(),t}(yi),mA=X8.prototype;mA.on=W8("on");mA.off=W8("off");mA.one=function(e,t,r){var n=this;Ea("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(e,i)}this.on.call(this,e,i,r)};var Imt=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Cn(e){process.env.NODE_ENV!=="production"&&Ne("Instance "+e+" has been disposed")}var Jy={},Qy={},XC={},ZC=[],KC=[],t0=[],Z8={},JC={},Fd={},KP={},Pmt=+new Date-0,yA="_echarts_instance_";function Rmt(e,t,r){{if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Initialize failed: invalid dom.");var n=Nmt(e);if(n)return process.env.NODE_ENV!=="production"&&Ne("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&lu(e)&&e.nodeName.toUpperCase()!=="CANVAS"&&(!e.clientWidth&&!r||!e.clientHeight&&!r)&&Ne("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new X8(e,t,r);return i.id="ec_"+Pmt++,Fd[i.id]=i,NH(e,yA,i.id),q8(i),Ci.trigger("afterinit",i),i}function Nmt(e){return Fd[Lft(e,yA)]}function K8(e,t){Z8[e]=t}function J8(e){$t(KC,e)<0&&KC.push(e)}function Q8(e,t){xA(ZC,e,t,Smt)}function Omt(e){_A("afterinit",e)}function Bmt(e){_A("afterupdate",e)}function _A(e,t){Ci.on(e,t)}function Fa(e,t,r){var n,i,a,o,s;mt(t)&&(r=t,t=""),xt(e)?(n=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,r||(r=e.action),a=e.refineEvent):(n=e,i=t);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;Jy[n]||(ft(HP.test(n)&&HP.test(i)),a&&ft(i!==n),Jy[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},XC[i]=1,a&&s&&(XC[u]=1),process.env.NODE_ENV!=="production"&&Qy[u]&&ie(u+' must not be shared; use "refineEvent" if you intend to share an event name.'),Qy[u]=n)}function Fmt(e,t){Yh.register(e,t)}function $mt(e,t){xA(t0,e,t,V8,"layout")}function Eu(e,t){xA(t0,e,t,z8,"visual")}var JP=[];function xA(e,t,r,n,i){if((mt(t)||xt(t))&&(r=t,t=n),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");R(e,function(o){ft(o.__raw!==r)})}if(!($t(JP,r)>=0)){JP.push(r);var a=k8.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function tj(e,t){JC[e]=t}function Vmt(e,t,r){var n=vmt("registerMap");n&&n(e,t,r)}var zmt=Kvt;Eu(gA,wgt);Eu(X_,Cgt);Eu(X_,Tgt);Eu(gA,Fgt);Eu(X_,$gt);Eu(G8,dmt);J8(e8);Q8(xmt,Mvt);tj("default",kgt);Fa({type:jl,event:jl,update:jl},Ye);Fa({type:_m,event:_m,update:_m},Ye);Fa({type:By,event:Vk,update:By,action:Ye,refineEvent:bA,publishNonRefinedEvent:!0});Fa({type:wC,event:Vk,update:wC,action:Ye,refineEvent:bA,publishNonRefinedEvent:!0});Fa({type:Fy,event:Vk,update:Fy,action:Ye,refineEvent:bA,publishNonRefinedEvent:!0});function bA(e,t,r,n){return{eventContent:{selected:Bdt(r),isFromClick:t.isFromClick||!1}}}K8("default",{});K8("dark",M8);var QP=[],Gmt={registerPreprocessor:J8,registerProcessor:Q8,registerPostInit:Omt,registerPostUpdate:Bmt,registerUpdateLifecycle:_A,registerAction:Fa,registerCoordinateSystem:Fmt,registerLayout:$mt,registerVisual:Eu,registerTransform:zmt,registerLoading:tj,registerMap:Vmt,registerImpl:pmt,PRIORITY:Lmt,ComponentModel:Zt,ComponentView:Ee,SeriesModel:Ae,ChartView:ye,registerComponentModel:function(e){Zt.registerClass(e)},registerComponentView:function(e){Ee.registerClass(e)},registerSeriesModel:function(e){Ae.registerClass(e)},registerChartView:function(e){ye.registerClass(e)},registerCustomSeries:function(e,t){gmt(e,t)},registerSubTypeDefaulter:function(e,t){Zt.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){aft(e,t)}};function Gt(e){if(nt(e)){R(e,function(t){Gt(t)});return}$t(QP,e)>=0||(QP.push(e),mt(e)&&(e={install:e}),e.install(Gmt))}function If(e){return e==null?0:e.length||1}function tR(e){return e}var Lo=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||tR,this._newKeyGetter=i||tR,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=If(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],h=If(u),f=If(c);if(h>1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var i=t[n],a=r[i],o=If(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},e.prototype._initIndexMap=function(t,r,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=If(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},e}(),Wmt=function(){function e(t,r){this._encode=t,this._schema=r}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function Hmt(e,t){var r={},n=r.encode={},i=pt(),a=[],o=[],s={};R(e.dimensions,function(f){var d=e.getDimensionInfo(f),p=d.coordDim;if(p){process.env.NODE_ENV!=="production"&&ft(FC.get(p)==null);var v=d.coordDimIndex;r1(n,p)[v]=f,d.isExtraCoord||(i.set(p,1),jmt(d.type)&&(a[0]=f),r1(s,p)[v]=e.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(f)}FC.each(function(g,m){var y=r1(n,m),_=d.otherDims[m];_!=null&&_!==!1&&(y[_]=d.name)})});var l=[],u={};i.each(function(f,d){var p=n[d];u[d]=p[0],l=l.concat(p)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=at(l,function(f){return e.getDimensionInfo(f).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new Wmt(s,t),r}function r1(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function e0(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function jmt(e){return!(e==="ordinal"||e==="time")}var km=function(){function e(t){this.otherDims={},t!=null&&et(this,t)}return e}(),Umt=qt(),Ymt={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},ej=function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=ij(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return dt(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var r=this.source.dimensionsDefine;if(r)return r[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,r=n8(this.source),n=!aj(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=r?h.name:null,u=h.type,c=h.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=r?f.name:null,u=f.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=Ymt[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function rj(e){return e instanceof ej}function nj(e){for(var t=pt(),r=0;r<(e||[]).length;r++){var n=e[r],i=xt(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function ij(e){var t=Umt(e);return t.dimNameMap||(t.dimNameMap=nj(e.dimensionsDefine))}function aj(e){return e>30}var Pf=xt,Ho=at,qmt=typeof Int32Array>"u"?Array:Int32Array,Xmt="e\0\0",eR=-1,Zmt=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Kmt=["_approximateExtent"],rR,hg,Rf,ic,n1,Nf,i1,pn=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;rj(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var h=n[c],f=lt(h)?new km({name:h}):h instanceof km?h:new km(h),d=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=d,f.coordDimIndex=0);var p=f.otherDims=f.otherDims||{};o.push(d),a[d]=f,u[d]!=null&&(l=!0),f.createInvertedIndices&&(s[d]=[]);var v=c;ae(f.storeDimIndex)&&(v=f.storeDimIndex),p.itemName===0&&(this._nameDimIdx=v),p.itemId===0&&(this._idDimIdx=v),process.env.NODE_ENV!=="production"&&ft(i||f.storeDimIndex>=0),i&&(f.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=pt();R(o,function(m){g.set(a[m].storeDimIndex,m)})}}return e.prototype.getDimension=function(t){var r=this._recognizeDimIndex(t);if(r==null)return t;if(r=t,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},e.prototype.getDimensionIndex=function(t){var r=this._recognizeDimIndex(t);if(r!=null)return r;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(ae(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var r=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+t);return r},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var r=this._dimInfos;this._getDimInfo=t?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[r]:null},e.prototype.mapDimensionsAll=function(t){var r=this._dimSummary,n=r.encode[t];return(n||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,r,n){var i=this,a;if(t instanceof GC&&(a=t),!a){var o=this.dimensions,s=cA(t)||Kr(t)?new i8(t,o.length):t;a=new GC;var l=Ho(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Hmt(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var r=this._store.appendData(t);this._doInit(r[0],r[1])},e.prototype.appendValues=function(t,r){var n=this._store.appendValues(t,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&i1(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==mo&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Un;if(l&&!i.pure)for(var u=[],c=t;c<r;c++){var h=i.getItem(c,u);if(!this.hasItemOption&&gft(h)&&(this.hasItemOption=!0),h){var f=h.name;a[c]==null&&f!=null&&(a[c]=ur(f,null));var d=h.id;o[c]==null&&d!=null&&(o[c]=ur(d,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<r;c++)i1(this,c);rR(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,r){r=this.getDimension(r),this._approximateExtent[r]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,r){Pf(t)?et(this._calculationInfo,t):this._calculationInfo[t]=r},e.prototype.getName=function(t){var r=this.getRawIndex(t),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=Rf(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return hg(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,r){var n=this,i=this._store;return nt(t)?i.getValues(Ho(t,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===t)return r;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,r){var n=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[r];return i==null||isNaN(i)?eR:i},e.prototype.each=function(t,r,n){mt(t)&&(n=r,r=t,t=[]);var i=n||this,a=Ho(ic(t),this._getStoreDimIndex,this);this._store.each(a,i?ut(r,i):r)},e.prototype.filterSelf=function(t,r,n){mt(t)&&(n=r,r=t,t=[]);var i=n||this,a=Ho(ic(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ut(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=te(t);return R(i,function(a){var o=r._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){mt(t)&&(n=r,r=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(r&&r.apply(this,arguments))},n),i},e.prototype.map=function(t,r,n,i){var a=n||i||this,o=Ho(ic(t),this._getStoreDimIndex,this),s=Nf(this);return s._store=this._store.map(o,a?ut(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&R(ic(t),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Ho(ic(t),this._getStoreDimIndex,this);this._store.modify(s,o?ut(r,o):r)},e.prototype.downSample=function(t,r,n,i){var a=Nf(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=Nf(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=Nf(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),r),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var r=this.hostModel,n=this.getRawDataItem(t);return new ne(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new Lo(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return hg(t,n)},function(n){return hg(r,n)})},e.prototype.getVisual=function(t){var r=this._visual;return r&&r[t]},e.prototype.setVisual=function(t,r){this._visual=this._visual||{},Pf(t)?et(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],i=n&&n[r];return i??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),nt(a)?a=a.slice():Pf(a)&&(a=et({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Pf(r)?et(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){Pf(t)?et(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?et(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;SC(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){R(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Ho(this.dimensions,this._getDimInfo,this),this.hostModel)),n1(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];mt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(Tk(arguments)))})},e.internalField=function(){rR=function(t){var r=t._invertedIndicesMap;R(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new qmt(o.categories.length);for(var l=0;l<n.length;l++)n[l]=eR;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Rf=function(t,r,n){return ur(t._getCategory(r,n),null)},hg=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=Rf(t,t._idDimIdx,r)),n==null&&(n=Xmt+r),n},ic=function(t){return nt(t)||(t=t!=null?[t]:[]),t},Nf=function(t){var r=new e(t._schema?t._schema:Ho(t.dimensions,t._getDimInfo,t),t.hostModel);return n1(r,t),r},n1=function(t,r){R(Zmt.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,R(Kmt,function(n){t[n]=_t(r[n])}),t._calculationInfo=et({},r._calculationInfo)},i1=function(t,r){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=Rf(t,a,r)),l==null&&o!=null&&(i[r]=l=Rf(t,o,r)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function Jp(e,t){cA(e)||(e=hA(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=pt(),a=[],o=Qmt(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&aj(o),l=n===e.dimensionsDefine,u=l?ij(e):nj(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var h=pt(c),f=new f8(o),d=0;d<f.length;d++)f[d]=-1;function p(k){var T=f[k];if(T<0){var A=n[k],L=xt(A)?A:{name:A},D=new km,E=L.name;E!=null&&u.get(E)!=null&&(D.name=D.displayName=E),L.type!=null&&(D.type=L.type),L.displayName!=null&&(D.displayName=L.displayName);var N=a.length;return f[k]=N,D.storeDimIndex=k,a.push(D),D}return a[T]}if(!s)for(var d=0;d<o;d++)p(d);h.each(function(k,T){var A=xe(k).slice();if(A.length===1&&!lt(A[0])&&A[0]<0){h.set(T,!1);return}var L=h.set(T,[]);R(A,function(D,E){var N=lt(D)?u.get(D):D;N!=null&&N<o&&(L[E]=N,g(p(N),T,E))})});var v=0;R(r,function(k){var T,A,L,D;if(lt(k))T=k,D={};else{D=k,T=D.name;var E=D.ordinalMeta;D.ordinalMeta=null,D=et({},D),D.ordinalMeta=E,A=D.dimsDef,L=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var N=h.get(T);if(N!==!1){if(N=xe(N),!N.length)for(var P=0;P<(A&&A.length||1);P++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&N.push(v++)}R(N,function(F,O){var $=p(F);if(l&&D.type!=null&&($.type=D.type),g(wt($,D),T,O),$.name==null&&A){var V=A[O];!xt(V)&&(V={name:V}),$.name=$.displayName=V.name,$.defaultTooltip=V.defaultTooltip}L&&wt($.otherDims,L)})}});function g(k,T,A){FC.get(T)!=null?k.otherDims[T]=A:(k.coordDim=T,k.coordDimIndex=A,i.set(T,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var x=m||"value";function b(k){k.name==null&&(k.name=k.coordDim)}if(s)R(a,function(k){b(k)}),a.sort(function(k,T){return k.storeDimIndex-T.storeDimIndex});else for(var S=0;S<o;S++){var w=p(S),C=w.coordDim;C==null&&(w.coordDim=tyt(x,i,_),w.coordDimIndex=0,(!m||y<=0)&&(w.isExtraCoord=!0),y--),b(w),w.type==null&&(Z6(e,S)===$r.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return Jmt(a),new ej({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Jmt(e){for(var t=pt(),r=0;r<e.length;r++){var n=e[r],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function Qmt(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return R(t,function(a){var o;xt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function tyt(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var eyt=function(){function e(t){this.coordSysDims=[],this.axisMap=pt(),this.categoryAxisMap=pt(),this.coordSysName=t}return e}();function ryt(e){var t=e.get("coordinateSystem"),r=new eyt(t),n=nyt[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var nyt={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",Ge).models[0],a=e.getReferringComponents("yAxis",Ge).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+lr(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+lr(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),ac(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),ac(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",Ge).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],r.set("single",i),ac(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",Ge).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),ac(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),ac(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),ac(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",Ge).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("matrix coordinate system should be specified.");t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function ac(e){return e.get("type")==="category"}function iyt(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;ayt(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,h,f;if(R(a,function(y,_){lt(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+e.id,f="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,v=0;R(a,function(y){y.coordDim===d&&v++});var g={name:h,coordDim:d,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:f,coordDim:f,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,p),m.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function ayt(e){return!rj(e.schema)}function As(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function oj(e,t){return As(e,t)?e.getCalculationInfo("stackResultDimension"):t}function oyt(e,t){var r=e.get("coordinateSystem"),n=Yh.get(r),i;return t&&t.coordSysDims&&(i=at(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=e0(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function syt(e,t,r){var n,i;return r&&R(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function $o(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=hA(e)):(i=n.getSource(),a=i.sourceFormat===Un);var o=ryt(t),s=oyt(t,o),l=r.useEncodeDefaulter,u=mt(l)?l:l?Bt(X6,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Jp(i,c),f=syt(h.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=iyt(t,{schema:h,store:d}),v=new pn(h,t);v.setCalculationInfo(p);var g=f!=null&&lyt(i)?function(m,y,_,x){return x===f?_:this.defaultDimValueGetter(m,y,_,x)}:null;return v.hasItemOption=!1,v.initData(a?i:d,null,g),v}function lyt(e){if(e.sourceFormat===Un){var t=uyt(e.data||[]);return!nt(Vh(t))}}function uyt(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function cyt(e){var t=Math.pow(10,D_(Math.abs(e))),r=Math.abs(e/t);return r===0||r===1||r===2||r===3||r===5}function QC(e){return e.type==="interval"||e.type==="log"}function hyt(e,t,r,n,i){var a={},o=a.interval=AH(t/r);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=yp(o),l=a.niceTickExtent=[Je(Math.ceil(e[0]/o)*o,s),Je(Math.floor(e[1]/o)*o,s)];return fyt(l,e),a}function a1(e){var t=Math.pow(10,D_(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Je(r*t)}function yp(e){return ga(e)+2}function nR(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function fyt(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),nR(e,0,t),nR(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function SA(e,t){return e>=t[0]&&e<=t[1]}var dyt=function(){function e(){this.normalize=iR,this.scale=aR}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=ut(t.normalize,t),this.scale=ut(t.scale,t)):(this.normalize=iR,this.scale=aR)},e}();function iR(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function aR(e,t){return e*(t[1]-t[0])+t[0]}function tT(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var $s=function(){function e(t){this._calculator=new dyt,this._setting=t||{},this._extent=[1/0,-1/0];var r=tr();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]<r[0]?t[0]:r[0],t[1]>r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){var r=tr();r&&this._innerSetBreak(r.parseAxisBreakOption(t,ut(this.parse,this)))},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();M_($s);var pyt=0,_p=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++pyt,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&at(n,vyt);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!lt(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=pt(this.categories))},e}();function vyt(e){return xt(e)&&e.value!=null?e.value:e+""}var _h=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new _p({})),nt(i)&&(i=new _p({categories:at(i,function(a){return xt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:lt(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return SA(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},t.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},t.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}($s);$s.registerClass(_h);var jo=Je,Mo=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return SA(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=yp(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=tr(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:jo(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(p,v){return Math.round((v-p)/n)},h=a[0];h<=a[1];){if(l.push({value:h}),h=jo(h+n,o),this._brkCtx){var f=this._brkCtx.calcNiceTickMultiple(h,c);f>=0&&(h=jo(h+f*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:jo(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],h=s.value-l.value,f=h/r,d=yp(f);u<r-1;){var p=jo(l.value+(u+1)*f,d);p>a[0]&&p<a[1]&&c.push(p),u++}var v=tr();v&&v.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(g){return g},this._interval,a),i.push(c)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=ga(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=jo(r.value,i,!0);return N6(a)},t.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=hyt(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=jo(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=jo(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},t.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},t.type="interval",t}($s);$s.registerClass(Mo);var sj=typeof Float32Array<"u",gyt=sj?Float32Array:Array;function ya(e){return nt(e)?sj?new Float32Array(e):e:new gyt(e)}var eT="__ec_stack_";function lj(e){return e.get("stack")||eT+e.seriesIndex}function wA(e){return e.dim+e.index}function myt(e){var t=[],r=e.axis,n="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),a=0;a<e.count;a++)t.push(wt({bandWidth:i,axisKey:n,stackId:eT+a},e));for(var o=hj(t),s=[],a=0;a<e.count;a++){var l=o[n][eT+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function uj(e,t){var r=[];return t.eachSeriesByType(e,function(n){pj(n)&&r.push(n)}),r}function yyt(e){var t={};R(e,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),f=c.dim+"_"+c.index,d=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(d,v);t[f]?t[f].push(m):t[f]=[m]}});var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function cj(e){var t=yyt(e),r=[];return R(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=st(n.get("barWidth"),s),v=st(n.get("barMaxWidth"),s),g=st(n.get("barMinWidth")||(vj(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,defaultBarGap:_,axisKey:wA(a),stackId:lj(n)})}),hj(r)}function hj(e){var t={};R(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=te(a).length;s=Math.max(35-l*4,15)+"%"}var u=st(s,o),c=st(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),R(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var x=m.width;y&&(x=Math.min(x,y)),_&&(x=Math.max(x,_)),m.width=x,h-=x+c*x,f--}else{var x=d;y&&y<x&&(x=Math.min(y,h)),_&&_>x&&(x=_),x!==d&&(m.width=x,h-=x+c*x,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,v;R(a,function(m,y){m.width||(m.width=d),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;R(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function _yt(e,t,r){if(e&&t){var n=e[wA(t)];return n}}function fj(e,t){var r=uj(e,t),n=cj(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=lj(i),u=n[wA(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function dj(e){return{seriesType:e,plan:qh(),reset:function(t){if(pj(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),h=As(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=xyt(i,a),p=vj(t),v=t.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=p&&ya(b*3),w=p&&l&&ya(b*3),C=p&&ya(b),k=n.master.getRect(),T=f?k.width:k.height,A,L=x.getStore(),D=0;(A=_.next())!=null;){var E=L.get(h?g:o,A),N=L.get(s,A),P=d,F=void 0;h&&(F=+E-L.get(o,A));var O=void 0,$=void 0,V=void 0,I=void 0;if(f){var B=n.dataToPoint([E,N]);if(h){var G=n.dataToPoint([F,N]);P=G[0]}O=P,$=B[1]+y,V=B[0]-P,I=m,Math.abs(V)<v&&(V=(V<0?-1:1)*v)}else{var B=n.dataToPoint([N,E]);if(h){var G=n.dataToPoint([N,F]);P=G[1]}O=B[0]+y,$=P,V=m,I=B[1]-P,Math.abs(I)<v&&(I=(I<=0?-1:1)*v)}p?(S[D]=O,S[D+1]=$,S[D+2]=f?V:I,w&&(w[D]=f?k.x:O,w[D+1]=f?$:k.y,w[D+2]=T),C[A]=A):x.setItemLayout(A,{x:O,y:$,width:V,height:I}),D+=3}p&&x.setLayout({largePoints:S,largeDataIndices:C,largeBackgroundPoints:w,valueAxisHorizontal:f})}}}}}}function pj(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function vj(e){return e.pipelineContext&&e.pipelineContext.large}function xyt(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?r>0?r:1:r))}var byt=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},CA=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="time",n}return t.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return H_(r.value,XI[Hpt(Od(this._minLevelUnit))]||XI.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return jpt(r,n,i,o,a)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=tr(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(a&&r.breakTicks==="only_break")return tr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=Nc(i[1],s);o.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=Dyt(this._minLevelUnit,this._approxInterval,s,i,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=Nc(i[1],s);o.push({value:i[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var h=this.getSetting("useUTC"),f=Fn.length-1,d=0;return R(o,function(p){f=Math.min(f,$t(Fn,p.time.upperTimeUnit)),d=Math.max(d,p.time.level)}),a&&tr().pruneTicksByBreak(r.pruneByBreak,o,this._brkCtx.breaks,function(p){return p.value},this._approxInterval,this._extent),a&&r.breakTicks!=="none"&&tr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(p){for(var v=Math.max($t(Fn,Nc(p.vmin,h)),$t(Fn,Nc(p.vmax,h))),g=0,m=0;m<Fn.length;m++)if(!gj(Fn[m],p.vmin,p.vmax,h)){g=m;break}var y=Math.min(g,f),_=Math.max(y,v);return{level:d,lowerTimeUnit:Fn[_],upperTimeUnit:Fn[y]}}),o},t.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=ui,n[1]+=ui),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-ui}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},t.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=fg.length,s=Math.min(byt(fg,this._approxInterval,0,o),o-1);this._interval=fg[s][1],this._intervalPrecision=yp(this._interval),this._minLevelUnit=fg[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return ae(r)?r:+ku(r)},t.prototype.contain=function(r){return SA(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(Mo),fg=[["second",Kk],["minute",Jk],["hour",Nd],["quarter-day",Nd*6],["half-day",Nd*12],["day",ui*1.2],["half-week",ui*3.5],["week",ui*7],["month",ui*31],["quarter",ui*95],["half-year",qI/2],["year",qI]];function gj(e,t,r,n){return RC(new Date(t),e,n).getTime()===RC(new Date(r),e,n).getTime()}function Syt(e,t){return e/=ui,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function wyt(e){var t=30*ui;return e/=t,e>6?6:e>3?3:e>2?2:1}function Cyt(e){return e/=Nd,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function oR(e,t){return e/=t?Jk:Kk,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Tyt(e){return AH(e)}function kyt(e,t,r){var n=Math.max(0,$t(Fn,t)-1);return RC(new Date(e),Fn[n],r).getTime()}function Ayt(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Dyt(e,t,r,n,i,a){var o=1e4,s=Vpt,l=0;function u(D,E,N,P,F,O,$){for(var V=Ayt(F,D),I=E,B=new Date(I);I<N&&I<=n[1];){if($.push({value:I}),l++>o){process.env.NODE_ENV!=="production"&&Ne("Exceed safe limit in time scale.");break}if(B[F](B[P]()+D),I=B.getTime(),a){var G=a.calcNiceTickMultiple(I,V);G>0&&(B[F](B[P]()+G*D),I=B.getTime())}}$.push({value:I,notAdd:!0})}function c(D,E,N){var P=[],F=!E.length;if(!gj(Od(D),n[0],n[1],r)){F&&(E=[{value:kyt(n[0],D,r)},{value:n[1]}]);for(var O=0;O<E.length-1;O++){var $=E[O].value,V=E[O+1].value;if($!==V){var I=void 0,B=void 0,G=void 0,H=!1;switch(D){case"year":I=Math.max(1,Math.round(t/ui/365)),B=D6(r),G=Upt(r);break;case"half-year":case"quarter":case"month":I=wyt(t),B=Qk(r),G=L6(r);break;case"week":case"half-week":case"day":I=Syt(t),B=tA(r),G=M6(r),H=!0;break;case"half-day":case"quarter-day":case"hour":I=Cyt(t),B=eA(r),G=E6(r);break;case"minute":I=oR(t,!0),B=rA(r),G=I6(r);break;case"second":I=oR(t,!1),B=nA(r),G=P6(r);break;case"millisecond":I=Tyt(t),B=iA(r),G=R6(r);break}V>=n[0]&&$<=n[1]&&u(I,$,V,B,G,H,P),D==="year"&&N.length>1&&O===0&&N.unshift({value:N[0].value-I})}}for(var O=0;O<P.length;O++)N.push(P[O])}}for(var h=[],f=[],d=0,p=0,v=0;v<s.length;++v){var g=Od(s[v]);if(Wpt(s[v])){c(s[v],h[h.length-1]||[],f);var m=s[v+1]?Od(s[v+1]):null;if(g!==m){if(f.length){p=d,f.sort(function(D,E){return D.value-E.value});for(var y=[],_=0;_<f.length;++_){var x=f[_].value;(_===0||f[_-1].value!==x)&&(y.push(f[_]),x>=n[0]&&x<=n[1]&&d++)}var b=i/t;if(d>b*1.5&&p>b/1.5||(h.push(y),d>b||e===s[v]))break}f=[]}}}for(var S=de(at(h,function(D){return de(D,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(D){return D.length>0}),w=[],C=S.length-1,v=0;v<S.length;++v)for(var k=S[v],T=0;T<k.length;++T){var A=Nc(k[T].value,r);w.push({value:k[T].value,time:{level:C-v,upperTimeUnit:A,lowerTimeUnit:A}})}w.sort(function(D,E){return D.value-E.value});for(var L=[],v=0;v<w.length;++v)(v===0||w[v].value!==w[v-1].value)&&L.push(w[v]);return L}$s.registerClass(CA);var rT=Je,Lyt=Math.floor,Myt=Math.ceil,dg=Math.pow,pg=Math.log,mj=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new Mo,r}return t.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=e.prototype.getTicks.call(this,r),o=this.base,s=this._originalScale._innerGetBreaks(),l=tr();return at(a,function(u){var c=u.value,h=null,f=dg(o,c);c===n[0]&&this._fixMin?h=i[0]:c===n[1]&&this._fixMax&&(h=i[1]);var d;if(l){var p=l.getTicksLogTransformBreak(u,o,s,vg);d=p.vBreak,h==null&&(h=p.brkRoundingCriterion)}return h!=null&&(f=vg(f,h)),{value:f,break:d}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=tT(this.base,[r,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var r=this.base,n=e.prototype.getExtent.call(this);n[0]=dg(r,n[0]),n[1]=dg(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=vg(n[0],i[0])),this._fixMax&&(n[1]=vg(n[1],i[1])),n},t.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=tT(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=dft(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[rT(Myt(n[0]/a)*a),rT(Lyt(n[1]/a)*a)];this._interval=a,this._intervalPrecision=yp(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=pg(r)/pg(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=pg(r)/pg(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),dg(this.base,r)},t.prototype.setBreaksFromOption=function(r){var n=tr();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,ut(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},t.type="log",t}(Mo);function vg(e,t){return rT(e,ga(t))}$s.registerClass(mj);var Eyt=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;mt(o)?this._modelMinNum=gg(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=gg(t,o));var s=this._modelMaxRaw=r.get("max",!0);if(mt(s)?this._modelMaxNum=gg(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=gg(t,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=nt(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[$i(u[0],1),$i(u[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:r-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Er(s)||Er(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},e.prototype.modifyDataMinMax=function(t,r){process.env.NODE_ENV!=="production"&&ft(!this.frozen),this[Pyt[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=Iyt[t];process.env.NODE_ENV!=="production"&&ft(!this.frozen&&this[n]==null),this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),Iyt={min:"_determinedMin",max:"_determinedMax"},Pyt={min:"_dataMin",max:"_dataMax"};function yj(e,t,r){var n=e.rawExtentInfo;return n||(n=new Eyt(e,t,r),e.rawExtentInfo=n,n)}function gg(e,t){return t==null?null:Er(t)?NaN:e.parse(t)}function _j(e,t){var r=e.type,n=yj(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=uj("bar",o),l=!1;if(R(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=cj(s),c=Ryt(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Ryt(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=_yt(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;R(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;R(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=1-(s+l)/a,f=c/h-c;return t+=f*(l/u),e-=f*(s/u),{min:e,max:t}}function xh(e,t){var r=t,n=_j(e,r),i=n.extent,a=r.get("splitNumber");e instanceof mj&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(bj(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function Z_(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new _h({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new CA({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new($s.getClass(t)||Mo)}}function Nyt(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Kh(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=zpt(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(lt(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(mt(t)){if(e.type==="category")return function(i,a){return t(r0(e,i),i.value-e.scale.getExtent()[0],null)};var n=tr();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(r0(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function r0(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function TA(e){var t=e.get("interval");return t??"auto"}function xj(e){return e.type==="category"&&TA(e.getLabelModel())===0}function n0(e,t){var r={};return R(e.mapDimensionsAll(t),function(n){r[oj(e,n)]=!0}),te(r)}function Oyt(e,t,r){t&&R(n0(t,r),function(n){var i=t.getApproximateExtent(n);i[0]<e[0]&&(e[0]=i[0]),i[1]>e[1]&&(e[1]=i[1])})}function bh(e){return e==="middle"||e==="center"}function xp(e){return e.getShallow("show")}function bj(e){var t=e.get("breaks",!0);if(t!=null){if(!tr()){process.env.NODE_ENV!=="production"&&ie('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}if(!Byt(e.axis)){process.env.NODE_ENV!=="production"&&ie("Axis '"+e.axis.dim+"'-'"+e.axis.type+"' does not support break.");return}return t}}function Byt(e){return(e.dim==="x"||e.dim==="y"||e.dim==="z"||e.dim==="single")&&e.type!=="category"}var Qp=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}(),Fyt=1e-8;function sR(e,t){return Math.abs(e-t)<Fyt}function Tl(e,t,r){var n=0,i=e[0];if(!i)return!1;for(var a=1;a<e.length;a++){var o=e[a];n+=io(i[0],i[1],o[0],o[1],t,r),i=o}var s=e[0];return(!sR(i[0],s[0])||!sR(i[1],s[1]))&&(n+=io(i[0],i[1],s[0],s[1],t,r)),n!==0}var $yt=[];function o1(e,t){for(var r=0;r<e.length;r++)qe(e[r],e[r],t)}function lR(e,t,r,n){for(var i=0;i<e.length;i++){var a=e[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(is(t,t,a),as(r,r,a))}}function Vyt(e){for(var t=0,r=0,n=0,i=e.length,a=e[i-1][0],o=e[i-1][1],s=0;s<i;s++){var l=e[s][0],u=e[s][1],c=a*u-l*o;t+=c,r+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return t?[r/t/3,n/t/3,t]:[e[0][0]||0,e[0][1]||0]}var Sj=function(){function e(t){this.name=t}return e.prototype.setCenter=function(t){this._center=t},e.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},e}(),uR=function(){function e(t,r){this.type="polygon",this.exterior=t,this.interiors=r}return e}(),cR=function(){function e(t){this.type="linestring",this.points=t}return e}(),wj=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return t.prototype.calcCenter=function(){for(var r=this.geometries,n,i=0,a=0;a<r.length;a++){var o=r[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return Vyt(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return R(o,function(s){s.type==="polygon"?lR(s.exterior,i,a,r):R(s.points,function(l){lR(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ct(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;t:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Tl(l,r[0],r[1])){for(var c=0;c<(u?u.length:0);c++)if(Tl(u[c],r[0],r[1]))continue t;return!0}}}return!1},t.prototype.transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new Ct(r,n,i,a),u=o.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var f=c[h];f.type==="polygon"?(o1(f.exterior,u),R(f.interiors,function(d){o1(d,u)})):R(f.points,function(d){o1(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(r){r==null&&(r=this.name);var n=new t(r,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(Sj),zyt=function(e){q(t,e);function t(r,n){var i=e.call(this,r)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return t.prototype.calcCenter=function(){for(var r=this._elOnlyForCalculate,n=r.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=w_($yt),o=r;o&&!o.isGeoSVGGraphicRoot;)Sa(a,o.getLocalTransform(),a),o=o.parent;return Fi(a,a),qe(i,i,a),i},t}(Sj);function Gyt(e){if(!e.UTF8Encoding)return e;var t=e,r=t.UTF8Scale;r==null&&(r=1024);var n=t.features;return R(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=Cj(s,o,r);break;case"Polygon":s1(s,o,r);break;case"MultiLineString":s1(s,o,r);break;case"MultiPolygon":R(s,function(l,u){return s1(l,o[u],r)})}}),t.UTF8Encoding=!1,t}function s1(e,t,r){for(var n=0;n<e.length;n++)e[n]=Cj(e[n],t[n],r)}function Cj(e,t,r){for(var n=[],i=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function Wyt(e,t){return e=Gyt(e),at(de(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new uR(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new uR(l[0],l.slice(1)))});break;case"LineString":a.push(new cR([i.coordinates]));break;case"MultiLineString":a.push(new cR(i.coordinates))}var s=new wj(n[t||"name"],a,n.cp);return s.properties=n,s})}var Hyt=qt(),$d=qt(),Vi={estimate:1,determine:2};function i0(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function Tj(e,t){var r=at(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function jyt(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Kh(e),i=e.scale.getExtent(),a=Tj(e,r),o=de(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:at(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?Yyt(e,t):Xyt(e)}function Uyt(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=Tj(e,n);return{ticks:de(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?qyt(e,t):{ticks:at(e.scale.getTicks(r),function(o){return o.value})}}function Yyt(e,t){var r=e.getLabelModel(),n=kj(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function kj(e,t,r){var n=Kyt(e),i=TA(t),a=r.kind===Vi.estimate;if(!a){var o=Dj(n,i);if(o)return o}var s,l;mt(i)?s=Ej(e,i):(l=i==="auto"?Jyt(e,r):i,s=Mj(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return nT(n,i,u),!0}):nT(n,i,u),u}function qyt(e,t){var r=Zyt(e),n=TA(t),i=Dj(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),mt(n))a=Ej(e,n,!0);else if(n==="auto"){var s=kj(e,e.getLabelModel(),i0(Vi.determine));o=s.labelCategoryInterval,a=at(s.labels,function(l){return l.tickValue})}else o=n,a=Mj(e,o,!0);return nT(r,n,{ticks:a,tickCategoryInterval:o})}function Xyt(e){var t=e.scale.getTicks(),r=Kh(e);return{labels:at(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Zyt=Aj("axisTick"),Kyt=Aj("axisLabel");function Aj(e){return function(r){return $d(r)[e]||($d(r)[e]={list:[]})}}function Dj(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function nT(e,t,r){return e.list.push({key:t,value:r}),r}function Jyt(e,t){if(t.kind===Vi.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return $d(e).autoInterval=r,!0}),r}var n=$d(e).autoInterval;return n??($d(e).autoInterval=e.calculateCategoryInterval(t))}function Qyt(e,t){var r=t.kind,n=e0t(e),i=Kh(e),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var h=s[0],f=e.dataToCoord(h+1)-e.dataToCoord(h),d=Math.abs(f*Math.cos(a)),p=Math.abs(f*Math.sin(a)),v=0,g=0;h<=s[1];h+=u){var m=0,y=0,_=k_(i({value:h}),n.font,"center","top");m=_.width*1.3,y=_.height*1.3,v=Math.max(v,m,7),g=Math.max(g,y,7)}var x=v/d,b=g/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(r===Vi.estimate)return t.out.noPxChangeTryDetermine.push(ut(t0t,null,e,S,l)),S;var w=Lj(e,S,l);return w??S}function t0t(e,t,r){return Lj(e,t,r)==null}function Lj(e,t,r){var n=Hyt(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function e0t(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Mj(e,t,r){var n=Kh(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=xj(e),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);d&&p-l!==a[1]&&v(a[1]);function v(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g,time:void 0,break:void 0})}return s}function Ej(e,t,r){var n=e.scale,i=Kh(e),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var hR=[0,1],ji=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return TH(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),fR(n,i.count())),fe(t,hR,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),fR(n,i.count()));var a=fe(t,n,hR,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=Uyt(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=at(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return r0t(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=at(n,function(a){return at(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||i0(Vi.determine),jyt(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||i0(Vi.determine),Qyt(this,t)},e}();function fR(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function r0t(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;R(t,function(d){d.coord-=u/2,d.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var h=a[0]>a[1];f(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&f(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&f(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function f(d,p){return d=Je(d),p=Je(p),h?d>p:d<p}}var Of=Math.PI*2,hl=Ia.CMD,n0t=["top","right","bottom","left"];function i0t(e,t,r,n,i){var a=r.width,o=r.height;switch(e){case"top":n.set(r.x+a/2,r.y-t),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+t),i.set(0,1);break;case"left":n.set(r.x-t,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+t,r.y+o/2),i.set(1,0);break}}function a0t(e,t,r,n,i,a,o,s,l){o-=e,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*r+e,h=s*r+t;if(Math.abs(n-i)%Of<1e-4)return l[0]=c,l[1]=h,u-r;if(a){var f=n;n=zn(i),i=zn(f)}else n=zn(n),i=zn(i);n>i&&(i+=Of);var d=Math.atan2(s,o);if(d<0&&(d+=Of),d>=n&&d<=i||d+Of>=n&&d+Of<=i)return l[0]=c,l[1]=h,u-r;var p=r*Math.cos(n)+e,v=r*Math.sin(n)+t,g=r*Math.cos(i)+e,m=r*Math.sin(i)+t,y=(p-o)*(p-o)+(v-s)*(v-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=p,l[1]=v,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function a0(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,h=n-t,f=Math.sqrt(c*c+h*h);c/=f,h/=f;var d=l*c+u*h,p=d/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var v=o[0]=e+p*c,g=o[1]=t+p*h;return Math.sqrt((v-i)*(v-i)+(g-a)*(g-a))}function Ij(e,t,r,n,i,a,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,l=t+n,u=o[0]=Math.min(Math.max(i,e),s),c=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var Ti=[];function o0t(e,t,r){var n=Ij(t.x,t.y,t.width,t.height,e.x,e.y,Ti);return r.set(Ti[0],Ti[1]),n}function s0t(e,t,r){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=t.data,h=e.x,f=e.y,d=0;d<c.length;){var p=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var v=u;switch(p){case hl.M:a=c[d++],o=c[d++],n=a,i=o;break;case hl.L:v=a0(n,i,c[d],c[d+1],h,f,Ti,!0),n=c[d++],i=c[d++];break;case hl.C:v=sH(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,f,Ti),n=c[d++],i=c[d++];break;case hl.Q:v=uH(n,i,c[d++],c[d++],c[d],c[d+1],h,f,Ti),n=c[d++],i=c[d++];break;case hl.A:var g=c[d++],m=c[d++],y=c[d++],_=c[d++],x=c[d++],b=c[d++];d+=1;var S=!!(1-c[d++]);s=Math.cos(x)*y+g,l=Math.sin(x)*_+m,d<=1&&(a=s,o=l);var w=(h-g)*_/y+g;v=a0t(g,m,_,x,x+b,S,w,f,Ti),n=Math.cos(x+b)*y+g,i=Math.sin(x+b)*_+m;break;case hl.R:a=n=c[d++],o=i=c[d++];var C=c[d++],k=c[d++];v=Ij(a,o,C,k,h,f,Ti);break;case hl.Z:v=a0(n,i,a,o,h,f,Ti,!0),n=a,i=o;break}v<u&&(u=v,r.set(Ti[0],Ti[1]))}return u}var Ai=new St,De=new St,je=new St,_a=new St,fa=new St;function dR(e,t){if(e){var r=e.getTextGuideLine(),n=e.getTextContent();if(n&&r){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||n0t,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=e.getComputedTransform(),h=c&&Fi([],c),f=t.get("length2")||0;u&&je.copy(u);for(var d=0;d<o.length;d++){var p=o[d];i0t(p,0,s,Ai,_a),St.scaleAndAdd(De,Ai,_a,f),De.transform(h);var v=e.getBoundingRect(),g=u?u.distance(De):e instanceof Kt?s0t(De,e.path,je):o0t(De,v,je);g<l&&(l=g,De.transform(c),je.transform(c),je.toArray(a[0]),De.toArray(a[1]),Ai.toArray(a[2]))}Pj(a,t.get("minTurnAngle")),r.setShape({points:a})}}}var o0=[],sn=new St;function Pj(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ai.fromArray(e[0]),De.fromArray(e[1]),je.fromArray(e[2]),St.sub(_a,Ai,De),St.sub(fa,je,De);var r=_a.len(),n=fa.len();if(!(r<.001||n<.001)){_a.scale(1/r),fa.scale(1/n);var i=_a.dot(fa),a=Math.cos(t);if(a<i){var o=a0(De.x,De.y,je.x,je.y,Ai.x,Ai.y,o0,!1);sn.fromArray(o0),sn.scaleAndAdd(fa,o/Math.tan(Math.PI-t));var s=je.x!==De.x?(sn.x-De.x)/(je.x-De.x):(sn.y-De.y)/(je.y-De.y);if(isNaN(s))return;s<0?St.copy(sn,De):s>1&&St.copy(sn,je),sn.toArray(e[1])}}}}function l0t(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Ai.fromArray(e[0]),De.fromArray(e[1]),je.fromArray(e[2]),St.sub(_a,De,Ai),St.sub(fa,je,De);var n=_a.len(),i=fa.len();if(!(n<.001||i<.001)){_a.scale(1/n),fa.scale(1/i);var a=_a.dot(t),o=Math.cos(r);if(a<o){var s=a0(De.x,De.y,je.x,je.y,Ai.x,Ai.y,o0,!1);sn.fromArray(o0);var l=Math.PI/2,u=Math.acos(fa.dot(t)),c=l+u-r;if(c>=l)St.copy(sn,je);else{sn.scaleAndAdd(fa,s/Math.tan(Math.PI/2-c));var h=je.x!==De.x?(sn.x-De.x)/(je.x-De.x):(sn.y-De.y)/(je.y-De.y);if(isNaN(h))return;h<0?St.copy(sn,De):h>1&&St.copy(sn,je)}sn.toArray(e[1])}}}}function l1(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function u0t(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=ns(n[0],n[1]),a=ns(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=pm([],n[1],n[0],o/i),l=pm([],n[1],n[2],o/a),u=pm([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)e.lineTo(n[c][0],n[c][1])}function kA(e,t,r){var n=e.getTextGuideLine(),i=e.getTextContent();if(!i){n&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<cp.length;l++){var u=cp[l],c=t[u],h=u==="normal";if(c){var f=c.get("show"),d=h?s:dt(i.states[u]&&i.states[u].ignore,s);if(d||!dt(f,o)){var p=h?n:n&&n.states[u];p&&(p.ignore=!0),n&&l1(n,!0,u,c);continue}n||(n=new Gr,e.setTextGuideLine(n),!h&&(s||!o)&&l1(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),l1(n,!1,u,c)}}if(n){wt(n.style,r),n.style.fill=null;var v=a.get("showAbove"),g=e.textGuideLineConfig=e.textGuideLineConfig||{};g.showAbove=v||!1,n.buildPath=u0t}}function AA(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<xn.length;n++){var i=xn[n];r[i]=e.getModel([i,t])}return r}var pR=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],c0t=1,s0=2,Rj=c0t|s0;function l0(e,t,r){r=r||Rj,t?e.dirty|=r:e.dirty&=~r}function Nj(e,t){return t=t||Rj,e.dirty==null||!!(e.dirty&t)}function Ra(e){if(e)return Nj(e)&&Oj(e,e.label,e),e}function Oj(e,t,r){var n=t.getComputedTransform();e.transform=Yk(e.transform,n);var i=e.localRect=fp(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=Rc.textMargin);for(var h=0;h<4;h++)u1[h]=c===Rc.minMargin&&l&&l[h]!=null?l[h]:s&&s[h]!=null?s[h]:o?o[h]:0;c===Rc.textMargin&&du(i,u1,!1,!1);var f=e.rect=fp(e.rect,i);return n&&f.applyTransform(n),c===Rc.minMargin&&du(f,u1,!1,!1),e.axisAligned=Uk(n),(e.label=e.label||{}).ignore=t.ignore,l0(e,!1),l0(e,!0,s0),e}var u1=[0,0,0,0];function h0t(e,t,r){return e.transform=Yk(e.transform,r),e.localRect=fp(e.localRect,t),e.rect=fp(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=Uk(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function iT(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function aT(e,t){for(var r=0;r<pR.length;r++){var n=pR[r];e[n]==null&&(e[n]=t[n])}return Ra(e)}function vR(e){var t=e.obb;return(!t||Nj(e,s0))&&(e.obb=t=t||new f6,t.fromBoundingRect(e.localRect,e.transform),l0(e,!1,s0)),t}function oT(e,t,r,n,i){var a=e.length,o=Pt[t],s=er[t];if(a<2)return!1;e.sort(function(w,C){return w.rect[o]-C.rect[o]});for(var l=0,u,c=!1,h=0;h<a;h++){var f=e[h],d=f.rect;u=d[o]-l,u<0&&(d[o]-=u,f.label[o]-=u,c=!0),l=d[o]+d[s]}var p=e[0],v=e[a-1],g,m;y(),g<0&&b(-g,.8),m<0&&b(m,.8),y(),_(g,m,1),_(m,g,-1),y(),g<0&&S(-g),m<0&&S(m);function y(){g=p.rect[o]-r,m=n-v.rect[o]-v.rect[s]}function _(w,C,k){if(w<0){var T=Math.min(C,-w);if(T>0){x(T*k,0,a);var A=T+w;A<0&&b(-A*k,1)}else b(-w*k,1)}}function x(w,C,k){w!==0&&(c=!0);for(var T=C;T<k;T++){var A=e[T],L=A.rect;L[o]+=w,A.label[o]+=w}}function b(w,C){for(var k=[],T=0,A=1;A<a;A++){var L=e[A-1].rect,D=Math.max(e[A].rect[o]-L[o]-L[s],0);k.push(D),T+=D}if(T){var E=Math.min(Math.abs(w)/T,C);if(w>0)for(var A=0;A<a-1;A++){var N=k[A]*E;x(N,0,A+1)}else for(var A=a-1;A>0;A--){var N=k[A-1]*E;x(-N,A,a)}}}function S(w){var C=w<0?-1:1;w=Math.abs(w);for(var k=Math.ceil(w/(a-1)),T=0;T<a-1;T++)if(C>0?x(k,0,T+1):x(-k,a-T-1,a),w-=k,w<=0)return}return c}function f0t(e){for(var t=0;t<e.length;t++){var r=e[t],n=r.defaultAttr,i=r.labelLine;r.label.attr("ignore",n.ignore),i&&i.attr("ignore",n.labelGuideIgnore)}}function Bj(e){var t=[];e.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<e.length;n++){var i=Ra(e[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(K_(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):t.push(i)}}}function K_(e,t,r,n){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,r,n)?!1:e.axisAligned&&t.axisAligned?!0:vR(e).intersect(vR(t),r,n)}function d0t(e){if(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].slice());return t}}function p0t(e,t){var r=e.label,n=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:d0t(n&&n.shape.points)}}var gR=["align","verticalAlign","width","height","fontSize"],rn=new uo,c1=qt(),v0t=qt();function mg(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];t[i]!=null&&(e[i]=t[i])}}var yg=["x","y","rotation"],g0t=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(t,r,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();Ct.applyTransform(c,c,u),u?rn.setLocalTransform(u):(rn.x=rn.y=rn.rotation=rn.originX=rn.originY=0,rn.scaleX=rn.scaleY=1),rn.rotation=zn(rn.rotation);var h=i.__hostTarget,f;if(h){f=h.getBoundingRect().plain();var d=h.getComputedTransform();Ct.applyTransform(f,f,d)}var p=f&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:t,dataType:r,layoutOptionOrCb:a,layoutOption:null,rect:c,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:rn.x,y:rn.y,scaleX:rn.scaleX,scaleY:rn.scaleY,rotation:rn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},e.prototype.addLabelsOfSeries=function(t){var r=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(mt(i)||te(i).length)&&t.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=At(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},e.prototype.updateLayoutConfig=function(t){var r=t.getWidth(),n=t.getHeight();function i(_,x){return function(){dR(_,x)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;mt(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(p0t(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var f=!1;if(c.x!=null?(s.x=st(c.x,r),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=st(c.y,n),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),f=!1)}var p=c1(s);p.needsUpdateLabelLine=f,s.rotation=c.rotate!=null?c.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var v=0;v<gR.length;v++){var g=gR[v];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},e.prototype.layout=function(t){var r=t.getWidth(),n=t.getHeight(),i=[];R(this._labelList,function(l){l.defaultAttr.ignore||i.push(aT({},l))});var a=de(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=de(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});oT(a,0,0,r),oT(o,1,0,n);var s=de(i,function(l){return l.layoutOption.hideOverlap});f0t(s),Bj(s)},e.prototype.processLabelsOverall=function(){var t=this;R(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=c1(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,n),a&&t._animateLabels(o,n)})})},e.prototype._updateLabelLine=function(t,r){var n=t.getTextContent(),i=At(t),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var h=s.getModel("labelLine");kA(t,AA(s),l),dR(t,h)}},e.prototype._animateLabels=function(t,r){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!Hc(t))){var a=c1(n),o=a.oldLayout,s=At(t),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=r.getData(s.dataType);if(o){n.attr(o);var f=t.prevStates;f&&($t(f,"select")>=0&&n.attr(a.oldLayoutSelect),$t(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),se(n,u,r,l)}else if(n.attr(u),!jh(n).valueAnimation){var h=dt(n.style.opacity,1);n.style.opacity=0,Le(n,{style:{opacity:h}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};mg(d,u,yg),mg(d,n.states.select,yg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};mg(p,u,yg),mg(p,n.states.emphasis,yg)}w6(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=v0t(i),o=a.oldLayout,v={points:i.shape.points};o?(i.attr({shape:o}),se(i,{shape:v},r)):(i.setShape(v),i.style.strokePercent=0,Le(i,{style:{strokePercent:1}},r)),a.oldLayout=v}},e}(),h1=qt();function m0t(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=h1(r).labelManager;i||(i=h1(r).labelManager=new g0t),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=h1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var f1=Math.sin,d1=Math.cos,Fj=Math.PI,fl=Math.PI*2,y0t=180/Fj,$j=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=ls(h-fl)||(c?u>=fl:-u>=fl),d=u>0?u%fl:u%fl+fl,p=!1;f?p=!0:ls(h)?p=!1:p=d>=Fj==!!c;var v=t+n*d1(o),g=r+i*f1(o);this._start&&this._add("M",v,g);var m=Math.round(a*y0t);if(f){var y=1/this._p,_=(c?1:-1)*(fl-y);this._add("A",n,i,m,1,+c,t+n*d1(o+_),r+i*f1(o+_)),y>.01&&this._add("A",n,i,m,0,+c,v,g)}else{var x=t+n*d1(s),b=r+i*f1(s);this._add("A",n,i,m,+p,+c,x,b)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var c=[],h=this._p,f=1;f<arguments.length;f++){var d=arguments[f];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*h)/h)}this._d.push(t+c.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),DA="none",_0t=Math.round;function x0t(e){var t=e.fill;return t!=null&&t!==DA}function b0t(e){var t=e.stroke;return t!=null&&t!==DA}var sT=["lineCap","miterLimit","lineJoin"],S0t=at(sT,function(e){return"stroke-"+e.toLowerCase()});function w0t(e,t,r,n){var i=t.opacity==null?1:t.opacity;if(r instanceof Rr){e("opacity",i);return}if(x0t(t)){var a=lp(t.fill);e("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*i:a.opacity*i;o<1&&e("fill-opacity",o)}else e("fill",DA);if(b0t(t)){var s=lp(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?r.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*i:s.opacity*i,h=t.strokeFirst;if(u!==1&&e("stroke-width",u),h&&e("paint-order",h?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var f=vA(r),d=f[0],p=f[1];d&&(p=_0t(p||0),e("stroke-dasharray",d.join(",")),(p||n)&&e("stroke-dashoffset",p))}for(var v=0;v<sT.length;v++){var g=sT[v];if(t[g]!==Oy[g]){var m=t[g]||Oy[g];m&&e(S0t[v],m)}}}}var Vj="http://www.w3.org/2000/svg",zj="http://www.w3.org/1999/xlink",C0t="http://www.w3.org/2000/xmlns/",T0t="http://www.w3.org/XML/1998/namespace",mR="ecmeta_";function Gj(e){return document.createElementNS(Vj,e)}function br(e,t,r,n,i){return{tag:e,attrs:r||{},children:n,text:i,key:t}}function k0t(e,t){var r=[];if(t)for(var n in t){var i=t[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+e+" "+r.join(" ")+">"}function A0t(e){return"</"+e+">"}function LA(e,t){t=t||{};var r=t.newline?`
358
358
  `:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return k0t(o,s)+(o!=="style"?ln(l):l||"")+(a?""+r+at(a,function(u){return n(u)}).join(r)+r:"")+A0t(o)}return n(e)}function D0t(e,t,r){r=r||{};var n=r.newline?`
359
- `:"",i=" {"+n,a=n+"}",o=at(te(e),function(l){return l+i+at(te(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=at(te(t),function(l){return"@keyframes "+l+i+at(te(t[l]),function(u){return u+i+at(te(t[l][u]),function(c){var h=t[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function lT(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yR(e,t,r,n){return br("svg","root",{width:e,height:t,xmlns:Vj,"xmlns:xlink":zj,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var L0t=0;function Wj(){return L0t++}var _R={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"},_l="transform-origin";function M0t(e,t,r){var n=et({},e.shape);et(n,t),e.buildPath(r,n);var i=new $j;return i.reset(gH(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function E0t(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[_l]=r+"px "+n+"px")}var I0t={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Hj(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function P0t(e,t,r){var n=e.shape.paths,i={},a,o;if(R(n,function(l){var u=lT(r.zrId);u.animation=!0,J_(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=te(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var v in p){var g=p[v];i[v]=i[v]||{d:""},i[v].d+=g.d||""}for(var m in h){var y=h[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){t.d=!1;var s=Hj(i,r);return a.replace(o,s)}}function xR(e){return lt(e)?_R[e]?"cubic-bezier("+_R[e]+")":Lk(e)?e:"":""}function J_(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof V_){var s=P0t(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],h=[c.getMaxTime()/1e3+"s"],f=xR(c.getClip().easing),d=c.getDelay();f?h.push(f):h.push("linear"),d&&h.push(d/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],x=_.length,b={},S={},w={},C="animation-timing-function";function k(tt,it,X){for(var rt=tt.getTracks(),Z=tt.getMaxTime(),vt=0;vt<rt.length;vt++){var kt=rt[vt];if(kt.needsAnimate()){var Wt=kt.keyframes,Ht=kt.propName;if(X&&(Ht=X(Ht)),Ht)for(var ue=0;ue<Wt.length;ue++){var Fe=Wt[ue],We=Math.round(Fe.time/Z*100)+"%",Tr=xR(Fe.easing),Nt=Fe.rawValue;(lt(Nt)||ae(Nt))&&(it[We]=it[We]||{},it[We][Ht]=Fe.rawValue,Tr&&(it[We][C]=Tr))}}}}for(var T=0;T<x;T++){var A=_[T],L=A.targetName;L?L==="shape"&&k(A,S):!n&&k(A,b)}for(var D in b){var E={};Py(E,e),et(E,b[D]);var N=mH(E),P=b[D][C];w[D]=N?{transform:N}:{},E0t(w[D],E),P&&(w[D][C]=P)}var F,O=!0;for(var D in S){w[D]=w[D]||{};var $=!F,P=S[D][C];$&&(F=new Ia);var V=F.len();F.reset(),w[D].d=M0t(e,S[D],F);var I=F.len();if(!$&&V!==I){O=!1;break}P&&(w[D][C]=P)}if(!O)for(var D in w)delete w[D].d;if(!n)for(var T=0;T<x;T++){var A=_[T],L=A.targetName;L==="style"&&k(A,w,function(rt){return I0t[rt]})}for(var B=te(w),G=!0,H,T=1;T<B.length;T++){var W=B[T-1],J=B[T];if(w[W][_l]!==w[J][_l]){G=!1;break}H=w[W][_l]}if(G&&H){for(var D in w)w[D][_l]&&delete w[D][_l];t[_l]=H}if(de(B,function(tt){return te(w[tt]).length>0}).length){var Q=Hj(w,r);return Q+" "+y[0]+" both"}}for(var g in l){var s=v(l[g]);s&&o.push(s)}if(o.length){var m=r.zrId+"-cls-"+Wj();r.cssNodes["."+m]={animation:o.join(",")},t.class=m}}function R0t(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};bR(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=aC(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),bR(n,t,r)}}function bR(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+Wj(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var bp=Math.round;function jj(e){return e&&lt(e.src)}function Uj(e){return e&&mt(e.toDataURL)}function MA(e,t,r,n){w0t(function(i,a){var o=i==="fill"||i==="stroke";o&&vH(a)?qj(t,e,i,n):o&&Mk(a)?Xj(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),z0t(r,e,n)}function EA(e,t){var r=oft(t);r&&(r.each(function(n,i){n!=null&&(e[(mR+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[mR+"silent"]="true"))}function SR(e){return ls(e[0]-1)&&ls(e[1])&&ls(e[2])&&ls(e[3]-1)}function N0t(e){return ls(e[4])&&ls(e[5])}function IA(e,t,r){if(t&&!(N0t(t)&&SR(t))){var n=1e4;e.transform=SR(t)?"translate("+bp(t[4]*n)/n+" "+bp(t[5]*n)/n+")":Dht(t)}}function wR(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(bp(n[a][0]*r)/r),i.push(bp(n[a][1]*r)/r);t.points=i.join(" ")}function CR(e){return!e.smooth}function O0t(e){var t=at(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var o=t[a],s=r[o[0]];s!=null&&(n[o[1]]=bp(s*i)/i)}}}var B0t={circle:[O0t(["cx","cy","r"])],polyline:[wR,CR],polygon:[wR,CR]};function F0t(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function Yj(e,t){var r=e.style,n=e.shape,i=B0t[e.type],a={},o=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&gH(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&F0t(e))&&!(l<1)){s=e.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var h=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;h&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var d=f.getVersion(),p=e,v=p.__svgPathBuilder;(p.__svgPathVersion!==d||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new $j),v.reset(u),f.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),a.d=v.getStr()}return IA(a,e.transform),MA(a,r,e,t),EA(a,e),t.animation&&J_(e,a,t),t.emphasis&&R0t(e,a,t),br(s,e.id+"",a)}function $0t(e,t){var r=e.style,n=r.image;if(n&&!lt(n)&&(jj(n)?n=n.src:Uj(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),IA(l,e.transform),MA(l,r,e,t),EA(l,e),t.animation&&J_(e,l,t),br("image",e.id+"",l)}}function V0t(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||Co,a=r.x||0,o=Mht(r.y||0,Wp(i),r.textBaseline),s=Lht[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(YH(r)){var u="",c=r.fontStyle,h=UH(r.fontSize);if(!parseFloat(h))return;var f=r.fontFamily||HW,d=r.fontWeight;u+="font-size:"+h+";font-family:"+f+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),IA(l,e.transform),MA(l,r,e,t),EA(l,e),t.animation&&J_(e,l,t),br("text",e.id+"",l,void 0,n)}}function TR(e,t){if(e instanceof Kt)return Yj(e,t);if(e instanceof Rr)return $0t(e,t);if(e instanceof vh)return V0t(e,t)}function z0t(e,t,r){var n=e.style;if(Eht(n)){var i=Iht(e),a=r.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,h=n.shadowOffsetY||0,f=n.shadowBlur,d=lp(n.shadowColor),p=d.opacity,v=d.color,g=f/2/l,m=f/2/u,y=g+" "+m;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=br("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[br("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),a[i]=o}t.filter=T_(o)}}function qj(e,t,r,n){var i=e[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(dH(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(pH(i))a="radialGradient",o.cx=dt(i.x,.5),o.cy=dt(i.y,.5),o.r=dt(i.r,.5);else{process.env.NODE_ENV!=="production"&&Mi("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var h=oC(s[u].offset)*100+"%",f=s[u].color,d=lp(f),p=d.color,v=d.opacity,g={offset:h};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(br("stop",u+"",g))}var m=br(a,"",o,l),y=LA(m),_=n.gradientCache,x=_[y];x||(x=n.zrId+"-g"+n.gradientIdx++,_[y]=x,o.id=x,n.defs[x]=br(a,x,o,l)),t[r]=T_(x)}function Xj(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",h;if(fH(i)){var f=i.imageWidth,d=i.imageHeight,p=void 0,v=i.image;if(lt(v)?p=v:jj(v)?p=v.src:Uj(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";ft(f,g),ft(d,g)}else if(f==null||d==null){var m=function(T,A){if(T){var L=T.elm,D=f||A.width,E=d||A.height;T.tag==="pattern"&&(u?(E=1,D/=a.width):c&&(D=1,E/=a.height)),T.attrs.width=D,T.attrs.height=E,L&&(L.setAttribute("width",D),L.setAttribute("height",E))}},y=Ok(p,null,e,function(T){l||m(S,T),m(h,T)});y&&y.width&&y.height&&(f=f||y.width,d=d||y.height)}h=br("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=_t(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):c?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=mH(i);b&&(o.patternTransform=b);var S=br("pattern","",o,[h]),w=LA(S),C=n.patternCache,k=C[w];k||(k=n.zrId+"-p"+n.patternIdx++,C[w]=k,o.id=k,S=n.defs[k]=br("pattern",k,o,[h])),t[r]=T_(k)}}function G0t(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=br("clipPath",a,o,[Yj(e,r)])}t["clip-path"]=T_(a)}function kR(e){return document.createTextNode(e)}function kl(e,t,r){e.insertBefore(t,r)}function AR(e,t){e.removeChild(t)}function DR(e,t){e.appendChild(t)}function Zj(e){return e.parentNode}function Kj(e){return e.nextSibling}function p1(e,t){e.textContent=t}var LR=58,W0t=120,H0t=br("","");function uT(e){return e===void 0}function ua(e){return e!==void 0}function j0t(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!=="production"&&n[a]!=null&&console.error("Duplicate key "+a),n[a]=i)}return n}function gd(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Sp(e){var t,r=e.children,n=e.tag;if(ua(n)){var i=e.elm=Gj(n);if(PA(H0t,e),nt(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&DR(i,Sp(a))}else ua(e.text)&&!xt(e.text)&&DR(i,kR(e.text))}else e.elm=kR(e.text);return e.elm}function Jj(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&kl(e,Sp(a),t)}}function u0(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(ua(i.tag)){var a=Zj(i.elm);AR(a,i.elm)}else AR(e,i.elm)}}function PA(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==W0t?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(C0t,r,o):r.charCodeAt(3)===LR?n.setAttributeNS(T0t,r,o):r.charCodeAt(5)===LR?n.setAttributeNS(zj,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function U0t(e,t,r){for(var n=0,i=0,a=t.length-1,o=t[0],s=t[a],l=r.length-1,u=r[0],c=r[l],h,f,d,p;n<=a&&i<=l;)o==null?o=t[++n]:s==null?s=t[--a]:u==null?u=r[++i]:c==null?c=r[--l]:gd(o,u)?(wc(o,u),o=t[++n],u=r[++i]):gd(s,c)?(wc(s,c),s=t[--a],c=r[--l]):gd(o,c)?(wc(o,c),kl(e,o.elm,Kj(s.elm)),o=t[++n],c=r[--l]):gd(s,u)?(wc(s,u),kl(e,s.elm,o.elm),s=t[--a],u=r[++i]):(uT(h)&&(h=j0t(t,n,a)),f=h[u.key],uT(f)?kl(e,Sp(u),o.elm):(d=t[f],d.tag!==u.tag?kl(e,Sp(u),o.elm):(wc(d,u),t[f]=void 0,kl(e,d.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(p=r[l+1]==null?null:r[l+1].elm,Jj(e,p,r,i,l)):u0(e,t,n,a))}function wc(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(PA(e,t),uT(t.text)?ua(n)&&ua(i)?n!==i&&U0t(r,n,i):ua(i)?(ua(e.text)&&p1(r,""),Jj(r,null,i,0,i.length-1)):ua(n)?u0(r,n,0,n.length-1):ua(e.text)&&p1(r,""):e.text!==t.text&&(ua(n)&&u0(r,n,0,n.length-1),p1(r,t.text)))}function Y0t(e,t){if(gd(e,t))wc(e,t);else{var r=e.elm,n=Zj(r);Sp(t),n!==null&&(kl(n,t.elm,Kj(r)),u0(n,[e],0,0))}return t}var q0t=0,X0t=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=MR("refreshHover"),this.configLayer=MR("configLayer"),this.storage=r,this._opts=n=et({},n),this.root=t,this._id="zr"+q0t++,this._oldVNode=yR(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Gj("svg");PA(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",Y0t(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return TR(t,lT(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=lT(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Z0t(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=br("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=at(te(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(br("defs","defs",{},u)),t.animation){var c=D0t(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=br("style","stl",{},[],c);o.push(h)}}return yR(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},LA(this.renderToVNode({animation:dt(t.cssAnimation,!0),emphasis:dt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:dt(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var h=t[c];if(!h.invisible){var f=h.__clipPaths,d=f&&f.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(d-1,p-1);v>=0&&!(f&&l&&f[v]===l[v]);v--);for(var g=p-1;g>v;g--)o--,s=a[o-1];for(var m=v+1;m<d;m++){var y={};G0t(f[m],y,r);var _=br("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=f;var x=TR(h,r);x&&(s?s.children:n).push(x)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=Oc(i,0,n),r=Oc(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var o=a.style;o.width=t+"px",o.height=r+"px"}if(Mk(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=Rht(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function MR(e){return function(){process.env.NODE_ENV!=="production"&&Mi('In SVG mode painter not support method "'+e+'"')}}function Z0t(e,t,r,n){var i;if(r&&r!=="none")if(i=br("rect","bg",{width:e,height:t,x:"0",y:"0"}),vH(r))qj({fill:r},i.attrs,"fill",n);else if(Mk(r))Xj({style:{fill:r},dirty:Ye,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=lp(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function K0t(e){e.registerPainter("svg",X0t)}function ER(e,t,r){var n=Bi.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var v1=function(e){Me(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Iy,typeof r=="string"?o=ER(r,n,i):xt(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(KW(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=ER("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Ct(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new Ct(0,0,0,0);_.copy(y),o.push(_)}else{for(var x=!1,b=1/0,S=0,w=0;w<o.length;++w){var C=o[w];if(C.intersect(y)){var k=new Ct(0,0,0,0);k.copy(C),k.union(y),o[w]=k,x=!0;break}else if(l){u.copy(y),u.union(C);var T=y.width*y.height,A=C.width*C.height,L=u.width*u.height,D=L-T-A;D<b&&(b=D,S=w)}}if(l&&(o[S].union(y),x=!0),!x){var _=new Ct(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=r[h];if(f){var d=f.shouldBePainted(i,a,!0,!0),p=f.__isRendered&&(f.__dirty&Vn||!d)?f.getPrevPaintRect():null;p&&c(p);var v=d&&(f.__dirty&Vn||!f.__isRendered)?f.getPaintRect():null;v&&c(v)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=n[h],d=f&&f.shouldBePainted(i,a,!0,!0);if(f&&(!d||!f.__zr)&&f.__isRendered){var p=f.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var m=h+1;m<o.length;)o[h].intersect(o[m])?(g=!0,o[h].union(o[m]),o.splice(m,1)):m++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,c=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var d=this.domBack;function p(v,g,m,y){if(o.clearRect(v,g,m,y),n&&n!=="transparent"){var _=void 0;if(x_(n)){var x=n.global||n.__width===m&&n.__height===y;_=x&&n.__canvasGradient||YC(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else Vct(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,_=qC(o,n,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(v,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,v,g,m,y),o.restore())}!i||u?p(0,0,s,l):i.length&&R(i,function(v){p(v.x*h,v.y*h,v.width*h,v.height*h)})},t}(yi),IR=1e5,dl=314159,_g=.01,J0t=.001;function Q0t(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function t_t(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var e_t=function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=et({},n||{}),this.dpr=n.devicePixelRatio||Iy,this._singleCanvas=a,this.root=t;var o=t.style;o&&(KW(t),t.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=t,h=c.width,f=c.height;n.width!=null&&(h=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,c.width=h*this.dpr,c.height=f*this.dpr,this._width=h,this._height=f;var d=new v1(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[dl]=d,d.zlevel=dl,s.push(dl),this._domRoot=t}else{this._width=Oc(t,0,n),this._height=Oc(t,1,n);var u=this._domRoot=t_t(this._width,this._height);t.appendChild(u)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(IR)),a||(a=n.ctx,a.save()),Vl(a,s,i,o===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(IR)},e.prototype.paintOne=function(t,r){N8(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;ky(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(dl).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,h=!1,f=function(v){var g=a[v],m=g.ctx,y=o&&g.createRepaintRects(t,r,d._width,d._height),_=n?g.__startIndex:g.__drawIndex,x=!n&&g.incremental&&Date.now,b=x&&Date.now(),S=g.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,y);else if(_===g.__startIndex){var w=t[_];(!w.incremental||!w.notClear||n)&&g.clear(!1,S,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var C,k=function(D){var E={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(C=_;C<g.__endIndex;C++){var N=t[C];if(N.__inHover&&(h=!0),i._doPaintEl(N,g,o,D,E,C===g.__endIndex-1),x){var P=Date.now()-b;if(P>15)break}}E.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=g.__endIndex;else for(var T=d.dpr,A=0;A<y.length;++A){var L=y[A];m.save(),m.beginPath(),m.rect(L.x*T,L.y*T,L.width*T,L.height*T),m.clip(),k(L),m.restore()}else m.save(),k(),m.restore();g.__drawIndex=C,g.__drawIndex<g.__endIndex&&(c=!1)},d=this,p=0;p<a.length;p++)f(p);return Qt.wxa&&R(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:h}},e.prototype._doPaintEl=function(t,r,n,i,a,o){var s=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Vl(s,t,a,o),t.setPrevPaintRect(l))}else Vl(s,t,a,o)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=dl);var n=this._layers[t];return n||(n=new v1("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?zt(n,this._layerConfig[t],!0):this._layerConfig[t-_g]&&zt(n,this._layerConfig[t-_g],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(n[t]){process.env.NODE_ENV!=="production"&&Mi("ZLevel "+t+" has been used already");return}if(!Q0t(r)){process.env.NODE_ENV!=="production"&&Mi("Layer of zlevel "+t+" is not valid");return}if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(r,o,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(r,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function r(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+J0t,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?_g:0),this._needsManuallyCompositing),c.__builtin__||Mi("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Vn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?zt(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+_g){var o=this._layers[a];zt(o,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice($t(n,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=Oc(a,0,i),r=Oc(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(dl).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[dl].dom;var r=new v1("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Vl(n,c,o,l===u-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function r_t(e){e.registerPainter("canvas",e_t)}var n_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new yt,i=nr("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=nr(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=U.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Ae);function Sh(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=mh(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(mh(e,t,r[o]));return a.join(" ")}}function Qj(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!nt(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var tv=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=nr(r,-1,-1,2,2,null,s);l.attr({z2:dt(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=i_t,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ao(this.childAt(0))},t.prototype.downplay=function(){Do(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,f)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?d.attr(p):se(d,p,s,n),gi(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Le(d,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,h,f,d,p,v,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),f=_.get("focus"),d=_.get("blurScope"),p=_.get("disabled"),v=dr(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var x=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Mu(r.getItemVisual(n,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var S=r.getItemVisual(n,"style"),w=S.fill;if(s instanceof Rr){var C=s.style;s.useStyle(et({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},S))}else s.__isEmptyBrush?s.useStyle(et({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var k=r.getItemVisual(n,"liftZ"),T=this._z2;k!=null?T==null&&(this._z2=s.z2,s.z2+=k):T!=null&&(s.z2=T,this._z2=null);var A=o&&o.useNameLabel;Cr(s,v,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:w,defaultOpacity:S.opacity});function L(N){return A?r.getName(N):Sh(r,N)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var D=s.ensureState("emphasis");D.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var E=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;D.scaleX=this._sizeX*E,D.scaleY=this._sizeY*E,this.setSymbolScale(1),Ie(this,f,d,p)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=At(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ks(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ks(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Zh(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(yt);function i_t(e,t){this.parent.drift(e,t)}function g1(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function PR(e){return e!=null&&!xt(e)&&(e={isIgnore:e}),e||{}}function RR(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:dr(t),cursorStyle:t.get("cursor")}}var ev=function(){function e(t){this.group=new yt,this._SymbolCtor=t||tv}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=PR(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=RR(t),u={disableAnimation:s},c=r.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var f=c(h);if(g1(t,f,h,r)){var d=new o(t,h,l,u);d.setPosition(f),t.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!g1(t,p,h,r)){n.remove(d);return}var v=t.getItemVisual(h,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==v)n.remove(d),d=new o(t,h,l,u),d.setPosition(p);else{d.updateData(t,h,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):se(d,m,i)}n.add(d),t.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=RR(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=PR(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(g1(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Bs(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e}();function t9(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=a_t(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,h=at(e.dimensions,function(p){return t.mapDimension(p)}),f=!1,d=t.getCalculationInfo("stackResultDimension");return As(t,h[0])&&(f=!0,h[0]=d),As(t,h[1])&&(f=!0,h[1]=d),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function a_t(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:ae(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function e9(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function o_t(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function s_t(e,t,r,n,i,a,o,s){for(var l=o_t(e,t),u=[],c=[],h=[],f=[],d=[],p=[],v=[],g=t9(i,t,o),m=e.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,w=void 0;switch(x.cmd){case"=":S=x.idx*2,w=x.idx1*2;var C=m[S],k=m[S+1],T=y[w],A=y[w+1];(isNaN(C)||isNaN(k))&&(C=T,k=A),u.push(C,k),c.push(T,A),h.push(r[S],r[S+1]),f.push(n[w],n[w+1]),v.push(t.getRawIndex(x.idx1));break;case"+":var L=x.idx,D=g.dataDimsForPoint,E=i.dataToPoint([t.get(D[0],L),t.get(D[1],L)]);w=L*2,u.push(E[0],E[1]),c.push(y[w],y[w+1]);var N=e9(g,i,t,L);h.push(N[0],N[1]),f.push(n[w],n[w+1]),v.push(t.getRawIndex(L));break;case"-":b=!1}b&&(d.push(x),p.push(p.length))}p.sort(function(W,J){return v[W]-v[J]});for(var P=u.length,F=ya(P),O=ya(P),$=ya(P),V=ya(P),I=[],_=0;_<p.length;_++){var B=p[_],G=_*2,H=B*2;F[G]=u[H],F[G+1]=u[H+1],O[G]=c[H],O[G+1]=c[H+1],$[G]=h[H],$[G+1]=h[H+1],V[G]=f[H],V[G+1]=f[H+1],I[_]=d[B]}return{current:F,next:O,stackedOnCurrent:$,stackedOnNext:V,status:I}}var Uo=Math.min,Yo=Math.max;function Xl(e,t){return isNaN(e)||isNaN(t)}function cT(e,t,r,n,i,a,o,s,l){for(var u,c,h,f,d,p,v=r,g=0;g<n;g++){var m=t[v*2],y=t[v*2+1];if(v>=i||v<0)break;if(Xl(m,y)){if(l){v+=a;continue}break}if(v===r)e[a>0?"moveTo":"lineTo"](m,y),h=m,f=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){v+=a;continue}if(o>0){for(var b=v+a,S=t[b*2],w=t[b*2+1];S===m&&w===y&&g<n;)g++,b+=a,v+=a,S=t[b*2],w=t[b*2+1],m=t[v*2],y=t[v*2+1],_=m-u,x=y-c;var C=g+1;if(l)for(;Xl(S,w)&&C<n;)C++,b+=a,S=t[b*2],w=t[b*2+1];var k=.5,T=0,A=0,L=void 0,D=void 0;if(C>=n||Xl(S,w))d=m,p=y;else{T=S-u,A=w-c;var E=m-u,N=S-m,P=y-c,F=w-y,O=void 0,$=void 0;if(s==="x"){O=Math.abs(E),$=Math.abs(N);var V=T>0?1:-1;d=m-V*O*o,p=y,L=m+V*$*o,D=y}else if(s==="y"){O=Math.abs(P),$=Math.abs(F);var I=A>0?1:-1;d=m,p=y-I*O*o,L=m,D=y+I*$*o}else O=Math.sqrt(E*E+P*P),$=Math.sqrt(N*N+F*F),k=$/($+O),d=m-T*o*(1-k),p=y-A*o*(1-k),L=m+T*o*k,D=y+A*o*k,L=Uo(L,Yo(S,m)),D=Uo(D,Yo(w,y)),L=Yo(L,Uo(S,m)),D=Yo(D,Uo(w,y)),T=L-m,A=D-y,d=m-T*O/$,p=y-A*O/$,d=Uo(d,Yo(u,m)),p=Uo(p,Yo(c,y)),d=Yo(d,Uo(u,m)),p=Yo(p,Uo(c,y)),T=m-d,A=y-p,L=m+T*$/O,D=y+A*$/O}e.bezierCurveTo(h,f,d,p,m,y),h=L,f=D}else e.lineTo(m,y)}u=m,c=y,v+=a}return g}var r9=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),l_t=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new r9},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Xl(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Xl(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=cT(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Ia.CMD,s,l,u=n==="x",c=[],h=0;h<a.length;){var f=a[h++],d=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(f){case o.M:s=a[h++],l=a[h++];break;case o.L:if(d=a[h++],p=a[h++],_=u?(r-s)/(d-s):(r-l)/(p-l),_<=1&&_>=0){var x=u?(p-l)*_+l:(d-s)*_+s;return u?[r,x]:[x,r]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],v=a[h++],g=a[h++],m=a[h++],y=a[h++];var b=u?Dy(s,d,v,m,r,c):Dy(l,p,g,y,r,c);if(b>0)for(var S=0;S<b;S++){var w=c[S];if(w<=1&&w>=0){var x=u?_r(l,p,g,y,w):_r(s,d,v,m,w);return u?[r,x]:[x,r]}}s=m,l=y;break}}},t}(Kt),u_t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(r9),n9=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new u_t},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Xl(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Xl(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=cT(r,i,o,s,s,1,n.smooth,l,n.connectNulls);cT(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t}(Kt);function i9(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Ut({shape:{x:o,y:s,width:l,height:u}});if(t){var f=e.getBaseAxis(),d=f.isHorizontal(),p=f.inverse;d?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var v=mt(i)?function(g){i(g,h)}:null;Le(h,{shape:{width:l,height:u,x:o,y:s}},r,null,n,v)}return h}function a9(e,t,r){var n=e.getArea(),i=Je(n.r0,1),a=Je(n.r,1),o=new Jr({shape:{cx:Je(e.cx,1),cy:Je(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Le(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function rv(e,t,r,n,i){if(e){if(e.type==="polar")return a9(e,t,r);if(e.type==="cartesian2d")return i9(e,t,r,n,i)}else return null;return null}function Ds(e,t){return e.type===t}function NR(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function OR(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function BR(e,t){var r=OR(e),n=r[0],i=r[1],a=OR(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function FR(e){return ae(e)?e:e?.5:0}function c_t(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=ya(n*2),a=0;a<n;a++){var o=e9(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function qo(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],h=[],f=[];if(i){for(l=0;l<e.length;l+=2){var d=t||e;!isNaN(d[l])&&!isNaN(d[l+1])&&f.push(e[l],e[l+1])}e=f}for(l=0;l<e.length-2;l+=2)switch(h[0]=e[l+2],h[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),n){case"end":u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+h[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=h[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function h_t(e,t){var r=[],n=e.length,i,a;function o(c,h,f){var d=c.coord,p=(f-d)/(h.coord-d),v=Aht(p,[c.color,h.color]);return{coord:f,color:v}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function f_t(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=at(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=h_t(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,v=f[0].coord-p,g=f[d-1].coord+p,m=g-v;if(m<.001)return"transparent";R(f,function(_){_.offset=(_.coord-v)/m}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var y=new Wh(0,0,0,0,f,!0);return y[i]=v,y[i+"2"]=g,y}}function d_t(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&p_t(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function p_t(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(tv.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function v_t(e,t){return isNaN(e)||isNaN(t)}function g_t(e){for(var t=e.length/2;t>0&&v_t(e[t*2-2],e[t*2-1]);t--);return t-1}function $R(e,t){return[e[t*2],e[t*2+1]]}function m_t(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!(isNaN(o)||isNaN(e[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function o9(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<xn.length;t++)if(e.get([xn[t],"endLabel","show"]))return!0;return!1}function m1(e,t,r,n){if(Ds(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=o9(n)?function(d,p){e._endLabelOnDuring(d,p,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=i9(t,r,n,function(){var d=e._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=c.shape,f=Math.max(h.width,h.height);u?(h.y-=f,h.height+=f*2):(h.x-=f,h.width+=f*2)}return l&&l(1,c),c}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),a9(t,r,n)}function y_t(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var __t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new yt,n=new ev;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ut(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],h=a.type==="polar",f=this._coordSys,d=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=t9(a,s,_),b=y&&c_t(a,s,x),S=r.get("showSymbol"),w=r.get("connectNulls"),C=S&&!h&&d_t(r,s,a),k=this._data;k&&k.eachItemGraphicEl(function(W,J){W.__temp&&(o.remove(W),k.setItemGraphicEl(J,null))}),S||d.remove(),o.add(g);var T=h?!1:r.get("step"),A;a&&a.getArea&&r.get("clip",!0)&&(A=a.getArea(),A.width!=null?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r+=.5)),this._clipShapeForSymbol=A;var L=f_t(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===a.type&&T===this._step))S&&d.updateData(s,{isIgnore:C,clipShape:A,disableAnimation:!0,getSymbolPoint:function(W){return[c[W*2],c[W*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,A),T&&(b&&(b=qo(b,c,a,T,w)),c=qo(c,null,a,T,w)),p=this._newPolyline(c),y?v=this._newPolygon(c,b):v&&(g.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,vu(L)),g.setClipPath(m1(this,a,!0,r));else{y&&!v?v=this._newPolygon(c,b):v&&!y&&(g.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,vu(L));var D=g.getClipPath();if(D){var E=m1(this,a,!1,r);Le(D,{shape:E.shape},r)}else g.setClipPath(m1(this,a,!0,r));S&&d.updateData(s,{isIgnore:C,clipShape:A,disableAnimation:!0,getSymbolPoint:function(W){return[c[W*2],c[W*2+1]]}}),(!NR(this._stackedOnPoints,b)||!NR(this._points,c))&&(m?this._doUpdateAnimation(s,b,a,i,T,_,w):(T&&(b&&(b=qo(b,c,a,T,w)),c=qo(c,null,a,T,w)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:b})))}var N=r.getModel("emphasis"),P=N.get("focus"),F=N.get("blurScope"),O=N.get("disabled");if(p.useStyle(wt(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),fr(p,r,"lineStyle"),p.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var $=p.getState("emphasis").style;$.lineWidth=+p.style.lineWidth+1}At(p).seriesIndex=r.seriesIndex,Ie(p,P,F,O);var V=FR(r.get("smooth")),I=r.get("smoothMonotone");if(p.setShape({smooth:V,smoothMonotone:I,connectNulls:w}),v){var B=s.getCalculationInfo("stackedOnSeries"),G=0;v.useStyle(wt(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),B&&(G=FR(B.get("smooth"))),v.setShape({smooth:V,stackedOnSmooth:G,smoothMonotone:I,connectNulls:w}),fr(v,r,"areaStyle"),At(v).seriesIndex=r.seriesIndex,Ie(v,P,F,O)}var H=this._changePolyState;s.eachItemGraphicEl(function(W){W&&(W.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=c,this._step=T,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,p),v&&this.packEventData(r,v))},t.prototype.packEventData=function(r,n){At(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=cu(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new tv(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ye.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=cu(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else ye.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;$y(this._polyline,r),n&&$y(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new l_t({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new n9({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");mt(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=mt(h)?h(null):h;r.eachItemGraphicEl(function(d,p){var v=d;if(v){var g=[d.x,d.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var x=i,b=n.pointToCoord(g);a?(m=x.startAngle,y=x.endAngle,_=-b[1]/180*Math.PI):(m=x.r0,y=x.r,_=b[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,_=d.x):(m=S.y+S.height,y=S.y,_=d.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var C=mt(h)?h(p):c*w+f,k=v.getSymbolPath(),T=k.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),T&&T.animateFrom({style:{opacity:0}},{duration:300,delay:C}),k.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(o9(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new oe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=g_t(l);c>=0&&(Cr(s,dr(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?Qj(o,d):Sh(o,h)},enableTextSetter:!0},y_t(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,x=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,b=(m?v:0)*(y?-1:1),S=(m?0:-v)*(y?-1:1),w=m?"x":"y",C=m_t(h,x,w),k=C.range,T=k[1]-k[0],A=void 0;if(T>=1){if(T>1&&!d){var L=$R(h,k[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(A=f.getRawValue(k[0]))}else{var L=c.getPointOn(x,w);L&&u.attr({x:L[0]+b,y:L[1]+S});var D=f.getRawValue(k[0]),E=f.getRawValue(k[1]);o&&(A=OH(i,p,D,E,C.t))}a.lastFrameIndex=k[0]}else{var N=r===1||a.lastFrameIndex>0?k[0]:0,L=$R(h,N);o&&(A=f.getRawValue(N)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var P=jh(u);typeof P.setLabelText=="function"&&P.setLabelText(A)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=r.hostModel,f=s_t(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,v=f.next,g=f.stackedOnNext;if(o&&(p=qo(f.stackedOnCurrent,f.current,i,o,l),d=qo(f.current,null,i,o,l),g=qo(f.stackedOnNext,f.next,i,o,l),v=qo(f.next,null,i,o,l)),BR(d,v)>3e3||c&&BR(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=d;var m={shape:{points:v}};f.current!==d&&(m.shape.__points=f.next),u.stopAnimation(),se(u,m,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),se(c,{shape:{stackedOnPoints:g}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=f.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=r.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,C=0;C<y.length;C++){var k=y[C].el,T=y[C].ptIdx*2;k.x=w[T],k.y=w[T+1],k.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(ye);function nv(e,t){return{seriesType:e,plan:qh(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=t||a.large;if(i){var s=at(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");As(n,s[0])&&(s[0]=u),As(n,s[1])&&(s[1]=u);var c=n.getStore(),h=n.getDimensionIndex(s[0]),f=n.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var v=d.end-d.start,g=o&&ya(v*l),m=[],y=[],_=d.start,x=0;_<d.end;_++){var b=void 0;if(l===1){var S=c.get(h,_);b=i.dataToPoint(S,null,y)}else m[0]=c.get(h,_),m[1]=c.get(f,_),b=i.dataToPoint(m,null,y);o?(g[x++]=b[0],g[x++]=b[1]):p.setItemLayout(_,b.slice())}o&&p.setLayout("points",g)}}}}}}var x_t={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},b_t=function(e){return Math.round(e.length/2)};function s9(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;lt(a)?p=x_t[a]:mt(a)&&(p=a),p&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,p,b_t))}}}}}function S_t(e){e.registerChartView(__t),e.registerSeriesModel(n_t),e.registerLayout(nv("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,s9("line"))}var wp=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),v=f.getTickModel().get("alignWithLabel"),g=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,b=0;b<p.length;b++){var S=p[b].coord,w=b===p.length-1?p[b-1].tickValue+x:p[b].tickValue;if(w===g){_=S;break}else if(w<g)y=S;else if(y!=null&&w>g){_=(S+y)/2;break}b===1&&(x=w-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[d]=f.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(Ae);Ae.registerClass(wp);var w_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return $o(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Fs(wp.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:U.color.primary,borderWidth:2}},realtimeSort:!1}),t}(wp),C_t=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),c0=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new C_t},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-c<d:c-h<d;p||(c=h-(f?d:-d));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(h),y=Math.sin(h);p?(r.moveTo(v*o+i,g*o+a),r.arc(v*u+i,g*u+a,l,-Math.PI+c,c,!f)):r.moveTo(v*s+i,g*s+a),r.arc(i,a,s,c,h,!f),r.arc(m*u+i,y*u+a,l,h-Math.PI*2,h-Math.PI,!f),o!==0&&r.arc(i,a,o,h,c,f)},t}(Kt);function T_t(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Ry(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,h=u.cy,f=u.r,d=u.r0,p=(f+d)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=r?Math.abs(f-d)/2:0,_=Math.cos,x=Math.sin,b=c+f*_(v),S=h+f*x(v),w="left",C="top";switch(s){case"startArc":b=c+(d-l)*_(m),S=h+(d-l)*x(m),w="center",C="top";break;case"insideStartArc":b=c+(d+l)*_(m),S=h+(d+l)*x(m),w="center",C="bottom";break;case"startAngle":b=c+p*_(v)+xg(v,l+y,!1),S=h+p*x(v)+bg(v,l+y,!1),w="right",C="middle";break;case"insideStartAngle":b=c+p*_(v)+xg(v,-l+y,!1),S=h+p*x(v)+bg(v,-l+y,!1),w="left",C="middle";break;case"middle":b=c+p*_(m),S=h+p*x(m),w="center",C="middle";break;case"endArc":b=c+(f+l)*_(m),S=h+(f+l)*x(m),w="center",C="bottom";break;case"insideEndArc":b=c+(f-l)*_(m),S=h+(f-l)*x(m),w="center",C="top";break;case"endAngle":b=c+p*_(g)+xg(g,l+y,!0),S=h+p*x(g)+bg(g,l+y,!0),w="left",C="middle";break;case"insideEndAngle":b=c+p*_(g)+xg(g,-l+y,!0),S=h+p*x(g)+bg(g,-l+y,!0),w="right",C="middle";break;default:return Ry(n,i,a)}return n=n||{},n.x=b,n.y=S,n.align=w,n.verticalAlign=C,n}}function k_t(e,t,r,n){if(ae(n)){e.setTextConfig({rotation:n});return}else if(nt(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),e.setTextConfig({rotation:c})}function xg(e,t,r){return t*Math.sin(e)*(r?-1:1)}function bg(e,t,r){return t*Math.cos(e)*(r?1:-1)}function xa(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;nt(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:at(n,function(a){return $i(a,i)})}}var y1=Math.max,_1=Math.min;function A_t(e,t){var r=e.getArea&&e.getArea();if(Ds(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var D_t=function(e){q(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&Ne("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var f=r.isAnimationEnabled()?r:null,d=L_t(r,u);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,v=A_t(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],b=this._backgroundEls,S=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function C(A){var L=Sg[u.type](s,A);if(!L)return null;var D=O_t(u,h,L);return D.useStyle(y.getItemStyle()),u.type==="cartesian2d"?D.setShape("r",_):D.setShape("cornerRadius",_),x[A]=D,D}s.diff(l).add(function(A){var L=s.getItemModel(A),D=Sg[u.type](s,A,L);if(D&&(m&&C(A),!(!s.hasValue(A)||!HR[u.type](D)))){var E=!1;p&&(E=VR[u.type](v,D));var N=zR[u.type](r,s,A,D,h,f,c.model,!1,g);d&&(N.forceLabelAnimation=!0),jR(N,s,A,L,D,r,h,u.type==="polar"),S?N.attr({shape:D}):d?GR(d,f,N,D,A,h,!1,!1):Le(N,{shape:D},r,A),s.setItemGraphicEl(A,N),o.add(N),N.ignore=E}}).update(function(A,L){var D=s.getItemModel(A),E=Sg[u.type](s,A,D);if(E){if(m){var N=void 0;b.length===0?N=C(L):(N=b[L],N.useStyle(y.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",_):N.setShape("cornerRadius",_),x[A]=N);var P=Sg[u.type](s,A),F=u9(h,P,u);se(N,{shape:F},f,A)}var O=l.getItemGraphicEl(L);if(!s.hasValue(A)||!HR[u.type](E)){o.remove(O);return}var $=!1;p&&($=VR[u.type](v,E),$&&o.remove(O));var V=O&&(O.type==="sector"&&g||O.type==="sausage"&&!g);if(V&&(O&&go(O,r,L),O=null),O?gi(O):O=zR[u.type](r,s,A,E,h,f,c.model,!0,g),d&&(O.forceLabelAnimation=!0),w){var I=O.getTextContent();if(I){var B=jh(I);B.prevValue!=null&&(B.prevValue=B.value)}}else jR(O,s,A,D,E,r,h,u.type==="polar");S?O.attr({shape:E}):d?GR(d,f,O,E,A,h,!0,w):se(O,{shape:E},r,A,null),s.setItemGraphicEl(A,O),O.ignore=$,o.add(O)}}).remove(function(A){var L=l.getItemGraphicEl(A);L&&go(L,r,A)}).execute();var k=this._backgroundGroup||(this._backgroundGroup=new yt);k.removeAll();for(var T=0;T<x.length;++T)k.add(x[T]);o.add(k),this._backgroundEls=x,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),YR(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),YR(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&rv(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:at(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){go(a,r,At(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(ye),VR={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=y1(t.x,e.x),s=_1(t.x+t.width,i),l=y1(t.y,e.y),u=_1(t.y+t.height,a),c=s<o,h=u<l;return t.x=c&&o>i?s:o,t.y=h&&l>a?u:l,t.width=c?0:s-o,t.height=h?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=_1(t.r,e.r),a=y1(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},zR={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Ut({shape:et({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?c0:Jr,c=new u({shape:n,z2:1});c.name="item";var h=l9(i);if(c.calculateTextPosition=T_t(h,{isRoundCap:u===c0}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?se:Le)(c,{shape:p},a)}return c}};function L_t(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&Ne("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&Ne("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function GR(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?se:Le)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?se:Le)(r,{shape:u},c,i)}function WR(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var M_t=["x","y","width","height"],E_t=["cx","cy","r","startAngle","endAngle"],HR={cartesian2d:function(e){return!WR(e,M_t)},polar:function(e){return!WR(e,E_t)}},Sg={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?P_t(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function I_t(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function l9(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function jR(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,h=xa(n.getModel("itemStyle"),c,!0);et(c,h),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var f=n.getShallow("cursor");f&&e.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=dr(n);Cr(e,p,{labelFetcher:a,labelDataIndex:r,defaultText:Sh(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var v=e.getTextContent();if(s&&v){var g=n.get(["label","position"]);e.textConfig.inside=g==="middle"?!0:null,k_t(e,g==="outside"?d:g,l9(o),n.get(["label","rotate"]))}S6(v,p,a.getRawValue(r),function(y){return Qj(t,y)});var m=n.getModel(["emphasis"]);Ie(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),fr(e,n),I_t(i)&&(e.style.fill="none",e.style.stroke="none",R(e.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function P_t(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var R_t=function(){function e(){}return e}(),UR=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new R_t},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},t}(Kt);function YR(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new UR({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),r&&r.push(c)}var h=new UR({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,At(h).seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",qR),h.on("mousemove",qR)),r&&r.push(h)}var qR=dA(function(e){var t=this,r=N_t(t,e.offsetX,e.offsetY);At(t).dataIndex=r>=0?r:null},30,!1);function N_t(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,h=a.length/3;c<h;c++){var f=c*3;if(l[n]=u,l[i]=a[f+2],s[n]=a[f+n],s[i]=a[f+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function u9(e,t,r){if(Ds(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function O_t(e,t,r){var n=e.type==="polar"?Jr:Ut;return new n({shape:u9(t,r,e),silent:!0,z2:0})}function B_t(e){e.registerChartView(D_t),e.registerSeriesModel(w_t),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Bt(fj,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,dj("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,s9("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var XR=Math.PI*2,wg=Math.PI/180;function F_t(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=G6(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*wg,d=n.get("endAngle"),p=n.get("padAngle")*wg;d=d==="auto"?f-XR:-d*wg;var v=n.get("minAngle")*wg,g=v+p,m=0;i.each(a,function(F){!isNaN(F)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,x=n.get("clockwise"),b=n.get("roseType"),S=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var C=x?1:-1,k=[f,d],T=C*p/2;R_(k,!x),f=k[0],d=k[1];var A=c9(n);A.startAngle=f,A.endAngle=d,A.clockwise=x,A.cx=s,A.cy=l,A.r=u,A.r0=c;var L=Math.abs(d-f),D=L,E=0,N=f;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(F,O){var $;if(isNaN(F)){i.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:c,r:b?NaN:u});return}b!=="area"?$=y===0&&S?_:F*_:$=L/m,$<g?($=g,D-=g):E+=F;var V=N+C*$,I=0,B=0;p>$?(I=N+C*$/2,B=I):(I=N+T,B=V-T),i.setItemLayout(O,{angle:$,startAngle:I,endAngle:B,clockwise:x,cx:s,cy:l,r0:c,r:b?fe(F,w,[c,u]):u}),N=V}),D<XR&&m)if(D<=.001){var P=L/m;i.each(a,function(F,O){if(!isNaN(F)){var $=i.getItemLayout(O);$.angle=P;var V=0,I=0;P<p?(V=f+C*(O+1/2)*P,I=V):(V=f+C*O*P+T,I=f+C*(O+1)*P-T),$.startAngle=V,$.endAngle=I}})}else _=D/E,N=f,i.each(a,function(F,O){if(!isNaN(F)){var $=i.getItemLayout(O),V=$.angle===g?g:F*_,I=0,B=0;V<p?(I=N+C*V/2,B=I):(I=N+T,B=N+C*V-T),$.startAngle=I,$.endAngle=B,N+=C*V}})})}var c9=qt();function Jh(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var $_t=Math.PI/180;function ZR(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],x=Math.abs(_.label.y-r),b=n+_.len,S=b*b,w=Math.sqrt(Math.abs((1-x*x/m)*S)),C=t+(w+_.len2)*i,k=C-_.label.x,T=_.targetTextWidth-k*i;h9(_,T,!0),_.label.x=C}}function h(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],x=_.label.y>r?m:g,b=Math.abs(_.label.y-r);if(b>=x.maxY){var S=_.label.x-t-_.len2*i,w=n+_.len,C=Math.abs(S)<w?Math.sqrt(b*b/(1-S*S/w/w)):w;x.rB=C,x.maxY=b}x.list.push(_)}c(g),c(m)}for(var f=e.length,d=0;d<f;d++)if(e[d].position==="outer"&&e[d].labelAlignTo==="labelLine"){var p=e[d].label.x-u;e[d].linePoints[1][0]+=p,e[d].label.x=u}oT(e,1,l,l+o)&&h(e)}function V_t(e,t,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=0;f<e.length;f++){var d=e[f].label;x1(e[f])||(d.x<t?(c=Math.min(c,d.x),l.push(e[f])):(h=Math.max(h,d.x),u.push(e[f])))}for(var f=0;f<e.length;f++){var p=e[f];if(!x1(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?d.x<t?g=v[2][0]-p.labelDistance-o-p.edgeDistance:g=o+i-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<t?g=c-o-p.bleedMargin:g=o+i-h-p.bleedMargin:d.x<t?g=d.x-o-p.bleedMargin:g=o+i-d.x-p.bleedMargin,p.targetTextWidth=g,h9(p,g,!1)}}ZR(u,t,r,n,1,i,a,o,s,h),ZR(l,t,r,n,-1,i,a,o,s,c);for(var f=0;f<e.length;f++){var p=e[f];if(!x1(p)&&p.linePoints){var d=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,_=y?y[1]+y[3]:0,x=d.style.backgroundColor?0:_,b=p.rect.width+x,S=v[1][0]-v[2][0];m?d.x<t?v[2][0]=o+p.edgeDistance+b+p.labelDistance:v[2][0]=o+i-p.edgeDistance-b-p.labelDistance:(d.x<t?v[2][0]=d.x+p.labelDistance:v[2][0]=d.x-p.labelDistance,v[1][0]=v[2][0]+S),v[1][1]=v[2][1]=d.y}}}function h9(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var f=t-l,d=t<c?f:r?f>e.unconstrainedWidth?null:f:null;n.setStyle("width",d)}f9(a,n)}}}function f9(e,t){KR.rect=e,Oj(KR,t,z_t)}var z_t={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},KR={};function x1(e){return e.position==="center"}function G_t(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*$_t,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}t.each(function(S){var w=t.getItemGraphicEl(S),C=w.shape,k=w.getTextContent(),T=w.getTextGuideLine(),A=t.getItemModel(S),L=A.getModel("label"),D=L.get("position")||A.get(["emphasis","label","position"]),E=L.get("distanceToLabelLine"),N=L.get("alignTo"),P=st(L.get("edgeDistance"),u),F=L.get("bleedMargin");F==null&&(F=Math.min(u,f)>200?10:2);var O=A.getModel("labelLine"),$=O.get("length");$=st($,u);var V=O.get("length2");if(V=st(V,u),Math.abs(C.endAngle-C.startAngle)<o){R(k.states,d),k.ignore=!0,T&&(R(T.states,d),T.ignore=!0);return}if(p(k)){var I=(C.startAngle+C.endAngle)/2,B=Math.cos(I),G=Math.sin(I),H,W,J,Q;n=C.cx,i=C.cy;var tt=D==="inside"||D==="inner";if(D==="center")H=C.cx,W=C.cy,Q="center";else{var it=(tt?(C.r+C.r0)/2*B:C.r*B)+n,X=(tt?(C.r+C.r0)/2*G:C.r*G)+i;if(H=it+B*3,W=X+G*3,!tt){var rt=it+B*($+l-C.r),Z=X+G*($+l-C.r),vt=rt+(B<0?-1:1)*V,kt=Z;N==="edge"?H=B<0?c+P:c+u-P:H=vt+(B<0?-E:E),W=kt,J=[[it,X],[rt,Z],[vt,kt]]}Q=tt?"center":N==="edge"?B>0?"right":"left":B>0?"left":"right"}var Wt=Math.PI,Ht=0,ue=L.get("rotate");if(ae(ue))Ht=ue*(Wt/180);else if(D==="center")Ht=0;else if(ue==="radial"||ue===!0){var Fe=B<0?-I+Wt:-I;Ht=Fe}else if(ue==="tangential"&&D!=="outside"&&D!=="outer"){var We=Math.atan2(B,G);We<0&&(We=Wt*2+We);var Tr=G>0;Tr&&(We=Wt+We),Ht=We-Wt}if(a=!!Ht,k.x=H,k.y=W,k.rotation=Ht,k.setStyle({verticalAlign:"middle"}),tt){k.setStyle({align:Q});var ee=k.states.select;ee&&(ee.x+=k.x,ee.y+=k.y)}else{var Nt=new Ct(0,0,0,0);f9(Nt,k),r.push({label:k,labelLine:T,position:D,len:$,len2:V,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new St(B,G),linePoints:J,textAlign:Q,labelDistance:E,labelAlignTo:N,edgeDistance:P,bleedMargin:F,rect:Nt,unconstrainedWidth:Nt.width,labelStyleWidth:k.style.width})}w.setTextConfig({inside:tt})}}),!a&&e.get("avoidLabelOverlap")&&V_t(r,n,i,l,u,f,c,h);for(var v=0;v<r.length;v++){var g=r[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(R(m.states,d),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(y){var b=g.linePoints;_||!b?(R(y.states,d),y.ignore=!0):(Pj(b,g.minTurnAngle),l0t(b,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new St(b[0][0],b[0][1])})}}}var W_t=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new oe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),h=et(xa(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var f=s.getShallow("animationType");s.ecModel.ssr?(Le(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):f==="scale"?(o.shape.r=c.r0,Le(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Le(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,se(o,{shape:{endAngle:c.endAngle}},s,n))}else gi(o),se(o,{shape:h},s,n);o.useStyle(r.getItemVisual(n,"style")),fr(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(d)*p,g=Math.sin(d)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=et({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},xa(u.getModel("itemStyle"),c)),et(o.ensureState("select"),{x:v,y:g,shape:xa(l.getModel(["select","itemStyle"]),c)}),et(o.ensureState("blur"),{shape:xa(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&et(y.ensureState("select"),{x:v,y:g}),et(_.ensureState("select"),{x:v,y:g}),Ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;Cr(a,dr(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var f=o.get(["label","position"]);if(f!=="outside"&&f!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Gr,this.setTextGuideLine(d)),kA(this,AA(o),{stroke:u,opacity:dn(s.get(["lineStyle","opacity"]),c,1)})}},t}(Jr),H_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<o.count();++h)c=o.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var f=c9(r),d=new Jr({shape:_t(f)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var v=new W_t(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=s.getItemGraphicEl(v);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);go(v,r,p)}).execute(),G_t(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(ye);function Qh(e,t,r){t=nt(t)&&{coordDimensions:t}||et({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=Jp(n,t).dimensions,a=new pn(i,e);return a.initData(n,r),a}var tf=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),j_t=qt(),d9=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Qh(this,{coordDimensions:["value"],encodeDefaulter:Bt(oA,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=j_t(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=cft(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){uu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Ae);Zpt({fullType:d9.type,getCoord2:function(e){return e.getShallow("center")}});function U_t(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(ae(o)&&!isNaN(o)&&o<0)})}}}function Y_t(e){e.registerChartView(H_t),e.registerSeriesModel(d9),I8("pie",e.registerAction),e.registerLayout(Bt(F_t,"pie")),e.registerProcessor(Jh("pie")),e.registerProcessor(U_t("pie"))}var q_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:U.color.primary}},universalTransition:{divideShape:"clone"}},t}(Ae),p9=4,X_t=function(){function e(){}return e}(),Z_t=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new X_t},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<p9,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var f=i[h++],d=i[h++];isNaN(f)||isNaN(d)||c&&!c.contain(f,d)||(s.x=f-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(r>=h&&n>=f&&r<=h+s&&n<=f+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f<i.length;){var d=i[f++],p=i[f++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),h=Math.max(p,h)}r=this._rect=new Ct(l-o/2,u-s/2,c-l+o,h-u+s)}return r},t}(Kt),K_t=function(){function e(){this.group=new yt}return e.prototype.updateData=function(t,r){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new Z_t({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=nr(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<p9;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=At(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),J_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=nv("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new K_t:new ev,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(ye),v9={left:0,right:0,top:0,bottom:0},h0=["25%","25%"],Q_t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=Du(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Pa(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Pa(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:v9,outerBoundsContain:"all",outerBoundsClampWidth:h0[0],outerBoundsClampHeight:h0[1],backgroundColor:U.color.transparent,borderWidth:1,borderColor:U.color.neutral30},t}(Zt),hT=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ge).models[0]},t.type="cartesian2dAxis",t}(Zt);ir(hT,Qp);var g9={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:U.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:U.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:U.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[U.color.backgroundTint,U.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:U.color.neutral00,borderColor:U.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},txt=zt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},g9),RA=zt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:U.color.axisMinorSplitLine,width:1}}},g9),ext=zt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},RA),rxt=wt({logBase:10},RA);const m9={category:txt,value:RA,time:ext,log:rxt};var nxt={value:1,category:1,time:1,log:1},fT=null;function ixt(e){fT||(fT=e)}function iv(){return fT}function wh(e,t,r,n){R(nxt,function(i,a){var o=zt(zt({},m9[a],!0),n,!0),s=function(l){q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=dp(this),d=f?Du(c):{},p=h.getTheme();zt(c,p.get(a+"Axis")),zt(c,this.getDefaultOption()),c.type=JR(c),f&&Pa(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=_p.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var h=iv();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",JR)}function JR(e){return e.type||(e.data?"category":"value")}var axt=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return at(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),de(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),dT=["x","y"];function QR(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var oxt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=dT,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!QR(r)||!QR(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=Fi([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ct(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return qe(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return qe(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ct(a,o,s,l)},t}(axt),y9=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(ji),Q_="expandAxisBreak",_9="collapseAxisBreak",x9="toggleAxisBreak",NA="axisbreakchanged",sxt={type:Q_,event:NA,update:"update",refineEvent:OA},lxt={type:_9,event:NA,update:"update",refineEvent:OA},uxt={type:x9,event:NA,update:"update",refineEvent:OA};function OA(e,t,r,n){var i=[];return R(e,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function cxt(e){e.registerAction(sxt,t),e.registerAction(lxt,t),e.registerAction(uxt,t);function t(r,n){var i=[],a=Wc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(h){var f;i.push(wt((f={},f[l]=u.componentIndex,f),h))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var us=Math.PI,hxt=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],fxt=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Ch=qt(),b9=qt(),S9=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function dxt(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=BA(e.axisName)&&bh(e.nameLocation);R(n,function(p){var v=Ra(p);if(!(!v||v.label.ignore)){o.push(v);var g=a.transGroup;l&&(g.transform?Fi(Bf,g.transform):w_(Bf),v.transform&&Sa(Bf,Bf,v.transform),Ct.copy(Cg,v.localRect),Cg.applyTransform(Bf),s?s.union(Cg):Ct.copy(s=new Ct(0,0,0,0),Cg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,v){return Math.abs(p.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1])-f;s.union(new Ct(f,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Bf=Ir(),Cg=new Ct(0,0,0,0),w9=function(e,t,r,n,i,a){if(bh(e.nameLocation)){var o=a.stOccupiedRect;o&&C9(h0t({},o,a.transGroup.transform),n,i)}else T9(a.labelInfoList,a.dirVec,n,i)};function C9(e,t,r){var n=new St;K_(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&iT(t,n)}function T9(e,t,r,n){for(var i=St.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||C9(s,r,n)}}var vn=function(){function e(t,r,n,i){this.group=new yt,this._axisModel=t,this._api=r,this._local={},this._shared=i||new S9(w9),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){if(process.env.NODE_ENV!=="production"){var r=this._shared.ensureRecord(this._axisModel).ready;ft(!r.axisLine&&!r.axisTickLabelDetermine),r.axisName=r.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=t.position,n.labelOffset=t.labelOffset,this._resetCfgDetermined(n)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=dt(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=dt(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:dt(t.nameDirection,1),tickDirection:dt(t.tickDirection,1),labelDirection:dt(t.labelDirection,1),labelOffset:dt(t.labelOffset,0),silent:dt(t.silent,!0),axisName:i,nameLocation:dn(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:BA(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(ft(o.position!=null),ft(o.rotation!=null)),this._cfg=o;var s=new yt({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new St(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),R(pxt,function(i){t[i]&&vxt[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=kH(r-t),a,o;return up(i)?(o=n>0?"top":"bottom",a="center"):up(i-us)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<us?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),pxt=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],vxt={axisLine:function(e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=r.ensureRecord(n).ready;ft(!s.axisLine),s.axisLine=!0}var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,e.raw.axisLineAutoShow!=null&&(l=!!e.raw.axisLineAutoShow)),!!l){var u=n.axis.getExtent(),c=a.transform,h=[u[0],0],f=[u[1],0],d=h[0]>f[0];c&&(qe(h,h,c),qe(f,f,c));var p=et({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())iv().buildAxisBreakLine(n,i,a,v);else{var g=new Qe(et({shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]}},v));gh(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);lt(m)&&(m=[m,m]),(lt(y)||ae(y))&&(y=[y,y]);var _=Mu(n.get(["axisLine","symbolOffset"])||0,y),x=y[0],b=y[1];R([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((h[0]-f[0])*(h[0]-f[0])+(h[1]-f[1])*(h[1]-f[1]))}],function(S,w){if(m[w]!=="none"&&m[w]!=null){var C=nr(m[w],-x/2,-b/2,x,b,p.stroke,!0),k=S.r+S.offset,T=d?f:h;C.attr({rotation:S.rotate,x:T[0]+k*Math.cos(e.rotation),y:T[1]-k*Math.sin(e.rotation),silent:!0,z2:11}),i.add(C)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;ft(!l.axisTickLabelDetermine),l.axisTickLabelEstimate=!0}var u=eN(t,i,s);u&&tN(e,t,r,n,i,a,o,Vi.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;l.axisTickLabelDetermine=!0}var u=eN(t,i,s);u&&tN(e,t,r,n,i,a,o,Vi.determine);var c=_xt(e,i,a,n);yxt(e,t.labelLayoutList,c),xxt(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);if(process.env.NODE_ENV!=="production"){var u=l.ready;ft(u.axisTickLabelEstimate||u.axisTickLabelDetermine),u.axisName=!0}t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var c=e.axisName;if(BA(c)){var h=e.nameLocation,f=e.nameDirection,d=n.getModel("nameTextStyle"),p=n.get("nameGap")||0,v=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new St(0,0),y=new St(0,0);h==="start"?(m.x=v[0]-g*p,y.x=-g):h==="end"?(m.x=v[1]+g*p,y.x=g):(m.x=(v[0]+v[1])/2,m.y=e.labelOffset+f*p,y.y=f);var _=Ir();y.transform(Os(_,_,e.rotation));var x=n.get("nameRotate");x!=null&&(x=x*us/180);var b,S;bh(h)?b=vn.innerTextLayout(e.rotation,x??e.rotation,f):(b=gxt(e.rotation,h,x||0,v),S=e.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var w=d.getFont(),C=n.get("nameTruncate",!0)||{},k=C.ellipsis,T=lr(e.raw.nameTruncateMaxWidth,C.maxWidth,S),A=s.nameMarginLevel||0,L=new oe({x:m.x,y:m.y,rotation:b.rotation,silent:vn.isLabelSilent(n),style:Te(d,{text:c,font:w,overflow:"truncate",width:T,ellipsis:k,fill:d.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:d.get("align")||b.textAlign,verticalAlign:d.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Fo({el:L,componentModel:n,itemName:c}),L.__fullText=c,L.anid="name",n.get("triggerEvent")){var D=vn.makeAxisEventDataBase(n);D.targetType="axisName",D.name=c,At(L).eventData=D}a.add(L),L.updateTransform(),t.nameEl=L;var E=l.nameLayout=Ra({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:bh(h)?hxt[A]:fxt[A]});if(l.nameLocation=h,i.add(L),L.decomposeTransform(),e.shouldNameMoveOverlap&&E){var N=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&ft(N.labelInfoList),r.resolveAxisNameOverlap(e,r,n,E,y,N)}}}};function tN(e,t,r,n,i,a,o,s){A9(t)||bxt(e,t,i,s,n,o);var l=t.labelLayoutList;Sxt(e,n,l,a),Txt(n,e.rotation,l);var u=e.optionHideOverlap;mxt(n,l,u),u&&Bj(de(l,function(c){return c&&!c.label.ignore})),dxt(e,r,n,l)}function gxt(e,t,r,n){var i=kH(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return up(i-us/2)?(o=l?"bottom":"top",a="center"):up(i-us*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<us*1.5&&i>us/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function mxt(e,t,r){if(xj(e.axis))return;function n(s,l,u){var c=Ra(t[l]),h=Ra(t[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){md(c.label);return}if(h.suggestIgnore){md(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=aT({marginForce:d},c),h=aT({marginForce:d},h)}K_(c,h,null,{touchThreshold:f})&&md(s?h.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function yxt(e,t,r){e.showMinorTicks||R(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=b9(a),s=Ch(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){md(a);return}}})}function md(e){e&&(e.ignore=!0)}function k9(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(qe(o,o,t),qe(s,s,t));var c=new Qe({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});gh(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var h=b9(c);h.onBand=!!e[l].onBand,h.tickValue=e[l].tickValue}return a}function _xt(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),c=k9(u,r.transform,l,wt(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)t.add(c[h]);return c}function xxt(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=wt(l.getLineStyle(),wt(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var f=k9(s[h],r.transform,u,c,"minorticks_"+h),d=0;d<f.length;d++)t.add(f[d])}}function eN(e,t,r){if(A9(e)){var n=e.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&ft(e.labelGroup&&n);var i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),pT(e,null,null,null))}return!0}function bxt(e,t,r,n,i,a){var o=i.axis,s=lr(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new yt;r.add(l);var u=i0(n);if(!s||o.scale.isBlank()){pT(t,[],l,u);return}var c=i.getModel("axisLabel"),h=o.getViewLabels(u),f=(lr(e.raw.labelRotate,c.get("rotate"))||0)*us/180,d=vn.innerTextLayout(e.rotation,f,e.labelDirection),p=i.getCategories&&i.getCategories(!0),v=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;R(h,function(x,b){var S,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(x.tickValue):x.tickValue,C=x.formattedLabel,k=x.rawLabel,T=c;if(p&&p[w]){var A=p[w];xt(A)&&A.textStyle&&(T=new ne(A.textStyle,c,i.ecModel))}var L=T.getTextColor()||i.get(["axisLine","lineStyle","color"]),D=T.getShallow("align",!0)||d.textAlign,E=dt(T.getShallow("alignMinLabel",!0),D),N=dt(T.getShallow("alignMaxLabel",!0),D),P=T.getShallow("verticalAlign",!0)||T.getShallow("baseline",!0)||d.textVerticalAlign,F=dt(T.getShallow("verticalAlignMinLabel",!0),P),O=dt(T.getShallow("verticalAlignMaxLabel",!0),P),$=10+(((S=x.time)===null||S===void 0?void 0:S.level)||0);m=Math.min(m,$),y=Math.max(y,$);var V=new oe({x:0,y:0,rotation:0,silent:vn.isLabelSilent(i),z2:$,style:Te(T,{text:C,align:b===0?E:b===h.length-1?N:D,verticalAlign:b===0?F:b===h.length-1?O:P,fill:mt(L)?L(o.type==="category"?k:o.type==="value"?w+"":w,b):L})});V.anid="label_"+w;var I=Ch(V);if(I.break=x.break,I.tickValue=w,I.layoutRotation=d.rotation,Fo({el:V,componentModel:i,itemName:C,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:k,tickIndex:b}}),g){var B=vn.makeAxisEventDataBase(i);B.targetType="axisLabel",B.value=k,B.tickIndex=b,x.break&&(B.break={start:x.break.parsedBreak.vmin,end:x.break.parsedBreak.vmax}),o.type==="category"&&(B.dataIndex=w),At(V).eventData=B,x.break&&Cxt(i,a,V,x.break)}v.push(V),l.add(V)});var _=at(v,function(x){return{label:x,priority:Ch(x).break?x.z2+(y-m+1):x.z2,defaultAttr:{ignore:x.ignore}}});pT(t,_,l,u)}function A9(e){return!!e.labelLayoutList}function pT(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function Sxt(e,t,r,n){var i=t.get(["axisLabel","margin"]);R(r,function(a,o){var s=Ra(a);if(s){var l=s.label,u=Ch(l);s.suggestIgnore=l.ignore,l.ignore=!1,Py(Xa,wxt),Xa.x=t.axis.dataToCoord(u.tickValue),Xa.y=e.labelOffset+e.labelDirection*i,Xa.rotation=u.layoutRotation,n.add(Xa),Xa.updateTransform(),n.remove(Xa),Xa.decomposeTransform(),Py(l,Xa),l.markRedraw(),l0(s,!0),Ra(s)}})}var Xa=new Ut,wxt=new Ut;function BA(e){return!!e}function Cxt(e,t,r,n){r.on("click",function(i){var a={type:Q_,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function Txt(e,t,r){var n=tr();if(n){var i=n.retrieveAxisBreakPairs(r,function(o){return o&&Ch(o.label).break},!0),a=e.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&R(i,function(o){iv().adjustBreakLabelPair(e.axis.inverse,t,[Ra(r[o[0]]),Ra(r[o[1]])])})}}function f0(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(a){var d=a.toGlobalCoord(a.dataToCoord(0));f[c.onZero]=Math.max(Math.min(d,f[1]),f[0])}i.position=[l==="y"?f[c[s]]:u[0],l==="x"?f[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[o],i.labelOffset=a?f[c[o]]-f[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),lr(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-v:v,i.z2=1,i}function kxt(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function rN(e){var t={xAxisModel:null,yAxisModel:null};return R(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Ge).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+dn(e.get(i+"Index"),e.get(i+"Id"),0)+'" not found');t[n]=a}),t}function Axt(e,t,r,n,i,a){for(var o=f0(e,r),s=!1,l=!1,u=0;u<t.length;u++)QC(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new vn(r,n,o,i)}function Dxt(e,t,r){var n=f0(t,r);if(process.env.NODE_ENV!=="production"){var i=e.__getRawCfg();R(te(n),function(a){a!=="position"&&a!=="labelOffset"&&ft(n[a]===i[a])})}e.updateCfg(n)}function D9(e,t,r){var n,i=Mo.prototype,a=i.getTicks.call(r),o=i.getTicks.call(r,{expandToNicedExtent:!0}),s=a.length-1,l=i.getInterval.call(r),u=_j(e,t),c=u.extent,h=u.fixMin,f=u.fixMax;e.type==="log"&&(c=tT(e.base,c,!0)),e.setBreaksFromOption(bj(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:s,fixMin:h,fixMax:f});var d=i.getExtent.call(e);h&&(c[0]=d[0]),f&&(c[1]=d[1]);var p=i.getInterval.call(e),v=c[0],g=c[1];if(h&&f)p=(g-v)/s;else if(h)for(g=c[0]+p*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)p=a1(p),g=c[0]+p*s;else if(f)for(v=c[1]-p*s;v>c[0]&&isFinite(v)&&isFinite(c[0]);)p=a1(p),v=c[1]-p*s;else{var m=e.getTicks().length-1;m>s&&(p=a1(p));var y=p*s;g=Math.ceil(c[1]/p)*p,v=Je(g-y),v<0&&c[0]>=0?(v=0,g=Je(y)):g>0&&c[1]<=0&&(g=0,v=-Je(y))}var _=(a[0].value-o[0].value)/l,x=(a[s].value-o[s].value)/l;if(i.setExtent.call(e,v+p*_,g+p*x),i.setInterval.call(e,p),(_||x)&&i.setNiceExtent.call(e,v+p,g-p),process.env.NODE_ENV!=="production"){var b=i.getTicks.call(e);b[1]&&(!cyt(p)||gC(b[1].value)>gC(p))&&Ne("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+(" and alignTicks: true. ("+((n=t.axis)===null||n===void 0?void 0:n.dim)+"AxisIndex: "+t.componentIndex+")"),!0)}}var nN=[[3,1],[0,2]],Lxt=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=dT,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=te(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,v=d.scale;QC(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(xh(v,p),QC(v)&&(s=d))}c.length&&(s||(s=c.pop(),xh(s.scale,s.model)),R(c,function(g){D9(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){iN(n,"y",o,a)}),R(n.y,function(o){iN(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=pr(t,r),a=this._rect=Pe(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(vT(o,a),!n){var u=Ixt(a,s,o,l,r),c=void 0;if(l)gT?(gT(this._axesList,a),vT(o,a)):(process.env.NODE_ENV!=="production"&&MH("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=sN(a.clone(),"axisLabel",null,a,o,u,i));else{var h=Pxt(t,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=sN(f,d,p,a,o,u,i))}L9(a,o,Vi.determine,null,c,i)}R(this._coordsList,function(v){v.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}xt(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",Ge).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",Ge).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,$t(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,R(s.x,function(c,h){R(s.y,function(f,d){var p="x"+h+"y"+d,v=new oxt(p);v.master=i,v.model=t,i._coordsMap[p]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(f)})});function u(c){return function(h,f){if(b1(h,t)){var d=h.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new y9(c,Z_(h),[0,0],h.get("type"),d),v=p.type==="category";p.onBand=v&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=f,a._axesList.push(p),s[c][f]=p,l[c]++}}}},e.prototype._updateScale=function(t,r){R(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(kxt(i)){var a=rN(i),o=a.xAxisModel,s=a.yAxisModel;if(!b1(o,r)||!b1(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),h=l.getAxis("y");n(u,c),n(u,h)}},this);function n(i,a){R(n0(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return R(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);$t(r,a)<0&&r.push(a),$t(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){Zp({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=rN(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+dn(s.get("gridIndex"),s.get("gridId"),0)+'" not found');if(s.getCoordSysModel()!==l.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},e.dimensions=dT,e}();function b1(e,t){return e.getCoordSysModel()===t}function iN(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)aN(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&aN(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function aN(e){return e&&e.type!=="category"&&e.type!=="time"&&Nyt(e)}function Mxt(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function vT(e,t){R(e.x,function(r){return oN(r,t.x,t.width)}),R(e.y,function(r){return oN(r,t.y,t.height)})}function oN(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),Mxt(e,t)}var gT;function Ext(e){gT=e}function sN(e,t,r,n,i,a,o){process.env.NODE_ENV!=="production"&&ft(t==="all"||t==="axisLabel"),L9(n,i,Vi.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=Cu(s,function(f){return f>0})==null;return du(n,s,!0,!0,r),vT(i,n),l;function u(f){R(i[Pt[f]],function(d){if(xp(d.model)){var p=a.ensureRecord(d.model),v=p.labelInfoList;if(v)for(var g=0;g<v.length;g++){var m=v[g],y=d.scale.normalize(Ch(m.label).tickValue);y=f===1?1-y:y,c(m.rect,f,y),c(m.rect,1-f,NaN)}var _=p.nameLayout;if(_){var y=bh(p.nameLocation)?.5:NaN;c(_.rect,f,y),c(_.rect,1-f,NaN)}}})}function c(f,d,p){var v=e[Pt[d]]-f[Pt[d]],g=f[er[d]]+f[Pt[d]]-(e[er[d]]+e[Pt[d]]);v=h(v,1-p),g=h(g,p);var m=nN[d][0],y=nN[d][1];s[m]=Ue(s[m],v),s[y]=Ue(s[y],g)}function h(f,d){return f>0&&!Er(d)&&d>1e-4&&(f/=d),f}}function Ixt(e,t,r,n,i){var a=new S9(Rxt);return R(r,function(o){return R(o,function(s){if(xp(s.model)){var l=!n;s.axisBuilder=Axt(e,t,s.model,i,a,l)}})}),a}function L9(e,t,r,n,i,a){var o=r===Vi.determine;R(t,function(u){return R(u,function(c){xp(c.model)&&(Dxt(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Pt[1-u]]=e[er[u]]<=a.refContainer[er[u]]*.5?0:1-u===1?2:1}R(t,function(u,c){return R(u,function(h){xp(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function Pxt(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():i==null||i==="auto"?n=Pe(e.get("outerBounds",!0)||v9,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&ie("Invalid grid["+e.componentIndex+"].outerBoundsMode.");var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":$t(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&ie("Invalid grid["+e.componentIndex+"].outerBoundsContain."),o="all"):o=a;var s=[Ny(dt(e.get("outerBoundsClampWidth",!0),h0[0]),t.width),Ny(dt(e.get("outerBoundsClampHeight",!0),h0[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Rxt=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";w9(e,t,r,n,i,a),bh(e.nameLocation)||R(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&T9(s.labelInfoList,s.dirVec,n,i)})};function Nxt(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Oxt(r,e,t),r.seriesInvolved&&Fxt(r,e),r}function Oxt(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Cp(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(R(s.getAxes(),Bt(v,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&R(p.baseAxes,Bt(v,d?"cross":!0,f)),d&&R(p.otherAxes,Bt(v,"cross",!1))}function v(g,m,y){var _=y.model.getModel("axisPointer",i),x=_.get("show");if(!(!x||x==="auto"&&!g&&!mT(_))){m==null&&(m=_.get("triggerTooltip")),_=g?Bxt(y,h,i,t,g,m):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),w=Cp(y.model),C=m||b||y.type==="category",k=e.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:S,involveSeries:C,snap:b,useHandle:mT(_),seriesModels:[],linkGroup:null};u[w]=k,e.seriesInvolved=e.seriesInvolved||C;var T=$xt(a,y);if(T!=null){var A=o[T]||(o[T]={axesInfo:{}});A.axesInfo[w]=k,A.mapper=a[T].mapper,k.linkGroup=A}}}})}function Bxt(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(f){l[f]=_t(o.get(f))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&wt(u,h.textStyle)}}return e.model.getModel("axisPointer",new ne(l,r,n))}function Fxt(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(e.coordSysAxesInfo[Cp(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function $xt(e,t){for(var r=t.model,n=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(S1(a[n+"AxisId"],r.id)||S1(a[n+"AxisIndex"],r.componentIndex)||S1(a[n+"AxisName"],r.name))return i}}function S1(e,t){return e==="all"||nt(e)&&$t(e,t)>=0||e===t}function Vxt(e){var t=FA(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=mT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function FA(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Cp(e)]}function zxt(e){var t=FA(e);return t&&t.axisPointerModel}function mT(e){return!!e.get(["handle","show"])}function Cp(e){return e.type+"||"+e.id}var w1={},Iu=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.axisPointerClass&&Vxt(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=zxt(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&w1[r])throw new Error("axisPointer "+r+" exists");w1[r]=n},t.getAxisPointerClass=function(r){return r&&w1[r]},t.type="axis",t}(Ee),yT=qt();function M9(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,h=yT(e).splitAreaColors,f=pt(),d=0;if(h)for(var p=0;p<u.length;p++){var v=h.get(u[p].tickValue);if(v!=null){d=(v+(c-1)*p)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=nt(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),_=void 0,x=void 0,b=void 0,S=void 0;i.isHorizontal()?(_=g,x=l.y,b=y-_,S=l.height,g=_+b):(_=l.x,x=g,b=l.width,S=y-x,g=x+S);var w=u[p-1].tickValue;w!=null&&f.set(w,d),t.add(new Ut({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:b,height:S},style:wt({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%c}yT(e).splitAreaColors=f}}}function E9(e){yT(e).splitAreaColors=null}var Gxt=["splitArea","splitLine","minorSplitLine","breakArea"],I9=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!xp(r)){this._axisGroup.add(r.axis.axisBuilder.group),R(Gxt,function(l){r.get([l,"show"])&&Wxt[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Yp(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){E9(this)},t.type="cartesianAxis",t}(Iu),Wxt={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=nt(l)?l:[l];for(var h=n.coordinateSystem.getRect(),f=a.isHorizontal(),d=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=s.getLineStyle(),y=0;y<p.length;y++){var _=a.toGlobalCoord(p[y].coord);if(!(y===0&&!u||y===p.length-1&&!c)){var x=p[y].tickValue;f?(v[0]=_,v[1]=h.y,g[0]=_,g[1]=h.y+h.height):(v[0]=h.x,v[1]=_,g[0]=h.x+h.width,g[1]=_);var b=d++%l.length,S=new Qe({anid:x!=null?"line_"+x:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},style:wt({stroke:l[b]},m),silent:!0});gh(S.shape,m.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var h=[],f=[],d=s.getLineStyle(),p=0;p<c.length;p++)for(var v=0;v<c[p].length;v++){var g=a.toGlobalCoord(c[p][v].coord);u?(h[0]=g,h[1]=l.y,f[0]=g,f[1]=l.y+l.height):(h[0]=l.x,h[1]=g,f[0]=l.x+l.width,f[1]=g);var m=new Qe({anid:"minor_line_"+c[p][v].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:d,silent:!0});gh(m.shape,d.lineWidth),t.add(m)}},splitArea:function(e,t,r,n,i){M9(e,t,r,n)},breakArea:function(e,t,r,n,i){var a=iv(),o=r.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,r,n.coordinateSystem.getRect(),i)}},P9=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t}(I9),Hxt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=P9.type,r}return t.type="yAxis",t}(I9),jxt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new Ut({shape:r.coordinateSystem.getRect(),style:wt({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Ee),lN={offset:0};function R9(e){e.registerComponentView(jxt),e.registerComponentModel(Q_t),e.registerCoordinateSystem("cartesian2d",Lxt),wh(e,"x",hT,lN),wh(e,"y",hT,lN),e.registerComponentView(P9),e.registerComponentView(Hxt),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function Uxt(e,t){var r=e.coordinateSystem,n=r&&r.type,i=r&&r.getBaseAxis&&r.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=n==="cartesian2d"&&a==="ordinal"||n==="single",s=t.model.get("jitter")>0;return o&&s}var Yxt=qt();function uN(e,t,r,n){if(e instanceof y9){var i=e.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=e.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=e.scale.type==="ordinal"?e.getBandWidth():null;return o>0?s?N9(r,o,u,n):qxt(e,t,r,n,o,l):r}function N9(e,t,r,n){if(r===null)return e+(Math.random()-.5)*t;var i=r-n*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function qxt(e,t,r,n,i,a){var o=Yxt(e);o.items||(o.items=[]);var s=o.items,l=cN(s,t,r,n,i,a,1),u=cN(s,t,r,n,i,a,-1),c=Math.abs(l-r)<Math.abs(u-r)?l:u,h=e.scale.type==="ordinal"?e.getBandWidth():null,f=Math.abs(c-r);return f>i/2||h&&f>h/2-n?N9(r,i,h,n):(s.push({fixedCoord:t,floatCoord:c,r:n}),c)}function cN(e,t,r,n,i,a,o){for(var s=r,l=0;l<e.length;l++){var u=e[l],c=t-u.fixedCoord,h=s-u.floatCoord,f=c*c+h*h,d=n+u.r+a;if(f<d*d){var p=u.floatCoord+Math.sqrt(d*d-c*c)*o;if(Math.abs(p-r)>i/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p<s){s=p,l=-1;continue}}}return s}function Xxt(e){e.eachSeriesByType("scatter",function(t){var r=t.coordinateSystem;if(r&&(r.type==="cartesian2d"||r.type==="single")){var n=r.getBaseAxis?r.getBaseAxis():null,i=n&&Uxt(t,n);if(i){var a=t.getData();a.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=a.getItemLayout(o),h=a.getItemVisual(o,"symbolSize"),f=h instanceof Array?(h[1]+h[0])/2:h;if(s==="y"||s==="single"&&u){var d=uN(n,c[0],c[1],f/2);a.setItemLayout(o,[c[0],d])}else if(s==="x"||s==="single"&&!u){var d=uN(n,c[1],c[0],f/2);a.setItemLayout(o,[d,c[1]])}})}}})}function Zxt(e){Gt(R9),e.registerSeriesModel(q_t),e.registerChartView(J_t),e.registerLayout(nv("scatter"))}function Kxt(e){e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,Xxt)}function Jxt(e){e.eachSeriesByType("radar",function(t){var r=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();R(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=hN(c)?c:fN(i)})}),r.each(function(o){var s=Cu(n[o],function(l){return hN(l)})||fN(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function hN(e){return!isNaN(e[0])&&!isNaN(e[1])}function fN(e){return[e.cx,e.cy]}function Qxt(e){var t=e.polar;if(t){nt(t)||(t=[t]);var r=[];R(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],nt(e.radar)||(e.radar=[e.radar]),e.radar.push(n)):r.push(n)}),e.polar=r}R(e.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var tbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(f,d){var p=f.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var v=Zh(f.getItemVisual(d,"symbolSize")),g=nr(p,-1,-1,2,2),m=f.getItemVisual(d,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(f,d,p,v,g,m){p.removeAll();for(var y=0;y<d.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,f[y]?(_.setPosition(f[y]),Au[m?"initProps":"updateProps"](_,{x:d[y][0],y:d[y][1]},r,g)):_.setPosition(d[y]),p.add(_))}}function h(f){return at(f,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(f){var d=s.getItemLayout(f);if(d){var p=new Qr,v=new Gr,g={shape:{points:d}};p.shape.points=h(d),v.shape.points=h(d),Le(p,g,r,f),Le(v,g,r,f);var m=new yt,y=new yt;m.add(v),m.add(p),m.add(y),c(v.shape.points,d,y,s,f,!0),s.setItemGraphicEl(f,m)}}).update(function(f,d){var p=l.getItemGraphicEl(d),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(f)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,s,f,!1),gi(g),gi(v),se(v,y,r),se(g,y,r),s.setItemGraphicEl(f,p))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,d){var p=s.getItemModel(d),v=f.childAt(0),g=f.childAt(1),m=f.childAt(2),y=s.getItemVisual(d,"style"),_=y.fill;o.add(f),v.useStyle(wt(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),fr(v,p,"lineStyle"),fr(g,p,"areaStyle");var x=p.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,R(["emphasis","select","blur"],function(w){var C=p.getModel([w,"areaStyle"]),k=C.isEmpty()&&C.parentModel.isEmpty();g.ensureState(w).ignore=k&&b;var T=p.getModel([w,"lineStyle"]).getLineStyle();v.ensureState(w).style=T;var A=C.getAreaStyle();g.ensureState(w).style=A;var L=p.getModel([w,"itemStyle"]).getItemStyle();m.eachChild(function(D){D.ensureState(w).style=_t(L)})}),g.useStyle(wt(p.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var S=p.getModel("emphasis");m.eachChild(function(w){if(w instanceof Rr){var C=w.style;w.useStyle(et({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},y))}else w.useStyle(y),w.setColor(_),w.style.strokeNoScale=!0;var k=s.getStore().get(s.getDimensionIndex(w.__dimIdx),d);(k==null||isNaN(k))&&(k=""),Cr(w,dr(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:w.__dimIdx,defaultText:k,inheritColor:_,defaultOpacity:y.opacity})}),Ie(f,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(ye),ebt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return Qh(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=x8(this,r);return rr("section",{header:u,sortBlocks:!0,blocks:at(s,function(h){var f=a.get(a.mapDimension(h.dim),r);return rr("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:f,sortParam:f})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(at(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(Ae),Ff=m9.value;function Tg(e,t){return wt({show:t},e)}var rbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),f=this.get("triggerEvent"),d=at(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=wt({color:p.color},l));var g=zt(_t(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:v,triggerEvent:f},!1);if(lt(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else mt(c)&&(g.name=c(g.name,g));var y=new ne(g,null,this.ecModel);return ir(y,Qp.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:U.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:zt({lineStyle:{color:U.color.neutral20}},Ff.axisLine),axisLabel:Tg(Ff.axisLabel,!1),axisTick:Tg(Ff.axisTick,!1),splitLine:Tg(Ff.splitLine,!0),splitArea:Tg(Ff.splitArea,!0),indicator:[]},t}(Zt),nbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=at(a,function(s){var l=s.model.get("showName")?s.name:"",u=new vn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=nt(f)?f:[f],v=nt(d)?d:[d],g=[],m=[];function y(N,P,F){var O=F%P.length;return N[O]=N[O]||[],O}if(a==="circle")for(var _=i[0].getTicksCoords(),x=n.cx,b=n.cy,S=0;S<_.length;S++){if(c){var w=y(g,p,S);g[w].push(new Bo({shape:{cx:x,cy:b,r:_[S].coord}}))}if(h&&S<_.length-1){var w=y(m,v,S);m[w].push(new jp({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var C,k=at(i,function(N,P){var F=N.getTicksCoords();return C=C==null?F.length-1:Math.min(F.length-1,C),at(F,function(O){return n.coordToPoint(O.coord,P)})}),T=[],S=0;S<=C;S++){for(var A=[],L=0;L<i.length;L++)A.push(k[L][S]);if(A[0]?A.push(A[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+S),c){var w=y(g,p,S);g[w].push(new Gr({shape:{points:A}}))}if(h&&T){var w=y(m,v,S-1);m[w].push(new Qr({shape:{points:A.concat(T)}}))}T=A.slice().reverse()}var D=l.getLineStyle(),E=u.getAreaStyle();R(m,function(N,P){this.group.add(li(N,{style:wt({stroke:"none",fill:v[P%v.length]},E),silent:!0}))},this),R(g,function(N,P){this.group.add(li(N,{style:wt({fill:"none",stroke:p[P%p.length]},D),silent:!0}))},this)},t.type="radar",t}(Ee),ibt=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(ji),abt=function(){function e(t,r,n){this.dimensions=[],this._model=t,this._indicatorAxes=at(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new ibt(o,new Mo);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(t),r)},e.prototype.coordToPoint=function(t,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<o&&(s=c,l=u,o=h)}return[l,+(s&&s.coordToData(i))]},e.prototype.resize=function(t,r){var n=pr(t,r).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=st(i[0],n.width)+n.x,this.cy=st(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(lt(o)||ae(o))&&(o=[0,o]),this.r0=st(o[0],a),this.r=st(o[1],a),R(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,i=this._model;R(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();R(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Mo;o.setExtent(0,a),o.setInterval(1),R(n,function(s,l){D9(s.scale,s.model,o)})},e.prototype.convertToPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,r){var n=[];return t.eachComponent("radar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},e.dimensions=[],e}();function obt(e){e.registerCoordinateSystem("radar",abt),e.registerComponentModel(rbt),e.registerComponentView(nbt),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function sbt(e){Gt(obt),e.registerChartView(tbt),e.registerSeriesModel(ebt),e.registerLayout(Jxt),e.registerProcessor(Jh("radar")),e.registerPreprocessor(Qxt)}var $A=qt();function lbt(e,t,r){$A(e)[t]=r}function ubt(e,t,r){var n=$A(e),i=n[t];i===r&&(n[t]=null)}function dN(e,t){return!!$A(e)[t]}Fa({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ye);var cbt={axisPointer:1,tooltip:1,brush:1};function O9(e,t,r){var n=t.getComponentByElement(e.topTarget);if(!n||n===r||cbt.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===r)return!1;var a=pu(n),o=pu(r);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var Pu=function(e){q(t,e);function t(r){var n=e.call(this)||this;n._zr=r;var i=ut(n._mousedownHandler,n),a=ut(n._mousemoveHandler,n),o=ut(n._mouseupHandler,n),s=ut(n._mousewheelHandler,n),l=ut(n._pinchHandler,n);return n.enable=function(u,c){var h=c.zInfo,f=pu(h.component),d=f.z,p=f.zlevel,v={component:h.component,z:d,zlevel:p,z2:dt(h.z2,-1/0)},g=et({},c.triggerInfo);this._opt=wt(et({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:v,triggerInfo:g}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Vf(r,"mousedown",i,v),Vf(r,"mousemove",a,v),Vf(r,"mouseup",o,v)),(u===!0||u==="scale"||u==="zoom")&&(Vf(r,"mousewheel",s,v),Vf(r,"pinch",l,v)))},n.disable=function(){this._enabled=!1,zf(r,"mousedown",i),zf(r,"mousemove",a),zf(r,"mouseup",o),zf(r,"mousewheel",s),zf(r,"pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(r,n,i){var a=this._opt,o=a.zInfoParsed;if(O9(r,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(r,n,i)),u&&s.isInClip&&!s.isInClip(r,n,i)&&(u=!1),u},t.prototype._decideCursorStyle=function(r,n,i,a){var o=r.target;if(!o&&this._checkPointer(r,n,i))return"grab";if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(r){if(!(DE(r)||$f(r))){for(var n=r.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=r.offsetX,a=r.offsetY;this._checkPointer(r,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(r){var n=this._zr;if(!(r.gestureEvent==="pinch"||dN(n,"globalPan")||$f(r))){var i=r.offsetX,a=r.offsetY;if(!this._dragging||!Am("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&To(r.event),r.__ecRoamConsumed=!0,pN(this,"pan","moveOnMouseMove",r,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(r){if(!$f(r)){var n=this._zr;if(!DE(r)){this._dragging=!1;var i=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);i&&n.setCursorStyle(i)}}},t.prototype._mousewheelHandler=function(r){if(!$f(r)){var n=Am("zoomOnMouseWheel",r,this._opt),i=Am("moveOnMouseWheel",r,this._opt),a=r.wheelDelta,o=Math.abs(a),s=r.offsetX,l=r.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(dN(this._zr,"globalPan")||$f(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(To(a.event),a.__ecRoamConsumed=!0,pN(r,n,i,a,o))},t}(yi);function $f(e){return e.__ecRoamConsumed}var hbt=qt();function tx(e){var t=hbt(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Vf(e,t,r,n){for(var i=tx(e),a=i.roam,o=a[t]=a[t]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:r,zInfoParsed:n}),fbt(e,t)}function zf(e,t,r){for(var n=tx(e),i=n.roam[t]||[],a=0;a<i.length;a++)if(i[a].listener===r){i.splice(a,1),i.length||dbt(e,t);return}}function fbt(e,t){var r=tx(e);r.uniform[t]||e.on(t,r.uniform[t]=function(n){var i=r.roam[t];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function dbt(e,t){var r=tx(e),n=r.uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function pN(e,t,r,n,i){i.isAvailableBehavior=ut(Am,null,r,n),e.trigger(t,i)}function Am(e,t,r){var n=r[e];return!e||n&&(!lt(n)||t.event[n+"Key"])}function VA(e,t,r){var n=e.target;n.x+=t,n.y+=r,n.dirty()}function zA(e,t,r,n){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;o*=t,o=GA(o,a);var s=o/e.zoom;e.zoom=o,F9(i,r,n,s),i.dirty()}function B9(e,t,r,n,i,a){var o=new Ct(0,0,0,0);n.enable(e.get("roam"),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(u,c,h){return o.copy(r.getBoundingRect()),o.applyTransform(r.getComputedTransform()),o.contain(c,h)},isInClip:function(u,c,h){return!a||a.contain(c,h)}}}),i.zoomLimit=e.get("scaleLimit");var s=e.coordinateSystem;i.zoom=s?s.getZoom():1;var l=e.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){VA(i,u.dx,u.dy),t.dispatchAction({seriesId:e.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){zA(i,u.scale,u.originX,u.originY),t.dispatchAction({seriesId:e.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),t.updateLabelLayout()})}function vN(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function ex(e,t,r){var n=e.getZoom(),i=e.getCenter(),a=t.zoom,o=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,e.setCenter(vN(e,o))),a!=null&&(a=GA(n*a,r)/n,F9(e,t.originX,t.originY,a),e.updateTransform(),e.setCenter(vN(e,o)),e.setZoom(a*n)),{center:e.getCenter(),zoom:e.getZoom()}}function F9(e,t,r,n){e.x-=(t-e.x)*(n-1),e.y-=(r-e.y)*(n-1),e.scaleX*=n,e.scaleY*=n}function GA(e,t){if(t){var r=t.min||0,n=t.max||1/0;e=Math.max(Math.min(n,e),r)}return e}function $9(e){if(lt(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var C1,d0={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"},gN=te(d0),p0={"alignment-baseline":"textBaseline","stop-color":"stopColor"},mN=te(p0),pbt=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=$9(t);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var i=new yt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),On(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;mbt(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(o){var f=rx(o);f.length>=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=z9(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new yt,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Ut({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=C1[s];if(c&&ct(C1,s)){l=c.call(this,t,r);var h=t.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=yN[s];if(d&&ct(yN,s)){var p=d.call(this,t),v=t.getAttribute("id");v&&(this._defs[v]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},e.prototype._parseText=function(t,r){var n=new vh({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Jn(r,n),On(t,n,this._defsUsePending,!1,!1),vbt(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){C1={g:function(t,r){var n=new yt;return Jn(r,n),On(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new Ut;return Jn(r,n),On(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,r){var n=new Bo;return Jn(r,n),On(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,r){var n=new Qe;return Jn(r,n),On(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,r){var n=new F_;return Jn(r,n),On(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,r){var n=t.getAttribute("points"),i;n&&(i=bN(n));var a=new Qr({shape:{points:i||[]},silent:!0});return Jn(r,a),On(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=bN(n));var a=new Gr({shape:{points:i||[]},silent:!0});return Jn(r,a),On(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new Rr;return Jn(r,n),On(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,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new yt;return Jn(r,s),On(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new yt;return Jn(r,s),On(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=s6(n);return Jn(r,i),On(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),yN={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new Wh(t,r,n,i);return _N(e,a),xN(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new h6(t,r,n);return _N(e,i),xN(e,i),i}};function _N(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function xN(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};V9(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=En(o),u=l&&l[3];u&&(l[3]*=ps(s),o=wa(l,"rgba"))}t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Jn(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),wt(t.__inheritedStyle,e.__inheritedStyle))}function bN(e){for(var t=rx(e),r=[],n=0;n<t.length;n+=2){var i=parseFloat(t[n]),a=parseFloat(t[n+1]);r.push([i,a])}return r}function On(e,t,r,n,i){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};e.nodeType===1&&(xbt(e,t),V9(e,o,s),n||bbt(e,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=SN(a,"fill",o.fill,r)),o.stroke!=null&&(a.style.stroke=SN(a,"stroke",o.stroke,r)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=at(rx(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function vbt(e,t){var r=t.__selfStyle;if(r){var n=r.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),e.style.textBaseline=i}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),e.style.textAlign=s)}}var gbt=/^url\(\s*#(.*?)\)/;function SN(e,t,r,n){var i=r&&r.match(gbt);if(i){var a=ci(i[1]);n.push([e,t,a]);return}return r==="none"&&(r=null),r}function mbt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n[0].style[n[1]]=e[n[2]]}}var ybt=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function rx(e){return e.match(ybt)||[]}var _bt=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,T1=Math.PI/180;function xbt(e,t){var r=e.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=[],i=null;r.replace(_bt,function(h,f,d){return n.push(f,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=rx(o);switch(i=i||Ir(),s){case"translate":La(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Dk(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Os(i,i,-parseFloat(l[0])*T1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*T1);Sa(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*T1);Sa(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var wN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function V9(e,t,r){var n=e.getAttribute("style");if(n){wN.lastIndex=0;for(var i;(i=wN.exec(n))!=null;){var a=i[1],o=ct(d0,a)?d0[a]:null;o&&(t[o]=i[2]);var s=ct(p0,a)?p0[a]:null;s&&(r[s]=i[2])}}}function bbt(e,t,r){for(var n=0;n<gN.length;n++){var i=gN[n],a=e.getAttribute(i);a!=null&&(t[d0[i]]=a)}for(var n=0;n<mN.length;n++){var i=mN[n],a=e.getAttribute(i);a!=null&&(r[p0[i]]=a)}}function z9(e,t){var r=t.width/e.width,n=t.height/e.height,i=Math.min(r,n);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function Sbt(e,t){var r=new pbt;return r.parse(e,t)}var wbt=pt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Cbt=function(){function e(t,r){this.type="geoSVG",this._usedGraphicMap=pt(),this._freedGraphics=[],this._mapName=t,this._parsedXML=$9(r)}return e.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 r=kbt(t.named),n=r.regions,i=r.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(t){var r,n;try{r=t&&Sbt(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=r.root,ft(n!=null)}catch(g){throw new Error(`Invalid svg format
360
- `+g.message)}var i=new yt;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=r.width,o=r.height,s=r.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,f=void 0;if(a!=null?(u=0,h=a):s&&(u=s.x,h=s.width),o!=null?(c=0,f=o):s&&(c=s.y,f=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,h=d.width),c==null&&(c=d.y,f=d.height)}l=this._boundingRect=new Ct(u,c,h,f)}if(s){var p=z9(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}i.setClipPath(new Ut({shape:l.plain()}));var v=[];return R(r.named,function(g){wbt.get(g.svgNodeTagLower)!=null&&(v.push(g),Tbt(g.el))}),{root:i,boundingRect:l,named:v}},e.prototype.useGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),r.set(t,n),n)},e.prototype.freeGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);n&&(r.removeKey(t),this._freedGraphics.push(n))},e}();function Tbt(e){e.silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1})}function kbt(e){var t=[],r=pt();return R(e,function(n){if(n.namedFrom==null){var i=new zyt(n.name,n.el);t.push(i),r.set(n.name,i)}}),{regions:t,regionsMap:r}}var _T=[126,25],CN="南海诸岛",xl=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var pl=0;pl<xl.length;pl++)for(var oc=0;oc<xl[pl].length;oc++)xl[pl][oc][0]/=10.5,xl[pl][oc][1]/=-10.5/.75,xl[pl][oc][0]+=_T[0],xl[pl][oc][1]+=_T[1];function Abt(e,t){if(e==="china"){for(var r=0;r<t.length;r++)if(t[r].name===CN)return;t.push(new wj(CN,at(xl,function(n){return{type:"polygon",exterior:n}}),_T))}}var Dbt={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Lbt(e,t){if(e==="china"){var r=Dbt[t.name];if(r){var n=t.getCenter();n[0]+=r[0]/10.5,n[1]+=-r[1]/(10.5/.75),t.setCenter(n)}}}var Mbt=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Ebt(e,t){e==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:Mbt[0]})}var Ibt="name",Pbt=function(){function e(t,r,n){this.type="geoJSON",this._parsedMap=pt(),this._mapName=t,this._specialAreas=n,this._geoJSON=Nbt(r)}return e.prototype.load=function(t,r){r=r||Ibt;var n=this._parsedMap.get(r);if(!n){var i=this._parseToRegions(r);n=this._parsedMap.set(r,{regions:i,boundingRect:Rbt(i)})}var a=pt(),o=[];return R(n.regions,function(s){var l=s.name;t&&ct(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Ct(0,0,0,0),regionsMap:a}},e.prototype._parseToRegions=function(t){var r=this._mapName,n=this._geoJSON,i;try{i=n?Wyt(n,t):[]}catch(a){throw new Error(`Invalid geoJson format
361
- `+a.message)}return Abt(r,i),R(i,function(a){var o=a.name;Lbt(r,a),Ebt(r,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function Rbt(e){for(var t,r=0;r<e.length;r++){var n=e[r].getBoundingRect();t=t||n.clone(),t.union(n)}return t}function Nbt(e){return lt(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var Gf=pt();const Eo={registerMap:function(e,t,r){if(t.svg){var n=new Cbt(e,t.svg);Gf.set(e,n)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?r=t.specialAreas:i=t;var n=new Pbt(e,i,r);Gf.set(e,n)}},getGeoResource:function(e){return Gf.get(e)},getMapForUser:function(e){var t=Gf.get(e);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(e,t,r){var n=Gf.get(e);if(!n){process.env.NODE_ENV!=="production"&&console.error("Map "+e+" not exists. The GeoJSON of the map must be provided.");return}return n.load(t,r)}};var WA=["rect","circle","line","ellipse","polygon","polyline","path"],Obt=pt(WA),Bbt=pt(WA.concat(["g"])),Fbt=pt(WA.concat(["g"])),G9=qt();function kg(e){var t=e.getItemStyle(),r=e.get("areaColor");return r!=null&&(t.fill=r),t}function TN(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var W9=function(){function e(t){var r=this.group=new yt,n=this._transformGroup=new yt;r.add(n),this.uid=Uh("ec_map_draw"),this._controller=new Pu(t.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new yt),n.add(this._svgGroup=new yt)}return e.prototype.draw=function(t,r,n,i,a){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&r.eachComponent({mainType:"series",subType:"map"},function(_){!s&&_.getHostGeoModel()===t&&(s=_.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,h=l.getTransformInfo(),f=h.raw,d=h.roam,p=!u.childAt(0)||a,v=t.getShallow("clip",!0),g;v?(g=l.getViewRect().clone(),this.group.setClipPath(new Ut({shape:g.clone()}))):this.group.removeClipPath(),p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):se(c,d,t);var m=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,y={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:m,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(t,g,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=pt(),n=pt(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],v=!u&&l&&l.project,g=0;g<d.length;++g){var m=c(d[g],v);m&&p.push(m)}return p}function f(d){return{shape:{points:h(d)}}}i.removeAll(),R(t.geo.regions,function(d){var p=d.name,v=r.get(p),g=n.get(p)||{},m=g.dataIdx,y=g.regionModel;if(!v){v=r.set(p,new yt),i.add(v),m=s?s.indexOfName(p):null,y=t.isGeo?o.getRegionModel(p):s?s.getItemModel(m):null;var _=y.get("silent",!0);_!=null&&(v.silent=_),n.set(p,{dataIdx:m,regionModel:y})}var x=[],b=[];R(d.geometries,function(C){if(C.type==="polygon"){var k=[C.exterior].concat(C.interiors||[]);u&&(k=EN(k,u)),R(k,function(A){x.push(new Qr(f(A)))})}else{var T=C.points;u&&(T=EN(T,u,!0)),R(T,function(A){b.push(new Gr(f(A)))})}});var S=c(d.getCenter(),l&&l.project);function w(C,k){if(C.length){var T=new V_({culling:!0,segmentIgnoreThreshold:1,shape:{paths:C}});v.add(T),kN(t,T,m,y),AN(t,T,p,y,o,m,S),k&&(TN(T),R(T.states,TN))}}w(x),w(b,!0)}),r.each(function(d,p){var v=n.get(p),g=v.dataIdx,m=v.regionModel;DN(t,d,p,m,o,g),LN(t,d,p,m,o),MN(t,d,p,m,o)},this)},e.prototype._buildSVG=function(t){var r=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(r)&&(this._freeSVG(),this._useSVG(r));var i=this._svgDispatcherMap=pt(),a=!1;R(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,c=o.svgNodeTagLower,h=o.el,f=u?u.indexOfName(s):null,d=l.getRegionModel(s);Obt.get(c)!=null&&h instanceof vi&&kN(t,h,f,d),h instanceof vi&&(h.culling=!0);var p=d.get("silent",!0);if(p!=null&&(h.silent=p),h.z2EmphasisLift=0,!o.namedFrom&&(Fbt.get(c)!=null&&AN(t,h,s,d,l,f,null),DN(t,h,s,d,l,f),LN(t,h,s,d,l),Bbt.get(c)!=null)){var v=MN(t,h,s,d,l);v==="self"&&(a=!0);var g=i.get(s)||i.set(s,[]);g.push(h)}},this),this._enableBlurEntireSVG(a,t)},e.prototype._enableBlurEntireSVG=function(t,r){if(t&&r.isGeo){var n=r.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){fu(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(t,r){if(t==null)return[];var n=r.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(t);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},e.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},e.prototype._useSVG=function(t){var r=Eo.getGeoResource(t);if(r&&r.type==="geoSVG"){var n=r.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},e.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var r=Eo.getGeoResource(t);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(t,r,n,i){var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1,{api:i,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(c,h,f){return a.containPoint([h,f])},isInClip:function(c,h,f){return!r||r.contain(h,f)}}});var l=t.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=t.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,VA(s,c.dx,c.dy),i.dispatchAction(et(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,zA(s,c.scale,c.originX,c.originY),i.dispatchAction(et(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var r=t.getTextContent();r&&(r.ignore=G9(r).ignore)})},e.prototype._updateMapSelectHandler=function(t,r,n,i){var a=this;r.off("mousedown"),r.off("click"),t.get("selectedMode")&&(r.on("mousedown",function(){a._mouseDownFlag=!0}),r.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},e}();function kN(e,t,r,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=kg(i),u=kg(a),c=kg(s),h=kg(o),f=e.data;if(f){var d=f.getItemVisual(r,"style"),p=f.getItemVisual(r,"decal");e.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=yh(p,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=h,fu(t)}function AN(e,t,r,n,i,a,o){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var h=l?r:a,f=void 0;(!s||a>=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Cr(t,dr(n),{labelFetcher:f,labelDataIndex:h,defaultText:r},d);var p=t.getTextContent();if(p&&(G9(p).ignore=p.ignore,t.textConfig&&o)){var v=t.getBoundingRect().clone();t.textConfig.layoutRect=v,t.textConfig.position=[(o[0]-v.x)/v.width*100+"%",(o[1]-v.y)/v.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function DN(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):At(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function LN(e,t,r,n,i){e.data||Fo({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function MN(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Ie(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&Vdt(t,i,r),o}function EN(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(e,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!r&&s.polygonEnd(),n}var $bt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===r.id){var s=this._mapDraw;s&&o.add(s.group)}else if(r.needsDrawMap){var s=this._mapDraw||new W9(i);o.add(s.group),s.draw(r,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;r.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(r,n,i)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(r,n,i){var a=r.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,f=new Bo({style:{fill:r.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:Gh+1)});if(!h){var d=r.mainSeries.getData(),p=a.getName(l),v=d.indexOfName(p),g=a.getItemModel(l),m=g.getModel("label"),y=d.getItemGraphicEl(v);Cr(f,dr(g),{labelFetcher:{getFormattedLabel:function(_,x){return r.getFormattedLabel(v,x)}},defaultText:p}),f.disableLabelAnimation=!0,m.get("position")||f.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){$y(f,_)}}o.add(f)}}})},t.type="map",t}(ye),Vbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},r}return t.prototype.getInitialData=function(r){for(var n=Qh(this,{coordDimensions:["value"],encodeDefaulter:Bt(oA,this)}),i=pt(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=Eo.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return R(u.regions,function(c){var h=c.name,f=i.get(h),d=c.properties&&c.properties.echartsStyle,p;f==null?(p={name:h},a.push(p)):p=n.getRawDataItem(f),d&&zt(p,d)}),n.appendData(a),n},t.prototype.getHostGeoModel=function(){if(F6(this).kind!==ha.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(r){var n=this.getData();return n.get(n.mapDimension("value"),r)},t.prototype.getRegionModel=function(r){var n=this.getData();return n.getItemModel(n.indexOfName(r))},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData(),o=this.getRawValue(r),s=a.getName(r),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(s),f=a.mapDimension("value");isNaN(l[c].originalData.get(f,h))||u.push(l[c].name)}return rr("section",{header:u.join(", "),noHeader:!u.length,blocks:[rr("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.getLegendIcon=function(r){var n=r.icon||"roundRect",i=nr(n,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return i.setStyle(r.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=U.color.neutral00,i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:U.color.tertiary},itemStyle:{borderWidth:.5,borderColor:U.color.border,areaColor:U.color.background},emphasis:{label:{show:!0,color:U.color.primary},itemStyle:{areaColor:U.color.highlight}},select:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},nameProperty:"name"},t}(Ae);function zbt(e,t){var r={};return R(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c<u;c++)s=Math.min(s,r[a][c]),l=Math.max(l,r[a][c]),o+=r[a][c];var h;return t==="min"?h=s:t==="max"?h=l:t==="average"?h=o/u:h=o,u===0?NaN:h})}function Gbt(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getHostGeoModel(),i=n?"o"+n.id:"i"+r.getMapType();(t[i]=t[i]||[]).push(r)}),R(t,function(r,n){for(var i=zbt(at(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),a=0;a<r.length;a++)r[a].originalData=r[a].getData();for(var a=0;a<r.length;a++)r[a].seriesGroup=r,r[a].needsDrawMap=a===0&&!r[a].getHostGeoModel(),r[a].setData(i.cloneShallow()),r[a].mainSeries=r[0]})}function Wbt(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getMapType();if(!(r.getHostGeoModel()||t[n])){var i={};R(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&e.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),f=s.getRegion(h);if(!(!f||isNaN(u))){var d=i[h]||0,p=s.dataToPoint(f.getCenter());i[h]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});var a=r.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),t[n]=!0}})}var IN=qe,Ru=function(e){q(t,e);function t(r,n){var i=e.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new uo,i._rawTransformable=new uo,i.name=r,i._opt=n,i}return t.prototype.setBoundingRect=function(r,n,i,a){return this._rect=new Ct(r,n,i,a),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(r,n,i,a){this._transformTo(r,n,i,a),this._viewRect=new Ct(r,n,i,a)},t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Ct(r,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(r){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&r&&(r=[st(r[0],n.api.getWidth()),st(r[1],n.api.getWidth())]),this._centerOption=_t(r),this._updateCenterAndZoom()},t.prototype.setZoom=function(r){this._zoom=GA(r||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var r=this.getBoundingRect(),n=r.x+r.width/2,i=r.y+r.height/2;return[n,i]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var r=this._centerOption,n=this._rect;r&&n&&(this._center=[st(r[0],n.width,n.x),st(r[1],n.height,n.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=qe([],s,i),o=qe([],o,i),a.originX=s[0],a.originY=s[1],a.x=o[0]-s[0],a.y=o[1]-s[1],a.scaleX=a.scaleY=l,this._updateTransform()},t.prototype._updateTransform=function(){var r=this._roamTransformable,n=this._rawTransformable;n.parent=r,r.updateTransform(),n.updateTransform(),C_(this.transform||(this.transform=[]),n.transform||Ir()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Fi(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var r=this._rawTransformable,n=this._roamTransformable,i=new uo;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var r=this.getBoundingRect().clone();return r.applyTransform(this.transform),r},t.prototype.dataToPoint=function(r,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?IN(i,r,a):an(i,r)},t.prototype.pointToData=function(r,n,i){i=i||[];var a=this.invTransform;return a?IN(i,r,a):(i[0]=r[0],i[1]=r[1],i)},t.prototype.convertToPixel=function(r,n,i){var a=PN(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=PN(n);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(r){return this.getViewRectAfterRoam().contain(r[0],r[1])},t.dimensions=["x","y"],t}(uo);function PN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var Hbt={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},H9=["lng","lat"],xT=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,{api:i.api,ecModel:i.ecModel})||this;a.dimensions=H9,a.type="geo",a._nameCoordMap=pt(),a.map=n;var o=i.projection,s=Eo.load(n,i.nameMap,i.nameProperty),l=Eo.getGeoResource(n),u=a.resourceType=l?l.type:null,c=a.regions=s.regions,h=Hbt[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,process.env.NODE_ENV!=="production"&&o&&(u==="geoSVG"&&(process.env.NODE_ENV!=="production"&&Ne("Map "+n+" with SVG source can't use projection. Only GeoJSON source supports projection."),o=null),o.project&&o.unproject||(process.env.NODE_ENV!=="production"&&Ne("project and unproject must be both provided in the projeciton."),o=null)),a.projection=o;var f;if(o)for(var d=0;d<c.length;d++){var p=c[d].getBoundingRect(o);f=f||p.clone(),f.union(p)}else f=s.boundingRect;return a.setBoundingRect(f.x,f.y,f.width,f.height),a.aspectScale=o?1:dt(i.aspectScale,h.aspectScale),a._invertLongitute=o?!1:h.invertLongitute,a}return t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Ct(r,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(r){return this._regionsMap.get(r)},t.prototype.getRegionByCoord=function(r){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(r))return n[i]}},t.prototype.addGeoCoord=function(r,n){this._nameCoordMap.set(r,n)},t.prototype.getGeoCoord=function(r){var n=this._regionsMap.get(r);return this._nameCoordMap.get(r)||n&&n.getCenter()},t.prototype.dataToPoint=function(r,n,i){if(lt(r)&&(r=this.getGeoCoord(r)),r){var a=this.projection;return a&&(r=a.project(r)),r&&this.projectedToPoint(r,n,i)}},t.prototype.pointToData=function(r,n,i){var a=this.projection;return a&&(r=a.unproject(r)),r&&this.pointToProjected(r,i)},t.prototype.pointToProjected=function(r,n){return e.prototype.pointToData.call(this,r,0,n)},t.prototype.projectedToPoint=function(r,n,i){return e.prototype.dataToPoint.call(this,r,n,i)},t.prototype.convertToPixel=function(r,n,i){var a=RN(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=RN(n);return a===this?a.pointToData(i):null},t}(Ru);ir(xT,Ru);function RN(e){var t=e.geoModel,r=e.seriesModel;return t?t.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",Ge).models[0]||{}).coordinateSystem:null}function NN(e,t){var r=e.get("boundingCoords");if(r!=null){var n=r[0],i=r[1];if(!(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])))process.env.NODE_ENV!=="production"&&console.error("Invalid boundingCoords");else{var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(b,S,w,C){for(var k=w-b,T=C-S,A=0;A<=100;A++){var L=A/100,D=a.project([b+k*L,S+T*L]);is(n,n,D),as(i,i,D)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var h=this.getBoundingRect(),f=e.get("layoutCenter"),d=e.get("layoutSize"),p=pr(e,t).refContainer,v=h.width/h.height*this.aspectScale,g=!1,m,y;f&&d&&(m=[st(f[0],p.width)+p.x,st(f[1],p.height)+p.y],y=st(d,Math.min(p.width,p.height)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(y)?g=!0:process.env.NODE_ENV!=="production"&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var _;if(g)_={},v>1?(_.width=y,_.height=y/v):(_.height=y,_.width=y*v),_.y=m[1]-_.height/2,_.x=m[0]-_.width/2;else{var x=e.getBoxLayoutParams();x.aspect=v,_=Pe(x,p),_=W6(e,_,v)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function jbt(e,t){R(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var Ubt=function(){function e(){this.dimensions=H9}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new xT(l+s,l,et({nameMap:o.get("nameMap"),api:r,ecModel:t},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=NN,u.resize(o,r)}),t.eachSeries(function(o){Zp({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Ge).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=at(o,function(c){return c.get("nameMap")}),u=new xT(s,s,et({nameMap:Ck(l),api:r,ecModel:t},i(o[0])));u.zoomLimit=lr.apply(null,at(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=NN,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,jbt(u,c)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=pt(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Eo.load(r,n,i);return R(l.regions,function(u){var c=u.name,h=o.get(c),f=u.properties&&u.properties.echartsStyle;h||(h={name:c},a.push(h)),f&&zt(h,f)}),a},e}(),j9=new Ubt,Ybt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i);var a=Eo.getGeoResource(r.map);if(a&&a.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||U.color.backgroundTint)}uu(r,"label",["show"])},t.prototype.optionUpdated=function(){var r=this,n=this.option;n.regions=j9.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=Da(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new ne(o,r,r.ecModel)),o.selected&&(i[s]=!0)),a},pt()),n.selectedMap||(n.selectedMap=i)},t.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new ne(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(r,n){var i=this.getRegionModel(r),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:r};if(mt(a))return o.status=n,a(o);if(lt(a))return a.replace("{a}",r??"")},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.select=function(r){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[r]=!0}},t.prototype.unSelect=function(r){var n=this.option.selectedMap;n&&(n[r]=!1)},t.prototype.toggleSelected=function(r){this[this.isSelected(r)?"unSelect":"select"](r)},t.prototype.isSelected=function(r){var n=this.option.selectedMap;return!!(n&&n[r])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:U.color.tertiary},itemStyle:{borderWidth:.5,borderColor:U.color.border},emphasis:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},select:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},regions:[]},t}(Zt),qbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.focusBlurEnabled=!0,r}return t.prototype.init=function(r,n){this._api=n},t.prototype.render=function(r,n,i,a){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new W9(i));var o=this._mapDraw;o.draw(r,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,n,i)},t.prototype._handleRegionClick=function(r){var n;Fl(r.target,function(i){return(n=At(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},t.prototype.updateSelectStatus=function(r,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=At(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(r){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(r,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Ee);function Xbt(e,t,r){Eo.registerMap(e,t,r)}function U9(e){e.registerCoordinateSystem("geo",j9),e.registerComponentModel(Ybt),e.registerComponentView(qbt),e.registerImpl("registerMap",Xbt),e.registerImpl("getMap",function(r){return Eo.getMapForUser(r)});function t(r,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[r](i.name);var u=l.coordinateSystem;R(u.regions,function(h){o[h.name]=l.isSelected(h.name)||!1});var c=[];R(o,function(h,f){o[f]&&c.push(f)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(r,n,i){var a=r.componentType;a||(r.geoId!=null?a="geo":r.seriesId!=null&&(a="series")),a||(a="series"),n.eachComponent({mainType:a,query:r},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=ex(s,r,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&R(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Zbt(e){Gt(U9),e.registerChartView($bt),e.registerSeriesModel(Vbt),e.registerLayout(Wbt),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Gbt),I8("map",e.registerAction)}function Kbt(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var r=[t],n,i;n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Jbt(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){t1t(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=e1t(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function Qbt(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function ON(e){return arguments.length?e:i1t}function yd(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function t1t(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function e1t(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=k1(s),a=A1(a),s&&a;){i=k1(i),o=A1(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(n1t(r1t(s,e,r),e,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!k1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!A1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=e)}return r}function k1(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function A1(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function r1t(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function n1t(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function i1t(e,t){return e.parentNode===t.parentNode?1:2}var a1t=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),o1t=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new a1t},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=st(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var v=i[p];r.moveTo(v[0],v[1]),d[c]=v[c],r.lineTo(d[0],d[1])}},t}(Kt),s1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new yt,r}return t.prototype.init=function(r,n){this._controller=new Pu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=r.getData(),o=r.layoutInfo,s=this._mainGroup,l=r.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(r,i),this._updateController(r,null,n,i);var u=this._data;a.diff(u).add(function(c){BN(a,c)&&FN(a,c,null,s,r)}).update(function(c,h){var f=u.getItemGraphicEl(h);if(!BN(a,c)){f&&VN(u,h,f,s,r);return}FN(a,c,f,s,r)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&VN(u,c,h,s,r)}).execute(),this._nodeScaleRatio=r.get("nodeScaleRatio"),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:h})})}),this._data=a},t.prototype._updateViewCoordSys=function(r,n){var i=r.getData(),a=[];i.each(function(h){var f=i.getItemLayout(h);f&&!isNaN(f.x)&&!isNaN(f.y)&&a.push([+f.x,+f.y])});var o=[],s=[];P_(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=r.coordinateSystem=new Ru(null,{api:n,ecModel:r.ecModel});c.zoomLimit=r.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(r.get("center")),c.setZoom(r.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(r,n,i,a){var o=this;B9(r,a,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(r)})},t.prototype._updateNodeAndLinkScale=function(r){var n=r.getData(),i=this._getNodeGlobalScale(r);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(r){var n=r.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(ye);function BN(e,t){var r=e.getItemLayout(t);return r&&!isNaN(r.x)&&!isNaN(r.y)}function FN(e,t,r,n,i){var a=!r,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:U.color.neutral00,c=e.tree.root,h=o.parentNode===c?o:o.parentNode||o,f=e.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:d,v=o.getLayout();a?(r=new tv(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.x=p.x,r.y=p.y):r.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=v.rawX,r.__radialRawY=v.rawY,n.add(r),e.setItemGraphicEl(t,r),r.__oldX=r.x,r.__oldY=r.y,se(r,{x:v.x,y:v.y},i);var g=r.getSymbolPath();if(i.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,x=void 0,b=void 0;if(v.x===y.x&&o.isExpand===!0&&m.children.length){var S={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};x=Math.atan2(S.y-y.y,S.x-y.x),x<0&&(x=Math.PI*2+x),b=S.x<y.x,b&&(x=x-Math.PI)}else x=Math.atan2(v.y-y.y,v.x-y.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=v.x<y.x,b&&(x=x-Math.PI)):(b=v.x>y.x,b||(x=x-Math.PI));var w=b?"left":"right",C=s.getModel("label"),k=C.get("rotate"),T=k*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:C.get("position")||w,rotation:k==null?-x:T,origin:"center"}),A.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),D=L==="relative"?ap(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;D&&(At(r).focus=D),l1t(i,o,c,r,p,d,v,n),r.__edge&&(r.onHoverStateChange=function(E){if(E!=="blur"){var N=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);N&&N.hoverState===Hp||$y(r.__edge,E)}})}function l1t(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),h=e.getOrient(),f=e.get(["lineStyle","curveness"]),d=e.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(v||(v=n.__edge=new Up({shape:bT(c,h,f,i,i)})),se(v,{shape:bT(c,h,f,a,o)},e));else if(u==="polyline"){if(c==="orthogonal"){if(t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}v||(v=n.__edge=new o1t({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:d}})),se(v,{shape:{parentPoint:[o.x,o.y],childPoints:m}},e)}}else if(process.env.NODE_ENV!=="production")throw new Error("The polyline edgeShape can only be used in orthogonal layout")}v&&!(u==="polyline"&&!t.isExpand)&&(v.useStyle(wt({strokeNoScale:!0,fill:null},p)),fr(v,l,"lineStyle"),fu(v),s.add(v))}function $N(e,t,r,n,i){var a=t.tree.root,o=Y9(a,e),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(e.dataIndex);if(u){var c=t.getItemGraphicEl(s.dataIndex),h=c.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),d=n.get("edgeShape"),p=n.get("layout"),v=n.get("orient"),g=n.get(["lineStyle","curveness"]);f&&(d==="curve"?ks(f,{shape:bT(p,v,g,l,l),style:{opacity:0}},n,{cb:function(){r.remove(f)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&ks(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){r.remove(f)},removeOpt:i}))}}function Y9(e,t){for(var r=t.parentNode===e?t:t.parentNode||t,n;n=r.getLayout(),n==null;)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function VN(e,t,r,n,i){var a=e.tree.getNodeByDataIndex(t),o=e.tree.root,s=Y9(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};ks(r,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(r),e.setItemGraphicEl(t,null)},removeOpt:l}),r.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){$N(u,e,n,i,l)}),$N(a,e,n,i,l)}function bT(e,t,r,n,i){var a,o,s,l,u,c,h,f;if(e==="radial"){u=n.rawX,h=n.rawY,c=i.rawX,f=i.rawY;var d=yd(u,h),p=yd(u,h+(f-h)*r),v=yd(c,f+(h-f)*r),g=yd(c,f);return{x1:d.x||0,y1:d.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=n.x,h=n.y,c=i.x,f=i.y,(t==="LR"||t==="RL")&&(a=u+(c-u)*r,o=h,s=c+(u-c)*r,l=f),(t==="TB"||t==="BT")&&(a=u,o=h+(f-h)*r,s=c,l=f+(h-f)*r);return{x1:u,y1:h,x2:c,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var fi=qt();function q9(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,X9(t,r,e),R(r,function(n){R(t.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,Bt(u1t,e))})}),t.wrapMethod("cloneShallow",Bt(h1t,e)),R(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Bt(c1t,e))}),ft(r[t.dataType]===t)}function u1t(e,t){if(p1t(this)){var r=et({},fi(this).datas);r[this.dataType]=t,X9(t,r,e)}else HA(t,this.dataType,fi(this).mainData,e);return t}function c1t(e,t){return e.struct&&e.struct.update(),t}function h1t(e,t){return R(fi(t).datas,function(r,n){r!==t&&HA(r.cloneShallow(),n,t,e)}),t}function f1t(e){var t=fi(this).mainData;return e==null||t==null?t:fi(t).datas[e]}function d1t(){var e=fi(this).mainData;return e==null?[{data:e}]:at(te(fi(e).datas),function(t){return{type:t,data:fi(e).datas[t]}})}function p1t(e){return fi(e).mainData===e}function X9(e,t,r){fi(e).datas={},R(t,function(n,i){HA(n,i,e,r)})}function HA(e,t,r,n){fi(r).datas[t]=e,fi(e).mainData=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=f1t,e.getLinkedDataAll=d1t}var v1t=function(){function e(t,r){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=r}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(t,r,n){mt(t)&&(n=r,r=t,t=null),t=t||{},lt(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=r.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,r,n);i==="postorder"&&r.call(n,this)},e.prototype.updateDepthAndHeight=function(t){var r=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>r&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].getNodeById(t);if(a)return a}},e.prototype.contains=function(t){if(t===this)return!0;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].contains(t);if(a)return a}},e.prototype.getAncestors=function(t){for(var r=[],n=t?this:this.parentNode;n;)r.push(n),n=n.parentNode;return r.reverse(),r},e.prototype.getAncestorsIndices=function(){for(var t=[],r=this;r;)t.push(r.dataIndex),r=r.parentNode;return t.reverse(),t},e.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(r){t.push(r.dataIndex)}),t},e.prototype.getValue=function(t){var r=this.hostTree.data;return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},e.prototype.setLayout=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r<t.length;++r)if(t[r]===this)return r;return-1}return-1},e.prototype.isAncestorOf=function(t){for(var r=t.parentNode;r;){if(r===this)return!0;r=r.parentNode}return!1},e.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},e}(),jA=function(){function e(t){this.type="tree",this._nodes=[],this.hostModel=t}return e.prototype.eachNode=function(t,r,n){this.root.eachNode(t,r,n)},e.prototype.getNodeByDataIndex=function(t){var r=this.data.getRawIndex(t);return this._nodes[r]},e.prototype.getNodeById=function(t){return this.root.getNodeById(t)},e.prototype.update=function(){for(var t=this.data,r=this._nodes,n=0,i=r.length;n<i;n++)r[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)r[t.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,r,n){var i=new e(r),a=[],o=1;s(t);function s(c,h){var f=c.value;o=Math.max(o,nt(f)?f.length:1),a.push(c);var d=new v1t(ur(c.name,""),i);h?g1t(d,h):i.root=d,i._nodes.push(d);var p=c.children;if(p)for(var v=0;v<p.length;v++)s(p[v],d)}i.root.updateDepthAndHeight(0);var l=Jp(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new pn(l,r);return u.initData(a),n&&n(u),q9({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},e}();function g1t(e,t){var r=t.children;e.parentNode!==t&&(r.push(e),e.parentNode=t)}function Tp(e,t,r){if(e&&$t(t,e.type)>=0){var n=r.getData().tree.root,i=e.targetNode;if(lt(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function Z9(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function UA(e,t){var r=Z9(e);return $t(r,t)>=0}function nx(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var m1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new ne(i,this,this.ecModel),o=jA.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return rr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=nx(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.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:U.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Ae);function y1t(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)t(a,r)}function Wf(e,t){for(var r=[e],n;n=r.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)r.push(i[a])}}function _1t(e,t){e.eachSeriesByType("tree",function(r){x1t(r,t)})}function x1t(e,t){var r=pr(e,t).refContainer,n=Pe(e.getBoxLayoutParams(),r);e.layoutInfo=n;var i=e.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=ON(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(a=n.width,o=n.height,s=ON());var l=e.getData().tree.root,u=l.children[0];if(u){Kbt(l),y1t(u,Jbt,s),l.hierNode.modifier=-u.hierNode.prelim,Wf(u,Qbt);var c=u,h=u,f=u;Wf(u,function(x){var b=x.getLayout().x;b<c.getLayout().x&&(c=x),b>h.getLayout().x&&(h=x),x.depth>f.depth&&(f=x)});var d=c===h?1:s(c,h)/2,p=d-c.getLayout().x,v=0,g=0,m=0,y=0;if(i==="radial")v=a/(h.getLayout().x+d+p),g=o/(f.depth-1||1),Wf(u,function(x){m=(x.getLayout().x+p)*v,y=(x.depth-1)*g;var b=yd(m,y);x.setLayout({x:b.x,y:b.y,rawX:m,rawY:y},!0)});else{var _=e.getOrient();_==="RL"||_==="LR"?(g=o/(h.getLayout().x+d+p),v=a/(f.depth-1||1),Wf(u,function(x){y=(x.getLayout().x+p)*g,m=_==="LR"?(x.depth-1)*v:a-(x.depth-1)*v,x.setLayout({x:m,y},!0)})):(_==="TB"||_==="BT")&&(v=a/(h.getLayout().x+d+p),g=o/(f.depth-1||1),Wf(u,function(x){m=(x.getLayout().x+p)*v,y=_==="TB"?(x.depth-1)*g:o-(x.depth-1)*g,x.setLayout({x:m,y},!0)}))}}}function b1t(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");et(s,o)})})}function S1t(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=ex(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function w1t(e){e.registerChartView(s1t),e.registerSeriesModel(m1t),e.registerLayout(_1t),e.registerVisual(b1t),S1t(e)}var zN=["treemapZoomToNode","treemapRender","treemapMove"];function C1t(e){for(var t=0;t<zN.length;t++)e.registerAction({type:zN[t],update:"updateView"},Ye);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,n){n.eachComponent({mainType:"series",subType:"treemap",query:r},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Tp(r,s,a);if(l){var u=a.getViewRoot();u&&(r.direction=UA(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function K9(e){var t=e.getData(),r=t.tree,n={};r.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=VC(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var T1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};J9(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new ne({itemStyle:o},this,n);a=r.levels=k1t(a,n);var l=at(a||[],function(h){return new ne(h,s,n)},this),u=jA.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),v=p?l[p.depth]:null;return f.parentModel=v||s,f})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return rr("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=nx(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},et(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=pt(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){K9(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:U.size.l,top:U.size.xxxl,right:U.size.l,bottom:U.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,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:U.size.m,emptyItemWidth:25,itemStyle:{color:U.color.backgroundShade,textStyle:{color:U.color.secondary}},emphasis:{itemStyle:{color:U.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:U.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:U.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:[]},t}(Ae);function J9(e){var t=0;R(e.children,function(n){J9(n);var i=n.value;nt(i)&&(i=i[0]),t+=i});var r=e.value;nt(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),nt(e.value)?e.value[0]=r:e.value=r}function k1t(e,t){var r=xe(t.get("color")),n=xe(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;R(e,function(s){var l=new ne(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var A1t=8,GN=8,D1=5,D1t=function(){function e(t){this.group=new yt,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h=pr(t,r).refContainer,f={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=Pe(f,h);this._prepare(n,d,u),this._renderContent(t,d,p,s,l,u,c,i),j_(o,f,h)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=ur(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+A1t*2,r.emptyItemWidth);r.totalWidth+=s+GN,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,h=t.get(["breadcrumb","height"]),f=r.totalWidth,d=r.renderList,p=a.getModel("itemStyle").getItemStyle(),v=d.length-1;v>=0;v--){var g=d[v],m=g.node,y=g.width,_=g.text;f>n.width&&(f-=y-c,y=c,_=null);var x=new Qr({shape:{points:L1t(u,0,y,h,v===d.length-1,v===0)},style:wt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new oe({style:Te(o,{text:_})}),textConfig:{position:"inside"},z2:Gh*1e4,onclick:Bt(l,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Te(s,{text:_}),x.ensureState("emphasis").style=p,Ie(x,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(x),M1t(x,t,m),u+=y+GN}},e.prototype.remove=function(){this.group.removeAll()},e}();function L1t(e,t,r,n,i,a){var o=[[i?e:e-D1,t],[e+r,t],[e+r,t+n],[i?e:e-D1,t+n]];return!a&&o.splice(2,0,[e+r+D1,t+n/2]),!i&&o.push([e,t+n/2]),o}function M1t(e,t,r){At(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&nx(r,t)}}var E1t=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function I1t(){return new E1t}var ST=yt,WN=Ut,HN=3,jN="label",UN="upperLabel",P1t=Gh*10,R1t=Gh*2,N1t=Gh*3,bl=hu([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),YN=function(e){var t=bl(e);return t.stroke=t.fill=t.lineWidth=null,t},v0=qt(),O1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._state="ready",r._storage=Hf(),r}return t.prototype.render=function(r,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!($t(o,r)<0)){this.seriesModel=r,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Tp(a,s,r),u=a&&a.type,c=r.layoutInfo,h=!this._oldTree,f=this._storage,d=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),v=r.get("animation"),g=this._doRender(p,r,d);v&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,r,d):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(r,i,l)}},t.prototype._giveContainerGroup=function(r){var n=this._containerGroup;return n||(n=this._containerGroup=new ST,this._initEvents(n),this.group.add(n)),n.x=r.x,n.y=r.y,n},t.prototype._doRender=function(r,n,i){var a=n.getData().tree,o=this._oldTree,s=Hf(),l=Hf(),u=this._storage,c=[];function h(y,_,x,b){return B1t(n,l,u,i,s,c,y,_,x,b)}v(a.root?[a.root]:[],o&&o.root?[o.root]:[],r,a===o||!o,0);var f=g(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:m};function v(y,_,x,b,S){b?(_=y,R(y,function(k,T){!k.isRemoved()&&C(T,T)})):new Lo(_,y,w,w).add(C).update(C).remove(Bt(C,null)).execute();function w(k){return k.getId()}function C(k,T){var A=k!=null?y[k]:null,L=T!=null?_[T]:null,D=h(A,L,x,S);D&&v(A&&A.viewChildren||[],L&&L.viewChildren||[],D,b,S+1)}}function g(y){var _=Hf();return y&&R(y,function(x,b){var S=_[b];R(x,function(w){w&&(S.push(w),v0(w).willDelete=!0)})}),_}function m(){R(f,function(y){R(y,function(_){_.parent&&_.parent.remove(_)})}),R(c,function(y){y.invisible=!0,y.dirty()})}},t.prototype._doAnimation=function(r,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(mt(o)?0:o)||0,u=(mt(s)?null:s)||"cubicOut",c=I1t();R(n.willDeleteEls,function(h,f){R(h,function(d,p){if(!d.invisible){var v=d.parent,g,m=v0(v);if(a&&a.direction==="drillDown")g=v===a.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=f==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(d,g,l,0,u)}})}),R(this._storage,function(h,f){R(h,function(d,p){var v=n.lastsForAnimation[f][p],g={};v&&(d instanceof yt?v.oldX!=null&&(g.x=d.x,g.y=d.y,d.x=v.oldX,d.y=v.oldY):(v.oldShape&&(g.shape=et({},d.shape),d.setShape(v.oldShape)),v.fadein?(d.setStyle("opacity",0),g.style={opacity:1}):d.style.opacity!==1&&(g.style={opacity:1})),c.add(d,g,l,0,u))})},this),this._state="animating",c.finished(ut(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(r){var n=this,i=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new Pu(r.getZr()),i.on("pan",ut(this._onPan,this)),i.on("zoom",ut(this._onZoom,this))),i.enable(o.get("roam"),{api:r,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},t.prototype._clearController=function(){var r=this._controller;this._controllerHost=null,r&&(r.dispose(),r=null)},t.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>HN||Math.abs(r.dy)>HN)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ct(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var v=this.seriesModel.layoutInfo;n-=v.x,i-=v.y;var g=Ir();La(g,g,[-n,-i]),Dk(g,g,[p,p]),La(g,g,[n,i]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Wy(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new D1t(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(UA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Hf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(ye);function Hf(){return{nodeGroup:[],background:[],content:[]}}function B1t(e,t,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=e.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,v=c.borderWidth,g=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,x=c.upperHeight,b=_&&_.length,S=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),C=f.getModel(["blur","itemStyle"]),k=f.getModel(["select","itemStyle"]),T=S.get("borderRadius")||0,A=W("nodeGroup",ST);if(!A)return;if(l.add(A),A.x=c.x||0,A.y=c.y||0,A.markRedraw(),v0(A).nodeWidth=d,v0(A).nodeHeight=p,c.isAboveViewRoot)return A;var L=W("background",WN,u,R1t);L&&V(A,L,b&&c.upperLabelHeight);var D=f.getModel("emphasis"),E=D.get("focus"),N=D.get("blurScope"),P=D.get("disabled"),F=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():E;if(b)Ts(A)&&Ol(A,!1),L&&(Ol(L,!P),h.setItemGraphicEl(o.dataIndex,L),kC(L,F,N));else{var O=W("content",WN,u,N1t);O&&I(A,O),L.disableMorphing=!0,L&&Ts(L)&&Ol(L,!1),Ol(A,!P),h.setItemGraphicEl(o.dataIndex,A);var $=f.getShallow("cursor");$&&O.attr("cursor",$),kC(A,F,N)}return A;function V(tt,it,X){var rt=At(it);if(rt.dataIndex=o.dataIndex,rt.seriesIndex=e.seriesIndex,it.setShape({x:0,y:0,width:d,height:p,r:T}),g)B(it);else{it.invisible=!1;var Z=o.getVisual("style"),vt=Z.stroke,kt=YN(S);kt.fill=vt;var Wt=bl(w);Wt.fill=w.get("borderColor");var Ht=bl(C);Ht.fill=C.get("borderColor");var ue=bl(k);if(ue.fill=k.get("borderColor"),X){var Fe=d-2*v;G(it,vt,Z.opacity,{x:v,y:0,width:Fe,height:x})}else it.removeTextContent();it.setStyle(kt),it.ensureState("emphasis").style=Wt,it.ensureState("blur").style=Ht,it.ensureState("select").style=ue,fu(it)}tt.add(it)}function I(tt,it){var X=At(it);X.dataIndex=o.dataIndex,X.seriesIndex=e.seriesIndex;var rt=Math.max(d-2*v,0),Z=Math.max(p-2*v,0);if(it.culling=!0,it.setShape({x:v,y:v,width:rt,height:Z,r:T}),g)B(it);else{it.invisible=!1;var vt=o.getVisual("style"),kt=vt.fill,Wt=YN(S);Wt.fill=kt,Wt.decal=vt.decal;var Ht=bl(w),ue=bl(C),Fe=bl(k);G(it,kt,vt.opacity,null),it.setStyle(Wt),it.ensureState("emphasis").style=Ht,it.ensureState("blur").style=ue,it.ensureState("select").style=Fe,fu(it)}tt.add(it)}function B(tt){!tt.invisible&&a.push(tt)}function G(tt,it,X,rt){var Z=f.getModel(rt?UN:jN),vt=ur(f.get("name"),null),kt=Z.getShallow("show");Cr(tt,dr(f,rt?UN:jN),{defaultText:kt?vt:null,inheritColor:it,defaultOpacity:X,labelFetcher:e,labelDataIndex:o.dataIndex});var Wt=tt.getTextContent();if(Wt){var Ht=Wt.style,ue=b_(Ht.padding||0);rt&&(tt.setTextConfig({layoutRect:rt}),Wt.disableLabelLayout=!0),Wt.beforeUpdate=function(){var We=Math.max((rt?rt.width:tt.shape.width)-ue[1]-ue[3],0),Tr=Math.max((rt?rt.height:tt.shape.height)-ue[0]-ue[2],0);(Ht.width!==We||Ht.height!==Tr)&&Wt.setStyle({width:We,height:Tr})},Ht.truncateMinChar=2,Ht.lineOverflow="truncate",H(Ht,rt,c);var Fe=Wt.getState("emphasis");H(Fe?Fe.style:null,rt,c)}}function H(tt,it,X){var rt=tt?tt.text:null;if(!it&&X.isLeafRoot&&rt!=null){var Z=e.get("drillDownIcon",!0);tt.text=Z?Z+" "+rt:rt}}function W(tt,it,X,rt){var Z=y!=null&&r[tt][y],vt=i[tt];return Z?(r[tt][y]=null,J(vt,Z)):g||(Z=new it,Z instanceof vi&&(Z.z2=F1t(X,rt)),Q(vt,Z)),t[tt][m]=Z}function J(tt,it){var X=tt[m]={};it instanceof ST?(X.oldX=it.x,X.oldY=it.y):X.oldShape=et({},it.shape)}function Q(tt,it){var X=tt[m]={},rt=o.parentNode,Z=it instanceof yt;if(rt&&(!n||n.direction==="drillDown")){var vt=0,kt=0,Wt=i.background[rt.getRawIndex()];!n&&Wt&&Wt.oldShape&&(vt=Wt.oldShape.width,kt=Wt.oldShape.height),Z?(X.oldX=0,X.oldY=kt):X.oldShape={x:vt,y:kt,width:0,height:0}}X.fadein=!Z}}function F1t(e,t){return e*P1t+t}var kp=R,$1t=xt,g0=-1,wr=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=_t(t);this.type=n,this.mappingMethod=r,this._normalizeData=G1t[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(L1(i),V1t(i)):r==="category"?i.categories?z1t(i):L1(i,!0):(ft(r!=="linear"||i.dataExtent),L1(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return ut(this._normalizeData,this)},e.listVisualTypes=function(){return te(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){xt(t)?R(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=nt(t)?[]:xt(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&kp(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(nt(t))t=t.slice();else if($1t(t)){var r=[];kp(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o<s;o++){var l=r[o].value;if(l!=null){if(l===t||lt(l)&&l===t+"")return o;n&&f(l,o)}}for(var o=0,s=r.length;o<s;o++){var u=r[o],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(Dg(h[1],t,c[1]))return o}else if(c[1]===1/0){if(Dg(h[0],c[0],t))return o}else if(Dg(h[0],c[0],t)&&Dg(h[1],t,c[1]))return o;n&&f(c[0],o),n&&f(c[1],o)}}if(n)return t===1/0?r.length-1:t===-1/0?0:i;function f(d,p){var v=Math.abs(d-t);v<a&&(a=v,i=p)}},e.visualHandlers={color:{applyVisual:jf("color"),getColorMapper:function(){var t=this.option;return ut(t.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),_d.call(this,r)}:function(r,n,i){var a=!!i;return!n&&(r=this._normalizeData(r)),i=sb(r,t.parsedVisual,i),a?i:wa(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return wa(sb(t,this.option.parsedVisual),"rgba")},category:_d,piecewise:function(t,r){var n=CT.call(this,r);return n==null&&(n=wa(sb(t,this.option.parsedVisual),"rgba")),n},fixed:Sl}},colorHue:Ag(function(t,r){return vs(t,r)}),colorSaturation:Ag(function(t,r){return vs(t,null,r)}),colorLightness:Ag(function(t,r){return vs(t,null,null,r)}),colorAlpha:Ag(function(t,r){return Ly(t,r)}),decal:{applyVisual:jf("decal"),_normalizedToVisual:{linear:null,category:_d,piecewise:null,fixed:null}},opacity:{applyVisual:jf("opacity"),_normalizedToVisual:wT([0,1])},liftZ:{applyVisual:jf("liftZ"),_normalizedToVisual:{linear:Sl,category:Sl,piecewise:Sl,fixed:Sl}},symbol:{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("symbol",i)},_normalizedToVisual:{linear:qN,category:_d,piecewise:function(t,r){var n=CT.call(this,r);return n==null&&(n=qN.call(this,t)),n},fixed:Sl}},symbolSize:{applyVisual:jf("symbolSize"),_normalizedToVisual:wT([0,1])}},e}();function V1t(e){var t=e.pieceList;e.hasSpecialVisual=!1,R(t,function(r,n){r.originIndex=n,r.visual!=null&&(e.hasSpecialVisual=!0)})}function z1t(e){var t=e.categories,r=e.categoryMap={},n=e.visual;if(kp(t,function(o,s){r[o]=s}),!nt(n)){var i=[];xt(n)?kp(n,function(o,s){var l=r[s];i[l??g0]=o}):i[g0]=n,n=Q9(e,i)}for(var a=t.length-1;a>=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function L1(e,t){var r=e.visual,n=[];xt(r)?kp(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),Q9(e,n)}function Ag(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:wT([0,1])}}function qN(e){var t=this.option.visual;return t[Math.round(fe(e,[0,1],[0,t.length-1],!0))]||{}}function jf(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function _d(e){var t=this.option.visual;return t[this.option.loop&&e!==g0?e%t.length:e]}function Sl(){return this.option.visual[0]}function wT(e){return{linear:function(t){return fe(t,e,this.option.visual,!0)},category:_d,piecewise:function(t,r){var n=CT.call(this,r);return n==null&&(n=fe(t,e,this.option.visual,!0)),n},fixed:Sl}}function CT(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=wr.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function Q9(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=at(t,function(r){var n=En(r);return!n&&process.env.NODE_ENV!=="production"&&Ne("'"+r+"' is an illegal color, fallback to '#000000'",!0),n||[0,0,0,1]})),t}var G1t={linear:function(e){return fe(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=wr.findPieceIndex(e,t,!0);if(r!=null)return fe(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??g0},fixed:Ye};function Dg(e,t,r){return e?t<=r:t<r}var W1t="itemStyle",tU=qt();const H1t={seriesType:"treemap",reset:function(e){var t=e.getData().tree,r=t.root;r.isRemoved()||eU(r,{},e.getViewRoot().getAncestors(),e)}};function eU(e,t,r,n){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(W1t),l=j1t(s,t,n),u=o.ensureUniqueItemVisual(e.dataIndex,"style"),c=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=XN(l),c=U1t(h,f)),u.stroke=c;var d=e.viewChildren;if(!d||!d.length)f=XN(l),u.fill=f;else{var p=Y1t(e,i,a,s,l,d);R(d,function(v,g){if(v.depth>=r.length||v===r[v.depth]){var m=q1t(i,l,v,g,p,n);eU(v,m,r,n)}})}}}function j1t(e,t,r){var n=et({},t),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function XN(e){var t=M1(e,"color");if(t){var r=M1(e,"colorAlpha"),n=M1(e,"colorSaturation");return n&&(t=vs(t,null,null,n)),r&&(t=Ly(t,r)),t}}function U1t(e,t){return t!=null?vs(t,null,null,e):null}function M1(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function Y1t(e,t,r,n,i,a){if(!(!a||!a.length)){var o=E1(t,"color")||i.color!=null&&i.color!=="none"&&(E1(t,"colorAlpha")||E1(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new wr(h);return tU(f).drColorMappingBy=c,f}}}function E1(e,t){var r=e.get(t);return nt(r)&&r.length?{name:t,range:r}:null}function q1t(e,t,r,n,i,a){var o=et({},t);if(i){var s=i.type,l=s==="color"&&tU(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ap=Math.max,m0=Math.min,ZN=lr,YA=R,rU=["itemStyle","borderWidth"],X1t=["itemStyle","gapWidth"],Z1t=["upperLabel","show"],K1t=["upperLabel","height"];const J1t={seriesType:"treemap",reset:function(e,t,r,n){var i=e.option,a=pr(e,r).refContainer,o=Pe(e.getBoxLayoutParams(),a),s=i.size||[],l=st(ZN(o.width,s[0]),a.width),u=st(ZN(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=Tp(n,h,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=e.getViewRoot(),v=Z9(p);if(c!=="treemapMove"){var g=c==="treemapZoomToNode"?iSt(e,f,p,l,u):d?[d.width,d.height]:[l,u],m=i.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var y={squareRatio:i.squareRatio,sort:m,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(_),nU(p,y,!1,0),_=p.getLayout(),YA(v,function(b,S){var w=(v[S+1]||p).getValue();b.setLayout(et({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var x=e.getData().tree.root;x.setLayout(aSt(o,d,f),!0),e.setLayoutInfo(o),iU(x,new Ct(-o.x,-o.y,r.getWidth(),r.getHeight()),v,p,0)}};function nU(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(rU),u=s.get(X1t)/2,c=aU(s),h=Math.max(l,c),f=l-u,d=h-u;e.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=Ap(i-2*f,0),a=Ap(a-f-d,0);var p=i*a,v=Q1t(e,s,p,t,r,n);if(v.length){var g={x:f,y:d,width:i,height:a},m=m0(i,a),y=1/0,_=[];_.area=0;for(var x=0,b=v.length;x<b;){var S=v[x];_.push(S),_.area+=S.getLayout().area;var w=nSt(_,m,t.squareRatio);w<=y?(x++,y=w):(_.area-=_.pop().getLayout().area,KN(_,m,g,u,!1),m=m0(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&KN(_,m,g,u,!0),!r){var C=s.get("childrenVisibleMin");C!=null&&p<C&&(r=!0)}for(var x=0,b=v.length;x<b;x++)nU(v[x],t,r,n+1)}}}function Q1t(e,t,r,n,i,a){var o=e.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return e.viewChildren=[];o=de(o,function(d){return!d.isRemoved()}),eSt(o,s);var u=rSt(t,o,s);if(u.sum===0)return e.viewChildren=[];if(u.sum=tSt(t,r,u.sum,s,o),u.sum===0)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var f=o[c].getValue()/u.sum*r;o[c].setLayout({area:f})}return l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}function tSt(e,t,r,n,i){if(!n)return r;for(var a=e.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*t<a&&(s=l,r-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function eSt(e,t){return t&&e.sort(function(r,n){var i=t==="asc"?r.getValue()-n.getValue():n.getValue()-r.getValue();return i===0?t==="asc"?r.dataIndex-n.dataIndex:n.dataIndex-r.dataIndex:i}),e}function rSt(e,t,r){for(var n=0,i=0,a=t.length;i<a;i++)n+=t[i].getValue();var o=e.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&r?(s=[t[t.length-1].getValue(),t[0].getValue()],r==="asc"&&s.reverse()):(s=[1/0,-1/0],YA(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function nSt(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=e.area*e.area,u=t*t*r;return l?Ap(u*n/l,l/(u*i)):1/0}function KN(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=t?e.area/t:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var h=0,f=e.length;h<f;h++){var d=e[h],p={},v=c?d.getLayout().area/c:0,g=p[l[o]]=Ap(c-2*n,0),m=r[s[a]]+r[l[a]]-u,y=h===f-1||m<v?m:v,_=p[l[a]]=Ap(y-2*n,0);p[s[o]]=r[s[o]]+m0(n,g/2),p[s[a]]=u+m0(n,_/2),u+=y,d.setLayout(p,!0)}r[s[o]]+=c,r[l[o]]-=c}function iSt(e,t,r,n,i){var a=(t||{}).node,o=[n,i];if(!a||a===r)return o;for(var s,l=n*i,u=l*e.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,h=s.children,f=0,d=h.length;f<d;f++)c+=h[f].getValue();var p=a.getValue();if(p===0)return o;u*=c/p;var v=s.getModel(),g=v.get(rU),m=Math.max(g,aU(v));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>tI&&(u=tI),a=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,i*y]}function aSt(e,t,r){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!r)return n;var i=r.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function iU(e,t,r,n,i){var a=e.getLayout(),o=r[i],s=o&&o===e;if(!(o&&!s||i===r.length&&e!==n)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new Ct(t.x-a.x,t.y-a.y,t.width,t.height);YA(e.viewChildren||[],function(u){iU(u,l,r,n,i+1)})}}function aU(e){return e.get(Z1t)?e.get(K1t):0}function oSt(e){e.registerSeriesModel(T1t),e.registerChartView(O1t),e.registerVisual(H1t),e.registerLayout(J1t),C1t(e)}function sSt(e){var t=e.findComponents({mainType:"legend"});!t||!t.length||e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){ae(u)&&(u=o[u]);for(var c=0;c<t.length;c++)if(!t[c].isSelected(u))return!1}return!0})})}function lSt(e){var t={};e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=r.getColorFromPalette(s,t)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var f=l.getShallow(c[h],!0);f!=null&&n.setItemVisual(o,c[h],f)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){lt(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");et(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++)i.setItemVisual(o,h[f],n.getItemVisual(l,h[f]))}})})}function Lg(e){return e instanceof Array||(e=[e,e]),e}function uSt(e){e.eachSeriesByType("graph",function(t){var r=t.getGraph(),n=t.getEdgeData(),i=Lg(t.get("edgeSymbol")),a=Lg(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=r.getEdgeByIndex(o),u=Lg(s.getShallow("symbol",!0)),c=Lg(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),f=n.ensureUniqueItemVisual(o,"style");switch(et(f,h),f.stroke){case"source":{var d=l.node1.getVisual("style");f.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");f.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var TT="-->",ix=function(e){return e.get("autoCurveness")||null},oU=function(e,t){var r=ix(e),n=20,i=[];if(ae(r))n=r;else if(nt(r)){e.__curvenessList=r;return}t>n&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=i},Dp=function(e,t,r){var n=[e.id,e.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[r.uid,n,i].join(TT)},sU=function(e){var t=e.split(TT);return[t[0],t[2],t[1]].join(TT)},cSt=function(e,t){var r=Dp(e.node1,e.node2,t);return t.__edgeMap[r]},hSt=function(e,t){var r=kT(Dp(e.node1,e.node2,t),t),n=kT(Dp(e.node2,e.node1,t),t);return r+n},kT=function(e,t){var r=t.__edgeMap;return r[e]?r[e].length:0};function fSt(e){ix(e)&&(e.__curvenessList=[],e.__edgeMap={},oU(e))}function dSt(e,t,r,n){if(ix(r)){var i=Dp(e,t,r),a=r.__edgeMap,o=a[sU(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function qA(e,t,r,n){var i=ix(t),a=nt(i);if(!i)return null;var o=cSt(e,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var u=hSt(e,t);oU(t,u),e.lineStyle=e.lineStyle||{};var c=Dp(e.node1,e.node2,t),h=t.__curvenessList,f=a||u%2?0:1;if(o.isForward)return h[f+s];var d=sU(c),p=kT(d,t),v=h[s+p+f];return n?a?i&&i[0]===0?(p+f)%2?v:-v:((p%2?0:1)+f)%2?v:-v:(p+f)%2?v:-v:h[s+p+f]}function lU(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view")){var r=e.getGraph();r.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),XA(r,e)}}function XA(e,t){e.eachEdge(function(r,n){var i=dn(r.getModel().get(["lineStyle","curveness"]),-qA(r,t,n,!0),0),a=vo(r.node1.getLayout()),o=vo(r.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),r.setLayout(s)})}function pSt(e,t){e.eachSeriesByType("graph",function(r){var n=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var a=r.getData(),o=[];R(i.dimensions,function(f){o=o.concat(a.mapDimensionsAll(f))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var h=a.get(o[c],s);isNaN(h)||(u=!0),l.push(h)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}XA(a.graph,r)}else(!n||n==="none")&&lU(r)})}function xd(e){var t=e.coordinateSystem;if(t.type!=="view")return 1;var r=e.option.nodeScaleRatio,n=t.scaleX,i=t.getZoom(),a=(i-1)*r+1;return a/n}function bd(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var JN=Math.PI,I1=[];function ZA(e,t,r,n){var i=e.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=e.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,h=o.count();if(o.setLayout({cx:l,cy:u}),!!h){if(r){var f=i.pointToData(n),d=f[0],p=f[1],v=[d-l,p-u];$h(v,v),dm(v,v,c),r.setLayout([l+v[0],u+v[1]],!0);var g=e.get(["circular","rotateLabel"]);uU(r,g,l,u)}vSt[t](e,s,o,c,l,u,h),s.eachEdge(function(m,y){var _=dn(m.getModel().get(["lineStyle","curveness"]),qA(m,e,y),0),x=vo(m.node1.getLayout()),b=vo(m.node2.getLayout()),S,w=(x[0]+b[0])/2,C=(x[1]+b[1])/2;+_&&(_*=3,S=[l*_+w*(1-_),u*_+C*(1-_)]),m.setLayout([x,b,S])})}}}var vSt={value:function(e,t,r,n,i,a,o){var s=0,l=r.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(c){var h=c.getValue("value"),f=u*(l?h:1)/2;s+=f,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=f})},symbolSize:function(e,t,r,n,i,a,o){var s=0;I1.length=o;var l=xd(e);t.eachNode(function(h){var f=bd(h);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var d=Math.asin(f/2/n);isNaN(d)&&(d=JN/2),I1[h.dataIndex]=d,s+=d*2});var u=(2*JN-s)/o/2,c=0;t.eachNode(function(h){var f=u+I1[h.dataIndex];c+=f,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=f})}};function uU(e,t,r,n){var i=e.getGraphicEl();if(i){var a=e.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=e.getLayout(),u=Math.atan2(l[1]-n,l[0]-r);u<0&&(u=Math.PI*2+u);var c=l[0]<r;c&&(u=u-Math.PI);var h=c?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var f=s.ensureState("emphasis");et(f.textConfig||(f.textConfig={}),{position:h})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function gSt(e){e.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&ZA(t,"symbolSize")})}var sc=Uw;function mSt(e,t,r){for(var n=e,i=t,a=r.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=r.gravity==null?.1:r.gravity,c=0;c<n.length;c++){var h=n[c];h.p||(h.p=Tu(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=vo(h.p),h.edges=null}var f=r.friction==null?.6:r.friction,d=f,p,v;return{warmUp:function(){d=f*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){v=g},step:function(g){p&&p(n,i);for(var m=[],y=n.length,_=0;_<i.length;_++){var x=i[_];if(!x.ignoreForceLayout){var b=x.n1,S=x.n2;Rl(m,S.p,b.p);var w=Yw(m)-x.d,C=S.w/(b.w+S.w);isNaN(C)&&(C=0),$h(m,m),!b.fixed&&sc(b.p,b.p,m,C*w*d),!S.fixed&&sc(S.p,S.p,m,-(1-C)*w*d)}}for(var _=0;_<y;_++){var k=n[_];k.fixed||(Rl(m,l,k.p),sc(k.p,k.p,m,u*d))}for(var _=0;_<y;_++)for(var b=n[_],T=_+1;T<y;T++){var S=n[T];Rl(m,S.p,b.p);var w=Yw(m);w===0&&(kk(m,Math.random()-.5,Math.random()-.5),w=1);var A=(b.rep+S.rep)/w/w;!b.fixed&&sc(b.pp,b.pp,m,A),!S.fixed&&sc(S.pp,S.pp,m,-A)}for(var L=[],_=0;_<y;_++){var k=n[_];k.fixed||(Rl(L,k.p,k.pp),sc(k.p,k.p,L,d),an(k.pp,k.p))}d=d*.992;var D=d<.01;v&&v(n,i,D),g&&g(D)}}}function ySt(e){e.eachSeriesByType("graph",function(t){var r=t.coordinateSystem;if(!(r&&r.type!=="view"))if(t.get("layout")==="force"){var n=t.preservedPoints||{},i=t.getGraph(),a=i.data,o=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?a.each(function(_){var x=a.getId(_);a.setItemLayout(_,n[x]||[NaN,NaN])}):!l||l==="none"?lU(t):l==="circular"&&ZA(t,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),h=s.get("repulsion"),f=s.get("edgeLength"),d=nt(h)?h:[h,h],p=nt(f)?f:[f,f];p=[p[1],p[0]];var v=a.mapArray("value",function(_,x){var b=a.getItemLayout(x),S=fe(_,u,d);return isNaN(S)&&(S=(d[0]+d[1])/2),{w:S,rep:S,fixed:a.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(_,x){var b=i.getEdgeByIndex(x),S=fe(_,c,p);isNaN(S)&&(S=(p[0]+p[1])/2);var w=b.getModel(),C=dn(b.getModel().get(["lineStyle","curveness"]),-qA(b,t,x,!0),0);return{n1:v[b.node1.dataIndex],n2:v[b.node2.dataIndex],d:S,curveness:C,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=r.getBoundingRect(),y=mSt(v,g,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(_,x){for(var b=0,S=_.length;b<S;b++)_[b].fixed&&an(_[b].p,i.getNodeByIndex(b).getLayout())}),y.afterStep(function(_,x,b){for(var S=0,w=_.length;S<w;S++)_[S].fixed||i.getNodeByIndex(S).setLayout(_[S].p),n[a.getId(S)]=_[S].p;for(var S=0,w=x.length;S<w;S++){var C=x[S],k=i.getEdgeByIndex(S),T=C.n1.p,A=C.n2.p,L=k.getLayout();L=L?L.slice():[],L[0]=L[0]||[],L[1]=L[1]||[],an(L[0],T),an(L[1],A),+C.curveness&&(L[2]=[(T[0]+A[0])/2-(T[1]-A[1])*C.curveness,(T[1]+A[1])/2-(A[0]-T[0])*C.curveness]),k.setLayout(L)}}),t.forceLayout=y,t.preservedPoints=n,y.step()}else t.forceLayout=null})}function _St(e,t,r){var n=pr(e,t),i=et(e.getBoxLayoutParams(),{aspect:r}),a=Pe(i,n.refContainer);return W6(e,a,r)}function xSt(e,t){var r=[];return e.eachSeriesByType("graph",function(n){Zp({targetModel:n,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var a=n.getData(),o=a.mapArray(function(p){var v=a.getItemModel(p);return[+v.get("x"),+v.get("y")]}),s=[],l=[];P_(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=_St(n,t,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-s[0],f=l[1]-s[1],d=new Ru(null,{api:t,ecModel:e});return d.zoomLimit=n.get("scaleLimit"),d.setBoundingRect(s[0],s[1],h,f),d.setViewRect(c.x,c.y,c.width,c.height),d.setCenter(n.get("center")),d.setZoom(n.get("zoom")),r.push(d),d}}),r}var QN=Qe.prototype,P1=Up.prototype,cU=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(cU);function R1(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var hU=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new cU},t.prototype.buildPath=function(r,n){R1(n)?QN.buildPath.call(this,r,n):P1.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return R1(this.shape)?QN.pointAt.call(this,r):P1.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,i=R1(n)?[n.x2-n.x1,n.y2-n.y1]:P1.tangentAt.call(this,r);return $h(i,i)},t}(Kt),N1=["fromSymbol","toSymbol"];function tO(e){return"_"+e+"Type"}function eO(e,t,r){var n=t.getItemVisual(r,e);if(!n||n==="none")return n;var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Zh(i),u=Mu(o||0,l);return n+l+u+(a||"")+(s||"")}function rO(e,t,r){var n=t.getItemVisual(r,e);if(!(!n||n==="none")){var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Zh(i),u=Mu(o||0,l),c=nr(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=e,c}}function bSt(e){var t=new hU({name:"line",subPixelOptimize:!0});return AT(t.shape,e),t}function AT(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var r=t[2];r?(e.cpx1=r[0],e.cpy1=r[1]):(e.cpx1=NaN,e.cpy1=NaN)}var KA=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createLine(r,n,i),a}return t.prototype._createLine=function(r,n,i){var a=r.hostModel,o=r.getItemLayout(n),s=r.getItemVisual(n,"z2"),l=bSt(o);l.shape.percent=0,Le(l,{z2:dt(s,0),shape:{percent:1}},a,n),this.add(l),R(N1,function(u){var c=rO(u,r,n);this.add(c),this[tO(u)]=eO(u,r,n)},this),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(n),l={shape:{}};AT(l.shape,s),se(o,l,a,n),R(N1,function(u){var c=eO(u,r,n),h=tO(u);if(this[h]!==c){this.remove(this.childOfName(u));var f=rO(u,r,n);this.add(f)}this[h]=c},this),this._updateCommonStl(r,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,f=i&&i.focus,d=i&&i.blurScope;if(!i||r.hasItemOption){var p=r.getItemModel(n),v=p.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=v.get("disabled"),f=v.get("focus"),d=v.get("blurScope"),c=dr(p)}var g=r.getItemVisual(n,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,R(N1,function(S){var w=this.childOfName(S);if(w){w.setColor(m),w.style.opacity=g.opacity;for(var C=0;C<xn.length;C++){var k=xn[C],T=o.getState(k);if(T){var A=T.style||{},L=w.ensureState(k),D=L.style||(L.style={});A.stroke!=null&&(D[w.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(D.opacity=A.opacity)}}w.markRedraw()}},this);var y=a.getRawValue(n);Cr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(S,w){return a.getFormattedLabel(S,w,r.dataType)}},inheritColor:m||U.color.neutral99,defaultOpacity:g.opacity,defaultText:(y==null?r.getName(n):isFinite(y)?Je(y):y)+""});var _=this.getTextContent();if(_){var x=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var b=x.get("distance");nt(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Ie(this,f,d,h)},t.prototype.highlight=function(){Ao(this)},t.prototype.downplay=function(){Do(this)},t.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");AT(n.shape,r),n.dirty()},t.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),i=r.childOfName("toSymbol"),a=r.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),f=Rl([],h,c);$h(f,f);function d(T,A){var L=T.__specifiedRotation;if(L==null){var D=l.tangentAt(A);T.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(D[1],D[0]))}else T.attr("rotation",L)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(h),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,v=void 0,g=a.__labelDistance,m=g[0]*o,y=g[1]*o,_=u/2,x=l.tangentAt(_),b=[x[1],-x[0]],S=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var C=-Math.atan2(x[1],x[0]);h[0]<c[0]&&(C=Math.PI+C),a.rotation=C}var k=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":k=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":k=y,v="top";break;default:k=0,v="middle"}switch(a.__position){case"end":a.x=f[0]*m+h[0],a.y=f[1]*y+h[1],p=f[0]>.8?"left":f[0]<-.8?"right":"center",v=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*m+c[0],a.y=-f[1]*y+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",v=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*w+c[0],a.y=c[1]+k,p=x[0]<0?"right":"left",a.originX=-m*w,a.originY=-k;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+k,p="center",a.originY=-k;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*w+h[0],a.y=h[1]+k,p=x[0]>=0?"right":"left",a.originX=m*w,a.originY=-k;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||p})}},t}(yt),JA=function(){function e(t){this.group=new yt,this._LineCtor=t||KA}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=nO(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=nO(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!SSt(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=r.getItemLayout(i);if(O1(a)){var o=new this._LineCtor(r,i,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){Bs(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var i=t.getItemLayout(r);if(O1(i)){var a=new this._LineCtor(t,r,n);t.setItemGraphicEl(r,a),this.group.add(a)}},e.prototype._doUpdate=function(t,r,n,i,a){var o=t.getItemGraphicEl(n);if(!O1(r.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(r,i,a):o=new this._LineCtor(r,i,a),r.setItemGraphicEl(i,o),this.group.add(o)},e}();function SSt(e){return e.animators&&e.animators.length>0}function nO(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:dr(t)}}function iO(e){return isNaN(e[0])||isNaN(e[1])}function O1(e){return e&&!iO(e[0])&&!iO(e[1])}var B1=[],F1=[],$1=[],lc=Mr,V1=Gl,aO=Math.abs;function oO(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){B1[0]=lc(n[0],i[0],a[0],c),B1[1]=lc(n[1],i[1],a[1],c);var h=aO(V1(B1,t)-l);h<o&&(o=h,s=c)}for(var f=0;f<32;f++){var d=s+u;F1[0]=lc(n[0],i[0],a[0],s),F1[1]=lc(n[1],i[1],a[1],s),$1[0]=lc(n[0],i[0],a[0],d),$1[1]=lc(n[1],i[1],a[1],d);var h=V1(F1,t)-l;if(aO(h)<.01)break;var p=V1($1,t)-l;u/=2,h<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function z1(e,t){var r=[],n=op,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[vo(u[0]),vo(u[1])],u[2]&&u.__original.push(vo(u[2])));var f=u.__original;if(u[2]!=null){if(an(i[0],f[0]),an(i[1],f[2]),an(i[2],f[1]),c&&c!=="none"){var d=bd(s.node1),p=oO(i,f[0],d*t);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(h&&h!=="none"){var d=bd(s.node2),p=oO(i,f[1],d*t);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}an(u[0],i[0]),an(u[1],i[2]),an(u[2],i[1])}else{if(an(a[0],f[0]),an(a[1],f[1]),Rl(o,a[1],a[0]),$h(o,o),c&&c!=="none"){var d=bd(s.node1);Uw(a[0],a[0],o,d*t)}if(h&&h!=="none"){var d=bd(s.node2);Uw(a[1],a[1],o,-d*t)}an(u[0],a[0]),an(u[1],a[1])}})}var fU=qt();function wSt(e){if(e)return fU(e).bridge}function sO(e,t){e&&(fU(e).bridge=t)}function lO(e){return e.type==="view"}var CSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new ev,a=new JA,o=this.group,s=new yt;this._controller=new Pu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(lO(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(h):se(this._mainGroup,h,r)}z1(r.getGraph(),xd(r));var f=r.getData();u.updateData(f);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,v=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,v));var g=r.get("layout");f.graph.eachNode(function(x){var b=x.dataIndex,S=x.getGraphicEl(),w=x.getModel();if(S){S.off("drag").off("dragend");var C=w.get("draggable");C&&S.on("drag",function(T){switch(g){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,v),p.setFixed(b),f.setItemLayout(b,[S.x,S.y]);break;case"circular":f.setItemLayout(b,[S.x,S.y]),x.setLayout({fixed:!0},!0),ZA(r,"symbolSize",x,[T.offsetX,T.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(b,[S.x,S.y]),XA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(b)}),S.setDraggable(C,!!w.get("cursor"));var k=w.get(["emphasis","focus"]);k==="adjacency"&&(At(S).focus=x.getAdjacentDataIndices())}}),f.graph.eachEdge(function(x){var b=x.getGraphicEl(),S=x.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(At(b).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var m=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),y=f.getLayout("cx"),_=f.getLayout("cy");f.graph.eachNode(function(x){uU(x,m,y,_)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!lO(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(r,n,i){this._active&&(VA(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(r,n,i){this._active&&(zA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),z1(r.getGraph(),xd(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=xd(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){this._active&&(z1(r.getGraph(),xd(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.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()},t.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=wSt(r);if(i)return{bridge:i,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new yt,l=i.group.children(),u=a.group.children(),c=new yt,h=new yt;s.add(h),s.add(c);for(var f=0;f<l.length;f++){var d=l[f],p=d.children()[0],v=d.x,g=d.y,m=_t(p.shape),y=et(m,{width:p.scaleX,height:p.scaleY,x:v-p.scaleX/2,y:g-p.scaleY/2}),_=_t(p.style),x=new p.constructor({shape:y,style:_,z2:151});h.add(x)}for(var f=0;f<u.length;f++){var d=u[f],b=d.children()[0],_=_t(b.style),y=_t(b.shape),S=new hU({style:_,shape:y,z2:151});c.add(S)}o.bridge.renderContent({api:n,roamType:r.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},t.type="graph",t}(ye);function uc(e){return"_EC_"+e}var TSt=function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,r){t=t==null?""+r:""+t;var n=this._nodesMap;if(n[uc(t)]){process.env.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var i=new wl(t,r);return i.hostGraph=this,this.nodes.push(i),n[uc(t)]=i,i},e.prototype.getNodeByIndex=function(t){var r=this.data.getRawIndex(t);return this.nodes[r]},e.prototype.getNodeById=function(t){return this._nodesMap[uc(t)]},e.prototype.addEdge=function(t,r,n){var i=this._nodesMap,a=this._edgesMap;if(ae(t)&&(t=this.nodes[t]),ae(r)&&(r=this.nodes[r]),t instanceof wl||(t=i[uc(t)]),r instanceof wl||(r=i[uc(r)]),!(!t||!r)){var o=t.id+"-"+r.id,s=new dU(t,r,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),r.inEdges.push(s)),t.edges.push(s),t!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof wl&&(t=t.id),r instanceof wl&&(r=r.id);var n=this._edgesMap;return this._directed?n[t+"-"+r]:n[t+"-"+r]||n[r+"-"+t]},e.prototype.eachNode=function(t,r){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof wl||(r=this._nodesMap[uc(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,r,null))for(var s=[r];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(t.call(i,h,l))return;s.push(h),h.__visited=!0}}}},e.prototype.update=function(){for(var t=this.data,r=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)n[t.getRawIndex(a)].dataIndex=a;r.filterSelf(function(s){var l=i[r.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=r.count();a<o;a++)i[r.getRawIndex(a)].dataIndex=a},e.prototype.clone=function(){for(var t=new e(this._directed),r=this.nodes,n=this.edges,i=0;i<r.length;i++)t.addNode(r[i].id,r[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),wl=function(){function e(t,r){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=r??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},r=0;r<this.edges.length;r++){var n=this.edges[r];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},e.prototype.getTrajectoryDataIndices=function(){for(var t=pt(),r=pt(),n=0,i=this.edges.length;n<i;n++){var a=this.edges[n];if(!(a.dataIndex<0)){t.set(a.dataIndex,!0);for(var o=[a.node1],s=[a.node2],l=0;l<o.length;){var u=o[l];l++,r.set(u.dataIndex,!0);for(var c=u.inEdges,h=0,f=c.length,d=void 0,p=void 0;h<f;h++)d=c[h],p=d.dataIndex,p>=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(d.node1))}for(l=0;l<s.length;){var v=s[l];l++,r.set(v.dataIndex,!0);for(var g=v.outEdges,h=0,m=g.length,y=void 0,_=void 0;h<m;h++)y=g[h],_=y.dataIndex,_>=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(y.node2))}}}return{edge:t.keys(),node:r.keys()}},e}(),dU=function(){function e(t,r,n){this.dataIndex=-1,this.node1=t,this.node2=r,this.dataIndex=n??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=pt(),r=pt();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,r.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,h=void 0;l<u;l++)c=o.inEdges[l],h=c.dataIndex,h>=0&&!t.hasKey(h)&&(t.set(h,!0),n.push(c.node1))}for(a=0;a<i.length;){var f=i[a];a++,r.set(f.dataIndex,!0);for(var d=f.outEdges,l=0,u=d.length,p=void 0,v=void 0;l<u;l++)p=f.outEdges[l],v=p.dataIndex,v>=0&&!t.hasKey(v)&&(t.set(v,!0),i.push(p.node2))}return{edge:t.keys(),node:r.keys()}},e}();function pU(e,t){return{getValue:function(r){var n=this[e][t];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ir(wl,pU("hostGraph","data"));ir(dU,pU("hostGraph","edgeData"));function QA(e,t,r,n,i){for(var a=new TSt(n),o=0;o<e.length;o++)a.addNode(lr(e[o].id,e[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var c=t[o],h=c.source,f=c.target;a.addEdge(h,f,u)&&(l.push(c),s.push(lr(ur(c.id,null),h+" > "+f)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=$o(e,r);else{var v=Yh.get(d),g=v?v.dimensions||[]:[];$t(g,"value")<0&&g.concat(["value"]);var m=Jp(e,{coordDimensions:g,encodeDefine:r.getEncode()}).dimensions;p=new pn(m,r),p.initData(e)}var y=new pn(["value"],r);return y.initData(l,s),i&&i(p,y),q9({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var kSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new tf(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),uu(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){fSt(this);var s=QA(a,i,this,!0,l);return R(s.edges,function(u){dSt(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=o._categoriesModels,g=p.getShallow("category"),m=v[g];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var h=ne.prototype.getModel;function f(p,v){var g=h.call(this,p,v);return g.resolveParentPath=d,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}return p}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=S8({series:this,dataIndex:r,multipleSeries:n});return h},t.prototype._updateCategoriesData=function(){var r=at(this.option.categories||[],function(i){return i.value!=null?i:et({value:0},i)}),n=new pn(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:U.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:U.color.primary}}},t}(Ae);function ASt(e){e.registerChartView(CSt),e.registerSeriesModel(kSt),e.registerProcessor(sSt),e.registerVisual(lSt),e.registerVisual(uSt),e.registerLayout(pSt),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,gSt),e.registerLayout(ySt),e.registerCoordinateSystem("graphView",{dimensions:Ru.dimensions,create:xSt}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ye),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ye),e.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=n.getViewOfSeriesModel(i);a&&(t.dx!=null&&t.dy!=null&&a.updateViewOnPan(i,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&a.updateViewOnZoom(i,n,t));var o=i.coordinateSystem,s=ex(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var uO=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;At(a).dataType="node",a.z2=2;var o=new oe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),h=r.getItemLayout(n),f=et(xa(u.getModel("itemStyle"),h,!0),h),d=this;if(isNaN(f.startAngle)){d.setShape(f);return}a?d.setShape(f):se(d,{shape:f},l,n);var p=et(xa(u.getModel("itemStyle"),h,!0),h);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),fr(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),fr(d,u,"itemStyle");var v=c.get("focus");Ie(this,v==="adjacency"?s.getAdjacentDataIndices():v,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var h=dr(n),f=i.getVisual("style");Cr(a,h,{labelFetcher:{getFormattedLabel:function(y,_,x,b,S,w){return r.getFormattedLabel(y,_,"node",b,dn(S,h.normal&&h.normal.get("formatter"),n.get("name")),w)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:f.fill,defaultOpacity:f.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",p=c.get("distance")||0,v;d==="outside"?v=o.r+p:v=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var g=d!=="outside"?c.get("align")||"center":l>0?"left":"right",m=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*v+o.cx,y:u*v+o.cy,rotation:0,style:{align:g,verticalAlign:m}})},t}(Jr),DSt=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return At(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),h=n.getItemModel(l.dataIndex),f=h.getModel("lineStyle"),d=h.getModel("emphasis"),p=d.get("focus"),v=et(xa(c.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(v.sStartAngle)||isNaN(v.tStartAngle)){g.setShape(v);return}o?(g.setShape(v),cO(g,l,r,f)):(gi(g),cO(g,l,r,f),se(g,{shape:v},s,i)),Ie(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),fr(g,h,"lineStyle"),n.setItemGraphicEl(l.dataIndex,g)},t}(Kt);function cO(e,t,r,n){var i=t.node1,a=t.node2,o=e.style;e.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(lt(l)&&lt(u)){var c=e.shape,h=(c.s1[0]+c.s2[0])/2,f=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new Wh(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var LSt=Math.PI/180,MSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*LSt;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new uO(a,c,l);At(f).dataIndex=c,s.add(f)}}).update(function(c,h){var f=o.getItemGraphicEl(h),d=a.getItemLayout(c);if(!d){f&&go(f,r,h);return}f?f.updateData(a,c,l):f=new uO(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&go(h,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=st(u[0],i.getWidth()),this.group.originY=st(u[1],i.getHeight()),Le(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},t.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new DSt(i,a,l,n);At(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&go(u,r,l)}).execute(),this._edgeData=a},t.prototype.dispose=function(){},t.type="chord",t}(ye),ESt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this))},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=QA(a,i,this,!0,s);return o.data}function s(l,u){var c=ne.prototype.getModel;function h(d,p){var v=c.call(this,d,p);return v.resolveParentPath=f,v}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=h,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return rr("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},t.type="series.chord",t.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}}},t}(Ae),G1=Math.PI/180;function ISt(e,t){e.eachSeriesByType("chord",function(r){PSt(r,t)})}function PSt(e,t){var r=e.getData(),n=r.graph,i=e.getEdgeData(),a=i.count();if(a){var o=G6(e,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((e.get("padAngle")||0)*G1,0),f=Math.max((e.get("minAngle")||0)*G1,0),d=-e.get("startAngle")*G1,p=d+Math.PI*2,v=e.get("clockwise"),g=v?1:-1,m=[d,p];R_(m,!v);var y=m[0],_=m[1],x=_-y,b=r.getSum("value")===0&&i.getSum("value")===0,S=[],w=0;n.eachEdge(function(O){var $=b?1:O.getValue("value");b&&($>0||f)&&(w+=2);var V=O.node1.dataIndex,I=O.node2.dataIndex;S[V]=(S[V]||0)+$,S[I]=(S[I]||0)+$});var C=0;if(n.eachNode(function(O){var $=O.getValue("value");isNaN($)||(S[O.dataIndex]=Math.max($,S[O.dataIndex]||0)),!b&&(S[O.dataIndex]>0||f)&&w++,C+=S[O.dataIndex]||0}),!(w===0||C===0)){h*w>=Math.abs(x)&&(h=Math.max(0,(Math.abs(x)-f*w)/w)),(h+f)*w>=Math.abs(x)&&(f=(Math.abs(x)-h*w)/w);var k=(x-h*w*g)/C,T=0,A=0,L=0;n.eachNode(function(O){var $=S[O.dataIndex]||0,V=k*(C?$:1)*g;Math.abs(V)<f?T+=f-Math.abs(V):(A+=Math.abs(V)-f,L+=Math.abs(V)),O.setLayout({angle:V,value:$})});var D=!1;if(T>A){var E=T/A;n.eachNode(function(O){var $=O.getLayout().angle;Math.abs($)>=f?O.setLayout({angle:$*E,ratio:E},!0):O.setLayout({angle:f,ratio:f===0?1:$/f},!0)})}else n.eachNode(function(O){if(!D){var $=O.getLayout().angle,V=Math.min($/L,1),I=V*T;$-I<f&&(D=!0)}});var N=T;n.eachNode(function(O){if(!(N<=0)){var $=O.getLayout().angle;if($>f&&f>0){var V=D?1:Math.min($/L,1),I=$-f,B=Math.min(I,Math.min(N,T*V));N-=B,O.setLayout({angle:$-B,ratio:($-B)/$},!0)}else f>0&&O.setLayout({angle:f,ratio:$===0?1:f/$},!0)}});var P=y,F=[];n.eachNode(function(O){var $=Math.max(O.getLayout().angle,f);O.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:P,endAngle:P+$*g,clockwise:v},!0),F[O.dataIndex]=P,P+=($+h)*g}),n.eachEdge(function(O){var $=b?1:O.getValue("value"),V=k*(C?$:1)*g,I=O.node1.dataIndex,B=F[I]||0,G=Math.abs((O.node1.getLayout().ratio||1)*V),H=B+G*g,W=[s+c*Math.cos(B),l+c*Math.sin(B)],J=[s+c*Math.cos(H),l+c*Math.sin(H)],Q=O.node2.dataIndex,tt=F[Q]||0,it=Math.abs((O.node2.getLayout().ratio||1)*V),X=tt+it*g,rt=[s+c*Math.cos(tt),l+c*Math.sin(tt)],Z=[s+c*Math.cos(X),l+c*Math.sin(X)];O.setLayout({s1:W,s2:J,sStartAngle:B,sEndAngle:H,t1:rt,t2:Z,tStartAngle:tt,tEndAngle:X,cx:s,cy:l,r:c,value:$,clockwise:v}),F[I]=H,F[Q]=X})}}}function RSt(e){e.registerChartView(MSt),e.registerSeriesModel(ESt),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,ISt),e.registerProcessor(Jh("chord"))}var NSt=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),OSt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new NSt},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},t}(Kt);function BSt(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=st(r[0],t.getWidth()),s=st(r[1],t.getHeight()),l=st(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Mg(e,t){var r=e==null?"":e+"";return t&&(lt(t)?r=t.replace("{value}",r):mt(t)&&(r=t(e))),r}var FSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=BSt(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),f=h.get("roundCap"),d=f?c0:Jr,p=h.get("show"),v=h.getModel("lineStyle"),g=v.get("width"),m=[u,c];R_(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,x=[],b=0;p&&b<a.length;b++){var S=Math.min(Math.max(a[b][0],0),1);c=u+y*S;var w=new d({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:a[b][1]}),w.setStyle(v.getLineStyle(["color","width"])),x.push(w),_=c}x.reverse(),R(x,function(k){return s.add(k)});var C=function(k){if(k<=0)return a[0][1];var T;for(T=0;T<a.length;T++)if(a[T][0]>=k&&(T===0?0:a[T-1][0])<k)return a[T][1];return a[T-1][1]};this._renderTicks(r,n,i,C,o,u,c,l,g),this._renderTitleAndDetail(r,n,i,C,o),this._renderAnchor(r,o),this._renderPointer(r,n,i,C,o,u,c,l,g)},t.prototype._renderTicks=function(r,n,i,a,o,s,l,u,c){for(var h=this.group,f=o.cx,d=o.cy,p=o.r,v=+r.get("min"),g=+r.get("max"),m=r.getModel("splitLine"),y=r.getModel("axisTick"),_=r.getModel("axisLabel"),x=r.get("splitNumber"),b=y.get("splitNumber"),S=st(m.get("length"),p),w=st(y.get("length"),p),C=s,k=(l-s)/x,T=k/b,A=m.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),D=m.get("distance"),E,N,P=0;P<=x;P++){if(E=Math.cos(C),N=Math.sin(C),m.get("show")){var F=D?D+c:c,O=new Qe({shape:{x1:E*(p-F)+f,y1:N*(p-F)+d,x2:E*(p-S-F)+f,y2:N*(p-S-F)+d},style:A,silent:!0});A.stroke==="auto"&&O.setStyle({stroke:a(P/x)}),h.add(O)}if(_.get("show")){var F=_.get("distance")+D,$=Mg(Je(P/x*(g-v)+v),_.get("formatter")),V=a(P/x),I=E*(p-S-F)+f,B=N*(p-S-F)+d,G=_.get("rotate"),H=0;G==="radial"?(H=-C+2*Math.PI,H>Math.PI/2&&(H+=Math.PI)):G==="tangential"?H=-C-Math.PI/2:ae(G)&&(H=G*Math.PI/180),H===0?h.add(new oe({style:Te(_,{text:$,x:I,y:B,verticalAlign:N<-.8?"top":N>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:V}),silent:!0})):h.add(new oe({style:Te(_,{text:$,x:I,y:B,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:I,originY:B,rotation:H}))}if(y.get("show")&&P!==x){var F=y.get("distance");F=F?F+c:c;for(var W=0;W<=b;W++){E=Math.cos(C),N=Math.sin(C);var J=new Qe({shape:{x1:E*(p-F)+f,y1:N*(p-F)+d,x2:E*(p-w-F)+f,y2:N*(p-w-F)+d},silent:!0,style:L});L.stroke==="auto"&&J.setStyle({stroke:a((P+W/b)/x)}),h.add(J),C+=T}C-=T}else C+=k}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],v=r.get(["pointer","show"]),g=r.getModel("progress"),m=g.get("show"),y=r.getData(),_=y.mapDimension("value"),x=+r.get("min"),b=+r.get("max"),S=[x,b],w=[s,l];function C(T,A){var L=y.getItemModel(T),D=L.getModel("pointer"),E=st(D.get("width"),o.r),N=st(D.get("length"),o.r),P=r.get(["pointer","icon"]),F=D.get("offsetCenter"),O=st(F[0],o.r),$=st(F[1],o.r),V=D.get("keepAspect"),I;return P?I=nr(P,O-E/2,$-N,E,N,null,V):I=new OSt({shape:{angle:-Math.PI/2,width:E,r:N,x:O,y:$}}),I.rotation=-(A+Math.PI/2),I.x=o.cx,I.y=o.cy,I}function k(T,A){var L=g.get("roundCap"),D=L?c0:Jr,E=g.get("overlap"),N=E?g.get("width"):c/y.count(),P=E?o.r-N:o.r-(T+1)*N,F=E?o.r:o.r-T*N,O=new D({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:P,r:F}});return E&&(O.z2=fe(y.get(_,T),[x,b],[100,0],!0)),O}(m||v)&&(y.diff(f).add(function(T){var A=y.get(_,T);if(v){var L=C(T,s);Le(L,{rotation:-((isNaN(+A)?w[0]:fe(A,S,w,!0))+Math.PI/2)},r),h.add(L),y.setItemGraphicEl(T,L)}if(m){var D=k(T,s),E=g.get("clip");Le(D,{shape:{endAngle:fe(A,S,w,E)}},r),h.add(D),SC(r.seriesIndex,y.dataType,T,D),p[T]=D}}).update(function(T,A){var L=y.get(_,T);if(v){var D=f.getItemGraphicEl(A),E=D?D.rotation:s,N=C(T,E);N.rotation=E,se(N,{rotation:-((isNaN(+L)?w[0]:fe(L,S,w,!0))+Math.PI/2)},r),h.add(N),y.setItemGraphicEl(T,N)}if(m){var P=d[A],F=P?P.shape.endAngle:s,O=k(T,F),$=g.get("clip");se(O,{shape:{endAngle:fe(L,S,w,$)}},r),h.add(O),SC(r.seriesIndex,y.dataType,T,O),p[T]=O}}).execute(),y.each(function(T){var A=y.getItemModel(T),L=A.getModel("emphasis"),D=L.get("focus"),E=L.get("blurScope"),N=L.get("disabled");if(v){var P=y.getItemGraphicEl(T),F=y.getItemVisual(T,"style"),O=F.fill;if(P instanceof Rr){var $=P.style;P.useStyle(et({image:$.image,x:$.x,y:$.y,width:$.width,height:$.height},F))}else P.useStyle(F),P.type!=="pointer"&&P.setColor(O);P.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",a(fe(y.get(_,T),S,[0,1],!0))),P.z2EmphasisLift=0,fr(P,A),Ie(P,D,E,N)}if(m){var V=p[T];V.useStyle(y.getItemVisual(T,"style")),V.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,fr(V,A),Ie(V,D,E,N)}}),this._progressEls=p)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=nr(s,n.cx-o/2+st(l[0],n.r),n.cy-o/2+st(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),h=+r.get("max"),f=new yt,d=[],p=[],v=r.isAnimationEnabled(),g=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new oe({silent:!0}),p[m]=new oe({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),x=new yt,b=a(fe(_,[c,h],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),C=o.cx+st(w[0],o.r),k=o.cy+st(w[1],o.r),T=d[m];T.attr({z2:g?0:2,style:Te(S,{x:C,y:k,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(T)}var A=y.getModel("detail");if(A.get("show")){var L=A.get("offsetCenter"),D=o.cx+st(L[0],o.r),E=o.cy+st(L[1],o.r),N=st(A.get("width"),o.r),P=st(A.get("height"),o.r),F=r.get(["progress","show"])?l.getItemVisual(m,"style").fill:b,T=p[m],O=A.get("formatter");T.attr({z2:g?0:2,style:Te(A,{x:D,y:E,text:Mg(_,O),width:isNaN(N)?null:N,height:isNaN(P)?null:P,align:"center",verticalAlign:"middle"},{inheritColor:F})}),S6(T,{normal:A},_,function(V){return Mg(V,O)}),v&&w6(T,m,l,r,{getFormattedLabel:function(V,I,B,G,H,W){return Mg(W?W.interpolatedValue:_,O)}}),x.add(T)}f.add(x)}),this.group.add(f),this._titleEls=d,this._detailEls=p},t.type="gauge",t}(ye),$St=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return Qh(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,U.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:U.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:U.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:U.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:U.color.neutral00,borderWidth:0,borderColor:U.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:U.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:U.color.transparent,borderWidth:0,borderColor:U.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:U.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Ae);function VSt(e){e.registerChartView(FSt),e.registerSeriesModel($St)}var zSt=["itemStyle","opacity"],GSt=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new Gr,s=new oe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(zSt);c=c??1,i||gi(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Le(a,{style:{opacity:c}},o,n)):se(a,{style:{opacity:c},shape:{points:l.points}},o,n),fr(a,s),this._updateLabel(r,n),Ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,h=r.getItemVisual(n,"style"),f=h.fill;Cr(o,dr(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),v=p==="inherit"?f:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:v,outsideFill:v});var g=c.linePoints;a.setShape({points:g}),i.textGuideLineConfig={anchor:g?new St(g[0][0],g[0][1]):null},se(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),kA(i,AA(l),{stroke:f})},t}(Qr),WSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new GSt(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);go(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(ye),HSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return Qh(this,{coordDimensions:["value"],encodeDefaulter:Bt(oA,this)})},t.prototype._defaultLabelLine=function(r){uu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.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:U.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:U.color.primary}}},t}(Ae);function jSt(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();o<s;o++)i[o]=o;return mt(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function USt(e){var t=e.hostModel,r=t.get("orient");e.each(function(n){var i=e.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=e.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,f,d,p;if(c)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,h="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[f,d],[f,d]];else{var v=void 0,g=void 0,m=void 0,y=void 0,_=s.get("length");process.env.NODE_ENV!=="production"&&(r==="vertical"&&["top","bottom"].indexOf(o)>-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),r==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))),o==="left"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=v-_,f=m-5,h="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=v+_,f=m+5,h="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,d=y-5,h="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,d=y+5,h="center"):o==="rightTop"?(v=r==="horizontal"?u[3][0]:u[1][0],g=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(y=g-_,d=y-5,h="center"):(m=v+_,f=m+5,h="top")):o==="rightBottom"?(v=u[2][0],g=u[2][1],r==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v+_,f=m+5,h="bottom")):o==="leftTop"?(v=u[0][0],g=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(y=g-_,d=y-5,h="center"):(m=v-_,f=m-5,h="right")):o==="leftBottom"?(v=r==="horizontal"?u[1][0]:u[3][0],g=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v-_,f=m-5,h="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,r==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v+_,f=m+5,h="left")),r==="horizontal"?(m=v,f=m):(y=g,d=y),p=[[v,g],[m,y]]}l.label={linePoints:p,x:f,y:d,verticalAlign:"middle",textAlign:h,inside:c}})}function YSt(e,t){e.eachSeriesByType("funnel",function(r){var n=r.getData(),i=n.mapDimension("value"),a=r.get("sort"),o=pr(r,t),s=Pe(r.getBoxLayoutParams(),o.refContainer),l=r.get("orient"),u=s.width,c=s.height,h=jSt(n,a),f=s.x,d=s.y,p=l==="horizontal"?[st(r.get("minSize"),c),st(r.get("maxSize"),c)]:[st(r.get("minSize"),u),st(r.get("maxSize"),u)],v=n.getDataExtent(i),g=r.get("min"),m=r.get("max");g==null&&(g=Math.min(v[0],0)),m==null&&(m=v[1]);var y=r.get("funnelAlign"),_=r.get("gap"),x=l==="horizontal"?u:c,b=(x-_*(n.count()-1))/n.count(),S=function(N,P){if(l==="horizontal"){var F=n.get(i,N)||0,O=fe(F,[g,m],p,!0),$=void 0;switch(y){case"top":$=d;break;case"center":$=d+(c-O)/2;break;case"bottom":$=d+(c-O);break}return[[P,$],[P,$+O]]}var V=n.get(i,N)||0,I=fe(V,[g,m],p,!0),B;switch(y){case"left":B=f;break;case"center":B=f+(u-I)/2;break;case"right":B=f+u-I;break}return[[B,P],[B+I,P]]};a==="ascending"&&(b=-b,_=-_,l==="horizontal"?f+=u:d+=c,h=h.reverse());for(var w=0;w<h.length;w++){var C=h[w],k=h[w+1],T=n.getItemModel(C);if(l==="horizontal"){var A=T.get(["itemStyle","width"]);A==null?A=b:(A=st(A,u),a==="ascending"&&(A=-A));var L=S(C,f),D=S(k,f+A);f+=A+_,n.setItemLayout(C,{points:L.concat(D.slice().reverse())})}else{var E=T.get(["itemStyle","height"]);E==null?E=b:(E=st(E,c),a==="ascending"&&(E=-E));var L=S(C,d),D=S(k,d+E);d+=E+_,n.setItemLayout(C,{points:L.concat(D.slice().reverse())})}}USt(n)})}function qSt(e){e.registerChartView(WSt),e.registerSeriesModel(HSt),e.registerLayout(YSt),e.registerProcessor(Jh("funnel"))}var XSt=.3,ZSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._dataGroup=new yt,r._initialized=!1,r}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.dimensions,h=fO(r);s.diff(l).add(f).update(d).remove(p).execute();function f(g){var m=hO(s,o,g,c,u);W1(m,s,g,h)}function d(g,m){var y=l.getItemGraphicEl(m),_=vU(s,g,c,u);s.setItemGraphicEl(g,y),se(y,{shape:{points:_}},r,g),gi(y),W1(y,s,g,h)}function p(g){var m=l.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var v=KSt(u,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(v)}this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(r,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=fO(n),u=this._progressiveEls=[],c=r.start;c<r.end;c++){var h=hO(a,this._dataGroup,c,s,o);h.incremental=!0,W1(h,a,c,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(ye);function KSt(e,t,r){var n=e.model,i=e.getRect(),a=new Ut({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),Le(a,{shape:{width:i.width,height:i.height}},t,r),a}function vU(e,t,r,n){for(var i=[],a=0;a<r.length;a++){var o=r[a],s=e.get(e.mapDimension(o),t);JSt(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function hO(e,t,r,n,i){var a=vU(e,r,n,i),o=new Gr({shape:{points:a},z2:10});return t.add(o),e.setItemGraphicEl(r,o),o}function fO(e){var t=e.get("smooth",!0);return t===!0&&(t=XSt),t=ko(t),Er(t)&&(t=0),{smooth:t}}function W1(e,t,r,n){e.useStyle(t.getItemVisual(r,"style")),e.style.fill=null,e.setShape("smooth",n.smooth);var i=t.getItemModel(r),a=i.getModel("emphasis");fr(e,i,"lineStyle"),Ie(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function JSt(e,t){return t==="category"?e==null:e==null||isNaN(e)}var QSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:ut(twt,null,this)})},t.prototype.getRawIndicesByActiveState=function(r){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){r===o&&a.push(i.getRawIndex(s))}),a},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(Ae);function twt(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var r={};return R(t.dimensions,function(n){var i=ewt(n);r[n]=i}),r}}function ewt(e){return+e.replace("dim","")}var rwt=["lineStyle","opacity"],nwt={seriesType:"parallel",reset:function(e,t){var r=e.coordinateSystem,n={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(i,a){r.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(rwt,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};function iwt(e){awt(e),owt(e)}function awt(e){if(!e.parallel){var t=!1;R(e.series,function(r){r&&r.type==="parallel"&&(t=!0)}),t&&(e.parallel=[{}])}}function owt(e){var t=xe(e.parallelAxis);R(t,function(r){if(xt(r)){var n=r.parallelIndex||0,i=xe(e.parallel)[n];i&&i.parallelAxisDefault&&zt(r,i.parallelAxisDefault,!1)}})}var swt=5,lwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this._model=r,this._api=i,this._handlers||(this._handlers={},R(uwt,function(a,o){i.getZr().on(o,this._handlers[o]=ut(a,this))},this)),Xh(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(r,n){vp(this,"_throttledDispatchExpand"),R(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},t.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(et({type:"parallelAxisExpand"},r))},t.type="parallel",t}(Ee),uwt={mousedown:function(e){H1(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(H1(this,"click")&&t){var r=[e.offsetX,e.offsetY],n=Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2);if(n>swt)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!H1(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function H1(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var cwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&zt(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=de(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Zt),hwt=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(ji);function Ls(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=cc(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=cc(s,[0,o]),i=a=cc(s,[i,a]),n=0}t[0]=cc(t[0],r),t[1]=cc(t[1],r);var l=j1(t,n);t[n]+=e;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=cc(t[n],c);var h;return h=j1(t,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(t[1-n]=t[n]+l.sign*i),h=j1(t,n),a!=null&&h.span>a&&(t[1-n]=t[n]+h.sign*a),t}function j1(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function cc(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var U1=R,gU=Math.min,mU=Math.max,dO=Math.floor,fwt=Math.ceil,pO=Je,dwt=Math.PI,pwt=function(){function e(t,r,n){this.type="parallel",this._axesMap=pt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;U1(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new hwt(o,Z_(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();U1(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),xh(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){var n=pr(t,r).refContainer;this._rect=Pe(t.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Eg(t.get("axisExpandWidth"),l),h=Eg(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=t.get("axisExpandWindow"),p;if(d)p=Eg(d[1]-d[0],l),d[1]=d[0]+p;else{p=Eg(c*(h-1),l);var v=t.get("axisExpandCenter")||dO(u/2);d=[c*v-p/2],d[1]=d[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var m=[dO(pO(d[0]/c,1))+1,fwt(pO(d[1]/c,1))-1],y=g/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),U1(n,function(o,s){var l=(i.axisExpandable?gwt:vwt)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:dwt/2,vertical:0},h=[u[a].x+t.x,u[a].y+t.y],f=c[a],d=Ir();Os(d,d,f),La(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(g){s.push(t.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var f=t.getValues(s,c),d=0,p=o.length;d<p;d++){var v=l[d].getActiveState(f[d]);if(v==="inactive"){h="inactive";break}}}r(h,c)}},e.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,r=this._axesMap,n=!1,i=0,a=t.length;i<a;i++)r.get(t[i]).model.getActiveState()!=="normal"&&(n=!0);return n},e.prototype.axisCoordToPoint=function(t,r){var n=this._axesLayout[r];return Ii([t,0],n.transform)},e.prototype.getAxisLayout=function(t){return _t(this._axesLayout[t])},e.prototype.getSlidedAxisExpandWindow=function(t){var r=this._makeLayoutInfo(),n=r.pixelDimIndex,i=r.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[n]-r.layoutBase-r.axisExpandWindow0Pos,l,u="slide",c=r.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(c)f&&c&&s<a*h[0]?(u="jump",l=s-a*h[2]):f&&c&&s>a*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?Ls(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[mU(0,p-d/2)],i[1]=gU(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},e}();function Eg(e,t){return gU(mU(e,t[0]),t[1])}function vwt(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function gwt(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return e<o[0]?(s=e*a,c=a):e<=o[1]?(s=t.axisExpandWindow0Pos+e*n-t.axisExpandWindow[0],l=n,u=!0):(s=r-(i-1-e)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function mwt(e,t){var r=[];return e.eachComponent("parallel",function(n,i){var a=new pwt(n,e,t);a.name="parallel_"+i,a.resize(n,t),n.coordinateSystem=a,a.model=n,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",Ge).models[0];n.coordinateSystem=i.coordinateSystem}}),r}var ywt={create:mwt},DT=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.activeIntervals=[],r}return t.prototype.getAreaSelectStyle=function(){return hu([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(r){var n=this.activeIntervals=_t(r);if(n)for(var i=n.length-1;i>=0;i--)hi(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=r&&r<=n[a][1])return"active";return"inactive"},t}(Zt);ir(DT,Qp);var gu=!0,Lp=Math.min,Th=Math.max,_wt=Math.pow,xwt=1e4,bwt=6,Swt=6,vO="globalPan",wwt={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Cwt={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},gO={brushStyle:{lineWidth:2,stroke:U.color.backgroundTint,fill:U.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Twt=0,tD=function(e){q(t,e);function t(r){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},process.env.NODE_ENV!=="production"&&ft(r),n._zr=r,n.group=new yt,n._uid="brushController_"+Twt++,R(Iwt,function(i,a){this._handlers[a]=ut(i,this)},n),n}return t.prototype.enableBrush=function(r){return process.env.NODE_ENV!=="production"&&ft(this._mounted),this._brushType&&this._doDisableBrush(),r.brushType&&this._doEnableBrush(r),this},t.prototype._doEnableBrush=function(r){var n=this._zr;this._enableGlobalPan||lbt(n,vO,this._uid),R(this._handlers,function(i,a){n.on(a,i)}),this._brushType=r.brushType,this._brushOption=zt(_t(gO),r,!0)},t.prototype._doDisableBrush=function(){var r=this._zr;ubt(r,vO,this._uid),R(this._handlers,function(n,i){r.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(r){if(r&&r.length){var n=this._panels={};R(r,function(i){n[i.panelId]=_t(i)})}else this._panels=null;return this},t.prototype.mount=function(r){r=r||{},process.env.NODE_ENV!=="production"&&(this._mounted=!0),this._enableGlobalPan=r.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:r.x||0,y:r.y||0,rotation:r.rotation||0,scaleX:r.scaleX||1,scaleY:r.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(r){process.env.NODE_ENV!=="production"&&ft(this._mounted),r=at(r,function(f){return zt(_t(gO),f,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Lo(i,r,u,l).add(c).update(c).remove(h).execute(),this;function l(f,d){return(f.id!=null?f.id:n+d)+"-"+f.brushType}function u(f,d){return l(f.__brushOption,d)}function c(f,d){var p=r[f];if(d!=null&&i[d]===s)a[f]=i[d];else{var v=a[f]=d!=null?(i[d].__brushOption=p,i[d]):_U(o,yU(o,p));eD(o,v)}}function h(f){i[f]!==s&&o.group.remove(i[f])}},t.prototype.unmount=function(){if(!(process.env.NODE_ENV!=="production"&&!this._mounted))return this.enableBrush(!1),LT(this),this._zr.remove(this.group),process.env.NODE_ENV!=="production"&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(yi);function yU(e,t){var r=ax[t.brushType].createCover(e,t);return r.__brushOption=t,bU(r,t),e.group.add(r),r}function _U(e,t){var r=rD(t);return r.endCreating&&(r.endCreating(e,t),bU(t,t.__brushOption)),t}function xU(e,t){var r=t.__brushOption;rD(t).updateCoverShape(e,t,r.range,r)}function bU(e,t){var r=t.z;r==null&&(r=xwt),e.traverse(function(n){n.z=r,n.z2=r})}function eD(e,t){rD(t).updateCommon(e,t),xU(e,t)}function rD(e){return ax[e.__brushOption.brushType]}function nD(e,t,r){var n=e._panels;if(!n)return gu;var i,a=e._transform;return R(n,function(o){o.isTargetByCursor(t,r,a)&&(i=o)}),i}function SU(e,t){var r=e._panels;if(!r)return gu;var n=t.__brushOption.panelId;return n!=null?r[n]:gu}function LT(e){var t=e._covers,r=t.length;return R(t,function(n){e.group.remove(n)},e),t.length=0,!!r}function mu(e,t){var r=at(e._covers,function(n){var i=n.__brushOption,a=_t(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});e.trigger("brush",{areas:r,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function kwt(e){var t=e._track;if(!t.length)return!1;var r=t[t.length-1],n=t[0],i=r[0]-n[0],a=r[1]-n[1],o=_wt(i*i+a*a,.5);return o>bwt}function wU(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function CU(e,t,r,n){var i=new yt;return i.add(new Ut({name:"main",style:iD(r),silent:!0,draggable:!0,cursor:"move",drift:Bt(mO,e,t,i,["n","s","w","e"]),ondragend:Bt(mu,t,{isEnd:!0})})),R(n,function(a){i.add(new Ut({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Bt(mO,e,t,i,a),ondragend:Bt(mu,t,{isEnd:!0})}))}),i}function TU(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=Th(i,Swt),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],h=r[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,v=h-s,g=p+i,m=v+i;Za(e,t,"main",o,s,p,v),n.transformable&&(Za(e,t,"w",l,u,a,m),Za(e,t,"e",f,u,a,m),Za(e,t,"n",l,u,g,a),Za(e,t,"s",l,d,g,a),Za(e,t,"nw",l,u,a,a),Za(e,t,"ne",f,u,a,a),Za(e,t,"sw",l,d,a,a),Za(e,t,"se",f,d,a,a))}function MT(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(iD(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?ET(e,a[0]):Dwt(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Cwt[s]+"-resize":null})})}function Za(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(Mwt(aD(e,t,[[n,i],[n+a,i+o]])))}function iD(e){return wt({strokeNoScale:!0},e.brushStyle)}function kU(e,t,r,n){var i=[Lp(e,r),Lp(t,n)],a=[Th(e,r),Th(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Awt(e){return Yl(e.group)}function ET(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=z_(r[t],Awt(e));return n[i]}function Dwt(e,t){var r=[ET(e,t[0]),ET(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function mO(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=AU(t,i,a);R(n,function(u){var c=wwt[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=e.fromRectRange(kU(s[0][0],s[1][0],s[0][1],s[1][1])),eD(t,r),mu(t,{isEnd:!1})}function Lwt(e,t,r,n){var i=t.__brushOption.range,a=AU(e,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),eD(e,t),mu(e,{isEnd:!1})}function AU(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function aD(e,t,r){var n=SU(e,t);return n&&n!==gu?n.clipPath(r,e._transform):_t(r)}function Mwt(e){var t=Lp(e[0][0],e[1][0]),r=Lp(e[0][1],e[1][1]),n=Th(e[0][0],e[1][0]),i=Th(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function Ewt(e,t,r){if(!(!e._brushType||Pwt(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=nD(e,t,r);if(!e._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===gu||s.panelId===a.panelId)&&ax[s.brushType].contain(i[o],r[0],r[1]))return}a&&n.setCursorStyle("crosshair")}}function IT(e){var t=e.event;t.preventDefault&&t.preventDefault()}function PT(e,t,r){return e.childOfName("main").contain(t,r)}function DU(e,t,r,n){var i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,s;if(e._track.push(r.slice()),kwt(e)||i){if(a&&!i){o.brushMode==="single"&&LT(e);var l=_t(o);l.brushType=yO(l.brushType,a),l.panelId=a===gu?null:a.panelId,i=e._creatingCover=yU(e,l),e._covers.push(i)}if(i){var u=ax[yO(e._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(aD(e,i,e._track)),n&&(_U(e,i),u.updateCommon(e,i)),xU(e,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&nD(e,t,r)&&LT(e)&&(s={isEnd:n,removeOnClick:!0});return s}function yO(e,t){return e==="auto"?(process.env.NODE_ENV!=="production"&&ft(t&&t.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),t.defaultBrushType):e}var Iwt={mousedown:function(e){if(this._dragging)_O(this,e);else if(!e.target||!e.target.draggable){IT(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var r=this._creatingPanel=nD(this,e,t);r&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,r=e.offsetY,n=this.group.transformCoordToLocal(t,r);if(Ewt(this,e,n),this._dragging){IT(e);var i=DU(this,e,n,!1);i&&mu(this,i)}},mouseup:function(e){_O(this,e)}};function _O(e,t){if(e._dragging){IT(t);var r=t.offsetX,n=t.offsetY,i=e.group.transformCoordToLocal(r,n),a=DU(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&mu(e,a)}}function Pwt(e,t,r){var n=e._zr;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var ax={lineX:xO(0),lineY:xO(1),rect:{createCover:function(e,t){function r(n){return n}return CU({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=wU(e);return kU(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){TU(e,t,r,n)},updateCommon:MT,contain:PT},polygon:{createCover:function(e,t){var r=new yt;return r.add(new Gr({name:"main",style:iD(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Qr({name:"main",draggable:!0,drift:Bt(Lwt,e,t),ondragend:Bt(mu,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:aD(e,t,r)})},updateCommon:MT,contain:PT}};function xO(e){return{createCover:function(t,r){return CU({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=wU(t),n=Lp(r[0][e],r[1][e]),i=Th(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=SU(t,r);if(o!==gu&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),TU(t,r,l,i)},updateCommon:MT,contain:PT}}function LU(e){return e=oD(e),function(t){return m6(t,e)}}function MU(e,t){return e=oD(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function EU(e,t,r){var n=oD(e);return function(i,a){return n.contain(a[0],a[1])&&!O9(i,t,r)}}function oD(e){return Ct.create(e)}var Rwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new tD(n.getZr())).on("brush",ut(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!Nwt(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!r.get("show")){var s=Bwt(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,h=r.axis.dim,f=l.getAxisLayout(h),d=et({strokeContainThreshold:c},f),p=new vn(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Yp(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=Ct.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:LU(h),isTargetByCursor:EU(h,s,a),getLinearBrushOtherExtent:MU(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Owt(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=at(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Ee);function Nwt(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function Owt(e){var t=e.axis;return at(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function Bwt(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var Fwt={type:"axisAreaSelect",event:"axisAreaSelected"};function $wt(e){e.registerAction(Fwt,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Vwt={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function IU(e){e.registerComponentView(lwt),e.registerComponentModel(cwt),e.registerCoordinateSystem("parallel",ywt),e.registerPreprocessor(iwt),e.registerComponentModel(DT),e.registerComponentView(Rwt),wh(e,"parallel",DT,Vwt),$wt(e)}function zwt(e){Gt(IU),e.registerChartView(ZSt),e.registerSeriesModel(QSt),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,nwt)}var Gwt=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),Wwt=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Gwt},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Ao(this)},t.prototype.downplay=function(){Do(this)},t}(Kt),Hwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new yt,r._focusAdjacencyDisabled=!1,r}return t.prototype.init=function(r,n){this._controller=new Pu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,h=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),B9(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var v=new Wwt,g=At(v);g.dataIndex=p.dataIndex,g.seriesIndex=r.seriesIndex,g.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),x=p.node1.getLayout(),b=p.node1.getModel(),S=b.get("localX"),w=b.get("localY"),C=p.node2.getLayout(),k=p.node2.getModel(),T=k.get("localX"),A=k.get("localY"),L=p.getLayout(),D,E,N,P,F,O,$,V;v.shape.extent=Math.max(1,L.dy),v.shape.orient=d,d==="vertical"?(D=(S!=null?S*u:x.x)+L.sy,E=(w!=null?w*c:x.y)+x.dy,N=(T!=null?T*u:C.x)+L.ty,P=A!=null?A*c:C.y,F=D,O=E*(1-_)+P*_,$=N,V=E*_+P*(1-_)):(D=(S!=null?S*u:x.x)+x.dx,E=(w!=null?w*c:x.y)+L.sy,N=T!=null?T*u:C.x,P=(A!=null?A*c:C.y)+L.ty,F=D*(1-_)+N*_,O=E,$=D*_+N*(1-_),V=P),v.setShape({x1:D,y1:E,x2:N,y2:P,cpx1:F,cpy1:O,cpx2:$,cpy2:V}),v.useStyle(y.getItemStyle()),bO(v.style,d,p);var I=""+m.get("value"),B=dr(m,"edgeLabel");Cr(v,B,{labelFetcher:{getFormattedLabel:function(W,J,Q,tt,it,X){return r.getFormattedLabel(W,J,"edge",tt,dn(it,B.normal&&B.normal.get("formatter"),I),X)}},labelDataIndex:p.dataIndex,defaultText:I}),v.setTextConfig({position:"inside"});var G=m.getModel("emphasis");fr(v,m,"lineStyle",function(W){var J=W.getItemStyle();return bO(J,d,p),J}),s.add(v),f.setItemGraphicEl(p.dataIndex,v);var H=G.get("focus");Ie(v,H==="adjacency"?p.getAdjacentDataIndices():H==="trajectory"?p.getTrajectoryDataIndices():H,G.get("blurScope"),G.get("disabled"))}),o.eachNode(function(p){var v=p.getLayout(),g=p.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new Ut({shape:{x:m!=null?m*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Cr(b,dr(g),{labelFetcher:{getFormattedLabel:function(w,C){return r.getFormattedLabel(w,C,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),fr(b,g),s.add(b),h.setItemGraphicEl(p.dataIndex,b),At(b).dataType="node";var S=_.get("focus");Ie(b,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,v){var g=h.getItemModel(v);g.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(jwt(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new Ru(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(ye);function bO(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");lt(n)&&lt(i)&&(e.fill=new Wh(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function jwt(e,t,r){var n=new Ut({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Le(n,{shape:{width:e.width+20}},t,r),n}var Uwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)if(o[l].depth!=null&&o[l].depth>=0)s[o[l].depth]=new ne(o[l],this,n);else if(process.env.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");var u=QA(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getData().getItemLayout(p);if(g){var m=g.depth,y=v.levelModels[m];y&&(d.parentModel=y)}return d}),f.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getGraph().getEdgeByIndex(p),m=g.node1.getLayout();if(m){var y=m.depth,_=v.levelModels[y];_&&(d.parentModel=_)}return d})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return rr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),h=c.getLayout().value,f=this.getDataParams(r,i).data.name;return rr("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.layoutMode="box",t.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:U.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:U.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(Ae);function Ywt(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=pr(r,t).refContainer,o=Pe(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,h=u.edges;Xwt(c);var f=de(c,function(g){return g.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),v=r.get("nodeAlign");qwt(c,h,n,i,s,l,d,p,v)})}function qwt(e,t,r,n,i,a,o,s,l){Zwt(e,t,r,i,a,s,l),tCt(e,t,a,i,n,o,s),uCt(e,s)}function Xwt(e){R(e,function(t){var r=ys(t.outEdges,y0),n=ys(t.inEdges,y0),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function Zwt(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<e.length;f++)l[f]=e[f].inEdges.length,l[f]===0&&u.push(e[f]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],g=v.hostGraph.data.getRawDataItem(v.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>d&&(d=g.depth),v.setLayout({depth:m?g.depth:h},!0),a==="vertical"?v.setLayout({dy:r},!0):v.setLayout({dx:r},!0);for(var y=0;y<v.outEdges.length;y++){var _=v.outEdges[y],x=t.indexOf(_);s[x]=0;var b=_.node2,S=e.indexOf(b);--l[S]===0&&c.indexOf(b)<0&&c.push(b)}}++h,u=c,c=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=d>h-1?d:h-1;o&&o!=="left"&&Kwt(e,o,a,w);var C=a==="vertical"?(i-r)/w:(n-r)/w;Qwt(e,C,a)}function PU(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function Kwt(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}R(e,function(h){PU(h)||h.setLayout({depth:Math.max(0,n-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&Jwt(e,n)}function Jwt(e,t){R(e,function(r){!PU(r)&&!r.outEdges.length&&r.setLayout({depth:t},!0)})}function Qwt(e,t,r){R(e,function(n){var i=n.getLayout().depth*t;r==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function tCt(e,t,r,n,i,a,o){var s=eCt(e,o);rCt(s,t,r,n,i,o),Y1(s,i,r,n,o);for(var l=1;a>0;a--)l*=.99,nCt(s,l,o),Y1(s,i,r,n,o),lCt(s,l,o),Y1(s,i,r,n,o)}function eCt(e,t){var r=[],n=t==="vertical"?"y":"x",i=mC(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function rCt(e,t,r,n,i,a){var o=1/0;R(e,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c<o&&(o=c)}),R(e,function(s){R(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),R(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Y1(e,t,r,n,i){var a=i==="vertical"?"x":"y";R(e,function(o){o.sort(function(v,g){return v.getLayout()[a]-g.getLayout()[a]});for(var s,l,u,c=0,h=o.length,f=i==="vertical"?"dx":"dy",d=0;d<h;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+t;var p=i==="vertical"?n:r;if(u=c-t-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function nCt(e,t,r){R(e.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=ys(i.outEdges,iCt,r)/ys(i.outEdges,y0);if(isNaN(a)){var o=i.outEdges.length;a=o?ys(i.outEdges,aCt,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Ms(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ms(i,r))*t;i.setLayout({y:l},!0)}}})})}function iCt(e,t){return Ms(e.node2,t)*e.getValue()}function aCt(e,t){return Ms(e.node2,t)}function oCt(e,t){return Ms(e.node1,t)*e.getValue()}function sCt(e,t){return Ms(e.node1,t)}function Ms(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function y0(e){return e.getValue()}function ys(e,t,r){for(var n=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],r);isNaN(o)||(n+=o)}return n}function lCt(e,t,r){R(e,function(n){R(n,function(i){if(i.inEdges.length){var a=ys(i.inEdges,oCt,r)/ys(i.inEdges,y0);if(isNaN(a)){var o=i.inEdges.length;a=o?ys(i.inEdges,sCt,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Ms(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ms(i,r))*t;i.setLayout({y:l},!0)}}})})}function uCt(e,t){var r=t==="vertical"?"x":"y";R(e,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[r]-a.node2.getLayout()[r]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[r]-a.node1.getLayout()[r]})}),R(e,function(n){var i=0,a=0;R(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),R(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function cCt(e){e.eachSeriesByType("sankey",function(t){var r=t.getGraph(),n=r.nodes,i=r.edges;if(n.length){var a=1/0,o=-1/0;R(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),R(n,function(s){var l=new wr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function hCt(e){e.registerChartView(Hwt),e.registerSeriesModel(Uwt),e.registerLayout(Ywt),e.registerVisual(cCt),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=ex(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var RU=function(){function e(){}return e.prototype._hasEncodeRule=function(t){var r=this.getEncode();return r&&r.get(t)!=null},e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),v=d[1-c].get("type"),g=t.data;if(g&&l){var m=[];R(g,function(x,b){var S;nt(x)?(S=x.slice(),x.unshift(b)):nt(x.value)?(S=et({},x),S.value=S.value.slice(),x.value.unshift(b)):S=x,m.push(S)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:e0(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:e0(v),dimsDef:y.slice()}];return Qh(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:Bt(X6,_,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}(),NU=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:U.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:U.color.shadow}},animationDuration:800},t}(Ae);ir(NU,RU,!0);var fCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=SO(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(gi(h),OU(f,h,a,u)):h=SO(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(ye),dCt=function(){function e(){}return e}(),pCt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new dCt},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();a<i.length;a++)r.moveTo(i[a][0],i[a][1]),a++,r.lineTo(i[a][0],i[a][1])},t}(Kt);function SO(e,t,r,n,i){var a=e.ends,o=new pCt({shape:{points:i?vCt(a,n,e):a}});return OU(e,o,t,r,i),o}function OU(e,t,r,n,i){var a=r.hostModel,o=Au[i?"initProps":"updateProps"];o(t,{shape:{points:e.ends}},a,n),t.useStyle(r.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=r.getItemModel(n),l=s.getModel("emphasis");fr(t,s),Ie(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function vCt(e,t,r){return at(e,function(n){return n=n.slice(),n[t]=r.initBaseline,n})}var Vd=R;function gCt(e){var t=mCt(e);Vd(t,function(r){var n=r.seriesModels;n.length&&(yCt(r),Vd(n,function(i,a){_Ct(i,r.boxOffsetList[a],r.boxWidthList[a])}))})}function mCt(e){var t=[],r=[];return e.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=$t(r,i);a<0&&(a=r.length,r[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(n)}),t}function yCt(e){var t=e.axis,r=e.seriesModels,n=r.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;Vd(r,function(p){l=Math.max(l,p.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}Vd(r,function(p){var v=p.get("boxWidth");nt(v)||(v=[v,v]),o.push([st(v[0],s)||0,st(v[1],s)||0])});var c=s*.8-2,h=c/n*.3,f=(c-h*(n-1))/n,d=f/2-c/2;Vd(r,function(p,v){a.push(d),d+=h+f,i.push(Math.min(Math.max(f,o[v][0]),o[v][1]))})}function _Ct(e,t,r){var n=e.coordinateSystem,i=e.getData(),a=r/2,o=e.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var h=0;h<i.count();h++){var f=i.get(u,h),d=_(f,c[2],h),p=_(f,c[0],h),v=_(f,c[1],h),g=_(f,c[3],h),m=_(f,c[4],h),y=[];x(y,v,!1),x(y,g,!0),y.push(p,v,m,g),b(y,p),b(y,m),b(y,d),i.setItemLayout(h,{initBaseline:d[s],ends:y})}function _(S,w,C){var k=i.get(w,C),T=[];T[o]=S,T[s]=k;var A;return isNaN(S)||isNaN(k)?A=[NaN,NaN]:(A=n.dataToPoint(T),A[o]+=t),A}function x(S,w,C){var k=w.slice(),T=w.slice();k[o]+=a,T[o]-=a,C?S.push(k,T):S.push(T,k)}function b(S,w){var C=w.slice(),k=w.slice();C[o]-=a,k[o]+=a,S.push(C,k)}}function xCt(e,t){t=t||{};for(var r=[],n=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<e.length;o++){var s=hi(e[o].slice()),l=xb(s,.25),u=xb(s,.5),c=xb(s,.75),h=s[0],f=s[s.length-1],d=(i??1.5)*(c-l),p=a?h:Math.max(h,l-d),v=a?f:Math.min(f,c+d),g=t.itemNameFormatter,m=mt(g)?g({value:o}):lt(g)?g.replace("{value}",o+""):o+"";r.push([m,p,l,u,c,v]);for(var y=0;y<s.length;y++){var _=s[y];if(_<p||_>v){var x=[m,_];n.push(x)}}}return{boxData:r,outliers:n}}var bCt={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==Pr){var n="";process.env.NODE_ENV!=="production"&&(n=_n("source data is not applicable for this boxplot transform. Expect number[][].")),ce(n)}var i=xCt(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function SCt(e){e.registerSeriesModel(NU),e.registerChartView(fCt),e.registerLayout(gCt),e.registerTransform(bCt)}var wCt=["itemStyle","borderColor"],CCt=["itemStyle","borderColor0"],TCt=["itemStyle","borderColorDoji"],kCt=["itemStyle","color"],ACt=["itemStyle","color0"];function sD(e,t){return t.get(e>0?kCt:ACt)}function lD(e,t){return t.get(e===0?TCt:e>0?wCt:CCt)}var DCt={seriesType:"candlestick",plan:qh(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=sD(s,o),l.stroke=lD(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");et(u,l)}}}}}},LCt=["color","borderColor"],MCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&wO(u,h))return;var f=q1(h,c,!0);Le(f,{shape:{points:h.ends}},r,c),X1(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&wO(u,d)){a.remove(f);return}f?(se(f,{shape:{points:d.ends}},r,c),gi(f)):f=q1(d),X1(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),CO(r,this.group);var n=r.get("clip",!0)?rv(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=q1(s);X1(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){CO(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(ye),ECt=function(){function e(){}return e}(),ICt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new ECt},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(Kt);function q1(e,t,r){var n=e.ends;return new ICt({shape:{points:r?PCt(n,e):n},z2:100})}function wO(e,t){for(var r=!0,n=0;n<t.ends.length;n++)if(e.contain(t.ends[n][0],t.ends[n][1])){r=!1;break}return r}function X1(e,t,r,n){var i=t.getItemModel(r);e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.__simpleBox=n,fr(e,i);var a=t.getItemLayout(r).sign;R(e.states,function(s,l){var u=i.getModel(l),c=sD(a,u),h=lD(a,u)||c,f=s.style||(s.style={});c&&(f.fill=c),h&&(f.stroke=h)});var o=i.getModel("emphasis");Ie(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function PCt(e,t){return at(e,function(r){return r=r.slice(),r[1]=t.initBaseline,r})}var RCt=function(){function e(){}return e}(),Z1=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new RCt},t.prototype.buildPath=function(r,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];r.moveTo(o,i[a++]),r.lineTo(o,i[a++])}else a+=3},t}(Kt);function CO(e,t,r,n){var i=e.getData(),a=i.getLayout("largePoints"),o=new Z1({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new Z1({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new Z1({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),K1(1,o,e),K1(-1,s,e),K1(0,l,e),n&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function K1(e,t,r,n){var i=lD(e,r)||sD(e,r),a=r.getModel("itemStyle").getItemStyle(LCt);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var BU=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Ae);ir(BU,RU,!0);function NCt(e){!e||!nt(e.series)||R(e.series,function(t){xt(t)&&t.type==="k"&&(t.type="candlestick")})}var OCt={seriesType:"candlestick",plan:qh(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=BCt(e,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=at(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],c=l[1],h=l[2],f=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:e.pipelineContext.large?p:d};function d(v,g){for(var m,y=g.getStore();(m=v.next())!=null;){var _=y.get(s,m),x=y.get(u,m),b=y.get(c,m),S=y.get(h,m),w=y.get(f,m),C=Math.min(x,b),k=Math.max(x,b),T=F(C,_),A=F(k,_),L=F(S,_),D=F(w,_),E=[];O(E,A,0),O(E,T,1),E.push(V(D),V(A),V(L),V(T));var N=g.getItemModel(m),P=!!N.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:TO(y,m,x,b,c,P),initBaseline:x>b?A[a]:T[a],ends:E,brushRect:$(S,w,_)})}function F(I,B){var G=[];return G[i]=B,G[a]=I,isNaN(B)||isNaN(I)?[NaN,NaN]:t.dataToPoint(G)}function O(I,B,G){var H=B.slice(),W=B.slice();H[i]=xm(H[i]+n/2,1,!1),W[i]=xm(W[i]-n/2,1,!0),G?I.push(H,W):I.push(W,H)}function $(I,B,G){var H=F(I,G),W=F(B,G);return H[i]-=n/2,W[i]-=n/2,{x:H[0],y:H[1],width:n,height:W[1]-H[1]}}function V(I){return I[i]=xm(I[i],1),I}}function p(v,g){for(var m=ya(v.count*4),y=0,_,x=[],b=[],S,w=g.getStore(),C=!!e.get(["itemStyle","borderColorDoji"]);(S=v.next())!=null;){var k=w.get(s,S),T=w.get(u,S),A=w.get(c,S),L=w.get(h,S),D=w.get(f,S);if(isNaN(k)||isNaN(L)||isNaN(D)){m[y++]=NaN,y+=3;continue}m[y++]=TO(w,S,T,A,c,C),x[i]=k,x[a]=L,_=t.dataToPoint(x,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[a]=D,_=t.dataToPoint(x,null,b),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function TO(e,t,r,n,i,a){var o;return r>n?o=-1:r<n?o=1:o=a?0:t>0?e.get(i,t-1)<=n?1:-1:1,o}function BCt(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=st(dt(e.get("barMaxWidth"),i),i),o=st(dt(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?st(s,i):Math.max(Math.min(i/2,a),o)}function FCt(e){e.registerChartView(MCt),e.registerSeriesModel(BU),e.registerPreprocessor(NCt),e.registerVisual(DCt),e.registerLayout(OCt)}function kO(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var $Ct=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=new tv(r,n),o=new yt;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=nr(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*r.period+r.effectOffset;l.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(r.period,{opacity:0}).delay(u).start(),o.add(l)}kO(o,r)},t.prototype.updateEffectAnimation=function(r){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==r[s]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}kO(i,r)},t.prototype.highlight=function(){Ao(this)},t.prototype.downplay=function(){Do(this)},t.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},t.prototype.updateData=function(r,n){var i=this,a=r.hostModel;this.childAt(0).updateData(r,n);var o=this.childAt(1),s=r.getItemModel(n),l=r.getItemVisual(n,"symbol"),u=Zh(r.getItemVisual(n,"symbolSize")),c=r.getItemVisual(n,"style"),h=c&&c.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",h)});var d=Mu(r.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=r.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=a.get("showEffectOn"),v.rippleScale=s.get(["rippleEffect","scale"]),v.brushType=s.get(["rippleEffect","brushType"]),v.period=s.get(["rippleEffect","period"])*1e3,v.effectOffset=n/r.count(),v.z=a.getShallow("z")||0,v.zlevel=a.getShallow("zlevel")||0,v.symbolType=l,v.color=h,v.rippleEffectColor=s.get(["rippleEffect","color"]),v.rippleNumber=s.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?v.showEffectOn!=="render"&&i.startEffectAnimation(v):g==="normal"&&v.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=v,Ie(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},t.prototype.fadeOut=function(r){r&&r()},t}(yt),VCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._symbolDraw=new ev($Ct)},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(r)}),this.group.add(o.group)},t.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},t.prototype.updateTransform=function(r,n,i){var a=r.getData();this.group.dirty();var o=nv("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(r){var n=r.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=oht(n.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(ye),zCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(Ae);function GCt(e){e.registerChartView(VCt),e.registerSeriesModel(zCt),e.registerLayout(nv("effectScatter"))}var FU=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a.add(a.createLine(r,n,i)),a._updateEffectSymbol(r,n),a}return t.prototype.createLine=function(r,n,i){return new KA(r,n,i)},t.prototype._updateEffectSymbol=function(r,n){var i=r.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");nt(o)||(o=[o,o]);var l=r.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=nr(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(r,a,n))},t.prototype._updateEffectAnimation=function(r,n,i){var a=this.childAt(1);if(a){var o=r.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),h=lr(n.get("delay"),function(d){return d/r.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;mt(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return ns(r.__p1,r.__cp1)+ns(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Mr,c=eC;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=ns(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):r.__lastT===1?r.scaleY=2*ns(n,s):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=s[0],r.y=s[1]},t.prototype.updateLayout=function(r,n){this.childAt(0).updateLayout(r,n);var i=r.getItemModel(n).getModel("effect");this._updateEffectAnimation(r,i,n)},t}(yt),$U=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createPolyline(r,n,i),a}return t.prototype._createPolyline=function(r,n,i){var a=r.getItemLayout(n),o=new Gr({shape:{points:a}});this.add(o),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childAt(0),s={shape:{points:r.getItemLayout(n)}};se(o,s,a,n),this._updateCommonStl(r,n,i)},t.prototype._updateCommonStl=function(r,n,i){var a=this.childAt(0),o=r.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||r.hasItemOption){var h=o.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}a.useStyle(r.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var f=a.ensureState("emphasis");f.style=s,Ie(this,l,u,c)},t.prototype.updateLayout=function(r,n){var i=this.childAt(0);i.setShape("points",r.getItemLayout(n))},t}(yt),WCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._lastFrame=0,r._lastFramePercent=0,r}return t.prototype.createLine=function(r,n,i){return new $U(r,n,i)},t.prototype._updateAnimationPoints=function(r,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=ns(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(r){var n=r.__t<1?r.__t:2-r.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];r.x=h[0]*(1-c)+c*f[0],r.y=h[1]*(1-c)+c*f[1];var d=r.__t<1?f[0]-h[0]:h[0]-f[0],p=r.__t<1?f[1]-h[1]:h[1]-f[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(FU),HCt=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),jCt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new HCt},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){r.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)r.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],h=i[o++],f=i[o++];if(r.moveTo(u,c),a>0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;r.quadraticCurveTo(d,p,h,f)}else r.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var h=a[u++],f=a[u++],d=1;d<c;d++){var p=a[u++],v=a[u++];if(Qo(h,f,p,v,s,r,n))return l}l++}else for(var l=0,u=0;u<a.length;){var h=a[u++],f=a[u++],p=a[u++],v=a[u++];if(o>0){var g=(h+p)/2-(f-v)*o,m=(f+v)/2-(p-h)*o;if(WH(h,f,g,m,p,v,s,r,n))return l}else if(Qo(h,f,p,v,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],h=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(h,o),l=Math.max(h,l)}r=this._rect=new Ct(a,o,s,l)}return r},t}(Kt),UCt=function(){function e(){this.group=new yt}return e.prototype.updateData=function(t){this._clear();var r=this._create();r.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(r,t)},e.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(t,r){var n=this._newAdded[0],i=r.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,r),l.__startIndex=t.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new jCt({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=r.getVisual("style");a&&a.stroke&&t.setStyle("stroke",a.stroke),t.setStyle("fill",null);var o=At(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),VU={seriesType:"lines",plan:qh(),reset:function(e){var t=e.coordinateSystem;if(!t){process.env.NODE_ENV!=="production"&&ie("The lines series must have a coordinate system.");return}var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c<i.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,f=[],c=i.start;c<i.end;c++){var d=e.getLineCoords(c,o);r&&(s[h++]=d);for(var p=0;p<d;p++)f=t.dataToPoint(o[p],!1,f),s[h++]=f[0],s[h++]=f[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var v=a.getItemModel(c),d=e.getLineCoords(c,o),g=[];if(r)for(var m=0;m<d;m++)g.push(t.dataToPoint(o[m]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var y=v.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}a.setItemLayout(c,g)}}}}},YCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r),s=r.get("zlevel"),l=r.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&l>0&&(c?process.env.NODE_ENV!=="production"&&console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&rv(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=VU.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return process.env.NODE_ENV!=="production"&&a&&l&&console.warn("Large lines not support effect"),(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new UCt:new JA(o?a?WCt:$U:a?FU:KA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(ye),qCt=typeof Uint32Array>"u"?Array:Uint32Array,XCt=typeof Float64Array>"u"?Array:Float64Array;function AO(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),e.data=at(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),Ck([i,r[0],r[1]])}))}var ZCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],AO(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(AO(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=ap(this._flatCoords,n.flatCoords),this._flatCoordsOffset=ap(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");if(process.env.NODE_ENV!=="production"&&!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(r),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(r){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),ae(r[0])){for(var i=r.length,a=new qCt(i),o=new XCt(i),s=0,l=0,u=0,c=0;c<i;){u++;var h=r[c++];a[l++]=s+n,a[l++]=h;for(var f=0;f<h;f++){var d=r[c++],p=r[c++];if(o[s++]=d,o[s++]=p,c>i&&process.env.NODE_ENV!=="production")throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){if(process.env.NODE_ENV!=="production"){var i=Yh.get(r.coordinateSystem);if(!i)throw new Error("Unknown coordinate system "+r.coordinateSystem)}var a=new pn(["value"],this);return a.hasItemOption=!1,a.initData(r.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;a.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),a},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Ae);function Ig(e){return e instanceof Array||(e=[e,e]),e}var KCt={seriesType:"lines",reset:function(e){var t=Ig(e.get("symbol")),r=Ig(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Ig(s.getShallow("symbol",!0)),u=Ig(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function JCt(e){e.registerChartView(YCt),e.registerSeriesModel(ZCt),e.registerLayout(VU),e.registerVisual(KCt)}var QCt=256,tTt=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Bi.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=t.length;h.width=r,h.height=n;for(var p=0;p<d;++p){var v=t[p],g=v[0],m=v[1],y=v[2],_=i(y);f.globalAlpha=_,f.drawImage(s,g-c,m-c)}if(!h.width||!h.height)return h;for(var x=f.getImageData(0,0,h.width,h.height),b=x.data,S=0,w=b.length,C=this.minOpacity,k=this.maxOpacity,T=k-C;S<w;){var _=b[S+3]/256,A=Math.floor(_*(QCt-1))*4;if(_>0){var L=o(_)?l:u;_>0&&(_=_*T+C),b[S++]=L[A],b[S++]=L[A+1],b[S++]=L[A+2],b[S++]=L[A+3]*_*256}else S+=4}return f.putImageData(x,0,0),h},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Bi.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;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=U.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}();function eTt(e,t,r){var n=e[1]-e[0];t=at(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&r[s]}}function rTt(e,t){var r=e[1]-e[0];return t=[(t[0]-e[0])/r,(t[1]-e[0])/r],function(n){return n>=t[0]&&n<=t[1]}}function DO(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var nTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;if(n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),process.env.NODE_ENV!=="production"&&!a)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):DO(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(DO(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=Ds(s,"cartesian2d"),u=Ds(s,"matrix"),c,h,f,d;if(l){var p=s.getAxis("x"),v=s.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(p.type==="category"&&v.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(p.onBand&&v.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}c=p.getBandWidth()+.5,h=v.getBandWidth()+.5,f=p.scale.getExtent(),d=v.scale.getExtent()}for(var g=this.group,m=r.getData(),y=r.getModel(["emphasis","itemStyle"]).getItemStyle(),_=r.getModel(["blur","itemStyle"]).getItemStyle(),x=r.getModel(["select","itemStyle"]).getItemStyle(),b=r.get(["itemStyle","borderRadius"]),S=dr(r),w=r.getModel("emphasis"),C=w.get("focus"),k=w.get("blurScope"),T=w.get("disabled"),A=l||u?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=i;L<a;L++){var D=void 0,E=m.getItemVisual(L,"style");if(l){var N=m.get(A[0],L),P=m.get(A[1],L);if(isNaN(m.get(A[2],L))||isNaN(N)||isNaN(P)||N<f[0]||N>f[1]||P<d[0]||P>d[1])continue;var F=s.dataToPoint([N,P]);D=new Ut({shape:{x:F[0]-c/2,y:F[1]-h/2,width:c,height:h},style:E})}else if(u){var O=s.dataToLayout([m.get(A[0],L),m.get(A[1],L)]).rect;if(Er(O.x))continue;D=new Ut({z2:1,shape:O,style:E})}else{if(isNaN(m.get(A[1],L)))continue;var $=s.dataToLayout([m.get(A[0],L)]),O=$.contentRect||$.rect;if(Er(O.x)||Er(O.y))continue;D=new Ut({z2:1,shape:O,style:E})}if(m.hasItemOption){var V=m.getItemModel(L),I=V.getModel("emphasis");y=I.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),x=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),C=I.get("focus"),k=I.get("blurScope"),T=I.get("disabled"),S=dr(V)}D.shape.r=b;var B=r.getRawValue(L),G="-";B&&B[2]!=null&&(G=B[2]+""),Cr(D,S,{labelFetcher:r,labelDataIndex:L,defaultOpacity:E.opacity,defaultText:G}),D.ensureState("emphasis").style=y,D.ensureState("blur").style=_,D.ensureState("select").style=x,Ie(D,C,k,T),D.incremental=o,o&&(D.states.emphasis.hoverLayer=!0),g.add(D),m.setItemGraphicEl(L,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new tTt;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),h=r.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),v=Math.min(c.height+c.y,a.getHeight()),g=p-f,m=v-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(w,C,k){var T=r.dataToPoint([w,C]);return T[0]-=f,T[1]-=d,T.push(k),T}),x=i.getExtent(),b=i.type==="visualMap.continuous"?rTt(x,i.option.range):eTt(x,i.getPieceList(),i.option.selected);u.update(_,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new Rr({style:{width:g,height:m,x:f,y:d,image:u.canvas},silent:!0});this.group.add(S)},t.type="heatmap",t}(ye),iTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Yh.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:U.color.primary}}},t}(Ae);function aTt(e){e.registerChartView(nTt),e.registerSeriesModel(iTt)}var oTt=["itemStyle","borderWidth"],LO=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],J1=new Bo,sTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:LO[+c],categoryDim:LO[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var v=EO(o,p),g=MO(o,p,v,f),m=IO(o,f,g);o.setItemGraphicEl(p,m),a.add(m),RO(m,f,g)}}).update(function(p,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(p)){a.remove(g);return}var m=EO(o,p),y=MO(o,p,m,f),_=UU(o,y);g&&_!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(p,null),g=null),g?pTt(g,f,y):g=IO(o,f,y,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=y,a.add(g),RO(g,f,y)}).remove(function(p){var v=s.getItemGraphicEl(p);v&&PO(s,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var d=r.get("clip",!0)?rv(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){PO(a,At(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(ye);function MO(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),f={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};lTt(r,a,i,n,f),uTt(e,t,i,a,o,f.boundingLength,f.pxSign,c,n,f),cTt(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=Mu(r.get("symbolOffset"),d);return hTt(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function lTt(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(nt(o)){var h=[Q1(s,o[0])-l,Q1(s,o[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else o!=null?c=Q1(s,o)-l:t?c=n.coordSysExtent[a.index][u]-l:c=r[a.wh];i.boundingLength=c,t&&(i.repeatCutLength=r[a.wh]);var f=a.xy==="x",d=s.inverse;i.pxSign=f&&!d||!f&&d?c>=0?1:-1:c>0?1:-1}function Q1(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function uTt(e,t,r,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(r[h.wh]),d=e.getItemVisual(t,"symbolSize"),p;nt(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=st(p[h.index],f),p[c.index]=st(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var v=u.symbolScale=[p[0]/s,p[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function cTt(e,t,r,n,i){var a=e.get(oTt)||0;a&&(J1.attr({scaleX:t[0],scaleY:t[1],rotation:r}),J1.updateTransform(),a/=J1.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function hTt(e,t,r,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,v=Math.max(t[d.index]+s,0),g=v;if(n){var m=Math.abs(l),y=lr(e.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var x=st(y,t[d.index]),b=Math.max(v+x*2,0),S=_?0:x*2,w=Ik(n),C=w?n:NO((m+S)/b),k=m-C*v;x=k/2/(_?C:Math.max(C-1,1)),b=v+x*2,S=_?0:x*2,!w&&n!=="fixed"&&(C=u?NO((Math.abs(u)+S)/b):0),g=C*b-S,h.repeatTimes=C,h.symbolMargin=x}var T=p*(g/2),A=h.pathPosition=[];A[f.index]=r[f.wh]/2,A[d.index]=o==="start"?T:o==="end"?l-T:l/2,a&&(A[0]+=a[0],A[1]+=a[1]);var L=h.bundlePosition=[];L[f.index]=r[f.xy],L[d.index]=r[d.xy];var D=h.barRectShape=et({},r);D[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(A[d.index]+T)),D[f.wh]=r[f.wh];var E=h.clipShape={};E[f.xy]=-r[f.xy],E[f.wh]=c.ecSize[f.wh],E[d.xy]=0,E[d.wh]=r[d.wh]}function zU(e){var t=e.symbolPatternSize,r=nr(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function GU(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,c=0,h=a[t.valueDim.index]+o+r.symbolMargin*2;for(uD(e,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?Uc(v,null,p(c),r,n):Uc(v,null,{scaleX:0,scaleY:0},r,n,function(){i.remove(v)}),c++});c<u;c++){var f=zU(r);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=u,i.add(f);var d=p(c);Uc(f,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},r,n)}function p(v){var g=s.slice(),m=r.pxSign,y=v;return(r.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-v),g[l.index]=h*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function WU(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?Uc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=zU(r),i.add(a),Uc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function HU(e,t,r){var n=et({},t.barRectShape),i=e.__pictorialBarRect;i?Uc(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new Ut({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function jU(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=et({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)se(i,{shape:a},s,l);else{a[o.wh]=0,i=new Ut({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Au[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function EO(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=fTt,r.isAnimationEnabled=dTt,r}function fTt(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function dTt(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function IO(e,t,r,n){var i=new yt,a=new yt;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?GU(i,t,r):WU(i,t,r),HU(i,r,n),jU(i,t,r,n),i.__pictorialShapeStr=UU(e,r),i.__pictorialSymbolMeta=r,i}function pTt(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;se(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?GU(e,t,r,!0):WU(e,t,r,!0),HU(e,r,!0),jU(e,t,r,!0)}function PO(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];uD(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){ks(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function UU(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function uD(e,t,r){R(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function Uc(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&Au[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function RO(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");uD(e,function(v){if(v instanceof Rr){var g=v.style;v.useStyle(et({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},r.style))}else v.useStyle(r.style);var m=v.ensureState("emphasis");m.style=o,f&&(m.scaleX=v.scaleX*1.1,m.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=r.z2});var d=t.valueDim.posDesc[+(r.boundingLength>0)],p=e.__pictorialBarRect;p.ignoreClip=!0,Cr(p,dr(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:Sh(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),Ie(e,c,h,a.get("disabled"))}function NO(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var vTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Fs(wp.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:U.color.primary}}}),t}(wp);function gTt(e){e.registerChartView(sTt),e.registerSeriesModel(vTt),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Bt(fj,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,dj("pictorialBar"))}var mTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(g){return g.name}var d=new Lo(this._layersSeries||[],l,f,f),p=[];d.add(ut(v,this,"add")).update(ut(v,this,"update")).remove(ut(v,this,"remove")).execute();function v(g,m,y){var _=o._layers;if(g==="remove"){s.remove(_[m]);return}for(var x=[],b=[],S,w=l[m].indices,C=0;C<w.length;C++){var k=a.getItemLayout(w[C]),T=k.x,A=k.y0,L=k.y;x.push(T,A),b.push(T,A+L),S=a.getItemVisual(w[C],"style")}var D,E=a.getItemLayout(w[0]),N=r.getModel("label"),P=N.get("margin"),F=r.getModel("emphasis");if(g==="add"){var O=p[m]=new yt;D=new n9({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),O.add(D),s.add(O),r.isAnimationEnabled()&&D.setClipPath(yTt(D.getBoundingRect(),r,function(){D.removeClipPath()}))}else{var O=_[y];D=O.childAt(0),s.add(O),p[m]=O,se(D,{shape:{points:x,stackedOnPoints:b}},r),gi(D)}Cr(D,dr(r),{labelDataIndex:w[C-1],defaultText:a.getName(w[C-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),D.setTextConfig({position:null,local:!0});var $=D.getTextContent();$&&($.x=E.x-P,$.y=E.y0+E.y/2),D.useStyle(S),a.setItemGraphicEl(m,D),fr(D,r),Ie(D,F.get("focus"),F.get("blurScope"),F.get("disabled"))}this._layersSeries=l,this._layers=p},t.type="themeRiver",t}(ye);function yTt(e,t,r){var n=new Ut({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Le(n,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,r),n}var tS=2,_Tt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this))},t.prototype.fixData=function(r){var n=r.length,i={},a=mC(r,function(f){return i.hasOwnProperty(f[0]+"")||(i[f[0]+""]=-1),f[2]}),o=[];a.buckets.each(function(f,d){o.push({name:d,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var h=o[l].dataList[c][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,r[n]=[h,0,u],n++)}return r},t.prototype.getInitialData=function(r,n){for(var i=this.getReferringComponents("singleAxis",Ge).models[0],a=i.get("type"),o=de(r.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=pt(),c=0,h=0;h<s.length;++h)l.push(s[h][tS]),u.get(s[h][tS])||(u.set(s[h][tS],c),c++);var f=Jp(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:e0(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new pn(f,this);return d.initData(s),d},t.prototype.getLayerSeries=function(){for(var r=this.getData(),n=r.count(),i=[],a=0;a<n;++a)i[a]=a;var o=r.mapDimension("single"),s=mC(i,function(u){return r.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(h,f){return r.get(o,h)-r.get(o,f)}),l.push({name:c,indices:u})}),l},t.prototype.getAxisTooltipData=function(r,n,i){nt(r)||(r=r?[r]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,f=-1,d=o[c].indices.length,p=0;p<d;++p){var v=a.get(r[0],o[c].indices[p]),g=Math.abs(v-n);g<=h&&(u=v,h=g,f=o[c].indices[p])}s.push(f)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getName(r),s=a.get(a.mapDimension("value"),r);return rr("nameValue",{name:o,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(Ae);function xTt(e,t){e.eachSeriesByType("themeRiver",function(r){var n=r.getData(),i=r.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=st(s[0],o.height),s[1]=st(s[1],o.height);var u=o.height-s[0]-s[1];OO(n,r,u)}else{s[0]=st(s[0],o.width),s[1]=st(s[1],o.width);var c=o.width-s[0]-s[1];OO(n,r,c)}n.setLayout("layoutInfo",a)})}function OO(e,t,r){if(e.count())for(var n=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension("single"),o=e.mapDimension("value"),s=at(i,function(g){return at(g.indices,function(m){var y=n.dataToPoint(e.get(a,m));return y[1]=e.get(o,m),y})}),l=bTt(s),u=l.y0,c=r/l.max,h=i.length,f=i[0].indices.length,d,p=0;p<f;++p){d=u[p]*c,e.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var v=1;v<h;++v)d+=s[v-1][p][1]*c,e.setItemLayout(i[v].indices[p],{layerIndex:v,x:s[v][p][0],y0:d,y:s[v][p][1]*c})}}function bTt(e){for(var t=e.length,r=e[0].length,n=[],i=[],a=0,o=0;o<r;++o){for(var s=0,l=0;l<t;++l)s+=e[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<r;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<r;++c){var h=n[c]+i[c];h>a&&(a=h)}return{y0:i,max:a}}function STt(e){e.registerChartView(mTt),e.registerSeriesModel(_Tt),e.registerLayout(xTt),e.registerProcessor(Jh("themeRiver"))}var wTt=2,CTt=4,BO=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=wTt,o.textConfig={inside:!0},At(o).seriesIndex=n.seriesIndex;var s=new oe({z2:CTt,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;At(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=et({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=yh(d,o));var p=xa(l.getModel("itemStyle"),h,!0);et(h,p),R(xn,function(y){var _=s.ensureState(y),x=l.getModel([y,"itemStyle"]);_.style=x.getItemStyle();var b=xa(x,h);b&&(_.shape=b)}),r?(s.setShape(h),s.shape.r=c.r0,Le(s,{shape:{r:c.r}},i,n.dataIndex)):(se(s,{shape:h},i),gi(s)),s.useStyle(f),this._updateLabel(i);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),m=g==="relative"?ap(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;Ie(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,v=a.get("show")&&!(p!=null&&Math.abs(s)<p);f.ignore=!v,R(cp,function(m){var y=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),_=m==="normal",x=_?f:f.ensureState(m),b=r.getFormattedLabel(d,m);_&&(b=b||n.node.name),x.style=Te(y,{},null,m!=="normal",!0),b&&(x.style.text=b);var S=y.get("show");S!=null&&!_&&(x.ignore=!S);var w=g(y,"position"),C=_?h:h.states[m],k=C.style.fill;C.textConfig={outsideFill:y.get("color")==="inherit"?k:null,inside:w!=="outside"};var T,A=g(y,"distance")||0,L=g(y,"align"),D=g(y,"rotate"),E=Math.PI*.5,N=Math.PI*1.5,P=zn(D==="tangential"?Math.PI/2-l:l),F=P>E&&!up(P-E)&&P<N;w==="outside"?(T=o.r+A,L=F?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?T=0:T=(o.r+o.r0)/2,L="center"):L==="left"?(T=o.r0+A,L=F?"right":"left"):L==="right"&&(T=o.r-A,L=F?"left":"right"),x.style.align=L,x.style.verticalAlign=g(y,"verticalAlign")||"middle",x.x=T*u+o.cx,x.y=T*c+o.cy;var O=0;D==="radial"?O=zn(-l)+(F?Math.PI:0):D==="tangential"?O=zn(Math.PI/2-l)+(F?Math.PI:0):ae(D)&&(O=D*Math.PI/180),x.rotation=zn(O)});function g(m,y){var _=m.get(y);return _??a.get(y)}f.dirtyStyle()},t}(Jr),RT="sunburstRootToNode",FO="sunburstHighlight",TTt="sunburstUnhighlight";function kTt(e){e.registerAction({type:RT,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=Tp(t,[RT],i);if(o){var s=i.getViewRoot();s&&(t.direction=UA(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:FO,update:"none"},function(t,r,n){t=et({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=Tp(t,[FO],a);o&&(t.dataIndex=o.node.dataIndex)}process.env.NODE_ENV!=="production"&&Ze("sunburstHighlight","highlight"),n.dispatchAction(et(t,{type:"highlight"}))}),e.registerAction({type:TTt,update:"updateView"},function(t,r,n){t=et({},t),process.env.NODE_ENV!=="production"&&Ze("sunburstUnhighlight","downplay"),n.dispatchAction(et(t,{type:"downplay"}))})}var ATt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),c=this.group,h=r.get("renderLabelForZeroData"),f=[];u.eachNode(function(y){f.push(y)});var d=this._oldChildren||[];p(f,d),m(l,u),this._initEvents(),this._oldChildren=f;function p(y,_){if(y.length===0&&_.length===0)return;new Lo(_,y,x,x).add(b).update(b).remove(Bt(b,null)).execute();function x(S){return S.getId()}function b(S,w){var C=S==null?null:y[S],k=w==null?null:_[w];v(C,k)}}function v(y,_){if(!h&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,r,n,i),s.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var x=new BO(y,r,n,i);c.add(x),s.setItemGraphicEl(y.dataIndex,x)}}}function g(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,r,n,i):(o.virtualPiece=new BO(y,r,n,i),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Wy(u,c)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:RT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(ye),DTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};YU(i);var a=this._levelModels=at(r.levels||[],function(l){return new ne(l,this,n)},this),o=jA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=nx(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){K9(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Ae);function YU(e){var t=0;R(e.children,function(n){YU(n);var i=n.value;nt(i)&&(i=i[0]),t+=i});var r=e.value;nt(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),nt(e.value)?e.value[0]=r:e.value=r}var $O=Math.PI/180;function LTt(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");nt(a)||(a=[0,a]),nt(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=st(i[0],o),c=st(i[1],s),h=st(a[0],l/2),f=st(a[1],l/2),d=-n.get("startAngle")*$O,p=n.get("minAngle")*$O,v=n.getData().tree.root,g=n.getViewRoot(),m=g.depth,y=n.get("sort");y!=null&&qU(g,y);var _=0;R(g.children,function(P){!isNaN(P.getValue())&&_++});var x=g.getValue(),b=Math.PI/(x||_)*2,S=g.depth>0,w=g.height-(S?-1:1),C=(f-h)/(w||1),k=n.get("clockwise"),T=n.get("stillShowZeroSum"),A=k?1:-1,L=function(P,F){if(P){var O=F;if(P!==v){var $=P.getValue(),V=x===0&&T?b:$*b;V<p&&(V=p),O=F+A*V;var I=P.depth-m-(S?-1:1),B=h+C*I,G=h+C*(I+1),H=n.getLevelModel(P);if(H){var W=H.get("r0",!0),J=H.get("r",!0),Q=H.get("radius",!0);Q!=null&&(W=Q[0],J=Q[1]),W!=null&&(B=st(W,l/2)),J!=null&&(G=st(J,l/2))}P.setLayout({angle:V,startAngle:F,endAngle:O,clockwise:k,cx:u,cy:c,r0:B,r:G})}if(P.children&&P.children.length){var tt=0;R(P.children,function(it){tt+=L(it,F+tt)})}return O-F}};if(S){var D=h,E=h+C,N=Math.PI*2;v.setLayout({angle:N,startAngle:d,endAngle:d+N,clockwise:k,cx:u,cy:c,r0:D,r:E})}L(g,d)})}function qU(e,t){var r=e.children||[];e.children=MTt(r,t),r.length&&R(e.children,function(n){qU(n,t)})}function MTt(e,t){if(mt(t)){var r=at(e,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return r.sort(function(i,a){return t(i.params,a.params)}),at(r,function(i){return e[i.index]})}else{var n=t==="asc";return e.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function ETt(e){var t={};function r(n,i,a){if(n.depth===0)return U.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&lt(s)&&(s=iC(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");et(u,l)})})}function ITt(e){e.registerChartView(ATt),e.registerSeriesModel(DTt),e.registerLayout(Bt(LTt,"sunburst")),e.registerProcessor(Bt(Jh,"sunburst")),e.registerVisual(ETt),kTt(e)}var VO={color:"fill",borderColor:"stroke"},PTt={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},yo=qt(),RTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return $o(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=yo(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Ae);function NTt(e,t){return t=t||[0,0],at(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function OTt(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:ut(NTt,e)}}}function BTt(e,t){return t=t||[0,0],at([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function FTt(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:ut(BTt,e)}}}function $Tt(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function VTt(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:ut($Tt,e)}}}function zTt(e,t){return t=t||[0,0],at(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function GTt(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:ut(zTt,e)}}}function WTt(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)},layout:function(n,i){return e.dataToLayout(n,i)}}}}function HTt(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r,n){return e.dataToPoint(r,n)},layout:function(r,n){return e.dataToLayout(r,n)}}}}var zO={};function XU(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||ct(e,"text")))}function ZU(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},ct(n,"text")&&(o.text=n.text),ct(n,"rich")&&(o.rich=n.rich),ct(n,"textFill")&&(o.fill=n.textFill),ct(n,"textStroke")&&(o.stroke=n.textStroke),ct(n,"fontFamily")&&(o.fontFamily=n.fontFamily),ct(n,"fontSize")&&(o.fontSize=n.fontSize),ct(n,"fontStyle")&&(o.fontStyle=n.fontStyle),ct(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=ct(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),ct(n,"textPosition")&&(i.position=n.textPosition),ct(n,"textOffset")&&(i.offset=n.textOffset),ct(n,"textRotation")&&(i.rotation=n.textRotation),ct(n,"textDistance")&&(i.distance=n.textDistance)}return GO(o,e),R(o.rich,function(l){GO(l,l)}),{textConfig:i,textContent:a}}function GO(e,t){t&&(t.font=t.textFont||t.font,ct(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),ct(t,"textAlign")&&(e.align=t.textAlign),ct(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),ct(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),ct(t,"textWidth")&&(e.width=t.textWidth),ct(t,"textHeight")&&(e.height=t.textHeight),ct(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),ct(t,"textPadding")&&(e.padding=t.textPadding),ct(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),ct(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),ct(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),ct(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),ct(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),ct(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),ct(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function WO(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||U.color.neutral99;HO(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||U.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||U.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,R(t.rich,function(s){HO(s,s)}),n}function HO(e,t){t&&(ct(t,"fill")&&(e.textFill=t.fill),ct(t,"stroke")&&(e.textStroke=t.fill),ct(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),ct(t,"font")&&(e.font=t.font),ct(t,"fontStyle")&&(e.fontStyle=t.fontStyle),ct(t,"fontWeight")&&(e.fontWeight=t.fontWeight),ct(t,"fontSize")&&(e.fontSize=t.fontSize),ct(t,"fontFamily")&&(e.fontFamily=t.fontFamily),ct(t,"align")&&(e.textAlign=t.align),ct(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),ct(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),ct(t,"width")&&(e.textWidth=t.width),ct(t,"height")&&(e.textHeight=t.height),ct(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),ct(t,"padding")&&(e.textPadding=t.padding),ct(t,"borderColor")&&(e.textBorderColor=t.borderColor),ct(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),ct(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),ct(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),ct(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),ct(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),ct(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),ct(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),ct(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),ct(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),ct(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}function jO(e,t){if(process.env.NODE_ENV!=="production"){var r=e+"^_^"+t;zO[r]||(console.warn('[ECharts] DEPRECATED: "'+e+'" has been deprecated. '+t),zO[r]=!0)}}var KU={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},UO=te(KU),_0=Da(Ma,function(e,t){return e[t]=1,e},{}),YO=Ma.join(", "),x0=["","style","shape","extra"],kh=qt();function cD(e,t,r,n,i){var a=e+"Animation",o=Hh(e,n,i)||{},s=kh(t).userDuring;return o.duration>0&&(o.during=s?ut(XTt,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),et(o,r[a]),o}function Dm(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=kh(e),u=t.style;l.userDuring=t.during;var c={},h={};if(KTt(e,t,h),e.type==="compound")for(var f=e.shape.paths,d=t.shape.paths,p=0;p<d.length;p++){var v=d[p];eS("shape",v,f[p])}else eS("shape",t,h),eS("extra",t,h);if(!a&&s&&(ZTt(e,t,c),qO("shape",e,t,c),qO("extra",e,t,c),JTt(e,t,u,c)),h.style=u,jTt(e,h,o),YTt(e,t),s)if(a){var g={};R(x0,function(y){var _=y?t[y]:t;_&&_.enterFrom&&(y&&(g[y]=g[y]||{}),et(y?g[y]:g,_.enterFrom))});var m=cD("enter",e,t,r,i);m.duration>0&&e.animateFrom(g,m)}else UTt(e,t,i||0,r,c);JU(e,t),u?e.dirty():e.markRedraw()}function JU(e,t){for(var r=kh(e).leaveToProps,n=0;n<x0.length;n++){var i=x0[n],a=i?t[i]:t;a&&a.leaveTo&&(r||(r=kh(e).leaveToProps={}),i&&(r[i]=r[i]||{}),et(i?r[i]:r,a.leaveTo))}}function ox(e,t,r,n){if(e){var i=e.parent,a=kh(e).leaveToProps;if(a){var o=cD("update",e,t,r,0);o.done=function(){i&&i.remove(e)},e.animateTo(a,o)}else i&&i.remove(e)}}function Zl(e){return e==="all"}function jTt(e,t,r){var n=t.style;if(!e.isGroup&&n){if(r){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(e.style)}}e.setStyle(n)}t&&(t.style=null,t&&e.attr(t),t.style=n)}function UTt(e,t,r,n,i){if(i){var a=cD("update",e,t,n,r);a.duration>0&&e.animateFrom(i,a)}}function YTt(e,t){ct(t,"silent")&&(e.silent=t.silent),ct(t,"ignore")&&(e.ignore=t.ignore),e instanceof vi&&ct(t,"invisible")&&(e.invisible=t.invisible),e instanceof Kt&&ct(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var oa={},qTt={setTransform:function(e,t){return process.env.NODE_ENV!=="production"&&ft(ct(_0,e),"Only "+YO+" available in `setTransform`."),oa.el[e]=t,this},getTransform:function(e){return process.env.NODE_ENV!=="production"&&ft(ct(_0,e),"Only "+YO+" available in `getTransform`."),oa.el[e]},setShape:function(e,t){process.env.NODE_ENV!=="production"&&hc(e);var r=oa.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){process.env.NODE_ENV!=="production"&&hc(e);var t=oa.el.shape;if(t)return t[e]},setStyle:function(e,t){process.env.NODE_ENV!=="production"&&hc(e);var r=oa.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&Er(t)&&Ne("style."+e+" must not be assigned with NaN."),n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){process.env.NODE_ENV!=="production"&&hc(e);var t=oa.el.style;if(t)return t[e]},setExtra:function(e,t){process.env.NODE_ENV!=="production"&&hc(e);var r=oa.el.extra||(oa.el.extra={});return r[e]=t,this},getExtra:function(e){process.env.NODE_ENV!=="production"&&hc(e);var t=oa.el.extra;if(t)return t[e]}};function hc(e){if(process.env.NODE_ENV!=="production"&&(e==="transition"||e==="enterFrom"||e==="leaveTo"))throw new Error('key must not be "'+e+'"')}function XTt(){var e=this,t=e.el;if(t){var r=kh(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}oa.el=t,n(qTt)}}function qO(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),Zl(l))et(o,a);else for(var u=xe(l),c=0;c<u.length;c++){var h=u[c],f=a[h];o[h]=f}else if(Zl(s)||$t(s,e)>=0){!o&&(o=n[e]={});for(var d=te(a),c=0;c<d.length;c++){var h=d[c],f=a[h];QTt(i[h],f)&&(o[h]=f)}}}}}function eS(e,t,r){var n=t[e];if(n)for(var i=r[e]={},a=te(n),o=0;o<a.length;o++){var s=a[o];i[s]=Id(n[s])}}function ZTt(e,t,r){for(var n=t.transition,i=Zl(n)?Ma:xe(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=e[o];process.env.NODE_ENV!=="production"&&QU(o,"el.transition"),r[o]=s}}}function KTt(e,t,r){for(var n=0;n<UO.length;n++){var i=UO[n],a=KU[i],o=t[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Ma.length;n++){var s=Ma[n];t[s]!=null&&(r[s]=t[s])}}function JTt(e,t,r,n){if(r){var i=e.style,a;if(i){var o=r.transition,s=t.transition;if(o&&!Zl(o)){var l=xe(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],h=i[c];a[c]=h}}else if(e.getAnimationStyleProps&&(Zl(s)||Zl(o)||$t(s,"style")>=0)){var f=e.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=te(r),u=0;u<p.length;u++){var c=p[u];if(d[c]){var h=i[c];a[c]=h}}}}}}}function QTt(e,t){return Kr(e)?e!==t:e!=null&&isFinite(e)}var QU;process.env.NODE_ENV!=="production"&&(QU=function(e,t){ct(_0,e)||Ne("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+te(_0).join("`, `")+"` are permitted.")});var t7=qt(),t2t=["percent","easing","shape","style","extra"];function e7(e){e.stopAnimation("keyframe"),e.attr(t7(e))}function b0(e,t,r){if(!(!r.isAnimationEnabled()||!t)){if(nt(t)){R(t,function(s){b0(e,s,r)});return}var n=t.keyframes,i=t.duration;if(r&&i==null){var a=Hh("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=t7(e);R(x0,function(s){if(!(s&&!e[s])){var l,u=!1;n.sort(function(c,h){return c.percent-h.percent}),R(n,function(c){var h=e.animators,f=s?c[s]:c;if(process.env.NODE_ENV!=="production"&&c.percent>=1&&(u=!0),!!f){var d=te(f);if(s||(d=de(d,function(g){return $t(t2t,g)<0})),!!d.length){l||(l=e.animate(s,t.loop,!0),l.scope="keyframe");for(var p=0;p<h.length;p++)h[p]!==l&&h[p].targetName===l.targetName&&h[p].stopTracks(d);s&&(o[s]=o[s]||{});var v=s?o[s]:o;R(d,function(g){v[g]=((s?e[s]:e)||{})[g]}),l.whenWithKeys(i*c.percent,f,d,c.easing)}}}),l&&(process.env.NODE_ENV!=="production"&&(u||Ne("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),l.delay(t.delay||0).duration(i).start(t.easing))}})}}}var _o="emphasis",cs="normal",hD="blur",fD="select",Es=[cs,_o,hD,fD],rS={normal:["itemStyle"],emphasis:[_o,"itemStyle"],blur:[hD,"itemStyle"],select:[fD,"itemStyle"]},nS={normal:["label"],emphasis:[_o,"label"],blur:[hD,"label"],select:[fD,"label"]},e2t=["x","y"],r2t="e\0\0",Qn={normal:{},emphasis:{},blur:{},select:{}},XO={cartesian2d:OTt,geo:FTt,single:VTt,polar:GTt,calendar:WTt,matrix:HTt};function S0(e){return e instanceof Kt}function NT(e){return e instanceof vi}function n2t(e,t){t.copyTransform(e),NT(t)&&NT(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,S0(t)&&S0(e)&&t.setShape(e.shape))}var i2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._data,s=r.getData(),l=this.group,u=ZO(r,s,n,i);o||l.removeAll(),s.diff(o).add(function(h){iS(i,null,h,u(h,a),r,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&ox(f,yo(f).option,r)}).update(function(h,f){var d=o.getItemGraphicEl(f);iS(i,d,h,u(h,a),r,l,s)}).execute();var c=r.get("clip",!0)?rv(r.coordinateSystem,!1,r):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(r,n,i,a,o){var s=n.getData(),l=ZO(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var h=r.start;h<r.end;h++){var f=iS(null,null,h,l(h,o),n,this.group,s);f&&(f.traverse(c),u.push(f))}},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype.filterForExposedEvent=function(r,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},t.type="custom",t}(ye);function dD(e){var t=e.type,r;if(t==="path"){var n=e.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=i7(n);r=hp(a,null,i,n.layout||"center"),yo(r).customPathData=a}else if(t==="image")r=new Rr({}),yo(r).customImagePath=e.style.image;else if(t==="text")r=new oe({});else if(t==="group")r=new yt;else if(t==="compoundPath"){var n=e.shape;if(!n||!n.paths){var o="";process.env.NODE_ENV!=="production"&&(o="shape.paths must be specified in compoundPath"),ce(o)}var s=at(n.paths,function(c){if(c.type==="path")return hp(c.shape.pathData,c,null);var h=Vy(c.type);if(!h){var f="";process.env.NODE_ENV!=="production"&&(f='graphic type "'+t+'" can not be found.'),ce(f)}return new h});r=new V_({shape:{paths:s}})}else{var l=Vy(t);if(!l){var o="";process.env.NODE_ENV!=="production"&&(o='graphic type "'+t+'" can not be found.'),ce(o)}r=new l}return yo(r).customGraphicType=t,r.name=e.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function pD(e,t,r,n,i,a,o){e7(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),n&&n.transition==null&&(n.transition=e2t);var l=n&&n.style;if(l){if(t.type==="text"){var u=l;ct(u,"textFill")&&(u.fill=u.textFill),ct(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=S0(t)?l.decal:null;e&&h&&(h.dirty=!0,c=yh(h,e)),l.__decalPattern=c}if(NT(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Dm(t,n,a,{dataIndex:r,isInit:o,clearStyle:!0}),b0(t,n.keyframeAnimation,a)}function r7(e,t,r,n,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(n===!1){var l=a.getState(e);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),fu(a)}}function a2t(e,t,r){if(!e.isGroup){var n=e,i=r.currentZ,a=r.currentZLevel;n.z=i,n.zlevel=a;var o=t.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Es.length;s++)o2t(n,t,Es[s])}}function o2t(e,t,r){var n=r===cs,i=n?t:w0(t,r),a=i?i.z2:null,o;a!=null&&(o=n?e:e.ensureState(r),o.z2=a||0)}function ZO(e,t,r,n){var i=e.get("renderItem");if(typeof i=="string"){var a=mmt(i);a?i=a:process.env.NODE_ENV!=="production"&&console.warn("Custom series renderItem '"+i+`' not found.
362
- Call 'echarts.registerCustomSeries' to register it.`)}var o=e.coordinateSystem,s={};o&&(process.env.NODE_ENV!=="production"&&(ft(i,"series.render is required."),ft(o.prepareCustoms||XO[o.type],"This coordSys does not support custom series.")),s=o.prepareCustoms?o.prepareCustoms(o):XO[o.type](o));for(var l=wt({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:b,style:w,ordinalRawValue:S,styleEmphasis:C,visual:A,barLayout:L,currentSeriesIndices:D,font:E},s.api||{}),u={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:s2t(e.getData()),itemPayload:e.get("itemPayload")||{}},c,h,f={},d={},p={},v={},g=0;g<Es.length;g++){var m=Es[g];p[m]=e.getModel(rS[m]),v[m]=e.getModel(nS[m])}function y(N){return N===c?h||(h=t.getItemModel(N)):t.getItemModel(N)}function _(N,P){return t.hasItemOption?N===c?f[P]||(f[P]=y(N).getModel(rS[P])):y(N).getModel(rS[P]):p[P]}function x(N,P){return t.hasItemOption?N===c?d[P]||(d[P]=y(N).getModel(nS[P])):y(N).getModel(nS[P]):v[P]}return function(N,P){return c=N,h=null,f={},d={},i&&i(wt({dataIndexInside:N,dataIndex:t.getRawIndex(N),actionType:P?P.type:null},u),l)};function b(N,P){return P==null&&(P=c),t.getStore().get(t.getDimensionIndex(N||0),P)}function S(N,P){P==null&&(P=c),N=N||0;var F=t.getDimensionInfo(N);if(!F){var O=t.getDimensionIndex(N);return O>=0?t.getStore().get(O,P):void 0}var $=t.get(F.name,P),V=F&&F.ordinalMeta;return V?V.categories[$]:$}function w(N,P){process.env.NODE_ENV!=="production"&&jO("api.style","Please write literal style directly instead."),P==null&&(P=c);var F=t.getItemVisual(P,"style"),O=F&&F.fill,$=F&&F.opacity,V=_(P,cs).getItemStyle();O!=null&&(V.fill=O),$!=null&&(V.opacity=$);var I={inheritColor:lt(O)?O:U.color.neutral99},B=x(P,cs),G=Te(B,null,I,!1,!0);G.text=B.getShallow("show")?dt(e.getFormattedLabel(P,cs),Sh(t,P)):null;var H=zy(B,I,!1);return T(N,V),V=WO(V,G,H),N&&k(V,N),V.legacy=!0,V}function C(N,P){process.env.NODE_ENV!=="production"&&jO("api.styleEmphasis","Please write literal style directly instead."),P==null&&(P=c);var F=_(P,_o).getItemStyle(),O=x(P,_o),$=Te(O,null,null,!0,!0);$.text=O.getShallow("show")?dn(e.getFormattedLabel(P,_o),e.getFormattedLabel(P,cs),Sh(t,P)):null;var V=zy(O,null,!0);return T(N,F),F=WO(F,$,V),N&&k(F,N),F.legacy=!0,F}function k(N,P){for(var F in P)ct(P,F)&&(N[F]=P[F])}function T(N,P){N&&(N.textFill&&(P.textFill=N.textFill),N.textPosition&&(P.textPosition=N.textPosition))}function A(N,P){if(P==null&&(P=c),ct(VO,N)){var F=t.getItemVisual(P,"style");return F?F[VO[N]]:null}if(ct(PTt,N))return t.getItemVisual(P,N)}function L(N){if(o.type==="cartesian2d"){var P=o.getBaseAxis();return myt(wt({axis:P},N))}}function D(){return r.getCurrentSeriesIndices()}function E(N){return qk(N,r)}}function s2t(e){var t={};return R(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function iS(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=vD(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Ie(s,n.focus,n.blurScope,n.emphasisDisabled),s}function vD(e,t,r,n,i,a){process.env.NODE_ENV!=="production"&&ft(n,"should not have an null/undefined element setting");var o=-1,s=t;t&&n7(t,n,i)&&(o=$t(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=dD(n),s&&n2t(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Qn.normal.cfg=Qn.normal.conOpt=Qn.emphasis.cfg=Qn.emphasis.conOpt=Qn.blur.cfg=Qn.blur.conOpt=Qn.select.cfg=Qn.select.conOpt=null,Qn.isLegacy=!1,u2t(u,r,n,i,l,Qn),l2t(u,r,n,i,l),pD(e,u,r,n,Qn,i,l),ct(n,"info")&&(yo(u).info=n.info);for(var c=0;c<Es.length;c++){var h=Es[c];if(h!==cs){var f=w0(n,h),d=gD(n,f,h);r7(h,u,f,d,Qn)}}return a2t(u,n,i),n.type==="group"&&c2t(e,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function n7(e,t,r){var n=yo(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&p2t(a)&&i7(a)!==n.customPathData||i==="image"&&ct(o,"image")&&o.image!==n.customImagePath}function l2t(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&n7(o,a,n)&&(o=null),o||(o=dD(a),process.env.NODE_ENV!=="production"&&ft(S0(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),e.setClipPath(o)),pD(null,o,t,a,null,n,i)}}function u2t(e,t,r,n,i,a){if(!(e.isGroup||e.type==="compoundPath")){KO(r,null,a),KO(r,_o,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=e.getTextContent();if(o===!1)c&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=dD(o),e.setTextContent(c)),pD(null,c,t,o,null,n,i);for(var h=o&&o.style,f=0;f<Es.length;f++){var d=Es[f];if(d!==cs){var p=a[d].conOpt;r7(d,c,p,gD(o,p,d),null)}}h?c.dirty():c.markRedraw()}}}}function KO(e,t,r){var n=t?w0(e,t):e,i=t?gD(e,n,_o):e.style,a=e.type,o=n?n.textConfig:null,s=e.textContent,l=s?t?w0(s,t):s:null;if(i&&(r.isLegacy||XU(i,a,!!o,!!l))){r.isLegacy=!0;var u=ZU(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text"),process.env.NODE_ENV!=="production"&&ft(c.type==="text",'textContent.type must be "text"')}var h=t?r[t]:r.normal;h.cfg=o,h.conOpt=l}function w0(e,t){return t?e?e[t]:null:e}function gD(e,t,r){var n=t&&t.style;return n==null&&r===_o&&e&&(n=e.styleEmphasis),n}function c2t(e,t,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){f2t({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:t});return}u&&t.removeAll();for(var c=0;c<o;c++){var h=a[c],f=t.childAt(c);h?(h.ignore==null&&(h.ignore=!1),vD(e,f,r,h,i,t)):(process.env.NODE_ENV!=="production"&&ft(f,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),f.ignore=!0)}for(var d=t.childCount()-1;d>=c;d--){var p=t.childAt(d);h2t(t,p,i)}}}function h2t(e,t,r){t&&ox(t,yo(e).option,r)}function f2t(e){new Lo(e.oldChildren,e.newChildren,JO,JO,e).add(QO).update(QO).remove(d2t).execute()}function JO(e,t){var r=e&&e.name;return r??r2t+t}function QO(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;vD(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function d2t(e){var t=this.context,r=t.oldChildren[e];r&&ox(r,yo(r).option,t.seriesModel)}function i7(e){return e&&(e.pathData||e.d)}function p2t(e){return e&&(ct(e,"pathData")||ct(e,"d"))}function v2t(e){e.registerChartView(i2t),e.registerSeriesModel(RTt)}var Al=qt(),tB=_t,aS=ut,mD=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new yt,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var f=Bt(eB,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}nB(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=FA(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=Al(t).pointerEl=new Au[a.type](tB(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Al(t).labelEl=new oe(tB(r.label));t.add(a),rB(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Al(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=Al(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),rB(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=qp(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){To(u.event)},onmousedown:aS(this._onHandleDragMove,this,0,0),drift:aS(this._onHandleDragMove,this),ondragend:aS(this._onHandleDragEnd,this)}),n.add(i)),nB(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");nt(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Xh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){eB(this._axisPointerModel,!r&&this._moveAnimation,this._handle,oS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(oS(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(oS(i)),Al(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),vp(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function eB(e,t,r,n){a7(Al(r).lastProp,n)||(Al(r).lastProp=n,t?se(r,n,e):(r.stopAnimation(),r.attr(n)))}function a7(e,t){if(xt(e)&&xt(t)){var r=!0;return R(t,function(n,i){r=r&&a7(e[i],n)}),!!r}else return e===t}function rB(e,t){e[t.get(["label","show"])?"show":"hide"]()}function oS(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function nB(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function yD(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function o7(e,t,r,n,i){var a=r.get("value"),o=s7(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Xp(s.get("padding")||0),u=s.getFont(),c=k_(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var v=i.verticalAlign;v==="bottom"&&(h[1]-=d),v==="middle"&&(h[1]-=d/2),g2t(h,f,d,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:Te(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function g2t(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function s7(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:r0(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),lt(o)?a=o.replace("{value}",a):mt(o)&&(a=o(s))}return a}function _D(e,t,r){var n=Ir();return Os(n,n,r.rotation),La(n,n,r.position),Ii([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function l7(e,t,r,n,i,a){var o=vn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),o7(t,n,i,a,{position:_D(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function xD(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function u7(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function iB(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var m2t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=aB(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=yD(a),d=y2t[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=f0(l.getRect(),i);l7(n,r,p,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=f0(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=_D(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=aB(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[r.x,r.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},t}(mD);function aB(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var y2t={line:function(e,t,r){var n=xD([t,r[0]],[t,r[1]],oB(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:u7([t-n/2,r[0]],[n,i],oB(e))}}};function oB(e){return e.dim==="x"?0:1}var _2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:U.color.border,width:1,type:"dashed"},shadowStyle:{color:U.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:U.color.neutral00,padding:[5,7,5,7],backgroundColor:U.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:U.color.accent40,throttle:40}},t}(Zt),co=qt(),x2t=R;function c7(e,t,r){if(!Qt.node){var n=t.getZr();co(n).records||(co(n).records={}),b2t(n,t);var i=co(n).records[e]||(co(n).records[e]={});i.handler=r}}function b2t(e,t){if(co(e).initialized)return;co(e).initialized=!0,r("click",Bt(sB,"click")),r("mousemove",Bt(sB,"mousemove")),r("globalout",w2t);function r(n,i){e.on(n,function(a){var o=C2t(t);x2t(co(e).records,function(s){s&&i(s,a,o.dispatchAction)}),S2t(o.pendings,t)})}}function S2t(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function w2t(e,t,r){e.handler("leave",null,r)}function sB(e,t,r,n){t.handler(e,r,n)}function C2t(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function OT(e,t){if(!Qt.node){var r=t.getZr(),n=(co(r).records||{})[e];n&&(co(r).records[e]=null)}}var T2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";c7("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){OT("axisPointer",n)},t.prototype.dispose=function(r,n){OT("axisPointer",n)},t.type="axisPointer",t}(Ee);function h7(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=cu(a,e);if(o==null||o<0||nt(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),v=[];v[d]=a.get(p,o),v[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(v)||[]}else r=l.dataToPoint(a.getValues(at(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var lB=qt();function k2t(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||ut(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Lm(i)&&(i=h7({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Lm(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Lm(i),f={},d={},p={list:[],map:{}},v={showPointer:Bt(D2t,d),showTooltip:Bt(L2t,p)};R(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);R(s.coordSysAxesInfo[y],function(x,b){var S=x.axis,w=P2t(u,x);if(!h&&_&&(!u||w)){var C=w&&w.value;C==null&&!l&&(C=S.pointToData(i)),C!=null&&uB(x,C,v,!1,f)}})});var g={};return R(c,function(m,y){var _=m.linkGroup;_&&!d[y]&&R(_.axesInfo,function(x,b){var S=d[b];if(x!==m&&S){var w=S.value;_.mapper&&(w=m.axis.scale.parse(_.mapper(w,cB(x),cB(m)))),g[m.key]=w}})}),R(g,function(m,y){uB(c[y],m,v,!0,f)}),M2t(d,c,f),E2t(p,i,e,o),I2t(c,o,r),f}}function uB(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=A2t(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&et(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function A2t(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,e,r);f=d.dataIndices,h=d.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],e,r.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=e-h,v=Math.abs(p);v<=o&&((v<o||p>=0&&s<0)&&(o=v,s=p,i=h,a.length=0),R(f,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function D2t(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function L2t(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Cp(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function M2t(e,t,r){var n=r.axesInfo=[];R(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function E2t(e,t,r,n){if(Lm(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function I2t(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=lB(n)[i]||{},o=lB(n)[i]={};R(e,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function P2t(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function cB(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Lm(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function av(e){Iu.registerAxisPointerClass("CartesianAxisPointer",m2t),e.registerComponentModel(_2t),e.registerComponentView(T2t),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!nt(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=Nxt(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},k2t)}function R2t(e){Gt(R9),Gt(av)}var N2t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=yD(a),p=B2t[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var v=a.get(["label","margin"]),g=O2t(n,i,a,l,v);o7(r,i,a,o,g)},t}(mD);function O2t(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=Ir();Os(f,f,s),La(f,f,[n.cx,n.cy]),u=Ii([o,-i],f);var d=t.getModel("axisLabel").get("rotate")||0,p=vn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var v=l[1];u=n.coordToPoint([v+i,o]);var g=n.cx,m=n.cy;c=Math.abs(u[0]-g)/v<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-m)/v<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var B2t={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:xD(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:iB(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:iB(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},F2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Zt),bD=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ge).models[0]},t.type="polarAxis",t}(Zt);ir(bD,Qp);var $2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(bD),V2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(bD),SD=function(e){q(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(ji);SD.prototype.dataToRadius=ji.prototype.dataToCoord;SD.prototype.radiusToData=ji.prototype.coordToData;var z2t=qt(),wD=function(e){q(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=k_(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=z2t(r.model),v=p.lastAutoInterval,g=p.lastTickCount;return v!=null&&g!=null&&Math.abs(v-d)<=1&&Math.abs(g-o)<=1&&v>d?d=v:(p.lastTickCount=o,p.lastAutoInterval=d),d},t}(ji);wD.prototype.dataToAngle=ji.prototype.dataToCoord;wD.prototype.angleToData=ji.prototype.coordToData;var f7=["radius","angle"],G2t=function(){function e(t){this.dimensions=f7,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new SD,this._angleAxis=new wD,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)],n)},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],i=t[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},e.prototype.convertToPixel=function(t,r,n){var i=hB(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=hB(r);return i===this?this.pointToData(n):null},e}();function hB(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function W2t(e,t,r){var n=t.get("center"),i=pr(t,r).refContainer;e.cx=st(n[0],i.width)+i.x,e.cy=st(n[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:nt(s)||(s=[0,s]);var l=[st(s[0],o),st(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function H2t(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(n0(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(n0(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),xh(n.scale,n.model),xh(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function j2t(e){return e.mainType==="angleAxis"}function fB(e,t){var r;if(e.type=t.get("type"),e.scale=Z_(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),j2t(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),i=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,i)}t.axis=e,e.model=t}var U2t={dimensions:f7,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new G2t(i+"");a.update=H2t;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");fB(o,l),fB(s,u),W2t(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Ge).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error('Polar "'+lr(n.get("polarIndex"),n.get("polarId"),0)+'" not found');n.coordinateSystem=i.coordinateSystem}}),r}},Y2t=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Pg(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Rg(e){var t=e.getRadiusAxis();return t.inverse?0:1}function dB(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var q2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=at(i.getViewLabels(),function(c){c=_t(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});dB(u),dB(s),R(Y2t,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&X2t[c](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Iu),X2t={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Rg(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new Au[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new jp({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Rg(r)],u=at(n,function(c){return new Qe({shape:Pg(r,[l,l+s],c.coord)})});e.add(li(u,{style:wt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Rg(r)],c=[],h=0;h<i.length;h++)for(var f=0;f<i[h].length;f++)c.push(new Qe({shape:Pg(r,[u,u+l],i[h][f].coord)}));e.add(li(c,{style:wt(s.getModel("lineStyle").getLineStyle(),wt(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,r,n,i,a,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");R(o,function(h,f){var d=l,p=h.tickValue,v=a[Rg(r)],g=r.coordToPoint([v+u,h.coord]),m=r.cx,y=r.cy,_=Math.abs(g[0]-m)/v<.3?"center":g[0]>m?"left":"right",x=Math.abs(g[1]-y)/v<.3?"middle":g[1]>y?"top":"bottom";if(s&&s[p]){var b=s[p];xt(b)&&b.textStyle&&(d=new ne(b.textStyle,l,l.ecModel))}var S=new oe({silent:vn.isLabelSilent(t),style:Te(d,{x:g[0],y:g[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:x})});if(e.add(S),Fo({el:S,componentModel:t,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return S.isTruncated},value:h.rawLabel,tickIndex:f}}),c){var w=vn.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=h.rawLabel,At(S).eventData=w}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<n.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new Qe({shape:Pg(r,a,n[h].coord)}))}for(var h=0;h<c.length;h++)e.add(li(c[h],{style:wt({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new Qe({shape:Pg(r,a,i[u][c].coord)}));e.add(li(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,r,n,i,a){if(n.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,f=-n[0].coord*h,d=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),v=t.get("clockwise"),g=1,m=n.length;g<=m;g++){var y=g===m?n[0].coord:n[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Jr({shape:{cx:r.cx,cy:r.cy,r0:d,r:p,startAngle:f,endAngle:-y*h,clockwise:v},silent:!0})),f=-y*h}for(var g=0;g<c.length;g++)e.add(li(c[g],{style:wt({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},Z2t=["splitLine","splitArea","minorSplitLine"],K2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this._axisGroup,o=this._axisGroup=new yt;this.group.add(o);var s=r.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),h=s.getMinorTicksCoords(),f=u.getExtent()[0],d=s.getExtent(),p=Q2t(l,r,f),v=new vn(r,i,p);v.build(),o.add(v.group),Yp(a,o,r),R(Z2t,function(g){r.get([g,"show"])&&!s.scale.isBlank()&&J2t[g](this.group,r,l,f,d,c,h)},this)}},t.type="radiusAxis",t}(Iu),J2t={splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=r.getAngleAxis(),h=Math.PI/180,f=c.getExtent(),d=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<a.length;v++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new Au[d]({shape:{cx:r.cx,cy:r.cy,r:Math.max(a[v].coord,0),startAngle:-f[0]*h,endAngle:-f[1]*h,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)e.add(li(p[v],{style:wt({stroke:l[v%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,r,n,i,a,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++)u.push(new Bo({shape:{cx:r.cx,cy:r.cy,r:o[c][h].coord}}));e.add(li(u,{style:wt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(e,t,r,n,i,a){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=a[0].coord,f=1;f<a.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Jr({shape:{cx:r.cx,cy:r.cy,r0:h,r:a[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=a[f].coord}for(var f=0;f<c.length;f++)e.add(li(c[f],{style:wt({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function Q2t(e,t,r){return{position:[e.cx,e.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}function d7(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function p7(e,t){return t.dim+e.model.componentIndex}function tkt(e,t,r){var n={},i=ekt(de(t.getSeriesByType(e),function(a){return!t.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));t.eachSeriesByType(e,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=p7(s,l),c=d7(a),h=i[u][c],f=h.offset,d=h.width,p=s.getOtherAxis(l),v=a.coordinateSystem.cx,g=a.coordinateSystem.cy,m=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(p.dim),x=o.mapDimension(l.dim),b=As(o,_),S=l.dim!=="radius"||!a.get("roundCap",!0),w=p.model,C=w.get("startValue"),k=p.dataToCoord(C||0),T=0,A=o.count();T<A;T++){var L=o.get(_,T),D=o.get(x,T),E=L>=0?"p":"n",N=k;b&&(n[c][D]||(n[c][D]={p:k,n:k}),N=n[c][D][E]);var P=void 0,F=void 0,O=void 0,$=void 0;if(p.dim==="radius"){var V=p.dataToCoord(L)-k,I=l.dataToCoord(D);Math.abs(V)<m&&(V=(V<0?-1:1)*m),P=N,F=N+V,O=I-f,$=O-d,b&&(n[c][D][E]=F)}else{var B=p.dataToCoord(L,S)-k,G=l.dataToCoord(D);Math.abs(B)<y&&(B=(B<0?-1:1)*y),P=G+f,F=P+d,O=N,$=N+B,b&&(n[c][D][E]=$)}o.setItemLayout(T,{cx:v,cy:g,r0:P,r:F,startAngle:-O*Math.PI/180,endAngle:-$*Math.PI/180,clockwise:O>=$})}}})}function ekt(e){var t={};R(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=p7(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;t[l]=h;var d=d7(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=st(n.get("barWidth"),c),v=st(n.get("barMaxWidth"),c),g=n.get("barGap"),m=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),v&&(f[d].maxWidth=v),g!=null&&(h.gap=g),m!=null&&(h.categoryGap=m)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=st(n.categoryGap,o),l=st(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(v,g){var m=v.maxWidth;m&&m<h&&(m=Math.min(m,u),v.width&&(m=Math.min(m,v.width)),u-=m,v.width=m,c--)}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var f=0,d;R(a,function(v,g){v.width||(v.width=h),d=v,f+=v.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;R(a,function(v,g){r[i][g]=r[i][g]||{offset:p,width:v.width},p+=v.width*(1+l)})}),r}var rkt={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},nkt={splitNumber:5},ikt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="polar",t}(Ee);function akt(e){Gt(av),Iu.registerAxisPointerClass("PolarAxisPointer",N2t),e.registerCoordinateSystem("polar",U2t),e.registerComponentModel(F2t),e.registerComponentView(ikt),wh(e,"angle",$2t,rkt),wh(e,"radius",V2t,nkt),e.registerComponentView(q2t),e.registerComponentView(K2t),e.registerLayout(Bt(tkt,"bar"))}function BT(e,t){t=t||{};var r=e.coordinateSystem,n=e.axis,i={},a=n.position,o=n.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[a],e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),lr(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var f=e.get(["axisLabel","rotate"]);return i.labelRotate=a==="top"?-f:f,i.z2=1,i}var okt=["splitArea","splitLine","breakArea"],skt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="SingleAxisPointer",r}return t.prototype.render=function(r,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new yt;var l=BT(r),u=new vn(r,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),R(okt,function(c){r.get([c,"show"])&&lkt[c](this,this.group,this._axisGroup,r,i)},this),Yp(s,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)},t.prototype.remove=function(){E9(this)},t.type="singleAxis",t}(Iu),lkt={splitLine:function(e,t,r,n,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=n.coordinateSystem.getRect(),h=a.isHorizontal(),f=[],d=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=0;m<p.length;++m){var y=a.toGlobalCoord(p[m].coord);h?(v[0]=y,v[1]=c.y,g[0]=y,g[1]=c.y+c.height):(v[0]=c.x,v[1]=y,g[0]=c.x+c.width,g[1]=y);var _=new Qe({shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},silent:!0});gh(_.shape,u);var x=d++%l.length;f[x]=f[x]||[],f[x].push(_)}for(var b=s.getLineStyle(["color"]),m=0;m<f.length;++m)t.add(li(f[m],{style:wt({stroke:l[m%l.length]},b),silent:!0}))}},splitArea:function(e,t,r,n,i){M9(e,r,n,n)},breakArea:function(e,t,r,n,i){var a=iv(),o=n.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,n,n.coordinateSystem.getRect(),i)}},Mm=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},t}(Zt);ir(Mm,Qp.prototype);var ukt=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.pointToData=function(r,n){return this.coordinateSystem.pointToData(r)[0]},t}(ji),v7=["single"],ckt=function(){function e(t,r,n){this.type="single",this.dimension="single",this.dimensions=v7,this.axisPointerEnabled=!0,this.model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=this.dimension,a=new ukt(i,Z_(t),[0,0],t.get("type"),t.get("position")),o=a.type==="category";a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},e.prototype.update=function(t,r){t.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();R(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),xh(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(t,r){var n=pr(t,r).refContainer;this._rect=Pe(t.getBoxLayoutParams(),n),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var t=this._rect,r=this._axis,n=r.isHorizontal(),i=n?[0,t.width]:[0,t.height],a=r.inverse?1:0;r.setExtent(i[a],i[1-a]),this._updateAxisTransform(r,n?t.x:t.y)},e.prototype._updateAxisTransform=function(t,r){var n=t.getExtent(),i=n[0]+n[1],a=t.isHorizontal();t.toGlobalCoord=a?function(o){return o+r}:function(o){return i-o+r},t.toLocalCoord=a?function(o){return o-r}:function(o){return i-o+r}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(t){var r=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(t[0]))&&t[1]>=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[i.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},e.prototype.convertToPixel=function(t,r,n){var i=pB(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=pB(r);return i===this?this.pointToData(n):null},e}();function pB(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function hkt(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new ckt(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Ge).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var fkt={create:hkt,dimensions:v7},vB=["x","y"],dkt=["width","height"],pkt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=sS(l,1-C0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=yD(a),d=vkt[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=BT(i);l7(n,r,p,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=BT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=_D(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=C0(o),u=sS(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=sS(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(mD),vkt={line:function(e,t,r){var n=xD([t,r[0]],[t,r[1]],C0(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:u7([t-n/2,r[0]],[n,i],C0(e))}}};function C0(e){return e.isHorizontal()?0:1}function sS(e,t){var r=e.getRect();return[r[vB[t]],r[vB[t]]+r[dkt[t]]]}var gkt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(Ee);function mkt(e){Gt(av),Iu.registerAxisPointerClass("SingleAxisPointer",pkt),e.registerComponentView(gkt),e.registerComponentView(skt),e.registerComponentModel(Mm),wh(e,"single",Mm,Mm.defaultOption),e.registerCoordinateSystem("single",fkt)}var ykt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=Du(r);e.prototype.init.apply(this,arguments),gB(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),gB(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:U.color.axisLine,width:1,type:"solid"}},itemStyle:{color:U.color.neutral00,borderWidth:1,borderColor:U.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:U.size.s,color:U.color.secondary},monthLabel:{show:!0,position:"start",margin:U.size.s,align:"center",formatter:null,color:U.color.secondary},yearLabel:{show:!0,position:null,margin:U.size.xl,formatter:null,color:U.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Zt);function gB(e,t){var r=e.cellSize,n;nt(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=at([0,1],function(a){return Qpt(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Pa(e,t,{type:"box",ignoreSize:i})}var _kt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,h=new Ut({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToCalendarLayout([v],!1).tl);var g=o._getLinePointsOfOneWeek(r,v,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new Gr({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return lt(r)&&r?Ypt(r,n):mt(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var v=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},m=this._formatterLabel(v,g),y=new oe({z2:30,style:Te(o,{text:m}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||lt(s))&&(s&&(n=IC(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=o.get("silent"),g=0;g<h[f].length-1;g++){var m=h[f][g].slice(),y=this._firstDayOfMonth[g];if(p){var _=this._firstDayPoints[g];m[d]=(_[d]+h[0][g+1][d])/2}var x=o.get("formatter"),b=s[+y.m-1],S={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:b},w=this._formatterLabel(x,S),C=new oe({z2:30,style:et(Te(o,{text:w}),this._monthTextPositionControl(m,p,i,u,l)),silent:v});a.add(C)}}},t.prototype._weekTextPositionControl=function(r,n,i,a,o){var s="center",l="middle",u=r[0],c=r[1],h=i==="start";return n==="horizontal"?(u=u+a+(h?1:-1)*o[0]/2,s=h?"right":"left"):(c=c+a+(h?1:-1)*o[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(r,n,i,a,o){var s=r.getModel("dayLabel");if(s.get("show")){var l=r.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),h=s.get("margin"),f=l.getFirstDayOfWeek();if(!c||lt(c)){c&&(n=IC(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||at(n.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];h=st(h,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,h=-h);for(var g=s.get("silent"),m=0;m<7;m++){var y=l.getNextNDay(p,m),_=l.dataToCalendarLayout([y.time],!1).center,x=m;x=Math.abs((m+f)%7);var b=new oe({z2:30,style:et(Te(s,{text:c[x]}),this._weekTextPositionControl(_,a,u,h,v)),silent:g});o.add(b)}}},t.type="calendar",t}(Ee),lS=864e5,xkt=function(){function e(t,r,n){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(r,n)}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(t){t=ku(t);var r=t.getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,a=t.getDate(),o=a<10?"0"+a:""+a,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:r+"",m:i,d:o,day:s,time:t.getTime(),formatedDate:r+"-"+i+"-"+o,date:t}},e.prototype.getNextNDay=function(t,r){return r=r||0,r===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+r),this.getDateInfo(t))},e.prototype._update=function(t,r){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];R([0,1],function(h){c(a,h)&&(o[i[h]]=a[h]*s[h])});var l={width:r.getWidth(),height:r.getHeight()},u=this._rect=Pe(o,l);R([0,1],function(h){c(a,h)||(a[h]=u[i[h]]/s[h])});function c(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=a[0],this._sh=a[1]},e.prototype.dataToPoint=function(t,r,n){n=n||[],nt(t)&&(t=t[0]),r==null&&(r=!0);var i=this.getDateInfo(t),a=this._rangeInfo,o=i.formatedDate;if(r&&!(i.time>=a.start.time&&i.time<a.end.time+lS))return n[0]=n[1]=NaN,n;var s=i.day,l=this._getRangeInfo([a.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2),n},e.prototype.pointToData=function(t){var r=this.pointToDate(t);return r&&r.time},e.prototype.dataToLayout=function(t,r,n){n=n||{};var i=n.rect=n.rect||{},a=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,r);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,Ct.copy(a,i),du(a,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(t,r){var n=this.dataToPoint(t,r);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]}},e.prototype.pointToDate=function(t){var r=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 this._orient==="vertical"?this._getDateByWeeksAndDay(n,r-1,i):this._getDateByWeeksAndDay(r,n-1,i)},e.prototype.convertToPixel=function(t,r,n){var i=uS(r);return i===this?i.dataToPoint(n):null},e.prototype.convertToLayout=function(t,r,n){var i=uS(r);return i===this?i.dataToLayout(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=uS(r);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var t=this._model.get("range"),r;if(nt(t)&&t.length===1&&(t=t[0]),nt(t))r=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(r=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);r=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(r=[n,n])}if(!r)return process.env.NODE_ENV!=="production"&&Mi("Invalid date range."),t;var s=this._getRangeInfo(r);return s.start.time>s.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/lS)-Math.floor(r[0].time/lS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),h=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&r<i.fweek||t===i.weeks&&r>i.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){Zp({targetModel:a,coordSysType:"calendar",coordSysProvider:$6})}),n},e.dimensions=["time","value"],e}();function uS(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function bkt(e){e.registerComponentModel(ykt),e.registerComponentView(_kt),e.registerCoordinateSystem("calendar",xkt)}var oo={level:1,leaf:2,nonLeaf:3},xo={none:0,all:1,body:2,corner:3};function FT(e,t,r){var n=t[Pt[r]].getCell(e);return!n&&ae(e)&&e<0&&(n=t[Pt[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function g7(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function m7(e,t,r,n,i){mB(e[0],t,i,r,n,0),mB(e[1],t,i,r,n,1)}function mB(e,t,r,n,i,a){e[0]=1/0,e[1]=-1/0;var o=n[a],s=nt(o)?o:[o],l=s.length,u=!!r;if(l>=1?(yB(e,t,s,u,i,a,0),l>1&&yB(e,t,s,u,i,a,l-1)):(process.env.NODE_ENV!=="production"&&t&&t.push('Should be like [["x1", "x2"], ["y1", "y2"]], or ["x1", "y1"], rather than empty.'),e[0]=e[1]=NaN),u){var c=-i[Pt[1-a]].getLocatorCount(a),h=i[Pt[a]].getLocatorCount(a)-1;r===xo.body?c=Ue(0,c):r===xo.corner&&(h=Wn(-1,h)),h<c&&(c=h=NaN),Er(e[0])&&(e[0]=c),Er(e[1])&&(e[1]=h),e[0]=Ue(Wn(e[0],h),c),e[1]=Ue(Wn(e[1],h),c)}}function yB(e,t,r,n,i,a,o){var s=FT(r[o],i,a);if(!s){process.env.NODE_ENV!=="production"&&!n&&t&&t.push("Can not find cell by coord["+a+"]["+o+"]."),e[0]=e[1]=NaN;return}var l=s.id[Pt[a]],u=l,c=Tkt(s);c&&(u+=c.span[Pt[a]]-1),e[0]=Wn(e[0],l,u),e[1]=Ue(e[1],l,u)}function Ng(e,t){return Er(e[t][0])||Er(e[t][1])}function _B(e,t,r,n){t=t||Skt;for(var i=0;i<n;i++)t[i]=!1;for(;;){for(var a=!1,i=0;i<n;i++){var o=r[i];!t[i]&&o.cellMergeOwner&&wkt(e,o.locatorRange)&&(t[i]=!0,a=!0)}if(!a)break}}var Skt=[];function wkt(e,t){return!xB(e[0],t[0])||!xB(e[1],t[1])?!1:(e[0][0]=Wn(e[0][0],t[0][0]),e[0][1]=Ue(e[0][1],t[0][1]),e[1][0]=Wn(e[1][0],t[1][0]),e[1][1]=Ue(e[1][1],t[1][1]),!0)}function xB(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function bB(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function Ckt(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function SB(e,t,r,n){var i=FT(t[n][0],r,n),a=FT(t[n][1],r,n);e[Pt[n]]=e[er[n]]=NaN,i&&a&&(e[Pt[n]]=i.xy,e[er[n]]=a.xy+a.wh-i.xy)}function Uf(e,t,r,n){return e[Pt[t]]=r,e[Pt[1-t]]=n,e}function Tkt(e){return e&&(e.type===oo.leaf||e.type===oo.nonLeaf)?e:null}function T0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var wB=function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=kkt(t);var n=r.get("data",!0);n!=null&&!nt(n)&&(process.env.NODE_ENV!=="production"&&ie("Illegal echarts option - matrix."+this.dim+".data must be an array if specified."),n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(t,0,0),l();return;function s(u,c,h){var f=0;return u&&R(u,function(d,p){var v=!1,g;lt(d)?g={value:d}:xt(d)?(g=d,d.value!=null&&!lt(d.value)&&(v=!0,g={value:null})):(g={value:null},d!=null&&(v=!0)),v&&process.env.NODE_ENV!=="production"&&ie("Illegal echarts option - matrix."+r.dim+".data["+p+"] must be `string | {value: string}`.");var m={type:oo.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new St,span:Uf(new St,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:T0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:oo.level,xy:NaN,wh:NaN,option:null,id:new St,dim:r});var y=s(g.children,c,h+1),_=Math.max(1,y);m.span[Pt[r.dimIdx]]=_,f+=_,c+=_}),f}function l(){for(var u=[];n.length<o;)for(var c=0;c<a.length;c++){var h=a[c].pop();if(h){h.ordinal=u.length;var f=h.option.value;u.push(f),n.push(h),r._uniqueValueGen.calcDupBase(f)}}r._uniqueValueGen.ensureValueUnique(u,n);var d=r._ordinalMeta=new _p({categories:u,needCollect:!1,deduplication:!1});r._scale=new _h({ordinalMeta:d});for(var p=0;p<r._leavesCount;p++){var v=r._cells[p];v.type=oo.leaf,v.span[Pt[1-r.dimIdx]]=r._levels.length-v.level}r._initCellsId(),r._initLevelIdOptions()}},e.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:oo.level,xy:NaN,wh:NaN,option:null,id:new St,dim:t}],t._initLevelIdOptions();var r=t._ordinalMeta=new _p({needCollect:!0,deduplication:!0,onCollect:function(n,i){var a=t._cells[i]={type:oo.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new St,span:Uf(new St,t.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:t,rect:T0()};t._leavesCount++,t._setCellId(a)}});t._scale=new _h({ordinalMeta:r})},e.prototype._setCellId=function(t){var r=this._levels.length,n=this.dimIdx;Uf(t.id,n,t.firstLeafLocator,t.level-r)},e.prototype._initCellsId=function(){var t=this._levels.length,r=this.dimIdx;R(this._cells,function(n){Uf(n.id,r,n.firstLeafLocator,n.level-t)})},e.prototype._initLevelIdOptions=function(){var t=this._levels.length,r=this.dimIdx,n=this._model.get("levels",!0);n=nt(n)?n:[],R(this._levels,function(i,a){Uf(i.id,r,0,a-t),i.option=n[a]})},e.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},e.prototype.resetLayoutIterator=function(t,r,n,i){if(t=t||new gs,r===this.dimIdx){var a=this._leavesCount,o=n!=null?Math.max(0,n):0;i=i!=null?Math.min(i,a):a,t.reset(this._cells,o,o+i)}else{var a=this._levels.length,o=n!=null?Math.max(0,n+a):0;i=i!=null?Math.min(i,a):a,t.reset(this._levels,o,o+i)}return t},e.prototype.resetCellIterator=function(t){return(t||new gs).reset(this._cells,0)},e.prototype.resetLevelIterator=function(t){return(t||new gs).reset(this._levels,0)},e.prototype.getLayout=function(t,r,n){var i=this.getUnitLayoutInfo(r,n);t[Pt[r]]=i?i.xy:NaN,t[er[r]]=i?i.wh:NaN},e.prototype.getUnitLayoutInfo=function(t,r){return t===this.dimIdx?r<this._leavesCount?this._cells[r]:void 0:this._levels[r+this._levels.length]},e.prototype.getCell=function(t){var r=this._scale.parse(t);return Er(r)?void 0:this._cells[r]},e.prototype.getLocatorCount=function(t){return t===this.dimIdx?this._leavesCount:this._levels.length},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e}();function kkt(e){var t=e.toUpperCase(),r=new RegExp("^"+t+"([0-9]+)$"),n=0;function i(s){var l;s!=null&&(l=s.match(r))&&(n=Ue(n,+l[1]+1))}function a(){return""+t+n++}function o(s,l){for(var u=pt(),c=0;c<s.length;c++){var h=s[c];(h==null||u.get(h)!=null)&&(s[c]=h=a(),l[c].option=wt({value:h},l[c].option)),u.set(h,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var CB=function(){function e(t,r,n){this._model=r,this._dims=n,this._kind=t,this._cellMergeOwnerList=[]}return e.prototype._ensureCellMap=function(){var t=this,r=t._cellMap;return r||(r=t._cellMap=pt(),n()),r;function n(){var a=[],o=t._model.getShallow("data");o&&!nt(o)&&(process.env.NODE_ENV!=="production"&&ie("matrix."+o+".data must be an array if specified."),o=null),R(o,function(p,v){if(!xt(p)||!nt(p.coord)){process.env.NODE_ENV!=="production"&&ie("Illegal matrix."+t._kind+".data["+v+"], must be a {coord: [...], ...}");return}var g=g7([]),m=null;if(process.env.NODE_ENV!=="production"&&(m=[]),m7(g,m,p.coord,t._dims,p.coordClamp?xo[t._kind]:xo.none),Ng(g,0)||Ng(g,1)){process.env.NODE_ENV!=="production"&&ie("Can not determine cells by option matrix."+t._kind+".data["+v+"]: "+(""+m.join(" ")));return}var y=p&&p.mergeCells,_={id:new St,span:new St,locatorRange:g,option:p,cellMergeOwner:y};bB(_,g),a.push(_)});for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u.cellMergeOwner){var c=u.locatorRange;_B(c,s,a,l);for(var h=0;h<l;h++)s[h]&&(a[h].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var f=et({},u.option);f.coord=null;var d={id:new St,span:new St,locatorRange:c,option:f,cellMergeOwner:!0};bB(d,c),a.push(d)}}}R(a,function(p){var v=i(p.id.x,p.id.y);if(p.cellMergeOwner&&(v.cellMergeOwner=!0,v.span=p.span,v.locatorRange=p.locatorRange,v.spanRect=T0(),t._cellMergeOwnerList.push(v)),!(!p.cellMergeOwner&&!p.option))for(var g=0;g<p.span.y;g++)for(var m=0;m<p.span.x;m++){var y=i(p.id.x+m,p.id.y+g);y.option=p.option,p.cellMergeOwner&&(y.inSpanOf=v)}})}function i(a,o){var s=TB(a,o),l=r.get(s);return l||(l=r.set(s,{id:new St(a,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},e.prototype.getCell=function(t){return this._ensureCellMap().get(TB(t[0],t[1]))},e.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},e.prototype.expandRangeByCellMerge=function(t){if(!Ng(t,0)&&!Ng(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){cS[0]=t[0][0],cS[1]=t[1][0];var r=this.getCell(cS),n=r&&r.inSpanOf;if(n){Ckt(t,n.locatorRange);return}}var i=this._cellMergeOwnerList;_B(t,null,i,i.length)},e}(),cS=[];function TB(e,t){return e+"|"+t}var CD={show:!0,color:U.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function TD(e){return{color:"none",borderWidth:1,borderColor:e?"none":U.color.borderTint}}var kB={show:!0,label:CD,itemStyle:TD(!1),silent:void 0,dividerLineStyle:{width:1,color:U.color.border}},Akt={label:CD,itemStyle:TD(!1),silent:void 0},Dkt={label:CD,itemStyle:TD(!0),silent:void 0},Lkt={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:kB,y:kB,body:Akt,corner:Dkt,backgroundStyle:{color:"none",borderColor:U.color.axisLine,borderWidth:1}},Mkt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this._dimModels={x:new AB(this.get("x",!0)||{}),y:new AB(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var n=r.x.dim=new wB("x",r.x),i=r.y.dim=new wB("y",r.y),a={x:n,y:i};this._body=new CB("body",new ne(this.getShallow("body")),a),this._corner=new CB("corner",new ne(this.getShallow("corner")),a)},t.prototype.getDimensionModel=function(r){return this._dimModels[r]},t.prototype.getBody=function(){return this._body},t.prototype.getCorner=function(){return this._corner},t.type="matrix",t.layoutMode="box",t.defaultOption=Lkt,t}(Zt),AB=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},t}(ne),Og=Math.round,Ekt=0,Ikt=99,Pkt={normal:25,special:100},Rkt={normal:50,special:125},Nkt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n){this.group.removeAll();var i=this.group,a=r.coordinateSystem,o=a.getRect(),s=r.getDimensionModel("x"),l=r.getDimensionModel("y"),u=s.dim,c=l.dim;Okt(i,r,n),Bkt(i,r,u,c,n);var h=r.getShallow("borderZ2",!0),f=dt(h,Ikt),d=f-1,p=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);p.lineWidth=0;var v=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);v.fill="none";var g=$T(o.clone(),p,Ekt),m=$T(o.clone(),v,f);g.silent=!0,m.silent=!0,i.add(g),i.add(m);var y=u.getUnitLayoutInfo(0,0),_=c.getUnitLayoutInfo(1,0);y&&_&&(u.shouldShow()&&i.add(DB({x1:o.x,y1:_.xy,x2:o.x+o.width,y2:_.xy},s.getModel("dividerLineStyle").getLineStyle(),d)),c.shouldShow()&&i.add(DB({x1:y.xy,y1:o.y,x2:y.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),d)))},t.type="matrix",t}(Ee);function Okt(e,t,r){n(0),n(1);function n(i){var a=t.getDimensionModel(Pt[i]),o=a.dim;if(o.shouldShow())for(var s=a.getModel("itemStyle"),l=a.getModel("label"),u=t.getShallow("tooltip",!0),c=[],h=o.resetCellIterator();h.next();){var f=h.item,d={};Ct.copy(d,f.rect),kk(c,f.id.x,f.id.y),y7(c,t,e,r,f.option,s,l,a,d,f.option.value,Rkt,u)}}}function Bkt(e,t,r,n,i){a("body",t.getBody(),r,n),r.shouldShow()&&n.shouldShow()&&a("corner",t.getCorner(),n,r);function a(o,s,l,u){var c=new ne(t.getShallow(o,!0)),h=c.getModel("itemStyle"),f=c.getModel("label"),d=new gs,p=new gs,v=[],g=t.getShallow("tooltip",!0);for(u.resetLayoutIterator(p,1);p.next();)for(l.resetLayoutIterator(d,0);d.next();){var m=d.item,y=p.item;kk(v,m.id.x,y.id.y);var _=s.getCell(v);if(!(_&&_.inSpanOf&&_.inSpanOf!==_)){var x={};_&&_.span?Ct.copy(x,_.spanRect):(m.dim.getLayout(x,0,v[0]),y.dim.getLayout(x,1,v[1]));var b=_?_.option:null;y7(v,t,e,i,b,h,f,c,x,b?b.value:null,Pkt,g)}}}}function y7(e,t,r,n,i,a,o,s,l,u,c,h){var f;Bg.option=i?i.itemStyle:null,Bg.parentModel=a,fc.option=i,fc.parentModel=s;var d=dt(fc.getShallow("z2"),i&&i.itemStyle?c.special:c.normal),p=h&&h.show,v=$T(l,Bg.getItemStyle(),d);r.add(v);var g=fc.get("cursor");g!=null&&v.attr("cursor",g);var m;if(u!=null){var y=u+"";if(dc.option=i?i.label:null,dc.parentModel=o,dc.ecModel=n,Cr(v,{normal:dc},{defaultText:y,autoOverflowArea:!0,layoutRect:_t(v.shape)}),m=v.getTextContent(),m){m.z2=d+1;var _=m.style;if(_&&_.overflow&&_.overflow!=="none"&&_.lineOverflow){var x={};Ct.copy(x,l),du(x,(((f=v.style)===null||f===void 0?void 0:f.lineWidth)||0)/2,!0,!0),v.updateInnerText(),m.getLocalTransform(Fg),Fi(Fg,Fg),Ct.applyTransform(x,x,Fg),m.setClipPath(new Ut({shape:x}))}}Fo({el:v,componentModel:t,itemName:y,itemTooltipOption:h,formatterParamsExtra:{xyLocator:e.slice()}})}if(m){var b=dc.get("silent");b==null&&(b=!p),m.silent=b,m.ignoreHostSilent=!0}var S=fc.get("silent");S==null&&(S=!v.style||v.style.fill==="none"||!v.style.fill),v.silent=S,bb(fc),bb(Bg),bb(dc)}var fc=new ne,Bg=new ne,dc=new ne,Fg=[];function $T(e,t,r){var n=t.lineWidth;if(n){var i=e.x+e.width,a=e.y+e.height;e.x=Gn(e.x,n,!0),e.y=Gn(e.y,n,!0),e.width=Gn(i,n,!0)-e.x,e.height=Gn(a,n,!0)-e.y}return new Ut({shape:e,style:t,z2:r})}function DB(e,t,r){var n=t.lineWidth;return n&&(Og(e.x1*2)===Og(e.x2*2)&&(e.x1=e.x2=Gn(e.x1,n,!0)),Og(e.y1*2)===Og(e.y2*2)&&(e.y1=e.y2=Gn(e.y1,n,!0))),new Qe({shape:e,style:t,silent:!0,z2:r})}var Fkt=function(){function e(t,r,n){this.dimensions=e.dimensions,this.type="matrix",this._model=t;var i=this._dimModels={x:t.getDimensionModel("x"),y:t.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(t,n)}return e.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},e.create=function(t,r){var n=[];return t.eachComponent("matrix",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){Zp({targetModel:a,coordSysType:"matrix",coordSysProvider:$6})}),n},e.prototype.getRect=function(){return this._rect},e.prototype._resize=function(t,r){var n=this._dims,i=this._dimModels,a=this._rect=Pe(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});LB(i,n,a,0),LB(i,n,a,1),MB(0,n),MB(1,n),EB(this._model.getBody(),n),EB(this._model.getCorner(),n)},e.prototype.dataToPoint=function(t,r,n){return n=n||[],this.dataToLayout(t,r,Yf),n[0]=Yf.rect.x+Yf.rect.width/2,n[1]=Yf.rect.y+Yf.rect.height/2,n},e.prototype.dataToLayout=function(t,r,n){var i=this._dims;n=n||{};var a=n.rect=n.rect||{};a.x=a.y=a.width=a.height=NaN;var o=n.matrixXYLocatorRange=g7(n.matrixXYLocatorRange);return nt(t)?(m7(o,null,t,i,dt(r&&r.clamp,xo.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==xo.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==xo.body)&&this._model.getCorner().expandRangeByCellMerge(o)),SB(a,o,i,0),SB(a,o,i,1),n):(process.env.NODE_ENV!=="production"&&ie("Input data must be an array in `convertToLayout`, `convertToPixel`"),n)},e.prototype.pointToData=function(t,r,n){var i=this._dims;return IB(ra,0,i,t,r&&r.clamp),IB(ra,1,i,t,r&&r.clamp),n=n||[],n[0]=n[1]=NaN,ra.y===Vr.inCorner&&ra.x===Vr.inBody?PB(ra,n,0,i):ra.x===Vr.inCorner&&ra.y===Vr.inBody?PB(ra,n,1,i):(RB(ra,n,0,i),RB(ra,n,1,i)),n},e.prototype.convertToPixel=function(t,r,n,i){var a=fS(r);return a===this?a.dataToPoint(n,i):void 0},e.prototype.convertToLayout=function(t,r,n,i){var a=fS(r);return a===this?a.dataToLayout(n,i):void 0},e.prototype.convertFromPixel=function(t,r,n,i){var a=fS(r);return a===this?a.pointToData(n,i):void 0},e.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},e.dimensions=["x","y","value"],e}(),Yf={rect:T0()},$g=new gs,hS=new gs;function LB(e,t,r,n){for(var i=1-n,a=t[Pt[n]],o=t[Pt[i]],s=o.shouldShow(),l=a.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,n);u.next();)u.item.wh=u.item.xy=NaN;for(var c=r[er[n]],h=a.getLocatorCount(n)+o.getLocatorCount(n),f=new ne,d=o.resetLevelIterator();d.next();)f.option=d.item.option,f.parentModel=e[Pt[i]],g(d.item,s?f.get("levelSize"):0);for(var p=new ne,v=a.resetCellIterator();v.next();)v.item.type===oo.leaf&&(p.option=v.item.option,p.parentModel=void 0,g(v.item,p.get("size")));function g(w,C){var k=$kt(C,n,r);Er(k)||(w.wh=VT(k,c),c=VT(c-w.wh),h--)}var m=h?c/h:0,y=!h&&c>=1,_=r[Pt[n]],x=a.getLocatorCount(n)-1,b=new gs;for(o.resetLayoutIterator(b,n);b.next();)S(b.item);for(a.resetLayoutIterator(b,n);b.next();)S(b.item);function S(w){Er(w.wh)&&(w.wh=m),w.xy=_,w.id[Pt[n]]===x&&!y&&(w.wh=r[Pt[n]]+r[er[n]]-w.xy),_+=w.wh}}function MB(e,t){for(var r=t[Pt[e]].resetCellIterator();r.next();){var n=r.item;k0(n.rect,e,n.id,n.span,t),k0(n.rect,1-e,n.id,n.span,t),n.type===oo.nonLeaf&&(n.xy=n.rect[Pt[e]],n.wh=n.rect[er[e]])}}function EB(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;k0(i,0,a,n,t),k0(i,1,a,n,t)}})}function k0(e,t,r,n,i){e[er[t]]=0;var a=r[Pt[t]],o=a<0?i[Pt[1-t]]:i[Pt[t]],s=o.getUnitLayoutInfo(t,r[Pt[t]]);if(e[Pt[t]]=s.xy,e[er[t]]=s.wh,n[Pt[t]]>1){var l=o.getUnitLayoutInfo(t,r[Pt[t]]+n[Pt[t]]-1);e[er[t]]=l.xy+l.wh-s.xy}}function $kt(e,t,r){var n=Ny(e,r[er[t]]);return VT(n,r[er[t]])}function VT(e,t){return Math.max(Math.min(e,dt(t,1/0)),0)}function fS(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var Vr={inBody:1,inCorner:2,outside:3},ra={x:null,y:null,point:[]};function IB(e,t,r,n,i){var a=r[Pt[t]],o=r[Pt[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),l=a.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,h=e.point[t]=n[t];if(!l&&!c){e[Pt[t]]=Vr.outside;return}if(i===xo.body){l?(e[Pt[t]]=Vr.inBody,h=Wn(s.xy+s.wh,Ue(l.xy,h)),e.point[t]=h):e[Pt[t]]=Vr.outside;return}else if(i===xo.corner){c?(e[Pt[t]]=Vr.inCorner,h=Wn(c.xy+c.wh,Ue(u.xy,h)),e.point[t]=h):e[Pt[t]]=Vr.outside;return}var f=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:f,p=s?s.xy+s.wh:f;if(h<d){if(!i){e[Pt[t]]=Vr.outside;return}h=d}else if(h>p){if(!i){e[Pt[t]]=Vr.outside;return}h=p}e.point[t]=h,e[Pt[t]]=f<=h&&h<=p?Vr.inBody:d<=h&&h<=f?Vr.inCorner:Vr.outside}function PB(e,t,r,n){var i=1-r;if(e[Pt[r]]!==Vr.outside)for(n[Pt[r]].resetCellIterator(hS);hS.next();){var a=hS.item;if(NB(e.point[r],a.rect,r)&&NB(e.point[i],a.rect,i)){t[r]=a.ordinal,t[i]=a.id[Pt[i]];return}}}function RB(e,t,r,n){if(e[Pt[r]]!==Vr.outside){var i=e[Pt[r]]===Vr.inCorner?n[Pt[1-r]]:n[Pt[r]];for(i.resetLayoutIterator($g,r);$g.next();)if(Vkt(e.point[r],$g.item)){t[r]=$g.item.id[Pt[r]];return}}}function Vkt(e,t){return t.xy<=e&&e<=t.xy+t.wh}function NB(e,t,r){return t[Pt[r]]<=e&&e<=t[Pt[r]]+t[er[r]]}function zkt(e){e.registerComponentModel(Mkt),e.registerComponentView(Nkt),e.registerCoordinateSystem("matrix",Fkt)}function Gkt(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function OB(e,t){var r;return R(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function Wkt(e,t,r){var n=et({},r),i=e[t],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;ft(!o||i.type===o,'Please set $action: "replace" to change `type`')}zt(i,n,!0),Pa(i,n,{ignoreSize:!0}),H6(r,i),Vg(r,i),Vg(r,i,"shape"),Vg(r,i,"style"),Vg(r,i,"extra"),r.clipPath=i.clipPath}else e[t]=n;else a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var _7=["transition","enterFrom","leaveTo"],Hkt=_7.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Vg(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?_7:Hkt,i=0;i<n.length;i++){var a=n[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function jkt(e,t){if(e&&(e.hv=t.hv=[OB(t,["left","right"]),OB(t,["top","bottom"])],e.type==="group")){var r=e,n=t;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var Ukt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,r,n),this.option.elements=i},t.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=PH(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];R(l,function(c,h){var f=c.newOption;process.env.NODE_ENV!=="production"&&ft(xt(f)||c.existing,"Empty graphic option definition"),f&&(u.push(f),Gkt(c,f),Wkt(o,h,f),jkt(o[h],f))},this),i.elements=de(o,function(c){return c&&delete c.$action,c!=null})},t.prototype._flatten=function(r,n,i){R(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},t.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},t.type="graphic",t.defaultOption={elements:[]},t}(Zt),BB={path:null,compoundPath:null,group:yt,image:Rr,text:oe},ii=qt(),Ykt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._elMap=pt()},t.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},t.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");R(n,function(l){var u=ur(l.id,null),c=u!=null?i.get(u):null,h=ur(l.parentId,null),f=h!=null?i.get(h):a,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,g=l.textConfig;if(p&&XU(p,d,!!g,!!v)){var m=ZU(p,d,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!v&&m.textContent&&(v=m.textContent)}var y=qkt(l);process.env.NODE_ENV!=="production"&&c&&ft(f===c.parent,"Changing parent is not supported.");var _=l.$action||"merge",x=_==="merge",b=_==="replace";if(x){var S=!c,w=c;S?w=FB(u,f,l.type,i):(w&&(ii(w).isNew=!1),e7(w)),w&&(Dm(w,y,r,{isInit:S}),$B(w,l,o,s))}else if(b){Em(c,l,i,r);var C=FB(u,f,l.type,i);C&&(Dm(C,y,r,{isInit:!0}),$B(C,l,o,s))}else _==="remove"&&(JU(c,l),Em(c,l,i,r));var k=i.get(u);if(k&&v)if(x){var T=k.getTextContent();T?T.attr(v):k.setTextContent(new oe(v))}else b&&k.setTextContent(new oe(v));if(k){var A=l.clipPath;if(A){var L=A.type,D=void 0,S=!1;if(x){var E=k.getClipPath();S=!E||ii(E).type!==L,D=S?zT(L):E}else b&&(S=!0,D=zT(L));k.setClipPath(D),Dm(D,A,r,{isInit:S}),b0(D,A.keyframeAnimation,r)}var N=ii(k);k.setTextConfig(g),N.option=l,Xkt(k,r,l),Fo({el:k,componentModel:r,itemName:k.name,itemTooltipOption:l.tooltip}),b0(k,l.keyframeAnimation,r)}})}},t.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var h=i[c],f=ur(h.id,null),d=f!=null?o.get(f):null;if(!(!d||!d.isGroup)){var p=d.parent,v=p===a,g=ii(d),m=ii(p);g.width=st(g.option.width,v?s:m.width)||0,g.height=st(g.option.height,v?l:m.height)||0}}for(var c=i.length-1;c>=0;c--){var h=i[c],f=ur(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,m=ii(p),y=p===a?{width:s,height:l}:{width:m.width,height:m.height},_={},x=j_(d,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!ii(d).isNew&&x){for(var b=h.transition,S={},w=0;w<u.length;w++){var C=u[w],k=_[C];b&&(Zl(b)||$t(b,C)>=0)?S[C]=k:d[C]=k}se(d,S,r,0)}else d.attr(_)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Em(i,ii(i).option,n,r._lastGraphicModel)}),this._elMap=pt()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Ee);function zT(e){process.env.NODE_ENV!=="production"&&ft(e,"graphic type MUST be set");var t=ct(BB,e)?BB[e]:Vy(e);process.env.NODE_ENV!=="production"&&ft(t,"graphic type "+e+" can not be found");var r=new t({});return ii(r).type=e,r}function FB(e,t,r,n){var i=zT(r);return t.add(i),n.set(e,i),ii(i).id=e,ii(i).isNew=!0,i}function Em(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){Em(a,t,r,n)}),ox(e,t,n),r.removeKey(ii(e).id))}function $B(e,t,r,n){e.isGroup||R([["cursor",vi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];ct(t,a)?e[a]=dt(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),R(te(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=mt(a)?a:null}}),ct(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function qkt(e){return e=et({},e),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(V6),function(t){delete e[t]}),e}function Xkt(e,t,r){var n=At(e).eventData;!e.silent&&!e.ignore&&!n&&(n=At(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function Zkt(e){e.registerComponentModel(Ukt),e.registerComponentView(Ykt),e.registerPreprocessor(function(t){var r=t.graphic;nt(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var VB=["x","y","radius","angle","single"],Kkt=["cartesian2d","polar","singleAxis"];function Jkt(e){var t=e.get("coordinateSystem");return $t(Kkt,t)>=0}function hs(e){return process.env.NODE_ENV!=="production"&&ft(e),e+"Axis"}function Qkt(e,t){var r=pt(),n=[],i=pt();e.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=r.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(r.get(h)||r.set(h,[]))[f]=!0})}return n}function x7(e){var t=e.ecModel,r={infoList:[],infoMap:pt()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(hs(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var dS=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),Mp=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=zB(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=zB(r);zt(this.option,r,!0),zt(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=pt(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(VB,function(i){var a=this.getReferringComponents(hs(i),Dft);if(a.specified){n=!0;var o=new dS;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new dS;if(f.add(h.componentIndex),r.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",Ge).models[0];d&&R(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",Ge).models[0]&&f.add(p.componentIndex)})}}}a&&R(VB,function(u){if(a){var c=i.findComponents({mainType:hs(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new dS;h.add(c[0].componentIndex),r.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(hs(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){process.env.NODE_ENV!=="production"&&ft(r&&n!=null);var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(hs(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&ft(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Zt);function zB(e){var t={};return R(["start","end","startValue","endValue","throttle"],function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var tAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t}(Mp),kD=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.dataZoomModel=r,this.ecModel=n,this.api=i},t.type="dataZoom",t}(Ee),eAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t}(kD),Cc=R,GB=hi,rAt=function(){function e(t,r,n,i){this._dimName=t,this._axisIndex=r,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(t){return this._dataZoomModel===t},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(r){if(Jkt(r)){var n=hs(this._dimName),i=r.getReferringComponents(n,Ge).models[0];i&&this._axisIndex===i.componentIndex&&t.push(r)}},this),t},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return _t(this._minMaxSpan)},e.prototype.calculateDataWindow=function(t){var r=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Cc(["start","end"],function(f,d){var p=t[f],v=t[f+"Value"];a[d]==="percent"?(p==null&&(p=o[d]),v=i.parse(fe(p,o,r))):(u=!0,v=v==null?r[d]:i.parse(v),p=fe(v,r,o)),l[d]=v==null||isNaN(v)?r[d]:v,s[d]=p==null||isNaN(p)?o[d]:p}),GB(l),GB(s);var c=this._minMaxSpan;u?h(l,s,r,o,!1):h(s,l,o,r,!0);function h(f,d,p,v,g){var m=g?"Span":"ValueSpan";Ls(0,f,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)d[y]=fe(f[y],p,v,!0),g&&(d[y]=i.parse(d[y]))}return{valueWindow:l,percentWindow:s}},e.prototype.reset=function(t){if(t===this._dataZoomModel){var r=this.getTargetSeriesModels();this._dataExtent=nAt(this,this._dimName,r),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(t,r){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;Cc(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var h=u.getStore(),f=at(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,v,g,m=0;m<c.length;m++){var y=h.get(f[m],d),_=!isNaN(y),x=y<o[0],b=y>o[1];if(_&&!x&&!b)return!0;_&&(g=!0),x&&(p=!0),b&&(v=!0)}return g&&p&&v})}else Cc(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(v){return s(v)?v:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});Cc(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;Cc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=fe(n[0]+o,n,[0,100],!0):a!=null&&(o=fe(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=TH(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function nAt(e,t,r){var n=[1/0,-1/0];Cc(r,function(o){Oyt(n,o.getData(),t)});var i=e.getAxisModel(),a=yj(i.axis.scale,i,n).calculate();return[a.min,a.max]}var iAt={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(hs(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new rAt(i,a,s,e),r.push(o.__dzAxisProxy))});var n=pt();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function aAt(e){e.registerAction("dataZoom",function(t,r){var n=Qkt(r,t);R(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var WB=!1;function AD(e){WB||(WB=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,iAt),aAt(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function oAt(e){e.registerComponentModel(tAt),e.registerComponentView(eAt),AD(e)}var oi=function(){function e(){}return e}(),b7={};function Tc(e,t){b7[e]=t}function S7(e){return b7[e]}var sAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=S7(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),zt(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:U.color.border,borderRadius:0,borderWidth:0,padding:U.size.m,itemSize:15,itemGap:U.size.s,showTitle:!0,iconStyle:{borderColor:U.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:U.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(Zt);function w7(e,t){var r=Xp(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Ut({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var lAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(y,_){h.push(_)}),new Lo(this._featureNames||[],h).add(f).update(f).remove(Bt(f,null)).execute(),this._featureNames=h;function f(y,_){var x=h[y],b=h[_],S=u[x],w=new ne(S,r,r.ecModel),C;if(a&&a.newTitle!=null&&a.featureName===x&&(S.title=a.newTitle),x&&!b){if(uAt(x))C={onclick:w.option.onclick,featureName:x};else{var k=S7(x);if(!k)return;C=new k}c[x]=C}else if(C=c[b],!C)return;C.uid=Uh("toolbox-feature"),C.model=w,C.ecModel=n,C.api=i;var T=C instanceof oi;if(!x&&b){T&&C.dispose&&C.dispose(n,i);return}if(!w.get("show")||T&&C.unusable){T&&C.remove&&C.remove(n,i);return}d(w,C,x),w.setIconStatus=function(A,L){var D=this.option,E=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[A]=L,E[A]&&(L==="emphasis"?Ao:Do)(E[A])},C instanceof oi&&C.render&&C.render(w,n,i,a)}function d(y,_,x){var b=y.getModel("iconStyle"),S=y.getModel(["emphasis","iconStyle"]),w=_ instanceof oi&&_.getIcons?_.getIcons():y.get("icon"),C=y.get("title")||{},k,T;lt(w)?(k={},k[x]=w):k=w,lt(C)?(T={},T[x]=C):T=C;var A=y.iconPaths={};R(k,function(L,D){var E=qp(L,{},{x:-s/2,y:-s/2,width:s,height:s});E.setStyle(b.getItemStyle());var N=E.ensureState("emphasis");N.style=S.getItemStyle();var P=new oe({style:{text:T[D],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:qk({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},n)},ignore:!0});E.setTextContent(P),Fo({el:E,componentModel:r,itemName:D,formatterParamsExtra:{title:T[D]}}),E.__title=T[D],E.on("mouseover",function(){var F=S.getItemStyle(),O=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:S.get("textFill")||F.fill||F.stroke||U.color.neutral99,backgroundColor:S.get("textBackgroundColor")}),E.setTextConfig({position:S.get("textPosition")||O}),P.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){y.get(["iconStatus",D])!=="emphasis"&&i.leaveEmphasis(this),P.hide()}),(y.get(["iconStatus",D])==="emphasis"?Ao:Do)(E),o.add(E),E.on("click",ut(_.onclick,_,n,i,D)),A[D]=E})}var p=pr(r,i).refContainer,v=r.getBoxLayoutParams(),g=r.get("padding"),m=Pe(v,p,g);ql(r.get("orient"),o,r.get("itemGap"),m.width,m.height),j_(o,v,p,g),o.add(w7(o.getBoundingRect(),r)),l||o.eachChild(function(y){var _=y.__title,x=y.ensureState("emphasis"),b=x.textConfig||(x.textConfig={}),S=y.getTextContent(),w=S&&S.ensureState("emphasis");if(w&&!mt(w)&&_){var C=w.style||(w.style={}),k=k_(_,oe.makeFont(C)),T=y.x+o.x,A=y.y+o.y+s,L=!1;A+k.height>i.getHeight()&&(b.position="top",L=!0);var D=L?-5-k.height:s+10;T+k.width/2>i.getWidth()?(b.position=["100%",D],C.align="right"):T-k.width/2<0&&(b.position=[0,D],C.align="left")}})},t.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof oi&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){R(this._features,function(i){i instanceof oi&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof oi&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(Ee);function uAt(e){return e.indexOf("my")===0}var cAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||U.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Qt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var v=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,v)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),x.focus(),b.execCommand("SaveAs",!0,v),document.body.removeChild(_)}}else{var S=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',C=window.open();C.document.write(w),C.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:U.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(oi),HB="__ec_magicType_stack__",hAt=[["line","bar"],["stack"]],fAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(jB[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=jB[i](f,d,h,a);p&&(wt(p,h.option),s.series.push(p));var v=h.coordinateSystem;if(v&&v.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=h.getReferringComponents(y,Ge).models[0],x=_.componentIndex;s[y]=s[y]||[];for(var b=0;b<=x;b++)s[y][x]=s[y][x]||{};s[y][x].boundaryGap=i==="bar"}}};R(hAt,function(h){$t(h,i)>=0&&R(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=zt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(oi),jB={line:function(e,t,r,n){if(e==="bar")return zt({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return zt({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===HB;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),zt({id:t,stack:i?"":HB},n.get(["option","stack"])||{},!0)}};Fa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var sx=new Array(60).join("-"),Ah=" ";function dAt(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function pAt(e){var t=[];return R(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(at(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(v){return v}))});for(var u=[s.join(Ah)],c=0;c<l[0].length;c++){for(var h=[],f=0;f<l.length;f++)h.push(l[f][c]);u.push(h.join(Ah))}t.push(u.join(`
359
+ `:"",i=" {"+n,a=n+"}",o=at(te(e),function(l){return l+i+at(te(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=at(te(t),function(l){return"@keyframes "+l+i+at(te(t[l]),function(u){return u+i+at(te(t[l][u]),function(c){var h=t[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function lT(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yR(e,t,r,n){return br("svg","root",{width:e,height:t,xmlns:Vj,"xmlns:xlink":zj,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var L0t=0;function Wj(){return L0t++}var _R={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"},_l="transform-origin";function M0t(e,t,r){var n=et({},e.shape);et(n,t),e.buildPath(r,n);var i=new $j;return i.reset(gH(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function E0t(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[_l]=r+"px "+n+"px")}var I0t={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Hj(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function P0t(e,t,r){var n=e.shape.paths,i={},a,o;if(R(n,function(l){var u=lT(r.zrId);u.animation=!0,J_(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=te(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var v in p){var g=p[v];i[v]=i[v]||{d:""},i[v].d+=g.d||""}for(var m in h){var y=h[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){t.d=!1;var s=Hj(i,r);return a.replace(o,s)}}function xR(e){return lt(e)?_R[e]?"cubic-bezier("+_R[e]+")":Lk(e)?e:"":""}function J_(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof V_){var s=P0t(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],h=[c.getMaxTime()/1e3+"s"],f=xR(c.getClip().easing),d=c.getDelay();f?h.push(f):h.push("linear"),d&&h.push(d/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],x=_.length,b={},S={},w={},C="animation-timing-function";function k(tt,it,X){for(var rt=tt.getTracks(),Z=tt.getMaxTime(),vt=0;vt<rt.length;vt++){var kt=rt[vt];if(kt.needsAnimate()){var Wt=kt.keyframes,Ht=kt.propName;if(X&&(Ht=X(Ht)),Ht)for(var ue=0;ue<Wt.length;ue++){var Fe=Wt[ue],We=Math.round(Fe.time/Z*100)+"%",Tr=xR(Fe.easing),Nt=Fe.rawValue;(lt(Nt)||ae(Nt))&&(it[We]=it[We]||{},it[We][Ht]=Fe.rawValue,Tr&&(it[We][C]=Tr))}}}}for(var T=0;T<x;T++){var A=_[T],L=A.targetName;L?L==="shape"&&k(A,S):!n&&k(A,b)}for(var D in b){var E={};Py(E,e),et(E,b[D]);var N=mH(E),P=b[D][C];w[D]=N?{transform:N}:{},E0t(w[D],E),P&&(w[D][C]=P)}var F,O=!0;for(var D in S){w[D]=w[D]||{};var $=!F,P=S[D][C];$&&(F=new Ia);var V=F.len();F.reset(),w[D].d=M0t(e,S[D],F);var I=F.len();if(!$&&V!==I){O=!1;break}P&&(w[D][C]=P)}if(!O)for(var D in w)delete w[D].d;if(!n)for(var T=0;T<x;T++){var A=_[T],L=A.targetName;L==="style"&&k(A,w,function(rt){return I0t[rt]})}for(var B=te(w),G=!0,H,T=1;T<B.length;T++){var W=B[T-1],J=B[T];if(w[W][_l]!==w[J][_l]){G=!1;break}H=w[W][_l]}if(G&&H){for(var D in w)w[D][_l]&&delete w[D][_l];t[_l]=H}if(de(B,function(tt){return te(w[tt]).length>0}).length){var Q=Hj(w,r);return Q+" "+y[0]+" both"}}for(var g in l){var s=v(l[g]);s&&o.push(s)}if(o.length){var m=r.zrId+"-cls-"+Wj();r.cssNodes["."+m]={animation:o.join(",")},t.class=m}}function R0t(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};bR(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=aC(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),bR(n,t,r)}}function bR(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+Wj(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var bp=Math.round;function jj(e){return e&&lt(e.src)}function Uj(e){return e&&mt(e.toDataURL)}function MA(e,t,r,n){w0t(function(i,a){var o=i==="fill"||i==="stroke";o&&vH(a)?qj(t,e,i,n):o&&Mk(a)?Xj(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),z0t(r,e,n)}function EA(e,t){var r=oft(t);r&&(r.each(function(n,i){n!=null&&(e[(mR+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[mR+"silent"]="true"))}function SR(e){return ls(e[0]-1)&&ls(e[1])&&ls(e[2])&&ls(e[3]-1)}function N0t(e){return ls(e[4])&&ls(e[5])}function IA(e,t,r){if(t&&!(N0t(t)&&SR(t))){var n=1e4;e.transform=SR(t)?"translate("+bp(t[4]*n)/n+" "+bp(t[5]*n)/n+")":Dht(t)}}function wR(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(bp(n[a][0]*r)/r),i.push(bp(n[a][1]*r)/r);t.points=i.join(" ")}function CR(e){return!e.smooth}function O0t(e){var t=at(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var o=t[a],s=r[o[0]];s!=null&&(n[o[1]]=bp(s*i)/i)}}}var B0t={circle:[O0t(["cx","cy","r"])],polyline:[wR,CR],polygon:[wR,CR]};function F0t(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function Yj(e,t){var r=e.style,n=e.shape,i=B0t[e.type],a={},o=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&gH(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&F0t(e))&&!(l<1)){s=e.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var h=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;h&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var d=f.getVersion(),p=e,v=p.__svgPathBuilder;(p.__svgPathVersion!==d||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new $j),v.reset(u),f.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),a.d=v.getStr()}return IA(a,e.transform),MA(a,r,e,t),EA(a,e),t.animation&&J_(e,a,t),t.emphasis&&R0t(e,a,t),br(s,e.id+"",a)}function $0t(e,t){var r=e.style,n=r.image;if(n&&!lt(n)&&(jj(n)?n=n.src:Uj(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),IA(l,e.transform),MA(l,r,e,t),EA(l,e),t.animation&&J_(e,l,t),br("image",e.id+"",l)}}function V0t(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||Co,a=r.x||0,o=Mht(r.y||0,Wp(i),r.textBaseline),s=Lht[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(YH(r)){var u="",c=r.fontStyle,h=UH(r.fontSize);if(!parseFloat(h))return;var f=r.fontFamily||HW,d=r.fontWeight;u+="font-size:"+h+";font-family:"+f+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),IA(l,e.transform),MA(l,r,e,t),EA(l,e),t.animation&&J_(e,l,t),br("text",e.id+"",l,void 0,n)}}function TR(e,t){if(e instanceof Kt)return Yj(e,t);if(e instanceof Rr)return $0t(e,t);if(e instanceof vh)return V0t(e,t)}function z0t(e,t,r){var n=e.style;if(Eht(n)){var i=Iht(e),a=r.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,h=n.shadowOffsetY||0,f=n.shadowBlur,d=lp(n.shadowColor),p=d.opacity,v=d.color,g=f/2/l,m=f/2/u,y=g+" "+m;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=br("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[br("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),a[i]=o}t.filter=T_(o)}}function qj(e,t,r,n){var i=e[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(dH(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(pH(i))a="radialGradient",o.cx=dt(i.x,.5),o.cy=dt(i.y,.5),o.r=dt(i.r,.5);else{process.env.NODE_ENV!=="production"&&Mi("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var h=oC(s[u].offset)*100+"%",f=s[u].color,d=lp(f),p=d.color,v=d.opacity,g={offset:h};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(br("stop",u+"",g))}var m=br(a,"",o,l),y=LA(m),_=n.gradientCache,x=_[y];x||(x=n.zrId+"-g"+n.gradientIdx++,_[y]=x,o.id=x,n.defs[x]=br(a,x,o,l)),t[r]=T_(x)}function Xj(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",h;if(fH(i)){var f=i.imageWidth,d=i.imageHeight,p=void 0,v=i.image;if(lt(v)?p=v:jj(v)?p=v.src:Uj(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";ft(f,g),ft(d,g)}else if(f==null||d==null){var m=function(T,A){if(T){var L=T.elm,D=f||A.width,E=d||A.height;T.tag==="pattern"&&(u?(E=1,D/=a.width):c&&(D=1,E/=a.height)),T.attrs.width=D,T.attrs.height=E,L&&(L.setAttribute("width",D),L.setAttribute("height",E))}},y=Ok(p,null,e,function(T){l||m(S,T),m(h,T)});y&&y.width&&y.height&&(f=f||y.width,d=d||y.height)}h=br("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=_t(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):c?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=mH(i);b&&(o.patternTransform=b);var S=br("pattern","",o,[h]),w=LA(S),C=n.patternCache,k=C[w];k||(k=n.zrId+"-p"+n.patternIdx++,C[w]=k,o.id=k,S=n.defs[k]=br("pattern",k,o,[h])),t[r]=T_(k)}}function G0t(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=br("clipPath",a,o,[Yj(e,r)])}t["clip-path"]=T_(a)}function kR(e){return document.createTextNode(e)}function kl(e,t,r){e.insertBefore(t,r)}function AR(e,t){e.removeChild(t)}function DR(e,t){e.appendChild(t)}function Zj(e){return e.parentNode}function Kj(e){return e.nextSibling}function p1(e,t){e.textContent=t}var LR=58,W0t=120,H0t=br("","");function uT(e){return e===void 0}function ua(e){return e!==void 0}function j0t(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!=="production"&&n[a]!=null&&console.error("Duplicate key "+a),n[a]=i)}return n}function gd(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Sp(e){var t,r=e.children,n=e.tag;if(ua(n)){var i=e.elm=Gj(n);if(PA(H0t,e),nt(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&DR(i,Sp(a))}else ua(e.text)&&!xt(e.text)&&DR(i,kR(e.text))}else e.elm=kR(e.text);return e.elm}function Jj(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&kl(e,Sp(a),t)}}function u0(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(ua(i.tag)){var a=Zj(i.elm);AR(a,i.elm)}else AR(e,i.elm)}}function PA(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==W0t?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(C0t,r,o):r.charCodeAt(3)===LR?n.setAttributeNS(T0t,r,o):r.charCodeAt(5)===LR?n.setAttributeNS(zj,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function U0t(e,t,r){for(var n=0,i=0,a=t.length-1,o=t[0],s=t[a],l=r.length-1,u=r[0],c=r[l],h,f,d,p;n<=a&&i<=l;)o==null?o=t[++n]:s==null?s=t[--a]:u==null?u=r[++i]:c==null?c=r[--l]:gd(o,u)?(wc(o,u),o=t[++n],u=r[++i]):gd(s,c)?(wc(s,c),s=t[--a],c=r[--l]):gd(o,c)?(wc(o,c),kl(e,o.elm,Kj(s.elm)),o=t[++n],c=r[--l]):gd(s,u)?(wc(s,u),kl(e,s.elm,o.elm),s=t[--a],u=r[++i]):(uT(h)&&(h=j0t(t,n,a)),f=h[u.key],uT(f)?kl(e,Sp(u),o.elm):(d=t[f],d.tag!==u.tag?kl(e,Sp(u),o.elm):(wc(d,u),t[f]=void 0,kl(e,d.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(p=r[l+1]==null?null:r[l+1].elm,Jj(e,p,r,i,l)):u0(e,t,n,a))}function wc(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(PA(e,t),uT(t.text)?ua(n)&&ua(i)?n!==i&&U0t(r,n,i):ua(i)?(ua(e.text)&&p1(r,""),Jj(r,null,i,0,i.length-1)):ua(n)?u0(r,n,0,n.length-1):ua(e.text)&&p1(r,""):e.text!==t.text&&(ua(n)&&u0(r,n,0,n.length-1),p1(r,t.text)))}function Y0t(e,t){if(gd(e,t))wc(e,t);else{var r=e.elm,n=Zj(r);Sp(t),n!==null&&(kl(n,t.elm,Kj(r)),u0(n,[e],0,0))}return t}var q0t=0,X0t=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=MR("refreshHover"),this.configLayer=MR("configLayer"),this.storage=r,this._opts=n=et({},n),this.root=t,this._id="zr"+q0t++,this._oldVNode=yR(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Gj("svg");PA(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",Y0t(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return TR(t,lT(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=lT(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Z0t(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=br("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=at(te(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(br("defs","defs",{},u)),t.animation){var c=D0t(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=br("style","stl",{},[],c);o.push(h)}}return yR(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},LA(this.renderToVNode({animation:dt(t.cssAnimation,!0),emphasis:dt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:dt(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var h=t[c];if(!h.invisible){var f=h.__clipPaths,d=f&&f.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(d-1,p-1);v>=0&&!(f&&l&&f[v]===l[v]);v--);for(var g=p-1;g>v;g--)o--,s=a[o-1];for(var m=v+1;m<d;m++){var y={};G0t(f[m],y,r);var _=br("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=f;var x=TR(h,r);x&&(s?s.children:n).push(x)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=Oc(i,0,n),r=Oc(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var o=a.style;o.width=t+"px",o.height=r+"px"}if(Mk(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=Rht(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function MR(e){return function(){process.env.NODE_ENV!=="production"&&Mi('In SVG mode painter not support method "'+e+'"')}}function Z0t(e,t,r,n){var i;if(r&&r!=="none")if(i=br("rect","bg",{width:e,height:t,x:"0",y:"0"}),vH(r))qj({fill:r},i.attrs,"fill",n);else if(Mk(r))Xj({style:{fill:r},dirty:Ye,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=lp(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function K0t(e){e.registerPainter("svg",X0t)}function ER(e,t,r){var n=Bi.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var v1=function(e){Me(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Iy,typeof r=="string"?o=ER(r,n,i):xt(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(KW(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=ER("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Ct(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new Ct(0,0,0,0);_.copy(y),o.push(_)}else{for(var x=!1,b=1/0,S=0,w=0;w<o.length;++w){var C=o[w];if(C.intersect(y)){var k=new Ct(0,0,0,0);k.copy(C),k.union(y),o[w]=k,x=!0;break}else if(l){u.copy(y),u.union(C);var T=y.width*y.height,A=C.width*C.height,L=u.width*u.height,D=L-T-A;D<b&&(b=D,S=w)}}if(l&&(o[S].union(y),x=!0),!x){var _=new Ct(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=r[h];if(f){var d=f.shouldBePainted(i,a,!0,!0),p=f.__isRendered&&(f.__dirty&Vn||!d)?f.getPrevPaintRect():null;p&&c(p);var v=d&&(f.__dirty&Vn||!f.__isRendered)?f.getPaintRect():null;v&&c(v)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=n[h],d=f&&f.shouldBePainted(i,a,!0,!0);if(f&&(!d||!f.__zr)&&f.__isRendered){var p=f.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var m=h+1;m<o.length;)o[h].intersect(o[m])?(g=!0,o[h].union(o[m]),o.splice(m,1)):m++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,c=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var d=this.domBack;function p(v,g,m,y){if(o.clearRect(v,g,m,y),n&&n!=="transparent"){var _=void 0;if(x_(n)){var x=n.global||n.__width===m&&n.__height===y;_=x&&n.__canvasGradient||YC(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else Vct(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,_=qC(o,n,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(v,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,v,g,m,y),o.restore())}!i||u?p(0,0,s,l):i.length&&R(i,function(v){p(v.x*h,v.y*h,v.width*h,v.height*h)})},t}(yi),IR=1e5,dl=314159,_g=.01,J0t=.001;function Q0t(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function t_t(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var e_t=function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=et({},n||{}),this.dpr=n.devicePixelRatio||Iy,this._singleCanvas=a,this.root=t;var o=t.style;o&&(KW(t),t.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=t,h=c.width,f=c.height;n.width!=null&&(h=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,c.width=h*this.dpr,c.height=f*this.dpr,this._width=h,this._height=f;var d=new v1(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[dl]=d,d.zlevel=dl,s.push(dl),this._domRoot=t}else{this._width=Oc(t,0,n),this._height=Oc(t,1,n);var u=this._domRoot=t_t(this._width,this._height);t.appendChild(u)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(IR)),a||(a=n.ctx,a.save()),Vl(a,s,i,o===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(IR)},e.prototype.paintOne=function(t,r){N8(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;ky(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(dl).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,h=!1,f=function(v){var g=a[v],m=g.ctx,y=o&&g.createRepaintRects(t,r,d._width,d._height),_=n?g.__startIndex:g.__drawIndex,x=!n&&g.incremental&&Date.now,b=x&&Date.now(),S=g.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,y);else if(_===g.__startIndex){var w=t[_];(!w.incremental||!w.notClear||n)&&g.clear(!1,S,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var C,k=function(D){var E={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(C=_;C<g.__endIndex;C++){var N=t[C];if(N.__inHover&&(h=!0),i._doPaintEl(N,g,o,D,E,C===g.__endIndex-1),x){var P=Date.now()-b;if(P>15)break}}E.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=g.__endIndex;else for(var T=d.dpr,A=0;A<y.length;++A){var L=y[A];m.save(),m.beginPath(),m.rect(L.x*T,L.y*T,L.width*T,L.height*T),m.clip(),k(L),m.restore()}else m.save(),k(),m.restore();g.__drawIndex=C,g.__drawIndex<g.__endIndex&&(c=!1)},d=this,p=0;p<a.length;p++)f(p);return Qt.wxa&&R(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:h}},e.prototype._doPaintEl=function(t,r,n,i,a,o){var s=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Vl(s,t,a,o),t.setPrevPaintRect(l))}else Vl(s,t,a,o)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=dl);var n=this._layers[t];return n||(n=new v1("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?zt(n,this._layerConfig[t],!0):this._layerConfig[t-_g]&&zt(n,this._layerConfig[t-_g],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(n[t]){process.env.NODE_ENV!=="production"&&Mi("ZLevel "+t+" has been used already");return}if(!Q0t(r)){process.env.NODE_ENV!=="production"&&Mi("Layer of zlevel "+t+" is not valid");return}if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(r,o,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(r,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function r(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+J0t,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?_g:0),this._needsManuallyCompositing),c.__builtin__||Mi("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Vn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?zt(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+_g){var o=this._layers[a];zt(o,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice($t(n,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=Oc(a,0,i),r=Oc(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(dl).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[dl].dom;var r=new v1("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Vl(n,c,o,l===u-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function r_t(e){e.registerPainter("canvas",e_t)}var n_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new yt,i=nr("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=nr(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=U.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Ae);function Sh(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=mh(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(mh(e,t,r[o]));return a.join(" ")}}function Qj(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!nt(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var tv=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=nr(r,-1,-1,2,2,null,s);l.attr({z2:dt(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=i_t,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ao(this.childAt(0))},t.prototype.downplay=function(){Do(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,f)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?d.attr(p):se(d,p,s,n),gi(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Le(d,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,h,f,d,p,v,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),f=_.get("focus"),d=_.get("blurScope"),p=_.get("disabled"),v=dr(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var x=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Mu(r.getItemVisual(n,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var S=r.getItemVisual(n,"style"),w=S.fill;if(s instanceof Rr){var C=s.style;s.useStyle(et({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},S))}else s.__isEmptyBrush?s.useStyle(et({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var k=r.getItemVisual(n,"liftZ"),T=this._z2;k!=null?T==null&&(this._z2=s.z2,s.z2+=k):T!=null&&(s.z2=T,this._z2=null);var A=o&&o.useNameLabel;Cr(s,v,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:w,defaultOpacity:S.opacity});function L(N){return A?r.getName(N):Sh(r,N)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var D=s.ensureState("emphasis");D.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var E=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;D.scaleX=this._sizeX*E,D.scaleY=this._sizeY*E,this.setSymbolScale(1),Ie(this,f,d,p)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=At(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ks(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ks(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Zh(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(yt);function i_t(e,t){this.parent.drift(e,t)}function g1(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function PR(e){return e!=null&&!xt(e)&&(e={isIgnore:e}),e||{}}function RR(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:dr(t),cursorStyle:t.get("cursor")}}var ev=function(){function e(t){this.group=new yt,this._SymbolCtor=t||tv}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=PR(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=RR(t),u={disableAnimation:s},c=r.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var f=c(h);if(g1(t,f,h,r)){var d=new o(t,h,l,u);d.setPosition(f),t.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!g1(t,p,h,r)){n.remove(d);return}var v=t.getItemVisual(h,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==v)n.remove(d),d=new o(t,h,l,u),d.setPosition(p);else{d.updateData(t,h,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):se(d,m,i)}n.add(d),t.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=RR(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=PR(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(g1(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Bs(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e}();function tU(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=a_t(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,h=at(e.dimensions,function(p){return t.mapDimension(p)}),f=!1,d=t.getCalculationInfo("stackResultDimension");return As(t,h[0])&&(f=!0,h[0]=d),As(t,h[1])&&(f=!0,h[1]=d),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function a_t(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:ae(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function eU(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function o_t(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function s_t(e,t,r,n,i,a,o,s){for(var l=o_t(e,t),u=[],c=[],h=[],f=[],d=[],p=[],v=[],g=tU(i,t,o),m=e.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,w=void 0;switch(x.cmd){case"=":S=x.idx*2,w=x.idx1*2;var C=m[S],k=m[S+1],T=y[w],A=y[w+1];(isNaN(C)||isNaN(k))&&(C=T,k=A),u.push(C,k),c.push(T,A),h.push(r[S],r[S+1]),f.push(n[w],n[w+1]),v.push(t.getRawIndex(x.idx1));break;case"+":var L=x.idx,D=g.dataDimsForPoint,E=i.dataToPoint([t.get(D[0],L),t.get(D[1],L)]);w=L*2,u.push(E[0],E[1]),c.push(y[w],y[w+1]);var N=eU(g,i,t,L);h.push(N[0],N[1]),f.push(n[w],n[w+1]),v.push(t.getRawIndex(L));break;case"-":b=!1}b&&(d.push(x),p.push(p.length))}p.sort(function(W,J){return v[W]-v[J]});for(var P=u.length,F=ya(P),O=ya(P),$=ya(P),V=ya(P),I=[],_=0;_<p.length;_++){var B=p[_],G=_*2,H=B*2;F[G]=u[H],F[G+1]=u[H+1],O[G]=c[H],O[G+1]=c[H+1],$[G]=h[H],$[G+1]=h[H+1],V[G]=f[H],V[G+1]=f[H+1],I[_]=d[B]}return{current:F,next:O,stackedOnCurrent:$,stackedOnNext:V,status:I}}var Uo=Math.min,Yo=Math.max;function Xl(e,t){return isNaN(e)||isNaN(t)}function cT(e,t,r,n,i,a,o,s,l){for(var u,c,h,f,d,p,v=r,g=0;g<n;g++){var m=t[v*2],y=t[v*2+1];if(v>=i||v<0)break;if(Xl(m,y)){if(l){v+=a;continue}break}if(v===r)e[a>0?"moveTo":"lineTo"](m,y),h=m,f=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){v+=a;continue}if(o>0){for(var b=v+a,S=t[b*2],w=t[b*2+1];S===m&&w===y&&g<n;)g++,b+=a,v+=a,S=t[b*2],w=t[b*2+1],m=t[v*2],y=t[v*2+1],_=m-u,x=y-c;var C=g+1;if(l)for(;Xl(S,w)&&C<n;)C++,b+=a,S=t[b*2],w=t[b*2+1];var k=.5,T=0,A=0,L=void 0,D=void 0;if(C>=n||Xl(S,w))d=m,p=y;else{T=S-u,A=w-c;var E=m-u,N=S-m,P=y-c,F=w-y,O=void 0,$=void 0;if(s==="x"){O=Math.abs(E),$=Math.abs(N);var V=T>0?1:-1;d=m-V*O*o,p=y,L=m+V*$*o,D=y}else if(s==="y"){O=Math.abs(P),$=Math.abs(F);var I=A>0?1:-1;d=m,p=y-I*O*o,L=m,D=y+I*$*o}else O=Math.sqrt(E*E+P*P),$=Math.sqrt(N*N+F*F),k=$/($+O),d=m-T*o*(1-k),p=y-A*o*(1-k),L=m+T*o*k,D=y+A*o*k,L=Uo(L,Yo(S,m)),D=Uo(D,Yo(w,y)),L=Yo(L,Uo(S,m)),D=Yo(D,Uo(w,y)),T=L-m,A=D-y,d=m-T*O/$,p=y-A*O/$,d=Uo(d,Yo(u,m)),p=Uo(p,Yo(c,y)),d=Yo(d,Uo(u,m)),p=Yo(p,Uo(c,y)),T=m-d,A=y-p,L=m+T*$/O,D=y+A*$/O}e.bezierCurveTo(h,f,d,p,m,y),h=L,f=D}else e.lineTo(m,y)}u=m,c=y,v+=a}return g}var rU=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),l_t=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new rU},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Xl(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Xl(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=cT(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Ia.CMD,s,l,u=n==="x",c=[],h=0;h<a.length;){var f=a[h++],d=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(f){case o.M:s=a[h++],l=a[h++];break;case o.L:if(d=a[h++],p=a[h++],_=u?(r-s)/(d-s):(r-l)/(p-l),_<=1&&_>=0){var x=u?(p-l)*_+l:(d-s)*_+s;return u?[r,x]:[x,r]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],v=a[h++],g=a[h++],m=a[h++],y=a[h++];var b=u?Dy(s,d,v,m,r,c):Dy(l,p,g,y,r,c);if(b>0)for(var S=0;S<b;S++){var w=c[S];if(w<=1&&w>=0){var x=u?_r(l,p,g,y,w):_r(s,d,v,m,w);return u?[r,x]:[x,r]}}s=m,l=y;break}}},t}(Kt),u_t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rU),nU=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new u_t},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Xl(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Xl(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=cT(r,i,o,s,s,1,n.smooth,l,n.connectNulls);cT(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t}(Kt);function iU(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Ut({shape:{x:o,y:s,width:l,height:u}});if(t){var f=e.getBaseAxis(),d=f.isHorizontal(),p=f.inverse;d?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var v=mt(i)?function(g){i(g,h)}:null;Le(h,{shape:{width:l,height:u,x:o,y:s}},r,null,n,v)}return h}function aU(e,t,r){var n=e.getArea(),i=Je(n.r0,1),a=Je(n.r,1),o=new Jr({shape:{cx:Je(e.cx,1),cy:Je(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Le(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function rv(e,t,r,n,i){if(e){if(e.type==="polar")return aU(e,t,r);if(e.type==="cartesian2d")return iU(e,t,r,n,i)}else return null;return null}function Ds(e,t){return e.type===t}function NR(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function OR(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function BR(e,t){var r=OR(e),n=r[0],i=r[1],a=OR(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function FR(e){return ae(e)?e:e?.5:0}function c_t(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=ya(n*2),a=0;a<n;a++){var o=eU(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function qo(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],h=[],f=[];if(i){for(l=0;l<e.length;l+=2){var d=t||e;!isNaN(d[l])&&!isNaN(d[l+1])&&f.push(e[l],e[l+1])}e=f}for(l=0;l<e.length-2;l+=2)switch(h[0]=e[l+2],h[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),n){case"end":u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+h[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=h[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function h_t(e,t){var r=[],n=e.length,i,a;function o(c,h,f){var d=c.coord,p=(f-d)/(h.coord-d),v=Aht(p,[c.color,h.color]);return{coord:f,color:v}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function f_t(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=at(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=h_t(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,v=f[0].coord-p,g=f[d-1].coord+p,m=g-v;if(m<.001)return"transparent";R(f,function(_){_.offset=(_.coord-v)/m}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var y=new Wh(0,0,0,0,f,!0);return y[i]=v,y[i+"2"]=g,y}}function d_t(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&p_t(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function p_t(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(tv.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function v_t(e,t){return isNaN(e)||isNaN(t)}function g_t(e){for(var t=e.length/2;t>0&&v_t(e[t*2-2],e[t*2-1]);t--);return t-1}function $R(e,t){return[e[t*2],e[t*2+1]]}function m_t(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!(isNaN(o)||isNaN(e[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function oU(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<xn.length;t++)if(e.get([xn[t],"endLabel","show"]))return!0;return!1}function m1(e,t,r,n){if(Ds(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=oU(n)?function(d,p){e._endLabelOnDuring(d,p,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=iU(t,r,n,function(){var d=e._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=c.shape,f=Math.max(h.width,h.height);u?(h.y-=f,h.height+=f*2):(h.x-=f,h.width+=f*2)}return l&&l(1,c),c}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),aU(t,r,n)}function y_t(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var __t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new yt,n=new ev;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ut(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],h=a.type==="polar",f=this._coordSys,d=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=tU(a,s,_),b=y&&c_t(a,s,x),S=r.get("showSymbol"),w=r.get("connectNulls"),C=S&&!h&&d_t(r,s,a),k=this._data;k&&k.eachItemGraphicEl(function(W,J){W.__temp&&(o.remove(W),k.setItemGraphicEl(J,null))}),S||d.remove(),o.add(g);var T=h?!1:r.get("step"),A;a&&a.getArea&&r.get("clip",!0)&&(A=a.getArea(),A.width!=null?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r+=.5)),this._clipShapeForSymbol=A;var L=f_t(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===a.type&&T===this._step))S&&d.updateData(s,{isIgnore:C,clipShape:A,disableAnimation:!0,getSymbolPoint:function(W){return[c[W*2],c[W*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,A),T&&(b&&(b=qo(b,c,a,T,w)),c=qo(c,null,a,T,w)),p=this._newPolyline(c),y?v=this._newPolygon(c,b):v&&(g.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,vu(L)),g.setClipPath(m1(this,a,!0,r));else{y&&!v?v=this._newPolygon(c,b):v&&!y&&(g.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,vu(L));var D=g.getClipPath();if(D){var E=m1(this,a,!1,r);Le(D,{shape:E.shape},r)}else g.setClipPath(m1(this,a,!0,r));S&&d.updateData(s,{isIgnore:C,clipShape:A,disableAnimation:!0,getSymbolPoint:function(W){return[c[W*2],c[W*2+1]]}}),(!NR(this._stackedOnPoints,b)||!NR(this._points,c))&&(m?this._doUpdateAnimation(s,b,a,i,T,_,w):(T&&(b&&(b=qo(b,c,a,T,w)),c=qo(c,null,a,T,w)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:b})))}var N=r.getModel("emphasis"),P=N.get("focus"),F=N.get("blurScope"),O=N.get("disabled");if(p.useStyle(wt(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),fr(p,r,"lineStyle"),p.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var $=p.getState("emphasis").style;$.lineWidth=+p.style.lineWidth+1}At(p).seriesIndex=r.seriesIndex,Ie(p,P,F,O);var V=FR(r.get("smooth")),I=r.get("smoothMonotone");if(p.setShape({smooth:V,smoothMonotone:I,connectNulls:w}),v){var B=s.getCalculationInfo("stackedOnSeries"),G=0;v.useStyle(wt(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),B&&(G=FR(B.get("smooth"))),v.setShape({smooth:V,stackedOnSmooth:G,smoothMonotone:I,connectNulls:w}),fr(v,r,"areaStyle"),At(v).seriesIndex=r.seriesIndex,Ie(v,P,F,O)}var H=this._changePolyState;s.eachItemGraphicEl(function(W){W&&(W.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=c,this._step=T,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,p),v&&this.packEventData(r,v))},t.prototype.packEventData=function(r,n){At(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=cu(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new tv(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ye.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=cu(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else ye.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;$y(this._polyline,r),n&&$y(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new l_t({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new nU({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");mt(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=mt(h)?h(null):h;r.eachItemGraphicEl(function(d,p){var v=d;if(v){var g=[d.x,d.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var x=i,b=n.pointToCoord(g);a?(m=x.startAngle,y=x.endAngle,_=-b[1]/180*Math.PI):(m=x.r0,y=x.r,_=b[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,_=d.x):(m=S.y+S.height,y=S.y,_=d.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var C=mt(h)?h(p):c*w+f,k=v.getSymbolPath(),T=k.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),T&&T.animateFrom({style:{opacity:0}},{duration:300,delay:C}),k.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(oU(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new oe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=g_t(l);c>=0&&(Cr(s,dr(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?Qj(o,d):Sh(o,h)},enableTextSetter:!0},y_t(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,x=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,b=(m?v:0)*(y?-1:1),S=(m?0:-v)*(y?-1:1),w=m?"x":"y",C=m_t(h,x,w),k=C.range,T=k[1]-k[0],A=void 0;if(T>=1){if(T>1&&!d){var L=$R(h,k[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(A=f.getRawValue(k[0]))}else{var L=c.getPointOn(x,w);L&&u.attr({x:L[0]+b,y:L[1]+S});var D=f.getRawValue(k[0]),E=f.getRawValue(k[1]);o&&(A=OH(i,p,D,E,C.t))}a.lastFrameIndex=k[0]}else{var N=r===1||a.lastFrameIndex>0?k[0]:0,L=$R(h,N);o&&(A=f.getRawValue(N)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var P=jh(u);typeof P.setLabelText=="function"&&P.setLabelText(A)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=r.hostModel,f=s_t(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,v=f.next,g=f.stackedOnNext;if(o&&(p=qo(f.stackedOnCurrent,f.current,i,o,l),d=qo(f.current,null,i,o,l),g=qo(f.stackedOnNext,f.next,i,o,l),v=qo(f.next,null,i,o,l)),BR(d,v)>3e3||c&&BR(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=d;var m={shape:{points:v}};f.current!==d&&(m.shape.__points=f.next),u.stopAnimation(),se(u,m,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),se(c,{shape:{stackedOnPoints:g}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=f.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=r.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,C=0;C<y.length;C++){var k=y[C].el,T=y[C].ptIdx*2;k.x=w[T],k.y=w[T+1],k.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(ye);function nv(e,t){return{seriesType:e,plan:qh(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=t||a.large;if(i){var s=at(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");As(n,s[0])&&(s[0]=u),As(n,s[1])&&(s[1]=u);var c=n.getStore(),h=n.getDimensionIndex(s[0]),f=n.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var v=d.end-d.start,g=o&&ya(v*l),m=[],y=[],_=d.start,x=0;_<d.end;_++){var b=void 0;if(l===1){var S=c.get(h,_);b=i.dataToPoint(S,null,y)}else m[0]=c.get(h,_),m[1]=c.get(f,_),b=i.dataToPoint(m,null,y);o?(g[x++]=b[0],g[x++]=b[1]):p.setItemLayout(_,b.slice())}o&&p.setLayout("points",g)}}}}}}var x_t={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},b_t=function(e){return Math.round(e.length/2)};function sU(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;lt(a)?p=x_t[a]:mt(a)&&(p=a),p&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,p,b_t))}}}}}function S_t(e){e.registerChartView(__t),e.registerSeriesModel(n_t),e.registerLayout(nv("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,sU("line"))}var wp=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),v=f.getTickModel().get("alignWithLabel"),g=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,b=0;b<p.length;b++){var S=p[b].coord,w=b===p.length-1?p[b-1].tickValue+x:p[b].tickValue;if(w===g){_=S;break}else if(w<g)y=S;else if(y!=null&&w>g){_=(S+y)/2;break}b===1&&(x=w-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[d]=f.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(Ae);Ae.registerClass(wp);var w_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return $o(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Fs(wp.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:U.color.primary,borderWidth:2}},realtimeSort:!1}),t}(wp),C_t=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),c0=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new C_t},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-c<d:c-h<d;p||(c=h-(f?d:-d));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(h),y=Math.sin(h);p?(r.moveTo(v*o+i,g*o+a),r.arc(v*u+i,g*u+a,l,-Math.PI+c,c,!f)):r.moveTo(v*s+i,g*s+a),r.arc(i,a,s,c,h,!f),r.arc(m*u+i,y*u+a,l,h-Math.PI*2,h-Math.PI,!f),o!==0&&r.arc(i,a,o,h,c,f)},t}(Kt);function T_t(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Ry(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,h=u.cy,f=u.r,d=u.r0,p=(f+d)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=r?Math.abs(f-d)/2:0,_=Math.cos,x=Math.sin,b=c+f*_(v),S=h+f*x(v),w="left",C="top";switch(s){case"startArc":b=c+(d-l)*_(m),S=h+(d-l)*x(m),w="center",C="top";break;case"insideStartArc":b=c+(d+l)*_(m),S=h+(d+l)*x(m),w="center",C="bottom";break;case"startAngle":b=c+p*_(v)+xg(v,l+y,!1),S=h+p*x(v)+bg(v,l+y,!1),w="right",C="middle";break;case"insideStartAngle":b=c+p*_(v)+xg(v,-l+y,!1),S=h+p*x(v)+bg(v,-l+y,!1),w="left",C="middle";break;case"middle":b=c+p*_(m),S=h+p*x(m),w="center",C="middle";break;case"endArc":b=c+(f+l)*_(m),S=h+(f+l)*x(m),w="center",C="bottom";break;case"insideEndArc":b=c+(f-l)*_(m),S=h+(f-l)*x(m),w="center",C="top";break;case"endAngle":b=c+p*_(g)+xg(g,l+y,!0),S=h+p*x(g)+bg(g,l+y,!0),w="left",C="middle";break;case"insideEndAngle":b=c+p*_(g)+xg(g,-l+y,!0),S=h+p*x(g)+bg(g,-l+y,!0),w="right",C="middle";break;default:return Ry(n,i,a)}return n=n||{},n.x=b,n.y=S,n.align=w,n.verticalAlign=C,n}}function k_t(e,t,r,n){if(ae(n)){e.setTextConfig({rotation:n});return}else if(nt(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),e.setTextConfig({rotation:c})}function xg(e,t,r){return t*Math.sin(e)*(r?-1:1)}function bg(e,t,r){return t*Math.cos(e)*(r?1:-1)}function xa(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;nt(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:at(n,function(a){return $i(a,i)})}}var y1=Math.max,_1=Math.min;function A_t(e,t){var r=e.getArea&&e.getArea();if(Ds(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var D_t=function(e){q(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&Ne("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var f=r.isAnimationEnabled()?r:null,d=L_t(r,u);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,v=A_t(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],b=this._backgroundEls,S=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function C(A){var L=Sg[u.type](s,A);if(!L)return null;var D=O_t(u,h,L);return D.useStyle(y.getItemStyle()),u.type==="cartesian2d"?D.setShape("r",_):D.setShape("cornerRadius",_),x[A]=D,D}s.diff(l).add(function(A){var L=s.getItemModel(A),D=Sg[u.type](s,A,L);if(D&&(m&&C(A),!(!s.hasValue(A)||!HR[u.type](D)))){var E=!1;p&&(E=VR[u.type](v,D));var N=zR[u.type](r,s,A,D,h,f,c.model,!1,g);d&&(N.forceLabelAnimation=!0),jR(N,s,A,L,D,r,h,u.type==="polar"),S?N.attr({shape:D}):d?GR(d,f,N,D,A,h,!1,!1):Le(N,{shape:D},r,A),s.setItemGraphicEl(A,N),o.add(N),N.ignore=E}}).update(function(A,L){var D=s.getItemModel(A),E=Sg[u.type](s,A,D);if(E){if(m){var N=void 0;b.length===0?N=C(L):(N=b[L],N.useStyle(y.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",_):N.setShape("cornerRadius",_),x[A]=N);var P=Sg[u.type](s,A),F=uU(h,P,u);se(N,{shape:F},f,A)}var O=l.getItemGraphicEl(L);if(!s.hasValue(A)||!HR[u.type](E)){o.remove(O);return}var $=!1;p&&($=VR[u.type](v,E),$&&o.remove(O));var V=O&&(O.type==="sector"&&g||O.type==="sausage"&&!g);if(V&&(O&&go(O,r,L),O=null),O?gi(O):O=zR[u.type](r,s,A,E,h,f,c.model,!0,g),d&&(O.forceLabelAnimation=!0),w){var I=O.getTextContent();if(I){var B=jh(I);B.prevValue!=null&&(B.prevValue=B.value)}}else jR(O,s,A,D,E,r,h,u.type==="polar");S?O.attr({shape:E}):d?GR(d,f,O,E,A,h,!0,w):se(O,{shape:E},r,A,null),s.setItemGraphicEl(A,O),O.ignore=$,o.add(O)}}).remove(function(A){var L=l.getItemGraphicEl(A);L&&go(L,r,A)}).execute();var k=this._backgroundGroup||(this._backgroundGroup=new yt);k.removeAll();for(var T=0;T<x.length;++T)k.add(x[T]);o.add(k),this._backgroundEls=x,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),YR(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),YR(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&rv(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:at(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){go(a,r,At(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(ye),VR={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=y1(t.x,e.x),s=_1(t.x+t.width,i),l=y1(t.y,e.y),u=_1(t.y+t.height,a),c=s<o,h=u<l;return t.x=c&&o>i?s:o,t.y=h&&l>a?u:l,t.width=c?0:s-o,t.height=h?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=_1(t.r,e.r),a=y1(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},zR={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Ut({shape:et({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?c0:Jr,c=new u({shape:n,z2:1});c.name="item";var h=lU(i);if(c.calculateTextPosition=T_t(h,{isRoundCap:u===c0}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?se:Le)(c,{shape:p},a)}return c}};function L_t(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&Ne("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&Ne("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function GR(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?se:Le)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?se:Le)(r,{shape:u},c,i)}function WR(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var M_t=["x","y","width","height"],E_t=["cx","cy","r","startAngle","endAngle"],HR={cartesian2d:function(e){return!WR(e,M_t)},polar:function(e){return!WR(e,E_t)}},Sg={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?P_t(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function I_t(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function lU(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function jR(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,h=xa(n.getModel("itemStyle"),c,!0);et(c,h),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var f=n.getShallow("cursor");f&&e.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=dr(n);Cr(e,p,{labelFetcher:a,labelDataIndex:r,defaultText:Sh(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var v=e.getTextContent();if(s&&v){var g=n.get(["label","position"]);e.textConfig.inside=g==="middle"?!0:null,k_t(e,g==="outside"?d:g,lU(o),n.get(["label","rotate"]))}S6(v,p,a.getRawValue(r),function(y){return Qj(t,y)});var m=n.getModel(["emphasis"]);Ie(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),fr(e,n),I_t(i)&&(e.style.fill="none",e.style.stroke="none",R(e.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function P_t(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var R_t=function(){function e(){}return e}(),UR=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new R_t},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},t}(Kt);function YR(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new UR({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),r&&r.push(c)}var h=new UR({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,At(h).seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",qR),h.on("mousemove",qR)),r&&r.push(h)}var qR=dA(function(e){var t=this,r=N_t(t,e.offsetX,e.offsetY);At(t).dataIndex=r>=0?r:null},30,!1);function N_t(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,h=a.length/3;c<h;c++){var f=c*3;if(l[n]=u,l[i]=a[f+2],s[n]=a[f+n],s[i]=a[f+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function uU(e,t,r){if(Ds(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function O_t(e,t,r){var n=e.type==="polar"?Jr:Ut;return new n({shape:uU(t,r,e),silent:!0,z2:0})}function B_t(e){e.registerChartView(D_t),e.registerSeriesModel(w_t),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Bt(fj,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,dj("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,sU("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var XR=Math.PI*2,wg=Math.PI/180;function F_t(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=G6(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*wg,d=n.get("endAngle"),p=n.get("padAngle")*wg;d=d==="auto"?f-XR:-d*wg;var v=n.get("minAngle")*wg,g=v+p,m=0;i.each(a,function(F){!isNaN(F)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,x=n.get("clockwise"),b=n.get("roseType"),S=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var C=x?1:-1,k=[f,d],T=C*p/2;R_(k,!x),f=k[0],d=k[1];var A=cU(n);A.startAngle=f,A.endAngle=d,A.clockwise=x,A.cx=s,A.cy=l,A.r=u,A.r0=c;var L=Math.abs(d-f),D=L,E=0,N=f;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(F,O){var $;if(isNaN(F)){i.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:c,r:b?NaN:u});return}b!=="area"?$=y===0&&S?_:F*_:$=L/m,$<g?($=g,D-=g):E+=F;var V=N+C*$,I=0,B=0;p>$?(I=N+C*$/2,B=I):(I=N+T,B=V-T),i.setItemLayout(O,{angle:$,startAngle:I,endAngle:B,clockwise:x,cx:s,cy:l,r0:c,r:b?fe(F,w,[c,u]):u}),N=V}),D<XR&&m)if(D<=.001){var P=L/m;i.each(a,function(F,O){if(!isNaN(F)){var $=i.getItemLayout(O);$.angle=P;var V=0,I=0;P<p?(V=f+C*(O+1/2)*P,I=V):(V=f+C*O*P+T,I=f+C*(O+1)*P-T),$.startAngle=V,$.endAngle=I}})}else _=D/E,N=f,i.each(a,function(F,O){if(!isNaN(F)){var $=i.getItemLayout(O),V=$.angle===g?g:F*_,I=0,B=0;V<p?(I=N+C*V/2,B=I):(I=N+T,B=N+C*V-T),$.startAngle=I,$.endAngle=B,N+=C*V}})})}var cU=qt();function Jh(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var $_t=Math.PI/180;function ZR(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],x=Math.abs(_.label.y-r),b=n+_.len,S=b*b,w=Math.sqrt(Math.abs((1-x*x/m)*S)),C=t+(w+_.len2)*i,k=C-_.label.x,T=_.targetTextWidth-k*i;hU(_,T,!0),_.label.x=C}}function h(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],x=_.label.y>r?m:g,b=Math.abs(_.label.y-r);if(b>=x.maxY){var S=_.label.x-t-_.len2*i,w=n+_.len,C=Math.abs(S)<w?Math.sqrt(b*b/(1-S*S/w/w)):w;x.rB=C,x.maxY=b}x.list.push(_)}c(g),c(m)}for(var f=e.length,d=0;d<f;d++)if(e[d].position==="outer"&&e[d].labelAlignTo==="labelLine"){var p=e[d].label.x-u;e[d].linePoints[1][0]+=p,e[d].label.x=u}oT(e,1,l,l+o)&&h(e)}function V_t(e,t,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=0;f<e.length;f++){var d=e[f].label;x1(e[f])||(d.x<t?(c=Math.min(c,d.x),l.push(e[f])):(h=Math.max(h,d.x),u.push(e[f])))}for(var f=0;f<e.length;f++){var p=e[f];if(!x1(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?d.x<t?g=v[2][0]-p.labelDistance-o-p.edgeDistance:g=o+i-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<t?g=c-o-p.bleedMargin:g=o+i-h-p.bleedMargin:d.x<t?g=d.x-o-p.bleedMargin:g=o+i-d.x-p.bleedMargin,p.targetTextWidth=g,hU(p,g,!1)}}ZR(u,t,r,n,1,i,a,o,s,h),ZR(l,t,r,n,-1,i,a,o,s,c);for(var f=0;f<e.length;f++){var p=e[f];if(!x1(p)&&p.linePoints){var d=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,_=y?y[1]+y[3]:0,x=d.style.backgroundColor?0:_,b=p.rect.width+x,S=v[1][0]-v[2][0];m?d.x<t?v[2][0]=o+p.edgeDistance+b+p.labelDistance:v[2][0]=o+i-p.edgeDistance-b-p.labelDistance:(d.x<t?v[2][0]=d.x+p.labelDistance:v[2][0]=d.x-p.labelDistance,v[1][0]=v[2][0]+S),v[1][1]=v[2][1]=d.y}}}function hU(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var f=t-l,d=t<c?f:r?f>e.unconstrainedWidth?null:f:null;n.setStyle("width",d)}fU(a,n)}}}function fU(e,t){KR.rect=e,Oj(KR,t,z_t)}var z_t={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},KR={};function x1(e){return e.position==="center"}function G_t(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*$_t,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}t.each(function(S){var w=t.getItemGraphicEl(S),C=w.shape,k=w.getTextContent(),T=w.getTextGuideLine(),A=t.getItemModel(S),L=A.getModel("label"),D=L.get("position")||A.get(["emphasis","label","position"]),E=L.get("distanceToLabelLine"),N=L.get("alignTo"),P=st(L.get("edgeDistance"),u),F=L.get("bleedMargin");F==null&&(F=Math.min(u,f)>200?10:2);var O=A.getModel("labelLine"),$=O.get("length");$=st($,u);var V=O.get("length2");if(V=st(V,u),Math.abs(C.endAngle-C.startAngle)<o){R(k.states,d),k.ignore=!0,T&&(R(T.states,d),T.ignore=!0);return}if(p(k)){var I=(C.startAngle+C.endAngle)/2,B=Math.cos(I),G=Math.sin(I),H,W,J,Q;n=C.cx,i=C.cy;var tt=D==="inside"||D==="inner";if(D==="center")H=C.cx,W=C.cy,Q="center";else{var it=(tt?(C.r+C.r0)/2*B:C.r*B)+n,X=(tt?(C.r+C.r0)/2*G:C.r*G)+i;if(H=it+B*3,W=X+G*3,!tt){var rt=it+B*($+l-C.r),Z=X+G*($+l-C.r),vt=rt+(B<0?-1:1)*V,kt=Z;N==="edge"?H=B<0?c+P:c+u-P:H=vt+(B<0?-E:E),W=kt,J=[[it,X],[rt,Z],[vt,kt]]}Q=tt?"center":N==="edge"?B>0?"right":"left":B>0?"left":"right"}var Wt=Math.PI,Ht=0,ue=L.get("rotate");if(ae(ue))Ht=ue*(Wt/180);else if(D==="center")Ht=0;else if(ue==="radial"||ue===!0){var Fe=B<0?-I+Wt:-I;Ht=Fe}else if(ue==="tangential"&&D!=="outside"&&D!=="outer"){var We=Math.atan2(B,G);We<0&&(We=Wt*2+We);var Tr=G>0;Tr&&(We=Wt+We),Ht=We-Wt}if(a=!!Ht,k.x=H,k.y=W,k.rotation=Ht,k.setStyle({verticalAlign:"middle"}),tt){k.setStyle({align:Q});var ee=k.states.select;ee&&(ee.x+=k.x,ee.y+=k.y)}else{var Nt=new Ct(0,0,0,0);fU(Nt,k),r.push({label:k,labelLine:T,position:D,len:$,len2:V,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new St(B,G),linePoints:J,textAlign:Q,labelDistance:E,labelAlignTo:N,edgeDistance:P,bleedMargin:F,rect:Nt,unconstrainedWidth:Nt.width,labelStyleWidth:k.style.width})}w.setTextConfig({inside:tt})}}),!a&&e.get("avoidLabelOverlap")&&V_t(r,n,i,l,u,f,c,h);for(var v=0;v<r.length;v++){var g=r[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(R(m.states,d),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(y){var b=g.linePoints;_||!b?(R(y.states,d),y.ignore=!0):(Pj(b,g.minTurnAngle),l0t(b,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new St(b[0][0],b[0][1])})}}}var W_t=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new oe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),h=et(xa(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var f=s.getShallow("animationType");s.ecModel.ssr?(Le(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):f==="scale"?(o.shape.r=c.r0,Le(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Le(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,se(o,{shape:{endAngle:c.endAngle}},s,n))}else gi(o),se(o,{shape:h},s,n);o.useStyle(r.getItemVisual(n,"style")),fr(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(d)*p,g=Math.sin(d)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=et({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},xa(u.getModel("itemStyle"),c)),et(o.ensureState("select"),{x:v,y:g,shape:xa(l.getModel(["select","itemStyle"]),c)}),et(o.ensureState("blur"),{shape:xa(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&et(y.ensureState("select"),{x:v,y:g}),et(_.ensureState("select"),{x:v,y:g}),Ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;Cr(a,dr(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var f=o.get(["label","position"]);if(f!=="outside"&&f!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Gr,this.setTextGuideLine(d)),kA(this,AA(o),{stroke:u,opacity:dn(s.get(["lineStyle","opacity"]),c,1)})}},t}(Jr),H_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<o.count();++h)c=o.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var f=cU(r),d=new Jr({shape:_t(f)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var v=new W_t(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=s.getItemGraphicEl(v);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);go(v,r,p)}).execute(),G_t(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(ye);function Qh(e,t,r){t=nt(t)&&{coordDimensions:t}||et({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=Jp(n,t).dimensions,a=new pn(i,e);return a.initData(n,r),a}var tf=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),j_t=qt(),dU=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Qh(this,{coordDimensions:["value"],encodeDefaulter:Bt(oA,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=j_t(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=cft(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){uu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Ae);Zpt({fullType:dU.type,getCoord2:function(e){return e.getShallow("center")}});function U_t(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(ae(o)&&!isNaN(o)&&o<0)})}}}function Y_t(e){e.registerChartView(H_t),e.registerSeriesModel(dU),I8("pie",e.registerAction),e.registerLayout(Bt(F_t,"pie")),e.registerProcessor(Jh("pie")),e.registerProcessor(U_t("pie"))}var q_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:U.color.primary}},universalTransition:{divideShape:"clone"}},t}(Ae),pU=4,X_t=function(){function e(){}return e}(),Z_t=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new X_t},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<pU,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var f=i[h++],d=i[h++];isNaN(f)||isNaN(d)||c&&!c.contain(f,d)||(s.x=f-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(r>=h&&n>=f&&r<=h+s&&n<=f+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f<i.length;){var d=i[f++],p=i[f++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),h=Math.max(p,h)}r=this._rect=new Ct(l-o/2,u-s/2,c-l+o,h-u+s)}return r},t}(Kt),K_t=function(){function e(){this.group=new yt}return e.prototype.updateData=function(t,r){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new Z_t({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=nr(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<pU;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=At(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),J_t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=nv("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new K_t:new ev,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(ye),vU={left:0,right:0,top:0,bottom:0},h0=["25%","25%"],Q_t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=Du(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Pa(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Pa(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:vU,outerBoundsContain:"all",outerBoundsClampWidth:h0[0],outerBoundsClampHeight:h0[1],backgroundColor:U.color.transparent,borderWidth:1,borderColor:U.color.neutral30},t}(Zt),hT=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ge).models[0]},t.type="cartesian2dAxis",t}(Zt);ir(hT,Qp);var gU={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:U.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:U.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:U.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[U.color.backgroundTint,U.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:U.color.neutral00,borderColor:U.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},txt=zt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},gU),RA=zt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:U.color.axisMinorSplitLine,width:1}}},gU),ext=zt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},RA),rxt=wt({logBase:10},RA);const mU={category:txt,value:RA,time:ext,log:rxt};var nxt={value:1,category:1,time:1,log:1},fT=null;function ixt(e){fT||(fT=e)}function iv(){return fT}function wh(e,t,r,n){R(nxt,function(i,a){var o=zt(zt({},mU[a],!0),n,!0),s=function(l){q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=dp(this),d=f?Du(c):{},p=h.getTheme();zt(c,p.get(a+"Axis")),zt(c,this.getDefaultOption()),c.type=JR(c),f&&Pa(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=_p.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var h=iv();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",JR)}function JR(e){return e.type||(e.data?"category":"value")}var axt=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return at(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),de(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),dT=["x","y"];function QR(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var oxt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=dT,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!QR(r)||!QR(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=Fi([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ct(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return qe(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return qe(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ct(a,o,s,l)},t}(axt),yU=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(ji),Q_="expandAxisBreak",_U="collapseAxisBreak",xU="toggleAxisBreak",NA="axisbreakchanged",sxt={type:Q_,event:NA,update:"update",refineEvent:OA},lxt={type:_U,event:NA,update:"update",refineEvent:OA},uxt={type:xU,event:NA,update:"update",refineEvent:OA};function OA(e,t,r,n){var i=[];return R(e,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function cxt(e){e.registerAction(sxt,t),e.registerAction(lxt,t),e.registerAction(uxt,t);function t(r,n){var i=[],a=Wc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(h){var f;i.push(wt((f={},f[l]=u.componentIndex,f),h))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var us=Math.PI,hxt=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],fxt=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Ch=qt(),bU=qt(),SU=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function dxt(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=BA(e.axisName)&&bh(e.nameLocation);R(n,function(p){var v=Ra(p);if(!(!v||v.label.ignore)){o.push(v);var g=a.transGroup;l&&(g.transform?Fi(Bf,g.transform):w_(Bf),v.transform&&Sa(Bf,Bf,v.transform),Ct.copy(Cg,v.localRect),Cg.applyTransform(Bf),s?s.union(Cg):Ct.copy(s=new Ct(0,0,0,0),Cg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,v){return Math.abs(p.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1])-f;s.union(new Ct(f,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Bf=Ir(),Cg=new Ct(0,0,0,0),wU=function(e,t,r,n,i,a){if(bh(e.nameLocation)){var o=a.stOccupiedRect;o&&CU(h0t({},o,a.transGroup.transform),n,i)}else TU(a.labelInfoList,a.dirVec,n,i)};function CU(e,t,r){var n=new St;K_(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&iT(t,n)}function TU(e,t,r,n){for(var i=St.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||CU(s,r,n)}}var vn=function(){function e(t,r,n,i){this.group=new yt,this._axisModel=t,this._api=r,this._local={},this._shared=i||new SU(wU),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){if(process.env.NODE_ENV!=="production"){var r=this._shared.ensureRecord(this._axisModel).ready;ft(!r.axisLine&&!r.axisTickLabelDetermine),r.axisName=r.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=t.position,n.labelOffset=t.labelOffset,this._resetCfgDetermined(n)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=dt(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=dt(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:dt(t.nameDirection,1),tickDirection:dt(t.tickDirection,1),labelDirection:dt(t.labelDirection,1),labelOffset:dt(t.labelOffset,0),silent:dt(t.silent,!0),axisName:i,nameLocation:dn(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:BA(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(ft(o.position!=null),ft(o.rotation!=null)),this._cfg=o;var s=new yt({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new St(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),R(pxt,function(i){t[i]&&vxt[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=kH(r-t),a,o;return up(i)?(o=n>0?"top":"bottom",a="center"):up(i-us)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<us?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),pxt=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],vxt={axisLine:function(e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=r.ensureRecord(n).ready;ft(!s.axisLine),s.axisLine=!0}var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,e.raw.axisLineAutoShow!=null&&(l=!!e.raw.axisLineAutoShow)),!!l){var u=n.axis.getExtent(),c=a.transform,h=[u[0],0],f=[u[1],0],d=h[0]>f[0];c&&(qe(h,h,c),qe(f,f,c));var p=et({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())iv().buildAxisBreakLine(n,i,a,v);else{var g=new Qe(et({shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]}},v));gh(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);lt(m)&&(m=[m,m]),(lt(y)||ae(y))&&(y=[y,y]);var _=Mu(n.get(["axisLine","symbolOffset"])||0,y),x=y[0],b=y[1];R([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((h[0]-f[0])*(h[0]-f[0])+(h[1]-f[1])*(h[1]-f[1]))}],function(S,w){if(m[w]!=="none"&&m[w]!=null){var C=nr(m[w],-x/2,-b/2,x,b,p.stroke,!0),k=S.r+S.offset,T=d?f:h;C.attr({rotation:S.rotate,x:T[0]+k*Math.cos(e.rotation),y:T[1]-k*Math.sin(e.rotation),silent:!0,z2:11}),i.add(C)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;ft(!l.axisTickLabelDetermine),l.axisTickLabelEstimate=!0}var u=eN(t,i,s);u&&tN(e,t,r,n,i,a,o,Vi.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;l.axisTickLabelDetermine=!0}var u=eN(t,i,s);u&&tN(e,t,r,n,i,a,o,Vi.determine);var c=_xt(e,i,a,n);yxt(e,t.labelLayoutList,c),xxt(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);if(process.env.NODE_ENV!=="production"){var u=l.ready;ft(u.axisTickLabelEstimate||u.axisTickLabelDetermine),u.axisName=!0}t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var c=e.axisName;if(BA(c)){var h=e.nameLocation,f=e.nameDirection,d=n.getModel("nameTextStyle"),p=n.get("nameGap")||0,v=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new St(0,0),y=new St(0,0);h==="start"?(m.x=v[0]-g*p,y.x=-g):h==="end"?(m.x=v[1]+g*p,y.x=g):(m.x=(v[0]+v[1])/2,m.y=e.labelOffset+f*p,y.y=f);var _=Ir();y.transform(Os(_,_,e.rotation));var x=n.get("nameRotate");x!=null&&(x=x*us/180);var b,S;bh(h)?b=vn.innerTextLayout(e.rotation,x??e.rotation,f):(b=gxt(e.rotation,h,x||0,v),S=e.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var w=d.getFont(),C=n.get("nameTruncate",!0)||{},k=C.ellipsis,T=lr(e.raw.nameTruncateMaxWidth,C.maxWidth,S),A=s.nameMarginLevel||0,L=new oe({x:m.x,y:m.y,rotation:b.rotation,silent:vn.isLabelSilent(n),style:Te(d,{text:c,font:w,overflow:"truncate",width:T,ellipsis:k,fill:d.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:d.get("align")||b.textAlign,verticalAlign:d.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Fo({el:L,componentModel:n,itemName:c}),L.__fullText=c,L.anid="name",n.get("triggerEvent")){var D=vn.makeAxisEventDataBase(n);D.targetType="axisName",D.name=c,At(L).eventData=D}a.add(L),L.updateTransform(),t.nameEl=L;var E=l.nameLayout=Ra({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:bh(h)?hxt[A]:fxt[A]});if(l.nameLocation=h,i.add(L),L.decomposeTransform(),e.shouldNameMoveOverlap&&E){var N=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&ft(N.labelInfoList),r.resolveAxisNameOverlap(e,r,n,E,y,N)}}}};function tN(e,t,r,n,i,a,o,s){AU(t)||bxt(e,t,i,s,n,o);var l=t.labelLayoutList;Sxt(e,n,l,a),Txt(n,e.rotation,l);var u=e.optionHideOverlap;mxt(n,l,u),u&&Bj(de(l,function(c){return c&&!c.label.ignore})),dxt(e,r,n,l)}function gxt(e,t,r,n){var i=kH(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return up(i-us/2)?(o=l?"bottom":"top",a="center"):up(i-us*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<us*1.5&&i>us/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function mxt(e,t,r){if(xj(e.axis))return;function n(s,l,u){var c=Ra(t[l]),h=Ra(t[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){md(c.label);return}if(h.suggestIgnore){md(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=aT({marginForce:d},c),h=aT({marginForce:d},h)}K_(c,h,null,{touchThreshold:f})&&md(s?h.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function yxt(e,t,r){e.showMinorTicks||R(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=bU(a),s=Ch(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){md(a);return}}})}function md(e){e&&(e.ignore=!0)}function kU(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(qe(o,o,t),qe(s,s,t));var c=new Qe({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});gh(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var h=bU(c);h.onBand=!!e[l].onBand,h.tickValue=e[l].tickValue}return a}function _xt(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),c=kU(u,r.transform,l,wt(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)t.add(c[h]);return c}function xxt(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=wt(l.getLineStyle(),wt(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var f=kU(s[h],r.transform,u,c,"minorticks_"+h),d=0;d<f.length;d++)t.add(f[d])}}function eN(e,t,r){if(AU(e)){var n=e.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&ft(e.labelGroup&&n);var i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),pT(e,null,null,null))}return!0}function bxt(e,t,r,n,i,a){var o=i.axis,s=lr(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new yt;r.add(l);var u=i0(n);if(!s||o.scale.isBlank()){pT(t,[],l,u);return}var c=i.getModel("axisLabel"),h=o.getViewLabels(u),f=(lr(e.raw.labelRotate,c.get("rotate"))||0)*us/180,d=vn.innerTextLayout(e.rotation,f,e.labelDirection),p=i.getCategories&&i.getCategories(!0),v=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;R(h,function(x,b){var S,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(x.tickValue):x.tickValue,C=x.formattedLabel,k=x.rawLabel,T=c;if(p&&p[w]){var A=p[w];xt(A)&&A.textStyle&&(T=new ne(A.textStyle,c,i.ecModel))}var L=T.getTextColor()||i.get(["axisLine","lineStyle","color"]),D=T.getShallow("align",!0)||d.textAlign,E=dt(T.getShallow("alignMinLabel",!0),D),N=dt(T.getShallow("alignMaxLabel",!0),D),P=T.getShallow("verticalAlign",!0)||T.getShallow("baseline",!0)||d.textVerticalAlign,F=dt(T.getShallow("verticalAlignMinLabel",!0),P),O=dt(T.getShallow("verticalAlignMaxLabel",!0),P),$=10+(((S=x.time)===null||S===void 0?void 0:S.level)||0);m=Math.min(m,$),y=Math.max(y,$);var V=new oe({x:0,y:0,rotation:0,silent:vn.isLabelSilent(i),z2:$,style:Te(T,{text:C,align:b===0?E:b===h.length-1?N:D,verticalAlign:b===0?F:b===h.length-1?O:P,fill:mt(L)?L(o.type==="category"?k:o.type==="value"?w+"":w,b):L})});V.anid="label_"+w;var I=Ch(V);if(I.break=x.break,I.tickValue=w,I.layoutRotation=d.rotation,Fo({el:V,componentModel:i,itemName:C,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:k,tickIndex:b}}),g){var B=vn.makeAxisEventDataBase(i);B.targetType="axisLabel",B.value=k,B.tickIndex=b,x.break&&(B.break={start:x.break.parsedBreak.vmin,end:x.break.parsedBreak.vmax}),o.type==="category"&&(B.dataIndex=w),At(V).eventData=B,x.break&&Cxt(i,a,V,x.break)}v.push(V),l.add(V)});var _=at(v,function(x){return{label:x,priority:Ch(x).break?x.z2+(y-m+1):x.z2,defaultAttr:{ignore:x.ignore}}});pT(t,_,l,u)}function AU(e){return!!e.labelLayoutList}function pT(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function Sxt(e,t,r,n){var i=t.get(["axisLabel","margin"]);R(r,function(a,o){var s=Ra(a);if(s){var l=s.label,u=Ch(l);s.suggestIgnore=l.ignore,l.ignore=!1,Py(Xa,wxt),Xa.x=t.axis.dataToCoord(u.tickValue),Xa.y=e.labelOffset+e.labelDirection*i,Xa.rotation=u.layoutRotation,n.add(Xa),Xa.updateTransform(),n.remove(Xa),Xa.decomposeTransform(),Py(l,Xa),l.markRedraw(),l0(s,!0),Ra(s)}})}var Xa=new Ut,wxt=new Ut;function BA(e){return!!e}function Cxt(e,t,r,n){r.on("click",function(i){var a={type:Q_,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function Txt(e,t,r){var n=tr();if(n){var i=n.retrieveAxisBreakPairs(r,function(o){return o&&Ch(o.label).break},!0),a=e.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&R(i,function(o){iv().adjustBreakLabelPair(e.axis.inverse,t,[Ra(r[o[0]]),Ra(r[o[1]])])})}}function f0(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(a){var d=a.toGlobalCoord(a.dataToCoord(0));f[c.onZero]=Math.max(Math.min(d,f[1]),f[0])}i.position=[l==="y"?f[c[s]]:u[0],l==="x"?f[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[o],i.labelOffset=a?f[c[o]]-f[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),lr(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-v:v,i.z2=1,i}function kxt(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function rN(e){var t={xAxisModel:null,yAxisModel:null};return R(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Ge).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+dn(e.get(i+"Index"),e.get(i+"Id"),0)+'" not found');t[n]=a}),t}function Axt(e,t,r,n,i,a){for(var o=f0(e,r),s=!1,l=!1,u=0;u<t.length;u++)QC(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new vn(r,n,o,i)}function Dxt(e,t,r){var n=f0(t,r);if(process.env.NODE_ENV!=="production"){var i=e.__getRawCfg();R(te(n),function(a){a!=="position"&&a!=="labelOffset"&&ft(n[a]===i[a])})}e.updateCfg(n)}function DU(e,t,r){var n,i=Mo.prototype,a=i.getTicks.call(r),o=i.getTicks.call(r,{expandToNicedExtent:!0}),s=a.length-1,l=i.getInterval.call(r),u=_j(e,t),c=u.extent,h=u.fixMin,f=u.fixMax;e.type==="log"&&(c=tT(e.base,c,!0)),e.setBreaksFromOption(bj(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:s,fixMin:h,fixMax:f});var d=i.getExtent.call(e);h&&(c[0]=d[0]),f&&(c[1]=d[1]);var p=i.getInterval.call(e),v=c[0],g=c[1];if(h&&f)p=(g-v)/s;else if(h)for(g=c[0]+p*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)p=a1(p),g=c[0]+p*s;else if(f)for(v=c[1]-p*s;v>c[0]&&isFinite(v)&&isFinite(c[0]);)p=a1(p),v=c[1]-p*s;else{var m=e.getTicks().length-1;m>s&&(p=a1(p));var y=p*s;g=Math.ceil(c[1]/p)*p,v=Je(g-y),v<0&&c[0]>=0?(v=0,g=Je(y)):g>0&&c[1]<=0&&(g=0,v=-Je(y))}var _=(a[0].value-o[0].value)/l,x=(a[s].value-o[s].value)/l;if(i.setExtent.call(e,v+p*_,g+p*x),i.setInterval.call(e,p),(_||x)&&i.setNiceExtent.call(e,v+p,g-p),process.env.NODE_ENV!=="production"){var b=i.getTicks.call(e);b[1]&&(!cyt(p)||gC(b[1].value)>gC(p))&&Ne("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+(" and alignTicks: true. ("+((n=t.axis)===null||n===void 0?void 0:n.dim)+"AxisIndex: "+t.componentIndex+")"),!0)}}var nN=[[3,1],[0,2]],Lxt=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=dT,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=te(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,v=d.scale;QC(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(xh(v,p),QC(v)&&(s=d))}c.length&&(s||(s=c.pop(),xh(s.scale,s.model)),R(c,function(g){DU(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){iN(n,"y",o,a)}),R(n.y,function(o){iN(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=pr(t,r),a=this._rect=Pe(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(vT(o,a),!n){var u=Ixt(a,s,o,l,r),c=void 0;if(l)gT?(gT(this._axesList,a),vT(o,a)):(process.env.NODE_ENV!=="production"&&MH("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=sN(a.clone(),"axisLabel",null,a,o,u,i));else{var h=Pxt(t,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=sN(f,d,p,a,o,u,i))}LU(a,o,Vi.determine,null,c,i)}R(this._coordsList,function(v){v.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}xt(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",Ge).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",Ge).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,$t(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,R(s.x,function(c,h){R(s.y,function(f,d){var p="x"+h+"y"+d,v=new oxt(p);v.master=i,v.model=t,i._coordsMap[p]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(f)})});function u(c){return function(h,f){if(b1(h,t)){var d=h.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new yU(c,Z_(h),[0,0],h.get("type"),d),v=p.type==="category";p.onBand=v&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=f,a._axesList.push(p),s[c][f]=p,l[c]++}}}},e.prototype._updateScale=function(t,r){R(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(kxt(i)){var a=rN(i),o=a.xAxisModel,s=a.yAxisModel;if(!b1(o,r)||!b1(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),h=l.getAxis("y");n(u,c),n(u,h)}},this);function n(i,a){R(n0(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return R(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);$t(r,a)<0&&r.push(a),$t(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){Zp({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=rN(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+dn(s.get("gridIndex"),s.get("gridId"),0)+'" not found');if(s.getCoordSysModel()!==l.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},e.dimensions=dT,e}();function b1(e,t){return e.getCoordSysModel()===t}function iN(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)aN(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&aN(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function aN(e){return e&&e.type!=="category"&&e.type!=="time"&&Nyt(e)}function Mxt(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function vT(e,t){R(e.x,function(r){return oN(r,t.x,t.width)}),R(e.y,function(r){return oN(r,t.y,t.height)})}function oN(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),Mxt(e,t)}var gT;function Ext(e){gT=e}function sN(e,t,r,n,i,a,o){process.env.NODE_ENV!=="production"&&ft(t==="all"||t==="axisLabel"),LU(n,i,Vi.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=Cu(s,function(f){return f>0})==null;return du(n,s,!0,!0,r),vT(i,n),l;function u(f){R(i[Pt[f]],function(d){if(xp(d.model)){var p=a.ensureRecord(d.model),v=p.labelInfoList;if(v)for(var g=0;g<v.length;g++){var m=v[g],y=d.scale.normalize(Ch(m.label).tickValue);y=f===1?1-y:y,c(m.rect,f,y),c(m.rect,1-f,NaN)}var _=p.nameLayout;if(_){var y=bh(p.nameLocation)?.5:NaN;c(_.rect,f,y),c(_.rect,1-f,NaN)}}})}function c(f,d,p){var v=e[Pt[d]]-f[Pt[d]],g=f[er[d]]+f[Pt[d]]-(e[er[d]]+e[Pt[d]]);v=h(v,1-p),g=h(g,p);var m=nN[d][0],y=nN[d][1];s[m]=Ue(s[m],v),s[y]=Ue(s[y],g)}function h(f,d){return f>0&&!Er(d)&&d>1e-4&&(f/=d),f}}function Ixt(e,t,r,n,i){var a=new SU(Rxt);return R(r,function(o){return R(o,function(s){if(xp(s.model)){var l=!n;s.axisBuilder=Axt(e,t,s.model,i,a,l)}})}),a}function LU(e,t,r,n,i,a){var o=r===Vi.determine;R(t,function(u){return R(u,function(c){xp(c.model)&&(Dxt(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Pt[1-u]]=e[er[u]]<=a.refContainer[er[u]]*.5?0:1-u===1?2:1}R(t,function(u,c){return R(u,function(h){xp(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function Pxt(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():i==null||i==="auto"?n=Pe(e.get("outerBounds",!0)||vU,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&ie("Invalid grid["+e.componentIndex+"].outerBoundsMode.");var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":$t(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&ie("Invalid grid["+e.componentIndex+"].outerBoundsContain."),o="all"):o=a;var s=[Ny(dt(e.get("outerBoundsClampWidth",!0),h0[0]),t.width),Ny(dt(e.get("outerBoundsClampHeight",!0),h0[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Rxt=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";wU(e,t,r,n,i,a),bh(e.nameLocation)||R(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&TU(s.labelInfoList,s.dirVec,n,i)})};function Nxt(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Oxt(r,e,t),r.seriesInvolved&&Fxt(r,e),r}function Oxt(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Cp(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(R(s.getAxes(),Bt(v,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&R(p.baseAxes,Bt(v,d?"cross":!0,f)),d&&R(p.otherAxes,Bt(v,"cross",!1))}function v(g,m,y){var _=y.model.getModel("axisPointer",i),x=_.get("show");if(!(!x||x==="auto"&&!g&&!mT(_))){m==null&&(m=_.get("triggerTooltip")),_=g?Bxt(y,h,i,t,g,m):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),w=Cp(y.model),C=m||b||y.type==="category",k=e.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:S,involveSeries:C,snap:b,useHandle:mT(_),seriesModels:[],linkGroup:null};u[w]=k,e.seriesInvolved=e.seriesInvolved||C;var T=$xt(a,y);if(T!=null){var A=o[T]||(o[T]={axesInfo:{}});A.axesInfo[w]=k,A.mapper=a[T].mapper,k.linkGroup=A}}}})}function Bxt(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(f){l[f]=_t(o.get(f))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&wt(u,h.textStyle)}}return e.model.getModel("axisPointer",new ne(l,r,n))}function Fxt(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(e.coordSysAxesInfo[Cp(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function $xt(e,t){for(var r=t.model,n=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(S1(a[n+"AxisId"],r.id)||S1(a[n+"AxisIndex"],r.componentIndex)||S1(a[n+"AxisName"],r.name))return i}}function S1(e,t){return e==="all"||nt(e)&&$t(e,t)>=0||e===t}function Vxt(e){var t=FA(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=mT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function FA(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Cp(e)]}function zxt(e){var t=FA(e);return t&&t.axisPointerModel}function mT(e){return!!e.get(["handle","show"])}function Cp(e){return e.type+"||"+e.id}var w1={},Iu=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.axisPointerClass&&Vxt(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=zxt(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&w1[r])throw new Error("axisPointer "+r+" exists");w1[r]=n},t.getAxisPointerClass=function(r){return r&&w1[r]},t.type="axis",t}(Ee),yT=qt();function MU(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,h=yT(e).splitAreaColors,f=pt(),d=0;if(h)for(var p=0;p<u.length;p++){var v=h.get(u[p].tickValue);if(v!=null){d=(v+(c-1)*p)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=nt(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),_=void 0,x=void 0,b=void 0,S=void 0;i.isHorizontal()?(_=g,x=l.y,b=y-_,S=l.height,g=_+b):(_=l.x,x=g,b=l.width,S=y-x,g=x+S);var w=u[p-1].tickValue;w!=null&&f.set(w,d),t.add(new Ut({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:b,height:S},style:wt({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%c}yT(e).splitAreaColors=f}}}function EU(e){yT(e).splitAreaColors=null}var Gxt=["splitArea","splitLine","minorSplitLine","breakArea"],IU=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!xp(r)){this._axisGroup.add(r.axis.axisBuilder.group),R(Gxt,function(l){r.get([l,"show"])&&Wxt[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Yp(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){EU(this)},t.type="cartesianAxis",t}(Iu),Wxt={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=nt(l)?l:[l];for(var h=n.coordinateSystem.getRect(),f=a.isHorizontal(),d=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=s.getLineStyle(),y=0;y<p.length;y++){var _=a.toGlobalCoord(p[y].coord);if(!(y===0&&!u||y===p.length-1&&!c)){var x=p[y].tickValue;f?(v[0]=_,v[1]=h.y,g[0]=_,g[1]=h.y+h.height):(v[0]=h.x,v[1]=_,g[0]=h.x+h.width,g[1]=_);var b=d++%l.length,S=new Qe({anid:x!=null?"line_"+x:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},style:wt({stroke:l[b]},m),silent:!0});gh(S.shape,m.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var h=[],f=[],d=s.getLineStyle(),p=0;p<c.length;p++)for(var v=0;v<c[p].length;v++){var g=a.toGlobalCoord(c[p][v].coord);u?(h[0]=g,h[1]=l.y,f[0]=g,f[1]=l.y+l.height):(h[0]=l.x,h[1]=g,f[0]=l.x+l.width,f[1]=g);var m=new Qe({anid:"minor_line_"+c[p][v].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:d,silent:!0});gh(m.shape,d.lineWidth),t.add(m)}},splitArea:function(e,t,r,n,i){MU(e,t,r,n)},breakArea:function(e,t,r,n,i){var a=iv(),o=r.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,r,n.coordinateSystem.getRect(),i)}},PU=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t}(IU),Hxt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=PU.type,r}return t.type="yAxis",t}(IU),jxt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new Ut({shape:r.coordinateSystem.getRect(),style:wt({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Ee),lN={offset:0};function RU(e){e.registerComponentView(jxt),e.registerComponentModel(Q_t),e.registerCoordinateSystem("cartesian2d",Lxt),wh(e,"x",hT,lN),wh(e,"y",hT,lN),e.registerComponentView(PU),e.registerComponentView(Hxt),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function Uxt(e,t){var r=e.coordinateSystem,n=r&&r.type,i=r&&r.getBaseAxis&&r.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=n==="cartesian2d"&&a==="ordinal"||n==="single",s=t.model.get("jitter")>0;return o&&s}var Yxt=qt();function uN(e,t,r,n){if(e instanceof yU){var i=e.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=e.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=e.scale.type==="ordinal"?e.getBandWidth():null;return o>0?s?NU(r,o,u,n):qxt(e,t,r,n,o,l):r}function NU(e,t,r,n){if(r===null)return e+(Math.random()-.5)*t;var i=r-n*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function qxt(e,t,r,n,i,a){var o=Yxt(e);o.items||(o.items=[]);var s=o.items,l=cN(s,t,r,n,i,a,1),u=cN(s,t,r,n,i,a,-1),c=Math.abs(l-r)<Math.abs(u-r)?l:u,h=e.scale.type==="ordinal"?e.getBandWidth():null,f=Math.abs(c-r);return f>i/2||h&&f>h/2-n?NU(r,i,h,n):(s.push({fixedCoord:t,floatCoord:c,r:n}),c)}function cN(e,t,r,n,i,a,o){for(var s=r,l=0;l<e.length;l++){var u=e[l],c=t-u.fixedCoord,h=s-u.floatCoord,f=c*c+h*h,d=n+u.r+a;if(f<d*d){var p=u.floatCoord+Math.sqrt(d*d-c*c)*o;if(Math.abs(p-r)>i/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p<s){s=p,l=-1;continue}}}return s}function Xxt(e){e.eachSeriesByType("scatter",function(t){var r=t.coordinateSystem;if(r&&(r.type==="cartesian2d"||r.type==="single")){var n=r.getBaseAxis?r.getBaseAxis():null,i=n&&Uxt(t,n);if(i){var a=t.getData();a.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=a.getItemLayout(o),h=a.getItemVisual(o,"symbolSize"),f=h instanceof Array?(h[1]+h[0])/2:h;if(s==="y"||s==="single"&&u){var d=uN(n,c[0],c[1],f/2);a.setItemLayout(o,[c[0],d])}else if(s==="x"||s==="single"&&!u){var d=uN(n,c[1],c[0],f/2);a.setItemLayout(o,[d,c[1]])}})}}})}function Zxt(e){Gt(RU),e.registerSeriesModel(q_t),e.registerChartView(J_t),e.registerLayout(nv("scatter"))}function Kxt(e){e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,Xxt)}function Jxt(e){e.eachSeriesByType("radar",function(t){var r=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();R(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=hN(c)?c:fN(i)})}),r.each(function(o){var s=Cu(n[o],function(l){return hN(l)})||fN(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function hN(e){return!isNaN(e[0])&&!isNaN(e[1])}function fN(e){return[e.cx,e.cy]}function Qxt(e){var t=e.polar;if(t){nt(t)||(t=[t]);var r=[];R(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],nt(e.radar)||(e.radar=[e.radar]),e.radar.push(n)):r.push(n)}),e.polar=r}R(e.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var tbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(f,d){var p=f.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var v=Zh(f.getItemVisual(d,"symbolSize")),g=nr(p,-1,-1,2,2),m=f.getItemVisual(d,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(f,d,p,v,g,m){p.removeAll();for(var y=0;y<d.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,f[y]?(_.setPosition(f[y]),Au[m?"initProps":"updateProps"](_,{x:d[y][0],y:d[y][1]},r,g)):_.setPosition(d[y]),p.add(_))}}function h(f){return at(f,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(f){var d=s.getItemLayout(f);if(d){var p=new Qr,v=new Gr,g={shape:{points:d}};p.shape.points=h(d),v.shape.points=h(d),Le(p,g,r,f),Le(v,g,r,f);var m=new yt,y=new yt;m.add(v),m.add(p),m.add(y),c(v.shape.points,d,y,s,f,!0),s.setItemGraphicEl(f,m)}}).update(function(f,d){var p=l.getItemGraphicEl(d),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(f)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,s,f,!1),gi(g),gi(v),se(v,y,r),se(g,y,r),s.setItemGraphicEl(f,p))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,d){var p=s.getItemModel(d),v=f.childAt(0),g=f.childAt(1),m=f.childAt(2),y=s.getItemVisual(d,"style"),_=y.fill;o.add(f),v.useStyle(wt(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),fr(v,p,"lineStyle"),fr(g,p,"areaStyle");var x=p.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,R(["emphasis","select","blur"],function(w){var C=p.getModel([w,"areaStyle"]),k=C.isEmpty()&&C.parentModel.isEmpty();g.ensureState(w).ignore=k&&b;var T=p.getModel([w,"lineStyle"]).getLineStyle();v.ensureState(w).style=T;var A=C.getAreaStyle();g.ensureState(w).style=A;var L=p.getModel([w,"itemStyle"]).getItemStyle();m.eachChild(function(D){D.ensureState(w).style=_t(L)})}),g.useStyle(wt(p.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var S=p.getModel("emphasis");m.eachChild(function(w){if(w instanceof Rr){var C=w.style;w.useStyle(et({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},y))}else w.useStyle(y),w.setColor(_),w.style.strokeNoScale=!0;var k=s.getStore().get(s.getDimensionIndex(w.__dimIdx),d);(k==null||isNaN(k))&&(k=""),Cr(w,dr(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:w.__dimIdx,defaultText:k,inheritColor:_,defaultOpacity:y.opacity})}),Ie(f,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(ye),ebt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return Qh(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=x8(this,r);return rr("section",{header:u,sortBlocks:!0,blocks:at(s,function(h){var f=a.get(a.mapDimension(h.dim),r);return rr("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:f,sortParam:f})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(at(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(Ae),Ff=mU.value;function Tg(e,t){return wt({show:t},e)}var rbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),f=this.get("triggerEvent"),d=at(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=wt({color:p.color},l));var g=zt(_t(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:v,triggerEvent:f},!1);if(lt(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else mt(c)&&(g.name=c(g.name,g));var y=new ne(g,null,this.ecModel);return ir(y,Qp.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:U.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:zt({lineStyle:{color:U.color.neutral20}},Ff.axisLine),axisLabel:Tg(Ff.axisLabel,!1),axisTick:Tg(Ff.axisTick,!1),splitLine:Tg(Ff.splitLine,!0),splitArea:Tg(Ff.splitArea,!0),indicator:[]},t}(Zt),nbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=at(a,function(s){var l=s.model.get("showName")?s.name:"",u=new vn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=nt(f)?f:[f],v=nt(d)?d:[d],g=[],m=[];function y(N,P,F){var O=F%P.length;return N[O]=N[O]||[],O}if(a==="circle")for(var _=i[0].getTicksCoords(),x=n.cx,b=n.cy,S=0;S<_.length;S++){if(c){var w=y(g,p,S);g[w].push(new Bo({shape:{cx:x,cy:b,r:_[S].coord}}))}if(h&&S<_.length-1){var w=y(m,v,S);m[w].push(new jp({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var C,k=at(i,function(N,P){var F=N.getTicksCoords();return C=C==null?F.length-1:Math.min(F.length-1,C),at(F,function(O){return n.coordToPoint(O.coord,P)})}),T=[],S=0;S<=C;S++){for(var A=[],L=0;L<i.length;L++)A.push(k[L][S]);if(A[0]?A.push(A[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+S),c){var w=y(g,p,S);g[w].push(new Gr({shape:{points:A}}))}if(h&&T){var w=y(m,v,S-1);m[w].push(new Qr({shape:{points:A.concat(T)}}))}T=A.slice().reverse()}var D=l.getLineStyle(),E=u.getAreaStyle();R(m,function(N,P){this.group.add(li(N,{style:wt({stroke:"none",fill:v[P%v.length]},E),silent:!0}))},this),R(g,function(N,P){this.group.add(li(N,{style:wt({fill:"none",stroke:p[P%p.length]},D),silent:!0}))},this)},t.type="radar",t}(Ee),ibt=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(ji),abt=function(){function e(t,r,n){this.dimensions=[],this._model=t,this._indicatorAxes=at(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new ibt(o,new Mo);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(t),r)},e.prototype.coordToPoint=function(t,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<o&&(s=c,l=u,o=h)}return[l,+(s&&s.coordToData(i))]},e.prototype.resize=function(t,r){var n=pr(t,r).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=st(i[0],n.width)+n.x,this.cy=st(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(lt(o)||ae(o))&&(o=[0,o]),this.r0=st(o[0],a),this.r=st(o[1],a),R(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,i=this._model;R(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();R(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Mo;o.setExtent(0,a),o.setInterval(1),R(n,function(s,l){DU(s.scale,s.model,o)})},e.prototype.convertToPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,r){var n=[];return t.eachComponent("radar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},e.dimensions=[],e}();function obt(e){e.registerCoordinateSystem("radar",abt),e.registerComponentModel(rbt),e.registerComponentView(nbt),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function sbt(e){Gt(obt),e.registerChartView(tbt),e.registerSeriesModel(ebt),e.registerLayout(Jxt),e.registerProcessor(Jh("radar")),e.registerPreprocessor(Qxt)}var $A=qt();function lbt(e,t,r){$A(e)[t]=r}function ubt(e,t,r){var n=$A(e),i=n[t];i===r&&(n[t]=null)}function dN(e,t){return!!$A(e)[t]}Fa({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ye);var cbt={axisPointer:1,tooltip:1,brush:1};function OU(e,t,r){var n=t.getComponentByElement(e.topTarget);if(!n||n===r||cbt.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===r)return!1;var a=pu(n),o=pu(r);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var Pu=function(e){q(t,e);function t(r){var n=e.call(this)||this;n._zr=r;var i=ut(n._mousedownHandler,n),a=ut(n._mousemoveHandler,n),o=ut(n._mouseupHandler,n),s=ut(n._mousewheelHandler,n),l=ut(n._pinchHandler,n);return n.enable=function(u,c){var h=c.zInfo,f=pu(h.component),d=f.z,p=f.zlevel,v={component:h.component,z:d,zlevel:p,z2:dt(h.z2,-1/0)},g=et({},c.triggerInfo);this._opt=wt(et({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:v,triggerInfo:g}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Vf(r,"mousedown",i,v),Vf(r,"mousemove",a,v),Vf(r,"mouseup",o,v)),(u===!0||u==="scale"||u==="zoom")&&(Vf(r,"mousewheel",s,v),Vf(r,"pinch",l,v)))},n.disable=function(){this._enabled=!1,zf(r,"mousedown",i),zf(r,"mousemove",a),zf(r,"mouseup",o),zf(r,"mousewheel",s),zf(r,"pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(r,n,i){var a=this._opt,o=a.zInfoParsed;if(OU(r,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(r,n,i)),u&&s.isInClip&&!s.isInClip(r,n,i)&&(u=!1),u},t.prototype._decideCursorStyle=function(r,n,i,a){var o=r.target;if(!o&&this._checkPointer(r,n,i))return"grab";if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(r){if(!(DE(r)||$f(r))){for(var n=r.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=r.offsetX,a=r.offsetY;this._checkPointer(r,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(r){var n=this._zr;if(!(r.gestureEvent==="pinch"||dN(n,"globalPan")||$f(r))){var i=r.offsetX,a=r.offsetY;if(!this._dragging||!Am("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&To(r.event),r.__ecRoamConsumed=!0,pN(this,"pan","moveOnMouseMove",r,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(r){if(!$f(r)){var n=this._zr;if(!DE(r)){this._dragging=!1;var i=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);i&&n.setCursorStyle(i)}}},t.prototype._mousewheelHandler=function(r){if(!$f(r)){var n=Am("zoomOnMouseWheel",r,this._opt),i=Am("moveOnMouseWheel",r,this._opt),a=r.wheelDelta,o=Math.abs(a),s=r.offsetX,l=r.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(dN(this._zr,"globalPan")||$f(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(To(a.event),a.__ecRoamConsumed=!0,pN(r,n,i,a,o))},t}(yi);function $f(e){return e.__ecRoamConsumed}var hbt=qt();function tx(e){var t=hbt(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Vf(e,t,r,n){for(var i=tx(e),a=i.roam,o=a[t]=a[t]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:r,zInfoParsed:n}),fbt(e,t)}function zf(e,t,r){for(var n=tx(e),i=n.roam[t]||[],a=0;a<i.length;a++)if(i[a].listener===r){i.splice(a,1),i.length||dbt(e,t);return}}function fbt(e,t){var r=tx(e);r.uniform[t]||e.on(t,r.uniform[t]=function(n){var i=r.roam[t];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function dbt(e,t){var r=tx(e),n=r.uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function pN(e,t,r,n,i){i.isAvailableBehavior=ut(Am,null,r,n),e.trigger(t,i)}function Am(e,t,r){var n=r[e];return!e||n&&(!lt(n)||t.event[n+"Key"])}function VA(e,t,r){var n=e.target;n.x+=t,n.y+=r,n.dirty()}function zA(e,t,r,n){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;o*=t,o=GA(o,a);var s=o/e.zoom;e.zoom=o,FU(i,r,n,s),i.dirty()}function BU(e,t,r,n,i,a){var o=new Ct(0,0,0,0);n.enable(e.get("roam"),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(u,c,h){return o.copy(r.getBoundingRect()),o.applyTransform(r.getComputedTransform()),o.contain(c,h)},isInClip:function(u,c,h){return!a||a.contain(c,h)}}}),i.zoomLimit=e.get("scaleLimit");var s=e.coordinateSystem;i.zoom=s?s.getZoom():1;var l=e.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){VA(i,u.dx,u.dy),t.dispatchAction({seriesId:e.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){zA(i,u.scale,u.originX,u.originY),t.dispatchAction({seriesId:e.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),t.updateLabelLayout()})}function vN(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function ex(e,t,r){var n=e.getZoom(),i=e.getCenter(),a=t.zoom,o=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,e.setCenter(vN(e,o))),a!=null&&(a=GA(n*a,r)/n,FU(e,t.originX,t.originY,a),e.updateTransform(),e.setCenter(vN(e,o)),e.setZoom(a*n)),{center:e.getCenter(),zoom:e.getZoom()}}function FU(e,t,r,n){e.x-=(t-e.x)*(n-1),e.y-=(r-e.y)*(n-1),e.scaleX*=n,e.scaleY*=n}function GA(e,t){if(t){var r=t.min||0,n=t.max||1/0;e=Math.max(Math.min(n,e),r)}return e}function $U(e){if(lt(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var C1,d0={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"},gN=te(d0),p0={"alignment-baseline":"textBaseline","stop-color":"stopColor"},mN=te(p0),pbt=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=$U(t);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var i=new yt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),On(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;mbt(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(o){var f=rx(o);f.length>=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=zU(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new yt,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Ut({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=C1[s];if(c&&ct(C1,s)){l=c.call(this,t,r);var h=t.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=yN[s];if(d&&ct(yN,s)){var p=d.call(this,t),v=t.getAttribute("id");v&&(this._defs[v]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},e.prototype._parseText=function(t,r){var n=new vh({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Jn(r,n),On(t,n,this._defsUsePending,!1,!1),vbt(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){C1={g:function(t,r){var n=new yt;return Jn(r,n),On(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new Ut;return Jn(r,n),On(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,r){var n=new Bo;return Jn(r,n),On(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,r){var n=new Qe;return Jn(r,n),On(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,r){var n=new F_;return Jn(r,n),On(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,r){var n=t.getAttribute("points"),i;n&&(i=bN(n));var a=new Qr({shape:{points:i||[]},silent:!0});return Jn(r,a),On(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=bN(n));var a=new Gr({shape:{points:i||[]},silent:!0});return Jn(r,a),On(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new Rr;return Jn(r,n),On(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,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new yt;return Jn(r,s),On(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new yt;return Jn(r,s),On(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=s6(n);return Jn(r,i),On(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),yN={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new Wh(t,r,n,i);return _N(e,a),xN(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new h6(t,r,n);return _N(e,i),xN(e,i),i}};function _N(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function xN(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};VU(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=En(o),u=l&&l[3];u&&(l[3]*=ps(s),o=wa(l,"rgba"))}t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Jn(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),wt(t.__inheritedStyle,e.__inheritedStyle))}function bN(e){for(var t=rx(e),r=[],n=0;n<t.length;n+=2){var i=parseFloat(t[n]),a=parseFloat(t[n+1]);r.push([i,a])}return r}function On(e,t,r,n,i){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};e.nodeType===1&&(xbt(e,t),VU(e,o,s),n||bbt(e,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=SN(a,"fill",o.fill,r)),o.stroke!=null&&(a.style.stroke=SN(a,"stroke",o.stroke,r)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=at(rx(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function vbt(e,t){var r=t.__selfStyle;if(r){var n=r.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),e.style.textBaseline=i}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),e.style.textAlign=s)}}var gbt=/^url\(\s*#(.*?)\)/;function SN(e,t,r,n){var i=r&&r.match(gbt);if(i){var a=ci(i[1]);n.push([e,t,a]);return}return r==="none"&&(r=null),r}function mbt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n[0].style[n[1]]=e[n[2]]}}var ybt=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function rx(e){return e.match(ybt)||[]}var _bt=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,T1=Math.PI/180;function xbt(e,t){var r=e.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=[],i=null;r.replace(_bt,function(h,f,d){return n.push(f,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=rx(o);switch(i=i||Ir(),s){case"translate":La(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Dk(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Os(i,i,-parseFloat(l[0])*T1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*T1);Sa(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*T1);Sa(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var wN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function VU(e,t,r){var n=e.getAttribute("style");if(n){wN.lastIndex=0;for(var i;(i=wN.exec(n))!=null;){var a=i[1],o=ct(d0,a)?d0[a]:null;o&&(t[o]=i[2]);var s=ct(p0,a)?p0[a]:null;s&&(r[s]=i[2])}}}function bbt(e,t,r){for(var n=0;n<gN.length;n++){var i=gN[n],a=e.getAttribute(i);a!=null&&(t[d0[i]]=a)}for(var n=0;n<mN.length;n++){var i=mN[n],a=e.getAttribute(i);a!=null&&(r[p0[i]]=a)}}function zU(e,t){var r=t.width/e.width,n=t.height/e.height,i=Math.min(r,n);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function Sbt(e,t){var r=new pbt;return r.parse(e,t)}var wbt=pt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Cbt=function(){function e(t,r){this.type="geoSVG",this._usedGraphicMap=pt(),this._freedGraphics=[],this._mapName=t,this._parsedXML=$U(r)}return e.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 r=kbt(t.named),n=r.regions,i=r.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(t){var r,n;try{r=t&&Sbt(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=r.root,ft(n!=null)}catch(g){throw new Error(`Invalid svg format
360
+ `+g.message)}var i=new yt;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=r.width,o=r.height,s=r.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,f=void 0;if(a!=null?(u=0,h=a):s&&(u=s.x,h=s.width),o!=null?(c=0,f=o):s&&(c=s.y,f=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,h=d.width),c==null&&(c=d.y,f=d.height)}l=this._boundingRect=new Ct(u,c,h,f)}if(s){var p=zU(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}i.setClipPath(new Ut({shape:l.plain()}));var v=[];return R(r.named,function(g){wbt.get(g.svgNodeTagLower)!=null&&(v.push(g),Tbt(g.el))}),{root:i,boundingRect:l,named:v}},e.prototype.useGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),r.set(t,n),n)},e.prototype.freeGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);n&&(r.removeKey(t),this._freedGraphics.push(n))},e}();function Tbt(e){e.silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1})}function kbt(e){var t=[],r=pt();return R(e,function(n){if(n.namedFrom==null){var i=new zyt(n.name,n.el);t.push(i),r.set(n.name,i)}}),{regions:t,regionsMap:r}}var _T=[126,25],CN="南海诸岛",xl=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var pl=0;pl<xl.length;pl++)for(var oc=0;oc<xl[pl].length;oc++)xl[pl][oc][0]/=10.5,xl[pl][oc][1]/=-10.5/.75,xl[pl][oc][0]+=_T[0],xl[pl][oc][1]+=_T[1];function Abt(e,t){if(e==="china"){for(var r=0;r<t.length;r++)if(t[r].name===CN)return;t.push(new wj(CN,at(xl,function(n){return{type:"polygon",exterior:n}}),_T))}}var Dbt={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Lbt(e,t){if(e==="china"){var r=Dbt[t.name];if(r){var n=t.getCenter();n[0]+=r[0]/10.5,n[1]+=-r[1]/(10.5/.75),t.setCenter(n)}}}var Mbt=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Ebt(e,t){e==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:Mbt[0]})}var Ibt="name",Pbt=function(){function e(t,r,n){this.type="geoJSON",this._parsedMap=pt(),this._mapName=t,this._specialAreas=n,this._geoJSON=Nbt(r)}return e.prototype.load=function(t,r){r=r||Ibt;var n=this._parsedMap.get(r);if(!n){var i=this._parseToRegions(r);n=this._parsedMap.set(r,{regions:i,boundingRect:Rbt(i)})}var a=pt(),o=[];return R(n.regions,function(s){var l=s.name;t&&ct(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Ct(0,0,0,0),regionsMap:a}},e.prototype._parseToRegions=function(t){var r=this._mapName,n=this._geoJSON,i;try{i=n?Wyt(n,t):[]}catch(a){throw new Error(`Invalid geoJson format
361
+ `+a.message)}return Abt(r,i),R(i,function(a){var o=a.name;Lbt(r,a),Ebt(r,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function Rbt(e){for(var t,r=0;r<e.length;r++){var n=e[r].getBoundingRect();t=t||n.clone(),t.union(n)}return t}function Nbt(e){return lt(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var Gf=pt();const Eo={registerMap:function(e,t,r){if(t.svg){var n=new Cbt(e,t.svg);Gf.set(e,n)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?r=t.specialAreas:i=t;var n=new Pbt(e,i,r);Gf.set(e,n)}},getGeoResource:function(e){return Gf.get(e)},getMapForUser:function(e){var t=Gf.get(e);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(e,t,r){var n=Gf.get(e);if(!n){process.env.NODE_ENV!=="production"&&console.error("Map "+e+" not exists. The GeoJSON of the map must be provided.");return}return n.load(t,r)}};var WA=["rect","circle","line","ellipse","polygon","polyline","path"],Obt=pt(WA),Bbt=pt(WA.concat(["g"])),Fbt=pt(WA.concat(["g"])),GU=qt();function kg(e){var t=e.getItemStyle(),r=e.get("areaColor");return r!=null&&(t.fill=r),t}function TN(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var WU=function(){function e(t){var r=this.group=new yt,n=this._transformGroup=new yt;r.add(n),this.uid=Uh("ec_map_draw"),this._controller=new Pu(t.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new yt),n.add(this._svgGroup=new yt)}return e.prototype.draw=function(t,r,n,i,a){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&r.eachComponent({mainType:"series",subType:"map"},function(_){!s&&_.getHostGeoModel()===t&&(s=_.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,h=l.getTransformInfo(),f=h.raw,d=h.roam,p=!u.childAt(0)||a,v=t.getShallow("clip",!0),g;v?(g=l.getViewRect().clone(),this.group.setClipPath(new Ut({shape:g.clone()}))):this.group.removeClipPath(),p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):se(c,d,t);var m=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,y={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:m,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(t,g,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=pt(),n=pt(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],v=!u&&l&&l.project,g=0;g<d.length;++g){var m=c(d[g],v);m&&p.push(m)}return p}function f(d){return{shape:{points:h(d)}}}i.removeAll(),R(t.geo.regions,function(d){var p=d.name,v=r.get(p),g=n.get(p)||{},m=g.dataIdx,y=g.regionModel;if(!v){v=r.set(p,new yt),i.add(v),m=s?s.indexOfName(p):null,y=t.isGeo?o.getRegionModel(p):s?s.getItemModel(m):null;var _=y.get("silent",!0);_!=null&&(v.silent=_),n.set(p,{dataIdx:m,regionModel:y})}var x=[],b=[];R(d.geometries,function(C){if(C.type==="polygon"){var k=[C.exterior].concat(C.interiors||[]);u&&(k=EN(k,u)),R(k,function(A){x.push(new Qr(f(A)))})}else{var T=C.points;u&&(T=EN(T,u,!0)),R(T,function(A){b.push(new Gr(f(A)))})}});var S=c(d.getCenter(),l&&l.project);function w(C,k){if(C.length){var T=new V_({culling:!0,segmentIgnoreThreshold:1,shape:{paths:C}});v.add(T),kN(t,T,m,y),AN(t,T,p,y,o,m,S),k&&(TN(T),R(T.states,TN))}}w(x),w(b,!0)}),r.each(function(d,p){var v=n.get(p),g=v.dataIdx,m=v.regionModel;DN(t,d,p,m,o,g),LN(t,d,p,m,o),MN(t,d,p,m,o)},this)},e.prototype._buildSVG=function(t){var r=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(r)&&(this._freeSVG(),this._useSVG(r));var i=this._svgDispatcherMap=pt(),a=!1;R(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,c=o.svgNodeTagLower,h=o.el,f=u?u.indexOfName(s):null,d=l.getRegionModel(s);Obt.get(c)!=null&&h instanceof vi&&kN(t,h,f,d),h instanceof vi&&(h.culling=!0);var p=d.get("silent",!0);if(p!=null&&(h.silent=p),h.z2EmphasisLift=0,!o.namedFrom&&(Fbt.get(c)!=null&&AN(t,h,s,d,l,f,null),DN(t,h,s,d,l,f),LN(t,h,s,d,l),Bbt.get(c)!=null)){var v=MN(t,h,s,d,l);v==="self"&&(a=!0);var g=i.get(s)||i.set(s,[]);g.push(h)}},this),this._enableBlurEntireSVG(a,t)},e.prototype._enableBlurEntireSVG=function(t,r){if(t&&r.isGeo){var n=r.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){fu(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(t,r){if(t==null)return[];var n=r.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(t);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},e.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},e.prototype._useSVG=function(t){var r=Eo.getGeoResource(t);if(r&&r.type==="geoSVG"){var n=r.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},e.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var r=Eo.getGeoResource(t);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(t,r,n,i){var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1,{api:i,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(c,h,f){return a.containPoint([h,f])},isInClip:function(c,h,f){return!r||r.contain(h,f)}}});var l=t.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=t.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,VA(s,c.dx,c.dy),i.dispatchAction(et(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,zA(s,c.scale,c.originX,c.originY),i.dispatchAction(et(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var r=t.getTextContent();r&&(r.ignore=GU(r).ignore)})},e.prototype._updateMapSelectHandler=function(t,r,n,i){var a=this;r.off("mousedown"),r.off("click"),t.get("selectedMode")&&(r.on("mousedown",function(){a._mouseDownFlag=!0}),r.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},e}();function kN(e,t,r,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=kg(i),u=kg(a),c=kg(s),h=kg(o),f=e.data;if(f){var d=f.getItemVisual(r,"style"),p=f.getItemVisual(r,"decal");e.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=yh(p,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=h,fu(t)}function AN(e,t,r,n,i,a,o){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var h=l?r:a,f=void 0;(!s||a>=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Cr(t,dr(n),{labelFetcher:f,labelDataIndex:h,defaultText:r},d);var p=t.getTextContent();if(p&&(GU(p).ignore=p.ignore,t.textConfig&&o)){var v=t.getBoundingRect().clone();t.textConfig.layoutRect=v,t.textConfig.position=[(o[0]-v.x)/v.width*100+"%",(o[1]-v.y)/v.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function DN(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):At(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function LN(e,t,r,n,i){e.data||Fo({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function MN(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Ie(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&Vdt(t,i,r),o}function EN(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(e,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!r&&s.polygonEnd(),n}var $bt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===r.id){var s=this._mapDraw;s&&o.add(s.group)}else if(r.needsDrawMap){var s=this._mapDraw||new WU(i);o.add(s.group),s.draw(r,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;r.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(r,n,i)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(r,n,i){var a=r.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,f=new Bo({style:{fill:r.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:Gh+1)});if(!h){var d=r.mainSeries.getData(),p=a.getName(l),v=d.indexOfName(p),g=a.getItemModel(l),m=g.getModel("label"),y=d.getItemGraphicEl(v);Cr(f,dr(g),{labelFetcher:{getFormattedLabel:function(_,x){return r.getFormattedLabel(v,x)}},defaultText:p}),f.disableLabelAnimation=!0,m.get("position")||f.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){$y(f,_)}}o.add(f)}}})},t.type="map",t}(ye),Vbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},r}return t.prototype.getInitialData=function(r){for(var n=Qh(this,{coordDimensions:["value"],encodeDefaulter:Bt(oA,this)}),i=pt(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=Eo.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return R(u.regions,function(c){var h=c.name,f=i.get(h),d=c.properties&&c.properties.echartsStyle,p;f==null?(p={name:h},a.push(p)):p=n.getRawDataItem(f),d&&zt(p,d)}),n.appendData(a),n},t.prototype.getHostGeoModel=function(){if(F6(this).kind!==ha.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(r){var n=this.getData();return n.get(n.mapDimension("value"),r)},t.prototype.getRegionModel=function(r){var n=this.getData();return n.getItemModel(n.indexOfName(r))},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData(),o=this.getRawValue(r),s=a.getName(r),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(s),f=a.mapDimension("value");isNaN(l[c].originalData.get(f,h))||u.push(l[c].name)}return rr("section",{header:u.join(", "),noHeader:!u.length,blocks:[rr("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.getLegendIcon=function(r){var n=r.icon||"roundRect",i=nr(n,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return i.setStyle(r.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=U.color.neutral00,i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:U.color.tertiary},itemStyle:{borderWidth:.5,borderColor:U.color.border,areaColor:U.color.background},emphasis:{label:{show:!0,color:U.color.primary},itemStyle:{areaColor:U.color.highlight}},select:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},nameProperty:"name"},t}(Ae);function zbt(e,t){var r={};return R(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c<u;c++)s=Math.min(s,r[a][c]),l=Math.max(l,r[a][c]),o+=r[a][c];var h;return t==="min"?h=s:t==="max"?h=l:t==="average"?h=o/u:h=o,u===0?NaN:h})}function Gbt(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getHostGeoModel(),i=n?"o"+n.id:"i"+r.getMapType();(t[i]=t[i]||[]).push(r)}),R(t,function(r,n){for(var i=zbt(at(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),a=0;a<r.length;a++)r[a].originalData=r[a].getData();for(var a=0;a<r.length;a++)r[a].seriesGroup=r,r[a].needsDrawMap=a===0&&!r[a].getHostGeoModel(),r[a].setData(i.cloneShallow()),r[a].mainSeries=r[0]})}function Wbt(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getMapType();if(!(r.getHostGeoModel()||t[n])){var i={};R(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&e.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),f=s.getRegion(h);if(!(!f||isNaN(u))){var d=i[h]||0,p=s.dataToPoint(f.getCenter());i[h]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});var a=r.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),t[n]=!0}})}var IN=qe,Ru=function(e){q(t,e);function t(r,n){var i=e.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new uo,i._rawTransformable=new uo,i.name=r,i._opt=n,i}return t.prototype.setBoundingRect=function(r,n,i,a){return this._rect=new Ct(r,n,i,a),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(r,n,i,a){this._transformTo(r,n,i,a),this._viewRect=new Ct(r,n,i,a)},t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Ct(r,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(r){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&r&&(r=[st(r[0],n.api.getWidth()),st(r[1],n.api.getWidth())]),this._centerOption=_t(r),this._updateCenterAndZoom()},t.prototype.setZoom=function(r){this._zoom=GA(r||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var r=this.getBoundingRect(),n=r.x+r.width/2,i=r.y+r.height/2;return[n,i]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var r=this._centerOption,n=this._rect;r&&n&&(this._center=[st(r[0],n.width,n.x),st(r[1],n.height,n.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=qe([],s,i),o=qe([],o,i),a.originX=s[0],a.originY=s[1],a.x=o[0]-s[0],a.y=o[1]-s[1],a.scaleX=a.scaleY=l,this._updateTransform()},t.prototype._updateTransform=function(){var r=this._roamTransformable,n=this._rawTransformable;n.parent=r,r.updateTransform(),n.updateTransform(),C_(this.transform||(this.transform=[]),n.transform||Ir()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Fi(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var r=this._rawTransformable,n=this._roamTransformable,i=new uo;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var r=this.getBoundingRect().clone();return r.applyTransform(this.transform),r},t.prototype.dataToPoint=function(r,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?IN(i,r,a):an(i,r)},t.prototype.pointToData=function(r,n,i){i=i||[];var a=this.invTransform;return a?IN(i,r,a):(i[0]=r[0],i[1]=r[1],i)},t.prototype.convertToPixel=function(r,n,i){var a=PN(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=PN(n);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(r){return this.getViewRectAfterRoam().contain(r[0],r[1])},t.dimensions=["x","y"],t}(uo);function PN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var Hbt={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},HU=["lng","lat"],xT=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,{api:i.api,ecModel:i.ecModel})||this;a.dimensions=HU,a.type="geo",a._nameCoordMap=pt(),a.map=n;var o=i.projection,s=Eo.load(n,i.nameMap,i.nameProperty),l=Eo.getGeoResource(n),u=a.resourceType=l?l.type:null,c=a.regions=s.regions,h=Hbt[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,process.env.NODE_ENV!=="production"&&o&&(u==="geoSVG"&&(process.env.NODE_ENV!=="production"&&Ne("Map "+n+" with SVG source can't use projection. Only GeoJSON source supports projection."),o=null),o.project&&o.unproject||(process.env.NODE_ENV!=="production"&&Ne("project and unproject must be both provided in the projeciton."),o=null)),a.projection=o;var f;if(o)for(var d=0;d<c.length;d++){var p=c[d].getBoundingRect(o);f=f||p.clone(),f.union(p)}else f=s.boundingRect;return a.setBoundingRect(f.x,f.y,f.width,f.height),a.aspectScale=o?1:dt(i.aspectScale,h.aspectScale),a._invertLongitute=o?!1:h.invertLongitute,a}return t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Ct(r,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(r){return this._regionsMap.get(r)},t.prototype.getRegionByCoord=function(r){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(r))return n[i]}},t.prototype.addGeoCoord=function(r,n){this._nameCoordMap.set(r,n)},t.prototype.getGeoCoord=function(r){var n=this._regionsMap.get(r);return this._nameCoordMap.get(r)||n&&n.getCenter()},t.prototype.dataToPoint=function(r,n,i){if(lt(r)&&(r=this.getGeoCoord(r)),r){var a=this.projection;return a&&(r=a.project(r)),r&&this.projectedToPoint(r,n,i)}},t.prototype.pointToData=function(r,n,i){var a=this.projection;return a&&(r=a.unproject(r)),r&&this.pointToProjected(r,i)},t.prototype.pointToProjected=function(r,n){return e.prototype.pointToData.call(this,r,0,n)},t.prototype.projectedToPoint=function(r,n,i){return e.prototype.dataToPoint.call(this,r,n,i)},t.prototype.convertToPixel=function(r,n,i){var a=RN(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=RN(n);return a===this?a.pointToData(i):null},t}(Ru);ir(xT,Ru);function RN(e){var t=e.geoModel,r=e.seriesModel;return t?t.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",Ge).models[0]||{}).coordinateSystem:null}function NN(e,t){var r=e.get("boundingCoords");if(r!=null){var n=r[0],i=r[1];if(!(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])))process.env.NODE_ENV!=="production"&&console.error("Invalid boundingCoords");else{var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(b,S,w,C){for(var k=w-b,T=C-S,A=0;A<=100;A++){var L=A/100,D=a.project([b+k*L,S+T*L]);is(n,n,D),as(i,i,D)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var h=this.getBoundingRect(),f=e.get("layoutCenter"),d=e.get("layoutSize"),p=pr(e,t).refContainer,v=h.width/h.height*this.aspectScale,g=!1,m,y;f&&d&&(m=[st(f[0],p.width)+p.x,st(f[1],p.height)+p.y],y=st(d,Math.min(p.width,p.height)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(y)?g=!0:process.env.NODE_ENV!=="production"&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var _;if(g)_={},v>1?(_.width=y,_.height=y/v):(_.height=y,_.width=y*v),_.y=m[1]-_.height/2,_.x=m[0]-_.width/2;else{var x=e.getBoxLayoutParams();x.aspect=v,_=Pe(x,p),_=W6(e,_,v)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function jbt(e,t){R(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var Ubt=function(){function e(){this.dimensions=HU}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new xT(l+s,l,et({nameMap:o.get("nameMap"),api:r,ecModel:t},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=NN,u.resize(o,r)}),t.eachSeries(function(o){Zp({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Ge).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=at(o,function(c){return c.get("nameMap")}),u=new xT(s,s,et({nameMap:Ck(l),api:r,ecModel:t},i(o[0])));u.zoomLimit=lr.apply(null,at(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=NN,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,jbt(u,c)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=pt(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Eo.load(r,n,i);return R(l.regions,function(u){var c=u.name,h=o.get(c),f=u.properties&&u.properties.echartsStyle;h||(h={name:c},a.push(h)),f&&zt(h,f)}),a},e}(),jU=new Ubt,Ybt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i);var a=Eo.getGeoResource(r.map);if(a&&a.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||U.color.backgroundTint)}uu(r,"label",["show"])},t.prototype.optionUpdated=function(){var r=this,n=this.option;n.regions=jU.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=Da(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new ne(o,r,r.ecModel)),o.selected&&(i[s]=!0)),a},pt()),n.selectedMap||(n.selectedMap=i)},t.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new ne(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(r,n){var i=this.getRegionModel(r),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:r};if(mt(a))return o.status=n,a(o);if(lt(a))return a.replace("{a}",r??"")},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.select=function(r){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[r]=!0}},t.prototype.unSelect=function(r){var n=this.option.selectedMap;n&&(n[r]=!1)},t.prototype.toggleSelected=function(r){this[this.isSelected(r)?"unSelect":"select"](r)},t.prototype.isSelected=function(r){var n=this.option.selectedMap;return!!(n&&n[r])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:U.color.tertiary},itemStyle:{borderWidth:.5,borderColor:U.color.border},emphasis:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},select:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},regions:[]},t}(Zt),qbt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.focusBlurEnabled=!0,r}return t.prototype.init=function(r,n){this._api=n},t.prototype.render=function(r,n,i,a){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new WU(i));var o=this._mapDraw;o.draw(r,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,n,i)},t.prototype._handleRegionClick=function(r){var n;Fl(r.target,function(i){return(n=At(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},t.prototype.updateSelectStatus=function(r,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=At(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(r){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(r,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Ee);function Xbt(e,t,r){Eo.registerMap(e,t,r)}function UU(e){e.registerCoordinateSystem("geo",jU),e.registerComponentModel(Ybt),e.registerComponentView(qbt),e.registerImpl("registerMap",Xbt),e.registerImpl("getMap",function(r){return Eo.getMapForUser(r)});function t(r,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[r](i.name);var u=l.coordinateSystem;R(u.regions,function(h){o[h.name]=l.isSelected(h.name)||!1});var c=[];R(o,function(h,f){o[f]&&c.push(f)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(r,n,i){var a=r.componentType;a||(r.geoId!=null?a="geo":r.seriesId!=null&&(a="series")),a||(a="series"),n.eachComponent({mainType:a,query:r},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=ex(s,r,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&R(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Zbt(e){Gt(UU),e.registerChartView($bt),e.registerSeriesModel(Vbt),e.registerLayout(Wbt),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Gbt),I8("map",e.registerAction)}function Kbt(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var r=[t],n,i;n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Jbt(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){t1t(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=e1t(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function Qbt(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function ON(e){return arguments.length?e:i1t}function yd(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function t1t(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function e1t(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=k1(s),a=A1(a),s&&a;){i=k1(i),o=A1(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(n1t(r1t(s,e,r),e,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!k1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!A1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=e)}return r}function k1(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function A1(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function r1t(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function n1t(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function i1t(e,t){return e.parentNode===t.parentNode?1:2}var a1t=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),o1t=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new a1t},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=st(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var v=i[p];r.moveTo(v[0],v[1]),d[c]=v[c],r.lineTo(d[0],d[1])}},t}(Kt),s1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new yt,r}return t.prototype.init=function(r,n){this._controller=new Pu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=r.getData(),o=r.layoutInfo,s=this._mainGroup,l=r.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(r,i),this._updateController(r,null,n,i);var u=this._data;a.diff(u).add(function(c){BN(a,c)&&FN(a,c,null,s,r)}).update(function(c,h){var f=u.getItemGraphicEl(h);if(!BN(a,c)){f&&VN(u,h,f,s,r);return}FN(a,c,f,s,r)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&VN(u,c,h,s,r)}).execute(),this._nodeScaleRatio=r.get("nodeScaleRatio"),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:h})})}),this._data=a},t.prototype._updateViewCoordSys=function(r,n){var i=r.getData(),a=[];i.each(function(h){var f=i.getItemLayout(h);f&&!isNaN(f.x)&&!isNaN(f.y)&&a.push([+f.x,+f.y])});var o=[],s=[];P_(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=r.coordinateSystem=new Ru(null,{api:n,ecModel:r.ecModel});c.zoomLimit=r.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(r.get("center")),c.setZoom(r.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(r,n,i,a){var o=this;BU(r,a,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(r)})},t.prototype._updateNodeAndLinkScale=function(r){var n=r.getData(),i=this._getNodeGlobalScale(r);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(r){var n=r.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(ye);function BN(e,t){var r=e.getItemLayout(t);return r&&!isNaN(r.x)&&!isNaN(r.y)}function FN(e,t,r,n,i){var a=!r,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:U.color.neutral00,c=e.tree.root,h=o.parentNode===c?o:o.parentNode||o,f=e.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:d,v=o.getLayout();a?(r=new tv(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.x=p.x,r.y=p.y):r.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=v.rawX,r.__radialRawY=v.rawY,n.add(r),e.setItemGraphicEl(t,r),r.__oldX=r.x,r.__oldY=r.y,se(r,{x:v.x,y:v.y},i);var g=r.getSymbolPath();if(i.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,x=void 0,b=void 0;if(v.x===y.x&&o.isExpand===!0&&m.children.length){var S={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};x=Math.atan2(S.y-y.y,S.x-y.x),x<0&&(x=Math.PI*2+x),b=S.x<y.x,b&&(x=x-Math.PI)}else x=Math.atan2(v.y-y.y,v.x-y.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=v.x<y.x,b&&(x=x-Math.PI)):(b=v.x>y.x,b||(x=x-Math.PI));var w=b?"left":"right",C=s.getModel("label"),k=C.get("rotate"),T=k*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:C.get("position")||w,rotation:k==null?-x:T,origin:"center"}),A.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),D=L==="relative"?ap(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;D&&(At(r).focus=D),l1t(i,o,c,r,p,d,v,n),r.__edge&&(r.onHoverStateChange=function(E){if(E!=="blur"){var N=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);N&&N.hoverState===Hp||$y(r.__edge,E)}})}function l1t(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),h=e.getOrient(),f=e.get(["lineStyle","curveness"]),d=e.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(v||(v=n.__edge=new Up({shape:bT(c,h,f,i,i)})),se(v,{shape:bT(c,h,f,a,o)},e));else if(u==="polyline"){if(c==="orthogonal"){if(t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}v||(v=n.__edge=new o1t({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:d}})),se(v,{shape:{parentPoint:[o.x,o.y],childPoints:m}},e)}}else if(process.env.NODE_ENV!=="production")throw new Error("The polyline edgeShape can only be used in orthogonal layout")}v&&!(u==="polyline"&&!t.isExpand)&&(v.useStyle(wt({strokeNoScale:!0,fill:null},p)),fr(v,l,"lineStyle"),fu(v),s.add(v))}function $N(e,t,r,n,i){var a=t.tree.root,o=YU(a,e),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(e.dataIndex);if(u){var c=t.getItemGraphicEl(s.dataIndex),h=c.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),d=n.get("edgeShape"),p=n.get("layout"),v=n.get("orient"),g=n.get(["lineStyle","curveness"]);f&&(d==="curve"?ks(f,{shape:bT(p,v,g,l,l),style:{opacity:0}},n,{cb:function(){r.remove(f)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&ks(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){r.remove(f)},removeOpt:i}))}}function YU(e,t){for(var r=t.parentNode===e?t:t.parentNode||t,n;n=r.getLayout(),n==null;)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function VN(e,t,r,n,i){var a=e.tree.getNodeByDataIndex(t),o=e.tree.root,s=YU(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};ks(r,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(r),e.setItemGraphicEl(t,null)},removeOpt:l}),r.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){$N(u,e,n,i,l)}),$N(a,e,n,i,l)}function bT(e,t,r,n,i){var a,o,s,l,u,c,h,f;if(e==="radial"){u=n.rawX,h=n.rawY,c=i.rawX,f=i.rawY;var d=yd(u,h),p=yd(u,h+(f-h)*r),v=yd(c,f+(h-f)*r),g=yd(c,f);return{x1:d.x||0,y1:d.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=n.x,h=n.y,c=i.x,f=i.y,(t==="LR"||t==="RL")&&(a=u+(c-u)*r,o=h,s=c+(u-c)*r,l=f),(t==="TB"||t==="BT")&&(a=u,o=h+(f-h)*r,s=c,l=f+(h-f)*r);return{x1:u,y1:h,x2:c,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var fi=qt();function qU(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,XU(t,r,e),R(r,function(n){R(t.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,Bt(u1t,e))})}),t.wrapMethod("cloneShallow",Bt(h1t,e)),R(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Bt(c1t,e))}),ft(r[t.dataType]===t)}function u1t(e,t){if(p1t(this)){var r=et({},fi(this).datas);r[this.dataType]=t,XU(t,r,e)}else HA(t,this.dataType,fi(this).mainData,e);return t}function c1t(e,t){return e.struct&&e.struct.update(),t}function h1t(e,t){return R(fi(t).datas,function(r,n){r!==t&&HA(r.cloneShallow(),n,t,e)}),t}function f1t(e){var t=fi(this).mainData;return e==null||t==null?t:fi(t).datas[e]}function d1t(){var e=fi(this).mainData;return e==null?[{data:e}]:at(te(fi(e).datas),function(t){return{type:t,data:fi(e).datas[t]}})}function p1t(e){return fi(e).mainData===e}function XU(e,t,r){fi(e).datas={},R(t,function(n,i){HA(n,i,e,r)})}function HA(e,t,r,n){fi(r).datas[t]=e,fi(e).mainData=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=f1t,e.getLinkedDataAll=d1t}var v1t=function(){function e(t,r){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=r}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(t,r,n){mt(t)&&(n=r,r=t,t=null),t=t||{},lt(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=r.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,r,n);i==="postorder"&&r.call(n,this)},e.prototype.updateDepthAndHeight=function(t){var r=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>r&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].getNodeById(t);if(a)return a}},e.prototype.contains=function(t){if(t===this)return!0;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].contains(t);if(a)return a}},e.prototype.getAncestors=function(t){for(var r=[],n=t?this:this.parentNode;n;)r.push(n),n=n.parentNode;return r.reverse(),r},e.prototype.getAncestorsIndices=function(){for(var t=[],r=this;r;)t.push(r.dataIndex),r=r.parentNode;return t.reverse(),t},e.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(r){t.push(r.dataIndex)}),t},e.prototype.getValue=function(t){var r=this.hostTree.data;return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},e.prototype.setLayout=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r<t.length;++r)if(t[r]===this)return r;return-1}return-1},e.prototype.isAncestorOf=function(t){for(var r=t.parentNode;r;){if(r===this)return!0;r=r.parentNode}return!1},e.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},e}(),jA=function(){function e(t){this.type="tree",this._nodes=[],this.hostModel=t}return e.prototype.eachNode=function(t,r,n){this.root.eachNode(t,r,n)},e.prototype.getNodeByDataIndex=function(t){var r=this.data.getRawIndex(t);return this._nodes[r]},e.prototype.getNodeById=function(t){return this.root.getNodeById(t)},e.prototype.update=function(){for(var t=this.data,r=this._nodes,n=0,i=r.length;n<i;n++)r[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)r[t.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,r,n){var i=new e(r),a=[],o=1;s(t);function s(c,h){var f=c.value;o=Math.max(o,nt(f)?f.length:1),a.push(c);var d=new v1t(ur(c.name,""),i);h?g1t(d,h):i.root=d,i._nodes.push(d);var p=c.children;if(p)for(var v=0;v<p.length;v++)s(p[v],d)}i.root.updateDepthAndHeight(0);var l=Jp(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new pn(l,r);return u.initData(a),n&&n(u),qU({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},e}();function g1t(e,t){var r=t.children;e.parentNode!==t&&(r.push(e),e.parentNode=t)}function Tp(e,t,r){if(e&&$t(t,e.type)>=0){var n=r.getData().tree.root,i=e.targetNode;if(lt(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function ZU(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function UA(e,t){var r=ZU(e);return $t(r,t)>=0}function nx(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var m1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new ne(i,this,this.ecModel),o=jA.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return rr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=nx(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.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:U.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Ae);function y1t(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)t(a,r)}function Wf(e,t){for(var r=[e],n;n=r.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)r.push(i[a])}}function _1t(e,t){e.eachSeriesByType("tree",function(r){x1t(r,t)})}function x1t(e,t){var r=pr(e,t).refContainer,n=Pe(e.getBoxLayoutParams(),r);e.layoutInfo=n;var i=e.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=ON(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(a=n.width,o=n.height,s=ON());var l=e.getData().tree.root,u=l.children[0];if(u){Kbt(l),y1t(u,Jbt,s),l.hierNode.modifier=-u.hierNode.prelim,Wf(u,Qbt);var c=u,h=u,f=u;Wf(u,function(x){var b=x.getLayout().x;b<c.getLayout().x&&(c=x),b>h.getLayout().x&&(h=x),x.depth>f.depth&&(f=x)});var d=c===h?1:s(c,h)/2,p=d-c.getLayout().x,v=0,g=0,m=0,y=0;if(i==="radial")v=a/(h.getLayout().x+d+p),g=o/(f.depth-1||1),Wf(u,function(x){m=(x.getLayout().x+p)*v,y=(x.depth-1)*g;var b=yd(m,y);x.setLayout({x:b.x,y:b.y,rawX:m,rawY:y},!0)});else{var _=e.getOrient();_==="RL"||_==="LR"?(g=o/(h.getLayout().x+d+p),v=a/(f.depth-1||1),Wf(u,function(x){y=(x.getLayout().x+p)*g,m=_==="LR"?(x.depth-1)*v:a-(x.depth-1)*v,x.setLayout({x:m,y},!0)})):(_==="TB"||_==="BT")&&(v=a/(h.getLayout().x+d+p),g=o/(f.depth-1||1),Wf(u,function(x){m=(x.getLayout().x+p)*v,y=_==="TB"?(x.depth-1)*g:o-(x.depth-1)*g,x.setLayout({x:m,y},!0)}))}}}function b1t(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");et(s,o)})})}function S1t(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=ex(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function w1t(e){e.registerChartView(s1t),e.registerSeriesModel(m1t),e.registerLayout(_1t),e.registerVisual(b1t),S1t(e)}var zN=["treemapZoomToNode","treemapRender","treemapMove"];function C1t(e){for(var t=0;t<zN.length;t++)e.registerAction({type:zN[t],update:"updateView"},Ye);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,n){n.eachComponent({mainType:"series",subType:"treemap",query:r},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Tp(r,s,a);if(l){var u=a.getViewRoot();u&&(r.direction=UA(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function KU(e){var t=e.getData(),r=t.tree,n={};r.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=VC(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var T1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};JU(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new ne({itemStyle:o},this,n);a=r.levels=k1t(a,n);var l=at(a||[],function(h){return new ne(h,s,n)},this),u=jA.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),v=p?l[p.depth]:null;return f.parentModel=v||s,f})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return rr("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=nx(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},et(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=pt(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){KU(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:U.size.l,top:U.size.xxxl,right:U.size.l,bottom:U.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,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:U.size.m,emptyItemWidth:25,itemStyle:{color:U.color.backgroundShade,textStyle:{color:U.color.secondary}},emphasis:{itemStyle:{color:U.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:U.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:U.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:[]},t}(Ae);function JU(e){var t=0;R(e.children,function(n){JU(n);var i=n.value;nt(i)&&(i=i[0]),t+=i});var r=e.value;nt(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),nt(e.value)?e.value[0]=r:e.value=r}function k1t(e,t){var r=xe(t.get("color")),n=xe(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;R(e,function(s){var l=new ne(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var A1t=8,GN=8,D1=5,D1t=function(){function e(t){this.group=new yt,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h=pr(t,r).refContainer,f={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=Pe(f,h);this._prepare(n,d,u),this._renderContent(t,d,p,s,l,u,c,i),j_(o,f,h)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=ur(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+A1t*2,r.emptyItemWidth);r.totalWidth+=s+GN,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,h=t.get(["breadcrumb","height"]),f=r.totalWidth,d=r.renderList,p=a.getModel("itemStyle").getItemStyle(),v=d.length-1;v>=0;v--){var g=d[v],m=g.node,y=g.width,_=g.text;f>n.width&&(f-=y-c,y=c,_=null);var x=new Qr({shape:{points:L1t(u,0,y,h,v===d.length-1,v===0)},style:wt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new oe({style:Te(o,{text:_})}),textConfig:{position:"inside"},z2:Gh*1e4,onclick:Bt(l,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Te(s,{text:_}),x.ensureState("emphasis").style=p,Ie(x,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(x),M1t(x,t,m),u+=y+GN}},e.prototype.remove=function(){this.group.removeAll()},e}();function L1t(e,t,r,n,i,a){var o=[[i?e:e-D1,t],[e+r,t],[e+r,t+n],[i?e:e-D1,t+n]];return!a&&o.splice(2,0,[e+r+D1,t+n/2]),!i&&o.push([e,t+n/2]),o}function M1t(e,t,r){At(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&nx(r,t)}}var E1t=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function I1t(){return new E1t}var ST=yt,WN=Ut,HN=3,jN="label",UN="upperLabel",P1t=Gh*10,R1t=Gh*2,N1t=Gh*3,bl=hu([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),YN=function(e){var t=bl(e);return t.stroke=t.fill=t.lineWidth=null,t},v0=qt(),O1t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._state="ready",r._storage=Hf(),r}return t.prototype.render=function(r,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!($t(o,r)<0)){this.seriesModel=r,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Tp(a,s,r),u=a&&a.type,c=r.layoutInfo,h=!this._oldTree,f=this._storage,d=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),v=r.get("animation"),g=this._doRender(p,r,d);v&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,r,d):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(r,i,l)}},t.prototype._giveContainerGroup=function(r){var n=this._containerGroup;return n||(n=this._containerGroup=new ST,this._initEvents(n),this.group.add(n)),n.x=r.x,n.y=r.y,n},t.prototype._doRender=function(r,n,i){var a=n.getData().tree,o=this._oldTree,s=Hf(),l=Hf(),u=this._storage,c=[];function h(y,_,x,b){return B1t(n,l,u,i,s,c,y,_,x,b)}v(a.root?[a.root]:[],o&&o.root?[o.root]:[],r,a===o||!o,0);var f=g(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:m};function v(y,_,x,b,S){b?(_=y,R(y,function(k,T){!k.isRemoved()&&C(T,T)})):new Lo(_,y,w,w).add(C).update(C).remove(Bt(C,null)).execute();function w(k){return k.getId()}function C(k,T){var A=k!=null?y[k]:null,L=T!=null?_[T]:null,D=h(A,L,x,S);D&&v(A&&A.viewChildren||[],L&&L.viewChildren||[],D,b,S+1)}}function g(y){var _=Hf();return y&&R(y,function(x,b){var S=_[b];R(x,function(w){w&&(S.push(w),v0(w).willDelete=!0)})}),_}function m(){R(f,function(y){R(y,function(_){_.parent&&_.parent.remove(_)})}),R(c,function(y){y.invisible=!0,y.dirty()})}},t.prototype._doAnimation=function(r,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(mt(o)?0:o)||0,u=(mt(s)?null:s)||"cubicOut",c=I1t();R(n.willDeleteEls,function(h,f){R(h,function(d,p){if(!d.invisible){var v=d.parent,g,m=v0(v);if(a&&a.direction==="drillDown")g=v===a.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=f==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(d,g,l,0,u)}})}),R(this._storage,function(h,f){R(h,function(d,p){var v=n.lastsForAnimation[f][p],g={};v&&(d instanceof yt?v.oldX!=null&&(g.x=d.x,g.y=d.y,d.x=v.oldX,d.y=v.oldY):(v.oldShape&&(g.shape=et({},d.shape),d.setShape(v.oldShape)),v.fadein?(d.setStyle("opacity",0),g.style={opacity:1}):d.style.opacity!==1&&(g.style={opacity:1})),c.add(d,g,l,0,u))})},this),this._state="animating",c.finished(ut(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(r){var n=this,i=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new Pu(r.getZr()),i.on("pan",ut(this._onPan,this)),i.on("zoom",ut(this._onZoom,this))),i.enable(o.get("roam"),{api:r,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},t.prototype._clearController=function(){var r=this._controller;this._controllerHost=null,r&&(r.dispose(),r=null)},t.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>HN||Math.abs(r.dy)>HN)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ct(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var v=this.seriesModel.layoutInfo;n-=v.x,i-=v.y;var g=Ir();La(g,g,[-n,-i]),Dk(g,g,[p,p]),La(g,g,[n,i]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Wy(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new D1t(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(UA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Hf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(ye);function Hf(){return{nodeGroup:[],background:[],content:[]}}function B1t(e,t,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=e.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,v=c.borderWidth,g=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,x=c.upperHeight,b=_&&_.length,S=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),C=f.getModel(["blur","itemStyle"]),k=f.getModel(["select","itemStyle"]),T=S.get("borderRadius")||0,A=W("nodeGroup",ST);if(!A)return;if(l.add(A),A.x=c.x||0,A.y=c.y||0,A.markRedraw(),v0(A).nodeWidth=d,v0(A).nodeHeight=p,c.isAboveViewRoot)return A;var L=W("background",WN,u,R1t);L&&V(A,L,b&&c.upperLabelHeight);var D=f.getModel("emphasis"),E=D.get("focus"),N=D.get("blurScope"),P=D.get("disabled"),F=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():E;if(b)Ts(A)&&Ol(A,!1),L&&(Ol(L,!P),h.setItemGraphicEl(o.dataIndex,L),kC(L,F,N));else{var O=W("content",WN,u,N1t);O&&I(A,O),L.disableMorphing=!0,L&&Ts(L)&&Ol(L,!1),Ol(A,!P),h.setItemGraphicEl(o.dataIndex,A);var $=f.getShallow("cursor");$&&O.attr("cursor",$),kC(A,F,N)}return A;function V(tt,it,X){var rt=At(it);if(rt.dataIndex=o.dataIndex,rt.seriesIndex=e.seriesIndex,it.setShape({x:0,y:0,width:d,height:p,r:T}),g)B(it);else{it.invisible=!1;var Z=o.getVisual("style"),vt=Z.stroke,kt=YN(S);kt.fill=vt;var Wt=bl(w);Wt.fill=w.get("borderColor");var Ht=bl(C);Ht.fill=C.get("borderColor");var ue=bl(k);if(ue.fill=k.get("borderColor"),X){var Fe=d-2*v;G(it,vt,Z.opacity,{x:v,y:0,width:Fe,height:x})}else it.removeTextContent();it.setStyle(kt),it.ensureState("emphasis").style=Wt,it.ensureState("blur").style=Ht,it.ensureState("select").style=ue,fu(it)}tt.add(it)}function I(tt,it){var X=At(it);X.dataIndex=o.dataIndex,X.seriesIndex=e.seriesIndex;var rt=Math.max(d-2*v,0),Z=Math.max(p-2*v,0);if(it.culling=!0,it.setShape({x:v,y:v,width:rt,height:Z,r:T}),g)B(it);else{it.invisible=!1;var vt=o.getVisual("style"),kt=vt.fill,Wt=YN(S);Wt.fill=kt,Wt.decal=vt.decal;var Ht=bl(w),ue=bl(C),Fe=bl(k);G(it,kt,vt.opacity,null),it.setStyle(Wt),it.ensureState("emphasis").style=Ht,it.ensureState("blur").style=ue,it.ensureState("select").style=Fe,fu(it)}tt.add(it)}function B(tt){!tt.invisible&&a.push(tt)}function G(tt,it,X,rt){var Z=f.getModel(rt?UN:jN),vt=ur(f.get("name"),null),kt=Z.getShallow("show");Cr(tt,dr(f,rt?UN:jN),{defaultText:kt?vt:null,inheritColor:it,defaultOpacity:X,labelFetcher:e,labelDataIndex:o.dataIndex});var Wt=tt.getTextContent();if(Wt){var Ht=Wt.style,ue=b_(Ht.padding||0);rt&&(tt.setTextConfig({layoutRect:rt}),Wt.disableLabelLayout=!0),Wt.beforeUpdate=function(){var We=Math.max((rt?rt.width:tt.shape.width)-ue[1]-ue[3],0),Tr=Math.max((rt?rt.height:tt.shape.height)-ue[0]-ue[2],0);(Ht.width!==We||Ht.height!==Tr)&&Wt.setStyle({width:We,height:Tr})},Ht.truncateMinChar=2,Ht.lineOverflow="truncate",H(Ht,rt,c);var Fe=Wt.getState("emphasis");H(Fe?Fe.style:null,rt,c)}}function H(tt,it,X){var rt=tt?tt.text:null;if(!it&&X.isLeafRoot&&rt!=null){var Z=e.get("drillDownIcon",!0);tt.text=Z?Z+" "+rt:rt}}function W(tt,it,X,rt){var Z=y!=null&&r[tt][y],vt=i[tt];return Z?(r[tt][y]=null,J(vt,Z)):g||(Z=new it,Z instanceof vi&&(Z.z2=F1t(X,rt)),Q(vt,Z)),t[tt][m]=Z}function J(tt,it){var X=tt[m]={};it instanceof ST?(X.oldX=it.x,X.oldY=it.y):X.oldShape=et({},it.shape)}function Q(tt,it){var X=tt[m]={},rt=o.parentNode,Z=it instanceof yt;if(rt&&(!n||n.direction==="drillDown")){var vt=0,kt=0,Wt=i.background[rt.getRawIndex()];!n&&Wt&&Wt.oldShape&&(vt=Wt.oldShape.width,kt=Wt.oldShape.height),Z?(X.oldX=0,X.oldY=kt):X.oldShape={x:vt,y:kt,width:0,height:0}}X.fadein=!Z}}function F1t(e,t){return e*P1t+t}var kp=R,$1t=xt,g0=-1,wr=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=_t(t);this.type=n,this.mappingMethod=r,this._normalizeData=G1t[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(L1(i),V1t(i)):r==="category"?i.categories?z1t(i):L1(i,!0):(ft(r!=="linear"||i.dataExtent),L1(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return ut(this._normalizeData,this)},e.listVisualTypes=function(){return te(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){xt(t)?R(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=nt(t)?[]:xt(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&kp(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(nt(t))t=t.slice();else if($1t(t)){var r=[];kp(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o<s;o++){var l=r[o].value;if(l!=null){if(l===t||lt(l)&&l===t+"")return o;n&&f(l,o)}}for(var o=0,s=r.length;o<s;o++){var u=r[o],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(Dg(h[1],t,c[1]))return o}else if(c[1]===1/0){if(Dg(h[0],c[0],t))return o}else if(Dg(h[0],c[0],t)&&Dg(h[1],t,c[1]))return o;n&&f(c[0],o),n&&f(c[1],o)}}if(n)return t===1/0?r.length-1:t===-1/0?0:i;function f(d,p){var v=Math.abs(d-t);v<a&&(a=v,i=p)}},e.visualHandlers={color:{applyVisual:jf("color"),getColorMapper:function(){var t=this.option;return ut(t.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),_d.call(this,r)}:function(r,n,i){var a=!!i;return!n&&(r=this._normalizeData(r)),i=sb(r,t.parsedVisual,i),a?i:wa(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return wa(sb(t,this.option.parsedVisual),"rgba")},category:_d,piecewise:function(t,r){var n=CT.call(this,r);return n==null&&(n=wa(sb(t,this.option.parsedVisual),"rgba")),n},fixed:Sl}},colorHue:Ag(function(t,r){return vs(t,r)}),colorSaturation:Ag(function(t,r){return vs(t,null,r)}),colorLightness:Ag(function(t,r){return vs(t,null,null,r)}),colorAlpha:Ag(function(t,r){return Ly(t,r)}),decal:{applyVisual:jf("decal"),_normalizedToVisual:{linear:null,category:_d,piecewise:null,fixed:null}},opacity:{applyVisual:jf("opacity"),_normalizedToVisual:wT([0,1])},liftZ:{applyVisual:jf("liftZ"),_normalizedToVisual:{linear:Sl,category:Sl,piecewise:Sl,fixed:Sl}},symbol:{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("symbol",i)},_normalizedToVisual:{linear:qN,category:_d,piecewise:function(t,r){var n=CT.call(this,r);return n==null&&(n=qN.call(this,t)),n},fixed:Sl}},symbolSize:{applyVisual:jf("symbolSize"),_normalizedToVisual:wT([0,1])}},e}();function V1t(e){var t=e.pieceList;e.hasSpecialVisual=!1,R(t,function(r,n){r.originIndex=n,r.visual!=null&&(e.hasSpecialVisual=!0)})}function z1t(e){var t=e.categories,r=e.categoryMap={},n=e.visual;if(kp(t,function(o,s){r[o]=s}),!nt(n)){var i=[];xt(n)?kp(n,function(o,s){var l=r[s];i[l??g0]=o}):i[g0]=n,n=QU(e,i)}for(var a=t.length-1;a>=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function L1(e,t){var r=e.visual,n=[];xt(r)?kp(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),QU(e,n)}function Ag(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:wT([0,1])}}function qN(e){var t=this.option.visual;return t[Math.round(fe(e,[0,1],[0,t.length-1],!0))]||{}}function jf(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function _d(e){var t=this.option.visual;return t[this.option.loop&&e!==g0?e%t.length:e]}function Sl(){return this.option.visual[0]}function wT(e){return{linear:function(t){return fe(t,e,this.option.visual,!0)},category:_d,piecewise:function(t,r){var n=CT.call(this,r);return n==null&&(n=fe(t,e,this.option.visual,!0)),n},fixed:Sl}}function CT(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=wr.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function QU(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=at(t,function(r){var n=En(r);return!n&&process.env.NODE_ENV!=="production"&&Ne("'"+r+"' is an illegal color, fallback to '#000000'",!0),n||[0,0,0,1]})),t}var G1t={linear:function(e){return fe(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=wr.findPieceIndex(e,t,!0);if(r!=null)return fe(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??g0},fixed:Ye};function Dg(e,t,r){return e?t<=r:t<r}var W1t="itemStyle",t9=qt();const H1t={seriesType:"treemap",reset:function(e){var t=e.getData().tree,r=t.root;r.isRemoved()||e9(r,{},e.getViewRoot().getAncestors(),e)}};function e9(e,t,r,n){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(W1t),l=j1t(s,t,n),u=o.ensureUniqueItemVisual(e.dataIndex,"style"),c=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=XN(l),c=U1t(h,f)),u.stroke=c;var d=e.viewChildren;if(!d||!d.length)f=XN(l),u.fill=f;else{var p=Y1t(e,i,a,s,l,d);R(d,function(v,g){if(v.depth>=r.length||v===r[v.depth]){var m=q1t(i,l,v,g,p,n);e9(v,m,r,n)}})}}}function j1t(e,t,r){var n=et({},t),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function XN(e){var t=M1(e,"color");if(t){var r=M1(e,"colorAlpha"),n=M1(e,"colorSaturation");return n&&(t=vs(t,null,null,n)),r&&(t=Ly(t,r)),t}}function U1t(e,t){return t!=null?vs(t,null,null,e):null}function M1(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function Y1t(e,t,r,n,i,a){if(!(!a||!a.length)){var o=E1(t,"color")||i.color!=null&&i.color!=="none"&&(E1(t,"colorAlpha")||E1(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new wr(h);return t9(f).drColorMappingBy=c,f}}}function E1(e,t){var r=e.get(t);return nt(r)&&r.length?{name:t,range:r}:null}function q1t(e,t,r,n,i,a){var o=et({},t);if(i){var s=i.type,l=s==="color"&&t9(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ap=Math.max,m0=Math.min,ZN=lr,YA=R,r9=["itemStyle","borderWidth"],X1t=["itemStyle","gapWidth"],Z1t=["upperLabel","show"],K1t=["upperLabel","height"];const J1t={seriesType:"treemap",reset:function(e,t,r,n){var i=e.option,a=pr(e,r).refContainer,o=Pe(e.getBoxLayoutParams(),a),s=i.size||[],l=st(ZN(o.width,s[0]),a.width),u=st(ZN(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=Tp(n,h,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=e.getViewRoot(),v=ZU(p);if(c!=="treemapMove"){var g=c==="treemapZoomToNode"?iSt(e,f,p,l,u):d?[d.width,d.height]:[l,u],m=i.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var y={squareRatio:i.squareRatio,sort:m,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(_),n9(p,y,!1,0),_=p.getLayout(),YA(v,function(b,S){var w=(v[S+1]||p).getValue();b.setLayout(et({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var x=e.getData().tree.root;x.setLayout(aSt(o,d,f),!0),e.setLayoutInfo(o),i9(x,new Ct(-o.x,-o.y,r.getWidth(),r.getHeight()),v,p,0)}};function n9(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(r9),u=s.get(X1t)/2,c=a9(s),h=Math.max(l,c),f=l-u,d=h-u;e.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=Ap(i-2*f,0),a=Ap(a-f-d,0);var p=i*a,v=Q1t(e,s,p,t,r,n);if(v.length){var g={x:f,y:d,width:i,height:a},m=m0(i,a),y=1/0,_=[];_.area=0;for(var x=0,b=v.length;x<b;){var S=v[x];_.push(S),_.area+=S.getLayout().area;var w=nSt(_,m,t.squareRatio);w<=y?(x++,y=w):(_.area-=_.pop().getLayout().area,KN(_,m,g,u,!1),m=m0(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&KN(_,m,g,u,!0),!r){var C=s.get("childrenVisibleMin");C!=null&&p<C&&(r=!0)}for(var x=0,b=v.length;x<b;x++)n9(v[x],t,r,n+1)}}}function Q1t(e,t,r,n,i,a){var o=e.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return e.viewChildren=[];o=de(o,function(d){return!d.isRemoved()}),eSt(o,s);var u=rSt(t,o,s);if(u.sum===0)return e.viewChildren=[];if(u.sum=tSt(t,r,u.sum,s,o),u.sum===0)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var f=o[c].getValue()/u.sum*r;o[c].setLayout({area:f})}return l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}function tSt(e,t,r,n,i){if(!n)return r;for(var a=e.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*t<a&&(s=l,r-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function eSt(e,t){return t&&e.sort(function(r,n){var i=t==="asc"?r.getValue()-n.getValue():n.getValue()-r.getValue();return i===0?t==="asc"?r.dataIndex-n.dataIndex:n.dataIndex-r.dataIndex:i}),e}function rSt(e,t,r){for(var n=0,i=0,a=t.length;i<a;i++)n+=t[i].getValue();var o=e.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&r?(s=[t[t.length-1].getValue(),t[0].getValue()],r==="asc"&&s.reverse()):(s=[1/0,-1/0],YA(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function nSt(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=e.area*e.area,u=t*t*r;return l?Ap(u*n/l,l/(u*i)):1/0}function KN(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=t?e.area/t:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var h=0,f=e.length;h<f;h++){var d=e[h],p={},v=c?d.getLayout().area/c:0,g=p[l[o]]=Ap(c-2*n,0),m=r[s[a]]+r[l[a]]-u,y=h===f-1||m<v?m:v,_=p[l[a]]=Ap(y-2*n,0);p[s[o]]=r[s[o]]+m0(n,g/2),p[s[a]]=u+m0(n,_/2),u+=y,d.setLayout(p,!0)}r[s[o]]+=c,r[l[o]]-=c}function iSt(e,t,r,n,i){var a=(t||{}).node,o=[n,i];if(!a||a===r)return o;for(var s,l=n*i,u=l*e.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,h=s.children,f=0,d=h.length;f<d;f++)c+=h[f].getValue();var p=a.getValue();if(p===0)return o;u*=c/p;var v=s.getModel(),g=v.get(r9),m=Math.max(g,a9(v));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>tI&&(u=tI),a=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,i*y]}function aSt(e,t,r){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!r)return n;var i=r.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function i9(e,t,r,n,i){var a=e.getLayout(),o=r[i],s=o&&o===e;if(!(o&&!s||i===r.length&&e!==n)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new Ct(t.x-a.x,t.y-a.y,t.width,t.height);YA(e.viewChildren||[],function(u){i9(u,l,r,n,i+1)})}}function a9(e){return e.get(Z1t)?e.get(K1t):0}function oSt(e){e.registerSeriesModel(T1t),e.registerChartView(O1t),e.registerVisual(H1t),e.registerLayout(J1t),C1t(e)}function sSt(e){var t=e.findComponents({mainType:"legend"});!t||!t.length||e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){ae(u)&&(u=o[u]);for(var c=0;c<t.length;c++)if(!t[c].isSelected(u))return!1}return!0})})}function lSt(e){var t={};e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=r.getColorFromPalette(s,t)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var f=l.getShallow(c[h],!0);f!=null&&n.setItemVisual(o,c[h],f)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){lt(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");et(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++)i.setItemVisual(o,h[f],n.getItemVisual(l,h[f]))}})})}function Lg(e){return e instanceof Array||(e=[e,e]),e}function uSt(e){e.eachSeriesByType("graph",function(t){var r=t.getGraph(),n=t.getEdgeData(),i=Lg(t.get("edgeSymbol")),a=Lg(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=r.getEdgeByIndex(o),u=Lg(s.getShallow("symbol",!0)),c=Lg(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),f=n.ensureUniqueItemVisual(o,"style");switch(et(f,h),f.stroke){case"source":{var d=l.node1.getVisual("style");f.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");f.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var TT="-->",ix=function(e){return e.get("autoCurveness")||null},o9=function(e,t){var r=ix(e),n=20,i=[];if(ae(r))n=r;else if(nt(r)){e.__curvenessList=r;return}t>n&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=i},Dp=function(e,t,r){var n=[e.id,e.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[r.uid,n,i].join(TT)},s9=function(e){var t=e.split(TT);return[t[0],t[2],t[1]].join(TT)},cSt=function(e,t){var r=Dp(e.node1,e.node2,t);return t.__edgeMap[r]},hSt=function(e,t){var r=kT(Dp(e.node1,e.node2,t),t),n=kT(Dp(e.node2,e.node1,t),t);return r+n},kT=function(e,t){var r=t.__edgeMap;return r[e]?r[e].length:0};function fSt(e){ix(e)&&(e.__curvenessList=[],e.__edgeMap={},o9(e))}function dSt(e,t,r,n){if(ix(r)){var i=Dp(e,t,r),a=r.__edgeMap,o=a[s9(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function qA(e,t,r,n){var i=ix(t),a=nt(i);if(!i)return null;var o=cSt(e,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var u=hSt(e,t);o9(t,u),e.lineStyle=e.lineStyle||{};var c=Dp(e.node1,e.node2,t),h=t.__curvenessList,f=a||u%2?0:1;if(o.isForward)return h[f+s];var d=s9(c),p=kT(d,t),v=h[s+p+f];return n?a?i&&i[0]===0?(p+f)%2?v:-v:((p%2?0:1)+f)%2?v:-v:(p+f)%2?v:-v:h[s+p+f]}function l9(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view")){var r=e.getGraph();r.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),XA(r,e)}}function XA(e,t){e.eachEdge(function(r,n){var i=dn(r.getModel().get(["lineStyle","curveness"]),-qA(r,t,n,!0),0),a=vo(r.node1.getLayout()),o=vo(r.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),r.setLayout(s)})}function pSt(e,t){e.eachSeriesByType("graph",function(r){var n=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var a=r.getData(),o=[];R(i.dimensions,function(f){o=o.concat(a.mapDimensionsAll(f))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var h=a.get(o[c],s);isNaN(h)||(u=!0),l.push(h)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}XA(a.graph,r)}else(!n||n==="none")&&l9(r)})}function xd(e){var t=e.coordinateSystem;if(t.type!=="view")return 1;var r=e.option.nodeScaleRatio,n=t.scaleX,i=t.getZoom(),a=(i-1)*r+1;return a/n}function bd(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var JN=Math.PI,I1=[];function ZA(e,t,r,n){var i=e.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=e.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,h=o.count();if(o.setLayout({cx:l,cy:u}),!!h){if(r){var f=i.pointToData(n),d=f[0],p=f[1],v=[d-l,p-u];$h(v,v),dm(v,v,c),r.setLayout([l+v[0],u+v[1]],!0);var g=e.get(["circular","rotateLabel"]);u9(r,g,l,u)}vSt[t](e,s,o,c,l,u,h),s.eachEdge(function(m,y){var _=dn(m.getModel().get(["lineStyle","curveness"]),qA(m,e,y),0),x=vo(m.node1.getLayout()),b=vo(m.node2.getLayout()),S,w=(x[0]+b[0])/2,C=(x[1]+b[1])/2;+_&&(_*=3,S=[l*_+w*(1-_),u*_+C*(1-_)]),m.setLayout([x,b,S])})}}}var vSt={value:function(e,t,r,n,i,a,o){var s=0,l=r.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(c){var h=c.getValue("value"),f=u*(l?h:1)/2;s+=f,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=f})},symbolSize:function(e,t,r,n,i,a,o){var s=0;I1.length=o;var l=xd(e);t.eachNode(function(h){var f=bd(h);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var d=Math.asin(f/2/n);isNaN(d)&&(d=JN/2),I1[h.dataIndex]=d,s+=d*2});var u=(2*JN-s)/o/2,c=0;t.eachNode(function(h){var f=u+I1[h.dataIndex];c+=f,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=f})}};function u9(e,t,r,n){var i=e.getGraphicEl();if(i){var a=e.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=e.getLayout(),u=Math.atan2(l[1]-n,l[0]-r);u<0&&(u=Math.PI*2+u);var c=l[0]<r;c&&(u=u-Math.PI);var h=c?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var f=s.ensureState("emphasis");et(f.textConfig||(f.textConfig={}),{position:h})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function gSt(e){e.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&ZA(t,"symbolSize")})}var sc=Uw;function mSt(e,t,r){for(var n=e,i=t,a=r.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=r.gravity==null?.1:r.gravity,c=0;c<n.length;c++){var h=n[c];h.p||(h.p=Tu(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=vo(h.p),h.edges=null}var f=r.friction==null?.6:r.friction,d=f,p,v;return{warmUp:function(){d=f*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){v=g},step:function(g){p&&p(n,i);for(var m=[],y=n.length,_=0;_<i.length;_++){var x=i[_];if(!x.ignoreForceLayout){var b=x.n1,S=x.n2;Rl(m,S.p,b.p);var w=Yw(m)-x.d,C=S.w/(b.w+S.w);isNaN(C)&&(C=0),$h(m,m),!b.fixed&&sc(b.p,b.p,m,C*w*d),!S.fixed&&sc(S.p,S.p,m,-(1-C)*w*d)}}for(var _=0;_<y;_++){var k=n[_];k.fixed||(Rl(m,l,k.p),sc(k.p,k.p,m,u*d))}for(var _=0;_<y;_++)for(var b=n[_],T=_+1;T<y;T++){var S=n[T];Rl(m,S.p,b.p);var w=Yw(m);w===0&&(kk(m,Math.random()-.5,Math.random()-.5),w=1);var A=(b.rep+S.rep)/w/w;!b.fixed&&sc(b.pp,b.pp,m,A),!S.fixed&&sc(S.pp,S.pp,m,-A)}for(var L=[],_=0;_<y;_++){var k=n[_];k.fixed||(Rl(L,k.p,k.pp),sc(k.p,k.p,L,d),an(k.pp,k.p))}d=d*.992;var D=d<.01;v&&v(n,i,D),g&&g(D)}}}function ySt(e){e.eachSeriesByType("graph",function(t){var r=t.coordinateSystem;if(!(r&&r.type!=="view"))if(t.get("layout")==="force"){var n=t.preservedPoints||{},i=t.getGraph(),a=i.data,o=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?a.each(function(_){var x=a.getId(_);a.setItemLayout(_,n[x]||[NaN,NaN])}):!l||l==="none"?l9(t):l==="circular"&&ZA(t,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),h=s.get("repulsion"),f=s.get("edgeLength"),d=nt(h)?h:[h,h],p=nt(f)?f:[f,f];p=[p[1],p[0]];var v=a.mapArray("value",function(_,x){var b=a.getItemLayout(x),S=fe(_,u,d);return isNaN(S)&&(S=(d[0]+d[1])/2),{w:S,rep:S,fixed:a.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(_,x){var b=i.getEdgeByIndex(x),S=fe(_,c,p);isNaN(S)&&(S=(p[0]+p[1])/2);var w=b.getModel(),C=dn(b.getModel().get(["lineStyle","curveness"]),-qA(b,t,x,!0),0);return{n1:v[b.node1.dataIndex],n2:v[b.node2.dataIndex],d:S,curveness:C,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=r.getBoundingRect(),y=mSt(v,g,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(_,x){for(var b=0,S=_.length;b<S;b++)_[b].fixed&&an(_[b].p,i.getNodeByIndex(b).getLayout())}),y.afterStep(function(_,x,b){for(var S=0,w=_.length;S<w;S++)_[S].fixed||i.getNodeByIndex(S).setLayout(_[S].p),n[a.getId(S)]=_[S].p;for(var S=0,w=x.length;S<w;S++){var C=x[S],k=i.getEdgeByIndex(S),T=C.n1.p,A=C.n2.p,L=k.getLayout();L=L?L.slice():[],L[0]=L[0]||[],L[1]=L[1]||[],an(L[0],T),an(L[1],A),+C.curveness&&(L[2]=[(T[0]+A[0])/2-(T[1]-A[1])*C.curveness,(T[1]+A[1])/2-(A[0]-T[0])*C.curveness]),k.setLayout(L)}}),t.forceLayout=y,t.preservedPoints=n,y.step()}else t.forceLayout=null})}function _St(e,t,r){var n=pr(e,t),i=et(e.getBoxLayoutParams(),{aspect:r}),a=Pe(i,n.refContainer);return W6(e,a,r)}function xSt(e,t){var r=[];return e.eachSeriesByType("graph",function(n){Zp({targetModel:n,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var a=n.getData(),o=a.mapArray(function(p){var v=a.getItemModel(p);return[+v.get("x"),+v.get("y")]}),s=[],l=[];P_(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=_St(n,t,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-s[0],f=l[1]-s[1],d=new Ru(null,{api:t,ecModel:e});return d.zoomLimit=n.get("scaleLimit"),d.setBoundingRect(s[0],s[1],h,f),d.setViewRect(c.x,c.y,c.width,c.height),d.setCenter(n.get("center")),d.setZoom(n.get("zoom")),r.push(d),d}}),r}var QN=Qe.prototype,P1=Up.prototype,c9=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(c9);function R1(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var h9=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new c9},t.prototype.buildPath=function(r,n){R1(n)?QN.buildPath.call(this,r,n):P1.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return R1(this.shape)?QN.pointAt.call(this,r):P1.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,i=R1(n)?[n.x2-n.x1,n.y2-n.y1]:P1.tangentAt.call(this,r);return $h(i,i)},t}(Kt),N1=["fromSymbol","toSymbol"];function tO(e){return"_"+e+"Type"}function eO(e,t,r){var n=t.getItemVisual(r,e);if(!n||n==="none")return n;var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Zh(i),u=Mu(o||0,l);return n+l+u+(a||"")+(s||"")}function rO(e,t,r){var n=t.getItemVisual(r,e);if(!(!n||n==="none")){var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Zh(i),u=Mu(o||0,l),c=nr(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=e,c}}function bSt(e){var t=new h9({name:"line",subPixelOptimize:!0});return AT(t.shape,e),t}function AT(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var r=t[2];r?(e.cpx1=r[0],e.cpy1=r[1]):(e.cpx1=NaN,e.cpy1=NaN)}var KA=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createLine(r,n,i),a}return t.prototype._createLine=function(r,n,i){var a=r.hostModel,o=r.getItemLayout(n),s=r.getItemVisual(n,"z2"),l=bSt(o);l.shape.percent=0,Le(l,{z2:dt(s,0),shape:{percent:1}},a,n),this.add(l),R(N1,function(u){var c=rO(u,r,n);this.add(c),this[tO(u)]=eO(u,r,n)},this),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(n),l={shape:{}};AT(l.shape,s),se(o,l,a,n),R(N1,function(u){var c=eO(u,r,n),h=tO(u);if(this[h]!==c){this.remove(this.childOfName(u));var f=rO(u,r,n);this.add(f)}this[h]=c},this),this._updateCommonStl(r,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,f=i&&i.focus,d=i&&i.blurScope;if(!i||r.hasItemOption){var p=r.getItemModel(n),v=p.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=v.get("disabled"),f=v.get("focus"),d=v.get("blurScope"),c=dr(p)}var g=r.getItemVisual(n,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,R(N1,function(S){var w=this.childOfName(S);if(w){w.setColor(m),w.style.opacity=g.opacity;for(var C=0;C<xn.length;C++){var k=xn[C],T=o.getState(k);if(T){var A=T.style||{},L=w.ensureState(k),D=L.style||(L.style={});A.stroke!=null&&(D[w.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(D.opacity=A.opacity)}}w.markRedraw()}},this);var y=a.getRawValue(n);Cr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(S,w){return a.getFormattedLabel(S,w,r.dataType)}},inheritColor:m||U.color.neutral99,defaultOpacity:g.opacity,defaultText:(y==null?r.getName(n):isFinite(y)?Je(y):y)+""});var _=this.getTextContent();if(_){var x=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var b=x.get("distance");nt(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Ie(this,f,d,h)},t.prototype.highlight=function(){Ao(this)},t.prototype.downplay=function(){Do(this)},t.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");AT(n.shape,r),n.dirty()},t.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),i=r.childOfName("toSymbol"),a=r.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),f=Rl([],h,c);$h(f,f);function d(T,A){var L=T.__specifiedRotation;if(L==null){var D=l.tangentAt(A);T.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(D[1],D[0]))}else T.attr("rotation",L)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(h),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,v=void 0,g=a.__labelDistance,m=g[0]*o,y=g[1]*o,_=u/2,x=l.tangentAt(_),b=[x[1],-x[0]],S=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var C=-Math.atan2(x[1],x[0]);h[0]<c[0]&&(C=Math.PI+C),a.rotation=C}var k=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":k=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":k=y,v="top";break;default:k=0,v="middle"}switch(a.__position){case"end":a.x=f[0]*m+h[0],a.y=f[1]*y+h[1],p=f[0]>.8?"left":f[0]<-.8?"right":"center",v=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*m+c[0],a.y=-f[1]*y+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",v=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*w+c[0],a.y=c[1]+k,p=x[0]<0?"right":"left",a.originX=-m*w,a.originY=-k;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+k,p="center",a.originY=-k;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*w+h[0],a.y=h[1]+k,p=x[0]>=0?"right":"left",a.originX=m*w,a.originY=-k;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||p})}},t}(yt),JA=function(){function e(t){this.group=new yt,this._LineCtor=t||KA}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=nO(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=nO(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!SSt(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=r.getItemLayout(i);if(O1(a)){var o=new this._LineCtor(r,i,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){Bs(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var i=t.getItemLayout(r);if(O1(i)){var a=new this._LineCtor(t,r,n);t.setItemGraphicEl(r,a),this.group.add(a)}},e.prototype._doUpdate=function(t,r,n,i,a){var o=t.getItemGraphicEl(n);if(!O1(r.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(r,i,a):o=new this._LineCtor(r,i,a),r.setItemGraphicEl(i,o),this.group.add(o)},e}();function SSt(e){return e.animators&&e.animators.length>0}function nO(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:dr(t)}}function iO(e){return isNaN(e[0])||isNaN(e[1])}function O1(e){return e&&!iO(e[0])&&!iO(e[1])}var B1=[],F1=[],$1=[],lc=Mr,V1=Gl,aO=Math.abs;function oO(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){B1[0]=lc(n[0],i[0],a[0],c),B1[1]=lc(n[1],i[1],a[1],c);var h=aO(V1(B1,t)-l);h<o&&(o=h,s=c)}for(var f=0;f<32;f++){var d=s+u;F1[0]=lc(n[0],i[0],a[0],s),F1[1]=lc(n[1],i[1],a[1],s),$1[0]=lc(n[0],i[0],a[0],d),$1[1]=lc(n[1],i[1],a[1],d);var h=V1(F1,t)-l;if(aO(h)<.01)break;var p=V1($1,t)-l;u/=2,h<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function z1(e,t){var r=[],n=op,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[vo(u[0]),vo(u[1])],u[2]&&u.__original.push(vo(u[2])));var f=u.__original;if(u[2]!=null){if(an(i[0],f[0]),an(i[1],f[2]),an(i[2],f[1]),c&&c!=="none"){var d=bd(s.node1),p=oO(i,f[0],d*t);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(h&&h!=="none"){var d=bd(s.node2),p=oO(i,f[1],d*t);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}an(u[0],i[0]),an(u[1],i[2]),an(u[2],i[1])}else{if(an(a[0],f[0]),an(a[1],f[1]),Rl(o,a[1],a[0]),$h(o,o),c&&c!=="none"){var d=bd(s.node1);Uw(a[0],a[0],o,d*t)}if(h&&h!=="none"){var d=bd(s.node2);Uw(a[1],a[1],o,-d*t)}an(u[0],a[0]),an(u[1],a[1])}})}var f9=qt();function wSt(e){if(e)return f9(e).bridge}function sO(e,t){e&&(f9(e).bridge=t)}function lO(e){return e.type==="view"}var CSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new ev,a=new JA,o=this.group,s=new yt;this._controller=new Pu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(lO(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(h):se(this._mainGroup,h,r)}z1(r.getGraph(),xd(r));var f=r.getData();u.updateData(f);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,v=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,v));var g=r.get("layout");f.graph.eachNode(function(x){var b=x.dataIndex,S=x.getGraphicEl(),w=x.getModel();if(S){S.off("drag").off("dragend");var C=w.get("draggable");C&&S.on("drag",function(T){switch(g){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,v),p.setFixed(b),f.setItemLayout(b,[S.x,S.y]);break;case"circular":f.setItemLayout(b,[S.x,S.y]),x.setLayout({fixed:!0},!0),ZA(r,"symbolSize",x,[T.offsetX,T.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(b,[S.x,S.y]),XA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(b)}),S.setDraggable(C,!!w.get("cursor"));var k=w.get(["emphasis","focus"]);k==="adjacency"&&(At(S).focus=x.getAdjacentDataIndices())}}),f.graph.eachEdge(function(x){var b=x.getGraphicEl(),S=x.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(At(b).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var m=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),y=f.getLayout("cx"),_=f.getLayout("cy");f.graph.eachNode(function(x){u9(x,m,y,_)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!lO(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(r,n,i){this._active&&(VA(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(r,n,i){this._active&&(zA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),z1(r.getGraph(),xd(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=xd(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){this._active&&(z1(r.getGraph(),xd(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.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()},t.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=wSt(r);if(i)return{bridge:i,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new yt,l=i.group.children(),u=a.group.children(),c=new yt,h=new yt;s.add(h),s.add(c);for(var f=0;f<l.length;f++){var d=l[f],p=d.children()[0],v=d.x,g=d.y,m=_t(p.shape),y=et(m,{width:p.scaleX,height:p.scaleY,x:v-p.scaleX/2,y:g-p.scaleY/2}),_=_t(p.style),x=new p.constructor({shape:y,style:_,z2:151});h.add(x)}for(var f=0;f<u.length;f++){var d=u[f],b=d.children()[0],_=_t(b.style),y=_t(b.shape),S=new h9({style:_,shape:y,z2:151});c.add(S)}o.bridge.renderContent({api:n,roamType:r.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},t.type="graph",t}(ye);function uc(e){return"_EC_"+e}var TSt=function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,r){t=t==null?""+r:""+t;var n=this._nodesMap;if(n[uc(t)]){process.env.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var i=new wl(t,r);return i.hostGraph=this,this.nodes.push(i),n[uc(t)]=i,i},e.prototype.getNodeByIndex=function(t){var r=this.data.getRawIndex(t);return this.nodes[r]},e.prototype.getNodeById=function(t){return this._nodesMap[uc(t)]},e.prototype.addEdge=function(t,r,n){var i=this._nodesMap,a=this._edgesMap;if(ae(t)&&(t=this.nodes[t]),ae(r)&&(r=this.nodes[r]),t instanceof wl||(t=i[uc(t)]),r instanceof wl||(r=i[uc(r)]),!(!t||!r)){var o=t.id+"-"+r.id,s=new d9(t,r,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),r.inEdges.push(s)),t.edges.push(s),t!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof wl&&(t=t.id),r instanceof wl&&(r=r.id);var n=this._edgesMap;return this._directed?n[t+"-"+r]:n[t+"-"+r]||n[r+"-"+t]},e.prototype.eachNode=function(t,r){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof wl||(r=this._nodesMap[uc(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,r,null))for(var s=[r];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(t.call(i,h,l))return;s.push(h),h.__visited=!0}}}},e.prototype.update=function(){for(var t=this.data,r=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)n[t.getRawIndex(a)].dataIndex=a;r.filterSelf(function(s){var l=i[r.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=r.count();a<o;a++)i[r.getRawIndex(a)].dataIndex=a},e.prototype.clone=function(){for(var t=new e(this._directed),r=this.nodes,n=this.edges,i=0;i<r.length;i++)t.addNode(r[i].id,r[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),wl=function(){function e(t,r){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=r??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},r=0;r<this.edges.length;r++){var n=this.edges[r];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},e.prototype.getTrajectoryDataIndices=function(){for(var t=pt(),r=pt(),n=0,i=this.edges.length;n<i;n++){var a=this.edges[n];if(!(a.dataIndex<0)){t.set(a.dataIndex,!0);for(var o=[a.node1],s=[a.node2],l=0;l<o.length;){var u=o[l];l++,r.set(u.dataIndex,!0);for(var c=u.inEdges,h=0,f=c.length,d=void 0,p=void 0;h<f;h++)d=c[h],p=d.dataIndex,p>=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(d.node1))}for(l=0;l<s.length;){var v=s[l];l++,r.set(v.dataIndex,!0);for(var g=v.outEdges,h=0,m=g.length,y=void 0,_=void 0;h<m;h++)y=g[h],_=y.dataIndex,_>=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(y.node2))}}}return{edge:t.keys(),node:r.keys()}},e}(),d9=function(){function e(t,r,n){this.dataIndex=-1,this.node1=t,this.node2=r,this.dataIndex=n??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=pt(),r=pt();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,r.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,h=void 0;l<u;l++)c=o.inEdges[l],h=c.dataIndex,h>=0&&!t.hasKey(h)&&(t.set(h,!0),n.push(c.node1))}for(a=0;a<i.length;){var f=i[a];a++,r.set(f.dataIndex,!0);for(var d=f.outEdges,l=0,u=d.length,p=void 0,v=void 0;l<u;l++)p=f.outEdges[l],v=p.dataIndex,v>=0&&!t.hasKey(v)&&(t.set(v,!0),i.push(p.node2))}return{edge:t.keys(),node:r.keys()}},e}();function p9(e,t){return{getValue:function(r){var n=this[e][t];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ir(wl,p9("hostGraph","data"));ir(d9,p9("hostGraph","edgeData"));function QA(e,t,r,n,i){for(var a=new TSt(n),o=0;o<e.length;o++)a.addNode(lr(e[o].id,e[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var c=t[o],h=c.source,f=c.target;a.addEdge(h,f,u)&&(l.push(c),s.push(lr(ur(c.id,null),h+" > "+f)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=$o(e,r);else{var v=Yh.get(d),g=v?v.dimensions||[]:[];$t(g,"value")<0&&g.concat(["value"]);var m=Jp(e,{coordDimensions:g,encodeDefine:r.getEncode()}).dimensions;p=new pn(m,r),p.initData(e)}var y=new pn(["value"],r);return y.initData(l,s),i&&i(p,y),qU({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var kSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new tf(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),uu(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){fSt(this);var s=QA(a,i,this,!0,l);return R(s.edges,function(u){dSt(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=o._categoriesModels,g=p.getShallow("category"),m=v[g];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var h=ne.prototype.getModel;function f(p,v){var g=h.call(this,p,v);return g.resolveParentPath=d,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}return p}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=S8({series:this,dataIndex:r,multipleSeries:n});return h},t.prototype._updateCategoriesData=function(){var r=at(this.option.categories||[],function(i){return i.value!=null?i:et({value:0},i)}),n=new pn(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:U.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:U.color.primary}}},t}(Ae);function ASt(e){e.registerChartView(CSt),e.registerSeriesModel(kSt),e.registerProcessor(sSt),e.registerVisual(lSt),e.registerVisual(uSt),e.registerLayout(pSt),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,gSt),e.registerLayout(ySt),e.registerCoordinateSystem("graphView",{dimensions:Ru.dimensions,create:xSt}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ye),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ye),e.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=n.getViewOfSeriesModel(i);a&&(t.dx!=null&&t.dy!=null&&a.updateViewOnPan(i,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&a.updateViewOnZoom(i,n,t));var o=i.coordinateSystem,s=ex(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var uO=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;At(a).dataType="node",a.z2=2;var o=new oe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),h=r.getItemLayout(n),f=et(xa(u.getModel("itemStyle"),h,!0),h),d=this;if(isNaN(f.startAngle)){d.setShape(f);return}a?d.setShape(f):se(d,{shape:f},l,n);var p=et(xa(u.getModel("itemStyle"),h,!0),h);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),fr(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),fr(d,u,"itemStyle");var v=c.get("focus");Ie(this,v==="adjacency"?s.getAdjacentDataIndices():v,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var h=dr(n),f=i.getVisual("style");Cr(a,h,{labelFetcher:{getFormattedLabel:function(y,_,x,b,S,w){return r.getFormattedLabel(y,_,"node",b,dn(S,h.normal&&h.normal.get("formatter"),n.get("name")),w)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:f.fill,defaultOpacity:f.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",p=c.get("distance")||0,v;d==="outside"?v=o.r+p:v=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var g=d!=="outside"?c.get("align")||"center":l>0?"left":"right",m=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*v+o.cx,y:u*v+o.cy,rotation:0,style:{align:g,verticalAlign:m}})},t}(Jr),DSt=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return At(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),h=n.getItemModel(l.dataIndex),f=h.getModel("lineStyle"),d=h.getModel("emphasis"),p=d.get("focus"),v=et(xa(c.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(v.sStartAngle)||isNaN(v.tStartAngle)){g.setShape(v);return}o?(g.setShape(v),cO(g,l,r,f)):(gi(g),cO(g,l,r,f),se(g,{shape:v},s,i)),Ie(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),fr(g,h,"lineStyle"),n.setItemGraphicEl(l.dataIndex,g)},t}(Kt);function cO(e,t,r,n){var i=t.node1,a=t.node2,o=e.style;e.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(lt(l)&&lt(u)){var c=e.shape,h=(c.s1[0]+c.s2[0])/2,f=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new Wh(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var LSt=Math.PI/180,MSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*LSt;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new uO(a,c,l);At(f).dataIndex=c,s.add(f)}}).update(function(c,h){var f=o.getItemGraphicEl(h),d=a.getItemLayout(c);if(!d){f&&go(f,r,h);return}f?f.updateData(a,c,l):f=new uO(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&go(h,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=st(u[0],i.getWidth()),this.group.originY=st(u[1],i.getHeight()),Le(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},t.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new DSt(i,a,l,n);At(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&go(u,r,l)}).execute(),this._edgeData=a},t.prototype.dispose=function(){},t.type="chord",t}(ye),ESt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this))},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=QA(a,i,this,!0,s);return o.data}function s(l,u){var c=ne.prototype.getModel;function h(d,p){var v=c.call(this,d,p);return v.resolveParentPath=f,v}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=h,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return rr("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},t.type="series.chord",t.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}}},t}(Ae),G1=Math.PI/180;function ISt(e,t){e.eachSeriesByType("chord",function(r){PSt(r,t)})}function PSt(e,t){var r=e.getData(),n=r.graph,i=e.getEdgeData(),a=i.count();if(a){var o=G6(e,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((e.get("padAngle")||0)*G1,0),f=Math.max((e.get("minAngle")||0)*G1,0),d=-e.get("startAngle")*G1,p=d+Math.PI*2,v=e.get("clockwise"),g=v?1:-1,m=[d,p];R_(m,!v);var y=m[0],_=m[1],x=_-y,b=r.getSum("value")===0&&i.getSum("value")===0,S=[],w=0;n.eachEdge(function(O){var $=b?1:O.getValue("value");b&&($>0||f)&&(w+=2);var V=O.node1.dataIndex,I=O.node2.dataIndex;S[V]=(S[V]||0)+$,S[I]=(S[I]||0)+$});var C=0;if(n.eachNode(function(O){var $=O.getValue("value");isNaN($)||(S[O.dataIndex]=Math.max($,S[O.dataIndex]||0)),!b&&(S[O.dataIndex]>0||f)&&w++,C+=S[O.dataIndex]||0}),!(w===0||C===0)){h*w>=Math.abs(x)&&(h=Math.max(0,(Math.abs(x)-f*w)/w)),(h+f)*w>=Math.abs(x)&&(f=(Math.abs(x)-h*w)/w);var k=(x-h*w*g)/C,T=0,A=0,L=0;n.eachNode(function(O){var $=S[O.dataIndex]||0,V=k*(C?$:1)*g;Math.abs(V)<f?T+=f-Math.abs(V):(A+=Math.abs(V)-f,L+=Math.abs(V)),O.setLayout({angle:V,value:$})});var D=!1;if(T>A){var E=T/A;n.eachNode(function(O){var $=O.getLayout().angle;Math.abs($)>=f?O.setLayout({angle:$*E,ratio:E},!0):O.setLayout({angle:f,ratio:f===0?1:$/f},!0)})}else n.eachNode(function(O){if(!D){var $=O.getLayout().angle,V=Math.min($/L,1),I=V*T;$-I<f&&(D=!0)}});var N=T;n.eachNode(function(O){if(!(N<=0)){var $=O.getLayout().angle;if($>f&&f>0){var V=D?1:Math.min($/L,1),I=$-f,B=Math.min(I,Math.min(N,T*V));N-=B,O.setLayout({angle:$-B,ratio:($-B)/$},!0)}else f>0&&O.setLayout({angle:f,ratio:$===0?1:f/$},!0)}});var P=y,F=[];n.eachNode(function(O){var $=Math.max(O.getLayout().angle,f);O.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:P,endAngle:P+$*g,clockwise:v},!0),F[O.dataIndex]=P,P+=($+h)*g}),n.eachEdge(function(O){var $=b?1:O.getValue("value"),V=k*(C?$:1)*g,I=O.node1.dataIndex,B=F[I]||0,G=Math.abs((O.node1.getLayout().ratio||1)*V),H=B+G*g,W=[s+c*Math.cos(B),l+c*Math.sin(B)],J=[s+c*Math.cos(H),l+c*Math.sin(H)],Q=O.node2.dataIndex,tt=F[Q]||0,it=Math.abs((O.node2.getLayout().ratio||1)*V),X=tt+it*g,rt=[s+c*Math.cos(tt),l+c*Math.sin(tt)],Z=[s+c*Math.cos(X),l+c*Math.sin(X)];O.setLayout({s1:W,s2:J,sStartAngle:B,sEndAngle:H,t1:rt,t2:Z,tStartAngle:tt,tEndAngle:X,cx:s,cy:l,r:c,value:$,clockwise:v}),F[I]=H,F[Q]=X})}}}function RSt(e){e.registerChartView(MSt),e.registerSeriesModel(ESt),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,ISt),e.registerProcessor(Jh("chord"))}var NSt=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),OSt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new NSt},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},t}(Kt);function BSt(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=st(r[0],t.getWidth()),s=st(r[1],t.getHeight()),l=st(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Mg(e,t){var r=e==null?"":e+"";return t&&(lt(t)?r=t.replace("{value}",r):mt(t)&&(r=t(e))),r}var FSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=BSt(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),f=h.get("roundCap"),d=f?c0:Jr,p=h.get("show"),v=h.getModel("lineStyle"),g=v.get("width"),m=[u,c];R_(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,x=[],b=0;p&&b<a.length;b++){var S=Math.min(Math.max(a[b][0],0),1);c=u+y*S;var w=new d({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:a[b][1]}),w.setStyle(v.getLineStyle(["color","width"])),x.push(w),_=c}x.reverse(),R(x,function(k){return s.add(k)});var C=function(k){if(k<=0)return a[0][1];var T;for(T=0;T<a.length;T++)if(a[T][0]>=k&&(T===0?0:a[T-1][0])<k)return a[T][1];return a[T-1][1]};this._renderTicks(r,n,i,C,o,u,c,l,g),this._renderTitleAndDetail(r,n,i,C,o),this._renderAnchor(r,o),this._renderPointer(r,n,i,C,o,u,c,l,g)},t.prototype._renderTicks=function(r,n,i,a,o,s,l,u,c){for(var h=this.group,f=o.cx,d=o.cy,p=o.r,v=+r.get("min"),g=+r.get("max"),m=r.getModel("splitLine"),y=r.getModel("axisTick"),_=r.getModel("axisLabel"),x=r.get("splitNumber"),b=y.get("splitNumber"),S=st(m.get("length"),p),w=st(y.get("length"),p),C=s,k=(l-s)/x,T=k/b,A=m.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),D=m.get("distance"),E,N,P=0;P<=x;P++){if(E=Math.cos(C),N=Math.sin(C),m.get("show")){var F=D?D+c:c,O=new Qe({shape:{x1:E*(p-F)+f,y1:N*(p-F)+d,x2:E*(p-S-F)+f,y2:N*(p-S-F)+d},style:A,silent:!0});A.stroke==="auto"&&O.setStyle({stroke:a(P/x)}),h.add(O)}if(_.get("show")){var F=_.get("distance")+D,$=Mg(Je(P/x*(g-v)+v),_.get("formatter")),V=a(P/x),I=E*(p-S-F)+f,B=N*(p-S-F)+d,G=_.get("rotate"),H=0;G==="radial"?(H=-C+2*Math.PI,H>Math.PI/2&&(H+=Math.PI)):G==="tangential"?H=-C-Math.PI/2:ae(G)&&(H=G*Math.PI/180),H===0?h.add(new oe({style:Te(_,{text:$,x:I,y:B,verticalAlign:N<-.8?"top":N>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:V}),silent:!0})):h.add(new oe({style:Te(_,{text:$,x:I,y:B,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:I,originY:B,rotation:H}))}if(y.get("show")&&P!==x){var F=y.get("distance");F=F?F+c:c;for(var W=0;W<=b;W++){E=Math.cos(C),N=Math.sin(C);var J=new Qe({shape:{x1:E*(p-F)+f,y1:N*(p-F)+d,x2:E*(p-w-F)+f,y2:N*(p-w-F)+d},silent:!0,style:L});L.stroke==="auto"&&J.setStyle({stroke:a((P+W/b)/x)}),h.add(J),C+=T}C-=T}else C+=k}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],v=r.get(["pointer","show"]),g=r.getModel("progress"),m=g.get("show"),y=r.getData(),_=y.mapDimension("value"),x=+r.get("min"),b=+r.get("max"),S=[x,b],w=[s,l];function C(T,A){var L=y.getItemModel(T),D=L.getModel("pointer"),E=st(D.get("width"),o.r),N=st(D.get("length"),o.r),P=r.get(["pointer","icon"]),F=D.get("offsetCenter"),O=st(F[0],o.r),$=st(F[1],o.r),V=D.get("keepAspect"),I;return P?I=nr(P,O-E/2,$-N,E,N,null,V):I=new OSt({shape:{angle:-Math.PI/2,width:E,r:N,x:O,y:$}}),I.rotation=-(A+Math.PI/2),I.x=o.cx,I.y=o.cy,I}function k(T,A){var L=g.get("roundCap"),D=L?c0:Jr,E=g.get("overlap"),N=E?g.get("width"):c/y.count(),P=E?o.r-N:o.r-(T+1)*N,F=E?o.r:o.r-T*N,O=new D({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:P,r:F}});return E&&(O.z2=fe(y.get(_,T),[x,b],[100,0],!0)),O}(m||v)&&(y.diff(f).add(function(T){var A=y.get(_,T);if(v){var L=C(T,s);Le(L,{rotation:-((isNaN(+A)?w[0]:fe(A,S,w,!0))+Math.PI/2)},r),h.add(L),y.setItemGraphicEl(T,L)}if(m){var D=k(T,s),E=g.get("clip");Le(D,{shape:{endAngle:fe(A,S,w,E)}},r),h.add(D),SC(r.seriesIndex,y.dataType,T,D),p[T]=D}}).update(function(T,A){var L=y.get(_,T);if(v){var D=f.getItemGraphicEl(A),E=D?D.rotation:s,N=C(T,E);N.rotation=E,se(N,{rotation:-((isNaN(+L)?w[0]:fe(L,S,w,!0))+Math.PI/2)},r),h.add(N),y.setItemGraphicEl(T,N)}if(m){var P=d[A],F=P?P.shape.endAngle:s,O=k(T,F),$=g.get("clip");se(O,{shape:{endAngle:fe(L,S,w,$)}},r),h.add(O),SC(r.seriesIndex,y.dataType,T,O),p[T]=O}}).execute(),y.each(function(T){var A=y.getItemModel(T),L=A.getModel("emphasis"),D=L.get("focus"),E=L.get("blurScope"),N=L.get("disabled");if(v){var P=y.getItemGraphicEl(T),F=y.getItemVisual(T,"style"),O=F.fill;if(P instanceof Rr){var $=P.style;P.useStyle(et({image:$.image,x:$.x,y:$.y,width:$.width,height:$.height},F))}else P.useStyle(F),P.type!=="pointer"&&P.setColor(O);P.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",a(fe(y.get(_,T),S,[0,1],!0))),P.z2EmphasisLift=0,fr(P,A),Ie(P,D,E,N)}if(m){var V=p[T];V.useStyle(y.getItemVisual(T,"style")),V.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,fr(V,A),Ie(V,D,E,N)}}),this._progressEls=p)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=nr(s,n.cx-o/2+st(l[0],n.r),n.cy-o/2+st(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),h=+r.get("max"),f=new yt,d=[],p=[],v=r.isAnimationEnabled(),g=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new oe({silent:!0}),p[m]=new oe({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),x=new yt,b=a(fe(_,[c,h],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),C=o.cx+st(w[0],o.r),k=o.cy+st(w[1],o.r),T=d[m];T.attr({z2:g?0:2,style:Te(S,{x:C,y:k,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(T)}var A=y.getModel("detail");if(A.get("show")){var L=A.get("offsetCenter"),D=o.cx+st(L[0],o.r),E=o.cy+st(L[1],o.r),N=st(A.get("width"),o.r),P=st(A.get("height"),o.r),F=r.get(["progress","show"])?l.getItemVisual(m,"style").fill:b,T=p[m],O=A.get("formatter");T.attr({z2:g?0:2,style:Te(A,{x:D,y:E,text:Mg(_,O),width:isNaN(N)?null:N,height:isNaN(P)?null:P,align:"center",verticalAlign:"middle"},{inheritColor:F})}),S6(T,{normal:A},_,function(V){return Mg(V,O)}),v&&w6(T,m,l,r,{getFormattedLabel:function(V,I,B,G,H,W){return Mg(W?W.interpolatedValue:_,O)}}),x.add(T)}f.add(x)}),this.group.add(f),this._titleEls=d,this._detailEls=p},t.type="gauge",t}(ye),$St=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return Qh(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,U.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:U.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:U.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:U.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:U.color.neutral00,borderWidth:0,borderColor:U.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:U.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:U.color.transparent,borderWidth:0,borderColor:U.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:U.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Ae);function VSt(e){e.registerChartView(FSt),e.registerSeriesModel($St)}var zSt=["itemStyle","opacity"],GSt=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new Gr,s=new oe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(zSt);c=c??1,i||gi(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Le(a,{style:{opacity:c}},o,n)):se(a,{style:{opacity:c},shape:{points:l.points}},o,n),fr(a,s),this._updateLabel(r,n),Ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,h=r.getItemVisual(n,"style"),f=h.fill;Cr(o,dr(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),v=p==="inherit"?f:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:v,outsideFill:v});var g=c.linePoints;a.setShape({points:g}),i.textGuideLineConfig={anchor:g?new St(g[0][0],g[0][1]):null},se(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),kA(i,AA(l),{stroke:f})},t}(Qr),WSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new GSt(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);go(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(ye),HSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return Qh(this,{coordDimensions:["value"],encodeDefaulter:Bt(oA,this)})},t.prototype._defaultLabelLine=function(r){uu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.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:U.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:U.color.primary}}},t}(Ae);function jSt(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();o<s;o++)i[o]=o;return mt(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function USt(e){var t=e.hostModel,r=t.get("orient");e.each(function(n){var i=e.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=e.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,f,d,p;if(c)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,h="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[f,d],[f,d]];else{var v=void 0,g=void 0,m=void 0,y=void 0,_=s.get("length");process.env.NODE_ENV!=="production"&&(r==="vertical"&&["top","bottom"].indexOf(o)>-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),r==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))),o==="left"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=v-_,f=m-5,h="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=v+_,f=m+5,h="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,d=y-5,h="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,d=y+5,h="center"):o==="rightTop"?(v=r==="horizontal"?u[3][0]:u[1][0],g=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(y=g-_,d=y-5,h="center"):(m=v+_,f=m+5,h="top")):o==="rightBottom"?(v=u[2][0],g=u[2][1],r==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v+_,f=m+5,h="bottom")):o==="leftTop"?(v=u[0][0],g=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(y=g-_,d=y-5,h="center"):(m=v-_,f=m-5,h="right")):o==="leftBottom"?(v=r==="horizontal"?u[1][0]:u[3][0],g=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v-_,f=m-5,h="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,r==="horizontal"?(y=g+_,d=y+5,h="center"):(m=v+_,f=m+5,h="left")),r==="horizontal"?(m=v,f=m):(y=g,d=y),p=[[v,g],[m,y]]}l.label={linePoints:p,x:f,y:d,verticalAlign:"middle",textAlign:h,inside:c}})}function YSt(e,t){e.eachSeriesByType("funnel",function(r){var n=r.getData(),i=n.mapDimension("value"),a=r.get("sort"),o=pr(r,t),s=Pe(r.getBoxLayoutParams(),o.refContainer),l=r.get("orient"),u=s.width,c=s.height,h=jSt(n,a),f=s.x,d=s.y,p=l==="horizontal"?[st(r.get("minSize"),c),st(r.get("maxSize"),c)]:[st(r.get("minSize"),u),st(r.get("maxSize"),u)],v=n.getDataExtent(i),g=r.get("min"),m=r.get("max");g==null&&(g=Math.min(v[0],0)),m==null&&(m=v[1]);var y=r.get("funnelAlign"),_=r.get("gap"),x=l==="horizontal"?u:c,b=(x-_*(n.count()-1))/n.count(),S=function(N,P){if(l==="horizontal"){var F=n.get(i,N)||0,O=fe(F,[g,m],p,!0),$=void 0;switch(y){case"top":$=d;break;case"center":$=d+(c-O)/2;break;case"bottom":$=d+(c-O);break}return[[P,$],[P,$+O]]}var V=n.get(i,N)||0,I=fe(V,[g,m],p,!0),B;switch(y){case"left":B=f;break;case"center":B=f+(u-I)/2;break;case"right":B=f+u-I;break}return[[B,P],[B+I,P]]};a==="ascending"&&(b=-b,_=-_,l==="horizontal"?f+=u:d+=c,h=h.reverse());for(var w=0;w<h.length;w++){var C=h[w],k=h[w+1],T=n.getItemModel(C);if(l==="horizontal"){var A=T.get(["itemStyle","width"]);A==null?A=b:(A=st(A,u),a==="ascending"&&(A=-A));var L=S(C,f),D=S(k,f+A);f+=A+_,n.setItemLayout(C,{points:L.concat(D.slice().reverse())})}else{var E=T.get(["itemStyle","height"]);E==null?E=b:(E=st(E,c),a==="ascending"&&(E=-E));var L=S(C,d),D=S(k,d+E);d+=E+_,n.setItemLayout(C,{points:L.concat(D.slice().reverse())})}}USt(n)})}function qSt(e){e.registerChartView(WSt),e.registerSeriesModel(HSt),e.registerLayout(YSt),e.registerProcessor(Jh("funnel"))}var XSt=.3,ZSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._dataGroup=new yt,r._initialized=!1,r}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.dimensions,h=fO(r);s.diff(l).add(f).update(d).remove(p).execute();function f(g){var m=hO(s,o,g,c,u);W1(m,s,g,h)}function d(g,m){var y=l.getItemGraphicEl(m),_=v9(s,g,c,u);s.setItemGraphicEl(g,y),se(y,{shape:{points:_}},r,g),gi(y),W1(y,s,g,h)}function p(g){var m=l.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var v=KSt(u,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(v)}this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(r,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=fO(n),u=this._progressiveEls=[],c=r.start;c<r.end;c++){var h=hO(a,this._dataGroup,c,s,o);h.incremental=!0,W1(h,a,c,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(ye);function KSt(e,t,r){var n=e.model,i=e.getRect(),a=new Ut({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),Le(a,{shape:{width:i.width,height:i.height}},t,r),a}function v9(e,t,r,n){for(var i=[],a=0;a<r.length;a++){var o=r[a],s=e.get(e.mapDimension(o),t);JSt(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function hO(e,t,r,n,i){var a=v9(e,r,n,i),o=new Gr({shape:{points:a},z2:10});return t.add(o),e.setItemGraphicEl(r,o),o}function fO(e){var t=e.get("smooth",!0);return t===!0&&(t=XSt),t=ko(t),Er(t)&&(t=0),{smooth:t}}function W1(e,t,r,n){e.useStyle(t.getItemVisual(r,"style")),e.style.fill=null,e.setShape("smooth",n.smooth);var i=t.getItemModel(r),a=i.getModel("emphasis");fr(e,i,"lineStyle"),Ie(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function JSt(e,t){return t==="category"?e==null:e==null||isNaN(e)}var QSt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:ut(twt,null,this)})},t.prototype.getRawIndicesByActiveState=function(r){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){r===o&&a.push(i.getRawIndex(s))}),a},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(Ae);function twt(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var r={};return R(t.dimensions,function(n){var i=ewt(n);r[n]=i}),r}}function ewt(e){return+e.replace("dim","")}var rwt=["lineStyle","opacity"],nwt={seriesType:"parallel",reset:function(e,t){var r=e.coordinateSystem,n={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(i,a){r.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(rwt,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};function iwt(e){awt(e),owt(e)}function awt(e){if(!e.parallel){var t=!1;R(e.series,function(r){r&&r.type==="parallel"&&(t=!0)}),t&&(e.parallel=[{}])}}function owt(e){var t=xe(e.parallelAxis);R(t,function(r){if(xt(r)){var n=r.parallelIndex||0,i=xe(e.parallel)[n];i&&i.parallelAxisDefault&&zt(r,i.parallelAxisDefault,!1)}})}var swt=5,lwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this._model=r,this._api=i,this._handlers||(this._handlers={},R(uwt,function(a,o){i.getZr().on(o,this._handlers[o]=ut(a,this))},this)),Xh(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(r,n){vp(this,"_throttledDispatchExpand"),R(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},t.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(et({type:"parallelAxisExpand"},r))},t.type="parallel",t}(Ee),uwt={mousedown:function(e){H1(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(H1(this,"click")&&t){var r=[e.offsetX,e.offsetY],n=Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2);if(n>swt)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!H1(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function H1(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var cwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&zt(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=de(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Zt),hwt=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(ji);function Ls(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=cc(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=cc(s,[0,o]),i=a=cc(s,[i,a]),n=0}t[0]=cc(t[0],r),t[1]=cc(t[1],r);var l=j1(t,n);t[n]+=e;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=cc(t[n],c);var h;return h=j1(t,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(t[1-n]=t[n]+l.sign*i),h=j1(t,n),a!=null&&h.span>a&&(t[1-n]=t[n]+h.sign*a),t}function j1(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function cc(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var U1=R,g9=Math.min,m9=Math.max,dO=Math.floor,fwt=Math.ceil,pO=Je,dwt=Math.PI,pwt=function(){function e(t,r,n){this.type="parallel",this._axesMap=pt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;U1(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new hwt(o,Z_(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();U1(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),xh(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){var n=pr(t,r).refContainer;this._rect=Pe(t.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Eg(t.get("axisExpandWidth"),l),h=Eg(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=t.get("axisExpandWindow"),p;if(d)p=Eg(d[1]-d[0],l),d[1]=d[0]+p;else{p=Eg(c*(h-1),l);var v=t.get("axisExpandCenter")||dO(u/2);d=[c*v-p/2],d[1]=d[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var m=[dO(pO(d[0]/c,1))+1,fwt(pO(d[1]/c,1))-1],y=g/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),U1(n,function(o,s){var l=(i.axisExpandable?gwt:vwt)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:dwt/2,vertical:0},h=[u[a].x+t.x,u[a].y+t.y],f=c[a],d=Ir();Os(d,d,f),La(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(g){s.push(t.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var f=t.getValues(s,c),d=0,p=o.length;d<p;d++){var v=l[d].getActiveState(f[d]);if(v==="inactive"){h="inactive";break}}}r(h,c)}},e.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,r=this._axesMap,n=!1,i=0,a=t.length;i<a;i++)r.get(t[i]).model.getActiveState()!=="normal"&&(n=!0);return n},e.prototype.axisCoordToPoint=function(t,r){var n=this._axesLayout[r];return Ii([t,0],n.transform)},e.prototype.getAxisLayout=function(t){return _t(this._axesLayout[t])},e.prototype.getSlidedAxisExpandWindow=function(t){var r=this._makeLayoutInfo(),n=r.pixelDimIndex,i=r.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[n]-r.layoutBase-r.axisExpandWindow0Pos,l,u="slide",c=r.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(c)f&&c&&s<a*h[0]?(u="jump",l=s-a*h[2]):f&&c&&s>a*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?Ls(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[m9(0,p-d/2)],i[1]=g9(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},e}();function Eg(e,t){return g9(m9(e,t[0]),t[1])}function vwt(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function gwt(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return e<o[0]?(s=e*a,c=a):e<=o[1]?(s=t.axisExpandWindow0Pos+e*n-t.axisExpandWindow[0],l=n,u=!0):(s=r-(i-1-e)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function mwt(e,t){var r=[];return e.eachComponent("parallel",function(n,i){var a=new pwt(n,e,t);a.name="parallel_"+i,a.resize(n,t),n.coordinateSystem=a,a.model=n,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",Ge).models[0];n.coordinateSystem=i.coordinateSystem}}),r}var ywt={create:mwt},DT=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.activeIntervals=[],r}return t.prototype.getAreaSelectStyle=function(){return hu([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(r){var n=this.activeIntervals=_t(r);if(n)for(var i=n.length-1;i>=0;i--)hi(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=r&&r<=n[a][1])return"active";return"inactive"},t}(Zt);ir(DT,Qp);var gu=!0,Lp=Math.min,Th=Math.max,_wt=Math.pow,xwt=1e4,bwt=6,Swt=6,vO="globalPan",wwt={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Cwt={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},gO={brushStyle:{lineWidth:2,stroke:U.color.backgroundTint,fill:U.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Twt=0,tD=function(e){q(t,e);function t(r){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},process.env.NODE_ENV!=="production"&&ft(r),n._zr=r,n.group=new yt,n._uid="brushController_"+Twt++,R(Iwt,function(i,a){this._handlers[a]=ut(i,this)},n),n}return t.prototype.enableBrush=function(r){return process.env.NODE_ENV!=="production"&&ft(this._mounted),this._brushType&&this._doDisableBrush(),r.brushType&&this._doEnableBrush(r),this},t.prototype._doEnableBrush=function(r){var n=this._zr;this._enableGlobalPan||lbt(n,vO,this._uid),R(this._handlers,function(i,a){n.on(a,i)}),this._brushType=r.brushType,this._brushOption=zt(_t(gO),r,!0)},t.prototype._doDisableBrush=function(){var r=this._zr;ubt(r,vO,this._uid),R(this._handlers,function(n,i){r.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(r){if(r&&r.length){var n=this._panels={};R(r,function(i){n[i.panelId]=_t(i)})}else this._panels=null;return this},t.prototype.mount=function(r){r=r||{},process.env.NODE_ENV!=="production"&&(this._mounted=!0),this._enableGlobalPan=r.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:r.x||0,y:r.y||0,rotation:r.rotation||0,scaleX:r.scaleX||1,scaleY:r.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(r){process.env.NODE_ENV!=="production"&&ft(this._mounted),r=at(r,function(f){return zt(_t(gO),f,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Lo(i,r,u,l).add(c).update(c).remove(h).execute(),this;function l(f,d){return(f.id!=null?f.id:n+d)+"-"+f.brushType}function u(f,d){return l(f.__brushOption,d)}function c(f,d){var p=r[f];if(d!=null&&i[d]===s)a[f]=i[d];else{var v=a[f]=d!=null?(i[d].__brushOption=p,i[d]):_9(o,y9(o,p));eD(o,v)}}function h(f){i[f]!==s&&o.group.remove(i[f])}},t.prototype.unmount=function(){if(!(process.env.NODE_ENV!=="production"&&!this._mounted))return this.enableBrush(!1),LT(this),this._zr.remove(this.group),process.env.NODE_ENV!=="production"&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(yi);function y9(e,t){var r=ax[t.brushType].createCover(e,t);return r.__brushOption=t,b9(r,t),e.group.add(r),r}function _9(e,t){var r=rD(t);return r.endCreating&&(r.endCreating(e,t),b9(t,t.__brushOption)),t}function x9(e,t){var r=t.__brushOption;rD(t).updateCoverShape(e,t,r.range,r)}function b9(e,t){var r=t.z;r==null&&(r=xwt),e.traverse(function(n){n.z=r,n.z2=r})}function eD(e,t){rD(t).updateCommon(e,t),x9(e,t)}function rD(e){return ax[e.__brushOption.brushType]}function nD(e,t,r){var n=e._panels;if(!n)return gu;var i,a=e._transform;return R(n,function(o){o.isTargetByCursor(t,r,a)&&(i=o)}),i}function S9(e,t){var r=e._panels;if(!r)return gu;var n=t.__brushOption.panelId;return n!=null?r[n]:gu}function LT(e){var t=e._covers,r=t.length;return R(t,function(n){e.group.remove(n)},e),t.length=0,!!r}function mu(e,t){var r=at(e._covers,function(n){var i=n.__brushOption,a=_t(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});e.trigger("brush",{areas:r,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function kwt(e){var t=e._track;if(!t.length)return!1;var r=t[t.length-1],n=t[0],i=r[0]-n[0],a=r[1]-n[1],o=_wt(i*i+a*a,.5);return o>bwt}function w9(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function C9(e,t,r,n){var i=new yt;return i.add(new Ut({name:"main",style:iD(r),silent:!0,draggable:!0,cursor:"move",drift:Bt(mO,e,t,i,["n","s","w","e"]),ondragend:Bt(mu,t,{isEnd:!0})})),R(n,function(a){i.add(new Ut({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Bt(mO,e,t,i,a),ondragend:Bt(mu,t,{isEnd:!0})}))}),i}function T9(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=Th(i,Swt),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],h=r[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,v=h-s,g=p+i,m=v+i;Za(e,t,"main",o,s,p,v),n.transformable&&(Za(e,t,"w",l,u,a,m),Za(e,t,"e",f,u,a,m),Za(e,t,"n",l,u,g,a),Za(e,t,"s",l,d,g,a),Za(e,t,"nw",l,u,a,a),Za(e,t,"ne",f,u,a,a),Za(e,t,"sw",l,d,a,a),Za(e,t,"se",f,d,a,a))}function MT(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(iD(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?ET(e,a[0]):Dwt(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Cwt[s]+"-resize":null})})}function Za(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(Mwt(aD(e,t,[[n,i],[n+a,i+o]])))}function iD(e){return wt({strokeNoScale:!0},e.brushStyle)}function k9(e,t,r,n){var i=[Lp(e,r),Lp(t,n)],a=[Th(e,r),Th(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Awt(e){return Yl(e.group)}function ET(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=z_(r[t],Awt(e));return n[i]}function Dwt(e,t){var r=[ET(e,t[0]),ET(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function mO(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=A9(t,i,a);R(n,function(u){var c=wwt[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=e.fromRectRange(k9(s[0][0],s[1][0],s[0][1],s[1][1])),eD(t,r),mu(t,{isEnd:!1})}function Lwt(e,t,r,n){var i=t.__brushOption.range,a=A9(e,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),eD(e,t),mu(e,{isEnd:!1})}function A9(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function aD(e,t,r){var n=S9(e,t);return n&&n!==gu?n.clipPath(r,e._transform):_t(r)}function Mwt(e){var t=Lp(e[0][0],e[1][0]),r=Lp(e[0][1],e[1][1]),n=Th(e[0][0],e[1][0]),i=Th(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function Ewt(e,t,r){if(!(!e._brushType||Pwt(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=nD(e,t,r);if(!e._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===gu||s.panelId===a.panelId)&&ax[s.brushType].contain(i[o],r[0],r[1]))return}a&&n.setCursorStyle("crosshair")}}function IT(e){var t=e.event;t.preventDefault&&t.preventDefault()}function PT(e,t,r){return e.childOfName("main").contain(t,r)}function D9(e,t,r,n){var i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,s;if(e._track.push(r.slice()),kwt(e)||i){if(a&&!i){o.brushMode==="single"&&LT(e);var l=_t(o);l.brushType=yO(l.brushType,a),l.panelId=a===gu?null:a.panelId,i=e._creatingCover=y9(e,l),e._covers.push(i)}if(i){var u=ax[yO(e._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(aD(e,i,e._track)),n&&(_9(e,i),u.updateCommon(e,i)),x9(e,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&nD(e,t,r)&&LT(e)&&(s={isEnd:n,removeOnClick:!0});return s}function yO(e,t){return e==="auto"?(process.env.NODE_ENV!=="production"&&ft(t&&t.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),t.defaultBrushType):e}var Iwt={mousedown:function(e){if(this._dragging)_O(this,e);else if(!e.target||!e.target.draggable){IT(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var r=this._creatingPanel=nD(this,e,t);r&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,r=e.offsetY,n=this.group.transformCoordToLocal(t,r);if(Ewt(this,e,n),this._dragging){IT(e);var i=D9(this,e,n,!1);i&&mu(this,i)}},mouseup:function(e){_O(this,e)}};function _O(e,t){if(e._dragging){IT(t);var r=t.offsetX,n=t.offsetY,i=e.group.transformCoordToLocal(r,n),a=D9(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&mu(e,a)}}function Pwt(e,t,r){var n=e._zr;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var ax={lineX:xO(0),lineY:xO(1),rect:{createCover:function(e,t){function r(n){return n}return C9({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=w9(e);return k9(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){T9(e,t,r,n)},updateCommon:MT,contain:PT},polygon:{createCover:function(e,t){var r=new yt;return r.add(new Gr({name:"main",style:iD(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Qr({name:"main",draggable:!0,drift:Bt(Lwt,e,t),ondragend:Bt(mu,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:aD(e,t,r)})},updateCommon:MT,contain:PT}};function xO(e){return{createCover:function(t,r){return C9({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=w9(t),n=Lp(r[0][e],r[1][e]),i=Th(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=S9(t,r);if(o!==gu&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),T9(t,r,l,i)},updateCommon:MT,contain:PT}}function L9(e){return e=oD(e),function(t){return m6(t,e)}}function M9(e,t){return e=oD(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function E9(e,t,r){var n=oD(e);return function(i,a){return n.contain(a[0],a[1])&&!OU(i,t,r)}}function oD(e){return Ct.create(e)}var Rwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new tD(n.getZr())).on("brush",ut(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!Nwt(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!r.get("show")){var s=Bwt(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,h=r.axis.dim,f=l.getAxisLayout(h),d=et({strokeContainThreshold:c},f),p=new vn(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Yp(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=Ct.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:L9(h),isTargetByCursor:E9(h,s,a),getLinearBrushOtherExtent:M9(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Owt(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=at(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Ee);function Nwt(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function Owt(e){var t=e.axis;return at(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function Bwt(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var Fwt={type:"axisAreaSelect",event:"axisAreaSelected"};function $wt(e){e.registerAction(Fwt,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Vwt={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function I9(e){e.registerComponentView(lwt),e.registerComponentModel(cwt),e.registerCoordinateSystem("parallel",ywt),e.registerPreprocessor(iwt),e.registerComponentModel(DT),e.registerComponentView(Rwt),wh(e,"parallel",DT,Vwt),$wt(e)}function zwt(e){Gt(I9),e.registerChartView(ZSt),e.registerSeriesModel(QSt),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,nwt)}var Gwt=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),Wwt=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Gwt},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Ao(this)},t.prototype.downplay=function(){Do(this)},t}(Kt),Hwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new yt,r._focusAdjacencyDisabled=!1,r}return t.prototype.init=function(r,n){this._controller=new Pu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,h=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),BU(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var v=new Wwt,g=At(v);g.dataIndex=p.dataIndex,g.seriesIndex=r.seriesIndex,g.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),x=p.node1.getLayout(),b=p.node1.getModel(),S=b.get("localX"),w=b.get("localY"),C=p.node2.getLayout(),k=p.node2.getModel(),T=k.get("localX"),A=k.get("localY"),L=p.getLayout(),D,E,N,P,F,O,$,V;v.shape.extent=Math.max(1,L.dy),v.shape.orient=d,d==="vertical"?(D=(S!=null?S*u:x.x)+L.sy,E=(w!=null?w*c:x.y)+x.dy,N=(T!=null?T*u:C.x)+L.ty,P=A!=null?A*c:C.y,F=D,O=E*(1-_)+P*_,$=N,V=E*_+P*(1-_)):(D=(S!=null?S*u:x.x)+x.dx,E=(w!=null?w*c:x.y)+L.sy,N=T!=null?T*u:C.x,P=(A!=null?A*c:C.y)+L.ty,F=D*(1-_)+N*_,O=E,$=D*_+N*(1-_),V=P),v.setShape({x1:D,y1:E,x2:N,y2:P,cpx1:F,cpy1:O,cpx2:$,cpy2:V}),v.useStyle(y.getItemStyle()),bO(v.style,d,p);var I=""+m.get("value"),B=dr(m,"edgeLabel");Cr(v,B,{labelFetcher:{getFormattedLabel:function(W,J,Q,tt,it,X){return r.getFormattedLabel(W,J,"edge",tt,dn(it,B.normal&&B.normal.get("formatter"),I),X)}},labelDataIndex:p.dataIndex,defaultText:I}),v.setTextConfig({position:"inside"});var G=m.getModel("emphasis");fr(v,m,"lineStyle",function(W){var J=W.getItemStyle();return bO(J,d,p),J}),s.add(v),f.setItemGraphicEl(p.dataIndex,v);var H=G.get("focus");Ie(v,H==="adjacency"?p.getAdjacentDataIndices():H==="trajectory"?p.getTrajectoryDataIndices():H,G.get("blurScope"),G.get("disabled"))}),o.eachNode(function(p){var v=p.getLayout(),g=p.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new Ut({shape:{x:m!=null?m*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Cr(b,dr(g),{labelFetcher:{getFormattedLabel:function(w,C){return r.getFormattedLabel(w,C,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),fr(b,g),s.add(b),h.setItemGraphicEl(p.dataIndex,b),At(b).dataType="node";var S=_.get("focus");Ie(b,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,v){var g=h.getItemModel(v);g.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(jwt(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new Ru(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(ye);function bO(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");lt(n)&&lt(i)&&(e.fill=new Wh(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function jwt(e,t,r){var n=new Ut({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Le(n,{shape:{width:e.width+20}},t,r),n}var Uwt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)if(o[l].depth!=null&&o[l].depth>=0)s[o[l].depth]=new ne(o[l],this,n);else if(process.env.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");var u=QA(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getData().getItemLayout(p);if(g){var m=g.depth,y=v.levelModels[m];y&&(d.parentModel=y)}return d}),f.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getGraph().getEdgeByIndex(p),m=g.node1.getLayout();if(m){var y=m.depth,_=v.levelModels[y];_&&(d.parentModel=_)}return d})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return rr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),h=c.getLayout().value,f=this.getDataParams(r,i).data.name;return rr("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.layoutMode="box",t.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:U.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:U.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(Ae);function Ywt(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=pr(r,t).refContainer,o=Pe(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,h=u.edges;Xwt(c);var f=de(c,function(g){return g.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),v=r.get("nodeAlign");qwt(c,h,n,i,s,l,d,p,v)})}function qwt(e,t,r,n,i,a,o,s,l){Zwt(e,t,r,i,a,s,l),tCt(e,t,a,i,n,o,s),uCt(e,s)}function Xwt(e){R(e,function(t){var r=ys(t.outEdges,y0),n=ys(t.inEdges,y0),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function Zwt(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<e.length;f++)l[f]=e[f].inEdges.length,l[f]===0&&u.push(e[f]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],g=v.hostGraph.data.getRawDataItem(v.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>d&&(d=g.depth),v.setLayout({depth:m?g.depth:h},!0),a==="vertical"?v.setLayout({dy:r},!0):v.setLayout({dx:r},!0);for(var y=0;y<v.outEdges.length;y++){var _=v.outEdges[y],x=t.indexOf(_);s[x]=0;var b=_.node2,S=e.indexOf(b);--l[S]===0&&c.indexOf(b)<0&&c.push(b)}}++h,u=c,c=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=d>h-1?d:h-1;o&&o!=="left"&&Kwt(e,o,a,w);var C=a==="vertical"?(i-r)/w:(n-r)/w;Qwt(e,C,a)}function P9(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function Kwt(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}R(e,function(h){P9(h)||h.setLayout({depth:Math.max(0,n-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&Jwt(e,n)}function Jwt(e,t){R(e,function(r){!P9(r)&&!r.outEdges.length&&r.setLayout({depth:t},!0)})}function Qwt(e,t,r){R(e,function(n){var i=n.getLayout().depth*t;r==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function tCt(e,t,r,n,i,a,o){var s=eCt(e,o);rCt(s,t,r,n,i,o),Y1(s,i,r,n,o);for(var l=1;a>0;a--)l*=.99,nCt(s,l,o),Y1(s,i,r,n,o),lCt(s,l,o),Y1(s,i,r,n,o)}function eCt(e,t){var r=[],n=t==="vertical"?"y":"x",i=mC(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function rCt(e,t,r,n,i,a){var o=1/0;R(e,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c<o&&(o=c)}),R(e,function(s){R(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),R(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Y1(e,t,r,n,i){var a=i==="vertical"?"x":"y";R(e,function(o){o.sort(function(v,g){return v.getLayout()[a]-g.getLayout()[a]});for(var s,l,u,c=0,h=o.length,f=i==="vertical"?"dx":"dy",d=0;d<h;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+t;var p=i==="vertical"?n:r;if(u=c-t-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function nCt(e,t,r){R(e.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=ys(i.outEdges,iCt,r)/ys(i.outEdges,y0);if(isNaN(a)){var o=i.outEdges.length;a=o?ys(i.outEdges,aCt,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Ms(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ms(i,r))*t;i.setLayout({y:l},!0)}}})})}function iCt(e,t){return Ms(e.node2,t)*e.getValue()}function aCt(e,t){return Ms(e.node2,t)}function oCt(e,t){return Ms(e.node1,t)*e.getValue()}function sCt(e,t){return Ms(e.node1,t)}function Ms(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function y0(e){return e.getValue()}function ys(e,t,r){for(var n=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],r);isNaN(o)||(n+=o)}return n}function lCt(e,t,r){R(e,function(n){R(n,function(i){if(i.inEdges.length){var a=ys(i.inEdges,oCt,r)/ys(i.inEdges,y0);if(isNaN(a)){var o=i.inEdges.length;a=o?ys(i.inEdges,sCt,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Ms(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ms(i,r))*t;i.setLayout({y:l},!0)}}})})}function uCt(e,t){var r=t==="vertical"?"x":"y";R(e,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[r]-a.node2.getLayout()[r]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[r]-a.node1.getLayout()[r]})}),R(e,function(n){var i=0,a=0;R(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),R(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function cCt(e){e.eachSeriesByType("sankey",function(t){var r=t.getGraph(),n=r.nodes,i=r.edges;if(n.length){var a=1/0,o=-1/0;R(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),R(n,function(s){var l=new wr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function hCt(e){e.registerChartView(Hwt),e.registerSeriesModel(Uwt),e.registerLayout(Ywt),e.registerVisual(cCt),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=ex(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var R9=function(){function e(){}return e.prototype._hasEncodeRule=function(t){var r=this.getEncode();return r&&r.get(t)!=null},e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),v=d[1-c].get("type"),g=t.data;if(g&&l){var m=[];R(g,function(x,b){var S;nt(x)?(S=x.slice(),x.unshift(b)):nt(x.value)?(S=et({},x),S.value=S.value.slice(),x.value.unshift(b)):S=x,m.push(S)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:e0(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:e0(v),dimsDef:y.slice()}];return Qh(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:Bt(X6,_,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}(),N9=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:U.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:U.color.shadow}},animationDuration:800},t}(Ae);ir(N9,R9,!0);var fCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=SO(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(gi(h),O9(f,h,a,u)):h=SO(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(ye),dCt=function(){function e(){}return e}(),pCt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new dCt},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();a<i.length;a++)r.moveTo(i[a][0],i[a][1]),a++,r.lineTo(i[a][0],i[a][1])},t}(Kt);function SO(e,t,r,n,i){var a=e.ends,o=new pCt({shape:{points:i?vCt(a,n,e):a}});return O9(e,o,t,r,i),o}function O9(e,t,r,n,i){var a=r.hostModel,o=Au[i?"initProps":"updateProps"];o(t,{shape:{points:e.ends}},a,n),t.useStyle(r.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=r.getItemModel(n),l=s.getModel("emphasis");fr(t,s),Ie(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function vCt(e,t,r){return at(e,function(n){return n=n.slice(),n[t]=r.initBaseline,n})}var Vd=R;function gCt(e){var t=mCt(e);Vd(t,function(r){var n=r.seriesModels;n.length&&(yCt(r),Vd(n,function(i,a){_Ct(i,r.boxOffsetList[a],r.boxWidthList[a])}))})}function mCt(e){var t=[],r=[];return e.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=$t(r,i);a<0&&(a=r.length,r[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(n)}),t}function yCt(e){var t=e.axis,r=e.seriesModels,n=r.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;Vd(r,function(p){l=Math.max(l,p.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}Vd(r,function(p){var v=p.get("boxWidth");nt(v)||(v=[v,v]),o.push([st(v[0],s)||0,st(v[1],s)||0])});var c=s*.8-2,h=c/n*.3,f=(c-h*(n-1))/n,d=f/2-c/2;Vd(r,function(p,v){a.push(d),d+=h+f,i.push(Math.min(Math.max(f,o[v][0]),o[v][1]))})}function _Ct(e,t,r){var n=e.coordinateSystem,i=e.getData(),a=r/2,o=e.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var h=0;h<i.count();h++){var f=i.get(u,h),d=_(f,c[2],h),p=_(f,c[0],h),v=_(f,c[1],h),g=_(f,c[3],h),m=_(f,c[4],h),y=[];x(y,v,!1),x(y,g,!0),y.push(p,v,m,g),b(y,p),b(y,m),b(y,d),i.setItemLayout(h,{initBaseline:d[s],ends:y})}function _(S,w,C){var k=i.get(w,C),T=[];T[o]=S,T[s]=k;var A;return isNaN(S)||isNaN(k)?A=[NaN,NaN]:(A=n.dataToPoint(T),A[o]+=t),A}function x(S,w,C){var k=w.slice(),T=w.slice();k[o]+=a,T[o]-=a,C?S.push(k,T):S.push(T,k)}function b(S,w){var C=w.slice(),k=w.slice();C[o]-=a,k[o]+=a,S.push(C,k)}}function xCt(e,t){t=t||{};for(var r=[],n=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<e.length;o++){var s=hi(e[o].slice()),l=xb(s,.25),u=xb(s,.5),c=xb(s,.75),h=s[0],f=s[s.length-1],d=(i??1.5)*(c-l),p=a?h:Math.max(h,l-d),v=a?f:Math.min(f,c+d),g=t.itemNameFormatter,m=mt(g)?g({value:o}):lt(g)?g.replace("{value}",o+""):o+"";r.push([m,p,l,u,c,v]);for(var y=0;y<s.length;y++){var _=s[y];if(_<p||_>v){var x=[m,_];n.push(x)}}}return{boxData:r,outliers:n}}var bCt={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==Pr){var n="";process.env.NODE_ENV!=="production"&&(n=_n("source data is not applicable for this boxplot transform. Expect number[][].")),ce(n)}var i=xCt(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function SCt(e){e.registerSeriesModel(N9),e.registerChartView(fCt),e.registerLayout(gCt),e.registerTransform(bCt)}var wCt=["itemStyle","borderColor"],CCt=["itemStyle","borderColor0"],TCt=["itemStyle","borderColorDoji"],kCt=["itemStyle","color"],ACt=["itemStyle","color0"];function sD(e,t){return t.get(e>0?kCt:ACt)}function lD(e,t){return t.get(e===0?TCt:e>0?wCt:CCt)}var DCt={seriesType:"candlestick",plan:qh(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=sD(s,o),l.stroke=lD(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");et(u,l)}}}}}},LCt=["color","borderColor"],MCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&wO(u,h))return;var f=q1(h,c,!0);Le(f,{shape:{points:h.ends}},r,c),X1(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&wO(u,d)){a.remove(f);return}f?(se(f,{shape:{points:d.ends}},r,c),gi(f)):f=q1(d),X1(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),CO(r,this.group);var n=r.get("clip",!0)?rv(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=q1(s);X1(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){CO(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(ye),ECt=function(){function e(){}return e}(),ICt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new ECt},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(Kt);function q1(e,t,r){var n=e.ends;return new ICt({shape:{points:r?PCt(n,e):n},z2:100})}function wO(e,t){for(var r=!0,n=0;n<t.ends.length;n++)if(e.contain(t.ends[n][0],t.ends[n][1])){r=!1;break}return r}function X1(e,t,r,n){var i=t.getItemModel(r);e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.__simpleBox=n,fr(e,i);var a=t.getItemLayout(r).sign;R(e.states,function(s,l){var u=i.getModel(l),c=sD(a,u),h=lD(a,u)||c,f=s.style||(s.style={});c&&(f.fill=c),h&&(f.stroke=h)});var o=i.getModel("emphasis");Ie(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function PCt(e,t){return at(e,function(r){return r=r.slice(),r[1]=t.initBaseline,r})}var RCt=function(){function e(){}return e}(),Z1=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new RCt},t.prototype.buildPath=function(r,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];r.moveTo(o,i[a++]),r.lineTo(o,i[a++])}else a+=3},t}(Kt);function CO(e,t,r,n){var i=e.getData(),a=i.getLayout("largePoints"),o=new Z1({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new Z1({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new Z1({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),K1(1,o,e),K1(-1,s,e),K1(0,l,e),n&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function K1(e,t,r,n){var i=lD(e,r)||sD(e,r),a=r.getModel("itemStyle").getItemStyle(LCt);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var B9=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Ae);ir(B9,R9,!0);function NCt(e){!e||!nt(e.series)||R(e.series,function(t){xt(t)&&t.type==="k"&&(t.type="candlestick")})}var OCt={seriesType:"candlestick",plan:qh(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=BCt(e,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=at(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],c=l[1],h=l[2],f=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:e.pipelineContext.large?p:d};function d(v,g){for(var m,y=g.getStore();(m=v.next())!=null;){var _=y.get(s,m),x=y.get(u,m),b=y.get(c,m),S=y.get(h,m),w=y.get(f,m),C=Math.min(x,b),k=Math.max(x,b),T=F(C,_),A=F(k,_),L=F(S,_),D=F(w,_),E=[];O(E,A,0),O(E,T,1),E.push(V(D),V(A),V(L),V(T));var N=g.getItemModel(m),P=!!N.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:TO(y,m,x,b,c,P),initBaseline:x>b?A[a]:T[a],ends:E,brushRect:$(S,w,_)})}function F(I,B){var G=[];return G[i]=B,G[a]=I,isNaN(B)||isNaN(I)?[NaN,NaN]:t.dataToPoint(G)}function O(I,B,G){var H=B.slice(),W=B.slice();H[i]=xm(H[i]+n/2,1,!1),W[i]=xm(W[i]-n/2,1,!0),G?I.push(H,W):I.push(W,H)}function $(I,B,G){var H=F(I,G),W=F(B,G);return H[i]-=n/2,W[i]-=n/2,{x:H[0],y:H[1],width:n,height:W[1]-H[1]}}function V(I){return I[i]=xm(I[i],1),I}}function p(v,g){for(var m=ya(v.count*4),y=0,_,x=[],b=[],S,w=g.getStore(),C=!!e.get(["itemStyle","borderColorDoji"]);(S=v.next())!=null;){var k=w.get(s,S),T=w.get(u,S),A=w.get(c,S),L=w.get(h,S),D=w.get(f,S);if(isNaN(k)||isNaN(L)||isNaN(D)){m[y++]=NaN,y+=3;continue}m[y++]=TO(w,S,T,A,c,C),x[i]=k,x[a]=L,_=t.dataToPoint(x,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[a]=D,_=t.dataToPoint(x,null,b),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function TO(e,t,r,n,i,a){var o;return r>n?o=-1:r<n?o=1:o=a?0:t>0?e.get(i,t-1)<=n?1:-1:1,o}function BCt(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=st(dt(e.get("barMaxWidth"),i),i),o=st(dt(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?st(s,i):Math.max(Math.min(i/2,a),o)}function FCt(e){e.registerChartView(MCt),e.registerSeriesModel(B9),e.registerPreprocessor(NCt),e.registerVisual(DCt),e.registerLayout(OCt)}function kO(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var $Ct=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=new tv(r,n),o=new yt;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=nr(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*r.period+r.effectOffset;l.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(r.period,{opacity:0}).delay(u).start(),o.add(l)}kO(o,r)},t.prototype.updateEffectAnimation=function(r){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==r[s]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}kO(i,r)},t.prototype.highlight=function(){Ao(this)},t.prototype.downplay=function(){Do(this)},t.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},t.prototype.updateData=function(r,n){var i=this,a=r.hostModel;this.childAt(0).updateData(r,n);var o=this.childAt(1),s=r.getItemModel(n),l=r.getItemVisual(n,"symbol"),u=Zh(r.getItemVisual(n,"symbolSize")),c=r.getItemVisual(n,"style"),h=c&&c.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",h)});var d=Mu(r.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=r.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=a.get("showEffectOn"),v.rippleScale=s.get(["rippleEffect","scale"]),v.brushType=s.get(["rippleEffect","brushType"]),v.period=s.get(["rippleEffect","period"])*1e3,v.effectOffset=n/r.count(),v.z=a.getShallow("z")||0,v.zlevel=a.getShallow("zlevel")||0,v.symbolType=l,v.color=h,v.rippleEffectColor=s.get(["rippleEffect","color"]),v.rippleNumber=s.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?v.showEffectOn!=="render"&&i.startEffectAnimation(v):g==="normal"&&v.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=v,Ie(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},t.prototype.fadeOut=function(r){r&&r()},t}(yt),VCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._symbolDraw=new ev($Ct)},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(r)}),this.group.add(o.group)},t.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},t.prototype.updateTransform=function(r,n,i){var a=r.getData();this.group.dirty();var o=nv("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(r){var n=r.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=oht(n.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(ye),zCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(Ae);function GCt(e){e.registerChartView(VCt),e.registerSeriesModel(zCt),e.registerLayout(nv("effectScatter"))}var F9=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a.add(a.createLine(r,n,i)),a._updateEffectSymbol(r,n),a}return t.prototype.createLine=function(r,n,i){return new KA(r,n,i)},t.prototype._updateEffectSymbol=function(r,n){var i=r.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");nt(o)||(o=[o,o]);var l=r.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=nr(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(r,a,n))},t.prototype._updateEffectAnimation=function(r,n,i){var a=this.childAt(1);if(a){var o=r.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),h=lr(n.get("delay"),function(d){return d/r.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;mt(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return ns(r.__p1,r.__cp1)+ns(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Mr,c=eC;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=ns(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):r.__lastT===1?r.scaleY=2*ns(n,s):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=s[0],r.y=s[1]},t.prototype.updateLayout=function(r,n){this.childAt(0).updateLayout(r,n);var i=r.getItemModel(n).getModel("effect");this._updateEffectAnimation(r,i,n)},t}(yt),$9=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createPolyline(r,n,i),a}return t.prototype._createPolyline=function(r,n,i){var a=r.getItemLayout(n),o=new Gr({shape:{points:a}});this.add(o),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childAt(0),s={shape:{points:r.getItemLayout(n)}};se(o,s,a,n),this._updateCommonStl(r,n,i)},t.prototype._updateCommonStl=function(r,n,i){var a=this.childAt(0),o=r.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||r.hasItemOption){var h=o.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}a.useStyle(r.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var f=a.ensureState("emphasis");f.style=s,Ie(this,l,u,c)},t.prototype.updateLayout=function(r,n){var i=this.childAt(0);i.setShape("points",r.getItemLayout(n))},t}(yt),WCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._lastFrame=0,r._lastFramePercent=0,r}return t.prototype.createLine=function(r,n,i){return new $9(r,n,i)},t.prototype._updateAnimationPoints=function(r,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=ns(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(r){var n=r.__t<1?r.__t:2-r.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];r.x=h[0]*(1-c)+c*f[0],r.y=h[1]*(1-c)+c*f[1];var d=r.__t<1?f[0]-h[0]:h[0]-f[0],p=r.__t<1?f[1]-h[1]:h[1]-f[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(F9),HCt=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),jCt=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new HCt},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){r.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)r.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],h=i[o++],f=i[o++];if(r.moveTo(u,c),a>0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;r.quadraticCurveTo(d,p,h,f)}else r.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var h=a[u++],f=a[u++],d=1;d<c;d++){var p=a[u++],v=a[u++];if(Qo(h,f,p,v,s,r,n))return l}l++}else for(var l=0,u=0;u<a.length;){var h=a[u++],f=a[u++],p=a[u++],v=a[u++];if(o>0){var g=(h+p)/2-(f-v)*o,m=(f+v)/2-(p-h)*o;if(WH(h,f,g,m,p,v,s,r,n))return l}else if(Qo(h,f,p,v,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],h=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(h,o),l=Math.max(h,l)}r=this._rect=new Ct(a,o,s,l)}return r},t}(Kt),UCt=function(){function e(){this.group=new yt}return e.prototype.updateData=function(t){this._clear();var r=this._create();r.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(r,t)},e.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(t,r){var n=this._newAdded[0],i=r.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,r),l.__startIndex=t.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new jCt({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=r.getVisual("style");a&&a.stroke&&t.setStyle("stroke",a.stroke),t.setStyle("fill",null);var o=At(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),V9={seriesType:"lines",plan:qh(),reset:function(e){var t=e.coordinateSystem;if(!t){process.env.NODE_ENV!=="production"&&ie("The lines series must have a coordinate system.");return}var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c<i.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,f=[],c=i.start;c<i.end;c++){var d=e.getLineCoords(c,o);r&&(s[h++]=d);for(var p=0;p<d;p++)f=t.dataToPoint(o[p],!1,f),s[h++]=f[0],s[h++]=f[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var v=a.getItemModel(c),d=e.getLineCoords(c,o),g=[];if(r)for(var m=0;m<d;m++)g.push(t.dataToPoint(o[m]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var y=v.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}a.setItemLayout(c,g)}}}}},YCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r),s=r.get("zlevel"),l=r.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&l>0&&(c?process.env.NODE_ENV!=="production"&&console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&rv(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=V9.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return process.env.NODE_ENV!=="production"&&a&&l&&console.warn("Large lines not support effect"),(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new UCt:new JA(o?a?WCt:$9:a?F9:KA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(ye),qCt=typeof Uint32Array>"u"?Array:Uint32Array,XCt=typeof Float64Array>"u"?Array:Float64Array;function AO(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),e.data=at(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),Ck([i,r[0],r[1]])}))}var ZCt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],AO(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(AO(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=ap(this._flatCoords,n.flatCoords),this._flatCoordsOffset=ap(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");if(process.env.NODE_ENV!=="production"&&!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(r),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(r){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),ae(r[0])){for(var i=r.length,a=new qCt(i),o=new XCt(i),s=0,l=0,u=0,c=0;c<i;){u++;var h=r[c++];a[l++]=s+n,a[l++]=h;for(var f=0;f<h;f++){var d=r[c++],p=r[c++];if(o[s++]=d,o[s++]=p,c>i&&process.env.NODE_ENV!=="production")throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){if(process.env.NODE_ENV!=="production"){var i=Yh.get(r.coordinateSystem);if(!i)throw new Error("Unknown coordinate system "+r.coordinateSystem)}var a=new pn(["value"],this);return a.hasItemOption=!1,a.initData(r.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;a.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),a},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Ae);function Ig(e){return e instanceof Array||(e=[e,e]),e}var KCt={seriesType:"lines",reset:function(e){var t=Ig(e.get("symbol")),r=Ig(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Ig(s.getShallow("symbol",!0)),u=Ig(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function JCt(e){e.registerChartView(YCt),e.registerSeriesModel(ZCt),e.registerLayout(V9),e.registerVisual(KCt)}var QCt=256,tTt=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Bi.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=t.length;h.width=r,h.height=n;for(var p=0;p<d;++p){var v=t[p],g=v[0],m=v[1],y=v[2],_=i(y);f.globalAlpha=_,f.drawImage(s,g-c,m-c)}if(!h.width||!h.height)return h;for(var x=f.getImageData(0,0,h.width,h.height),b=x.data,S=0,w=b.length,C=this.minOpacity,k=this.maxOpacity,T=k-C;S<w;){var _=b[S+3]/256,A=Math.floor(_*(QCt-1))*4;if(_>0){var L=o(_)?l:u;_>0&&(_=_*T+C),b[S++]=L[A],b[S++]=L[A+1],b[S++]=L[A+2],b[S++]=L[A+3]*_*256}else S+=4}return f.putImageData(x,0,0),h},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Bi.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;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=U.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}();function eTt(e,t,r){var n=e[1]-e[0];t=at(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&r[s]}}function rTt(e,t){var r=e[1]-e[0];return t=[(t[0]-e[0])/r,(t[1]-e[0])/r],function(n){return n>=t[0]&&n<=t[1]}}function DO(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var nTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;if(n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),process.env.NODE_ENV!=="production"&&!a)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):DO(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(DO(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=Ds(s,"cartesian2d"),u=Ds(s,"matrix"),c,h,f,d;if(l){var p=s.getAxis("x"),v=s.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(p.type==="category"&&v.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(p.onBand&&v.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}c=p.getBandWidth()+.5,h=v.getBandWidth()+.5,f=p.scale.getExtent(),d=v.scale.getExtent()}for(var g=this.group,m=r.getData(),y=r.getModel(["emphasis","itemStyle"]).getItemStyle(),_=r.getModel(["blur","itemStyle"]).getItemStyle(),x=r.getModel(["select","itemStyle"]).getItemStyle(),b=r.get(["itemStyle","borderRadius"]),S=dr(r),w=r.getModel("emphasis"),C=w.get("focus"),k=w.get("blurScope"),T=w.get("disabled"),A=l||u?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=i;L<a;L++){var D=void 0,E=m.getItemVisual(L,"style");if(l){var N=m.get(A[0],L),P=m.get(A[1],L);if(isNaN(m.get(A[2],L))||isNaN(N)||isNaN(P)||N<f[0]||N>f[1]||P<d[0]||P>d[1])continue;var F=s.dataToPoint([N,P]);D=new Ut({shape:{x:F[0]-c/2,y:F[1]-h/2,width:c,height:h},style:E})}else if(u){var O=s.dataToLayout([m.get(A[0],L),m.get(A[1],L)]).rect;if(Er(O.x))continue;D=new Ut({z2:1,shape:O,style:E})}else{if(isNaN(m.get(A[1],L)))continue;var $=s.dataToLayout([m.get(A[0],L)]),O=$.contentRect||$.rect;if(Er(O.x)||Er(O.y))continue;D=new Ut({z2:1,shape:O,style:E})}if(m.hasItemOption){var V=m.getItemModel(L),I=V.getModel("emphasis");y=I.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),x=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),C=I.get("focus"),k=I.get("blurScope"),T=I.get("disabled"),S=dr(V)}D.shape.r=b;var B=r.getRawValue(L),G="-";B&&B[2]!=null&&(G=B[2]+""),Cr(D,S,{labelFetcher:r,labelDataIndex:L,defaultOpacity:E.opacity,defaultText:G}),D.ensureState("emphasis").style=y,D.ensureState("blur").style=_,D.ensureState("select").style=x,Ie(D,C,k,T),D.incremental=o,o&&(D.states.emphasis.hoverLayer=!0),g.add(D),m.setItemGraphicEl(L,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new tTt;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),h=r.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),v=Math.min(c.height+c.y,a.getHeight()),g=p-f,m=v-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(w,C,k){var T=r.dataToPoint([w,C]);return T[0]-=f,T[1]-=d,T.push(k),T}),x=i.getExtent(),b=i.type==="visualMap.continuous"?rTt(x,i.option.range):eTt(x,i.getPieceList(),i.option.selected);u.update(_,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new Rr({style:{width:g,height:m,x:f,y:d,image:u.canvas},silent:!0});this.group.add(S)},t.type="heatmap",t}(ye),iTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return $o(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Yh.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:U.color.primary}}},t}(Ae);function aTt(e){e.registerChartView(nTt),e.registerSeriesModel(iTt)}var oTt=["itemStyle","borderWidth"],LO=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],J1=new Bo,sTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:LO[+c],categoryDim:LO[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var v=EO(o,p),g=MO(o,p,v,f),m=IO(o,f,g);o.setItemGraphicEl(p,m),a.add(m),RO(m,f,g)}}).update(function(p,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(p)){a.remove(g);return}var m=EO(o,p),y=MO(o,p,m,f),_=U9(o,y);g&&_!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(p,null),g=null),g?pTt(g,f,y):g=IO(o,f,y,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=y,a.add(g),RO(g,f,y)}).remove(function(p){var v=s.getItemGraphicEl(p);v&&PO(s,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var d=r.get("clip",!0)?rv(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){PO(a,At(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(ye);function MO(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),f={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};lTt(r,a,i,n,f),uTt(e,t,i,a,o,f.boundingLength,f.pxSign,c,n,f),cTt(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=Mu(r.get("symbolOffset"),d);return hTt(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function lTt(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(nt(o)){var h=[Q1(s,o[0])-l,Q1(s,o[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else o!=null?c=Q1(s,o)-l:t?c=n.coordSysExtent[a.index][u]-l:c=r[a.wh];i.boundingLength=c,t&&(i.repeatCutLength=r[a.wh]);var f=a.xy==="x",d=s.inverse;i.pxSign=f&&!d||!f&&d?c>=0?1:-1:c>0?1:-1}function Q1(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function uTt(e,t,r,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(r[h.wh]),d=e.getItemVisual(t,"symbolSize"),p;nt(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=st(p[h.index],f),p[c.index]=st(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var v=u.symbolScale=[p[0]/s,p[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function cTt(e,t,r,n,i){var a=e.get(oTt)||0;a&&(J1.attr({scaleX:t[0],scaleY:t[1],rotation:r}),J1.updateTransform(),a/=J1.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function hTt(e,t,r,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,v=Math.max(t[d.index]+s,0),g=v;if(n){var m=Math.abs(l),y=lr(e.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var x=st(y,t[d.index]),b=Math.max(v+x*2,0),S=_?0:x*2,w=Ik(n),C=w?n:NO((m+S)/b),k=m-C*v;x=k/2/(_?C:Math.max(C-1,1)),b=v+x*2,S=_?0:x*2,!w&&n!=="fixed"&&(C=u?NO((Math.abs(u)+S)/b):0),g=C*b-S,h.repeatTimes=C,h.symbolMargin=x}var T=p*(g/2),A=h.pathPosition=[];A[f.index]=r[f.wh]/2,A[d.index]=o==="start"?T:o==="end"?l-T:l/2,a&&(A[0]+=a[0],A[1]+=a[1]);var L=h.bundlePosition=[];L[f.index]=r[f.xy],L[d.index]=r[d.xy];var D=h.barRectShape=et({},r);D[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(A[d.index]+T)),D[f.wh]=r[f.wh];var E=h.clipShape={};E[f.xy]=-r[f.xy],E[f.wh]=c.ecSize[f.wh],E[d.xy]=0,E[d.wh]=r[d.wh]}function z9(e){var t=e.symbolPatternSize,r=nr(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function G9(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,c=0,h=a[t.valueDim.index]+o+r.symbolMargin*2;for(uD(e,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?Uc(v,null,p(c),r,n):Uc(v,null,{scaleX:0,scaleY:0},r,n,function(){i.remove(v)}),c++});c<u;c++){var f=z9(r);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=u,i.add(f);var d=p(c);Uc(f,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},r,n)}function p(v){var g=s.slice(),m=r.pxSign,y=v;return(r.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-v),g[l.index]=h*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function W9(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?Uc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=z9(r),i.add(a),Uc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function H9(e,t,r){var n=et({},t.barRectShape),i=e.__pictorialBarRect;i?Uc(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new Ut({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function j9(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=et({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)se(i,{shape:a},s,l);else{a[o.wh]=0,i=new Ut({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Au[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function EO(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=fTt,r.isAnimationEnabled=dTt,r}function fTt(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function dTt(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function IO(e,t,r,n){var i=new yt,a=new yt;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?G9(i,t,r):W9(i,t,r),H9(i,r,n),j9(i,t,r,n),i.__pictorialShapeStr=U9(e,r),i.__pictorialSymbolMeta=r,i}function pTt(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;se(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?G9(e,t,r,!0):W9(e,t,r,!0),H9(e,r,!0),j9(e,t,r,!0)}function PO(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];uD(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){ks(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function U9(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function uD(e,t,r){R(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function Uc(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&Au[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function RO(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");uD(e,function(v){if(v instanceof Rr){var g=v.style;v.useStyle(et({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},r.style))}else v.useStyle(r.style);var m=v.ensureState("emphasis");m.style=o,f&&(m.scaleX=v.scaleX*1.1,m.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=r.z2});var d=t.valueDim.posDesc[+(r.boundingLength>0)],p=e.__pictorialBarRect;p.ignoreClip=!0,Cr(p,dr(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:Sh(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),Ie(e,c,h,a.get("disabled"))}function NO(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var vTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Fs(wp.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:U.color.primary}}}),t}(wp);function gTt(e){e.registerChartView(sTt),e.registerSeriesModel(vTt),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Bt(fj,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,dj("pictorialBar"))}var mTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(g){return g.name}var d=new Lo(this._layersSeries||[],l,f,f),p=[];d.add(ut(v,this,"add")).update(ut(v,this,"update")).remove(ut(v,this,"remove")).execute();function v(g,m,y){var _=o._layers;if(g==="remove"){s.remove(_[m]);return}for(var x=[],b=[],S,w=l[m].indices,C=0;C<w.length;C++){var k=a.getItemLayout(w[C]),T=k.x,A=k.y0,L=k.y;x.push(T,A),b.push(T,A+L),S=a.getItemVisual(w[C],"style")}var D,E=a.getItemLayout(w[0]),N=r.getModel("label"),P=N.get("margin"),F=r.getModel("emphasis");if(g==="add"){var O=p[m]=new yt;D=new nU({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),O.add(D),s.add(O),r.isAnimationEnabled()&&D.setClipPath(yTt(D.getBoundingRect(),r,function(){D.removeClipPath()}))}else{var O=_[y];D=O.childAt(0),s.add(O),p[m]=O,se(D,{shape:{points:x,stackedOnPoints:b}},r),gi(D)}Cr(D,dr(r),{labelDataIndex:w[C-1],defaultText:a.getName(w[C-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),D.setTextConfig({position:null,local:!0});var $=D.getTextContent();$&&($.x=E.x-P,$.y=E.y0+E.y/2),D.useStyle(S),a.setItemGraphicEl(m,D),fr(D,r),Ie(D,F.get("focus"),F.get("blurScope"),F.get("disabled"))}this._layersSeries=l,this._layers=p},t.type="themeRiver",t}(ye);function yTt(e,t,r){var n=new Ut({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Le(n,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,r),n}var tS=2,_Tt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new tf(ut(this.getData,this),ut(this.getRawData,this))},t.prototype.fixData=function(r){var n=r.length,i={},a=mC(r,function(f){return i.hasOwnProperty(f[0]+"")||(i[f[0]+""]=-1),f[2]}),o=[];a.buckets.each(function(f,d){o.push({name:d,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var h=o[l].dataList[c][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,r[n]=[h,0,u],n++)}return r},t.prototype.getInitialData=function(r,n){for(var i=this.getReferringComponents("singleAxis",Ge).models[0],a=i.get("type"),o=de(r.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=pt(),c=0,h=0;h<s.length;++h)l.push(s[h][tS]),u.get(s[h][tS])||(u.set(s[h][tS],c),c++);var f=Jp(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:e0(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new pn(f,this);return d.initData(s),d},t.prototype.getLayerSeries=function(){for(var r=this.getData(),n=r.count(),i=[],a=0;a<n;++a)i[a]=a;var o=r.mapDimension("single"),s=mC(i,function(u){return r.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(h,f){return r.get(o,h)-r.get(o,f)}),l.push({name:c,indices:u})}),l},t.prototype.getAxisTooltipData=function(r,n,i){nt(r)||(r=r?[r]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,f=-1,d=o[c].indices.length,p=0;p<d;++p){var v=a.get(r[0],o[c].indices[p]),g=Math.abs(v-n);g<=h&&(u=v,h=g,f=o[c].indices[p])}s.push(f)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getName(r),s=a.get(a.mapDimension("value"),r);return rr("nameValue",{name:o,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(Ae);function xTt(e,t){e.eachSeriesByType("themeRiver",function(r){var n=r.getData(),i=r.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=st(s[0],o.height),s[1]=st(s[1],o.height);var u=o.height-s[0]-s[1];OO(n,r,u)}else{s[0]=st(s[0],o.width),s[1]=st(s[1],o.width);var c=o.width-s[0]-s[1];OO(n,r,c)}n.setLayout("layoutInfo",a)})}function OO(e,t,r){if(e.count())for(var n=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension("single"),o=e.mapDimension("value"),s=at(i,function(g){return at(g.indices,function(m){var y=n.dataToPoint(e.get(a,m));return y[1]=e.get(o,m),y})}),l=bTt(s),u=l.y0,c=r/l.max,h=i.length,f=i[0].indices.length,d,p=0;p<f;++p){d=u[p]*c,e.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var v=1;v<h;++v)d+=s[v-1][p][1]*c,e.setItemLayout(i[v].indices[p],{layerIndex:v,x:s[v][p][0],y0:d,y:s[v][p][1]*c})}}function bTt(e){for(var t=e.length,r=e[0].length,n=[],i=[],a=0,o=0;o<r;++o){for(var s=0,l=0;l<t;++l)s+=e[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<r;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<r;++c){var h=n[c]+i[c];h>a&&(a=h)}return{y0:i,max:a}}function STt(e){e.registerChartView(mTt),e.registerSeriesModel(_Tt),e.registerLayout(xTt),e.registerProcessor(Jh("themeRiver"))}var wTt=2,CTt=4,BO=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=wTt,o.textConfig={inside:!0},At(o).seriesIndex=n.seriesIndex;var s=new oe({z2:CTt,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;At(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=et({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=yh(d,o));var p=xa(l.getModel("itemStyle"),h,!0);et(h,p),R(xn,function(y){var _=s.ensureState(y),x=l.getModel([y,"itemStyle"]);_.style=x.getItemStyle();var b=xa(x,h);b&&(_.shape=b)}),r?(s.setShape(h),s.shape.r=c.r0,Le(s,{shape:{r:c.r}},i,n.dataIndex)):(se(s,{shape:h},i),gi(s)),s.useStyle(f),this._updateLabel(i);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),m=g==="relative"?ap(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;Ie(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,v=a.get("show")&&!(p!=null&&Math.abs(s)<p);f.ignore=!v,R(cp,function(m){var y=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),_=m==="normal",x=_?f:f.ensureState(m),b=r.getFormattedLabel(d,m);_&&(b=b||n.node.name),x.style=Te(y,{},null,m!=="normal",!0),b&&(x.style.text=b);var S=y.get("show");S!=null&&!_&&(x.ignore=!S);var w=g(y,"position"),C=_?h:h.states[m],k=C.style.fill;C.textConfig={outsideFill:y.get("color")==="inherit"?k:null,inside:w!=="outside"};var T,A=g(y,"distance")||0,L=g(y,"align"),D=g(y,"rotate"),E=Math.PI*.5,N=Math.PI*1.5,P=zn(D==="tangential"?Math.PI/2-l:l),F=P>E&&!up(P-E)&&P<N;w==="outside"?(T=o.r+A,L=F?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?T=0:T=(o.r+o.r0)/2,L="center"):L==="left"?(T=o.r0+A,L=F?"right":"left"):L==="right"&&(T=o.r-A,L=F?"left":"right"),x.style.align=L,x.style.verticalAlign=g(y,"verticalAlign")||"middle",x.x=T*u+o.cx,x.y=T*c+o.cy;var O=0;D==="radial"?O=zn(-l)+(F?Math.PI:0):D==="tangential"?O=zn(Math.PI/2-l)+(F?Math.PI:0):ae(D)&&(O=D*Math.PI/180),x.rotation=zn(O)});function g(m,y){var _=m.get(y);return _??a.get(y)}f.dirtyStyle()},t}(Jr),RT="sunburstRootToNode",FO="sunburstHighlight",TTt="sunburstUnhighlight";function kTt(e){e.registerAction({type:RT,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=Tp(t,[RT],i);if(o){var s=i.getViewRoot();s&&(t.direction=UA(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:FO,update:"none"},function(t,r,n){t=et({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=Tp(t,[FO],a);o&&(t.dataIndex=o.node.dataIndex)}process.env.NODE_ENV!=="production"&&Ze("sunburstHighlight","highlight"),n.dispatchAction(et(t,{type:"highlight"}))}),e.registerAction({type:TTt,update:"updateView"},function(t,r,n){t=et({},t),process.env.NODE_ENV!=="production"&&Ze("sunburstUnhighlight","downplay"),n.dispatchAction(et(t,{type:"downplay"}))})}var ATt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),c=this.group,h=r.get("renderLabelForZeroData"),f=[];u.eachNode(function(y){f.push(y)});var d=this._oldChildren||[];p(f,d),m(l,u),this._initEvents(),this._oldChildren=f;function p(y,_){if(y.length===0&&_.length===0)return;new Lo(_,y,x,x).add(b).update(b).remove(Bt(b,null)).execute();function x(S){return S.getId()}function b(S,w){var C=S==null?null:y[S],k=w==null?null:_[w];v(C,k)}}function v(y,_){if(!h&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,r,n,i),s.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var x=new BO(y,r,n,i);c.add(x),s.setItemGraphicEl(y.dataIndex,x)}}}function g(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,r,n,i):(o.virtualPiece=new BO(y,r,n,i),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Wy(u,c)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:RT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(ye),DTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};Y9(i);var a=this._levelModels=at(r.levels||[],function(l){return new ne(l,this,n)},this),o=jA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=nx(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){KU(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Ae);function Y9(e){var t=0;R(e.children,function(n){Y9(n);var i=n.value;nt(i)&&(i=i[0]),t+=i});var r=e.value;nt(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),nt(e.value)?e.value[0]=r:e.value=r}var $O=Math.PI/180;function LTt(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");nt(a)||(a=[0,a]),nt(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=st(i[0],o),c=st(i[1],s),h=st(a[0],l/2),f=st(a[1],l/2),d=-n.get("startAngle")*$O,p=n.get("minAngle")*$O,v=n.getData().tree.root,g=n.getViewRoot(),m=g.depth,y=n.get("sort");y!=null&&q9(g,y);var _=0;R(g.children,function(P){!isNaN(P.getValue())&&_++});var x=g.getValue(),b=Math.PI/(x||_)*2,S=g.depth>0,w=g.height-(S?-1:1),C=(f-h)/(w||1),k=n.get("clockwise"),T=n.get("stillShowZeroSum"),A=k?1:-1,L=function(P,F){if(P){var O=F;if(P!==v){var $=P.getValue(),V=x===0&&T?b:$*b;V<p&&(V=p),O=F+A*V;var I=P.depth-m-(S?-1:1),B=h+C*I,G=h+C*(I+1),H=n.getLevelModel(P);if(H){var W=H.get("r0",!0),J=H.get("r",!0),Q=H.get("radius",!0);Q!=null&&(W=Q[0],J=Q[1]),W!=null&&(B=st(W,l/2)),J!=null&&(G=st(J,l/2))}P.setLayout({angle:V,startAngle:F,endAngle:O,clockwise:k,cx:u,cy:c,r0:B,r:G})}if(P.children&&P.children.length){var tt=0;R(P.children,function(it){tt+=L(it,F+tt)})}return O-F}};if(S){var D=h,E=h+C,N=Math.PI*2;v.setLayout({angle:N,startAngle:d,endAngle:d+N,clockwise:k,cx:u,cy:c,r0:D,r:E})}L(g,d)})}function q9(e,t){var r=e.children||[];e.children=MTt(r,t),r.length&&R(e.children,function(n){q9(n,t)})}function MTt(e,t){if(mt(t)){var r=at(e,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return r.sort(function(i,a){return t(i.params,a.params)}),at(r,function(i){return e[i.index]})}else{var n=t==="asc";return e.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function ETt(e){var t={};function r(n,i,a){if(n.depth===0)return U.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&lt(s)&&(s=iC(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");et(u,l)})})}function ITt(e){e.registerChartView(ATt),e.registerSeriesModel(DTt),e.registerLayout(Bt(LTt,"sunburst")),e.registerProcessor(Bt(Jh,"sunburst")),e.registerVisual(ETt),kTt(e)}var VO={color:"fill",borderColor:"stroke"},PTt={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},yo=qt(),RTt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return $o(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=yo(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Ae);function NTt(e,t){return t=t||[0,0],at(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function OTt(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:ut(NTt,e)}}}function BTt(e,t){return t=t||[0,0],at([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function FTt(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:ut(BTt,e)}}}function $Tt(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function VTt(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:ut($Tt,e)}}}function zTt(e,t){return t=t||[0,0],at(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function GTt(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:ut(zTt,e)}}}function WTt(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)},layout:function(n,i){return e.dataToLayout(n,i)}}}}function HTt(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r,n){return e.dataToPoint(r,n)},layout:function(r,n){return e.dataToLayout(r,n)}}}}var zO={};function X9(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||ct(e,"text")))}function Z9(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},ct(n,"text")&&(o.text=n.text),ct(n,"rich")&&(o.rich=n.rich),ct(n,"textFill")&&(o.fill=n.textFill),ct(n,"textStroke")&&(o.stroke=n.textStroke),ct(n,"fontFamily")&&(o.fontFamily=n.fontFamily),ct(n,"fontSize")&&(o.fontSize=n.fontSize),ct(n,"fontStyle")&&(o.fontStyle=n.fontStyle),ct(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=ct(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),ct(n,"textPosition")&&(i.position=n.textPosition),ct(n,"textOffset")&&(i.offset=n.textOffset),ct(n,"textRotation")&&(i.rotation=n.textRotation),ct(n,"textDistance")&&(i.distance=n.textDistance)}return GO(o,e),R(o.rich,function(l){GO(l,l)}),{textConfig:i,textContent:a}}function GO(e,t){t&&(t.font=t.textFont||t.font,ct(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),ct(t,"textAlign")&&(e.align=t.textAlign),ct(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),ct(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),ct(t,"textWidth")&&(e.width=t.textWidth),ct(t,"textHeight")&&(e.height=t.textHeight),ct(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),ct(t,"textPadding")&&(e.padding=t.textPadding),ct(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),ct(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),ct(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),ct(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),ct(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),ct(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),ct(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function WO(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||U.color.neutral99;HO(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||U.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||U.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,R(t.rich,function(s){HO(s,s)}),n}function HO(e,t){t&&(ct(t,"fill")&&(e.textFill=t.fill),ct(t,"stroke")&&(e.textStroke=t.fill),ct(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),ct(t,"font")&&(e.font=t.font),ct(t,"fontStyle")&&(e.fontStyle=t.fontStyle),ct(t,"fontWeight")&&(e.fontWeight=t.fontWeight),ct(t,"fontSize")&&(e.fontSize=t.fontSize),ct(t,"fontFamily")&&(e.fontFamily=t.fontFamily),ct(t,"align")&&(e.textAlign=t.align),ct(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),ct(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),ct(t,"width")&&(e.textWidth=t.width),ct(t,"height")&&(e.textHeight=t.height),ct(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),ct(t,"padding")&&(e.textPadding=t.padding),ct(t,"borderColor")&&(e.textBorderColor=t.borderColor),ct(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),ct(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),ct(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),ct(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),ct(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),ct(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),ct(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),ct(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),ct(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),ct(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}function jO(e,t){if(process.env.NODE_ENV!=="production"){var r=e+"^_^"+t;zO[r]||(console.warn('[ECharts] DEPRECATED: "'+e+'" has been deprecated. '+t),zO[r]=!0)}}var K9={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},UO=te(K9),_0=Da(Ma,function(e,t){return e[t]=1,e},{}),YO=Ma.join(", "),x0=["","style","shape","extra"],kh=qt();function cD(e,t,r,n,i){var a=e+"Animation",o=Hh(e,n,i)||{},s=kh(t).userDuring;return o.duration>0&&(o.during=s?ut(XTt,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),et(o,r[a]),o}function Dm(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=kh(e),u=t.style;l.userDuring=t.during;var c={},h={};if(KTt(e,t,h),e.type==="compound")for(var f=e.shape.paths,d=t.shape.paths,p=0;p<d.length;p++){var v=d[p];eS("shape",v,f[p])}else eS("shape",t,h),eS("extra",t,h);if(!a&&s&&(ZTt(e,t,c),qO("shape",e,t,c),qO("extra",e,t,c),JTt(e,t,u,c)),h.style=u,jTt(e,h,o),YTt(e,t),s)if(a){var g={};R(x0,function(y){var _=y?t[y]:t;_&&_.enterFrom&&(y&&(g[y]=g[y]||{}),et(y?g[y]:g,_.enterFrom))});var m=cD("enter",e,t,r,i);m.duration>0&&e.animateFrom(g,m)}else UTt(e,t,i||0,r,c);J9(e,t),u?e.dirty():e.markRedraw()}function J9(e,t){for(var r=kh(e).leaveToProps,n=0;n<x0.length;n++){var i=x0[n],a=i?t[i]:t;a&&a.leaveTo&&(r||(r=kh(e).leaveToProps={}),i&&(r[i]=r[i]||{}),et(i?r[i]:r,a.leaveTo))}}function ox(e,t,r,n){if(e){var i=e.parent,a=kh(e).leaveToProps;if(a){var o=cD("update",e,t,r,0);o.done=function(){i&&i.remove(e)},e.animateTo(a,o)}else i&&i.remove(e)}}function Zl(e){return e==="all"}function jTt(e,t,r){var n=t.style;if(!e.isGroup&&n){if(r){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(e.style)}}e.setStyle(n)}t&&(t.style=null,t&&e.attr(t),t.style=n)}function UTt(e,t,r,n,i){if(i){var a=cD("update",e,t,n,r);a.duration>0&&e.animateFrom(i,a)}}function YTt(e,t){ct(t,"silent")&&(e.silent=t.silent),ct(t,"ignore")&&(e.ignore=t.ignore),e instanceof vi&&ct(t,"invisible")&&(e.invisible=t.invisible),e instanceof Kt&&ct(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var oa={},qTt={setTransform:function(e,t){return process.env.NODE_ENV!=="production"&&ft(ct(_0,e),"Only "+YO+" available in `setTransform`."),oa.el[e]=t,this},getTransform:function(e){return process.env.NODE_ENV!=="production"&&ft(ct(_0,e),"Only "+YO+" available in `getTransform`."),oa.el[e]},setShape:function(e,t){process.env.NODE_ENV!=="production"&&hc(e);var r=oa.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){process.env.NODE_ENV!=="production"&&hc(e);var t=oa.el.shape;if(t)return t[e]},setStyle:function(e,t){process.env.NODE_ENV!=="production"&&hc(e);var r=oa.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&Er(t)&&Ne("style."+e+" must not be assigned with NaN."),n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){process.env.NODE_ENV!=="production"&&hc(e);var t=oa.el.style;if(t)return t[e]},setExtra:function(e,t){process.env.NODE_ENV!=="production"&&hc(e);var r=oa.el.extra||(oa.el.extra={});return r[e]=t,this},getExtra:function(e){process.env.NODE_ENV!=="production"&&hc(e);var t=oa.el.extra;if(t)return t[e]}};function hc(e){if(process.env.NODE_ENV!=="production"&&(e==="transition"||e==="enterFrom"||e==="leaveTo"))throw new Error('key must not be "'+e+'"')}function XTt(){var e=this,t=e.el;if(t){var r=kh(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}oa.el=t,n(qTt)}}function qO(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),Zl(l))et(o,a);else for(var u=xe(l),c=0;c<u.length;c++){var h=u[c],f=a[h];o[h]=f}else if(Zl(s)||$t(s,e)>=0){!o&&(o=n[e]={});for(var d=te(a),c=0;c<d.length;c++){var h=d[c],f=a[h];QTt(i[h],f)&&(o[h]=f)}}}}}function eS(e,t,r){var n=t[e];if(n)for(var i=r[e]={},a=te(n),o=0;o<a.length;o++){var s=a[o];i[s]=Id(n[s])}}function ZTt(e,t,r){for(var n=t.transition,i=Zl(n)?Ma:xe(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=e[o];process.env.NODE_ENV!=="production"&&Q9(o,"el.transition"),r[o]=s}}}function KTt(e,t,r){for(var n=0;n<UO.length;n++){var i=UO[n],a=K9[i],o=t[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Ma.length;n++){var s=Ma[n];t[s]!=null&&(r[s]=t[s])}}function JTt(e,t,r,n){if(r){var i=e.style,a;if(i){var o=r.transition,s=t.transition;if(o&&!Zl(o)){var l=xe(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],h=i[c];a[c]=h}}else if(e.getAnimationStyleProps&&(Zl(s)||Zl(o)||$t(s,"style")>=0)){var f=e.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=te(r),u=0;u<p.length;u++){var c=p[u];if(d[c]){var h=i[c];a[c]=h}}}}}}}function QTt(e,t){return Kr(e)?e!==t:e!=null&&isFinite(e)}var Q9;process.env.NODE_ENV!=="production"&&(Q9=function(e,t){ct(_0,e)||Ne("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+te(_0).join("`, `")+"` are permitted.")});var t7=qt(),t2t=["percent","easing","shape","style","extra"];function e7(e){e.stopAnimation("keyframe"),e.attr(t7(e))}function b0(e,t,r){if(!(!r.isAnimationEnabled()||!t)){if(nt(t)){R(t,function(s){b0(e,s,r)});return}var n=t.keyframes,i=t.duration;if(r&&i==null){var a=Hh("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=t7(e);R(x0,function(s){if(!(s&&!e[s])){var l,u=!1;n.sort(function(c,h){return c.percent-h.percent}),R(n,function(c){var h=e.animators,f=s?c[s]:c;if(process.env.NODE_ENV!=="production"&&c.percent>=1&&(u=!0),!!f){var d=te(f);if(s||(d=de(d,function(g){return $t(t2t,g)<0})),!!d.length){l||(l=e.animate(s,t.loop,!0),l.scope="keyframe");for(var p=0;p<h.length;p++)h[p]!==l&&h[p].targetName===l.targetName&&h[p].stopTracks(d);s&&(o[s]=o[s]||{});var v=s?o[s]:o;R(d,function(g){v[g]=((s?e[s]:e)||{})[g]}),l.whenWithKeys(i*c.percent,f,d,c.easing)}}}),l&&(process.env.NODE_ENV!=="production"&&(u||Ne("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),l.delay(t.delay||0).duration(i).start(t.easing))}})}}}var _o="emphasis",cs="normal",hD="blur",fD="select",Es=[cs,_o,hD,fD],rS={normal:["itemStyle"],emphasis:[_o,"itemStyle"],blur:[hD,"itemStyle"],select:[fD,"itemStyle"]},nS={normal:["label"],emphasis:[_o,"label"],blur:[hD,"label"],select:[fD,"label"]},e2t=["x","y"],r2t="e\0\0",Qn={normal:{},emphasis:{},blur:{},select:{}},XO={cartesian2d:OTt,geo:FTt,single:VTt,polar:GTt,calendar:WTt,matrix:HTt};function S0(e){return e instanceof Kt}function NT(e){return e instanceof vi}function n2t(e,t){t.copyTransform(e),NT(t)&&NT(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,S0(t)&&S0(e)&&t.setShape(e.shape))}var i2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._data,s=r.getData(),l=this.group,u=ZO(r,s,n,i);o||l.removeAll(),s.diff(o).add(function(h){iS(i,null,h,u(h,a),r,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&ox(f,yo(f).option,r)}).update(function(h,f){var d=o.getItemGraphicEl(f);iS(i,d,h,u(h,a),r,l,s)}).execute();var c=r.get("clip",!0)?rv(r.coordinateSystem,!1,r):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(r,n,i,a,o){var s=n.getData(),l=ZO(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var h=r.start;h<r.end;h++){var f=iS(null,null,h,l(h,o),n,this.group,s);f&&(f.traverse(c),u.push(f))}},t.prototype.eachRendered=function(r){Bs(this._progressiveEls||this.group,r)},t.prototype.filterForExposedEvent=function(r,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},t.type="custom",t}(ye);function dD(e){var t=e.type,r;if(t==="path"){var n=e.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=i7(n);r=hp(a,null,i,n.layout||"center"),yo(r).customPathData=a}else if(t==="image")r=new Rr({}),yo(r).customImagePath=e.style.image;else if(t==="text")r=new oe({});else if(t==="group")r=new yt;else if(t==="compoundPath"){var n=e.shape;if(!n||!n.paths){var o="";process.env.NODE_ENV!=="production"&&(o="shape.paths must be specified in compoundPath"),ce(o)}var s=at(n.paths,function(c){if(c.type==="path")return hp(c.shape.pathData,c,null);var h=Vy(c.type);if(!h){var f="";process.env.NODE_ENV!=="production"&&(f='graphic type "'+t+'" can not be found.'),ce(f)}return new h});r=new V_({shape:{paths:s}})}else{var l=Vy(t);if(!l){var o="";process.env.NODE_ENV!=="production"&&(o='graphic type "'+t+'" can not be found.'),ce(o)}r=new l}return yo(r).customGraphicType=t,r.name=e.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function pD(e,t,r,n,i,a,o){e7(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),n&&n.transition==null&&(n.transition=e2t);var l=n&&n.style;if(l){if(t.type==="text"){var u=l;ct(u,"textFill")&&(u.fill=u.textFill),ct(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=S0(t)?l.decal:null;e&&h&&(h.dirty=!0,c=yh(h,e)),l.__decalPattern=c}if(NT(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Dm(t,n,a,{dataIndex:r,isInit:o,clearStyle:!0}),b0(t,n.keyframeAnimation,a)}function r7(e,t,r,n,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(n===!1){var l=a.getState(e);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),fu(a)}}function a2t(e,t,r){if(!e.isGroup){var n=e,i=r.currentZ,a=r.currentZLevel;n.z=i,n.zlevel=a;var o=t.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Es.length;s++)o2t(n,t,Es[s])}}function o2t(e,t,r){var n=r===cs,i=n?t:w0(t,r),a=i?i.z2:null,o;a!=null&&(o=n?e:e.ensureState(r),o.z2=a||0)}function ZO(e,t,r,n){var i=e.get("renderItem");if(typeof i=="string"){var a=mmt(i);a?i=a:process.env.NODE_ENV!=="production"&&console.warn("Custom series renderItem '"+i+`' not found.
362
+ Call 'echarts.registerCustomSeries' to register it.`)}var o=e.coordinateSystem,s={};o&&(process.env.NODE_ENV!=="production"&&(ft(i,"series.render is required."),ft(o.prepareCustoms||XO[o.type],"This coordSys does not support custom series.")),s=o.prepareCustoms?o.prepareCustoms(o):XO[o.type](o));for(var l=wt({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:b,style:w,ordinalRawValue:S,styleEmphasis:C,visual:A,barLayout:L,currentSeriesIndices:D,font:E},s.api||{}),u={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:s2t(e.getData()),itemPayload:e.get("itemPayload")||{}},c,h,f={},d={},p={},v={},g=0;g<Es.length;g++){var m=Es[g];p[m]=e.getModel(rS[m]),v[m]=e.getModel(nS[m])}function y(N){return N===c?h||(h=t.getItemModel(N)):t.getItemModel(N)}function _(N,P){return t.hasItemOption?N===c?f[P]||(f[P]=y(N).getModel(rS[P])):y(N).getModel(rS[P]):p[P]}function x(N,P){return t.hasItemOption?N===c?d[P]||(d[P]=y(N).getModel(nS[P])):y(N).getModel(nS[P]):v[P]}return function(N,P){return c=N,h=null,f={},d={},i&&i(wt({dataIndexInside:N,dataIndex:t.getRawIndex(N),actionType:P?P.type:null},u),l)};function b(N,P){return P==null&&(P=c),t.getStore().get(t.getDimensionIndex(N||0),P)}function S(N,P){P==null&&(P=c),N=N||0;var F=t.getDimensionInfo(N);if(!F){var O=t.getDimensionIndex(N);return O>=0?t.getStore().get(O,P):void 0}var $=t.get(F.name,P),V=F&&F.ordinalMeta;return V?V.categories[$]:$}function w(N,P){process.env.NODE_ENV!=="production"&&jO("api.style","Please write literal style directly instead."),P==null&&(P=c);var F=t.getItemVisual(P,"style"),O=F&&F.fill,$=F&&F.opacity,V=_(P,cs).getItemStyle();O!=null&&(V.fill=O),$!=null&&(V.opacity=$);var I={inheritColor:lt(O)?O:U.color.neutral99},B=x(P,cs),G=Te(B,null,I,!1,!0);G.text=B.getShallow("show")?dt(e.getFormattedLabel(P,cs),Sh(t,P)):null;var H=zy(B,I,!1);return T(N,V),V=WO(V,G,H),N&&k(V,N),V.legacy=!0,V}function C(N,P){process.env.NODE_ENV!=="production"&&jO("api.styleEmphasis","Please write literal style directly instead."),P==null&&(P=c);var F=_(P,_o).getItemStyle(),O=x(P,_o),$=Te(O,null,null,!0,!0);$.text=O.getShallow("show")?dn(e.getFormattedLabel(P,_o),e.getFormattedLabel(P,cs),Sh(t,P)):null;var V=zy(O,null,!0);return T(N,F),F=WO(F,$,V),N&&k(F,N),F.legacy=!0,F}function k(N,P){for(var F in P)ct(P,F)&&(N[F]=P[F])}function T(N,P){N&&(N.textFill&&(P.textFill=N.textFill),N.textPosition&&(P.textPosition=N.textPosition))}function A(N,P){if(P==null&&(P=c),ct(VO,N)){var F=t.getItemVisual(P,"style");return F?F[VO[N]]:null}if(ct(PTt,N))return t.getItemVisual(P,N)}function L(N){if(o.type==="cartesian2d"){var P=o.getBaseAxis();return myt(wt({axis:P},N))}}function D(){return r.getCurrentSeriesIndices()}function E(N){return qk(N,r)}}function s2t(e){var t={};return R(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function iS(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=vD(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Ie(s,n.focus,n.blurScope,n.emphasisDisabled),s}function vD(e,t,r,n,i,a){process.env.NODE_ENV!=="production"&&ft(n,"should not have an null/undefined element setting");var o=-1,s=t;t&&n7(t,n,i)&&(o=$t(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=dD(n),s&&n2t(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Qn.normal.cfg=Qn.normal.conOpt=Qn.emphasis.cfg=Qn.emphasis.conOpt=Qn.blur.cfg=Qn.blur.conOpt=Qn.select.cfg=Qn.select.conOpt=null,Qn.isLegacy=!1,u2t(u,r,n,i,l,Qn),l2t(u,r,n,i,l),pD(e,u,r,n,Qn,i,l),ct(n,"info")&&(yo(u).info=n.info);for(var c=0;c<Es.length;c++){var h=Es[c];if(h!==cs){var f=w0(n,h),d=gD(n,f,h);r7(h,u,f,d,Qn)}}return a2t(u,n,i),n.type==="group"&&c2t(e,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function n7(e,t,r){var n=yo(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&p2t(a)&&i7(a)!==n.customPathData||i==="image"&&ct(o,"image")&&o.image!==n.customImagePath}function l2t(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&n7(o,a,n)&&(o=null),o||(o=dD(a),process.env.NODE_ENV!=="production"&&ft(S0(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),e.setClipPath(o)),pD(null,o,t,a,null,n,i)}}function u2t(e,t,r,n,i,a){if(!(e.isGroup||e.type==="compoundPath")){KO(r,null,a),KO(r,_o,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=e.getTextContent();if(o===!1)c&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=dD(o),e.setTextContent(c)),pD(null,c,t,o,null,n,i);for(var h=o&&o.style,f=0;f<Es.length;f++){var d=Es[f];if(d!==cs){var p=a[d].conOpt;r7(d,c,p,gD(o,p,d),null)}}h?c.dirty():c.markRedraw()}}}}function KO(e,t,r){var n=t?w0(e,t):e,i=t?gD(e,n,_o):e.style,a=e.type,o=n?n.textConfig:null,s=e.textContent,l=s?t?w0(s,t):s:null;if(i&&(r.isLegacy||X9(i,a,!!o,!!l))){r.isLegacy=!0;var u=Z9(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text"),process.env.NODE_ENV!=="production"&&ft(c.type==="text",'textContent.type must be "text"')}var h=t?r[t]:r.normal;h.cfg=o,h.conOpt=l}function w0(e,t){return t?e?e[t]:null:e}function gD(e,t,r){var n=t&&t.style;return n==null&&r===_o&&e&&(n=e.styleEmphasis),n}function c2t(e,t,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){f2t({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:t});return}u&&t.removeAll();for(var c=0;c<o;c++){var h=a[c],f=t.childAt(c);h?(h.ignore==null&&(h.ignore=!1),vD(e,f,r,h,i,t)):(process.env.NODE_ENV!=="production"&&ft(f,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),f.ignore=!0)}for(var d=t.childCount()-1;d>=c;d--){var p=t.childAt(d);h2t(t,p,i)}}}function h2t(e,t,r){t&&ox(t,yo(e).option,r)}function f2t(e){new Lo(e.oldChildren,e.newChildren,JO,JO,e).add(QO).update(QO).remove(d2t).execute()}function JO(e,t){var r=e&&e.name;return r??r2t+t}function QO(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;vD(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function d2t(e){var t=this.context,r=t.oldChildren[e];r&&ox(r,yo(r).option,t.seriesModel)}function i7(e){return e&&(e.pathData||e.d)}function p2t(e){return e&&(ct(e,"pathData")||ct(e,"d"))}function v2t(e){e.registerChartView(i2t),e.registerSeriesModel(RTt)}var Al=qt(),tB=_t,aS=ut,mD=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new yt,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var f=Bt(eB,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}nB(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=FA(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=Al(t).pointerEl=new Au[a.type](tB(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Al(t).labelEl=new oe(tB(r.label));t.add(a),rB(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Al(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=Al(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),rB(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=qp(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){To(u.event)},onmousedown:aS(this._onHandleDragMove,this,0,0),drift:aS(this._onHandleDragMove,this),ondragend:aS(this._onHandleDragEnd,this)}),n.add(i)),nB(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");nt(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Xh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){eB(this._axisPointerModel,!r&&this._moveAnimation,this._handle,oS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(oS(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(oS(i)),Al(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),vp(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function eB(e,t,r,n){a7(Al(r).lastProp,n)||(Al(r).lastProp=n,t?se(r,n,e):(r.stopAnimation(),r.attr(n)))}function a7(e,t){if(xt(e)&&xt(t)){var r=!0;return R(t,function(n,i){r=r&&a7(e[i],n)}),!!r}else return e===t}function rB(e,t){e[t.get(["label","show"])?"show":"hide"]()}function oS(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function nB(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function yD(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function o7(e,t,r,n,i){var a=r.get("value"),o=s7(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Xp(s.get("padding")||0),u=s.getFont(),c=k_(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var v=i.verticalAlign;v==="bottom"&&(h[1]-=d),v==="middle"&&(h[1]-=d/2),g2t(h,f,d,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:Te(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function g2t(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function s7(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:r0(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),lt(o)?a=o.replace("{value}",a):mt(o)&&(a=o(s))}return a}function _D(e,t,r){var n=Ir();return Os(n,n,r.rotation),La(n,n,r.position),Ii([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function l7(e,t,r,n,i,a){var o=vn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),o7(t,n,i,a,{position:_D(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function xD(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function u7(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function iB(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var m2t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=aB(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=yD(a),d=y2t[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=f0(l.getRect(),i);l7(n,r,p,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=f0(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=_D(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=aB(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[r.x,r.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},t}(mD);function aB(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var y2t={line:function(e,t,r){var n=xD([t,r[0]],[t,r[1]],oB(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:u7([t-n/2,r[0]],[n,i],oB(e))}}};function oB(e){return e.dim==="x"?0:1}var _2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:U.color.border,width:1,type:"dashed"},shadowStyle:{color:U.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:U.color.neutral00,padding:[5,7,5,7],backgroundColor:U.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:U.color.accent40,throttle:40}},t}(Zt),co=qt(),x2t=R;function c7(e,t,r){if(!Qt.node){var n=t.getZr();co(n).records||(co(n).records={}),b2t(n,t);var i=co(n).records[e]||(co(n).records[e]={});i.handler=r}}function b2t(e,t){if(co(e).initialized)return;co(e).initialized=!0,r("click",Bt(sB,"click")),r("mousemove",Bt(sB,"mousemove")),r("globalout",w2t);function r(n,i){e.on(n,function(a){var o=C2t(t);x2t(co(e).records,function(s){s&&i(s,a,o.dispatchAction)}),S2t(o.pendings,t)})}}function S2t(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function w2t(e,t,r){e.handler("leave",null,r)}function sB(e,t,r,n){t.handler(e,r,n)}function C2t(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function OT(e,t){if(!Qt.node){var r=t.getZr(),n=(co(r).records||{})[e];n&&(co(r).records[e]=null)}}var T2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";c7("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){OT("axisPointer",n)},t.prototype.dispose=function(r,n){OT("axisPointer",n)},t.type="axisPointer",t}(Ee);function h7(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=cu(a,e);if(o==null||o<0||nt(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),v=[];v[d]=a.get(p,o),v[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(v)||[]}else r=l.dataToPoint(a.getValues(at(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var lB=qt();function k2t(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||ut(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Lm(i)&&(i=h7({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Lm(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Lm(i),f={},d={},p={list:[],map:{}},v={showPointer:Bt(D2t,d),showTooltip:Bt(L2t,p)};R(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);R(s.coordSysAxesInfo[y],function(x,b){var S=x.axis,w=P2t(u,x);if(!h&&_&&(!u||w)){var C=w&&w.value;C==null&&!l&&(C=S.pointToData(i)),C!=null&&uB(x,C,v,!1,f)}})});var g={};return R(c,function(m,y){var _=m.linkGroup;_&&!d[y]&&R(_.axesInfo,function(x,b){var S=d[b];if(x!==m&&S){var w=S.value;_.mapper&&(w=m.axis.scale.parse(_.mapper(w,cB(x),cB(m)))),g[m.key]=w}})}),R(g,function(m,y){uB(c[y],m,v,!0,f)}),M2t(d,c,f),E2t(p,i,e,o),I2t(c,o,r),f}}function uB(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=A2t(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&et(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function A2t(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,e,r);f=d.dataIndices,h=d.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],e,r.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=e-h,v=Math.abs(p);v<=o&&((v<o||p>=0&&s<0)&&(o=v,s=p,i=h,a.length=0),R(f,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function D2t(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function L2t(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Cp(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function M2t(e,t,r){var n=r.axesInfo=[];R(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function E2t(e,t,r,n){if(Lm(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function I2t(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=lB(n)[i]||{},o=lB(n)[i]={};R(e,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function P2t(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function cB(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Lm(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function av(e){Iu.registerAxisPointerClass("CartesianAxisPointer",m2t),e.registerComponentModel(_2t),e.registerComponentView(T2t),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!nt(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=Nxt(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},k2t)}function R2t(e){Gt(RU),Gt(av)}var N2t=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=yD(a),p=B2t[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var v=a.get(["label","margin"]),g=O2t(n,i,a,l,v);o7(r,i,a,o,g)},t}(mD);function O2t(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=Ir();Os(f,f,s),La(f,f,[n.cx,n.cy]),u=Ii([o,-i],f);var d=t.getModel("axisLabel").get("rotate")||0,p=vn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var v=l[1];u=n.coordToPoint([v+i,o]);var g=n.cx,m=n.cy;c=Math.abs(u[0]-g)/v<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-m)/v<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var B2t={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:xD(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:iB(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:iB(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},F2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Zt),bD=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ge).models[0]},t.type="polarAxis",t}(Zt);ir(bD,Qp);var $2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(bD),V2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(bD),SD=function(e){q(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(ji);SD.prototype.dataToRadius=ji.prototype.dataToCoord;SD.prototype.radiusToData=ji.prototype.coordToData;var z2t=qt(),wD=function(e){q(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=k_(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=z2t(r.model),v=p.lastAutoInterval,g=p.lastTickCount;return v!=null&&g!=null&&Math.abs(v-d)<=1&&Math.abs(g-o)<=1&&v>d?d=v:(p.lastTickCount=o,p.lastAutoInterval=d),d},t}(ji);wD.prototype.dataToAngle=ji.prototype.dataToCoord;wD.prototype.angleToData=ji.prototype.coordToData;var f7=["radius","angle"],G2t=function(){function e(t){this.dimensions=f7,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new SD,this._angleAxis=new wD,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)],n)},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],i=t[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},e.prototype.convertToPixel=function(t,r,n){var i=hB(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=hB(r);return i===this?this.pointToData(n):null},e}();function hB(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function W2t(e,t,r){var n=t.get("center"),i=pr(t,r).refContainer;e.cx=st(n[0],i.width)+i.x,e.cy=st(n[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:nt(s)||(s=[0,s]);var l=[st(s[0],o),st(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function H2t(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(n0(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(n0(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),xh(n.scale,n.model),xh(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function j2t(e){return e.mainType==="angleAxis"}function fB(e,t){var r;if(e.type=t.get("type"),e.scale=Z_(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),j2t(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),i=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,i)}t.axis=e,e.model=t}var U2t={dimensions:f7,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new G2t(i+"");a.update=H2t;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");fB(o,l),fB(s,u),W2t(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Ge).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error('Polar "'+lr(n.get("polarIndex"),n.get("polarId"),0)+'" not found');n.coordinateSystem=i.coordinateSystem}}),r}},Y2t=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Pg(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Rg(e){var t=e.getRadiusAxis();return t.inverse?0:1}function dB(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var q2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=at(i.getViewLabels(),function(c){c=_t(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});dB(u),dB(s),R(Y2t,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&X2t[c](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Iu),X2t={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Rg(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new Au[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new jp({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Rg(r)],u=at(n,function(c){return new Qe({shape:Pg(r,[l,l+s],c.coord)})});e.add(li(u,{style:wt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Rg(r)],c=[],h=0;h<i.length;h++)for(var f=0;f<i[h].length;f++)c.push(new Qe({shape:Pg(r,[u,u+l],i[h][f].coord)}));e.add(li(c,{style:wt(s.getModel("lineStyle").getLineStyle(),wt(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,r,n,i,a,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");R(o,function(h,f){var d=l,p=h.tickValue,v=a[Rg(r)],g=r.coordToPoint([v+u,h.coord]),m=r.cx,y=r.cy,_=Math.abs(g[0]-m)/v<.3?"center":g[0]>m?"left":"right",x=Math.abs(g[1]-y)/v<.3?"middle":g[1]>y?"top":"bottom";if(s&&s[p]){var b=s[p];xt(b)&&b.textStyle&&(d=new ne(b.textStyle,l,l.ecModel))}var S=new oe({silent:vn.isLabelSilent(t),style:Te(d,{x:g[0],y:g[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:x})});if(e.add(S),Fo({el:S,componentModel:t,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return S.isTruncated},value:h.rawLabel,tickIndex:f}}),c){var w=vn.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=h.rawLabel,At(S).eventData=w}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<n.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new Qe({shape:Pg(r,a,n[h].coord)}))}for(var h=0;h<c.length;h++)e.add(li(c[h],{style:wt({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new Qe({shape:Pg(r,a,i[u][c].coord)}));e.add(li(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,r,n,i,a){if(n.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,f=-n[0].coord*h,d=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),v=t.get("clockwise"),g=1,m=n.length;g<=m;g++){var y=g===m?n[0].coord:n[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Jr({shape:{cx:r.cx,cy:r.cy,r0:d,r:p,startAngle:f,endAngle:-y*h,clockwise:v},silent:!0})),f=-y*h}for(var g=0;g<c.length;g++)e.add(li(c[g],{style:wt({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},Z2t=["splitLine","splitArea","minorSplitLine"],K2t=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this._axisGroup,o=this._axisGroup=new yt;this.group.add(o);var s=r.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),h=s.getMinorTicksCoords(),f=u.getExtent()[0],d=s.getExtent(),p=Q2t(l,r,f),v=new vn(r,i,p);v.build(),o.add(v.group),Yp(a,o,r),R(Z2t,function(g){r.get([g,"show"])&&!s.scale.isBlank()&&J2t[g](this.group,r,l,f,d,c,h)},this)}},t.type="radiusAxis",t}(Iu),J2t={splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=r.getAngleAxis(),h=Math.PI/180,f=c.getExtent(),d=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<a.length;v++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new Au[d]({shape:{cx:r.cx,cy:r.cy,r:Math.max(a[v].coord,0),startAngle:-f[0]*h,endAngle:-f[1]*h,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)e.add(li(p[v],{style:wt({stroke:l[v%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,r,n,i,a,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++)u.push(new Bo({shape:{cx:r.cx,cy:r.cy,r:o[c][h].coord}}));e.add(li(u,{style:wt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(e,t,r,n,i,a){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=a[0].coord,f=1;f<a.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Jr({shape:{cx:r.cx,cy:r.cy,r0:h,r:a[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=a[f].coord}for(var f=0;f<c.length;f++)e.add(li(c[f],{style:wt({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function Q2t(e,t,r){return{position:[e.cx,e.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}function d7(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function p7(e,t){return t.dim+e.model.componentIndex}function tkt(e,t,r){var n={},i=ekt(de(t.getSeriesByType(e),function(a){return!t.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));t.eachSeriesByType(e,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=p7(s,l),c=d7(a),h=i[u][c],f=h.offset,d=h.width,p=s.getOtherAxis(l),v=a.coordinateSystem.cx,g=a.coordinateSystem.cy,m=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(p.dim),x=o.mapDimension(l.dim),b=As(o,_),S=l.dim!=="radius"||!a.get("roundCap",!0),w=p.model,C=w.get("startValue"),k=p.dataToCoord(C||0),T=0,A=o.count();T<A;T++){var L=o.get(_,T),D=o.get(x,T),E=L>=0?"p":"n",N=k;b&&(n[c][D]||(n[c][D]={p:k,n:k}),N=n[c][D][E]);var P=void 0,F=void 0,O=void 0,$=void 0;if(p.dim==="radius"){var V=p.dataToCoord(L)-k,I=l.dataToCoord(D);Math.abs(V)<m&&(V=(V<0?-1:1)*m),P=N,F=N+V,O=I-f,$=O-d,b&&(n[c][D][E]=F)}else{var B=p.dataToCoord(L,S)-k,G=l.dataToCoord(D);Math.abs(B)<y&&(B=(B<0?-1:1)*y),P=G+f,F=P+d,O=N,$=N+B,b&&(n[c][D][E]=$)}o.setItemLayout(T,{cx:v,cy:g,r0:P,r:F,startAngle:-O*Math.PI/180,endAngle:-$*Math.PI/180,clockwise:O>=$})}}})}function ekt(e){var t={};R(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=p7(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;t[l]=h;var d=d7(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=st(n.get("barWidth"),c),v=st(n.get("barMaxWidth"),c),g=n.get("barGap"),m=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),v&&(f[d].maxWidth=v),g!=null&&(h.gap=g),m!=null&&(h.categoryGap=m)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=st(n.categoryGap,o),l=st(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(v,g){var m=v.maxWidth;m&&m<h&&(m=Math.min(m,u),v.width&&(m=Math.min(m,v.width)),u-=m,v.width=m,c--)}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var f=0,d;R(a,function(v,g){v.width||(v.width=h),d=v,f+=v.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;R(a,function(v,g){r[i][g]=r[i][g]||{offset:p,width:v.width},p+=v.width*(1+l)})}),r}var rkt={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},nkt={splitNumber:5},ikt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="polar",t}(Ee);function akt(e){Gt(av),Iu.registerAxisPointerClass("PolarAxisPointer",N2t),e.registerCoordinateSystem("polar",U2t),e.registerComponentModel(F2t),e.registerComponentView(ikt),wh(e,"angle",$2t,rkt),wh(e,"radius",V2t,nkt),e.registerComponentView(q2t),e.registerComponentView(K2t),e.registerLayout(Bt(tkt,"bar"))}function BT(e,t){t=t||{};var r=e.coordinateSystem,n=e.axis,i={},a=n.position,o=n.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[a],e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),lr(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var f=e.get(["axisLabel","rotate"]);return i.labelRotate=a==="top"?-f:f,i.z2=1,i}var okt=["splitArea","splitLine","breakArea"],skt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="SingleAxisPointer",r}return t.prototype.render=function(r,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new yt;var l=BT(r),u=new vn(r,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),R(okt,function(c){r.get([c,"show"])&&lkt[c](this,this.group,this._axisGroup,r,i)},this),Yp(s,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)},t.prototype.remove=function(){EU(this)},t.type="singleAxis",t}(Iu),lkt={splitLine:function(e,t,r,n,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=n.coordinateSystem.getRect(),h=a.isHorizontal(),f=[],d=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=0;m<p.length;++m){var y=a.toGlobalCoord(p[m].coord);h?(v[0]=y,v[1]=c.y,g[0]=y,g[1]=c.y+c.height):(v[0]=c.x,v[1]=y,g[0]=c.x+c.width,g[1]=y);var _=new Qe({shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},silent:!0});gh(_.shape,u);var x=d++%l.length;f[x]=f[x]||[],f[x].push(_)}for(var b=s.getLineStyle(["color"]),m=0;m<f.length;++m)t.add(li(f[m],{style:wt({stroke:l[m%l.length]},b),silent:!0}))}},splitArea:function(e,t,r,n,i){MU(e,r,n,n)},breakArea:function(e,t,r,n,i){var a=iv(),o=n.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,n,n.coordinateSystem.getRect(),i)}},Mm=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},t}(Zt);ir(Mm,Qp.prototype);var ukt=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.pointToData=function(r,n){return this.coordinateSystem.pointToData(r)[0]},t}(ji),v7=["single"],ckt=function(){function e(t,r,n){this.type="single",this.dimension="single",this.dimensions=v7,this.axisPointerEnabled=!0,this.model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=this.dimension,a=new ukt(i,Z_(t),[0,0],t.get("type"),t.get("position")),o=a.type==="category";a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},e.prototype.update=function(t,r){t.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();R(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),xh(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(t,r){var n=pr(t,r).refContainer;this._rect=Pe(t.getBoxLayoutParams(),n),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var t=this._rect,r=this._axis,n=r.isHorizontal(),i=n?[0,t.width]:[0,t.height],a=r.inverse?1:0;r.setExtent(i[a],i[1-a]),this._updateAxisTransform(r,n?t.x:t.y)},e.prototype._updateAxisTransform=function(t,r){var n=t.getExtent(),i=n[0]+n[1],a=t.isHorizontal();t.toGlobalCoord=a?function(o){return o+r}:function(o){return i-o+r},t.toLocalCoord=a?function(o){return o-r}:function(o){return i-o+r}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(t){var r=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(t[0]))&&t[1]>=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[i.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},e.prototype.convertToPixel=function(t,r,n){var i=pB(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=pB(r);return i===this?this.pointToData(n):null},e}();function pB(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function hkt(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new ckt(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Ge).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var fkt={create:hkt,dimensions:v7},vB=["x","y"],dkt=["width","height"],pkt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=sS(l,1-C0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=yD(a),d=vkt[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=BT(i);l7(n,r,p,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=BT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=_D(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=C0(o),u=sS(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=sS(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(mD),vkt={line:function(e,t,r){var n=xD([t,r[0]],[t,r[1]],C0(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:u7([t-n/2,r[0]],[n,i],C0(e))}}};function C0(e){return e.isHorizontal()?0:1}function sS(e,t){var r=e.getRect();return[r[vB[t]],r[vB[t]]+r[dkt[t]]]}var gkt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(Ee);function mkt(e){Gt(av),Iu.registerAxisPointerClass("SingleAxisPointer",pkt),e.registerComponentView(gkt),e.registerComponentView(skt),e.registerComponentModel(Mm),wh(e,"single",Mm,Mm.defaultOption),e.registerCoordinateSystem("single",fkt)}var ykt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=Du(r);e.prototype.init.apply(this,arguments),gB(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),gB(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:U.color.axisLine,width:1,type:"solid"}},itemStyle:{color:U.color.neutral00,borderWidth:1,borderColor:U.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:U.size.s,color:U.color.secondary},monthLabel:{show:!0,position:"start",margin:U.size.s,align:"center",formatter:null,color:U.color.secondary},yearLabel:{show:!0,position:null,margin:U.size.xl,formatter:null,color:U.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Zt);function gB(e,t){var r=e.cellSize,n;nt(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=at([0,1],function(a){return Qpt(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Pa(e,t,{type:"box",ignoreSize:i})}var _kt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,h=new Ut({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToCalendarLayout([v],!1).tl);var g=o._getLinePointsOfOneWeek(r,v,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new Gr({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return lt(r)&&r?Ypt(r,n):mt(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var v=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},m=this._formatterLabel(v,g),y=new oe({z2:30,style:Te(o,{text:m}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||lt(s))&&(s&&(n=IC(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=o.get("silent"),g=0;g<h[f].length-1;g++){var m=h[f][g].slice(),y=this._firstDayOfMonth[g];if(p){var _=this._firstDayPoints[g];m[d]=(_[d]+h[0][g+1][d])/2}var x=o.get("formatter"),b=s[+y.m-1],S={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:b},w=this._formatterLabel(x,S),C=new oe({z2:30,style:et(Te(o,{text:w}),this._monthTextPositionControl(m,p,i,u,l)),silent:v});a.add(C)}}},t.prototype._weekTextPositionControl=function(r,n,i,a,o){var s="center",l="middle",u=r[0],c=r[1],h=i==="start";return n==="horizontal"?(u=u+a+(h?1:-1)*o[0]/2,s=h?"right":"left"):(c=c+a+(h?1:-1)*o[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(r,n,i,a,o){var s=r.getModel("dayLabel");if(s.get("show")){var l=r.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),h=s.get("margin"),f=l.getFirstDayOfWeek();if(!c||lt(c)){c&&(n=IC(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||at(n.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];h=st(h,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,h=-h);for(var g=s.get("silent"),m=0;m<7;m++){var y=l.getNextNDay(p,m),_=l.dataToCalendarLayout([y.time],!1).center,x=m;x=Math.abs((m+f)%7);var b=new oe({z2:30,style:et(Te(s,{text:c[x]}),this._weekTextPositionControl(_,a,u,h,v)),silent:g});o.add(b)}}},t.type="calendar",t}(Ee),lS=864e5,xkt=function(){function e(t,r,n){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(r,n)}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(t){t=ku(t);var r=t.getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,a=t.getDate(),o=a<10?"0"+a:""+a,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:r+"",m:i,d:o,day:s,time:t.getTime(),formatedDate:r+"-"+i+"-"+o,date:t}},e.prototype.getNextNDay=function(t,r){return r=r||0,r===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+r),this.getDateInfo(t))},e.prototype._update=function(t,r){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];R([0,1],function(h){c(a,h)&&(o[i[h]]=a[h]*s[h])});var l={width:r.getWidth(),height:r.getHeight()},u=this._rect=Pe(o,l);R([0,1],function(h){c(a,h)||(a[h]=u[i[h]]/s[h])});function c(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=a[0],this._sh=a[1]},e.prototype.dataToPoint=function(t,r,n){n=n||[],nt(t)&&(t=t[0]),r==null&&(r=!0);var i=this.getDateInfo(t),a=this._rangeInfo,o=i.formatedDate;if(r&&!(i.time>=a.start.time&&i.time<a.end.time+lS))return n[0]=n[1]=NaN,n;var s=i.day,l=this._getRangeInfo([a.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2),n},e.prototype.pointToData=function(t){var r=this.pointToDate(t);return r&&r.time},e.prototype.dataToLayout=function(t,r,n){n=n||{};var i=n.rect=n.rect||{},a=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,r);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,Ct.copy(a,i),du(a,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(t,r){var n=this.dataToPoint(t,r);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]}},e.prototype.pointToDate=function(t){var r=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 this._orient==="vertical"?this._getDateByWeeksAndDay(n,r-1,i):this._getDateByWeeksAndDay(r,n-1,i)},e.prototype.convertToPixel=function(t,r,n){var i=uS(r);return i===this?i.dataToPoint(n):null},e.prototype.convertToLayout=function(t,r,n){var i=uS(r);return i===this?i.dataToLayout(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=uS(r);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var t=this._model.get("range"),r;if(nt(t)&&t.length===1&&(t=t[0]),nt(t))r=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(r=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);r=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(r=[n,n])}if(!r)return process.env.NODE_ENV!=="production"&&Mi("Invalid date range."),t;var s=this._getRangeInfo(r);return s.start.time>s.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/lS)-Math.floor(r[0].time/lS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),h=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&r<i.fweek||t===i.weeks&&r>i.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){Zp({targetModel:a,coordSysType:"calendar",coordSysProvider:$6})}),n},e.dimensions=["time","value"],e}();function uS(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function bkt(e){e.registerComponentModel(ykt),e.registerComponentView(_kt),e.registerCoordinateSystem("calendar",xkt)}var oo={level:1,leaf:2,nonLeaf:3},xo={none:0,all:1,body:2,corner:3};function FT(e,t,r){var n=t[Pt[r]].getCell(e);return!n&&ae(e)&&e<0&&(n=t[Pt[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function g7(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function m7(e,t,r,n,i){mB(e[0],t,i,r,n,0),mB(e[1],t,i,r,n,1)}function mB(e,t,r,n,i,a){e[0]=1/0,e[1]=-1/0;var o=n[a],s=nt(o)?o:[o],l=s.length,u=!!r;if(l>=1?(yB(e,t,s,u,i,a,0),l>1&&yB(e,t,s,u,i,a,l-1)):(process.env.NODE_ENV!=="production"&&t&&t.push('Should be like [["x1", "x2"], ["y1", "y2"]], or ["x1", "y1"], rather than empty.'),e[0]=e[1]=NaN),u){var c=-i[Pt[1-a]].getLocatorCount(a),h=i[Pt[a]].getLocatorCount(a)-1;r===xo.body?c=Ue(0,c):r===xo.corner&&(h=Wn(-1,h)),h<c&&(c=h=NaN),Er(e[0])&&(e[0]=c),Er(e[1])&&(e[1]=h),e[0]=Ue(Wn(e[0],h),c),e[1]=Ue(Wn(e[1],h),c)}}function yB(e,t,r,n,i,a,o){var s=FT(r[o],i,a);if(!s){process.env.NODE_ENV!=="production"&&!n&&t&&t.push("Can not find cell by coord["+a+"]["+o+"]."),e[0]=e[1]=NaN;return}var l=s.id[Pt[a]],u=l,c=Tkt(s);c&&(u+=c.span[Pt[a]]-1),e[0]=Wn(e[0],l,u),e[1]=Ue(e[1],l,u)}function Ng(e,t){return Er(e[t][0])||Er(e[t][1])}function _B(e,t,r,n){t=t||Skt;for(var i=0;i<n;i++)t[i]=!1;for(;;){for(var a=!1,i=0;i<n;i++){var o=r[i];!t[i]&&o.cellMergeOwner&&wkt(e,o.locatorRange)&&(t[i]=!0,a=!0)}if(!a)break}}var Skt=[];function wkt(e,t){return!xB(e[0],t[0])||!xB(e[1],t[1])?!1:(e[0][0]=Wn(e[0][0],t[0][0]),e[0][1]=Ue(e[0][1],t[0][1]),e[1][0]=Wn(e[1][0],t[1][0]),e[1][1]=Ue(e[1][1],t[1][1]),!0)}function xB(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function bB(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function Ckt(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function SB(e,t,r,n){var i=FT(t[n][0],r,n),a=FT(t[n][1],r,n);e[Pt[n]]=e[er[n]]=NaN,i&&a&&(e[Pt[n]]=i.xy,e[er[n]]=a.xy+a.wh-i.xy)}function Uf(e,t,r,n){return e[Pt[t]]=r,e[Pt[1-t]]=n,e}function Tkt(e){return e&&(e.type===oo.leaf||e.type===oo.nonLeaf)?e:null}function T0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var wB=function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=kkt(t);var n=r.get("data",!0);n!=null&&!nt(n)&&(process.env.NODE_ENV!=="production"&&ie("Illegal echarts option - matrix."+this.dim+".data must be an array if specified."),n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(t,0,0),l();return;function s(u,c,h){var f=0;return u&&R(u,function(d,p){var v=!1,g;lt(d)?g={value:d}:xt(d)?(g=d,d.value!=null&&!lt(d.value)&&(v=!0,g={value:null})):(g={value:null},d!=null&&(v=!0)),v&&process.env.NODE_ENV!=="production"&&ie("Illegal echarts option - matrix."+r.dim+".data["+p+"] must be `string | {value: string}`.");var m={type:oo.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new St,span:Uf(new St,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:T0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:oo.level,xy:NaN,wh:NaN,option:null,id:new St,dim:r});var y=s(g.children,c,h+1),_=Math.max(1,y);m.span[Pt[r.dimIdx]]=_,f+=_,c+=_}),f}function l(){for(var u=[];n.length<o;)for(var c=0;c<a.length;c++){var h=a[c].pop();if(h){h.ordinal=u.length;var f=h.option.value;u.push(f),n.push(h),r._uniqueValueGen.calcDupBase(f)}}r._uniqueValueGen.ensureValueUnique(u,n);var d=r._ordinalMeta=new _p({categories:u,needCollect:!1,deduplication:!1});r._scale=new _h({ordinalMeta:d});for(var p=0;p<r._leavesCount;p++){var v=r._cells[p];v.type=oo.leaf,v.span[Pt[1-r.dimIdx]]=r._levels.length-v.level}r._initCellsId(),r._initLevelIdOptions()}},e.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:oo.level,xy:NaN,wh:NaN,option:null,id:new St,dim:t}],t._initLevelIdOptions();var r=t._ordinalMeta=new _p({needCollect:!0,deduplication:!0,onCollect:function(n,i){var a=t._cells[i]={type:oo.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new St,span:Uf(new St,t.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:t,rect:T0()};t._leavesCount++,t._setCellId(a)}});t._scale=new _h({ordinalMeta:r})},e.prototype._setCellId=function(t){var r=this._levels.length,n=this.dimIdx;Uf(t.id,n,t.firstLeafLocator,t.level-r)},e.prototype._initCellsId=function(){var t=this._levels.length,r=this.dimIdx;R(this._cells,function(n){Uf(n.id,r,n.firstLeafLocator,n.level-t)})},e.prototype._initLevelIdOptions=function(){var t=this._levels.length,r=this.dimIdx,n=this._model.get("levels",!0);n=nt(n)?n:[],R(this._levels,function(i,a){Uf(i.id,r,0,a-t),i.option=n[a]})},e.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},e.prototype.resetLayoutIterator=function(t,r,n,i){if(t=t||new gs,r===this.dimIdx){var a=this._leavesCount,o=n!=null?Math.max(0,n):0;i=i!=null?Math.min(i,a):a,t.reset(this._cells,o,o+i)}else{var a=this._levels.length,o=n!=null?Math.max(0,n+a):0;i=i!=null?Math.min(i,a):a,t.reset(this._levels,o,o+i)}return t},e.prototype.resetCellIterator=function(t){return(t||new gs).reset(this._cells,0)},e.prototype.resetLevelIterator=function(t){return(t||new gs).reset(this._levels,0)},e.prototype.getLayout=function(t,r,n){var i=this.getUnitLayoutInfo(r,n);t[Pt[r]]=i?i.xy:NaN,t[er[r]]=i?i.wh:NaN},e.prototype.getUnitLayoutInfo=function(t,r){return t===this.dimIdx?r<this._leavesCount?this._cells[r]:void 0:this._levels[r+this._levels.length]},e.prototype.getCell=function(t){var r=this._scale.parse(t);return Er(r)?void 0:this._cells[r]},e.prototype.getLocatorCount=function(t){return t===this.dimIdx?this._leavesCount:this._levels.length},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e}();function kkt(e){var t=e.toUpperCase(),r=new RegExp("^"+t+"([0-9]+)$"),n=0;function i(s){var l;s!=null&&(l=s.match(r))&&(n=Ue(n,+l[1]+1))}function a(){return""+t+n++}function o(s,l){for(var u=pt(),c=0;c<s.length;c++){var h=s[c];(h==null||u.get(h)!=null)&&(s[c]=h=a(),l[c].option=wt({value:h},l[c].option)),u.set(h,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var CB=function(){function e(t,r,n){this._model=r,this._dims=n,this._kind=t,this._cellMergeOwnerList=[]}return e.prototype._ensureCellMap=function(){var t=this,r=t._cellMap;return r||(r=t._cellMap=pt(),n()),r;function n(){var a=[],o=t._model.getShallow("data");o&&!nt(o)&&(process.env.NODE_ENV!=="production"&&ie("matrix."+o+".data must be an array if specified."),o=null),R(o,function(p,v){if(!xt(p)||!nt(p.coord)){process.env.NODE_ENV!=="production"&&ie("Illegal matrix."+t._kind+".data["+v+"], must be a {coord: [...], ...}");return}var g=g7([]),m=null;if(process.env.NODE_ENV!=="production"&&(m=[]),m7(g,m,p.coord,t._dims,p.coordClamp?xo[t._kind]:xo.none),Ng(g,0)||Ng(g,1)){process.env.NODE_ENV!=="production"&&ie("Can not determine cells by option matrix."+t._kind+".data["+v+"]: "+(""+m.join(" ")));return}var y=p&&p.mergeCells,_={id:new St,span:new St,locatorRange:g,option:p,cellMergeOwner:y};bB(_,g),a.push(_)});for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u.cellMergeOwner){var c=u.locatorRange;_B(c,s,a,l);for(var h=0;h<l;h++)s[h]&&(a[h].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var f=et({},u.option);f.coord=null;var d={id:new St,span:new St,locatorRange:c,option:f,cellMergeOwner:!0};bB(d,c),a.push(d)}}}R(a,function(p){var v=i(p.id.x,p.id.y);if(p.cellMergeOwner&&(v.cellMergeOwner=!0,v.span=p.span,v.locatorRange=p.locatorRange,v.spanRect=T0(),t._cellMergeOwnerList.push(v)),!(!p.cellMergeOwner&&!p.option))for(var g=0;g<p.span.y;g++)for(var m=0;m<p.span.x;m++){var y=i(p.id.x+m,p.id.y+g);y.option=p.option,p.cellMergeOwner&&(y.inSpanOf=v)}})}function i(a,o){var s=TB(a,o),l=r.get(s);return l||(l=r.set(s,{id:new St(a,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},e.prototype.getCell=function(t){return this._ensureCellMap().get(TB(t[0],t[1]))},e.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},e.prototype.expandRangeByCellMerge=function(t){if(!Ng(t,0)&&!Ng(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){cS[0]=t[0][0],cS[1]=t[1][0];var r=this.getCell(cS),n=r&&r.inSpanOf;if(n){Ckt(t,n.locatorRange);return}}var i=this._cellMergeOwnerList;_B(t,null,i,i.length)},e}(),cS=[];function TB(e,t){return e+"|"+t}var CD={show:!0,color:U.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function TD(e){return{color:"none",borderWidth:1,borderColor:e?"none":U.color.borderTint}}var kB={show:!0,label:CD,itemStyle:TD(!1),silent:void 0,dividerLineStyle:{width:1,color:U.color.border}},Akt={label:CD,itemStyle:TD(!1),silent:void 0},Dkt={label:CD,itemStyle:TD(!0),silent:void 0},Lkt={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:kB,y:kB,body:Akt,corner:Dkt,backgroundStyle:{color:"none",borderColor:U.color.axisLine,borderWidth:1}},Mkt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this._dimModels={x:new AB(this.get("x",!0)||{}),y:new AB(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var n=r.x.dim=new wB("x",r.x),i=r.y.dim=new wB("y",r.y),a={x:n,y:i};this._body=new CB("body",new ne(this.getShallow("body")),a),this._corner=new CB("corner",new ne(this.getShallow("corner")),a)},t.prototype.getDimensionModel=function(r){return this._dimModels[r]},t.prototype.getBody=function(){return this._body},t.prototype.getCorner=function(){return this._corner},t.type="matrix",t.layoutMode="box",t.defaultOption=Lkt,t}(Zt),AB=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},t}(ne),Og=Math.round,Ekt=0,Ikt=99,Pkt={normal:25,special:100},Rkt={normal:50,special:125},Nkt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n){this.group.removeAll();var i=this.group,a=r.coordinateSystem,o=a.getRect(),s=r.getDimensionModel("x"),l=r.getDimensionModel("y"),u=s.dim,c=l.dim;Okt(i,r,n),Bkt(i,r,u,c,n);var h=r.getShallow("borderZ2",!0),f=dt(h,Ikt),d=f-1,p=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);p.lineWidth=0;var v=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);v.fill="none";var g=$T(o.clone(),p,Ekt),m=$T(o.clone(),v,f);g.silent=!0,m.silent=!0,i.add(g),i.add(m);var y=u.getUnitLayoutInfo(0,0),_=c.getUnitLayoutInfo(1,0);y&&_&&(u.shouldShow()&&i.add(DB({x1:o.x,y1:_.xy,x2:o.x+o.width,y2:_.xy},s.getModel("dividerLineStyle").getLineStyle(),d)),c.shouldShow()&&i.add(DB({x1:y.xy,y1:o.y,x2:y.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),d)))},t.type="matrix",t}(Ee);function Okt(e,t,r){n(0),n(1);function n(i){var a=t.getDimensionModel(Pt[i]),o=a.dim;if(o.shouldShow())for(var s=a.getModel("itemStyle"),l=a.getModel("label"),u=t.getShallow("tooltip",!0),c=[],h=o.resetCellIterator();h.next();){var f=h.item,d={};Ct.copy(d,f.rect),kk(c,f.id.x,f.id.y),y7(c,t,e,r,f.option,s,l,a,d,f.option.value,Rkt,u)}}}function Bkt(e,t,r,n,i){a("body",t.getBody(),r,n),r.shouldShow()&&n.shouldShow()&&a("corner",t.getCorner(),n,r);function a(o,s,l,u){var c=new ne(t.getShallow(o,!0)),h=c.getModel("itemStyle"),f=c.getModel("label"),d=new gs,p=new gs,v=[],g=t.getShallow("tooltip",!0);for(u.resetLayoutIterator(p,1);p.next();)for(l.resetLayoutIterator(d,0);d.next();){var m=d.item,y=p.item;kk(v,m.id.x,y.id.y);var _=s.getCell(v);if(!(_&&_.inSpanOf&&_.inSpanOf!==_)){var x={};_&&_.span?Ct.copy(x,_.spanRect):(m.dim.getLayout(x,0,v[0]),y.dim.getLayout(x,1,v[1]));var b=_?_.option:null;y7(v,t,e,i,b,h,f,c,x,b?b.value:null,Pkt,g)}}}}function y7(e,t,r,n,i,a,o,s,l,u,c,h){var f;Bg.option=i?i.itemStyle:null,Bg.parentModel=a,fc.option=i,fc.parentModel=s;var d=dt(fc.getShallow("z2"),i&&i.itemStyle?c.special:c.normal),p=h&&h.show,v=$T(l,Bg.getItemStyle(),d);r.add(v);var g=fc.get("cursor");g!=null&&v.attr("cursor",g);var m;if(u!=null){var y=u+"";if(dc.option=i?i.label:null,dc.parentModel=o,dc.ecModel=n,Cr(v,{normal:dc},{defaultText:y,autoOverflowArea:!0,layoutRect:_t(v.shape)}),m=v.getTextContent(),m){m.z2=d+1;var _=m.style;if(_&&_.overflow&&_.overflow!=="none"&&_.lineOverflow){var x={};Ct.copy(x,l),du(x,(((f=v.style)===null||f===void 0?void 0:f.lineWidth)||0)/2,!0,!0),v.updateInnerText(),m.getLocalTransform(Fg),Fi(Fg,Fg),Ct.applyTransform(x,x,Fg),m.setClipPath(new Ut({shape:x}))}}Fo({el:v,componentModel:t,itemName:y,itemTooltipOption:h,formatterParamsExtra:{xyLocator:e.slice()}})}if(m){var b=dc.get("silent");b==null&&(b=!p),m.silent=b,m.ignoreHostSilent=!0}var S=fc.get("silent");S==null&&(S=!v.style||v.style.fill==="none"||!v.style.fill),v.silent=S,bb(fc),bb(Bg),bb(dc)}var fc=new ne,Bg=new ne,dc=new ne,Fg=[];function $T(e,t,r){var n=t.lineWidth;if(n){var i=e.x+e.width,a=e.y+e.height;e.x=Gn(e.x,n,!0),e.y=Gn(e.y,n,!0),e.width=Gn(i,n,!0)-e.x,e.height=Gn(a,n,!0)-e.y}return new Ut({shape:e,style:t,z2:r})}function DB(e,t,r){var n=t.lineWidth;return n&&(Og(e.x1*2)===Og(e.x2*2)&&(e.x1=e.x2=Gn(e.x1,n,!0)),Og(e.y1*2)===Og(e.y2*2)&&(e.y1=e.y2=Gn(e.y1,n,!0))),new Qe({shape:e,style:t,silent:!0,z2:r})}var Fkt=function(){function e(t,r,n){this.dimensions=e.dimensions,this.type="matrix",this._model=t;var i=this._dimModels={x:t.getDimensionModel("x"),y:t.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(t,n)}return e.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},e.create=function(t,r){var n=[];return t.eachComponent("matrix",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){Zp({targetModel:a,coordSysType:"matrix",coordSysProvider:$6})}),n},e.prototype.getRect=function(){return this._rect},e.prototype._resize=function(t,r){var n=this._dims,i=this._dimModels,a=this._rect=Pe(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});LB(i,n,a,0),LB(i,n,a,1),MB(0,n),MB(1,n),EB(this._model.getBody(),n),EB(this._model.getCorner(),n)},e.prototype.dataToPoint=function(t,r,n){return n=n||[],this.dataToLayout(t,r,Yf),n[0]=Yf.rect.x+Yf.rect.width/2,n[1]=Yf.rect.y+Yf.rect.height/2,n},e.prototype.dataToLayout=function(t,r,n){var i=this._dims;n=n||{};var a=n.rect=n.rect||{};a.x=a.y=a.width=a.height=NaN;var o=n.matrixXYLocatorRange=g7(n.matrixXYLocatorRange);return nt(t)?(m7(o,null,t,i,dt(r&&r.clamp,xo.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==xo.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==xo.body)&&this._model.getCorner().expandRangeByCellMerge(o)),SB(a,o,i,0),SB(a,o,i,1),n):(process.env.NODE_ENV!=="production"&&ie("Input data must be an array in `convertToLayout`, `convertToPixel`"),n)},e.prototype.pointToData=function(t,r,n){var i=this._dims;return IB(ra,0,i,t,r&&r.clamp),IB(ra,1,i,t,r&&r.clamp),n=n||[],n[0]=n[1]=NaN,ra.y===Vr.inCorner&&ra.x===Vr.inBody?PB(ra,n,0,i):ra.x===Vr.inCorner&&ra.y===Vr.inBody?PB(ra,n,1,i):(RB(ra,n,0,i),RB(ra,n,1,i)),n},e.prototype.convertToPixel=function(t,r,n,i){var a=fS(r);return a===this?a.dataToPoint(n,i):void 0},e.prototype.convertToLayout=function(t,r,n,i){var a=fS(r);return a===this?a.dataToLayout(n,i):void 0},e.prototype.convertFromPixel=function(t,r,n,i){var a=fS(r);return a===this?a.pointToData(n,i):void 0},e.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},e.dimensions=["x","y","value"],e}(),Yf={rect:T0()},$g=new gs,hS=new gs;function LB(e,t,r,n){for(var i=1-n,a=t[Pt[n]],o=t[Pt[i]],s=o.shouldShow(),l=a.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,n);u.next();)u.item.wh=u.item.xy=NaN;for(var c=r[er[n]],h=a.getLocatorCount(n)+o.getLocatorCount(n),f=new ne,d=o.resetLevelIterator();d.next();)f.option=d.item.option,f.parentModel=e[Pt[i]],g(d.item,s?f.get("levelSize"):0);for(var p=new ne,v=a.resetCellIterator();v.next();)v.item.type===oo.leaf&&(p.option=v.item.option,p.parentModel=void 0,g(v.item,p.get("size")));function g(w,C){var k=$kt(C,n,r);Er(k)||(w.wh=VT(k,c),c=VT(c-w.wh),h--)}var m=h?c/h:0,y=!h&&c>=1,_=r[Pt[n]],x=a.getLocatorCount(n)-1,b=new gs;for(o.resetLayoutIterator(b,n);b.next();)S(b.item);for(a.resetLayoutIterator(b,n);b.next();)S(b.item);function S(w){Er(w.wh)&&(w.wh=m),w.xy=_,w.id[Pt[n]]===x&&!y&&(w.wh=r[Pt[n]]+r[er[n]]-w.xy),_+=w.wh}}function MB(e,t){for(var r=t[Pt[e]].resetCellIterator();r.next();){var n=r.item;k0(n.rect,e,n.id,n.span,t),k0(n.rect,1-e,n.id,n.span,t),n.type===oo.nonLeaf&&(n.xy=n.rect[Pt[e]],n.wh=n.rect[er[e]])}}function EB(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;k0(i,0,a,n,t),k0(i,1,a,n,t)}})}function k0(e,t,r,n,i){e[er[t]]=0;var a=r[Pt[t]],o=a<0?i[Pt[1-t]]:i[Pt[t]],s=o.getUnitLayoutInfo(t,r[Pt[t]]);if(e[Pt[t]]=s.xy,e[er[t]]=s.wh,n[Pt[t]]>1){var l=o.getUnitLayoutInfo(t,r[Pt[t]]+n[Pt[t]]-1);e[er[t]]=l.xy+l.wh-s.xy}}function $kt(e,t,r){var n=Ny(e,r[er[t]]);return VT(n,r[er[t]])}function VT(e,t){return Math.max(Math.min(e,dt(t,1/0)),0)}function fS(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var Vr={inBody:1,inCorner:2,outside:3},ra={x:null,y:null,point:[]};function IB(e,t,r,n,i){var a=r[Pt[t]],o=r[Pt[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),l=a.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,h=e.point[t]=n[t];if(!l&&!c){e[Pt[t]]=Vr.outside;return}if(i===xo.body){l?(e[Pt[t]]=Vr.inBody,h=Wn(s.xy+s.wh,Ue(l.xy,h)),e.point[t]=h):e[Pt[t]]=Vr.outside;return}else if(i===xo.corner){c?(e[Pt[t]]=Vr.inCorner,h=Wn(c.xy+c.wh,Ue(u.xy,h)),e.point[t]=h):e[Pt[t]]=Vr.outside;return}var f=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:f,p=s?s.xy+s.wh:f;if(h<d){if(!i){e[Pt[t]]=Vr.outside;return}h=d}else if(h>p){if(!i){e[Pt[t]]=Vr.outside;return}h=p}e.point[t]=h,e[Pt[t]]=f<=h&&h<=p?Vr.inBody:d<=h&&h<=f?Vr.inCorner:Vr.outside}function PB(e,t,r,n){var i=1-r;if(e[Pt[r]]!==Vr.outside)for(n[Pt[r]].resetCellIterator(hS);hS.next();){var a=hS.item;if(NB(e.point[r],a.rect,r)&&NB(e.point[i],a.rect,i)){t[r]=a.ordinal,t[i]=a.id[Pt[i]];return}}}function RB(e,t,r,n){if(e[Pt[r]]!==Vr.outside){var i=e[Pt[r]]===Vr.inCorner?n[Pt[1-r]]:n[Pt[r]];for(i.resetLayoutIterator($g,r);$g.next();)if(Vkt(e.point[r],$g.item)){t[r]=$g.item.id[Pt[r]];return}}}function Vkt(e,t){return t.xy<=e&&e<=t.xy+t.wh}function NB(e,t,r){return t[Pt[r]]<=e&&e<=t[Pt[r]]+t[er[r]]}function zkt(e){e.registerComponentModel(Mkt),e.registerComponentView(Nkt),e.registerCoordinateSystem("matrix",Fkt)}function Gkt(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function OB(e,t){var r;return R(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function Wkt(e,t,r){var n=et({},r),i=e[t],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;ft(!o||i.type===o,'Please set $action: "replace" to change `type`')}zt(i,n,!0),Pa(i,n,{ignoreSize:!0}),H6(r,i),Vg(r,i),Vg(r,i,"shape"),Vg(r,i,"style"),Vg(r,i,"extra"),r.clipPath=i.clipPath}else e[t]=n;else a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var _7=["transition","enterFrom","leaveTo"],Hkt=_7.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Vg(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?_7:Hkt,i=0;i<n.length;i++){var a=n[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function jkt(e,t){if(e&&(e.hv=t.hv=[OB(t,["left","right"]),OB(t,["top","bottom"])],e.type==="group")){var r=e,n=t;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var Ukt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,r,n),this.option.elements=i},t.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=PH(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];R(l,function(c,h){var f=c.newOption;process.env.NODE_ENV!=="production"&&ft(xt(f)||c.existing,"Empty graphic option definition"),f&&(u.push(f),Gkt(c,f),Wkt(o,h,f),jkt(o[h],f))},this),i.elements=de(o,function(c){return c&&delete c.$action,c!=null})},t.prototype._flatten=function(r,n,i){R(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},t.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},t.type="graphic",t.defaultOption={elements:[]},t}(Zt),BB={path:null,compoundPath:null,group:yt,image:Rr,text:oe},ii=qt(),Ykt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._elMap=pt()},t.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},t.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");R(n,function(l){var u=ur(l.id,null),c=u!=null?i.get(u):null,h=ur(l.parentId,null),f=h!=null?i.get(h):a,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,g=l.textConfig;if(p&&X9(p,d,!!g,!!v)){var m=Z9(p,d,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!v&&m.textContent&&(v=m.textContent)}var y=qkt(l);process.env.NODE_ENV!=="production"&&c&&ft(f===c.parent,"Changing parent is not supported.");var _=l.$action||"merge",x=_==="merge",b=_==="replace";if(x){var S=!c,w=c;S?w=FB(u,f,l.type,i):(w&&(ii(w).isNew=!1),e7(w)),w&&(Dm(w,y,r,{isInit:S}),$B(w,l,o,s))}else if(b){Em(c,l,i,r);var C=FB(u,f,l.type,i);C&&(Dm(C,y,r,{isInit:!0}),$B(C,l,o,s))}else _==="remove"&&(J9(c,l),Em(c,l,i,r));var k=i.get(u);if(k&&v)if(x){var T=k.getTextContent();T?T.attr(v):k.setTextContent(new oe(v))}else b&&k.setTextContent(new oe(v));if(k){var A=l.clipPath;if(A){var L=A.type,D=void 0,S=!1;if(x){var E=k.getClipPath();S=!E||ii(E).type!==L,D=S?zT(L):E}else b&&(S=!0,D=zT(L));k.setClipPath(D),Dm(D,A,r,{isInit:S}),b0(D,A.keyframeAnimation,r)}var N=ii(k);k.setTextConfig(g),N.option=l,Xkt(k,r,l),Fo({el:k,componentModel:r,itemName:k.name,itemTooltipOption:l.tooltip}),b0(k,l.keyframeAnimation,r)}})}},t.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var h=i[c],f=ur(h.id,null),d=f!=null?o.get(f):null;if(!(!d||!d.isGroup)){var p=d.parent,v=p===a,g=ii(d),m=ii(p);g.width=st(g.option.width,v?s:m.width)||0,g.height=st(g.option.height,v?l:m.height)||0}}for(var c=i.length-1;c>=0;c--){var h=i[c],f=ur(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,m=ii(p),y=p===a?{width:s,height:l}:{width:m.width,height:m.height},_={},x=j_(d,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!ii(d).isNew&&x){for(var b=h.transition,S={},w=0;w<u.length;w++){var C=u[w],k=_[C];b&&(Zl(b)||$t(b,C)>=0)?S[C]=k:d[C]=k}se(d,S,r,0)}else d.attr(_)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Em(i,ii(i).option,n,r._lastGraphicModel)}),this._elMap=pt()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Ee);function zT(e){process.env.NODE_ENV!=="production"&&ft(e,"graphic type MUST be set");var t=ct(BB,e)?BB[e]:Vy(e);process.env.NODE_ENV!=="production"&&ft(t,"graphic type "+e+" can not be found");var r=new t({});return ii(r).type=e,r}function FB(e,t,r,n){var i=zT(r);return t.add(i),n.set(e,i),ii(i).id=e,ii(i).isNew=!0,i}function Em(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){Em(a,t,r,n)}),ox(e,t,n),r.removeKey(ii(e).id))}function $B(e,t,r,n){e.isGroup||R([["cursor",vi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];ct(t,a)?e[a]=dt(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),R(te(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=mt(a)?a:null}}),ct(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function qkt(e){return e=et({},e),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(V6),function(t){delete e[t]}),e}function Xkt(e,t,r){var n=At(e).eventData;!e.silent&&!e.ignore&&!n&&(n=At(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function Zkt(e){e.registerComponentModel(Ukt),e.registerComponentView(Ykt),e.registerPreprocessor(function(t){var r=t.graphic;nt(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var VB=["x","y","radius","angle","single"],Kkt=["cartesian2d","polar","singleAxis"];function Jkt(e){var t=e.get("coordinateSystem");return $t(Kkt,t)>=0}function hs(e){return process.env.NODE_ENV!=="production"&&ft(e),e+"Axis"}function Qkt(e,t){var r=pt(),n=[],i=pt();e.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=r.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(r.get(h)||r.set(h,[]))[f]=!0})}return n}function x7(e){var t=e.ecModel,r={infoList:[],infoMap:pt()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(hs(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var dS=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),Mp=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=zB(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=zB(r);zt(this.option,r,!0),zt(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=pt(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(VB,function(i){var a=this.getReferringComponents(hs(i),Dft);if(a.specified){n=!0;var o=new dS;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new dS;if(f.add(h.componentIndex),r.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",Ge).models[0];d&&R(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",Ge).models[0]&&f.add(p.componentIndex)})}}}a&&R(VB,function(u){if(a){var c=i.findComponents({mainType:hs(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new dS;h.add(c[0].componentIndex),r.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(hs(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){process.env.NODE_ENV!=="production"&&ft(r&&n!=null);var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(hs(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&ft(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Zt);function zB(e){var t={};return R(["start","end","startValue","endValue","throttle"],function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var tAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t}(Mp),kD=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.dataZoomModel=r,this.ecModel=n,this.api=i},t.type="dataZoom",t}(Ee),eAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t}(kD),Cc=R,GB=hi,rAt=function(){function e(t,r,n,i){this._dimName=t,this._axisIndex=r,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(t){return this._dataZoomModel===t},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(r){if(Jkt(r)){var n=hs(this._dimName),i=r.getReferringComponents(n,Ge).models[0];i&&this._axisIndex===i.componentIndex&&t.push(r)}},this),t},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return _t(this._minMaxSpan)},e.prototype.calculateDataWindow=function(t){var r=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Cc(["start","end"],function(f,d){var p=t[f],v=t[f+"Value"];a[d]==="percent"?(p==null&&(p=o[d]),v=i.parse(fe(p,o,r))):(u=!0,v=v==null?r[d]:i.parse(v),p=fe(v,r,o)),l[d]=v==null||isNaN(v)?r[d]:v,s[d]=p==null||isNaN(p)?o[d]:p}),GB(l),GB(s);var c=this._minMaxSpan;u?h(l,s,r,o,!1):h(s,l,o,r,!0);function h(f,d,p,v,g){var m=g?"Span":"ValueSpan";Ls(0,f,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)d[y]=fe(f[y],p,v,!0),g&&(d[y]=i.parse(d[y]))}return{valueWindow:l,percentWindow:s}},e.prototype.reset=function(t){if(t===this._dataZoomModel){var r=this.getTargetSeriesModels();this._dataExtent=nAt(this,this._dimName,r),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(t,r){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;Cc(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var h=u.getStore(),f=at(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,v,g,m=0;m<c.length;m++){var y=h.get(f[m],d),_=!isNaN(y),x=y<o[0],b=y>o[1];if(_&&!x&&!b)return!0;_&&(g=!0),x&&(p=!0),b&&(v=!0)}return g&&p&&v})}else Cc(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(v){return s(v)?v:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});Cc(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;Cc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=fe(n[0]+o,n,[0,100],!0):a!=null&&(o=fe(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=TH(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function nAt(e,t,r){var n=[1/0,-1/0];Cc(r,function(o){Oyt(n,o.getData(),t)});var i=e.getAxisModel(),a=yj(i.axis.scale,i,n).calculate();return[a.min,a.max]}var iAt={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(hs(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new rAt(i,a,s,e),r.push(o.__dzAxisProxy))});var n=pt();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function aAt(e){e.registerAction("dataZoom",function(t,r){var n=Qkt(r,t);R(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var WB=!1;function AD(e){WB||(WB=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,iAt),aAt(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function oAt(e){e.registerComponentModel(tAt),e.registerComponentView(eAt),AD(e)}var oi=function(){function e(){}return e}(),b7={};function Tc(e,t){b7[e]=t}function S7(e){return b7[e]}var sAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=S7(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),zt(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:U.color.border,borderRadius:0,borderWidth:0,padding:U.size.m,itemSize:15,itemGap:U.size.s,showTitle:!0,iconStyle:{borderColor:U.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:U.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(Zt);function w7(e,t){var r=Xp(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Ut({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var lAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(y,_){h.push(_)}),new Lo(this._featureNames||[],h).add(f).update(f).remove(Bt(f,null)).execute(),this._featureNames=h;function f(y,_){var x=h[y],b=h[_],S=u[x],w=new ne(S,r,r.ecModel),C;if(a&&a.newTitle!=null&&a.featureName===x&&(S.title=a.newTitle),x&&!b){if(uAt(x))C={onclick:w.option.onclick,featureName:x};else{var k=S7(x);if(!k)return;C=new k}c[x]=C}else if(C=c[b],!C)return;C.uid=Uh("toolbox-feature"),C.model=w,C.ecModel=n,C.api=i;var T=C instanceof oi;if(!x&&b){T&&C.dispose&&C.dispose(n,i);return}if(!w.get("show")||T&&C.unusable){T&&C.remove&&C.remove(n,i);return}d(w,C,x),w.setIconStatus=function(A,L){var D=this.option,E=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[A]=L,E[A]&&(L==="emphasis"?Ao:Do)(E[A])},C instanceof oi&&C.render&&C.render(w,n,i,a)}function d(y,_,x){var b=y.getModel("iconStyle"),S=y.getModel(["emphasis","iconStyle"]),w=_ instanceof oi&&_.getIcons?_.getIcons():y.get("icon"),C=y.get("title")||{},k,T;lt(w)?(k={},k[x]=w):k=w,lt(C)?(T={},T[x]=C):T=C;var A=y.iconPaths={};R(k,function(L,D){var E=qp(L,{},{x:-s/2,y:-s/2,width:s,height:s});E.setStyle(b.getItemStyle());var N=E.ensureState("emphasis");N.style=S.getItemStyle();var P=new oe({style:{text:T[D],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:qk({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},n)},ignore:!0});E.setTextContent(P),Fo({el:E,componentModel:r,itemName:D,formatterParamsExtra:{title:T[D]}}),E.__title=T[D],E.on("mouseover",function(){var F=S.getItemStyle(),O=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:S.get("textFill")||F.fill||F.stroke||U.color.neutral99,backgroundColor:S.get("textBackgroundColor")}),E.setTextConfig({position:S.get("textPosition")||O}),P.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){y.get(["iconStatus",D])!=="emphasis"&&i.leaveEmphasis(this),P.hide()}),(y.get(["iconStatus",D])==="emphasis"?Ao:Do)(E),o.add(E),E.on("click",ut(_.onclick,_,n,i,D)),A[D]=E})}var p=pr(r,i).refContainer,v=r.getBoxLayoutParams(),g=r.get("padding"),m=Pe(v,p,g);ql(r.get("orient"),o,r.get("itemGap"),m.width,m.height),j_(o,v,p,g),o.add(w7(o.getBoundingRect(),r)),l||o.eachChild(function(y){var _=y.__title,x=y.ensureState("emphasis"),b=x.textConfig||(x.textConfig={}),S=y.getTextContent(),w=S&&S.ensureState("emphasis");if(w&&!mt(w)&&_){var C=w.style||(w.style={}),k=k_(_,oe.makeFont(C)),T=y.x+o.x,A=y.y+o.y+s,L=!1;A+k.height>i.getHeight()&&(b.position="top",L=!0);var D=L?-5-k.height:s+10;T+k.width/2>i.getWidth()?(b.position=["100%",D],C.align="right"):T-k.width/2<0&&(b.position=[0,D],C.align="left")}})},t.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof oi&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){R(this._features,function(i){i instanceof oi&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof oi&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(Ee);function uAt(e){return e.indexOf("my")===0}var cAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||U.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Qt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var v=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,v)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),x.focus(),b.execCommand("SaveAs",!0,v),document.body.removeChild(_)}}else{var S=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',C=window.open();C.document.write(w),C.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:U.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(oi),HB="__ec_magicType_stack__",hAt=[["line","bar"],["stack"]],fAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(jB[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=jB[i](f,d,h,a);p&&(wt(p,h.option),s.series.push(p));var v=h.coordinateSystem;if(v&&v.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=h.getReferringComponents(y,Ge).models[0],x=_.componentIndex;s[y]=s[y]||[];for(var b=0;b<=x;b++)s[y][x]=s[y][x]||{};s[y][x].boundaryGap=i==="bar"}}};R(hAt,function(h){$t(h,i)>=0&&R(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=zt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(oi),jB={line:function(e,t,r,n){if(e==="bar")return zt({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return zt({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===HB;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),zt({id:t,stack:i?"":HB},n.get(["option","stack"])||{},!0)}};Fa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var sx=new Array(60).join("-"),Ah=" ";function dAt(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function pAt(e){var t=[];return R(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(at(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(v){return v}))});for(var u=[s.join(Ah)],c=0;c<l[0].length;c++){for(var h=[],f=0;f<l.length;f++)h.push(l[f][c]);u.push(h.join(Ah))}t.push(u.join(`
363
363
  `))}),t.join(`
364
364
 
365
365
  `+sx+`
@@ -376,7 +376,7 @@ echarts.use([`+L+"]);":"Unknown series "+A))}return}if(h==="tooltip"){if(_){proc
376
376
  `),meta:t.meta}}function A0(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function mAt(e){var t=e.slice(0,e.indexOf(`
377
377
  `));if(t.indexOf(Ah)>=0)return!0}var GT=new RegExp("["+Ah+"]+","g");function yAt(e){for(var t=e.split(/\n+/g),r=A0(t.shift()).split(GT),n=[],i=at(r,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=A0(t[a]).split(GT);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function _At(e){for(var t=e.split(/\n+/g),r=A0(t.shift()),n=[],i=0;i<t.length;i++){var a=A0(t[i]);if(a){var o=a.split(GT),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:r,data:n}}function xAt(e,t){var r=e.split(new RegExp(`
378
378
  *`+sx+`
379
- *`,"g")),n={series:[]};return R(r,function(i,a){if(mAt(i)){var o=yAt(i),s=t[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=_At(i);n.series.push(o)}}),n}var bAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||U.color.neutral00;var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),f=a.get("contentToOption"),d=gAt(r);if(mt(h)){var p=h(n.getOption());lt(p)?u.innerHTML=p:lu(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var v=c.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=a.get("textColor"),v.borderColor=a.get("textareaBorderColor"),v.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var g=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),x=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var b=this;function S(){i.removeChild(o),b._dom=null}Jw(_,"click",S),Jw(x,"click",function(){if(f==null&&h!=null||f!=null&&h==null){process.env.NODE_ENV!=="production"&&Ne("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),S();return}var w;try{mt(f)?w=f(u,n.getOption()):w=xAt(c.value,g)}catch(C){throw S(),new Error("Data view format error "+C)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),S()}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=y,!a.get("readOnly")&&m.appendChild(x),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.getDefaultOption=function(r){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:U.color.background,textColor:U.color.primary,textareaColor:U.color.background,textareaBorderColor:U.color.border,buttonColor:U.color.accent50,buttonTextColor:U.color.neutral00};return n},t}(oi);function SAt(e,t){return at(e,function(r,n){var i=t&&t[n];if(xt(i)&&!nt(i)){var a=xt(r)&&!nt(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=wt(r,i),o&&delete r.name,r}else return r})}Fa({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var r=[];R(e.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)r.push(et({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:SAt(n.data,a)})}}),t.mergeOption(wt({series:r},e.newOption))});var C7=R,T7=qt();function wAt(e,t){var r=DD(e);C7(t,function(n,i){for(var a=r.length-1;a>=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function CAt(e){var t=DD(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return C7(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function TAt(e){T7(e).snapshots=null}function kAt(e){return DD(e).length}function DD(e){var t=T7(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var AAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){TAt(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(oi);Fa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var DAt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LD=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=UB(r,t);R(LAt,function(o,s){(!n||!n.include||$t(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=pS[n.brushType](0,a,i);n.__rangeOffset={offset:ZB[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){R(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=pS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){R(t,function(n){var i=this.findTargetInfo(n,r);if(process.env.NODE_ENV!=="production"&&(ft(!i||i===!0||n.coordRange,"coordRange must be specified when coord index specified."),ft(!i||i!==!0||n.range,"range must be specified in global brush.")),n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=pS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?ZB[n.brushType](a.values,o.offset,MAt(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return at(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:LU(i),isTargetByCursor:EU(i,t,n.coordSysModel),getLinearBrushOtherExtent:MU(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&&$t(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=UB(r,t),a=0;a<n.length;a++){var o=n[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<YB.length;l++)if(YB[l](i,o))return o}return!0},e}();function WT(e){return e[0]>e[1]&&e.reverse(),e}function UB(e,t){return Wc(e,t,{includeMainTypes:DAt})}var LAt={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=pt(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,f){($t(r,h.getAxis("x").model)>=0||$t(n,h.getAxis("y").model)>=0)&&c.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:qB.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){R(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:qB.geo})})}},YB=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],qB={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Yl(e)),t}},pS={lineX:Bt(XB,0),lineY:Bt(XB,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[WT([i[0],a[0]]),WT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=at(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function XB(e,t,r,n){process.env.NODE_ENV!=="production"&&ft(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][e]),a=WT(at([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var ZB={lineX:Bt(KB,0),lineY:Bt(KB,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return at(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function KB(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function MAt(e,t){var r=JB(e),n=JB(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function JB(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var HT=R,EAt=wft("toolbox-dataZoom_"),IAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new tD(i.getZr()),this._brushController.on("brush",ut(this._onBrush,this)).mount()),NAt(r,n,this,a,i),RAt(r,n)},t.prototype.onclick=function(r,n,i){PAt[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new LD(MD(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),wAt(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),v=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(h=Ls(0,h.slice(),f.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},t.prototype._dispatchZoomAction=function(r){var n=[];HT(r,function(i,a){n.push(_t(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:U.color.backgroundTint}};return n},t}(oi),PAt={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(CAt(this.ecModel))}};function MD(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function RAt(e,t){e.setIconStatus("back",kAt(t)>1?"emphasis":"normal")}function NAt(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new LD(MD(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}ovt("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=MD(n),o=Wc(e,a);HT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),HT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:EAt+u+h};f[c]=h,i.push(f)}return i});function OAt(e){e.registerComponentModel(sAt),e.registerComponentView(lAt),Tc("saveAsImage",cAt),Tc("magicType",fAt),Tc("dataView",bAt),Tc("dataZoom",IAt),Tc("restore",AAt),Gt(oAt)}var BAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:U.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:U.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:U.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:U.color.tertiary,fontSize:14}},t}(Zt);function k7(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function A7(e){if(Qt.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var D7=A7(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),FAt=A7(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function L7(e,t){if(!e)return t;t=O6(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function $At(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var VAt=L7(FAt,"transition"),ED=L7(D7,"transform"),zAt="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Qt.transform3dSupported?"will-change:transform;":"");function GAt(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function WAt(e,t,r){if(!lt(r)||r==="inside")return"";var n=e.get("backgroundColor"),i=e.get("borderWidth");t=vu(t);var a=GAt(r),o=Math.max(Math.round(i)*1.5,6),s="",l=ED+":",u;$t(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=t+" solid "+i+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+v.join("")+'"></div>'}function HAt(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(Qt.transformSupported?""+ED+i:",left"+i+",top"+i)),VAt+":"+a}function QB(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Qt.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Qt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+ED+":"+o+";":[["top",0],["left",0],[D7,o]]}function jAt(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=dt(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function UAt(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),h=e.getModel("textStyle"),f=b8(e,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),t&&a>0&&i.push(HAt(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var v="border-"+p,g=O6(v),m=e.get(g);m!=null&&i.push(v+":"+m+(p==="color"?"":"px"))}),i.push(jAt(h)),f!=null&&i.push("padding:"+Xp(f).join("px ")+"px"),i.join(";")+";"}function tF(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&qct(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var YAt=function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Qt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(lt(a)?document.querySelector(a):lu(a)?a:mt(a)&&a(t.getDom()));tF(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();ei(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=$At(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=zAt+UAt(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+QB(a[0],a[1],!0)+("border-color:"+vu(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(lt(a)&&n.get("trigger")==="item"&&!k7(n)&&(s=WAt(n,i,a)),lt(t))o.innerHTML=t+s;else if(t){o.innerHTML="",nt(t)||(t=[t]);for(var l=0;l<t.length;l++)lu(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,r){if(this.el){var n=this._styleCoord;if(tF(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=QB(n[0],n[1]);R(a,function(o){i[o[0]]=o[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){var t=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",Qt.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ut(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;Xct(t&&t.painter&&t.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var n=r.parentNode;n&&n.removeChild(r)}this.el=this._container=null},e}(),qAt=function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),rF(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return e.prototype.update=function(t){var r=t.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(t,r,n,i,a){var o=this;xt(t)&&ce(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new oe({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:b8(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,r=this.el.getBoundingRect(),n=eF(t.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},e.prototype.moveTo=function(t,r){var n=this.el;if(n){var i=this._styleCoord;rF(i,this._zr,t,r),t=i[0],r=i[1];var a=n.style,o=Ko(a.borderWidth||0),s=eF(a);n.x=t+o+s.left,n.y=r+o+s.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ut(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function Ko(e){return Math.max(0,e)}function eF(e){var t=Ko(e.shadowBlur||0),r=Ko(e.shadowOffsetX||0),n=Ko(e.shadowOffsetY||0);return{left:Ko(t-r),right:Ko(t+r),top:Ko(t-n),bottom:Ko(t+n)}}function rF(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var XAt=new Ut({shape:{x:-1,y:-1,width:2,height:2}}),ZAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){if(!(Qt.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=Mft(i.get("renderMode"));this._tooltipContent=a==="richText"?new qAt(n):new YAt(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(r,n,i){if(!(Qt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?Xh(this,"_updatePosition",50,"fixRate"):vp(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");c7("itemTooltip",this._api,ut(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Qt.node||!i.getDom())){var o=nF(a,i);this._ticket="";var s=a.dataByCoordSys,l=tDt(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=XAt;c.x=a.x,c.y=a.y,c.update(),At(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var h=h7(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(nF(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=qf([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=At(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Fl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(At(c).dataIndex!=null?l=c:At(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=ut(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=qf([n.tooltipOption],a),l=this._renderMode,u=[],c=rr("section",{blocks:[],noHeader:!0}),h=[],f=new qb;R(r,function(y){R(y.dataByAxis,function(_){var x=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!x||b==null)){var S=s7(b,x.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=rr("section",{header:S,noHeader:!ci(S),sortBlocks:!0,blocks:[]});c.blocks.push(w),R(_.seriesDataIndices,function(C){var k=i.getSeriesByIndex(C.seriesIndex),T=C.dataIndexInside,A=k.getDataParams(T);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=r0(x.axis,{value:b}),A.axisValueLabel=S,A.marker=f.makeTooltipMarker("item",vu(A.color),l);var L=vP(k.formatTooltip(T,!0,null)),D=L.frag;if(D){var E=qf([k],a).get("valueFormatter");w.blocks.push(E?et({valueFormatter:E},D):D)}L.text&&h.push(L.text),u.push(A)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),v=bP(c,f,l,p,i.get("useUTC"),s.get("textStyle"));v&&h.unshift(v);var g=l==="richText"?`
379
+ *`,"g")),n={series:[]};return R(r,function(i,a){if(mAt(i)){var o=yAt(i),s=t[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=_At(i);n.series.push(o)}}),n}var bAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||U.color.neutral00;var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),f=a.get("contentToOption"),d=gAt(r);if(mt(h)){var p=h(n.getOption());lt(p)?u.innerHTML=p:lu(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var v=c.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=a.get("textColor"),v.borderColor=a.get("textareaBorderColor"),v.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var g=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),x=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var b=this;function S(){i.removeChild(o),b._dom=null}Jw(_,"click",S),Jw(x,"click",function(){if(f==null&&h!=null||f!=null&&h==null){process.env.NODE_ENV!=="production"&&Ne("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),S();return}var w;try{mt(f)?w=f(u,n.getOption()):w=xAt(c.value,g)}catch(C){throw S(),new Error("Data view format error "+C)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),S()}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=y,!a.get("readOnly")&&m.appendChild(x),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.getDefaultOption=function(r){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:U.color.background,textColor:U.color.primary,textareaColor:U.color.background,textareaBorderColor:U.color.border,buttonColor:U.color.accent50,buttonTextColor:U.color.neutral00};return n},t}(oi);function SAt(e,t){return at(e,function(r,n){var i=t&&t[n];if(xt(i)&&!nt(i)){var a=xt(r)&&!nt(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=wt(r,i),o&&delete r.name,r}else return r})}Fa({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var r=[];R(e.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)r.push(et({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:SAt(n.data,a)})}}),t.mergeOption(wt({series:r},e.newOption))});var C7=R,T7=qt();function wAt(e,t){var r=DD(e);C7(t,function(n,i){for(var a=r.length-1;a>=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function CAt(e){var t=DD(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return C7(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function TAt(e){T7(e).snapshots=null}function kAt(e){return DD(e).length}function DD(e){var t=T7(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var AAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){TAt(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(oi);Fa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var DAt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LD=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=UB(r,t);R(LAt,function(o,s){(!n||!n.include||$t(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=pS[n.brushType](0,a,i);n.__rangeOffset={offset:ZB[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){R(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=pS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){R(t,function(n){var i=this.findTargetInfo(n,r);if(process.env.NODE_ENV!=="production"&&(ft(!i||i===!0||n.coordRange,"coordRange must be specified when coord index specified."),ft(!i||i!==!0||n.range,"range must be specified in global brush.")),n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=pS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?ZB[n.brushType](a.values,o.offset,MAt(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return at(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:L9(i),isTargetByCursor:E9(i,t,n.coordSysModel),getLinearBrushOtherExtent:M9(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&&$t(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=UB(r,t),a=0;a<n.length;a++){var o=n[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<YB.length;l++)if(YB[l](i,o))return o}return!0},e}();function WT(e){return e[0]>e[1]&&e.reverse(),e}function UB(e,t){return Wc(e,t,{includeMainTypes:DAt})}var LAt={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=pt(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,f){($t(r,h.getAxis("x").model)>=0||$t(n,h.getAxis("y").model)>=0)&&c.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:qB.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){R(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:qB.geo})})}},YB=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],qB={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Yl(e)),t}},pS={lineX:Bt(XB,0),lineY:Bt(XB,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[WT([i[0],a[0]]),WT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=at(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function XB(e,t,r,n){process.env.NODE_ENV!=="production"&&ft(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][e]),a=WT(at([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var ZB={lineX:Bt(KB,0),lineY:Bt(KB,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return at(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function KB(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function MAt(e,t){var r=JB(e),n=JB(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function JB(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var HT=R,EAt=wft("toolbox-dataZoom_"),IAt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new tD(i.getZr()),this._brushController.on("brush",ut(this._onBrush,this)).mount()),NAt(r,n,this,a,i),RAt(r,n)},t.prototype.onclick=function(r,n,i){PAt[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new LD(MD(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),wAt(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),v=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(h=Ls(0,h.slice(),f.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},t.prototype._dispatchZoomAction=function(r){var n=[];HT(r,function(i,a){n.push(_t(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:U.color.backgroundTint}};return n},t}(oi),PAt={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(CAt(this.ecModel))}};function MD(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function RAt(e,t){e.setIconStatus("back",kAt(t)>1?"emphasis":"normal")}function NAt(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new LD(MD(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}ovt("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=MD(n),o=Wc(e,a);HT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),HT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:EAt+u+h};f[c]=h,i.push(f)}return i});function OAt(e){e.registerComponentModel(sAt),e.registerComponentView(lAt),Tc("saveAsImage",cAt),Tc("magicType",fAt),Tc("dataView",bAt),Tc("dataZoom",IAt),Tc("restore",AAt),Gt(oAt)}var BAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:U.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:U.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:U.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:U.color.tertiary,fontSize:14}},t}(Zt);function k7(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function A7(e){if(Qt.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var D7=A7(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),FAt=A7(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function L7(e,t){if(!e)return t;t=O6(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function $At(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var VAt=L7(FAt,"transition"),ED=L7(D7,"transform"),zAt="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Qt.transform3dSupported?"will-change:transform;":"");function GAt(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function WAt(e,t,r){if(!lt(r)||r==="inside")return"";var n=e.get("backgroundColor"),i=e.get("borderWidth");t=vu(t);var a=GAt(r),o=Math.max(Math.round(i)*1.5,6),s="",l=ED+":",u;$t(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=t+" solid "+i+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+v.join("")+'"></div>'}function HAt(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(Qt.transformSupported?""+ED+i:",left"+i+",top"+i)),VAt+":"+a}function QB(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Qt.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Qt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+ED+":"+o+";":[["top",0],["left",0],[D7,o]]}function jAt(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=dt(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function UAt(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),h=e.getModel("textStyle"),f=b8(e,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),t&&a>0&&i.push(HAt(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var v="border-"+p,g=O6(v),m=e.get(g);m!=null&&i.push(v+":"+m+(p==="color"?"":"px"))}),i.push(jAt(h)),f!=null&&i.push("padding:"+Xp(f).join("px ")+"px"),i.join(";")+";"}function tF(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&qct(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var YAt=function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Qt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(lt(a)?document.querySelector(a):lu(a)?a:mt(a)&&a(t.getDom()));tF(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();ei(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=$At(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=zAt+UAt(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+QB(a[0],a[1],!0)+("border-color:"+vu(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(lt(a)&&n.get("trigger")==="item"&&!k7(n)&&(s=WAt(n,i,a)),lt(t))o.innerHTML=t+s;else if(t){o.innerHTML="",nt(t)||(t=[t]);for(var l=0;l<t.length;l++)lu(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,r){if(this.el){var n=this._styleCoord;if(tF(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=QB(n[0],n[1]);R(a,function(o){i[o[0]]=o[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){var t=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",Qt.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ut(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;Xct(t&&t.painter&&t.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var n=r.parentNode;n&&n.removeChild(r)}this.el=this._container=null},e}(),qAt=function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),rF(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return e.prototype.update=function(t){var r=t.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(t,r,n,i,a){var o=this;xt(t)&&ce(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new oe({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:b8(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,r=this.el.getBoundingRect(),n=eF(t.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},e.prototype.moveTo=function(t,r){var n=this.el;if(n){var i=this._styleCoord;rF(i,this._zr,t,r),t=i[0],r=i[1];var a=n.style,o=Ko(a.borderWidth||0),s=eF(a);n.x=t+o+s.left,n.y=r+o+s.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ut(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function Ko(e){return Math.max(0,e)}function eF(e){var t=Ko(e.shadowBlur||0),r=Ko(e.shadowOffsetX||0),n=Ko(e.shadowOffsetY||0);return{left:Ko(t-r),right:Ko(t+r),top:Ko(t-n),bottom:Ko(t+n)}}function rF(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var XAt=new Ut({shape:{x:-1,y:-1,width:2,height:2}}),ZAt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){if(!(Qt.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=Mft(i.get("renderMode"));this._tooltipContent=a==="richText"?new qAt(n):new YAt(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(r,n,i){if(!(Qt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?Xh(this,"_updatePosition",50,"fixRate"):vp(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");c7("itemTooltip",this._api,ut(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Qt.node||!i.getDom())){var o=nF(a,i);this._ticket="";var s=a.dataByCoordSys,l=tDt(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=XAt;c.x=a.x,c.y=a.y,c.update(),At(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var h=h7(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(nF(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=qf([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=At(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Fl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(At(c).dataIndex!=null?l=c:At(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=ut(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=qf([n.tooltipOption],a),l=this._renderMode,u=[],c=rr("section",{blocks:[],noHeader:!0}),h=[],f=new qb;R(r,function(y){R(y.dataByAxis,function(_){var x=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!x||b==null)){var S=s7(b,x.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=rr("section",{header:S,noHeader:!ci(S),sortBlocks:!0,blocks:[]});c.blocks.push(w),R(_.seriesDataIndices,function(C){var k=i.getSeriesByIndex(C.seriesIndex),T=C.dataIndexInside,A=k.getDataParams(T);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=r0(x.axis,{value:b}),A.axisValueLabel=S,A.marker=f.makeTooltipMarker("item",vu(A.color),l);var L=vP(k.formatTooltip(T,!0,null)),D=L.frag;if(D){var E=qf([k],a).get("valueFormatter");w.blocks.push(E?et({valueFormatter:E},D):D)}L.text&&h.push(L.text),u.push(A)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),v=bP(c,f,l,p,i.get("useUTC"),s.get("textStyle"));v&&h.unshift(v);var g=l==="richText"?`
380
380
 
381
381
  `:"<br/>",m=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,f)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=At(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=r.positionDefault,v=qf([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,h),y=new qb;m.marker=y.makeTooltipMarker("item",vu(m.color),d);var _=vP(u.formatTooltip(c,!1,h)),x=v.get("order"),b=v.get("valueFormatter"),S=_.frag,w=S?bP(b?et({valueFormatter:b},S):S,y,d,x,a.get("useUTC"),v.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,w,m,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=At(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(lt(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=_t(l),l.content=ln(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=r.positionDefault,p=qf(h,this._tooltipModel,d?{position:d}:null),v=p.get("content"),g=Math.random()+"",m=new qb;this._showOrMove(p,function(){var y=_t(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,g,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),v=p.color;if(f)if(lt(f)){var g=r.ecModel.get("useUTC"),m=nt(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=f,y&&(d=H_(m.axisValue,d,g)),d=B6(d,i,!0)}else if(mt(f)){var _=ut(function(x,b){x===this._ticket&&(h.setContent(b,c,r,v,l),this._updatePosition(r,l,o,s,h,i,u))},this);this._ticket=a,d=f(i,a,_)}else d=f;h.setContent(d,c,r,v,l),h.show(r,v),this._updatePosition(r,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||nt(n))return{color:a||o};if(!nt(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),mt(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),nt(n))i=st(n[0],u),a=st(n[1],c);else if(xt(n)){var v=n;v.width=h[0],v.height=h[1];var g=Pe(v,{width:u,height:c});i=g.x,a=g.y,f=null,d=null}else if(lt(n)&&l){var m=QAt(n,p,h,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=KAt(i,a,o,u,c,f?null:20,d?null:20);i=m[0],a=m[1]}if(f&&(i-=iF(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=iF(d)?h[1]/2:d==="bottom"?h[1]:0),k7(r)){var m=JAt(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&R(u,function(f,d){var p=h[d]||{},v=f.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&v.length===g.length,o&&R(v,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&R(f.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],x=a[y];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Qt.node||!n.getDom()||(vp(this,"_updatePosition"),this._tooltipContent.dispose(),OT("itemTooltip",n))},t.type="tooltip",t}(Ee);function qf(e,t,r){var n=t.ecModel,i;r?(i=new ne(r,n,n),i=new ne(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ne&&(o=o.get("tooltip",!0)),lt(o)&&(o={formatter:o}),o&&(i=new ne(o,i,n)))}return i}function nF(e,t){return e.dispatchAction||ut(t.dispatchAction,t)}function KAt(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function JAt(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function QAt(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function iF(e){return e==="center"||e==="middle"}function tDt(e,t,r){var n=Rk(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=zh(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=At(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function eDt(e){Gt(av),e.registerComponentModel(BAt),e.registerComponentView(ZAt),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ye),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ye)}var rDt=["rect","polygon","keep","clear"];function nDt(e,t){var r=xe(e?e.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;nt(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),iDt(s),t&&!s.length&&s.push.apply(s,rDt)}}function iDt(e){var t={};R(e,function(r){t[r]=1}),e.length=0,R(t,function(r,n){e.push(n)})}var aF=R;function oF(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function jT(e,t,r){var n={};return aF(t,function(a){var o=n[a]=i();aF(e[a],function(s,l){if(wr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new wr(u),l==="opacity"&&(u=_t(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new wr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function M7(e,t,r){var n;R(r,function(i){t.hasOwnProperty(i)&&oF(t[i])&&(n=!0)}),n&&R(r,function(i){t.hasOwnProperty(i)&&oF(t[i])?e[i]=_t(t[i]):delete e[i]})}function aDt(e,t,r,n,i,a){var o={};R(e,function(h){var f=wr.prepareVisualTypes(t[h]);o[h]=f});var s;function l(h){return pA(r,s,h)}function u(h,f){E8(r,s,h,f)}r.each(c);function c(h,f){s=h;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,h),v=t[p],g=o[p],m=0,y=g.length;m<y;m++){var _=g[m];v[_]&&v[_].applyVisual(h,l,u)}}}function oDt(e,t,r,n){var i={};return R(e,function(a){var o=wr.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(b){return pA(s,h,b)}function c(b,S){E8(s,h,b,S)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=n!=null?f.get(l,h):h,v=r(p),g=t[v],m=i[v],y=0,_=m.length;y<_;y++){var x=m[y];g[x]&&g[x].applyVisual(p,u,c)}}}}}function sDt(e){var t=e.brushType,r={point:function(n){return sF[t].point(n,r,e)},rect:function(n){return sF[t].rect(n,r,e)}};return r}var sF={lineX:lF(0),lineY:lF(1),rect:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])},rect:function(e,t,r){return e&&r.boundingRect.intersect(e)}},polygon:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])&&Tl(r.range,e[0],e[1])},rect:function(e,t,r){var n=r.range;if(!e||n.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,l=n[0];if(Tl(n,i,a)||Tl(n,i+o,a)||Tl(n,i,a+s)||Tl(n,i+o,a+s)||Ct.create(e).contain(l[0],l[1])||dd(i,a,i+o,a,n)||dd(i,a,i,a+s,n)||dd(i+o,a,i+o,a+s,n)||dd(i,a+s,i+o,a+s,n))return!0}}};function lF(e){var t=["x","y"],r=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[e];return Xf(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[t[e]],n[t[e]]+n[r[e]]];return s[1]<s[0]&&s.reverse(),Xf(s[0],o)||Xf(s[1],o)||Xf(o[0],s)||Xf(o[1],s)}}}}function Xf(e,t){return t[0]<=e&&e<=t[1]}var uF=["inBrush","outOfBrush"],vS="__ecBrushSelect",UT="__ecInBrushSelectEvent";function E7(e){e.eachComponent({mainType:"brush"},function(t){var r=t.brushTargetManager=new LD(t.option,e);r.setInputRanges(t.areas,e)})}function lDt(e,t,r){var n=[],i,a;e.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),E7(e),e.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:_t(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,h=[],f=[],d=[],p=!1;s||(i=u.throttleType,a=u.throttleDelay);var v=at(o.areas,function(b){var S=fDt[b.brushType],w=wt({boundingRect:S?S(b):void 0},b);return w.selectors=sDt(w),w}),g=jT(o.option,uF,function(b){b.mappingMethod="fixed"});nt(c)&&R(c,function(b){h[b]=1});function m(b){return c==="all"||!!h[b]}function y(b){return!!b.length}e.eachSeries(function(b,S){var w=d[S]=[];b.subType==="parallel"?_(b,S):x(b,S,w)});function _(b,S){var w=b.coordinateSystem;p=p||w.hasAxisBrushed(),m(S)&&w.eachActiveState(b.getData(),function(C,k){C==="active"&&(f[k]=1)})}function x(b,S,w){if(!(!b.brushSelector||hDt(o,S))&&(R(v,function(k){o.brushTargetManager.controlSeries(k,b,e)&&w.push(k),p=p||y(w)}),m(S)&&y(w))){var C=b.getData();C.each(function(k){cF(b,w,C,k)&&(f[k]=1)})}}e.eachSeries(function(b,S){var w={seriesId:b.id,seriesIndex:S,seriesName:b.name,dataIndex:[]};l.selected.push(w);var C=d[S],k=b.getData(),T=m(S)?function(A){return f[A]?(w.dataIndex.push(k.getRawIndex(A)),"inBrush"):"outOfBrush"}:function(A){return cF(b,C,k,A)?(w.dataIndex.push(k.getRawIndex(A)),"inBrush"):"outOfBrush"};(m(S)?p:y(C))&&aDt(uF,g,k,T)})}),uDt(t,i,a,n,r)}function uDt(e,t,r,n,i){if(i){var a=e.getZr();if(!a[UT]){a[vS]||(a[vS]=cDt);var o=Xh(a,vS,r,t);o(e,n)}}}function cDt(e,t){if(!e.isDisposed()){var r=e.getZr();r[UT]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[UT]=!1}}function cF(e,t,r,n){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(n,r,o.selectors,o))return!0}}function hDt(e,t){var r=e.option.seriesIndex;return r!=null&&r!=="all"&&(nt(r)?$t(r,t)<0:t!==r)}var fDt={rect:function(e){return hF(e.range)},polygon:function(e){for(var t,r=e.range,n=0,i=r.length;n<i;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=r[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&hF(t)}};function hF(e){return new Ct(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var dDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new tD(n.getZr())).on("brush",ut(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){E7(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:_t(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:_t(i),$from:n})},t.type="brush",t}(Ee),pDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&M7(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){process.env.NODE_ENV!=="production"&&(ft(nt(r)),R(r,function(n){ft(n.brushType,"Illegal areas")})),r&&(this.areas=at(r,function(n){return fF(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=fF(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:U.color.backgroundTint,borderColor:U.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:U.color.disabled},t}(Zt);function fF(e,t){return zt({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ne(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var vDt=["rect","polygon","lineX","lineY","keep","clear"],gDt=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:vDt.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:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(oi);function mDt(e){e.registerComponentView(dDt),e.registerComponentModel(pDt),e.registerPreprocessor(nDt),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,lDt),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ye),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ye),Tc("brush",gDt)}var yDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:U.size.m,backgroundColor:U.color.transparent,borderColor:U.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:U.color.primary},subtextStyle:{fontSize:12,color:U.color.quaternary}},t}(Zt),_Dt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=dt(r.get("textBaseline"),r.get("textVerticalAlign")),c=new oe({style:Te(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=r.get("subtext"),d=new oe({style:Te(s,{text:f,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),v=r.get("sublink"),g=r.get("triggerEvent",!0);c.silent=!p&&!g,d.silent=!v&&!g,p&&c.on("click",function(){Wy(p,"_"+r.get("target"))}),v&&d.on("click",function(){Wy(v,"_"+r.get("subtarget"))}),At(c).eventData=At(d).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),f&&a.add(d);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=pr(r,i),x=Pe(y,_.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),a.x=x.x,a.y=x.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),d.setStyle(b),m=a.getBoundingRect();var S=x.margin,w=r.getItemStyle(["color","opacity"]);w.fill=r.get("backgroundColor");var C=new Ut({shape:{x:m.x-S[3],y:m.y-S[0],width:m.width+S[1]+S[3],height:m.height+S[0]+S[2],r:r.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(C)}},t.type="title",t}(Ee);function xDt(e){e.registerComponentModel(yDt),e.registerComponentView(_Dt)}var dF=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var h=ur(Vh(u),""),f;xt(u)?(f=_t(u),f.value=c):f=c,o.push(f),a.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new pn([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:U.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:U.color.secondary},data:[]},t}(Zt),I7=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=Fs(dF.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:U.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:U.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:U.color.tertiary},itemStyle:{color:U.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:U.color.accent50,borderColor:U.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:U.color.accent50,borderColor:U.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:U.color.accent60},itemStyle:{color:U.color.accent60,borderColor:U.color.accent60},controlStyle:{color:U.color.accent70,borderColor:U.color.accent70}},progress:{lineStyle:{color:U.color.accent30},itemStyle:{color:U.color.accent40}},data:[]}),t}(dF);ir(I7,Y_.prototype);var bDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(Ee),SDt=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(ji),gS=Math.PI,pF=qt(),wDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return rr("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=TDt(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":lt(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:gS/2},h=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,v=d?f.get("itemGap"):0,g=p+v,m=r.get(["label","rotate"])||0;m=m*gS/180;var y,_,x,b=f.get("position",!0),S=d&&f.get("showPlayBtn",!0),w=d&&f.get("showPrevBtn",!0),C=d&&f.get("showNextBtn",!0),k=0,T=h;b==="left"||b==="bottom"?(S&&(y=[0,0],k+=g),w&&(_=[k,0],k+=g),C&&(x=[T-p,0],T-=g)):(S&&(y=[T-p,0],T-=g),w&&(_=[0,0],k+=g),C&&(x=[T-p,0],T-=g));var A=[k,T];return r.get("inverse")&&A.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:_,nextBtnPosition:x,axisExtent:A,controlSize:p,controlGap:v}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Ir(),l=o.x,u=o.y+o.height;La(s,s,[-l,-u]),Os(s,s,-gS/2),La(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),h=y(i.getBoundingRect()),f=y(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var v=r.labelPosOpt;if(v==null||lt(v)){var g=v==="+"?0:1;_(d,h,c,1,g),_(p,f,c,1,1-g)}else{var g=v>=0?0:1;_(d,h,c,1,g),p[1]=d[1]+v}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=r.rotation,m(i),m(a);function m(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function y(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,b,S,w,C){x[w]+=S[w][C]-b[w][C]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=CDt(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new SDt("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new yt;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Qe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:et({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Qe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:wt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:ut(o._changeTimeline,o,u.value)},g=vF(h,f,n,v);g.ensureState("emphasis").style=d.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Ul(g);var m=At(g);h.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],R(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),v=f.getModel(["progress","label"]),g=i.dataToCoord(c.tickValue),m=new oe({x:g,y:0,rotation:r.labelRotation-r.rotation,onclick:ut(o._changeTimeline,o,h),silent:!1,style:Te(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});m.ensureState("emphasis").style=Te(p),m.ensureState("progress").style=Te(v),n.add(m),Ul(m),pF(m).dataIndex=h,o._tickLabels.push(m)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);f(r.nextBtnPosition,"next",ut(this._changeTimeline,this,h?"-":"+")),f(r.prevBtnPosition,"prev",ut(this._changeTimeline,this,h?"+":"-")),f(r.playPosition,c?"stop":"play",ut(this._handlePlayClick,this,!c),!0);function f(d,p,v,g){if(d){var m=$i(dt(a.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],_=kDt(a,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:v});_.ensureState("emphasis").style=u,n.add(_),Ul(_)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=ut(u._handlePointerDrag,u),h.ondragend=ut(u._handlePointerDragend,u),gF(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){gF(h,u._progressLine,s,i,a)}};this._currentPointer=vF(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=hi(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=r.model;r._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(r){var n=this._mainGroup.getLocalTransform();return Ii(r,n,!0)},t.prototype._findNearestTick=function(r){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<i&&(i=c,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(r){var n=this.model.getCurrentIndex();r==="+"?r=n+1:r==="-"&&(r=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},t.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<r);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",pF(i[a]).dataIndex<=r)},t.type="timeline.slider",t}(bDt);function CDt(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new _h({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new CA({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Mo}}function TDt(e,t){return Pe(e.getBoxLayoutParams(),pr(e,t).refContainer,e.get("padding"))}function kDt(e,t,r,n){var i=n.style,a=qp(e.get(["controlStyle",t]),n||{},new Ct(r[0],r[1],r[2],r[3]));return i&&a.setStyle(i),a}function vF(e,t,r,n,i,a){var o=t.get("color");if(i)i.setColor(o),r.add(i),a&&a.onUpdate(i);else{var s=e.get("symbol");i=nr(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),a&&a.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),n=zt({rectHover:!0,z2:100},n,!0);var u=Zh(e.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Mu(e.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var h=e.get("symbolRotate");return n.rotation=(h||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function gF(e,t,r,n,i,a){if(!e.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",r));if(a||!o.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function ADt(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,r,n){var i=r.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),r.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),wt({currentIndex:i.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,r){var n=r.getComponent("timeline");n&&t.playState!=null&&n.setPlayState(t.playState)})}function DDt(e){var t=e&&e.timeline;nt(t)||(t=t?[t]:[]),R(t,function(r){r&&LDt(r)})}function LDt(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),mF(e),Dl(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});Dl(n,"position")||(n.position=e.controlPosition),n.position==="none"&&!Dl(n,"show")&&(n.show=!1,delete n.position),delete e.controlPosition}R(e.data||[],function(i){xt(i)&&!nt(i)&&(!Dl(i,"value")&&Dl(i,"name")&&(i.value=i.name),mF(i))})}function mF(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};R(n,function(o,s){!a[s]&&!Dl(i,s)&&(i[s]=o)}),r.label&&!Dl(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function Dl(e,t){return e.hasOwnProperty(t)}function MDt(e){e.registerComponentModel(I7),e.registerComponentView(wDt),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),ADt(e),e.registerPreprocessor(DDt)}function ID(e,t){if(!e)return!1;for(var r=nt(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function zg(e){uu(e,"label",["show"])}var Gg=qt(),Na=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r.preventAutoZ=!0,r}return t.prototype.init=function(r,n,i){if(process.env.NODE_ENV!=="production"&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Qt.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},t.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},t.prototype._mergeOption=function(r,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Gg(s)[o];if(!l||!l.data){Gg(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&zg(l),R(l.data,function(c){c instanceof Array?(zg(c[0]),zg(c[1])):zg(c)}),u=this.createMarkerModelFromSeries(l,this,n),et(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Gg(s)[o]=u},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return rr("section",{header:this.name,blocks:[rr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(r){this._data=r},t.prototype.getDataParams=function(r,n){var i=Y_.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(r,n){return Gg(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Zt);ir(Na,Y_.prototype);var EDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Na);function YT(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function IDt(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function Wg(e,t,r,n,i,a,o){var s=[],l=As(t,i),u=l?t.getCalculationInfo("stackResultDimension"):i,c=D0(t,u,e),h=t.hostModel,f=h.indicesOfNearest(r,u,c)[0];s[a]=t.get(n,f),s[o]=t.get(u,f);var d=t.get(i,f),p=ga(t.get(i,f));return p=Math.min(p,20),p>=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var Hg={min:Bt(Wg,"min"),max:Bt(Wg,"max"),average:Bt(Wg,"average"),median:Bt(Wg,"median")};function Ep(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!IDt(t)&&!nt(t.coord)&&nt(i)){var a=P7(t,r,n,e);if(t=_t(t),t.type&&Hg[t.type]&&a.baseAxis&&a.valueAxis){var o=$t(i,a.baseAxis.dim),s=$t(i,a.valueAxis.dim),l=Hg[t.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!nt(i)){t.coord=[];var u=e.getBaseAxis();if(u&&t.type&&Hg[t.type]){var c=n.getOtherAxis(u);c&&(t.value=D0(r,r.mapDimension(c.dim),t.type))}}else for(var h=t.coord,f=0;f<2;f++)Hg[h[f]]&&(h[f]=D0(r,r.mapDimension(i[f]),h[f]));return t}}function P7(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(PDt(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function PDt(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function Ip(e,t){return e&&e.containData&&t.coord&&!YT(t)?e.containData(t.coord):!0}function RDt(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!YT(t)&&!YT(r)?e.containZone(t.coord,r.coord):!0}function R7(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ms(o,t[a])}:function(r,n,i,a){return ms(r.value,t[a])}}function D0(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var mS=qt(),PD=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=pt()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){mS(s).keep=!1}),n.eachSeries(function(s){var l=Na.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!mS(s).keep&&a.group.remove(s.group)}),NDt(n,o,this.type)},t.prototype.markKeep=function(r){mS(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Na.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?JH(l):Gk(l))})}})},t.type="marker",t}(Ee);function NDt(e,t,r){e.eachSeries(function(n){var i=Na.getMarkerModelFromSeries(n,r),a=t.get(n.id);if(i&&a&&a.group){var o=pu(i),s=o.z,l=o.zlevel;G_(a.group,s,l)}})}function yF(e,t,r){var n=t.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();e.each(function(s){var l=e.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,h=u?o?o.height:0:a,f=u&&o?o.x:0,d=u&&o?o.y:0,p,v=st(l.get("x"),c)+f,g=st(l.get("y"),h)+d;if(!isNaN(v)&&!isNaN(g))p=[v,g];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,s));else if(n){var m=e.get(n.dimensions[0],s),y=e.get(n.dimensions[1],s);p=n.dataToPoint([m,y])}isNaN(v)||(p[0]=v),isNaN(g)||(p[1]=g),e.setItemLayout(s,p)})}var ODt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Na.getMarkerModelFromSeries(a,"markPoint");o&&(yF(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new ev),h=BDt(o,r,n);n.setData(h),yF(n.getData(),r,a),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),v=d.getShallow("symbolSize"),g=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(mt(p)||mt(v)||mt(g)||mt(m)){var _=n.getRawValue(f),x=n.getDataParams(f);mt(p)&&(p=p(_,x)),mt(v)&&(v=v(_,x)),mt(g)&&(g=g(_,x)),mt(m)&&(m=m(_,x))}var b=d.getModel("itemStyle").getItemStyle(),S=d.get("z2"),w=Kp(l,"color");b.fill||(b.fill=w),h.setItemVisual(f,{z2:dt(S,0),symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:b})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){At(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(PD);function BDt(e,t,r){var n;e?n=at(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return et(et({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new pn(n,r),a=at(r.get("data"),Bt(Ep,t));e&&(a=de(a,Bt(Ip,e)));var o=R7(!!e,n);return i.initData(a,null,o),i}function FDt(e){e.registerComponentModel(EDt),e.registerComponentView(ODt),e.registerPreprocessor(function(t){ID(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var $Dt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Na),jg=qt(),VDt=function(e,t,r,n){var i=e.getData(),a;if(nt(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=lr(n.yAxis,n.xAxis);else{var u=P7(n,i,t,e);s=u.valueAxis;var c=oj(i,u.valueDataDim);l=D0(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=_t(n),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var v=r.get("precision");v>=0&&ae(l)&&(l=+l.toFixed(Math.min(v,20))),d.coord[h]=p.coord[h]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else process.env.NODE_ENV!=="production"&&Mi("Invalid markLine data."),a=[]}var g=[Ep(e,a[0]),Ep(e,a[1]),et({},a[2])];return g[2].type=g[2].type||null,zt(g[2],g[0]),zt(g[2],g[1]),g};function L0(e){return!isNaN(e)&&!isFinite(e)}function _F(e,t,r,n){var i=1-e,a=n.dimensions[e];return L0(t[i])&&L0(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function zDt(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(_F(1,r,n,e)||_F(0,r,n,e)))return!0}return Ip(e,t[0])&&Ip(e,t[1])}function yS(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=st(o.get("x"),i.getWidth()),u=st(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,h=e.get(c[0],t),f=e.get(c[1],t);s=a.dataToPoint([h,f])}if(Ds(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;L0(e.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):L0(e.get(c[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var GDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Na.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=jg(o).from,u=jg(o).to;l.each(function(c){yS(l,c,!0,a,i),yS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new JA);this.group.add(c.group);var h=WDt(o,r,n),f=h.from,d=h.to,p=h.line;jg(n).from=f,jg(n).to=d,n.setData(p);var v=n.get("symbol"),g=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");nt(v)||(v=[v,v]),nt(g)||(g=[g,g]),nt(m)||(m=[m,m]),nt(y)||(y=[y,y]),h.from.each(function(x){_(f,x,!0),_(d,x,!1)}),p.each(function(x){var b=p.getItemModel(x),S=b.getModel("lineStyle").getLineStyle();p.setItemLayout(x,[f.getItemLayout(x),d.getItemLayout(x)]);var w=b.get("z2");S.stroke==null&&(S.stroke=f.getItemVisual(x,"style").fill),p.setItemVisual(x,{z2:dt(w,0),fromSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(x,"symbolOffset"),fromSymbolRotate:f.getItemVisual(x,"symbolRotate"),fromSymbolSize:f.getItemVisual(x,"symbolSize"),fromSymbol:f.getItemVisual(x,"symbol"),toSymbolKeepAspect:d.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(x,"symbolOffset"),toSymbolRotate:d.getItemVisual(x,"symbolRotate"),toSymbolSize:d.getItemVisual(x,"symbolSize"),toSymbol:d.getItemVisual(x,"symbol"),style:S})}),c.updateData(p),h.line.eachItemGraphicEl(function(x){At(x).dataModel=n,x.traverse(function(b){At(b).dataModel=n})});function _(x,b,S){var w=x.getItemModel(b);yS(x,b,S,r,a);var C=w.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=Kp(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:dt(w.get("symbolOffset",!0),y[S?0:1]),symbolRotate:dt(w.get("symbolRotate",!0),m[S?0:1]),symbolSize:dt(w.get("symbolSize"),g[S?0:1]),symbol:dt(w.get("symbol",!0),v[S?0:1]),style:C})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(PD);function WDt(e,t,r){var n;e?n=at(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return et(et({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new pn(n,r),a=new pn(n,r),o=new pn([],r),s=at(r.get("data"),Bt(VDt,t,e,r));e&&(s=de(s,Bt(zDt,e)));var l=R7(!!e,n);return i.initData(at(s,function(u){return u[0]}),null,l),a.initData(at(s,function(u){return u[1]}),null,l),o.initData(at(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function HDt(e){e.registerComponentModel($Dt),e.registerComponentView(GDt),e.registerPreprocessor(function(t){ID(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var jDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Na),Ug=qt(),UDt=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Ep(e,i),s=Ep(e,a),l=o.coord,u=s.coord;l[0]=lr(l[0],-1/0),l[1]=lr(l[1],-1/0),u[0]=lr(u[0],1/0),u[1]=lr(u[1],1/0);var c=Ck([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function M0(e){return!isNaN(e)&&!isFinite(e)}function xF(e,t,r,n){var i=1-e;return M0(t[i])&&M0(r[i])}function YDt(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return Ds(e,"cartesian2d")?r&&n&&(xF(1,r,n)||xF(0,r,n))?!0:RDt(e,i,a):Ip(e,i)||Ip(e,a)}function bF(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=st(o.get(r[0]),i.getWidth()),u=st(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),f=a.clampData(c),d=a.clampData(h),p=[];r[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],r[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=n.getMarkerPosition(p,r,!0)}else{var v=e.get(r[0],t),g=e.get(r[1],t),m=[v,g];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(Ds(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),v=e.get(r[0],t),g=e.get(r[1],t);M0(v)?s[0]=y.toGlobalCoord(y.getExtent()[r[0]==="x0"?0:1]):M0(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var SF=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qDt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Na.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=at(SF,function(h){return bF(s,l,h,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new yt});this.group.add(c.group),this.markKeep(c);var h=XDt(o,r,n);n.setData(h),h.each(function(f){var d=at(SF,function(T){return bF(h,f,T,r,a)}),p=o.getAxis("x").scale,v=o.getAxis("y").scale,g=p.getExtent(),m=v.getExtent(),y=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],_=[v.parse(h.get("y0",f)),v.parse(h.get("y1",f))];hi(y),hi(_);var x=!(g[0]>y[1]||g[1]<y[0]||m[0]>_[1]||m[1]<_[0]),b=!x;h.setItemLayout(f,{points:d,allClipped:b});var S=h.getItemModel(f),w=S.getModel("itemStyle").getItemStyle(),C=S.get("z2"),k=Kp(l,"color");w.fill||(w.fill=k,lt(w.fill)&&(w.fill=Ly(w.fill,.4))),w.stroke||(w.stroke=k),h.setItemVisual(f,"style",w),h.setItemVisual(f,"z2",dt(C,0))}),h.diff(Ug(c).data).add(function(f){var d=h.getItemLayout(f),p=h.getItemVisual(f,"z2");if(!d.allClipped){var v=new Qr({z2:dt(p,0),shape:{points:d.points}});h.setItemGraphicEl(f,v),c.group.add(v)}}).update(function(f,d){var p=Ug(c).data.getItemGraphicEl(d),v=h.getItemLayout(f),g=h.getItemVisual(f,"z2");v.allClipped?p&&c.group.remove(p):(p?se(p,{z2:dt(g,0),shape:{points:v.points}},n,f):p=new Qr({shape:{points:v.points}}),h.setItemGraphicEl(f,p),c.group.add(p))}).remove(function(f){var d=Ug(c).data.getItemGraphicEl(f);c.group.remove(d)}).execute(),h.eachItemGraphicEl(function(f,d){var p=h.getItemModel(d),v=h.getItemVisual(d,"style");f.useStyle(h.getItemVisual(d,"style")),Cr(f,dr(p),{labelFetcher:n,labelDataIndex:d,defaultText:h.getName(d)||"",inheritColor:lt(v.fill)?Ly(v.fill,1):U.color.neutral99}),fr(f,p),Ie(f,null,null,p.get(["emphasis","disabled"])),At(f).dataModel=n}),Ug(c).data=h,c.group.silent=n.get("silent")||r.get("silent")},t.type="markArea",t}(PD);function XDt(e,t,r){var n,i,a=["x0","y0","x1","y1"];if(e){var o=at(e&&e.dimensions,function(u){var c=t.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return et(et({},h),{name:u,ordinalMeta:null})});i=at(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new pn(i,r)}else i=[{name:"value",type:"float"}],n=new pn(i,r);var s=at(r.get("data"),Bt(UDt,t,e,r));e&&(s=de(s,Bt(YDt,e)));var l=e?function(u,c,h,f){var d=u.coord[Math.floor(f/2)][f%2];return ms(d,i[f])}:function(u,c,h,f){return ms(u.value,i[f])};return n.initData(s,null,l),n.hasItemOption=!0,n}function ZDt(e){e.registerComponentModel(jDt),e.registerComponentView(qDt),e.registerPreprocessor(function(t){ID(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var KDt=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},qT=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),nt(n)&&R(n,function(a,o){lt(a)&&(a={type:a}),n[o]=zt(a,KDt(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,f=h.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(f)),f.length?n=n.concat(f):c=!0}else c=!0;c&&Pk(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=pt(),s=at(a,function(l){return(lt(l)||ae(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new ne(l,this,this.ecModel))},this);this._data=de(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;R(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;R(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;R(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&$t(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:U.size.m,align:"auto",backgroundColor:U.color.transparent,borderColor:U.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:U.color.disabled,inactiveBorderColor:U.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:U.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:U.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:U.color.tertiary,borderWidth:1,borderColor:U.color.border},emphasis:{selectorLabel:{show:!0,color:U.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Zt),pc=Bt,XT=R,Yg=yt,N7=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Yg),this.group.add(this._selectorGroup=new Yg),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=pr(r,i).refContainer,h=r.getBoxLayoutParams(),f=r.get("padding"),d=Pe(h,c,f),p=this.layoutInner(r,o,d,a,l,u),v=Pe(wt({width:p.width,height:p.height},h),c,f);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=w7(p,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=pt(),h=n.get("selectedMode"),f=n.get("triggerEvent"),d=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),XT(n.getData(),function(p,v){var g=this,m=p.get("name");if(!this.newlineDisabled&&(m===""||m===`
382
382
  `)){var y=new Yg;y.newline=!0,u.add(y);return}var _=i.getSeriesByName(m)[0];if(!c.get(m)){if(_){var x=_.getData(),b=x.getVisual("legendLineStyle")||{},S=x.getVisual("legendIcon"),w=x.getVisual("style"),C=this._createItem(_,m,v,p,n,r,b,w,S,h,a);C.on("click",pc(wF,m,null,a,d)).on("mouseover",pc(ZT,_.name,null,a,d)).on("mouseout",pc(KT,_.name,null,a,d)),i.ssr&&C.eachChild(function(k){var T=At(k);T.seriesIndex=_.seriesIndex,T.dataIndex=v,T.ssrType="legend"}),f&&C.eachChild(function(k){g.packEventData(k,n,_,v,m)}),c.set(m,!0)}else i.eachRawSeries(function(k){var T=this;if(!c.get(m)&&k.legendVisualProvider){var A=k.legendVisualProvider;if(!A.containName(m))return;var L=A.indexOfName(m),D=A.getItemVisual(L,"style"),E=A.getItemVisual(L,"legendIcon"),N=En(D.fill);N&&N[3]===0&&(N[3]=.2,D=et(et({},D),{fill:wa(N,"rgba")}));var P=this._createItem(k,m,v,p,n,r,{},D,E,h,a);P.on("click",pc(wF,null,m,a,d)).on("mouseover",pc(ZT,null,m,a,d)).on("mouseout",pc(KT,null,m,a,d)),i.ssr&&P.eachChild(function(F){var O=At(F);O.seriesIndex=k.seriesIndex,O.dataIndex=v,O.ssrType="legend"}),f&&P.eachChild(function(F){T.packEventData(F,n,k,v,m)}),c.set(m,!0)}},this);process.env.NODE_ENV!=="production"&&(c.get(m)||console.warn(m+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};At(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();XT(r,function(u){var c=u.type,h=new oe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Cr(h,{normal:f,emphasis:d},{defaultText:u.title}),Ul(h)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,h,f){var d=r.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var x=JDt(c,a,l,u,d,g,f),b=new Yg,S=a.getModel("textStyle");if(mt(r.getLegendIcon)&&(!_||_==="inherit"))b.add(r.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;b.add(QDt({itemWidth:p,itemHeight:v,icon:c,iconRotate:w,itemStyle:x.itemStyle,symbolKeepAspect:y}))}var C=s==="left"?p+5:-5,k=s,T=o.get("formatter"),A=n;lt(T)&&T?A=T.replace("{name}",n??""):mt(T)&&(A=T(n));var L=g?S.getTextColor():a.get("inactiveColor");b.add(new oe({style:Te(S,{text:A,x:C,y:v/2,fill:L,align:k,verticalAlign:"middle"},{inheritColor:L})}));var D=new Ut({shape:b.getBoundingRect(),style:{fill:"transparent"}}),E=a.getModel("tooltip");return E.get("show")&&Fo({el:D,componentModel:o,itemName:n,itemTooltipOption:E.option}),b.add(D),b.eachChild(function(N){N.silent=!0}),D.silent=!h,this.getContentGroup().add(b),Ul(b),b.__legendDataIndex=i,b},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ql(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){ql("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=r.get("selectorButtonGap",!0),v=r.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";s==="end"?d[v]+=c[g]+p:h[v]+=f[g]+p,d[1-v]+=c[m]/2-f[m]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=c[g]+p+f[g],_[m]=Math.max(c[m],f[m]),_[y]=Math.min(0,f[y]+d[1-v]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ee);function JDt(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),XT(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:yh(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=t.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function QDt(e){var t=e.icon||"roundRect",r=nr(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=U.color.neutral00,r.style.lineWidth=2),r}function wF(e,t,r,n){KT(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),ZT(e,t,r,n)}function O7(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function ZT(e,t,r,n){O7(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function KT(e,t,r,n){O7(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function tLt(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function Zf(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(s){n?s[e]():s[e](t.name),CF(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){R(i,function(l,u){s[l?"select":"unSelect"](u)}),CF(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function CF(e,t){var r=t||{};return R(e.getData(),function(n){var i=n.get("name");if(!(i===`
@@ -388,4 +388,4 @@ echarts.use([`+L+"]);":"Unknown series "+A))}return}if(h==="tooltip"){if(_){proc
388
388
  `,"Illegal config:",c,`.
389
389
  `)),ce(n));var y=d?l8(d):null;d&&!y&&(process.env.NODE_ENV!=="production"&&(n=_n("Invalid parser name "+d+`.
390
390
  `,"Illegal config:",c,`.
391
- `)),ce(n)),a.push({dimIdx:m.index,parser:y,comparator:new c8(f,p)})});var o=t.sourceFormat;o!==Pr&&o!==Yn&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),ce(n));for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,h){for(var f=0;f<a.length;f++){var d=a[f],p=t.retrieveValueFromItem(c,d.dimIdx),v=t.retrieveValueFromItem(h,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var g=d.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function dMt(e){e.registerTransform(hMt),e.registerTransform(fMt)}var pMt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new p8(this),_P(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),_P(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Pi},t}(Zt),vMt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(Ee);function gMt(e){e.registerComponentModel(pMt),e.registerComponentView(vMt)}var na=Ia.CMD;function Bc(e,t){return Math.abs(e-t)<1e-5}function QT(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(D,E){i&&i.length>2&&n.push(i),i=[D,E]}function c(D,E,N,P){Bc(D,N)&&Bc(E,P)||i.push(D,E,N,P,N,P)}function h(D,E,N,P,F,O){var $=Math.abs(E-D),V=Math.tan($/4)*4/3,I=E<D?-1:1,B=Math.cos(D),G=Math.sin(D),H=Math.cos(E),W=Math.sin(E),J=B*F+N,Q=G*O+P,tt=H*F+N,it=W*O+P,X=F*V*I,rt=O*V*I;i.push(J-X*G,Q+rt*B,tt+X*W,it-rt*H,tt,it)}for(var f,d,p,v,g=0;g<r;){var m=t[g++],y=g===1;switch(y&&(a=t[g],o=t[g+1],s=a,l=o,(m===na.L||m===na.C||m===na.Q)&&(i=[s,l])),m){case na.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case na.L:f=t[g++],d=t[g++],c(a,o,f,d),a=f,o=d;break;case na.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case na.Q:f=t[g++],d=t[g++],p=t[g++],v=t[g++],i.push(a+2/3*(f-a),o+2/3*(d-o),p+2/3*(f-p),v+2/3*(d-v),p,v),a=p,o=v;break;case na.A:var _=t[g++],x=t[g++],b=t[g++],S=t[g++],w=t[g++],C=t[g++]+w;g+=1;var k=!t[g++];f=Math.cos(w)*b+_,d=Math.sin(w)*S+x,y?(s=f,l=d,u(s,l)):c(a,o,f,d),a=Math.cos(C)*b+_,o=Math.sin(C)*S+x;for(var T=(k?-1:1)*Math.PI/2,A=w;k?A>C:A<C;A+=T){var L=k?Math.max(A+T,C):Math.min(A+T,C);h(A,L,_,x,b,S)}break;case na.R:s=a=t[g++],l=o=t[g++],f=s+t[g++],d=l+t[g++],u(f,l),c(f,l,f,d),c(f,d,s,d),c(s,d,s,l),c(s,l,f,l);break;case na.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function t2(e,t,r,n,i,a,o,s,l,u){if(Bc(e,r)&&Bc(t,n)&&Bc(i,o)&&Bc(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-e,d=s-t,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var v=r-e,g=n-t,m=i-o,y=a-s,_=v*v+g*g,x=m*m+y*y;if(_<h&&x<h){l.push(o,s);return}var b=f*v+d*g,S=-f*m-d*y,w=_-b*b,C=x-S*S;if(w<h&&b>=0&&C<h&&S>=0){l.push(o,s);return}var k=[],T=[];Cs(e,r,i,o,.5,k),Cs(t,n,a,s,.5,T),t2(k[0],T[0],k[1],T[1],k[2],T[2],k[3],T[3],l,u),t2(k[4],T[4],k[5],T[5],k[6],T[6],k[7],T[7],l,u)}function mMt(e,t){var r=QT(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],h=a[u++],f=a[u++],d=a[u++],p=a[u++],v=a[u++];t2(s,l,c,h,f,d,p,v,o,t),s=p,l=v}n.push(o)}return n}function q7(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,h=r-c;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function UF(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),h=q7([l,u],c?0:1,t),f=(c?s:u)/h.length,d=0;d<h.length;d++)for(var p=(c?u:s)/h[d],v=0;v<h[d];v++){var g={};c?(g.startAngle=a+f*d,g.endAngle=a+f*(d+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=n+f*d,g.r=n+f*(d+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function yMt(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=q7([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=e[s]/o.length,f=0;f<o.length;f++)for(var d=e[l]/o[f],p=0;p<o[f];p++){var v={};v[u]=f*h,v[c]=p*d,v[s]=h,v[l]=d,v.x+=e.x,v.y+=e.y,r.push(v)}}function YF(e,t,r,n){return e*n-r*t}function _Mt(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,h=s-a,f=YF(c,h,l,u);if(Math.abs(f)<1e-6)return null;var d=e-i,p=t-a,v=YF(d,p,c,h)/f;return v<0||v>1?null:new St(v*l+e,v*u+t)}function xMt(e,t,r){var n=new St;St.sub(n,r,t),n.normalize();var i=new St;St.sub(i,e,t);var a=i.dot(n);return a}function gc(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function bMt(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=_Mt(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:xMt(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(g,m){return g.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var f=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[f],v=[d],a=u.idx+1;a<=c.idx;a++)gc(p,e[a].slice());gc(p,d),gc(p,f);for(var a=c.idx+1;a<=u.idx+n;a++)gc(v,e[a%n].slice());return gc(v,f),gc(v,d),[{points:p},{points:v}]}function qF(e){var t=e.points,r=[],n=[];P_(t,r,n);var i=new Ct(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new St,c=new St;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),bMt(t,u,c)}function I0(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);I0(e,a[0],i,n),I0(e,a[1],r-i,n)}return n}function SMt(e,t){for(var r=[],n=0;n<t;n++)r.push(Hk(e));return r}function wMt(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function CMt(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function TMt(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":yMt(n,t,r),i=Ut;break;case"sector":UF(n,t,r),i=Jr;break;case"circle":UF({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=Jr;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=at(mMt(e.getUpdatedPathProxy(),o),function(m){return CMt(m)}),l=s.length;if(l===0)I0(qF,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,h=at(s,function(m){var y=[],_=[];P_(m,y,_);var x=(_[1]-y[1])*(_[0]-y[0]);return c+=x,{poly:m,area:x}});h.sort(function(m,y){return y.area-m.area});for(var f=t,u=0;u<l;u++){var d=h[u];if(f<=0)break;var p=u===l-1?f:Math.ceil(d.area/c*t);p<0||(I0(qF,{points:d.poly},p,r),f-=p)}}i=Qr;break}if(!i)return SMt(e,t);for(var v=[],u=0;u<r.length;u++){var g=new i;g.setShape(r[u]),wMt(e,g),v.push(g)}return v}function kMt(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,d=2;d<s;){var p=o[d-2],v=o[d-1],g=o[d++],m=o[d++],y=o[d++],_=o[d++],x=o[d++],b=o[d++];if(f<=0){h.push(g,m,y,_,x,b);continue}for(var S=Math.min(f,c-1)+1,w=1;w<=S;w++){var C=w/S;Cs(p,g,y,x,C,i),Cs(v,m,_,b,C,a),p=i[3],v=a[3],h.push(i[1],a[1],i[2],a[2],p,v),g=i[5],m=a[5],y=i[6],_=a[6]}f-=S-1}return o===e?[h,t]:[e,h]}function XF(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function AMt(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,h=void 0;l?u?(r=kMt(l,u),c=r[0],h=r[1],n=c,i=h):(h=XF(i||l,l),c=l):(c=XF(n||u,u),h=u),a.push(c),o.push(h)}return[a,o]}function ZF(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],h=s*c-u*l;t+=h,r+=(s+u)*h,n+=(l+c)*h}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function DMt(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,h=0,f=0;f<s;f+=2){var d=f===0?c:(c+f-2)%l+2,p=e[d]-r[0],v=e[d+1]-r[1],g=t[f]-n[0],m=t[f+1]-n[1],y=g-p,_=m-v;h+=y*y+_*_}h<a&&(a=h,o=u)}return o}function LMt(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function MMt(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=ZF(s),c=ZF(l);a==null&&(a=u[2]<0!=c[2]<0);var h=[],f=[],d=0,p=1/0,v=[],g=s.length;a&&(s=LMt(s));for(var m=DMt(s,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var x=(m+_)%y+2;h[_+2]=s[x]-u[0],h[_+3]=s[x+1]-u[1]}h[0]=s[m]-u[0],h[1]=s[m+1]-u[1];for(var b=n/r,S=-n/2;S<=n/2;S+=b){for(var w=Math.sin(S),C=Math.cos(S),k=0,_=0;_<s.length;_+=2){var T=h[_],A=h[_+1],L=l[_]-c[0],D=l[_+1]-c[1],E=L*C-D*w,N=L*w+D*C;v[_]=E,v[_+1]=N;var P=E-T,F=N-A;k+=P*P+F*F}if(k<p){p=k,d=S;for(var O=0;O<v.length;O++)f[O]=v[O]}}i.push({from:h,to:f,fromCp:u,toCp:c,rotation:-d})}return i}function P0(e){return e.__isCombineMorphing}var X7="__mOriginal_";function R0(e,t,r){var n=X7+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function zd(e,t){var r=X7+t;e[r]&&(e[t]=e[r],e[r]=null)}function KF(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function Z7(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=AMt(QT(r),QT(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&KF(a,s),l&&KF(o,l),R0(t,"updateTransform",{replace:u}),t.transform=null;var c=MMt(a,o,10,Math.PI),h=[];R0(t,"buildPath",{replace:function(f){for(var d=t.__morphT,p=1-d,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,x=m.rotation*d,b=m.fromCp,S=m.toCp,w=Math.sin(x),C=Math.cos(x);pm(v,b,S,d);for(var k=0;k<y.length;k+=2){var T=y[k],A=y[k+1],L=_[k],D=_[k+1],E=T*p+L*d,N=A*p+D*d;h[k]=E*C-N*w+v[0],h[k+1]=E*w+N*C+v[1]}var P=h[0],F=h[1];f.moveTo(P,F);for(var k=2;k<y.length;){var L=h[k++],D=h[k++],O=h[k++],$=h[k++],V=h[k++],I=h[k++];P===L&&F===D&&O===V&&$===I?f.lineTo(V,I):f.bezierCurveTo(L,D,O,$,V,I),P=V,F=I}}}})}function OD(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;Z7(e,t),t.__morphT=0;function a(){zd(t,"buildPath"),zd(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},wt({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function EMt(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(e&u)>0&&(c=1),(t&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function N0(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=at(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(h,r),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=at(a,function(s,l){return{cp:s,z:EMt(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function K7(e){return TMt(e.path,e.count)}function e2(){return{fromIndividuals:[],toIndividuals:[],count:0}}function IMt(e,t,r){var n=[];function i(b){for(var S=0;S<b.length;S++){var w=b[S];P0(w)?i(w.childrenRef()):w instanceof Kt&&n.push(w)}}i(e);var a=n.length;if(!a)return e2();var o=r.dividePath||K7,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),e2();n=N0(n),s=N0(s);for(var l=r.done,u=r.during,c=r.individualDelay,h=new uo,f=0;f<a;f++){var d=n[f],p=s[f];p.parent=t,p.copyTransform(h),c||Z7(d,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(b){for(var S=0;S<s.length;S++)s[S].addSelfToZr(b)}R0(t,"addSelfToZr",{after:function(b){v(b)}}),R0(t,"removeSelfFromZr",{after:function(b){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(b)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,zd(t,"addSelfToZr"),zd(t,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},f=0;f<m;f++){var x=c?wt({delay:(r.delay||0)+c(f,m,n[f],s[f]),done:_},r):r;OD(n[f],s[f],x)}else t.__morphT=0,t.animateTo({__morphT:1},wt({during:function(b){for(var S=0;S<m;S++){var w=s[S];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(b)},done:function(){g();for(var b=0;b<e.length;b++)zd(e[b],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function PMt(e,t,r){var n=t.length,i=[],a=r.dividePath||K7;function o(d){for(var p=0;p<d.length;p++){var v=d[p];P0(v)?o(v.childrenRef()):v instanceof Kt&&i.push(v)}}if(P0(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(Hk(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),e2()}i=N0(i),t=N0(t);for(var h=r.individualDelay,u=0;u<n;u++){var f=h?wt({delay:(r.delay||0)+h(u,n,i[u],t[u])},r):r;OD(i[u],t[u],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function JF(e){return nt(e[0])}function QF(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var RMt={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=Hk(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function TS(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=Hh("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;JF(e)&&(u=e,c=t),JF(t)&&(u=t,c=e);function h(m,y,_,x,b){var S=m.many,w=m.one;if(S.length===1&&!b){var C=y?S[0]:w,k=y?w:S[0];if(P0(C))h({many:[C],one:k},!0,_,x,!0);else{var T=s?wt({delay:s(_,x)},l):l;OD(C,k,T),a(C,k,C,k,T)}}else for(var A=wt({dividePath:RMt[r],individualDelay:s&&function(F,O,$,V){return s(F+_,x)}},l),L=y?IMt(S,w,A):PMt(w,S,A),D=L.fromIndividuals,E=L.toIndividuals,N=D.length,P=0;P<N;P++){var T=s?wt({delay:s(P,N)},l):l;a(D[P],E[P],y?S[P]:m.one,y?m.one:S[P],T)}}for(var f=u?u===e:e.length>t.length,d=u?QF(c,u):QF(f?t:e,[f?e:t]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var g=0,v=0;v<d.length;v++)h(d[v],f,g,p),g+=d[v].many.length}function Cl(e){if(!e)return[];if(nt(e)){for(var t=[],r=0;r<e.length;r++)t.push(Cl(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof Kt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var J7=1e4,NMt=0,t5=1,e5=2,OMt=qt();function BMt(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function FMt(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function r5(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=BMt(e,i);if(a){var o=FMt(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function n5(e){var t=[];return R(e,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>J7){process.env.NODE_ENV!=="production"&&Ne("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:r5(n,o,i,!1),childGroupId:r5(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function kS(e,t,r){e.traverse(function(n){n instanceof Kt&&Le(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function AS(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function mc(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function $Mt(e,t,r){var n=Hh("update",r,t);n&&e.traverse(function(i){if(i instanceof vi){var a=ppt(i);a&&i.animateFrom({style:a},n)}})}function VMt(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function Q7(e,t,r){var n=n5(e),i=n5(t);function a(_,x,b,S,w){(b||_)&&x.animateFrom({style:b&&b!==_?et(et({},b.style),_.style):_.style},w)}var o=!1,s=NMt,l=pt(),u=pt();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<i.length;c++){var h=i[c].groupId;if(u.get(h)){s=t5;break}var f=i[c].childGroupId;if(f&&l.get(f)){s=e5;break}}function d(_,x){return function(b){var S=b.data,w=b.dataIndex;return x?S.getId(w):_?s===t5?b.childGroupId:b.groupId:s===e5?b.childGroupId:b.groupId}}var p=VMt(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(_,x){var b=n[x],S=i[_],w=S.data.hostModel,C=b.data.getItemGraphicEl(b.dataIndex),k=S.data.getItemGraphicEl(S.dataIndex);if(C===k){k&&$Mt(k,S.dataIndex,w);return}C&&v[C.id]||k&&(mc(k),C?(mc(C),AS(C),o=!0,TS(Cl(C),Cl(k),S.divide,w,_,a)):kS(k,w,_))}new Lo(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(_,x){var b=i[_],S=b.data,w=S.hostModel,C=S.getItemGraphicEl(b.dataIndex),k=de(at(x,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==C&&!v[T.id]});C&&(mc(C),k.length?(R(k,function(T){mc(T),AS(T)}),o=!0,TS(Cl(k),Cl(C),b.divide,w,_,a)):kS(C,w,b.dataIndex))}).updateOneToMany(function(_,x){var b=n[x],S=b.data.getItemGraphicEl(b.dataIndex);if(!(S&&v[S.id])){var w=de(at(_,function(k){return i[k].data.getItemGraphicEl(i[k].dataIndex)}),function(k){return k&&k!==S}),C=i[_[0]].data.hostModel;w.length&&(R(w,function(k){return mc(k)}),S?(mc(S),AS(S),o=!0,TS(Cl(S),Cl(w),b.divide,C,_[0],a)):R(w,function(k){return kS(k,C,_[0])}))}}).updateManyToMany(function(_,x){new Lo(x,_,function(b){return n[b].data.getId(n[b].dataIndex)},function(b){return i[b].data.getId(i[b].dataIndex)}).update(function(b,S){y(_[b],x[S])}).execute()}).execute(),o&&R(t,function(_){var x=_.data,b=x.hostModel,S=b&&r.getViewOfSeriesModel(b),w=Hh("update",b,0);S&&b.isAnimationEnabled()&&w&&w.duration>0&&S.group.traverse(function(C){C instanceof Kt&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function i5(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function a5(e){return nt(e)?e.sort().join(","):e}function ts(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function zMt(e,t){var r=pt(),n=pt(),i=pt();R(e.oldSeries,function(o,s){var l=e.oldDataGroupIds[s],u=e.oldData[s],c=i5(o),h=a5(c);n.set(h,{dataGroupId:l,data:u}),nt(c)&&R(c,function(f){i.set(f,{key:h,dataGroupId:l,data:u})})});function a(o){r.get(o)&&Ne("Duplicated seriesKey in universalTransition "+o)}return R(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=i5(o),c=a5(u),h=n.get(c);if(h)process.env.NODE_ENV!=="production"&&a(c),r.set(c,{oldSeries:[{dataGroupId:h.dataGroupId,divide:ts(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:ts(l),data:l}]});else if(nt(u)){process.env.NODE_ENV!=="production"&&a(c);var f=[];R(u,function(v){var g=n.get(v);g.data&&f.push({dataGroupId:g.dataGroupId,divide:ts(g.data),data:g.data})}),f.length&&r.set(c,{oldSeries:f,newSeries:[{dataGroupId:s,data:l,divide:ts(l)}]})}else{var d=i.get(u);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:ts(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:l,divide:ts(l)})}}}}),r}function o5(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function GMt(e,t,r,n){var i=[],a=[];R(xe(e.from),function(o){var s=o5(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:ts(t.oldData[s]),groupIdDim:o.dimension})}),R(xe(e.to),function(o){var s=o5(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:ts(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&Q7(i,a,n)}function WMt(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){R(xe(n.seriesTransition),function(i){R(xe(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Tm]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=OMt(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)R(xe(a),function(d){GMt(d,i,n,r)});else{var o=zMt(i,n);R(o.keys(),function(d){var p=o.get(d);Q7(p.oldSeries,p.newSeries,r)})}R(n.updatedSeries,function(d){d[Tm]&&(d[Tm]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<J7&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),c.push(f))}})}var HMt=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(t){this.breaks=t.breaks},e.prototype.update=function(t){UMt(this,t);var r=this._elapsedExtent;r[0]=this.elapse(t[0]),r[1]=this.elapse(t[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(t,r){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<t&&t<i.vmax){var a=r(t,i.vmax);return process.env.NODE_ENV!=="production"&&ft(a>=0&&Math.round(a)===a),a}}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(t){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(t)-this._elapsedExtent[0])/r},e.prototype.scale=function(t){return this.unelapse(t*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(t){for(var r=s5,n=l5,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(t<=o.vmax){t>o.vmin?r+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=t-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=t-n),r},e.prototype.unelapse=function(t){for(var r=s5,n=l5,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-n,u=l+s.gapReal;if(t<=u){t>l?a=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):a=n+t-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+t-r),a},e}();function jMt(){return new HMt}var s5=0,l5=0;function UMt(e,t){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=BD(s,t);if(u){var c=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(c&&h))if(c||h){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=f,a[d][l.type].inExtFrac=f/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(t[1]-t[0])+(n.tpAbs.val-n.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)-n.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-n.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));R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function YMt(e,t,r,n,i,a){e!=="no"&&R(r,function(o){var s=BD(o,a);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=n(u),h=i*3/4;c>s.vmin-h&&c<s.vmax+h&&(e!=="preserve_extent_bound"||c!==a[0]&&c!==a[1])&&t.splice(l,1)}})}function qMt(e,t,r,n){R(t,function(i){var a=BD(i,r);a&&(e.push({value:a.vmin,break:{type:"vmin",parsedBreak:a},time:n?n(a):void 0}),e.push({value:a.vmax,break:{type:"vmax",parsedBreak:a},time:n?n(a):void 0}))}),t.length&&e.sort(function(i,a){return i.value-a.value})}function BD(e,t){var r=Math.max(e.vmin,t[0]),n=Math.min(e.vmax,t[1]);return r<n||r===n&&r>t[0]&&r<t[1]?{vmin:r,vmax:n,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function r2(e,t,r){var n=[];if(!e)return{breaks:n};function i(o,s){return o>=0&&o<1-1e-5?!0:(process.env.NODE_ENV!=="production"&&ie(s+" must be >= 0 and < 1, rather than "+o+" ."),!1)}R(e,function(o){if(!o||o.start==null||o.end==null){process.env.NODE_ENV!=="production"&&ie("The input axis breaks start/end should not be empty.");return}if(!o.isExpanded){var s={breakOption:_t(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(lt(o.gap)){var u=ci(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c,"Percent gap")||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var h=t(o.gap);(!isFinite(h)||h<0)&&(process.env.NODE_ENV!=="production"&&ie("Axis breaks gap must positive finite rather than ("+o.gap+")."),h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(process.env.NODE_ENV!=="production"&&ie("Axis break."+d+" must not be negative."),s[d]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(process.env.NODE_ENV!=="production"&&ie("Axis breaks must not overlap."),n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function FD(e,t){return n2(t)===n2(e)}function n2(e){return e.start+"_\0_"+e.end}function XMt(e,t,r){var n=[];R(e,function(a,o){var s=t(a);s&&s.type==="vmin"&&n.push([o])}),R(e,function(a,o){var s=t(a);if(s&&s.type==="vmax"){var l=Cu(n,function(u){return FD(t(e[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[e[a[0]],e[a[1]]])}),i}function ZMt(e,t,r,n){var i,a;if(e.break){var o=e.break.parsedBreak,s=Cu(r,function(h){return FD(h.breakOption,e.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Je(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function KMt(e,t,r){var n={noNegative:!0},i=r2(e,r,n),a=r2(e,r,n),o=Math.log(t);return a.breaks=at(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var JMt={vmin:"start",vmax:"end"};function QMt(e,t){return t&&(e=e||{},e.break={type:JMt[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function tEt(){Bpt({createScaleBreakContext:jMt,pruneTicksByBreak:YMt,addBreaksToTicks:qMt,parseAxisBreakOption:r2,identifyAxisBreak:FD,serializeAxisBreakIdentifier:n2,retrieveAxisBreakPairs:XMt,getTicksLogTransformBreak:ZMt,logarithmicParseBreaksFromOption:KMt,makeAxisLabelFormatterParamBreak:QMt})}var u5=qt();function eEt(e,t){var r=Cu(e,function(n){return tr().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return r||e.push(r={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),r}function rEt(e){R(e,function(t){return t.shouldRemove=!0})}function nEt(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function iEt(e,t,r,n,i){var a=r.axis;if(a.scale.isBlank()||!tr())return;var o=tr().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(k){return k.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),d=s.getModel("itemStyle"),p=d.getItemStyle(),v=p.stroke,g=p.lineWidth,m=p.lineDash,y=p.fill,_=new yt({ignoreModelZ:!0}),x=a.isHorizontal(),b=u5(t).visualList||(u5(t).visualList=[]);rEt(b);for(var S=function(k){var T=o[k][0].break.parsedBreak,A=[];A[0]=a.toGlobalCoord(a.dataToCoord(T.vmin,!0)),A[1]=a.toGlobalCoord(a.dataToCoord(T.vmax,!0)),A[1]<A[0]&&A.reverse();var L=eEt(b,T);L.shouldRemove=!1;var D=new yt;C(L.zigzagRandomList,D,A[0],A[1],x,T),h&&D.on("click",function(){var E={type:Q_,breaks:[{start:T.breakOption.start,end:T.breakOption.end}]};E[a.dim+"AxisIndex"]=r.componentIndex,i.dispatchAction(E)}),D.silent=!h,_.add(D)},w=0;w<o.length;w++)S(w);e.add(_),nEt(b);function C(k,T,A,L,D,E){var N={stroke:v,lineWidth:g,lineDash:m,fill:"none"},P=D?0:1,F=1-P,O=n[Pt[F]]+n[er[F]];function $(vt){var kt=[],Wt=[];kt[P]=Wt[P]=vt,kt[F]=n[Pt[F]],Wt[F]=O;var Ht={x1:kt[0],y1:kt[1],x2:Wt[0],y2:Wt[1]};return N_(Ht,Ht,{lineWidth:1}),kt[0]=Ht.x1,kt[1]=Ht.y1,kt[P]}A=$(A),L=$(L);for(var V=[],I=[],B=!0,G=n[Pt[F]],H=0;;H++){var W=G===n[Pt[F]],J=G>=O;J&&(G=O);var Q=[],tt=[];Q[P]=A,tt[P]=L,!W&&!J&&(Q[P]+=B?-l:l,tt[P]-=B?l:-l),Q[F]=G,tt[F]=G,V.push(Q),I.push(tt);var it=void 0;if(H<k.length?it=k[H]:(it=Math.random(),k.push(it)),G+=it*(c-u)+u,B=!B,J)break}var X=tr().serializeAxisBreakIdentifier(E.breakOption);if(T.add(new Gr({anid:"break_a_"+X,shape:{points:V},style:N,z:f})),E.gapReal!==0){T.add(new Gr({anid:"break_b_"+X,shape:{points:I},style:N,z:f}));var rt=I.slice();rt.reverse();var Z=V.concat(rt);T.add(new Qr({anid:"break_c_"+X,shape:{points:Z},style:{fill:y,opacity:p.opacity},z:f}))}}}function aEt(e,t,r,n){var i=e.axis,a=r.transform;ft(n.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=tr().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(g){return g.break},!1),l=at(s,function(g){var m=g[0].break.parsedBreak,y=[i.dataToCoord(m.vmin,!0),i.dataToCoord(m.vmax,!0)];return y[0]>y[1]&&y.reverse(),{coordPair:y,brkId:tr().serializeAxisBreakIdentifier(m.breakOption)}});l.sort(function(g,m){return g.coordPair[0]-m.coordPair[0]});for(var u=o[0],c=null,h=0;h<l.length;h++){var f=l[h],d=Math.max(f.coordPair[0],o[0]),p=Math.min(f.coordPair[1],o[1]);u<=d&&v(u,d,c,f),u=p,c=f}u<=o[1]&&v(u,o[1],c,null);function v(g,m,y,_){function x(A,L){a&&(qe(A,A,a),qe(L,L,a))}function b(A,L){var D={x1:A[0],y1:A[1],x2:L[0],y2:L[1]};N_(D,D,n.style),A[0]=D.x1,A[1]=D.y1,L[0]=D.x2,L[1]=D.y2}var S=[g,0],w=[m,0],C=[g,5],k=[m,5];x(S,C),b(S,C),x(w,k),b(w,k),b(S,w);var T=new Qe(et({shape:{x1:S[0],y1:S[1],x2:w[0],y2:w[1]}},n));t.add(T),T.anid="breakLine_"+(y?y.brkId:"\0")+"_\0_"+(_?_.brkId:"\0")}}function oEt(e,t,r){if(Cu(r,function(y){return!y}))return;var n=new St;if(!K_(r[0],r[1],n,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=Ir();Os(i,i,-t);var a=at(r,function(y){return y.transform?Sa(Ir(),i,y.transform):i});function o(y){var _=r[0].localRect,x=new St(_[er[y]]*a[0][0],_[er[y]]*a[0][1]);return Math.abs(x.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=at(r,function(y,_){var x=y.localRect.clone();return x.applyTransform(a[_]),x}),u=new St;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(i);var c=n.clone().transform(i),h=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),f=(h+c.x)/2-u.x,d=Math.min(f,f-c.x),p=Math.max(f,f-c.x),v=p<0?p:d>0?d:0;s=(f-v)/c.x}var g=new St,m=new St;St.scale(g,n,-s),St.scale(m,n,1-s),iT(r[0],g),iT(r[1],m)}function sEt(e,t){var r={breaks:[]};return R(t.breaks,function(n){if(n){var i=Cu(e.get("breaks",!0),function(s){return tr().identifyAxisBreak(s,n)});if(!i){process.env.NODE_ENV!=="production"&&Ne("Can not find axis break by start: "+n.start+", end: "+n.end);return}var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===Q_?!0:a===_9?!1:a===x9?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}),r}function lEt(){ixt({adjustBreakLabelPair:oEt,buildAxisBreakLine:aEt,rectCoordBuildBreakAxis:iEt,updateModelAxisBreak:sEt})}function uEt(e){cxt(e),tEt(),lEt()}function cEt(){Ext(hEt)}function hEt(e,t){R(e,function(r){if(!r.model.get(["axisLabel","inside"])){var n=fEt(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,r.position==="top"?t.y+=n.height+a:r.position==="left"&&(t.x+=n.width+a)}}})}function fEt(e){var t=e.model,r=e.scale;if(!t.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof _h?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Kh(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var h=n?n[c]:{value:a[0]+c},f=s(h,c),d=o.getTextRect(f),p=v(d,o.get("rotate")||0);l?l.union(p):l=p}return l;function v(g,m){var y=m*Math.PI/180,_=g.width,x=g.height,b=_*Math.abs(Math.cos(y))+Math.abs(x*Math.sin(y)),S=_*Math.abs(Math.sin(y))+Math.abs(x*Math.cos(y)),w=new Ct(g.x,g.y,b,S);return w}}Gt([r_t]);Gt([K0t]);Gt([S_t,B_t,Y_t,Zxt,sbt,Zbt,w1t,oSt,ASt,RSt,VSt,qSt,zwt,hCt,SCt,FCt,GCt,JCt,aTt,gTt,STt,ITt,v2t]);Gt(R2t);Gt(akt);Gt(U9);Gt(mkt);Gt(IU);Gt(bkt);Gt(zkt);Gt(Zkt);Gt(OAt);Gt(eDt);Gt(av);Gt(mDt);Gt(xDt);Gt(MDt);Gt(FDt);Gt(HDt);Gt(ZDt);Gt(oLt);Gt(TLt);Gt($7);Gt(V7);Gt(jLt);Gt(j7);Gt(U7);Gt(XLt);Gt(tMt);Gt(dMt);Gt(gMt);Gt(WMt);Gt(m0t);Gt(uEt);Gt(cEt);Gt(Kxt);const dEt=({data:e})=>{const t=j.useRef(null),r=j.useRef(null),n=j.useRef(`echarts-${xk()}`),i=j.useCallback(a=>{if(a?.obj?.k)try{const o=JSON.parse(a.obj.k);if(o&&typeof o=="object"&&o.series)return o;throw new Error("Parsed object is not a valid ECharts option")}catch(o){console.warn("Invalid ECharts code:",a.obj.k,o)}if(Array.isArray(a.children))for(const o of a.children){const s=i(o);if(s)return s}return null},[]);return j.useEffect(()=>{const a=e?.children?.[0],o=a?i(a):null;if(!t.current)return;r.current&&r.current.dispose(),r.current=Rmt(t.current),o?r.current.setOption(o):t.current.innerHTML='<pre style="color: orange">No valid ECharts option found in data.</pre>';const s=()=>{r.current?.resize()};return window.addEventListener("resize",s),()=>{r.current?.dispose(),r.current=null,window.removeEventListener("resize",s)}},[e,i]),z.jsx("div",{id:n.current,ref:t,"data-component":"echarts",style:{width:"100%",height:"400px"}})},qg={"smp-notification-widget-container":"_smp-notification-widget-container_18eh5_1","smp-notification-widget-header":"_smp-notification-widget-header_18eh5_8","smp-notification-widget-fallback":"_smp-notification-widget-fallback_18eh5_17"},Ka={"smp-notification-backdrop":"_smp-notification-backdrop_1qsr0_1","smp-notification-container":"_smp-notification-container_1qsr0_17","smp-notification-gravity":"_smp-notification-gravity_1qsr0_22","smp-notification-gravity-INFO":"_smp-notification-gravity-INFO_1qsr0_29","smp-notification-gravity-ERROR":"_smp-notification-gravity-ERROR_1qsr0_33","smp-notification-gravity-UNAUTHORIZED":"_smp-notification-gravity-UNAUTHORIZED_1qsr0_34","smp-notification-gravity-WARNING":"_smp-notification-gravity-WARNING_1qsr0_38","smp-notification-gravity-QUEST":"_smp-notification-gravity-QUEST_1qsr0_39","smp-notification-temporary":"_smp-notification-temporary_1qsr0_44","smp-notification-header":"_smp-notification-header_1qsr0_48","smp-notification-header-message":"_smp-notification-header-message_1qsr0_55","smp-notification-body":"_smp-notification-body_1qsr0_62","smp-notification-buttons":"_smp-notification-buttons_1qsr0_69"};function pEt(e){return e===Ac.TN||e===Ac.TM||e===Ac.TS||e===Ac.TT}function vEt(e){return e===Ac.PM||e===Ac.TM}const Xg={"smp-progress-bar-wrapper":"_smp-progress-bar-wrapper_j9g1d_3","smp-progress-bar-track":"_smp-progress-bar-track_j9g1d_11","smp-progress-bar-fill":"_smp-progress-bar-fill_j9g1d_18","smp-progress-bar-value":"_smp-progress-bar-value_j9g1d_28"},gEt=({data:e,progress:t,visibleValue:r=!0})=>{const n=t||e?.children?.[0]?.obj?.k||0;return z.jsxs("div",{className:`${Xg["smp-progress-bar-wrapper"]}`,"data-component":"progress-bar",children:[z.jsx("div",{className:Xg["smp-progress-bar-track"],children:z.jsx("div",{className:Xg["smp-progress-bar-fill"],style:{width:`${Math.max(0,Math.min(100,Number(n)))}%`}})}),r&&z.jsxs("div",{className:Xg["smp-progress-bar-value"],children:[Math.round(Number(n)),"%"]})]})},mEt=({data:e,onButtonClick:t,onClose:r,isModal:n=!0})=>{const i=pEt(e.mode),a=vEt(e.mode)&&n,o={backdrop:`${a?Ka["smp-notification-backdrop"]:""}`,container:`${Ka["smp-notification-container"]}`,gravity:`${Ka["smp-notification-gravity"]} ${Ka[`smp-notification-gravity-${e.gravity}`]} ${i?Ka["smp-notification-temporary"]:""}`,header:`${Ka["smp-notification-header"]}`,headerMessage:`${Ka["smp-notification-header-message"]}`,body:`${Ka["smp-notification-body"]}`,buttons:`${Ka["smp-notification-buttons"]}`},s=z.jsx("div",{"data-component":"notification",className:o.gravity,children:z.jsxs("div",{className:o.container,children:[z.jsxs("div",{className:o.header,children:[z.jsxs("div",{className:o.headerMessage,children:[e.timestamp&&z.jsx(Sr,{variant:"code",bindValue:new Date(e.timestamp).toLocaleDateString()}),e.message&&z.jsx("strong",{children:z.jsx(Sr,{variant:"title",bindValue:e.message})})]}),z.jsx(me,{icon:"close",title:"close",onClick:r,isInteractable:!0})]}),z.jsxs("div",{className:o.body,children:[e.fullMessage&&z.jsx("div",{children:z.jsx(Sr,{variant:"body",bindValue:e.fullMessage})}),e.buttons&&e.buttons.length>0&&t&&z.jsx("div",{className:o.buttons,children:e.buttons.map((l,u)=>z.jsx(Be,{bindValue:l?.data?.label||l.obj?.k||l.decode||"Action",icon:l.icon||l.placeholderIcon||"",variant:"base",appearance:"outlined",onClick:()=>t(l)},u))}),e.value&&e.state===HY.ON_LOADING&&z.jsx(gEt,{progress:e.value||"0"})]})]})});return a?z.jsx("div",{className:o.backdrop,"data-component":"backdrop",children:s}):s},yEt=({data:e,onClearAllMessage:t,onNotificationClose:r,onNotificationButtonClick:n})=>z.jsxs("div",{className:qg["smp-notification-widget-container"],children:[z.jsxs("div",{className:qg["smp-notification-widget-header"],children:[z.jsx(Sr,{variant:"title",bindValue:"Notification Area"}),z.jsx(Be,{bindValue:"Dismiss All",appearance:"ghost",onClick:t,disabled:e.length===0,variant:"danger"})]}),z.jsx("div",{className:qg["smp-notification-widget-list"],children:e.length>0?e.map((i,a)=>z.jsx(mEt,{data:i,isModal:!1,onClose:()=>r(i.id||""),onButtonClick:n},a)):z.jsx("div",{className:qg["smp-notification-widget-fallback"],children:z.jsx(Sr,{variant:"body",bindValue:"No active notification"})})})]});exports.AppBar=_X;exports.Autocomplete=l2;exports.Breadcrumbs=w5;exports.Button=Be;exports.ButtonList=L5;exports.Checkbox=$0;exports.Chips=Rp;exports.Color=Oi;exports.Color$1=Eh;exports.Combobox=Gm;exports.DashList=xX;exports.DataTableComponent=KX;exports.DatePicker=h2;exports.Drawer=JX;exports.EchartsGraph=dEt;exports.Field=QX;exports.FileUpload=M5;exports.INPUT_PANEL_COMMAND_SUBMIT_EVENT_NAME=FS;exports.Icon=me;exports.InputPanel=eZ;exports.JSON_SCHEMA=KV;exports.MapCache=Ro;exports.MermaidChart=wct;exports.NotificationWidget=yEt;exports.Password=I5;exports.Path=Tct;exports.Rgb=cn;exports.Set=by;exports.Stack=Su;exports.Symbol=Kd;exports.TabBar=_5;exports.Textarea=P5;exports.Textfield=mi;exports.Toolbar=s2;exports.Typography=Sr;exports.Uint8Array=Sw;exports.Utils=Jt;exports.ZERO_WIDTH_SPACE=Dz;exports.__export=V5;exports.__name=M;exports.abs=Btt;exports.acos=jtt;exports.array=j$;exports.arrayLikeKeys=_z;exports.asin=Utt;exports.assignValue=mz;exports.assignWithDepth_default=sr;exports.atan2=Ftt;exports.baseAssignValue=a_;exports.baseFor=nz;exports.baseGetTag=_u;exports.baseKeys=eW;exports.baseRest=Cz;exports.baseUnary=vz;exports.calculateMathMLDimensions=uK;exports.calculateTextHeight=K2;exports.calculateTextWidth=Aa;exports.cleanAndMerge=l_;exports.clear=u$;exports.clear$1=Oot;exports.clear$2=dot;exports.clear2=Iot;exports.cloneArrayBuffer=oz;exports.cloneBuffer=az;exports.cloneTypedArray=sz;exports.color=oh;exports.commonDb_exports=m2;exports.common_default=yu;exports.computeDimensionOfText=c4;exports.configurePaths=PY;exports.configureSvgSize=g2;exports.constant=ml;exports.constant$1=Sz;exports.constant$2=Y0;exports.copyArray=lz;exports.copyObject=yz;exports.cos=$tt;exports.createAssigner=kz;exports.createText=No;exports.curveBasis=kd;exports.darken=Ft;exports.dayjs2=F5;exports.decodeEntities=Ps;exports.defaultConfig2=yK;exports.defaultConfig_default=v2;exports.define=U0;exports.distExports=tz;exports.epsilon=iw;exports.eq=Bp;exports.evaluate=hr;exports.extend=T2;exports.generateId=Rz;exports.getAccDescription=d$;exports.getAccTitle=h$;exports.getConfig=zr;exports.getConfig2=_e;exports.getDefaultExportFromCjs=c5;exports.getDiagramTitle=v$;exports.getEdgeId=$it;exports.getIconSVG=Nh;exports.getLineFunctionsWithOffset=QV;exports.getPrototype=G2;exports.getRegisteredLayoutAlgorithm=sst;exports.getStylesFromArray=Z2;exports.getSubGraphTitleMargins=e_;exports.getThemeVariables3=K5;exports.getUrl=s$;exports.getUserDefinedConfig=JZ;exports.halfPi=aw;exports.hasKatex=ru;exports.hue=pQ;exports.identity=U2;exports.initCloneObject=cz;exports.insertCluster=S4;exports.insertEdge=HG;exports.insertEdgeLabel=zG;exports.insertNode=vk;exports.interpolateNumber=ao;exports.interpolateRgb=ZS;exports.interpolateString=P$;exports.isArguments=tp;exports.isArray=ep;exports.isArrayLike=$p;exports.isArrayLikeObject=fz;exports.isBuffer=o_;exports.isDark=Lh;exports.isEmpty=zw;exports.isFunction=r_;exports.isIndex=H2;exports.isIterateeCall=Tz;exports.isLabelStyle=z2;exports.isLength=W2;exports.isObject=Is;exports.isObjectLike=Rh;exports.isPrototype=Fp;exports.isTypedArray=s_;exports.isValidShape=VG;exports.keysIn=j2;exports.lighten=Dt;exports.line=Y$;exports.lineBreakRegex=Mh;exports.load=JV;exports.log=ot;exports.markers_default=YG;exports.max=Vtt;exports.memoize=Ph;exports.merge=Az;exports.min=ztt;exports.nodeUtil=ww;exports.nogamma=k2;exports.overRest=bz;exports.package_default=$S;exports.parseFontSize=Vp;exports.parseGenericTypes=HS;exports.pi=Z0;exports.positionEdgeLabel=GG;exports.positionNode=Pot;exports.random=Oz;exports.registerIconPacks=t4;exports.render=ost;exports.renderKatexSanitized=H0;exports.replaceIconSubstring=ck;exports.rgbConvert=M$;exports.rgba=$c;exports.sanitizeText=Hn;exports.select=ge;exports.selectSvgElement=v3;exports.setAccDescription=f$;exports.setAccTitle=c$;exports.setConfig2=mK;exports.setDiagramTitle=p$;exports.setNodeElem=Eot;exports.setToString=wz;exports.setupGraphViewbox=l$;exports.setupGraphViewbox2=g$;exports.sin=Gtt;exports.sqrt=Wtt;exports.styles2String=Lt;exports.tau=Htt;exports.unknownIcon=Jz;exports.updateNodeBounds=It;exports.utils_default=si;exports.v4=xk;exports.withPath=H$;exports.wrapLabel=Bz;
391
+ `)),ce(n)),a.push({dimIdx:m.index,parser:y,comparator:new c8(f,p)})});var o=t.sourceFormat;o!==Pr&&o!==Yn&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),ce(n));for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,h){for(var f=0;f<a.length;f++){var d=a[f],p=t.retrieveValueFromItem(c,d.dimIdx),v=t.retrieveValueFromItem(h,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var g=d.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function dMt(e){e.registerTransform(hMt),e.registerTransform(fMt)}var pMt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new p8(this),_P(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),_P(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Pi},t}(Zt),vMt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(Ee);function gMt(e){e.registerComponentModel(pMt),e.registerComponentView(vMt)}var na=Ia.CMD;function Bc(e,t){return Math.abs(e-t)<1e-5}function QT(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(D,E){i&&i.length>2&&n.push(i),i=[D,E]}function c(D,E,N,P){Bc(D,N)&&Bc(E,P)||i.push(D,E,N,P,N,P)}function h(D,E,N,P,F,O){var $=Math.abs(E-D),V=Math.tan($/4)*4/3,I=E<D?-1:1,B=Math.cos(D),G=Math.sin(D),H=Math.cos(E),W=Math.sin(E),J=B*F+N,Q=G*O+P,tt=H*F+N,it=W*O+P,X=F*V*I,rt=O*V*I;i.push(J-X*G,Q+rt*B,tt+X*W,it-rt*H,tt,it)}for(var f,d,p,v,g=0;g<r;){var m=t[g++],y=g===1;switch(y&&(a=t[g],o=t[g+1],s=a,l=o,(m===na.L||m===na.C||m===na.Q)&&(i=[s,l])),m){case na.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case na.L:f=t[g++],d=t[g++],c(a,o,f,d),a=f,o=d;break;case na.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case na.Q:f=t[g++],d=t[g++],p=t[g++],v=t[g++],i.push(a+2/3*(f-a),o+2/3*(d-o),p+2/3*(f-p),v+2/3*(d-v),p,v),a=p,o=v;break;case na.A:var _=t[g++],x=t[g++],b=t[g++],S=t[g++],w=t[g++],C=t[g++]+w;g+=1;var k=!t[g++];f=Math.cos(w)*b+_,d=Math.sin(w)*S+x,y?(s=f,l=d,u(s,l)):c(a,o,f,d),a=Math.cos(C)*b+_,o=Math.sin(C)*S+x;for(var T=(k?-1:1)*Math.PI/2,A=w;k?A>C:A<C;A+=T){var L=k?Math.max(A+T,C):Math.min(A+T,C);h(A,L,_,x,b,S)}break;case na.R:s=a=t[g++],l=o=t[g++],f=s+t[g++],d=l+t[g++],u(f,l),c(f,l,f,d),c(f,d,s,d),c(s,d,s,l),c(s,l,f,l);break;case na.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function t2(e,t,r,n,i,a,o,s,l,u){if(Bc(e,r)&&Bc(t,n)&&Bc(i,o)&&Bc(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-e,d=s-t,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var v=r-e,g=n-t,m=i-o,y=a-s,_=v*v+g*g,x=m*m+y*y;if(_<h&&x<h){l.push(o,s);return}var b=f*v+d*g,S=-f*m-d*y,w=_-b*b,C=x-S*S;if(w<h&&b>=0&&C<h&&S>=0){l.push(o,s);return}var k=[],T=[];Cs(e,r,i,o,.5,k),Cs(t,n,a,s,.5,T),t2(k[0],T[0],k[1],T[1],k[2],T[2],k[3],T[3],l,u),t2(k[4],T[4],k[5],T[5],k[6],T[6],k[7],T[7],l,u)}function mMt(e,t){var r=QT(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],h=a[u++],f=a[u++],d=a[u++],p=a[u++],v=a[u++];t2(s,l,c,h,f,d,p,v,o,t),s=p,l=v}n.push(o)}return n}function q7(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,h=r-c;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function UF(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),h=q7([l,u],c?0:1,t),f=(c?s:u)/h.length,d=0;d<h.length;d++)for(var p=(c?u:s)/h[d],v=0;v<h[d];v++){var g={};c?(g.startAngle=a+f*d,g.endAngle=a+f*(d+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=n+f*d,g.r=n+f*(d+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function yMt(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=q7([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=e[s]/o.length,f=0;f<o.length;f++)for(var d=e[l]/o[f],p=0;p<o[f];p++){var v={};v[u]=f*h,v[c]=p*d,v[s]=h,v[l]=d,v.x+=e.x,v.y+=e.y,r.push(v)}}function YF(e,t,r,n){return e*n-r*t}function _Mt(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,h=s-a,f=YF(c,h,l,u);if(Math.abs(f)<1e-6)return null;var d=e-i,p=t-a,v=YF(d,p,c,h)/f;return v<0||v>1?null:new St(v*l+e,v*u+t)}function xMt(e,t,r){var n=new St;St.sub(n,r,t),n.normalize();var i=new St;St.sub(i,e,t);var a=i.dot(n);return a}function gc(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function bMt(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=_Mt(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:xMt(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(g,m){return g.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var f=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[f],v=[d],a=u.idx+1;a<=c.idx;a++)gc(p,e[a].slice());gc(p,d),gc(p,f);for(var a=c.idx+1;a<=u.idx+n;a++)gc(v,e[a%n].slice());return gc(v,f),gc(v,d),[{points:p},{points:v}]}function qF(e){var t=e.points,r=[],n=[];P_(t,r,n);var i=new Ct(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new St,c=new St;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),bMt(t,u,c)}function I0(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);I0(e,a[0],i,n),I0(e,a[1],r-i,n)}return n}function SMt(e,t){for(var r=[],n=0;n<t;n++)r.push(Hk(e));return r}function wMt(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function CMt(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function TMt(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":yMt(n,t,r),i=Ut;break;case"sector":UF(n,t,r),i=Jr;break;case"circle":UF({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=Jr;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=at(mMt(e.getUpdatedPathProxy(),o),function(m){return CMt(m)}),l=s.length;if(l===0)I0(qF,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,h=at(s,function(m){var y=[],_=[];P_(m,y,_);var x=(_[1]-y[1])*(_[0]-y[0]);return c+=x,{poly:m,area:x}});h.sort(function(m,y){return y.area-m.area});for(var f=t,u=0;u<l;u++){var d=h[u];if(f<=0)break;var p=u===l-1?f:Math.ceil(d.area/c*t);p<0||(I0(qF,{points:d.poly},p,r),f-=p)}}i=Qr;break}if(!i)return SMt(e,t);for(var v=[],u=0;u<r.length;u++){var g=new i;g.setShape(r[u]),wMt(e,g),v.push(g)}return v}function kMt(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,d=2;d<s;){var p=o[d-2],v=o[d-1],g=o[d++],m=o[d++],y=o[d++],_=o[d++],x=o[d++],b=o[d++];if(f<=0){h.push(g,m,y,_,x,b);continue}for(var S=Math.min(f,c-1)+1,w=1;w<=S;w++){var C=w/S;Cs(p,g,y,x,C,i),Cs(v,m,_,b,C,a),p=i[3],v=a[3],h.push(i[1],a[1],i[2],a[2],p,v),g=i[5],m=a[5],y=i[6],_=a[6]}f-=S-1}return o===e?[h,t]:[e,h]}function XF(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function AMt(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,h=void 0;l?u?(r=kMt(l,u),c=r[0],h=r[1],n=c,i=h):(h=XF(i||l,l),c=l):(c=XF(n||u,u),h=u),a.push(c),o.push(h)}return[a,o]}function ZF(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],h=s*c-u*l;t+=h,r+=(s+u)*h,n+=(l+c)*h}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function DMt(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,h=0,f=0;f<s;f+=2){var d=f===0?c:(c+f-2)%l+2,p=e[d]-r[0],v=e[d+1]-r[1],g=t[f]-n[0],m=t[f+1]-n[1],y=g-p,_=m-v;h+=y*y+_*_}h<a&&(a=h,o=u)}return o}function LMt(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function MMt(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=ZF(s),c=ZF(l);a==null&&(a=u[2]<0!=c[2]<0);var h=[],f=[],d=0,p=1/0,v=[],g=s.length;a&&(s=LMt(s));for(var m=DMt(s,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var x=(m+_)%y+2;h[_+2]=s[x]-u[0],h[_+3]=s[x+1]-u[1]}h[0]=s[m]-u[0],h[1]=s[m+1]-u[1];for(var b=n/r,S=-n/2;S<=n/2;S+=b){for(var w=Math.sin(S),C=Math.cos(S),k=0,_=0;_<s.length;_+=2){var T=h[_],A=h[_+1],L=l[_]-c[0],D=l[_+1]-c[1],E=L*C-D*w,N=L*w+D*C;v[_]=E,v[_+1]=N;var P=E-T,F=N-A;k+=P*P+F*F}if(k<p){p=k,d=S;for(var O=0;O<v.length;O++)f[O]=v[O]}}i.push({from:h,to:f,fromCp:u,toCp:c,rotation:-d})}return i}function P0(e){return e.__isCombineMorphing}var X7="__mOriginal_";function R0(e,t,r){var n=X7+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function zd(e,t){var r=X7+t;e[r]&&(e[t]=e[r],e[r]=null)}function KF(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function Z7(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=AMt(QT(r),QT(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&KF(a,s),l&&KF(o,l),R0(t,"updateTransform",{replace:u}),t.transform=null;var c=MMt(a,o,10,Math.PI),h=[];R0(t,"buildPath",{replace:function(f){for(var d=t.__morphT,p=1-d,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,x=m.rotation*d,b=m.fromCp,S=m.toCp,w=Math.sin(x),C=Math.cos(x);pm(v,b,S,d);for(var k=0;k<y.length;k+=2){var T=y[k],A=y[k+1],L=_[k],D=_[k+1],E=T*p+L*d,N=A*p+D*d;h[k]=E*C-N*w+v[0],h[k+1]=E*w+N*C+v[1]}var P=h[0],F=h[1];f.moveTo(P,F);for(var k=2;k<y.length;){var L=h[k++],D=h[k++],O=h[k++],$=h[k++],V=h[k++],I=h[k++];P===L&&F===D&&O===V&&$===I?f.lineTo(V,I):f.bezierCurveTo(L,D,O,$,V,I),P=V,F=I}}}})}function OD(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;Z7(e,t),t.__morphT=0;function a(){zd(t,"buildPath"),zd(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},wt({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function EMt(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(e&u)>0&&(c=1),(t&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function N0(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=at(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(h,r),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=at(a,function(s,l){return{cp:s,z:EMt(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function K7(e){return TMt(e.path,e.count)}function e2(){return{fromIndividuals:[],toIndividuals:[],count:0}}function IMt(e,t,r){var n=[];function i(b){for(var S=0;S<b.length;S++){var w=b[S];P0(w)?i(w.childrenRef()):w instanceof Kt&&n.push(w)}}i(e);var a=n.length;if(!a)return e2();var o=r.dividePath||K7,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),e2();n=N0(n),s=N0(s);for(var l=r.done,u=r.during,c=r.individualDelay,h=new uo,f=0;f<a;f++){var d=n[f],p=s[f];p.parent=t,p.copyTransform(h),c||Z7(d,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(b){for(var S=0;S<s.length;S++)s[S].addSelfToZr(b)}R0(t,"addSelfToZr",{after:function(b){v(b)}}),R0(t,"removeSelfFromZr",{after:function(b){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(b)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,zd(t,"addSelfToZr"),zd(t,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},f=0;f<m;f++){var x=c?wt({delay:(r.delay||0)+c(f,m,n[f],s[f]),done:_},r):r;OD(n[f],s[f],x)}else t.__morphT=0,t.animateTo({__morphT:1},wt({during:function(b){for(var S=0;S<m;S++){var w=s[S];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(b)},done:function(){g();for(var b=0;b<e.length;b++)zd(e[b],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function PMt(e,t,r){var n=t.length,i=[],a=r.dividePath||K7;function o(d){for(var p=0;p<d.length;p++){var v=d[p];P0(v)?o(v.childrenRef()):v instanceof Kt&&i.push(v)}}if(P0(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(Hk(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),e2()}i=N0(i),t=N0(t);for(var h=r.individualDelay,u=0;u<n;u++){var f=h?wt({delay:(r.delay||0)+h(u,n,i[u],t[u])},r):r;OD(i[u],t[u],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function JF(e){return nt(e[0])}function QF(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var RMt={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=Hk(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function TS(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=Hh("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;JF(e)&&(u=e,c=t),JF(t)&&(u=t,c=e);function h(m,y,_,x,b){var S=m.many,w=m.one;if(S.length===1&&!b){var C=y?S[0]:w,k=y?w:S[0];if(P0(C))h({many:[C],one:k},!0,_,x,!0);else{var T=s?wt({delay:s(_,x)},l):l;OD(C,k,T),a(C,k,C,k,T)}}else for(var A=wt({dividePath:RMt[r],individualDelay:s&&function(F,O,$,V){return s(F+_,x)}},l),L=y?IMt(S,w,A):PMt(w,S,A),D=L.fromIndividuals,E=L.toIndividuals,N=D.length,P=0;P<N;P++){var T=s?wt({delay:s(P,N)},l):l;a(D[P],E[P],y?S[P]:m.one,y?m.one:S[P],T)}}for(var f=u?u===e:e.length>t.length,d=u?QF(c,u):QF(f?t:e,[f?e:t]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var g=0,v=0;v<d.length;v++)h(d[v],f,g,p),g+=d[v].many.length}function Cl(e){if(!e)return[];if(nt(e)){for(var t=[],r=0;r<e.length;r++)t.push(Cl(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof Kt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var J7=1e4,NMt=0,t5=1,e5=2,OMt=qt();function BMt(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function FMt(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function r5(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=BMt(e,i);if(a){var o=FMt(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function n5(e){var t=[];return R(e,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>J7){process.env.NODE_ENV!=="production"&&Ne("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:r5(n,o,i,!1),childGroupId:r5(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function kS(e,t,r){e.traverse(function(n){n instanceof Kt&&Le(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function AS(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function mc(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function $Mt(e,t,r){var n=Hh("update",r,t);n&&e.traverse(function(i){if(i instanceof vi){var a=ppt(i);a&&i.animateFrom({style:a},n)}})}function VMt(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function Q7(e,t,r){var n=n5(e),i=n5(t);function a(_,x,b,S,w){(b||_)&&x.animateFrom({style:b&&b!==_?et(et({},b.style),_.style):_.style},w)}var o=!1,s=NMt,l=pt(),u=pt();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<i.length;c++){var h=i[c].groupId;if(u.get(h)){s=t5;break}var f=i[c].childGroupId;if(f&&l.get(f)){s=e5;break}}function d(_,x){return function(b){var S=b.data,w=b.dataIndex;return x?S.getId(w):_?s===t5?b.childGroupId:b.groupId:s===e5?b.childGroupId:b.groupId}}var p=VMt(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(_,x){var b=n[x],S=i[_],w=S.data.hostModel,C=b.data.getItemGraphicEl(b.dataIndex),k=S.data.getItemGraphicEl(S.dataIndex);if(C===k){k&&$Mt(k,S.dataIndex,w);return}C&&v[C.id]||k&&(mc(k),C?(mc(C),AS(C),o=!0,TS(Cl(C),Cl(k),S.divide,w,_,a)):kS(k,w,_))}new Lo(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(_,x){var b=i[_],S=b.data,w=S.hostModel,C=S.getItemGraphicEl(b.dataIndex),k=de(at(x,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==C&&!v[T.id]});C&&(mc(C),k.length?(R(k,function(T){mc(T),AS(T)}),o=!0,TS(Cl(k),Cl(C),b.divide,w,_,a)):kS(C,w,b.dataIndex))}).updateOneToMany(function(_,x){var b=n[x],S=b.data.getItemGraphicEl(b.dataIndex);if(!(S&&v[S.id])){var w=de(at(_,function(k){return i[k].data.getItemGraphicEl(i[k].dataIndex)}),function(k){return k&&k!==S}),C=i[_[0]].data.hostModel;w.length&&(R(w,function(k){return mc(k)}),S?(mc(S),AS(S),o=!0,TS(Cl(S),Cl(w),b.divide,C,_[0],a)):R(w,function(k){return kS(k,C,_[0])}))}}).updateManyToMany(function(_,x){new Lo(x,_,function(b){return n[b].data.getId(n[b].dataIndex)},function(b){return i[b].data.getId(i[b].dataIndex)}).update(function(b,S){y(_[b],x[S])}).execute()}).execute(),o&&R(t,function(_){var x=_.data,b=x.hostModel,S=b&&r.getViewOfSeriesModel(b),w=Hh("update",b,0);S&&b.isAnimationEnabled()&&w&&w.duration>0&&S.group.traverse(function(C){C instanceof Kt&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function i5(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function a5(e){return nt(e)?e.sort().join(","):e}function ts(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function zMt(e,t){var r=pt(),n=pt(),i=pt();R(e.oldSeries,function(o,s){var l=e.oldDataGroupIds[s],u=e.oldData[s],c=i5(o),h=a5(c);n.set(h,{dataGroupId:l,data:u}),nt(c)&&R(c,function(f){i.set(f,{key:h,dataGroupId:l,data:u})})});function a(o){r.get(o)&&Ne("Duplicated seriesKey in universalTransition "+o)}return R(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=i5(o),c=a5(u),h=n.get(c);if(h)process.env.NODE_ENV!=="production"&&a(c),r.set(c,{oldSeries:[{dataGroupId:h.dataGroupId,divide:ts(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:ts(l),data:l}]});else if(nt(u)){process.env.NODE_ENV!=="production"&&a(c);var f=[];R(u,function(v){var g=n.get(v);g.data&&f.push({dataGroupId:g.dataGroupId,divide:ts(g.data),data:g.data})}),f.length&&r.set(c,{oldSeries:f,newSeries:[{dataGroupId:s,data:l,divide:ts(l)}]})}else{var d=i.get(u);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:ts(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:l,divide:ts(l)})}}}}),r}function o5(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function GMt(e,t,r,n){var i=[],a=[];R(xe(e.from),function(o){var s=o5(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:ts(t.oldData[s]),groupIdDim:o.dimension})}),R(xe(e.to),function(o){var s=o5(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:ts(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&Q7(i,a,n)}function WMt(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){R(xe(n.seriesTransition),function(i){R(xe(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Tm]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=OMt(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)R(xe(a),function(d){GMt(d,i,n,r)});else{var o=zMt(i,n);R(o.keys(),function(d){var p=o.get(d);Q7(p.oldSeries,p.newSeries,r)})}R(n.updatedSeries,function(d){d[Tm]&&(d[Tm]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<J7&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),c.push(f))}})}var HMt=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(t){this.breaks=t.breaks},e.prototype.update=function(t){UMt(this,t);var r=this._elapsedExtent;r[0]=this.elapse(t[0]),r[1]=this.elapse(t[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(t,r){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<t&&t<i.vmax){var a=r(t,i.vmax);return process.env.NODE_ENV!=="production"&&ft(a>=0&&Math.round(a)===a),a}}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(t){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(t)-this._elapsedExtent[0])/r},e.prototype.scale=function(t){return this.unelapse(t*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(t){for(var r=s5,n=l5,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(t<=o.vmax){t>o.vmin?r+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=t-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=t-n),r},e.prototype.unelapse=function(t){for(var r=s5,n=l5,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-n,u=l+s.gapReal;if(t<=u){t>l?a=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):a=n+t-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+t-r),a},e}();function jMt(){return new HMt}var s5=0,l5=0;function UMt(e,t){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=BD(s,t);if(u){var c=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(c&&h))if(c||h){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=f,a[d][l.type].inExtFrac=f/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(t[1]-t[0])+(n.tpAbs.val-n.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)-n.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-n.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));R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function YMt(e,t,r,n,i,a){e!=="no"&&R(r,function(o){var s=BD(o,a);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=n(u),h=i*3/4;c>s.vmin-h&&c<s.vmax+h&&(e!=="preserve_extent_bound"||c!==a[0]&&c!==a[1])&&t.splice(l,1)}})}function qMt(e,t,r,n){R(t,function(i){var a=BD(i,r);a&&(e.push({value:a.vmin,break:{type:"vmin",parsedBreak:a},time:n?n(a):void 0}),e.push({value:a.vmax,break:{type:"vmax",parsedBreak:a},time:n?n(a):void 0}))}),t.length&&e.sort(function(i,a){return i.value-a.value})}function BD(e,t){var r=Math.max(e.vmin,t[0]),n=Math.min(e.vmax,t[1]);return r<n||r===n&&r>t[0]&&r<t[1]?{vmin:r,vmax:n,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function r2(e,t,r){var n=[];if(!e)return{breaks:n};function i(o,s){return o>=0&&o<1-1e-5?!0:(process.env.NODE_ENV!=="production"&&ie(s+" must be >= 0 and < 1, rather than "+o+" ."),!1)}R(e,function(o){if(!o||o.start==null||o.end==null){process.env.NODE_ENV!=="production"&&ie("The input axis breaks start/end should not be empty.");return}if(!o.isExpanded){var s={breakOption:_t(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(lt(o.gap)){var u=ci(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c,"Percent gap")||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var h=t(o.gap);(!isFinite(h)||h<0)&&(process.env.NODE_ENV!=="production"&&ie("Axis breaks gap must positive finite rather than ("+o.gap+")."),h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(process.env.NODE_ENV!=="production"&&ie("Axis break."+d+" must not be negative."),s[d]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(process.env.NODE_ENV!=="production"&&ie("Axis breaks must not overlap."),n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function FD(e,t){return n2(t)===n2(e)}function n2(e){return e.start+"_\0_"+e.end}function XMt(e,t,r){var n=[];R(e,function(a,o){var s=t(a);s&&s.type==="vmin"&&n.push([o])}),R(e,function(a,o){var s=t(a);if(s&&s.type==="vmax"){var l=Cu(n,function(u){return FD(t(e[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[e[a[0]],e[a[1]]])}),i}function ZMt(e,t,r,n){var i,a;if(e.break){var o=e.break.parsedBreak,s=Cu(r,function(h){return FD(h.breakOption,e.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Je(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function KMt(e,t,r){var n={noNegative:!0},i=r2(e,r,n),a=r2(e,r,n),o=Math.log(t);return a.breaks=at(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var JMt={vmin:"start",vmax:"end"};function QMt(e,t){return t&&(e=e||{},e.break={type:JMt[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function tEt(){Bpt({createScaleBreakContext:jMt,pruneTicksByBreak:YMt,addBreaksToTicks:qMt,parseAxisBreakOption:r2,identifyAxisBreak:FD,serializeAxisBreakIdentifier:n2,retrieveAxisBreakPairs:XMt,getTicksLogTransformBreak:ZMt,logarithmicParseBreaksFromOption:KMt,makeAxisLabelFormatterParamBreak:QMt})}var u5=qt();function eEt(e,t){var r=Cu(e,function(n){return tr().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return r||e.push(r={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),r}function rEt(e){R(e,function(t){return t.shouldRemove=!0})}function nEt(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function iEt(e,t,r,n,i){var a=r.axis;if(a.scale.isBlank()||!tr())return;var o=tr().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(k){return k.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),d=s.getModel("itemStyle"),p=d.getItemStyle(),v=p.stroke,g=p.lineWidth,m=p.lineDash,y=p.fill,_=new yt({ignoreModelZ:!0}),x=a.isHorizontal(),b=u5(t).visualList||(u5(t).visualList=[]);rEt(b);for(var S=function(k){var T=o[k][0].break.parsedBreak,A=[];A[0]=a.toGlobalCoord(a.dataToCoord(T.vmin,!0)),A[1]=a.toGlobalCoord(a.dataToCoord(T.vmax,!0)),A[1]<A[0]&&A.reverse();var L=eEt(b,T);L.shouldRemove=!1;var D=new yt;C(L.zigzagRandomList,D,A[0],A[1],x,T),h&&D.on("click",function(){var E={type:Q_,breaks:[{start:T.breakOption.start,end:T.breakOption.end}]};E[a.dim+"AxisIndex"]=r.componentIndex,i.dispatchAction(E)}),D.silent=!h,_.add(D)},w=0;w<o.length;w++)S(w);e.add(_),nEt(b);function C(k,T,A,L,D,E){var N={stroke:v,lineWidth:g,lineDash:m,fill:"none"},P=D?0:1,F=1-P,O=n[Pt[F]]+n[er[F]];function $(vt){var kt=[],Wt=[];kt[P]=Wt[P]=vt,kt[F]=n[Pt[F]],Wt[F]=O;var Ht={x1:kt[0],y1:kt[1],x2:Wt[0],y2:Wt[1]};return N_(Ht,Ht,{lineWidth:1}),kt[0]=Ht.x1,kt[1]=Ht.y1,kt[P]}A=$(A),L=$(L);for(var V=[],I=[],B=!0,G=n[Pt[F]],H=0;;H++){var W=G===n[Pt[F]],J=G>=O;J&&(G=O);var Q=[],tt=[];Q[P]=A,tt[P]=L,!W&&!J&&(Q[P]+=B?-l:l,tt[P]-=B?l:-l),Q[F]=G,tt[F]=G,V.push(Q),I.push(tt);var it=void 0;if(H<k.length?it=k[H]:(it=Math.random(),k.push(it)),G+=it*(c-u)+u,B=!B,J)break}var X=tr().serializeAxisBreakIdentifier(E.breakOption);if(T.add(new Gr({anid:"break_a_"+X,shape:{points:V},style:N,z:f})),E.gapReal!==0){T.add(new Gr({anid:"break_b_"+X,shape:{points:I},style:N,z:f}));var rt=I.slice();rt.reverse();var Z=V.concat(rt);T.add(new Qr({anid:"break_c_"+X,shape:{points:Z},style:{fill:y,opacity:p.opacity},z:f}))}}}function aEt(e,t,r,n){var i=e.axis,a=r.transform;ft(n.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=tr().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(g){return g.break},!1),l=at(s,function(g){var m=g[0].break.parsedBreak,y=[i.dataToCoord(m.vmin,!0),i.dataToCoord(m.vmax,!0)];return y[0]>y[1]&&y.reverse(),{coordPair:y,brkId:tr().serializeAxisBreakIdentifier(m.breakOption)}});l.sort(function(g,m){return g.coordPair[0]-m.coordPair[0]});for(var u=o[0],c=null,h=0;h<l.length;h++){var f=l[h],d=Math.max(f.coordPair[0],o[0]),p=Math.min(f.coordPair[1],o[1]);u<=d&&v(u,d,c,f),u=p,c=f}u<=o[1]&&v(u,o[1],c,null);function v(g,m,y,_){function x(A,L){a&&(qe(A,A,a),qe(L,L,a))}function b(A,L){var D={x1:A[0],y1:A[1],x2:L[0],y2:L[1]};N_(D,D,n.style),A[0]=D.x1,A[1]=D.y1,L[0]=D.x2,L[1]=D.y2}var S=[g,0],w=[m,0],C=[g,5],k=[m,5];x(S,C),b(S,C),x(w,k),b(w,k),b(S,w);var T=new Qe(et({shape:{x1:S[0],y1:S[1],x2:w[0],y2:w[1]}},n));t.add(T),T.anid="breakLine_"+(y?y.brkId:"\0")+"_\0_"+(_?_.brkId:"\0")}}function oEt(e,t,r){if(Cu(r,function(y){return!y}))return;var n=new St;if(!K_(r[0],r[1],n,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=Ir();Os(i,i,-t);var a=at(r,function(y){return y.transform?Sa(Ir(),i,y.transform):i});function o(y){var _=r[0].localRect,x=new St(_[er[y]]*a[0][0],_[er[y]]*a[0][1]);return Math.abs(x.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=at(r,function(y,_){var x=y.localRect.clone();return x.applyTransform(a[_]),x}),u=new St;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(i);var c=n.clone().transform(i),h=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),f=(h+c.x)/2-u.x,d=Math.min(f,f-c.x),p=Math.max(f,f-c.x),v=p<0?p:d>0?d:0;s=(f-v)/c.x}var g=new St,m=new St;St.scale(g,n,-s),St.scale(m,n,1-s),iT(r[0],g),iT(r[1],m)}function sEt(e,t){var r={breaks:[]};return R(t.breaks,function(n){if(n){var i=Cu(e.get("breaks",!0),function(s){return tr().identifyAxisBreak(s,n)});if(!i){process.env.NODE_ENV!=="production"&&Ne("Can not find axis break by start: "+n.start+", end: "+n.end);return}var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===Q_?!0:a===_U?!1:a===xU?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}),r}function lEt(){ixt({adjustBreakLabelPair:oEt,buildAxisBreakLine:aEt,rectCoordBuildBreakAxis:iEt,updateModelAxisBreak:sEt})}function uEt(e){cxt(e),tEt(),lEt()}function cEt(){Ext(hEt)}function hEt(e,t){R(e,function(r){if(!r.model.get(["axisLabel","inside"])){var n=fEt(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,r.position==="top"?t.y+=n.height+a:r.position==="left"&&(t.x+=n.width+a)}}})}function fEt(e){var t=e.model,r=e.scale;if(!t.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof _h?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Kh(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var h=n?n[c]:{value:a[0]+c},f=s(h,c),d=o.getTextRect(f),p=v(d,o.get("rotate")||0);l?l.union(p):l=p}return l;function v(g,m){var y=m*Math.PI/180,_=g.width,x=g.height,b=_*Math.abs(Math.cos(y))+Math.abs(x*Math.sin(y)),S=_*Math.abs(Math.sin(y))+Math.abs(x*Math.cos(y)),w=new Ct(g.x,g.y,b,S);return w}}Gt([r_t]);Gt([K0t]);Gt([S_t,B_t,Y_t,Zxt,sbt,Zbt,w1t,oSt,ASt,RSt,VSt,qSt,zwt,hCt,SCt,FCt,GCt,JCt,aTt,gTt,STt,ITt,v2t]);Gt(R2t);Gt(akt);Gt(UU);Gt(mkt);Gt(I9);Gt(bkt);Gt(zkt);Gt(Zkt);Gt(OAt);Gt(eDt);Gt(av);Gt(mDt);Gt(xDt);Gt(MDt);Gt(FDt);Gt(HDt);Gt(ZDt);Gt(oLt);Gt(TLt);Gt($7);Gt(V7);Gt(jLt);Gt(j7);Gt(U7);Gt(XLt);Gt(tMt);Gt(dMt);Gt(gMt);Gt(WMt);Gt(m0t);Gt(uEt);Gt(cEt);Gt(Kxt);const dEt=({data:e})=>{const t=j.useRef(null),r=j.useRef(null),n=j.useRef(`echarts-${xk()}`),i=j.useCallback(a=>{if(a?.obj?.k)try{const o=JSON.parse(a.obj.k);if(o&&typeof o=="object"&&o.series)return o;throw new Error("Parsed object is not a valid ECharts option")}catch(o){console.warn("Invalid ECharts code:",a.obj.k,o)}if(Array.isArray(a.children))for(const o of a.children){const s=i(o);if(s)return s}return null},[]);return j.useEffect(()=>{const a=e?.children?.[0],o=a?i(a):null;if(!t.current)return;r.current&&r.current.dispose(),r.current=Rmt(t.current),o?r.current.setOption(o):t.current.innerHTML='<pre style="color: orange">No valid ECharts option found in data.</pre>';const s=()=>{r.current?.resize()};return window.addEventListener("resize",s),()=>{r.current?.dispose(),r.current=null,window.removeEventListener("resize",s)}},[e,i]),z.jsx("div",{id:n.current,ref:t,"data-component":"echarts",style:{width:"100%",height:"400px"}})},qg={"smp-notification-widget-container":"_smp-notification-widget-container_18eh5_1","smp-notification-widget-header":"_smp-notification-widget-header_18eh5_8","smp-notification-widget-fallback":"_smp-notification-widget-fallback_18eh5_17"},Ka={"smp-notification-backdrop":"_smp-notification-backdrop_1qsr0_1","smp-notification-container":"_smp-notification-container_1qsr0_17","smp-notification-gravity":"_smp-notification-gravity_1qsr0_22","smp-notification-gravity-INFO":"_smp-notification-gravity-INFO_1qsr0_29","smp-notification-gravity-ERROR":"_smp-notification-gravity-ERROR_1qsr0_33","smp-notification-gravity-UNAUTHORIZED":"_smp-notification-gravity-UNAUTHORIZED_1qsr0_34","smp-notification-gravity-WARNING":"_smp-notification-gravity-WARNING_1qsr0_38","smp-notification-gravity-QUEST":"_smp-notification-gravity-QUEST_1qsr0_39","smp-notification-temporary":"_smp-notification-temporary_1qsr0_44","smp-notification-header":"_smp-notification-header_1qsr0_48","smp-notification-header-message":"_smp-notification-header-message_1qsr0_55","smp-notification-body":"_smp-notification-body_1qsr0_62","smp-notification-buttons":"_smp-notification-buttons_1qsr0_69"};function pEt(e){return e===Ac.TN||e===Ac.TM||e===Ac.TS||e===Ac.TT}function vEt(e){return e===Ac.PM||e===Ac.TM}const Xg={"smp-progress-bar-wrapper":"_smp-progress-bar-wrapper_j9g1d_3","smp-progress-bar-track":"_smp-progress-bar-track_j9g1d_11","smp-progress-bar-fill":"_smp-progress-bar-fill_j9g1d_18","smp-progress-bar-value":"_smp-progress-bar-value_j9g1d_28"},gEt=({data:e,progress:t,visibleValue:r=!0})=>{const n=t||e?.children?.[0]?.obj?.k||0;return z.jsxs("div",{className:`${Xg["smp-progress-bar-wrapper"]}`,"data-component":"progress-bar",children:[z.jsx("div",{className:Xg["smp-progress-bar-track"],children:z.jsx("div",{className:Xg["smp-progress-bar-fill"],style:{width:`${Math.max(0,Math.min(100,Number(n)))}%`}})}),r&&z.jsxs("div",{className:Xg["smp-progress-bar-value"],children:[Math.round(Number(n)),"%"]})]})},mEt=({data:e,onButtonClick:t,onClose:r,isModal:n=!0})=>{const i=pEt(e.mode),a=vEt(e.mode)&&n,o={backdrop:`${a?Ka["smp-notification-backdrop"]:""}`,container:`${Ka["smp-notification-container"]}`,gravity:`${Ka["smp-notification-gravity"]} ${Ka[`smp-notification-gravity-${e.gravity}`]} ${i?Ka["smp-notification-temporary"]:""}`,header:`${Ka["smp-notification-header"]}`,headerMessage:`${Ka["smp-notification-header-message"]}`,body:`${Ka["smp-notification-body"]}`,buttons:`${Ka["smp-notification-buttons"]}`},s=z.jsx("div",{"data-component":"notification",className:o.gravity,children:z.jsxs("div",{className:o.container,children:[z.jsxs("div",{className:o.header,children:[z.jsxs("div",{className:o.headerMessage,children:[e.timestamp&&z.jsx(Sr,{variant:"code",bindValue:new Date(e.timestamp).toLocaleDateString()}),e.message&&z.jsx("strong",{children:z.jsx(Sr,{variant:"title",bindValue:e.message})})]}),z.jsx(me,{icon:"close",title:"close",onClick:r,isInteractable:!0})]}),z.jsxs("div",{className:o.body,children:[e.fullMessage&&z.jsx("div",{children:z.jsx(Sr,{variant:"body",bindValue:e.fullMessage})}),e.buttons&&e.buttons.length>0&&t&&z.jsx("div",{className:o.buttons,children:e.buttons.map((l,u)=>z.jsx(Be,{bindValue:l?.data?.label||l.obj?.k||l.decode||"Action",icon:l.icon||l.placeholderIcon||"",variant:"base",appearance:"outlined",onClick:()=>t(l)},u))}),e.value&&e.state===HY.ON_LOADING&&z.jsx(gEt,{progress:e.value||"0"})]})]})});return a?z.jsx("div",{className:o.backdrop,"data-component":"backdrop",children:s}):s},yEt=({data:e,onClearAllMessage:t,onNotificationClose:r,onNotificationButtonClick:n})=>z.jsxs("div",{className:qg["smp-notification-widget-container"],children:[z.jsxs("div",{className:qg["smp-notification-widget-header"],children:[z.jsx(Sr,{variant:"title",bindValue:"Notification Area"}),z.jsx(Be,{bindValue:"Dismiss All",appearance:"ghost",onClick:t,disabled:e.length===0,variant:"danger"})]}),z.jsx("div",{className:qg["smp-notification-widget-list"],children:e.length>0?e.map((i,a)=>z.jsx(mEt,{data:i,isModal:!1,onClose:()=>r(i.id||""),onButtonClick:n},a)):z.jsx("div",{className:qg["smp-notification-widget-fallback"],children:z.jsx(Sr,{variant:"body",bindValue:"No active notification"})})})]});exports.AppBar=_X;exports.Autocomplete=l2;exports.Breadcrumbs=w5;exports.Button=Be;exports.ButtonList=L5;exports.Checkbox=$0;exports.Chips=Rp;exports.Color=Oi;exports.Color$1=Eh;exports.Combobox=Gm;exports.DashList=xX;exports.DataTableComponent=KX;exports.DatePicker=h2;exports.Drawer=JX;exports.EchartsGraph=dEt;exports.Field=QX;exports.FileUpload=M5;exports.INPUT_PANEL_COMMAND_SUBMIT_EVENT_NAME=FS;exports.Icon=me;exports.InputPanel=eZ;exports.JSON_SCHEMA=KV;exports.MapCache=Ro;exports.MermaidChart=wct;exports.NotificationWidget=yEt;exports.Password=I5;exports.Path=Tct;exports.Rgb=cn;exports.Set=by;exports.Stack=Su;exports.Symbol=Kd;exports.TabBar=_5;exports.Textarea=P5;exports.Textfield=mi;exports.Toolbar=s2;exports.Typography=Sr;exports.Uint8Array=Sw;exports.Utils=Jt;exports.ZERO_WIDTH_SPACE=Dz;exports.__export=V5;exports.__name=M;exports.abs=Btt;exports.acos=jtt;exports.array=j$;exports.arrayLikeKeys=_z;exports.asin=Utt;exports.assignValue=mz;exports.assignWithDepth_default=sr;exports.atan2=Ftt;exports.baseAssignValue=a_;exports.baseFor=nz;exports.baseGetTag=_u;exports.baseKeys=eW;exports.baseRest=Cz;exports.baseUnary=vz;exports.calculateMathMLDimensions=uK;exports.calculateTextHeight=K2;exports.calculateTextWidth=Aa;exports.cleanAndMerge=l_;exports.clear=u$;exports.clear$1=Oot;exports.clear$2=dot;exports.clear2=Iot;exports.cloneArrayBuffer=oz;exports.cloneBuffer=az;exports.cloneTypedArray=sz;exports.color=oh;exports.commonDb_exports=m2;exports.common_default=yu;exports.computeDimensionOfText=c4;exports.configurePaths=PY;exports.configureSvgSize=g2;exports.constant=ml;exports.constant$1=Sz;exports.constant$2=Y0;exports.copyArray=lz;exports.copyObject=yz;exports.cos=$tt;exports.createAssigner=kz;exports.createText=No;exports.curveBasis=kd;exports.darken=Ft;exports.dayjs2=F5;exports.decodeEntities=Ps;exports.defaultConfig2=yK;exports.defaultConfig_default=v2;exports.define=U0;exports.distExports=tz;exports.epsilon=iw;exports.eq=Bp;exports.evaluate=hr;exports.extend=T2;exports.generateId=Rz;exports.getAccDescription=d$;exports.getAccTitle=h$;exports.getConfig=zr;exports.getConfig2=_e;exports.getDefaultExportFromCjs=c5;exports.getDiagramTitle=v$;exports.getEdgeId=$it;exports.getIconSVG=Nh;exports.getLineFunctionsWithOffset=QV;exports.getPrototype=G2;exports.getRegisteredLayoutAlgorithm=sst;exports.getStylesFromArray=Z2;exports.getSubGraphTitleMargins=e_;exports.getThemeVariables3=K5;exports.getUrl=s$;exports.getUserDefinedConfig=JZ;exports.halfPi=aw;exports.hasKatex=ru;exports.hue=pQ;exports.identity=U2;exports.initCloneObject=cz;exports.insertCluster=S4;exports.insertEdge=HG;exports.insertEdgeLabel=zG;exports.insertNode=vk;exports.interpolateNumber=ao;exports.interpolateRgb=ZS;exports.interpolateString=P$;exports.isArguments=tp;exports.isArray=ep;exports.isArrayLike=$p;exports.isArrayLikeObject=fz;exports.isBuffer=o_;exports.isDark=Lh;exports.isEmpty=zw;exports.isFunction=r_;exports.isIndex=H2;exports.isIterateeCall=Tz;exports.isLabelStyle=z2;exports.isLength=W2;exports.isObject=Is;exports.isObjectLike=Rh;exports.isPrototype=Fp;exports.isTypedArray=s_;exports.isValidShape=VG;exports.keysIn=j2;exports.lighten=Dt;exports.line=Y$;exports.lineBreakRegex=Mh;exports.load=JV;exports.log=ot;exports.markers_default=YG;exports.max=Vtt;exports.memoize=Ph;exports.merge=Az;exports.min=ztt;exports.nodeUtil=ww;exports.nogamma=k2;exports.overRest=bz;exports.package_default=$S;exports.parseFontSize=Vp;exports.parseGenericTypes=HS;exports.pi=Z0;exports.positionEdgeLabel=GG;exports.positionNode=Pot;exports.random=Oz;exports.registerIconPacks=t4;exports.render=ost;exports.renderKatexSanitized=H0;exports.replaceIconSubstring=ck;exports.rgbConvert=M$;exports.rgba=$c;exports.sanitizeText=Hn;exports.select=ge;exports.selectSvgElement=v3;exports.setAccDescription=f$;exports.setAccTitle=c$;exports.setConfig2=mK;exports.setDiagramTitle=p$;exports.setNodeElem=Eot;exports.setToString=wz;exports.setupGraphViewbox=l$;exports.setupGraphViewbox2=g$;exports.sin=Gtt;exports.sqrt=Wtt;exports.styles2String=Lt;exports.tau=Htt;exports.unknownIcon=Jz;exports.updateNodeBounds=It;exports.utils_default=si;exports.v4=xk;exports.withPath=H$;exports.wrapLabel=Bz;