@arcgis/charts-components 5.1.0-next.7 → 5.1.0-next.9

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 (135) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/{TSQ75643.js → 24ZMVNPY.js} +1 -1
  3. package/dist/cdn/2E6UOES5.js +2 -0
  4. package/dist/cdn/{E2OGP7R4.js → 37TFH77K.js} +1 -1
  5. package/dist/cdn/{KGYOF4HQ.js → 3J7OE25D.js} +1 -1
  6. package/dist/cdn/{T4P6X62H.js → 3KPOZY7U.js} +1 -1
  7. package/dist/cdn/{RHSZB5ZH.js → 3MBJIZXQ.js} +1 -1
  8. package/dist/cdn/{ZWABUONN.js → 3MJNDW3O.js} +1 -1
  9. package/dist/cdn/{SBJDJQ5W.js → 3V24TSG3.js} +1 -1
  10. package/dist/cdn/472LMJV5.js +2 -0
  11. package/dist/cdn/{25UJ6G2G.js → 4KLIA33J.js} +1 -1
  12. package/dist/cdn/{SJ74QWGI.js → 4RTN2F3A.js} +1 -1
  13. package/dist/cdn/{MBFKIRCK.js → 5IBIN5PX.js} +1 -1
  14. package/dist/cdn/5UNMJRBV.js +2 -0
  15. package/dist/cdn/{X2S3V4HD.js → 6PFSSXHO.js} +1 -1
  16. package/dist/cdn/7EMMEDLK.js +2 -0
  17. package/dist/cdn/{ZY42XS5N.js → APM2UUMS.js} +1 -1
  18. package/dist/cdn/{BRRSD3O4.js → BIAHCUQC.js} +1 -1
  19. package/dist/cdn/{BVFVLX3U.js → CKEEXG7J.js} +7 -7
  20. package/dist/cdn/CMRNFSZC.js +4 -0
  21. package/dist/cdn/{F3M5Q4I6.js → CONUNOKN.js} +1 -1
  22. package/dist/cdn/{UWJ3DRYN.js → CPWMQOWE.js} +1 -1
  23. package/dist/cdn/CYO4M5FA.js +2 -0
  24. package/dist/cdn/{AYMM5RTN.js → DCSM57NL.js} +1 -1
  25. package/dist/cdn/{3KP75DDX.js → DU6SCSWY.js} +1 -1
  26. package/dist/cdn/{6ZZVPJTU.js → DUCASUB5.js} +1 -1
  27. package/dist/cdn/{D2NLBPAB.js → E2DPW452.js} +1 -1
  28. package/dist/cdn/{FG2SKN2Q.js → E7WKMXBN.js} +1 -1
  29. package/dist/cdn/{LKK7N2C5.js → EO756WDD.js} +1 -1
  30. package/dist/cdn/{AHJME35X.js → FFYDXNXA.js} +1 -1
  31. package/dist/cdn/{FHI4UU5O.js → FJSIGPKS.js} +1 -1
  32. package/dist/cdn/FM4O2SFI.js +56 -0
  33. package/dist/cdn/{5PUNMMSL.js → FPZLQV2G.js} +1 -1
  34. package/dist/cdn/{ESIO74ER.js → G6QUYWLP.js} +1 -1
  35. package/dist/cdn/{BYIBXD4Q.js → G76ZI2ZC.js} +1 -1
  36. package/dist/cdn/{XG3LUWT6.js → GD3XF3YV.js} +1 -1
  37. package/dist/cdn/GLSDBV72.js +2 -0
  38. package/dist/cdn/{MXLNSW6C.js → GYWWWJWB.js} +1 -1
  39. package/dist/cdn/{YC2QAZQ5.js → IDCUWB47.js} +1 -1
  40. package/dist/cdn/{NXDHPVLZ.js → IPU3GNA6.js} +1 -1
  41. package/dist/cdn/IRNA25SY.js +2 -0
  42. package/dist/cdn/{MOU5IBB7.js → ITDXKVUB.js} +1 -1
  43. package/dist/cdn/{QWZNK3OV.js → JA7R63SP.js} +1 -1
  44. package/dist/cdn/{FJUBR4KW.js → KFQTTMZU.js} +1 -1
  45. package/dist/cdn/{76YPTUIV.js → KITWKIQT.js} +1 -1
  46. package/dist/cdn/L32OCJD2.js +2 -0
  47. package/dist/cdn/{FSNIJZ4N.js → LGBK4T3V.js} +1 -1
  48. package/dist/cdn/{S2T2KPSE.js → LN2MYFKL.js} +1 -1
  49. package/dist/cdn/{BHF54XO4.js → LQ3P2GFC.js} +1 -1
  50. package/dist/cdn/LRRJCSJK.js +2 -0
  51. package/dist/cdn/{NKSFFZ43.js → M4QXPKAQ.js} +1 -1
  52. package/dist/cdn/MMPVU2IV.js +2 -0
  53. package/dist/cdn/{3IBNI7DB.js → MTYGJ44X.js} +1 -1
  54. package/dist/cdn/{JLFJWDPQ.js → MZD5VJSC.js} +1 -1
  55. package/dist/cdn/{3V3NUR6Q.js → N2ZRK46C.js} +1 -1
  56. package/dist/cdn/{64NE6NLA.js → N6YCO6NE.js} +1 -1
  57. package/dist/cdn/{VL4N7T3G.js → O4MXHOEX.js} +1 -1
  58. package/dist/cdn/{L4E7PSXN.js → OBSMBH62.js} +1 -1
  59. package/dist/cdn/{2JUKPBNE.js → OZ7IZCS5.js} +1 -1
  60. package/dist/cdn/{LKI3UTOI.js → PCHLTJ76.js} +1 -1
  61. package/dist/cdn/{STQIUWAA.js → PCYK43OC.js} +1 -1
  62. package/dist/cdn/{IU5GCIOV.js → R4MVTPEY.js} +1 -1
  63. package/dist/cdn/{W3E73SQV.js → R7UV3FXZ.js} +1 -1
  64. package/dist/cdn/{ZD2OFLRT.js → RDF2VETY.js} +1 -1
  65. package/dist/cdn/RZEX2MXS.js +2 -0
  66. package/dist/cdn/{OZLXNKH5.js → S4NHHCVM.js} +1 -1
  67. package/dist/cdn/{BF3HDW6F.js → SIICUGBH.js} +1 -1
  68. package/dist/cdn/{AND6TXZC.js → SLC3TO6I.js} +1 -1
  69. package/dist/cdn/{U3YXEG4D.js → SPJB74EZ.js} +1 -1
  70. package/dist/cdn/{VK546WZD.js → SQ2LPEU6.js} +1 -1
  71. package/dist/cdn/{ZPBTQ3VC.js → TADL5VDR.js} +1 -1
  72. package/dist/cdn/U57WLEFE.js +2 -0
  73. package/dist/cdn/{LR3V4CJY.js → U7RUXGWS.js} +1 -1
  74. package/dist/cdn/{SD2G2LCW.js → UZXMOHSJ.js} +1 -1
  75. package/dist/cdn/{5RX4R45J.js → VKTCJE62.js} +1 -1
  76. package/dist/cdn/{6LS2WSZ5.js → W4GPDO26.js} +1 -1
  77. package/dist/cdn/{JF4TYCG5.js → W62POWRZ.js} +1 -1
  78. package/dist/cdn/{T2ZLECUS.js → WDVEXO33.js} +1 -1
  79. package/dist/cdn/{IUWWS4XW.js → WL34DGXY.js} +1 -1
  80. package/dist/cdn/{RJN6DNHI.js → WVNSR4SR.js} +1 -1
  81. package/dist/cdn/{LY46M2NC.js → XKYZJAX2.js} +1 -1
  82. package/dist/cdn/{HYEINZ2W.js → YAIXJAXB.js} +1 -1
  83. package/dist/cdn/{RUB23UKZ.js → YPJL3ONL.js} +1 -1
  84. package/dist/cdn/{LIWSW6ON.js → YXTRZZW6.js} +1 -1
  85. package/dist/cdn/YYIKPG5C.js +2 -0
  86. package/dist/cdn/{DFBK7RTI.js → Z3THOKP3.js} +1 -1
  87. package/dist/cdn/{BPBBMXA3.js → ZDOG5ZE7.js} +1 -1
  88. package/dist/cdn/{MY4FFGT5.js → ZTZHFZ2Q.js} +1 -1
  89. package/dist/cdn/{4XV6HEXY.js → ZUGZLTC4.js} +1 -1
  90. package/dist/cdn/{36Z3PUIB.js → ZX2U6NZL.js} +1 -1
  91. package/dist/cdn/index.js +1 -1
  92. package/dist/chunks/bar-chart-series.js +5 -3
  93. package/dist/chunks/index.js +16 -16
  94. package/dist/chunks/index6.js +18 -0
  95. package/dist/components/arcgis-chart/customElement.js +2011 -2044
  96. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +21 -23
  97. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +13 -16
  98. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +16 -18
  99. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +14 -17
  100. package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +24 -26
  101. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +21 -23
  102. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +23 -25
  103. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +8 -10
  104. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +11 -14
  105. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +19 -21
  106. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +11 -14
  107. package/dist/components/arcgis-charts-info-modal/customElement.js +29 -14
  108. package/dist/docs/api.json +1 -1
  109. package/dist/docs/docs.json +1 -1
  110. package/dist/docs/web-types.json +1 -1
  111. package/dist/json-schema/index.d.ts +2 -2
  112. package/dist/loader.js +3 -3
  113. package/dist/model/bar-chart-model/bar-chart-model.d.ts +2 -2
  114. package/dist/spec/rest-js-types.d.ts +15 -0
  115. package/dist/spec/web-chart.d.ts +4 -4
  116. package/dist/utils/chart-config/utils/index.d.ts +3 -0
  117. package/dist/utils/layer/query-parser/index.d.ts +4 -1
  118. package/dist/utils/localization/interfaces.d.ts +1 -0
  119. package/dist/utils/misc/index.d.ts +13 -7
  120. package/dist/utils/type-guards/index.d.ts +15 -8
  121. package/package.json +3 -3
  122. package/dist/cdn/6PIJSBNU.js +0 -2
  123. package/dist/cdn/7OXO43LP.js +0 -58
  124. package/dist/cdn/FRATWU4Z.js +0 -2
  125. package/dist/cdn/IBQT5TXA.js +0 -2
  126. package/dist/cdn/J3OY6YTK.js +0 -2
  127. package/dist/cdn/JQVTSKVB.js +0 -2
  128. package/dist/cdn/JWTZ3Q2T.js +0 -2
  129. package/dist/cdn/NLXKYZUI.js +0 -2
  130. package/dist/cdn/OX7HOZ72.js +0 -2
  131. package/dist/cdn/PJPMROB7.js +0 -2
  132. package/dist/cdn/RWYS4UGQ.js +0 -2
  133. package/dist/cdn/RX4COZVH.js +0 -2
  134. package/dist/cdn/Z6343LZG.js +0 -2
  135. package/dist/cdn/ZYEUKPGT.js +0 -2
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{c as xn}from"./QPIMTXPL.js";var A=class a{constructor(e){Object.defineProperty(this,"_value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._value=e}get value(){return this._value/100}get percent(){return this._value}toString(){return""+this._value+"%"}interpolate(e,t){return e+this.value*(t-e)}static normalize(e,t,i){return e instanceof a?e:t===i?new a(0):new a(Math.min(Math.max((e-t)*(1/(i-t)),0),1)*100)}};function be(a){return new A(a)}var wn=be(0),M=be(100),I=be(50);function tr(a){return a instanceof A}var ir=function(a,e){return ir=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},ir(a,e)};function ya(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ir(a,e);function t(){this.constructor=a}a.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ps=function(){return ps=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},ps.apply(this,arguments)};function _e(a,e,t,i){function r(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function o(h){try{u(i.next(h))}catch(c){n(c)}}function l(h){try{u(i.throw(h))}catch(c){n(c)}}function u(h){h.done?s(h.value):r(h.value).then(o,l)}u((i=i.apply(a,e||[])).next())})}function va(a,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,r,s,n=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return n.next=o(0),n.throw=o(1),n.return=o(2),typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function o(u){return function(h){return l([u,h])}}function l(u){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,u[0]&&(t=0)),t;)try{if(i=1,r&&(s=u[0]&2?r.return:u[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;switch(r=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,r=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(a,t)}catch(h){u=[6,h],r=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function xa(a){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&a[e],i=0;if(t)return t.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&i>=a.length&&(a=void 0),{value:a&&a[i++],done:!a}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pn(a,e){var t=typeof Symbol=="function"&&a[Symbol.iterator];if(!t)return a;var i=t.call(a),r,s=[],n;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s}function wa(){for(var a=[],e=0;e<arguments.length;e++)a=a.concat(Pn(arguments[e]));return a}function _i(a){return Number(a)!==a}function Tn(a){return{}.toString.call(a)}function le(a){if(a!=null&&!w(a)){let e=Number(a);if(_i(e)&&Re(a)&&a!=""&&a.match(/[0-9]+/)){let t=a.replace(/[^0-9.\-]+/g,"");return a===t?e:le(t)}return e}return a}function gs(a){if(yi(a))return new Date(a);if(w(a))return new Date(a);{let e=Number(a);return w(e)?new Date(e):new Date(a)}}function bs(a){if(_i(a))return"NaN";if(a===1/0)return"Infinity";if(a===-1/0)return"-Infinity";if(a===0&&1/a===-1/0)return"-0";let e=a<0;a=Math.abs(a);let t=/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+a),i=t[1],r=t[2]||"",s;if(t[3]===void 0)s=r===""?i:i+"."+r;else{let n=+t[3];if(a<1){let o=n-1;s="0."+ms("0",o)+i+r}else{let o=n-r.length;o===0?s=i+r:o<0?s=i+r.slice(0,o)+"."+r.slice(o):s=i+r+ms("0",o)}}return e?"-"+s:s}function ms(a,e){return new Array(e+1).join(a)}function yi(a){return Tn(a)==="[object Date]"}function Re(a){return typeof a=="string"}function w(a){return typeof a=="number"&&Number(a)==a}function Ke(a){return typeof a=="object"&&a!==null}function Ta(a){return Array.isArray(a)}var Se="__\xA7\xA7\xA7__",st="__\xA7\xA7\xA7\xA7__";function Ue(a,e){let t=a.length;for(let i=0;i<t;++i)if(a[i]===e)return i;return-1}function _s(a,e){let t=a.length;for(let i=0;i<t;++i)if(e(a[i]))return!0;return!1}function Kt(a,e){let t=a.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=e(a[r],r);return i}function x(a,e){let t=a.length;for(let i=0;i<t;++i)e(a[i],i)}function nt(a,e){let t=a.length;for(;t>0;)--t,e(a[t],t)}function Zt(a,e){let t=a.length;for(let i=0;i<t&&e(a[i],i);++i);}function ye(a,e){let t=!1,i=0;for(;;){if(i=a.indexOf(e,i),i===-1)return t;t=!0,a.splice(i,1)}}function re(a,e){let t=a.indexOf(e);return t!==-1?(a.splice(t,1),!0):!1}function ys(a,e,t){let i=Ue(a,e);i!==-1&&vi(a,i),t==null?a.push(e):qt(a,t,e)}function at(a,e){a.indexOf(e)===-1&&a.push(e)}function vs(a){let e=a.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=a[i];return t}function qt(a,e,t){a.splice(e,0,t)}function vi(a,e){a.splice(e,1)}function rr(a,e){let t=a.length;for(let i=0;i<t;++i)if(e(a[i],i))return i;return-1}function Dn(a,e){let t=a.length;for(;t>0;)if(--t,e(a[t],t))return t;return-1}function xi(a,e){let t=rr(a,e);if(t!==-1)return a[t]}function xs(a,e){let t=Dn(a,e);if(t!==-1)return a[t]}function ws(a,e){let t=0,i=a.length,r=!1;for(;t<i;){let s=t+i>>1,n=e(a[s]);n<0?t=s+1:n===0?(r=!0,t=s+1):i=s}return{found:r,index:r?t-1:t}}function Ps(a,e){let t=0,i=a.length,r=!1;for(;t<i;){let s=t+i>>1,n=e(a[s]);n<0?t=s+1:(n===0&&(r=!0),i=s)}return{found:r,index:t}}function bt(a,e){let t=a.length;for(;t>0;)--t,e(a[t])||a.splice(t,1)}var ot=class{constructor(){Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposed=!1}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},U=class{constructor(e){Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dispose",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposed=!1,this._dispose=e}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},wi=class extends ot{constructor(){super(...arguments),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}_dispose(){x(this._disposers,e=>{e.dispose()})}},se=class extends ot{constructor(e){super(),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposers=e}_dispose(){x(this._disposers,e=>{e.dispose()})}get disposers(){return this._disposers}};var Ct=class extends U{constructor(){super(...arguments),Object.defineProperty(this,"_counter",{enumerable:!0,configurable:!0,writable:!0,value:0})}increment(){return++this._counter,new U(()=>{--this._counter,this._counter===0&&this.dispose()})}};var De=class{constructor(){Object.defineProperty(this,"_listeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_killed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_iterating",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}isDisposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;let e=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{x(e,t=>{t.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}}hasListeners(){return this._listeners.length!==0}hasListenersByType(e){return _s(this._listeners,t=>(t.type===null||t.type===e)&&!t.killed)}enable(){this._enabled=!0}disable(){this._enabled=!1}enableType(e){delete this._disabled[e]}disableType(e,t=1/0){this._disabled[e]=t}_removeListener(e){if(this._iterating===0){let t=this._listeners.indexOf(e);if(t===-1)throw new Error("Invalid state: could not remove listener");this._listeners.splice(t,1)}else this._killed.push(e)}_removeExistingListener(e,t,i,r){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(s=>{s.once===e&&s.type===t&&(i===void 0||s.callback===i)&&s.context===r&&s.disposer.dispose()})}isEnabled(e){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(e)&&this._disabled[e]===void 0}removeType(e){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(t=>{t.type===e&&t.disposer.dispose()})}has(e,t,i){return rr(this._listeners,s=>s.once!==!0&&s.type===e&&(t===void 0||s.callback===t)&&s.context===i)!==-1}_shouldDispatch(e){if(this._disposed)throw new Error("EventDispatcher is disposed");let t=this._disabled[e];return w(t)?(t<=1?delete this._disabled[e]:--this._disabled[e],!1):this._enabled}_eachListener(e){++this._iterating;try{x(this._listeners,e)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(x(this._killed,t=>{this._removeListener(t)}),this._killed.length=0)}}dispatch(e,t){this._shouldDispatch(e)&&this._eachListener(i=>{!i.killed&&(i.type===null||i.type===e)&&(i._debounceDelay?(i._debounceTimeout&&window.clearTimeout(i._debounceTimeout),i._debounceTimeout=window.setTimeout(()=>{i._debounceTimeout=void 0,i.killed||i.dispatch(e,t)},i._debounceDelay)):i.dispatch(e,t))})}_on(e,t,i,r,s,n,o){if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(e,t,i,r);let l={type:t,callback:i,context:r,shouldClone:s,dispatch:n,killed:!1,once:e,disposer:new U(()=>{l.killed=!0,l._debounceTimeout&&window.clearTimeout(l._debounceTimeout),this._removeListener(l)}),_debounceDelay:o};return this._listeners.push(l),l}onAll(e,t,i=!0){return this._on(!1,null,e,t,i,(r,s)=>e.call(t,s)).disposer}on(e,t,i,r=!0){return this._on(!1,e,t,i,r,(s,n)=>t.call(i,n)).disposer}onDebounced(e,t,i,r,s=!0){return this._on(!1,e,t,r,s,(n,o)=>t.call(r,o),i).disposer}once(e,t,i,r=!0){let s=this._on(!0,e,t,i,r,(n,o)=>{s.disposer.dispose(),t.call(i,o)});return s.disposer}off(e,t,i){this._removeExistingListener(!1,e,t,i)}copyFrom(e){if(this._disposed)throw new Error("EventDispatcher is disposed");if(e===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");let t=[];return x(e._listeners,i=>{!i.killed&&i.shouldClone&&(i.type===null?t.push(this.onAll(i.callback,i.context)):i.once?t.push(this.once(i.type,i.callback,i.context)):t.push(this.on(i.type,i.callback,i.context)))}),new se(t)}};function G(a){return Object.keys(a)}function sr(a,e){return G(a).sort(e)}function Ts(a){return Object.assign({},a)}function N(a,e){G(a).forEach(t=>{e(t,a[t])})}function Ds(a,e){for(let t in a)if(On(a,t)&&!e(t,a[t]))break}function Sa(a,e,t){x(sr(a,t),i=>{e(i,a[i])})}function On(a,e){return{}.hasOwnProperty.call(a,e)}function nr(a){return _e(this,void 0,void 0,function*(){if(a!==void 0){let e=[];N(a,(t,i)=>{e.push(i.waitForStop())}),yield Promise.all(e)}})}function qe(a,e,t){return e+a*(t-e)}function kn(a,e,t){return a>=1?t:e}function ar(a,e,t){return new A(qe(a,e.percent,t.percent))}function Sn(a,e,t){return O.interpolate(a,e,t)}function Os(a,e){return typeof a=="number"&&typeof e=="number"?qe:a instanceof A&&e instanceof A?ar:a instanceof O&&e instanceof O?Sn:kn}var Ze;(function(a){a[a.Stopped=0]="Stopped",a[a.Playing=1]="Playing",a[a.Paused=2]="Paused"})(Ze||(Ze={}));function js(a){a.parentNode&&a.parentNode.removeChild(a)}function V(a,e,t,i){return a.addEventListener(e,t,i||!1),new U(()=>{a.removeEventListener(e,t,i||!1)})}function Ti(a){return V(window,"resize",e=>{a()})}function Je(a){switch(a){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function Di(a){return a.pointerId||0}function Es(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let a=document.createElement("button");a.style.position="fixed",a.style.top="0px",a.style.left="-10000px",document.body.appendChild(a),a.focus(),a.blur(),document.body.removeChild(a)}}function Ms(a){a&&a.focus()}function Oi(a){if(Je("pointerevents"))return a;if(Je("touchevents"))switch(a){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(Je("mouseevents"))switch(a){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return a}function lr(a){if(typeof Touch<"u"&&a instanceof Touch)return!0;if(typeof PointerEvent<"u"&&a instanceof PointerEvent&&a.pointerType!=null)switch(a.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(a instanceof MouseEvent)}else if(a.type!=null&&a.type.match(/^mouse/))return!1;return!0}function Jt(a,e,t){a.style[e]=t}function $s(a,e){return a.style[e]}function ur(a){if(a.composedPath){let e=a.composedPath();return e.length===0?null:e[0]}else return a.target}function Cn(a,e){let t=e;for(;;){if(a===t)return!0;if(t.parentNode===null){if(t.host==null)return!1;t=t.host}else t=t.parentNode}}function ki(a,e){return a.target&&Cn(e.root.dom,a.target)}function ut(a,e){e?a.style.pointerEvents="auto":a.style.pointerEvents="none"}function Qt(a){if(a.key!==void 0)return a.key;switch(a.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+a.keyCode}function Aa(a){let e=a;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var or;function jn(a,e=""){if(a===null){if(or==null){let t=document.createElement("style");t.type="text/css",e!=""&&t.setAttribute("nonce",e),document.head.appendChild(t),or=t.sheet}return or}else{let t=document.createElement("style");return t.type="text/css",e!=""&&t.setAttribute("nonce",e),a.appendChild(t),t.sheet}}function ks(a,e){let t=a.cssRules.length;return a.insertRule(e+"{}",t),a.cssRules[t]}var Ss=class extends ot{constructor(e,t,i,r=""){super(),Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rule",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._root=jn(e,r);try{this._rule=ks(this._root,t)}catch{this._rule=ks(this._root,":not(*)")}N(i,(s,n)=>{this.setStyle(s,n)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=Ue(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,t){let i=this._rule.style;i.setProperty("-webkit-"+e,t,""),i.setProperty("-moz-"+e,t,""),i.setProperty("-ms-"+e,t,""),i.setProperty("-o-"+e,t,""),i.setProperty(e,t,"")}setStyle(e,t){e==="transition"?this._setVendorPrefixName(e,t):this._rule.style.setProperty(e,t,"")}};function En(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function As(){return En()?1:void 0}function ce(a,e){return w(a)?a:a!=null&&w(a.value)&&w(e)?e*a.value:0}function Bs(a){let e=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function K(a,e=0,t="0"){return typeof a!="string"&&(a=a.toString()),e>a.length?Array(e-a.length+1).join(t)+a:a}function Mn(a){return a.replace(/^[\s]*/,"")}function $n(a){return a.replace(/[\s]*$/,"")}function lt(a){return Mn($n(a))}function Rs(a,e,t=!1,i="..."){if(a.length>e){let r=e-1;for(;r>=0&&a.charAt(r).match(/\w/);)r--;return r>=0&&t==!1?a.substring(0,r+1)+"...":a.substring(0,e)+i}else return a}function Ls(a){if(typeof a>"u")return"string";a=a.toLowerCase().replace(/^\[[^\]]*\]/,""),a=a.replace(/\[[^\]]+\]/,""),a=a.trim();let e=a.match(/\/(date|number|duration)$/);return e?e[1]:a==="number"?"number":a==="date"?"date":a==="duration"?"duration":a.match(/[#0]/)?"number":a.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function jt(a){return a.replace(/\/(date|number|duration)$/i,"")}function hr(a){return a&&a.replace(/<[^>]*>/g,"")}function cr(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Is(a){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,t=/([^اأدذرزو]*[اأدذرزو])/gi,i=a.split(/(\s+)/),r=[];return i.forEach(s=>{if(s.match(/^\s+$/))(s=" ")&&(s=" "),r.push(s);else if(e.test(s)){let n=s.split(t).filter(o=>o!=="");r=r.concat(n)}else r=r.concat([...s])}),r}function dr(a,e=!1){let t=new Date(a.getFullYear(),0,0),i=a.getTime()-t.getTime()+(t.getTimezoneOffset()-a.getTimezoneOffset())*60*1e3,r=1e3*60*60*24;return Math.floor(i/r)}function _t(a,e=!1){let t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);let r=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7)}function Ns(a,e=!1){let t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),i=t.getUTCDay()||7;return t.setUTCDate(t.getUTCDate()+4-i),new Date(Date.UTC(t.getUTCFullYear(),0,1)).getFullYear()}function Hs(a,e=!1){let t=_t(new Date(a.getFullYear(),a.getMonth(),1),e),i=_t(a,e);return i==1&&(i=53),i-t+1}function Fs(a,e,t=1,i=!1){let r=new Date(e,0,4,0,0,0,0);return i&&r.setUTCFullYear(e),a*7+t-((r.getDay()||7)+3)}function ei(a,e){return a>12?a-=12:a===0&&(a=12),e!=null?a+(e-1):a}function ti(a,e=!1,t=!1,i=!1,r){if(i)return e?"Coordinated Universal Time":"UTC";if(r){let o=a.toLocaleString("en-US",{timeZone:r}),l=a.toLocaleString("en-US",{timeZone:r,timeZoneName:e?"long":"short"});return lt(l.substr(o.length))}let s=a.toLocaleString("UTC"),n=a.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(s.length);return t===!1&&(n=n.replace(/ (standard|daylight|summer|winter) /i," ")),lt(n)}function zs(a,e){let t=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),i=new Date(t.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(t.toLocaleString("en-US",{timeZone:a})).getTime()-i.getTime())/6e4*-1}function Ba(a){return a.charAt(0).toUpperCase()+a.slice(1)}function fr(a){let e,t,i,r=a.h,s=a.s,n=a.l;if(s==0)e=t=i=n;else{let o=function(c,f,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?c+(f-c)*6*d:d<.5?f:d<.6666666666666666?c+(f-c)*(.6666666666666666-d)*6:c},l=n<.5?n*(1+s):n+s-n*s,u=2*n-l;e=o(u,l,r+1/3),t=o(u,l,r),i=o(u,l,r-1/3)}return{r:Math.round(e*255),g:Math.round(t*255),b:Math.round(i*255)}}function pr(a){let e=a.r/255,t=a.g/255,i=a.b/255,r=Math.max(e,t,i),s=Math.min(e,t,i),n=0,o=0,l=(r+s)/2;if(r===s)n=o=0;else{let u=r-s;switch(o=l>.5?u/(2-r-s):u/(r+s),r){case e:n=(t-i)/u+(t<i?6:0);break;case t:n=(i-e)/u+2;break;case i:n=(e-t)/u+4;break}n/=6}return{h:n,s:o,l}}function Ws(a,e){return a&&{r:Math.max(0,Math.min(255,a.r+Pi(a.r,e))),g:Math.max(0,Math.min(255,a.g+Pi(a.g,e))),b:Math.max(0,Math.min(255,a.b+Pi(a.b,e))),a:a.a}}function Pi(a,e){let t=e>0?255-a:a;return Math.round(t*e)}function Us(a,e){if(a){let t=Math.min(Math.max(a.r,a.g,a.b),230),i=Pi(t,e);return{r:Math.max(0,Math.min(255,Math.round(a.r+i))),g:Math.max(0,Math.min(255,Math.round(a.g+i))),b:Math.max(0,Math.min(255,Math.round(a.b+i))),a:a.a}}else return a}function Cs(a){return(a.r*299+a.g*587+a.b*114)/1e3>=128}function Vs(a,e){if(a===void 0||e==1)return a;let t=pr(a);return t.s=e,fr(t)}function Ys(a,e={r:255,g:255,b:255},t={r:255,g:255,b:255}){let i=e,r=t;return Cs(t)&&(i=t,r=e),Cs(a)?r:i}function Q(a,e){return a||(a=[]),[...a,...e].filter((t,i,r)=>r.indexOf(t)===i)}function Ra(a,e){return!(!e||a.left!=e.left||a.right!=e.right||a.top!=e.top||a.bottom!=e.bottom)}function Gs(a){return a[0]==="#"&&(a=a.substr(1)),a.length==3&&(a=a[0].repeat(2)+a[1].repeat(2)+a[2].repeat(2)),parseInt(a,16)}function An(a){a=a.replace(/[ ]/g,"");let e=a.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=a.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let t="";for(let i=1;i<=3;i++){let r=parseInt(e[i]).toString(16);r.length==1&&(r="0"+r),t+=r}return Gs(t)}function Le(a){return O.fromAny(a)}var O=class a{constructor(e){Object.defineProperty(this,"_hex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+K(this.r.toString(16),2)+K(this.g.toString(16),2)+K(this.b.toString(16),2)}toHSL(e=1){return pr({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,t,i){let r=fr({h:e,s:t,l:i});return this.fromRGB(r.r,r.g,r.b)}toString(){return this.toCSSHex()}static fromHex(e){return new a(e)}static fromRGB(e,t,i){return new a((i|0)+(t<<8)+(e<<16))}static fromString(e){return new a(Gs(e))}static fromCSS(e){return new a(An(e))}static fromAny(e){if(Re(e)){if(e[0]=="#")return a.fromString(e);if(e.substr(0,3)=="rgb")return a.fromCSS(e)}else{if(w(e))return a.fromHex(e);if(e instanceof a)return a.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,t,i){let r=Ys({r:e.r,g:e.g,b:e.b},t?{r:t.r,g:t.g,b:t.b}:void 0,i?{r:i.r,g:i.g,b:i.b}:void 0);return this.fromRGB(r.r,r.g,r.b)}static interpolate(e,t,i,r="rgb"){if(r=="hsl"){let s=t.toHSL(),n=i.toHSL();return a.fromHSL(qe(e,s.h,n.h),qe(e,s.s,n.s),qe(e,s.l,n.l))}else return a.fromRGB(qe(e,t.r,i.r),qe(e,t.g,i.g),qe(e,t.b,i.b))}static lighten(e,t){let i=Ws({r:e.r,g:e.g,b:e.b},t);return a.fromRGB(i.r,i.g,i.b)}static brighten(e,t){let i=Us({r:e.r,g:e.g,b:e.b},t);return a.fromRGB(i.r,i.g,i.b)}static saturate(e,t){let i=Vs({r:e.r,g:e.g,b:e.b},t);return a.fromRGB(i.r,i.g,i.b)}};var mr=class{constructor(){Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.15.5"}),Object.defineProperty(this,"licenses",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"entitiesById",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"rootElements",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"autoDispose",{enumerable:!0,configurable:!0,writable:!0,value:!1})}},Oe=new mr;function Bn(a){Oe.licenses.push(a)}function gr(a){N(a,(e,t)=>{Ke(t)&&typeof t.dispose=="function"&&(t.enableDispose=!0,t.dispose())})}var br=class{constructor(e,t,i){Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._name=e,this._template=t,this._settings=i}_dispose(){gr(this._settings)}get(e,t){let i=this._settings[e];return i!==void 0?i:t}set(e,t){this._settings[e]=t,this._template._stateChanged(this._name)}remove(e){delete this._settings[e],this._template._stateChanged(this._name)}setAll(e){G(e).forEach(t=>{this._settings[t]=e[t]}),this._template._stateChanged(this._name)}_apply(e,t){N(this._settings,(i,r)=>{!t[i]&&!e._userSettings[i]&&(t[i]=!0,e.setRaw(i,r))})}},_r=class{constructor(e){Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_states",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._template=e}_dispose(){N(this._states,(e,t)=>{t._dispose()})}lookup(e){return this._states[e]}create(e,t){let i=this._states[e];if(i)return i.setAll(t),i;{let r=new br(e,this._template,t);return this._states[e]=r,this._template._stateChanged(e),r}}remove(e){delete this._states[e],this._template._stateChanged(e)}_apply(e,t){N(this._states,(i,r)=>{let s=t.states[i];s==null&&(s=t.states[i]={});let n=e.states.create(i,{});r._apply(n,s)})}},yr=class{constructor(){Object.defineProperty(this,"_callbacks",{enumerable:!0,configurable:!0,writable:!0,value:{}})}add(e,t){let i=this._callbacks[e];return i===void 0&&(i=this._callbacks[e]=[]),i.push(t),new U(()=>{re(i,t),i.length===0&&delete this._callbacks[e]})}remove(e){this._callbacks[e]!==void 0&&delete this._callbacks[e]}_apply(e){let t=[];return N(this._callbacks,(i,r)=>{x(r,s=>{t.push(e.adapters.add(i,s))})}),new se(t)}},de=class a{constructor(e,t){if(Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_privateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_settingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_privateSettingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_entities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"states",{enumerable:!0,configurable:!0,writable:!0,value:new _r(this)}),Object.defineProperty(this,"adapters",{enumerable:!0,configurable:!0,writable:!0,value:new yr}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new De}),Object.defineProperty(this,"setup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=e}static new(e){return new a(e,!0)}_dispose(){gr(this._settings),gr(this._privateSettings)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}_checkDisposed(){if(this._disposed)throw new Error("Template is disposed")}get entities(){return this._entities}get(e,t){this._checkDisposed();let i=this._settings[e];return i!==void 0?i:t}setRaw(e,t){this._checkDisposed(),this._settings[e]=t}set(e,t){this._checkDisposed(),this._settings[e]!==t&&(this.setRaw(e,t),this._entities.forEach(i=>{i._setTemplateProperty(this,e,t)}))}remove(e){this._checkDisposed(),e in this._settings&&(delete this._settings[e],this._entities.forEach(t=>{t._removeTemplateProperty(e)}))}removeAll(){this._checkDisposed(),N(this._settings,(e,t)=>{this.remove(e)})}getPrivate(e,t){this._checkDisposed();let i=this._privateSettings[e];return i!==void 0?i:t}setPrivateRaw(e,t){return this._checkDisposed(),this._privateSettings[e]=t,t}setPrivate(e,t){return this._checkDisposed(),this._privateSettings[e]!==t&&(this.setPrivateRaw(e,t),this._entities.forEach(i=>{i._setTemplatePrivateProperty(this,e,t)})),t}removePrivate(e){this._checkDisposed(),e in this._privateSettings&&(delete this._privateSettings[e],this._entities.forEach(t=>{t._removeTemplatePrivateProperty(e)}))}setAll(e){this._checkDisposed(),N(e,(t,i)=>{this.set(t,i)})}on(e,t){this._checkDisposed();let i=this._settingEvents[e];return i===void 0&&(i=this._settingEvents[e]=[]),i.push(t),new U(()=>{re(i,t),i.length===0&&delete this._settingEvents[e]})}onPrivate(e,t){this._checkDisposed();let i=this._privateSettingEvents[e];return i===void 0&&(i=this._privateSettingEvents[e]=[]),i.push(t),new U(()=>{re(i,t),i.length===0&&delete this._privateSettingEvents[e]})}_apply(e,t){this._checkDisposed();let i=[];return N(this._settingEvents,(r,s)=>{x(s,n=>{i.push(e.on(r,n))})}),N(this._privateSettingEvents,(r,s)=>{x(s,n=>{i.push(e.onPrivate(r,n))})}),this.states._apply(e,t),i.push(this.adapters._apply(e)),i.push(e.events.copyFrom(this.events)),new se(i)}_setObjectTemplate(e){this._checkDisposed(),this._entities.push(e)}_removeObjectTemplate(e){ye(this._entities,e)}_stateChanged(e){this._checkDisposed(),this._entities.forEach(t=>{t._applyStateByKey(e)})}};var xr=Math.PI,Ua=xr/2,yt=xr/180,Mt=180/xr;function Va(a,e,t){if(!w(e)||e<=0){let i=Math.round(a);return t&&i-a==.5&&i--,i}else{let i=Math.pow(10,e);return Math.round(a*i)/i}}function Ya(a,e){if(!w(e)||e<=0)return Math.ceil(a);{let t=Math.pow(10,e);return Math.ceil(a*t)/t}}function ee(a,e,t){return Math.min(Math.max(a,e),t)}function ve(a){return Math.sin(yt*a)}function xe(a){return Math.cos(yt*a)}function Et(a){return a=a%360,a<0&&(a+=360),a}function Xs(a,e,t,i,r){let s=Number.MAX_VALUE,n=Number.MAX_VALUE,o=-Number.MAX_VALUE,l=-Number.MAX_VALUE,u=[];u.push(vr(r,t)),u.push(vr(r,i));let h=Math.min(Math.floor(t/90)*90,Math.floor(i/90)*90),c=Math.max(Math.ceil(t/90)*90,Math.ceil(i/90)*90);for(let f=h;f<=c;f+=90)f>=t&&f<=i&&u.push(vr(r,f));for(let f=0;f<u.length;f++){let d=u[f];d.x<s&&(s=d.x),d.y<n&&(n=d.y),d.x>o&&(o=d.x),d.y>l&&(l=d.y)}return{left:a+s,top:e+n,right:a+o,bottom:e+l}}function vr(a,e){return{x:a*xe(e),y:a*ve(e)}}function Ga(a){let e=a.length;if(e>0){let t=a[0],i=t.left,r=t.top,s=t.right,n=t.bottom;if(e>1)for(let o=1;o<e;o++)t=a[o],i=Math.min(t.left,i),s=Math.max(t.right,s),r=Math.min(t.top,r),n=Math.max(t.bottom,n);return{left:i,right:s,top:r,bottom:n}}return{left:0,right:0,top:0,bottom:0}}function Xa(a,e,t){if(e>t){let n=e;e=t,t=n}a=Et(a);let i=(e-Et(e))/360;a<e&&(a+=360*(i+1));let r=e+(t-e)/2+180,s=e+(t-e)/2-180;return a>t&&(a-360>e?a-=360:a<r?a=t:a=e),a<e&&(a>s?a=e:a=t),a}function Ks(a,e){return a.x>=e.left&&a.y>=e.top&&a.x<=e.right&&a.y<=e.bottom}function wr(a){return a}function Ne(a){return a*a*a}function Qe(a){return function(e){return 1-a(1-e)}}var Zs=4/11,Ka=6/11,Za=8/11,qa=3/4,Ja=9/11,Qa=10/11,eo=15/16,to=21/22,io=63/64,ro=1/Zs/Zs;var Rn=2*Math.PI,Ln=1,In=.3/Rn,so=Math.asin(1/Ln)*In;var Pr=class{constructor(e,t){Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._entity=e,this._settings=t,N(t,i=>{this._userSettings[i]=!0})}get(e,t){let i=this._settings[e];return i!==void 0?i:t}setRaw(e,t){this._settings[e]=t}set(e,t){this._userSettings[e]=!0,this.setRaw(e,t)}remove(e){delete this._userSettings[e],delete this._settings[e]}setAll(e){G(e).forEach(t=>{this.set(t,e[t])})}_eachSetting(e){N(this._settings,e)}apply(){let e={};e.stateAnimationEasing=!0,e.stateAnimationDuration=!0;let t=this._entity.states.lookup("default");this._eachSetting((i,r)=>{e[i]||(e[i]=!0,this!==t&&(i in t._settings||(t._settings[i]=this._entity.get(i))),this._entity.set(i,r))})}applyAnimate(e){e==null&&(e=this._settings.stateAnimationDuration),e==null&&(e=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let t=this._settings.stateAnimationEasing;t==null&&(t=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",Ne)));let i=this._entity.states.lookup("default"),r={};r.stateAnimationEasing=!0,r.stateAnimationDuration=!0;let s={};return this._eachSetting((n,o)=>{if(!r[n]){r[n]=!0,this!=i&&(n in i._settings||(i._settings[n]=this._entity.get(n)));let l=this._entity.animate({key:n,to:o,duration:e,easing:t});l&&(s[n]=l)}}),s}},Ci=class{constructor(e){Object.defineProperty(this,"_states",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._entity=e}lookup(e){return this._states[e]}create(e,t){let i=this._states[e];if(i)return i.setAll(t),i;{let r=new Pr(this._entity,t);return this._states[e]=r,r}}remove(e){delete this._states[e]}apply(e){let t=this._states[e];t&&t.apply(),this._entity._applyState(e)}applyAnimate(e,t){let i,r=this._states[e];return r&&(i=r.applyAnimate(t)),this._entity._applyStateAnimated(e,t),i}};function Ve(a,e){return a===e?0:a<e?-1:1}function ji(a,e,t){let i=a.length,r=e.length,s=Math.min(i,r);for(let n=0;n<s;++n){let o=t(a[n],e[n]);if(o!==0)return o}return Ve(i,r)}function ao(a,e){return a===e?0:a<e?-1:1}var Dr=class{constructor(e){Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_callbacks",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_disabled",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._entity=e}add(e,t){let i=this._callbacks[e];return i===void 0&&(i=this._callbacks[e]=[]),i.push(t),this._entity._markDirtyKey(e),new U(()=>{re(i,t)&&this._entity._markDirtyKey(e)})}remove(e){let t=this._callbacks[e];t!==void 0&&(delete this._callbacks[e],t.length!==0&&this._entity._markDirtyKey(e))}enable(e){this._disabled[e]&&(delete this._disabled[e],this._entity._markDirtyKey(e))}disable(e){this._disabled[e]||(this._disabled[e]=!0,this._entity._markDirtyKey(e))}fold(e,t){if(!this._disabled[e]){let i=this._callbacks[e];if(i!==void 0)for(let r=0,s=i.length;r<s;++r)t=i[r](t,this._entity,e)}return t}},$t=class{constructor(e,t,i,r,s,n,o){Object.defineProperty(this,"_animation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_from",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_to",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_duration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_easing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_loops",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interpolate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_time",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_stopped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_playing",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new De}),this._animation=e,this._from=t,this._to=i,this._duration=r,this._easing=s,this._loops=n,this._interpolate=Os(t,i),this._oldTime=o}get to(){return this._to}get from(){return this._from}get playing(){return this._playing}get stopped(){return this._stopped}stop(){this._stopped||(this._stopped=!0,this._playing=!1,this.events.isEnabled("stopped")&&this.events.dispatch("stopped",{type:"stopped",target:this}))}pause(){this._playing=!1,this._oldTime=null}play(){!this._stopped&&!this._playing&&(this._playing=!0,this._animation._startAnimation())}get percentage(){return this._time/this._duration}waitForStop(){return new Promise((e,t)=>{if(this._stopped)e();else{let i=()=>{r.dispose(),e()},r=this.events.on("stopped",i)}})}_checkEnded(){return this._loops>1?(--this._loops,!1):!0}_run(e){this._oldTime!==null&&(this._time+=e-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=e}_reset(e){this._oldTime=e,this._time=0}_value(e){return this._interpolate(this._easing(e),this._from,this._to)}},Nn=0,ii=class{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:++Nn}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_privateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_settingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_privateSettingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_prevSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_prevPrivateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_animatingSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_animatingPrivateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_userProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"enableDispose",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this._settings=e}_checkDirty(){G(this._settings).forEach(e=>{this._userProperties[e]=!0,this._markDirtyKey(e)})}resetUserSettings(){this._userProperties={}}_runAnimation(e){let t=Ze.Stopped;if(!this.isDisposed()){let i=!1,r=!1;N(this._animatingSettings,(s,n)=>{if(n.stopped)this._stopAnimation(s);else if(n.playing){n._run(e);let o=n.percentage;o>=1?n._checkEnded()?this.set(s,n._value(1)):(i=!0,n._reset(e),this._set(s,n._value(1))):(i=!0,this._set(s,n._value(o)))}else r=!0}),N(this._animatingPrivateSettings,(s,n)=>{if(n.stopped)this._stopAnimationPrivate(s);else if(n.playing){n._run(e);let o=n.percentage;o>=1?n._checkEnded()?this.setPrivate(s,n._value(1)):(i=!0,n._reset(e),this._setPrivate(s,n._value(1))):(i=!0,this._setPrivate(s,n._value(o)))}else r=!0}),i?t=Ze.Playing:r&&(t=Ze.Paused)}return t}_markDirtyKey(e){this.markDirty()}_markDirtyPrivateKey(e){this.markDirty()}on(e,t){let i=this._settingEvents[e];return i===void 0&&(i=this._settingEvents[e]=[]),i.push(t),new U(()=>{re(i,t),i.length===0&&delete this._settingEvents[e]})}off(e,t){let i=this._settingEvents[e];i!==void 0&&t!==void 0?re(i,t):delete this._settingEvents[e]}onPrivate(e,t){let i=this._privateSettingEvents[e];return i===void 0&&(i=this._privateSettingEvents[e]=[]),i.push(t),new U(()=>{re(i,t),i.length===0&&delete this._privateSettingEvents[e]})}offPrivate(e,t){let i=this._privateSettingEvents[e];i!==void 0&&t!==void 0?re(i,t):delete this._privateSettingEvents[e]}getRaw(e,t){let i=this._settings[e];return i!==void 0?i:t}has(e){return e in this._settings}get(e,t){return this.getRaw(e,t)}_sendKeyEvent(e,t){let i=this._settingEvents[e];i!==void 0&&x(i,r=>{r(t,this,e)})}_sendPrivateKeyEvent(e,t){let i=this._privateSettingEvents[e];i!==void 0&&x(i,r=>{r(t,this,e)})}_setRaw(e,t,i){this._prevSettings[e]=t,this._sendKeyEvent(e,i)}setRaw(e,t){let i=this._settings[e];this._settings[e]=t,i!==t&&this._setRaw(e,i,t)}_set(e,t){let i=this._settings[e];this._settings[e]=t,i!==t&&(this._setRaw(e,i,t),this._markDirtyKey(e))}_stopAnimation(e){let t=this._animatingSettings[e];t&&(delete this._animatingSettings[e],t.stop())}set(e,t){return this._set(e,t),this._stopAnimation(e),t}remove(e){e in this._settings&&(this._prevSettings[e]=this._settings[e],delete this._settings[e],this._sendKeyEvent(e,void 0),this._markDirtyKey(e)),this._stopAnimation(e)}removeAll(){x(G(this._settings),e=>{this.remove(e)})}getPrivate(e,t){let i=this._privateSettings[e];return i!==void 0?i:t}_setPrivateRaw(e,t,i){this._prevPrivateSettings[e]=t,this._sendPrivateKeyEvent(e,i)}setPrivateRaw(e,t){let i=this._privateSettings[e];this._privateSettings[e]=t,i!==t&&this._setPrivateRaw(e,i,t)}_setPrivate(e,t){let i=this._privateSettings[e];this._privateSettings[e]=t,i!==t&&(this._setPrivateRaw(e,i,t),this._markDirtyPrivateKey(e))}_stopAnimationPrivate(e){let t=this._animatingPrivateSettings[e];t&&(t.stop(),delete this._animatingPrivateSettings[e])}setPrivate(e,t){return this._setPrivate(e,t),this._stopAnimationPrivate(e),t}removePrivate(e){e in this._privateSettings&&(this._prevPrivateSettings[e]=this._privateSettings[e],delete this._privateSettings[e],this._markDirtyPrivateKey(e)),this._stopAnimationPrivate(e)}setAll(e){N(e,(t,i)=>{this.set(t,i)})}animate(e){let t=e.key,i=e.to,r=e.duration||0,s=e.loops||1,n=e.from===void 0?this.get(t):e.from,o=e.easing===void 0?wr:e.easing;if(r===0)this.set(t,i);else if(n===void 0||n===i)this.set(t,i);else{this.set(t,n);let u=this._animatingSettings[t]=new $t(this,n,i,r,o,s,this._animationTime());return this._startAnimation(),u}let l=new $t(this,n,i,r,o,s,null);return l.stop(),l}animatePrivate(e){let t=e.key,i=e.to,r=e.duration||0,s=e.loops||1,n=e.from===void 0?this.getPrivate(t):e.from,o=e.easing===void 0?wr:e.easing;if(r===0)this.setPrivate(t,i);else if(n===void 0||n===i)this.setPrivate(t,i);else{this.setPrivate(t,n);let u=this._animatingPrivateSettings[t]=new $t(this,n,i,r,o,s,this._animationTime());return this._startAnimation(),u}let l=new $t(this,n,i,r,o,s,null);return l.stop(),l}_dispose(){}isDisposed(){return this._disposed}dispose(){this.enableDispose&&!this._disposed&&(this._disposed=!0,this._dispose())}},z=class extends ii{constructor(e,t,i,r=[]){if(super(t),Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_user_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"states",{enumerable:!0,configurable:!0,writable:!0,value:new Ci(this)}),Object.defineProperty(this,"adapters",{enumerable:!0,configurable:!0,writable:!0,value:new Dr(this)}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:this._createEvents()}),Object.defineProperty(this,"_userPrivateProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirty",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyPrivate",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_templates",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_internalTemplates",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_defaultThemes",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_templateDisposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_runSetup",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_disposerProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=e,this._internalTemplates=r,t.id&&this._registerId(t.id)}static new(e,t,i){let r=new this(e,t,!0);return r._template=i,r._afterNew(),r}static _new(e,t,i=[]){let r=new this(e,t,!0,i);return r._afterNew(),r}_afterNew(){this._checkDirty();let e=!1,t=this._template;t&&(e=!0,t._setObjectTemplate(this)),x(this._internalTemplates,i=>{e=!0,i._setObjectTemplate(this)}),e&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();let e=this._template;e&&e._setObjectTemplate(this),x(this._internalTemplates,t=>{t._setObjectTemplate(this)}),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new De}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefaultFn(e,t){let i=this.get(e);if(i)return i;{let r=t();return this.set(e,r),r}}_setDefault(e,t){this.has(e)||super.set(e,t)}_setRawDefault(e,t){this.has(e)||super.setRaw(e,t)}_clearDirty(){G(this._dirty).forEach(e=>{this._dirty[e]=!1}),G(this._dirtyPrivate).forEach(e=>{this._dirtyPrivate[e]=!1})}isDirty(e){return!!this._dirty[e]}isPrivateDirty(e){return!!this._dirtyPrivate[e]}_markDirtyKey(e){this._dirty[e]=!0,super._markDirtyKey(e)}_markDirtyPrivateKey(e){this._dirtyPrivate[e]=!0,super._markDirtyKey(e)}isType(e){return this.classNames.indexOf(e)!==-1}_pushPropertyDisposer(e,t){let i=this._disposerProperties[e];return i===void 0&&(i=this._disposerProperties[e]=[]),i.push(t),t}_disposeProperty(e){let t=this._disposerProperties[e];t!==void 0&&(x(t,i=>{i.dispose()}),delete this._disposerProperties[e])}set template(e){let t=this._template;t!==e&&(this._template=e,t&&t._removeObjectTemplate(this),e&&e._setObjectTemplate(this),this._applyTemplates())}get template(){return this._template}markDirty(){this._root._addDirtyEntity(this)}_startAnimation(){this._root._addAnimation(this)}_animationTime(){return this._root.animationTime}_applyState(e){}_applyStateAnimated(e,t){}get(e,t){let i=this.adapters.fold(e,this._settings[e]);return i!==void 0?i:t}isUserSetting(e){return this._userProperties[e]||!1}set(e,t){return this._userProperties[e]=!0,super.set(e,t)}setRaw(e,t){this._userProperties[e]=!0,super.setRaw(e,t)}_setSoft(e,t){return this._userProperties[e]?t:super.set(e,t)}remove(e){delete this._userProperties[e],this._removeTemplateProperty(e)}setPrivate(e,t){return this._userPrivateProperties[e]=!0,super.setPrivate(e,t)}setPrivateRaw(e,t){this._userPrivateProperties[e]=!0,super.setPrivateRaw(e,t)}removePrivate(e){delete this._userPrivateProperties[e],this._removeTemplatePrivateProperty(e)}_setTemplateProperty(e,t,i){if(!this._userProperties[t]){let r=this._findTemplateByKey(t);e===r&&super.set(t,i)}}_setTemplatePrivateProperty(e,t,i){if(!this._userPrivateProperties[t]){let r=this._findTemplateByPrivateKey(t);e===r&&super.setPrivate(t,i)}}_removeTemplateProperty(e){if(!this._userProperties[e]){let t=this._findTemplateByKey(e);t?super.set(e,t._settings[e]):super.remove(e)}}_removeTemplatePrivateProperty(e){if(!this._userPrivateProperties[e]){let t=this._findTemplateByPrivateKey(e);t?super.setPrivate(e,t._privateSettings[e]):super.removePrivate(e)}}_walkParents(e){e(this._root._rootContainer),e(this)}_applyStateByKey(e){let t=this.states.create(e,{}),i={};this._eachTemplate(r=>{let s=r.states.lookup(e);s&&s._apply(t,i)}),N(t._settings,r=>{!i[r]&&!t._userSettings[r]&&t.remove(r)})}_applyTemplate(e,t){this._templateDisposers.push(e._apply(this,t)),N(e._settings,(i,r)=>{!t.settings[i]&&!this._userProperties[i]&&(t.settings[i]=!0,super.set(i,r))}),N(e._privateSettings,(i,r)=>{!t.privateSettings[i]&&!this._userPrivateProperties[i]&&(t.privateSettings[i]=!0,super.setPrivate(i,r))}),this._runSetup&&e.setup&&(this._runSetup=!1,e.setup(this))}_findStaticTemplate(e){if(this._template&&e(this._template))return this._template}_eachTemplate(e){this._findStaticTemplate(t=>(e(t),!1)),nt(this._internalTemplates,e),x(this._templates,e)}_applyTemplates(e=!0){e&&this._disposeTemplates();let t={settings:{},privateSettings:{},states:{}};this._eachTemplate(i=>{this._applyTemplate(i,t)}),e&&(N(this._settings,i=>{!this._userProperties[i]&&!t.settings[i]&&super.remove(i)}),N(this._privateSettings,i=>{!this._userPrivateProperties[i]&&!t.privateSettings[i]&&super.removePrivate(i)}))}_findTemplate(e){let t=this._findStaticTemplate(e);if(t===void 0){let i=xs(this._internalTemplates,e);return i===void 0?xi(this._templates,e):i}else return t}_findTemplateByKey(e){return this._findTemplate(t=>e in t._settings)}_findTemplateByPrivateKey(e){return this._findTemplate(t=>e in t._privateSettings)}_disposeTemplates(){x(this._templateDisposers,e=>{e.dispose()}),this._templateDisposers.length=0}_removeTemplates(){x(this._templates,e=>{e._removeObjectTemplate(this)}),this._templates.length=0}_applyThemes(e=!1){let t=!1,i=[],r=[],s=new Set,n=this.get("themeTagsSelf");return n&&x(n,o=>{s.add(o)}),this._walkParents(o=>{o===this._root._rootContainer&&(t=!0),o._defaultThemes.length>0&&i.push(o._defaultThemes);let l=o.get("themes");l&&r.push(l);let u=o.get("themeTags");u&&x(u,h=>{s.add(h)})}),r=i.concat(r),this._removeTemplates(),(t||e)&&nt(this.classNames,o=>{let l=[];x(r,u=>{x(u,h=>{let c=h._lookupRules(o);c&&nt(c,f=>{if(f.tags.every(m=>s.has(m))){let m=Ps(l,b=>{let p=Ve(f.tags.length,b.tags.length);return p===0?ji(f.tags,b.tags,Ve):p});l.splice(m.index,0,f)}})})}),x(l,u=>{this._templates.push(u.template),u.template._setObjectTemplate(this)})}),this._applyTemplates(),(t||e)&&(this._runSetup=!1),t||e}_changed(){}_beforeChanged(){if(this.isDirty("id")){let e=this.get("id");e&&this._registerId(e);let t=this._prevSettings.id;t&&(delete this._root.entitiesById[t],delete Oe.entitiesById[t])}}_registerId(e){if(this._root.entitiesById[e]&&this._root.entitiesById[e]!==this)throw new Error('An entity with id "'+e+'" already exists.');this._root.entitiesById[e]=this,Oe.entitiesById[e]=this}_afterChanged(){}addDisposer(e){return this._disposers.push(e),e}_dispose(){super._dispose();let e=this._template;e&&e._removeObjectTemplate(this),x(this._internalTemplates,i=>{i._removeObjectTemplate(this)}),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEach(i=>{i.dispose()}),N(this._disposerProperties,(i,r)=>{x(r,s=>{s.dispose()})});let t=this.get("id");t&&(delete this._root.entitiesById[t],delete Oe.entitiesById[t])}setTimeout(e,t){let i=setTimeout(()=>{this.removeDispose(r),e()},t),r=new U(()=>{clearTimeout(i)});return this._disposers.push(r),r}removeDispose(e){if(!this.isDisposed()){let t=Ue(this._disposers,e);t>-1&&this._disposers.splice(t,1)}e.dispose()}hasTag(e){return Ue(this.get("themeTags",[]),e)!==-1}addTag(e){if(!this.hasTag(e)){let t=this.get("themeTags",[]);t.push(e),this.set("themeTags",t)}}removeTag(e){if(this.hasTag(e)){let t=this.get("themeTags",[]);ye(t,e),this.set("themeTags",t)}}_t(e,t,...i){return this._root.language.translate(e,t,...i)}get root(){return this._root}};Object.defineProperty(z,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Entity"});Object.defineProperty(z,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:["Entity"]});var we=class extends z{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_backgroundDisplay",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_clear",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){super._afterNewApplyThemes()}get pattern(){return this._pattern}_draw(){}_beforeChanged(){super._beforeChanged(),(this.isDirty("repetition")||this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation")||this.isDirty("strokeWidth")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("colorOpacity")||this.isDirty("fillOpacity"))&&(this._clear=!0),this._checkDirtyFill()}_checkDirtyFill(){(this.isDirty("color")||this.isDirty("fill"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let e=this.get("repetition",""),t=this.get("width",100),i=this.get("height",100),r=this.get("fill"),s=this.get("fillOpacity",1),n=this._backgroundDisplay,o=this._display;o.clear(),n.clear(),r&&s>0&&(n.beginFill(r,s),n.drawRect(0,0,t,i),n.endFill()),o.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(o,n,e,t,i)}this._clear=!1}};Object.defineProperty(we,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Pattern"});Object.defineProperty(we,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([we.className])});var ht=class extends we{constructor(){super(...arguments),Object.defineProperty(this,"_image",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load();let e=this.get("canvas");e&&(this.set("width",e.width),this.set("height",e.height))}_draw(){super._draw();let e=this.get("colorOpacity");e!==void 0&&(this._display.alpha=Math.max(0,e));let t=this._image;if(t){let r=this.get("width",100),s=this.get("height",100),n=this.get("fit","image"),o=0,l=0;n=="pattern"?(o=r,l=s,this.markDirty()):(o=t.width,l=t.height,n=="image"&&(this.set("width",o),this.set("height",l)));let u=this.get("centered",!0),h=0,c=0;u&&(h=r/2-o/2,c=s/2-l/2),this._display.image(t,o,l,h,c)}let i=this.get("canvas");i&&this._display.image(i,i.width,i.height,0,0)}_load(){let e=this.get("src");if(e){let t=new Image;t.src=e,t.decode().then(()=>{this._image=t,this._draw(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})}).catch(i=>{})}}};Object.defineProperty(ht,"className",{enumerable:!0,configurable:!0,writable:!0,value:"PicturePattern"});Object.defineProperty(ht,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:we.classNames.concat([ht.className])});var Ei=class a extends De{constructor(e){super(),Object.defineProperty(this,"_sprite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rendererDisposers",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dispatchParents",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this._sprite=e}_makePointerEvent(e,t){return{type:e,originalEvent:t.event,point:t.point,simulated:t.simulated,native:t.native,target:this._sprite}}_onRenderer(e,t){this._sprite.set("interactive",!0),this._sprite._display.interactive=!0;let i=this._rendererDisposers[e];if(i===void 0){let r=this._sprite._display.on(e,s=>{t.call(this,s)});i=this._rendererDisposers[e]=new Ct(()=>{delete this._rendererDisposers[e],r.dispose()})}return i.increment()}_on(e,t,i,r,s,n,o){let l=super._on(e,t,i,r,s,n,o),u=a.RENDERER_EVENTS[t];return u!==void 0&&(l.disposer=new se([l.disposer,this._onRenderer(t,u)])),l}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(e,t){let i=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(e,t),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(e,t)}finally{this._dispatchParents=i}}};Object.defineProperty(Ei,"RENDERER_EVENTS",{enumerable:!0,configurable:!0,writable:!0,value:{click:function(a){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",a))&&this.dispatch("click",this._makePointerEvent("click",a))},rightclick:function(a){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",a))},middleclick:function(a){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",a))},dblclick:function(a){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",a))},pointerover:function(a){let e=this._sprite,t=!0;if(e.getPrivate("trustBounds")){e._getBounds();let i=e.globalBounds();if(e.isType("Graphics")){let r=e.get("strokeWidth",1)/2;r>=1&&(i.left-=r,i.right+=r,i.top-=r,i.bottom+=r)}Ks(a.point,i)||(t=!1,e._root._renderer.removeHovering(e._display))}t&&this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",a))},pointerout:function(a){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",a))},pointerdown:function(a){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",a))},pointerup:function(a){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",a))},globalpointerup:function(a){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",a))},globalpointermove:function(a){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",a))},wheel:function(a){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:a.event,point:a.point})}}});var ue=class extends z{constructor(){super(...arguments),Object.defineProperty(this,"_adjustedLocalBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_localBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dataItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_templateField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_sizeDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dragEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dragPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isHidden",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isShowing",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isHiding",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_downPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downPoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_toggleDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dragDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hoverDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_focusDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipMoveDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipPointerDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_virtualParent",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}markDirtyKey(e){this._markDirtyKey(e)}_markDirtyKey(e){super._markDirtyKey(e),(e=="x"||e=="y"||e=="dx"||e=="dy")&&(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(e){super._markDirtyPrivateKey(e),(e=="x"||e=="y")&&this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new Ei(this)}_processTemplateField(){let e,t=this.get("templateField");if(t){let i=this.dataItem;if(i){let r=i.dataContext;r&&(e=r[t],!(e instanceof de)&&e&&(e=de.new(e)))}}this._templateField!==e&&(this._removeTemplateField(),this._templateField=e,e&&e._setObjectTemplate(this),this._applyTemplates())}_setDataItem(e){let t=this._dataItem;this._dataItem=e,this._processTemplateField();let i="dataitemchanged";e!=t&&this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,oldDataItem:t,newDataItem:e})}set dataItem(e){this._setDataItem(e)}get dataItem(){if(this._dataItem)return this._dataItem;{let e=this._parent;for(;e;){if(e._dataItem)return e._dataItem;e=e._parent}}}_addPercentageSizeChildren(){let e=this.parent;e&&(this.get("width")instanceof A||this.get("height")instanceof A?at(e._percentageSizeChildren,this):re(e._percentageSizeChildren,this))}_addPercentagePositionChildren(){let e=this.parent;e&&(this.get("x")instanceof A||this.get("y")instanceof A?at(e._percentagePositionChildren,this):re(e._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){let e=this._localBounds;if(e){let t=this.get("centerX");t!=null&&(this._display.pivot.x=e.left+ce(t,e.right-e.left));let i=this.get("centerY");i!=null&&(this._display.pivot.y=e.top+ce(i,e.bottom-e.top))}}_beforeChanged(){if(super._beforeChanged(),this._handleStates(),this.isDirty("tooltip")){let e=this._prevSettings.tooltip;e&&e.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){let e=this._tooltipMoveDp;e&&(e.dispose(),this._tooltipMoveDp=void 0);let t=this._tooltipPointerDp;t&&(t.dispose(),this._tooltipPointerDp=void 0),this.get("tooltipPosition")=="pointer"&&(this.isHover()&&(this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})),this._tooltipPointerDp=new se([this.events.on("pointerover",()=>{this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})}),this.events.on("pointerout",()=>{let i=this._tooltipMoveDp;i&&(i.dispose(),this._tooltipMoveDp=void 0)})]))}}_handleStates(){this.isDirty("active")&&(this.get("active")?(this.states.applyAnimate("active"),this.set("ariaChecked",!0)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!1)),this.markDirtyAccessibility()),this.isDirty("disabled")&&(this.get("disabled")?(this.states.applyAnimate("disabled"),this.set("ariaChecked",!1)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!0)),this.markDirtyAccessibility())}_changed(){super._changed();let e=this._display,t=this.events;if(this.isDirty("draggable")){let r=this.get("draggable");r?(this.set("interactive",!0),this._dragDp=new se([t.on("pointerdown",s=>{this.dragStart(s)}),t.on("globalpointermove",s=>{this.dragMove(s)}),t.on("globalpointerup",s=>{this.dragStop(s)})])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),e.cancelTouch=!!r}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){let r=this.get("tooltipText"),s=this.get("tooltipHTML"),n=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(r||s)&&(n=="click"?(this._tooltipDp=new se([t.on("click",()=>{this.setTimeout(()=>{let o=this.getTooltip();o&&!o.isHidden()&&o.get("tooltipTarget")===this?this.hideTooltip():this.showTooltip()},10)}),V(document,"click",o=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)):n=="always"||(this._tooltipDp=new se([t.on("pointerover",()=>{this.showTooltip()}),t.on("pointerout",()=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)))}if(this.isDirty("toggleKey")){let r=this.get("toggleKey");r&&r!="none"?this._toggleDp=t.on("click",()=>{this._isDragging||this.set(r,!this.get(r))}):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(e.alpha=Math.max(0,this.get("opacity",1)),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("rotation")&&(this.markDirtyBounds(),e.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),e.scale=this.get("scale",0)),(this.isDirty("centerX")||this.isDirty("centerY"))&&(this.markDirtyBounds(),this.updatePivotPoint()),(this.isDirty("visible")||this.isPrivateDirty("visible")||this.isDirty("forceHidden"))&&(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(e.visible=!1,this.hideTooltip()):e.visible=!0,this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();let r=this.parent;r&&(this.isDirty("width")&&this.get("width")instanceof A||this.isDirty("height")&&this.get("height")instanceof A)&&(r.markDirty(),r._prevWidth=0),this._sizeDirty=!0}if((this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("minWidth")||this.isDirty("minHeight")||this.isPrivateDirty("maxWidth")||this.isPrivateDirty("maxHeight")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight")||this.isDirty("marginLeft")||this.isDirty("marginTop")||this.isDirty("marginRight")||this.isDirty("marginBottom"))&&(this.markDirtyBounds(),this._sizeDirty=!0),this._sizeDirty&&this._updateSize(),this.isDirty("wheelable")){let r=this.get("wheelable");r&&this.set("interactive",!0),e.wheelable=!!r}(this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")&&(e.filter=this.get("filter"));let i=this.get("filter","");if(this.isDirty("blur")){let r=this.get("blur",0);r!=0&&(i+=" blur("+r+"px)")}if(this.isDirty("saturate")){let r=this.get("saturate",1);r!=1&&(i+=" saturate("+r+")")}if(this.isDirty("brightness")){let r=this.get("brightness",1);r!=1&&(i+=" brightness("+r+")")}if(this.isDirty("contrast")){let r=this.get("contrast",1);r!=1&&(i+=" contrast("+r+")")}if(this.isDirty("sepia")){let r=this.get("sepia",0);r!=0&&(i+=" sepia("+r+")")}if(this.isDirty("hue")){let r=this.get("hue",0);r!=0&&(i+=" hue-rotate("+r+"deg)")}if(this.isDirty("invert")){let r=this.get("invert",0);r!=0&&(i+=" invert("+r+")")}if(i&&(e.filter=i),this.isDirty("cursorOverStyle")&&(e.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new se([t.on("focus",()=>{this.showTooltip()}),t.on("blur",()=>{this.hideTooltip()})]):this._focusDp&&(this._focusDp.dispose(),this._focusDp=void 0)),this.isDirty("focusable")&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this),this.markDirtyAccessibility(),this._disposers.push(t.on("blur",()=>{this.setPrivateRaw("touchHovering",!1)})),this._disposers.push(t.once("boundschanged",()=>{this.markDirtyAccessibility()}))),this.isPrivateDirty("focusable")&&this.markDirtyAccessibility(),(this.isDirty("role")||this.isDirty("ariaLive")||this.isDirty("ariaChecked")||this.isDirty("ariaHidden")||this.isDirty("ariaOrientation")||this.isDirty("ariaValueNow")||this.isDirty("ariaValueMin")||this.isDirty("ariaValueMax")||this.isDirty("ariaValueText")||this.isDirty("ariaLabel")||this.isDirty("ariaControls"))&&this.markDirtyAccessibility(),this.isDirty("exportable")&&(e.exportable=this.get("exportable")),this.isDirty("interactive")){let r=this.events;this.get("interactive")&&!r.isDisposed()?this._hoverDp=new se([r.on("click",s=>{lr(s.originalEvent)&&(this.getPrivate("touchHovering")||this.setTimeout(()=>{this._handleOver(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.showTooltip(),this.setPrivateRaw("touchHovering",!0),this.events.dispatch("pointerover",{type:"pointerover",target:s.target,originalEvent:s.originalEvent,point:s.point,simulated:s.simulated})},10))}),r.on("globalpointerup",s=>{lr(s.originalEvent)&&this.getPrivate("touchHovering")&&(this._handleOut(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.hideTooltip(),this.setPrivateRaw("touchHovering",!1),this.events.dispatch("pointerout",{type:"pointerout",target:s.target,originalEvent:s.originalEvent,point:s.point,simulated:s.simulated})),this._isDown&&this._handleUp(s)}),r.on("pointerover",()=>{this._handleOver()}),r.on("pointerout",()=>{this._handleOut()}),r.on("pointerdown",s=>{this._handleDown(s)})]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",null)),this.get("showTooltipOn")=="always"&&this._display.visible&&this.showTooltip()}dragStart(e){this._dragEvent=e,this.events.stopParentDispatch()}dragStop(e){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;let t="dragstop";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}}_handleOver(){this.isHidden()||(this.get("active")&&this.states.lookup("hoverActive")?this.states.applyAnimate("hoverActive"):this.get("disabled")&&this.states.lookup("hoverDisabled")?this.states.applyAnimate("hoverDisabled"):this.states.applyAnimate("hover"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleOut(){this.isHidden()||(this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):(this.states.lookup("hover")||this.states.lookup("hoverActive"))&&this.states.applyAnimate("default"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleUp(e){if(!this.isHidden()){this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):this.states.lookup("down")&&(this.isHover()?this.states.applyAnimate("hover"):this.states.applyAnimate("default")),this._downPoint=void 0;let t=Di(e.originalEvent);delete this._downPoints[t],G(this._downPoints).length==0&&(this._isDown=!1)}}_hasMoved(e){let t=Di(e.originalEvent),i=this._downPoints[t];if(i){let r=Math.abs(i.x-e.point.x),s=Math.abs(i.y-e.point.y);return r>5||s>5}return!1}_hasDown(){return G(this._downPoints).length>0}_handleDown(e){let t=this.parent;if(t&&!this.get("draggable")&&t._handleDown(e),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:e.point.x,y:e.point.y},this._isDown=!0;let i=Di(e.originalEvent);this._downPoints[i]={x:e.point.x,y:e.point.y}}}dragMove(e){let t=this._dragEvent;if(t){if(t.simulated&&!e.simulated)return!0;let i=0,r=this.parent,s=1;for(;r!=null;)i+=r.get("rotation",0),r=r.parent,r&&(s*=r.get("scale",1));let n=(e.point.x-t.point.x)/s,o=(e.point.y-t.point.y)/s,l=this.events;if(t.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=e,this._dragPoint={x:this.x(),y:this.y()};let u="dragstart";l.isEnabled(u)&&l.dispatch(u,{type:u,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}if(this._isDragging){let u=this._dragPoint;this.set("x",u.x+n*xe(i)+o*ve(i)),this.set("y",u.y+o*xe(i)-n*ve(i));let h="dragged";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}else if(Math.hypot(n,o)>5){this._isDragging=!0,this._dragEvent=e,this._dragPoint={x:this.x(),y:this.y()};let u="dragstart";l.isEnabled(u)&&l.dispatch(u,{type:u,target:this,originalEvent:e.originalEvent,point:e.point,simulated:e.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let e=this.parent,t=0;for(;;)if(e)++t,e=e.parent;else return t}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){let e=this._display;if(this.get("isMeasured")){this._root._addDirtyBounds(this),e.isMeasured=!0,e.invalidateBounds();let t=this.parent;t&&this.get("position")!="absolute"&&(t.get("width")==null||t.get("height")==null||t.get("layout"))&&t.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){let e=this._adjustedLocalBounds,t;if(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(t={left:0,right:0,top:0,bottom:0},this._localBounds=t,this._adjustedLocalBounds=t):(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),t=this._adjustedLocalBounds),!e||e.left!==t.left||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom){let i="boundschanged";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds()),this.getPrivate("showingTooltip")&&this.showTooltip()}}_fixMinBounds(e){let t=this.get("minWidth",this.getPrivate("minWidth")),i=this.get("minHeight",this.getPrivate("minHeight"));w(t)&&e.right-e.left<t&&(e.right=e.left+t),w(i)&&e.bottom-e.top<i&&(e.bottom=e.top+i);let r=this.getPrivate("width"),s=this.getPrivate("height");w(r)&&(r>0?e.right=e.left+r:e.left=e.right+r),w(s)&&(s>0?e.bottom=e.top+s:e.top=e.bottom+s)}_removeParent(e){e&&(e.children.removeValue(this),re(e._percentageSizeChildren,this),re(e._percentagePositionChildren,this))}_clearDirty(){super._clearDirty(),this._sizeDirty=!1}hover(){this.isDisposed()||(this.showTooltip(),this._handleOver())}unhover(){this.isDisposed()||(this.hideTooltip(),this._handleOut())}showTooltip(e){if(!this.isDisposed()){let t=this.getTooltip(),i=this.get("tooltipText"),r=this.get("tooltipHTML");if((i||r)&&t){let s=this.get("tooltipPosition"),n=this.getPrivate("tooltipTarget",this);if((s=="fixed"||!e)&&(this._display._setMatrix(),e=this.toGlobal(n._getTooltipPoint())),s=="pointer"){let u=this.getPrivate("lastTooltipCoords");if(u&&u.x==e.x&&u.y==e.y)return;this.setPrivate("lastTooltipCoords",e)}t.set("pointTo",e),t.set("tooltipTarget",n),t.get("x")||t.set("x",e.x),t.get("y")||t.set("y",e.y),i&&t.label.set("text",i),r&&t.label.set("html",r);let o=this.dataItem;if(o&&t.label._setDataItem(o),this.get("showTooltipOn")=="always"&&(e.x<0||e.x>this._root.width()||e.y<0||e.y>this._root.height())){this.hideTooltip();return}t.label.text.markDirtyText();let l=t.show();return this.setPrivateRaw("showingTooltip",!0),l}}}hideTooltip(){let e=this.getTooltip();if(e&&(this.removePrivate("lastTooltipCoords"),e.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)||this.get("tooltip")==e)){let t=e.get("keepTargetHover")&&e.get("stateAnimationDuration",0)==0?400:void 0,i=e.hide(t);return this.setPrivateRaw("showingTooltip",!1),i}}_getTooltipPoint(){let e=this._localBounds;if(e){let t=0,i=0;return this.get("isMeasured")?(t=e.left+ce(this.get("tooltipX",0),e.right-e.left),i=e.top+ce(this.get("tooltipY",0),e.bottom-e.top)):(t=ce(this.get("tooltipX",0),this.width()),i=ce(this.get("tooltipY",0),this.height())),{x:t,y:i}}return{x:0,y:0}}getTooltip(){let e=this.get("tooltip");if(e)return e;{let t=this.parent;if(t)return t.getTooltip()}}_updatePosition(){let e=this.parent,t=this.get("dx",0),i=this.get("dy",0),r=this.get("x"),s=this.getPrivate("x"),n=0,o=0,l=this.get("position");r instanceof A&&(e?r=e.innerWidth()*r.value+e.get("paddingLeft",0):r=0),w(r)?n=r+t:s!=null?n=s:e&&l=="relative"&&(n=e.get("paddingLeft",0)+t);let u=this.get("y"),h=this.getPrivate("y");u instanceof A&&(e?u=e.innerHeight()*u.value+e.get("paddingTop",0):u=0),w(u)?o=u+i:h!=null?o=h:e&&l=="relative"&&(o=e.get("paddingTop",0)+i);let c=this._display;if(c.x!=n||c.y!=o){c.invalidateBounds(),c.x=n,c.y=o;let f="positionchanged";this.events.isEnabled(f)&&this.events.dispatch(f,{type:f,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let e=this.get("x"),t=this.getPrivate("x"),i=this.parent;return i?e instanceof A?ce(e,i.innerWidth())+i.get("paddingLeft",0):w(e)?e:t??i.get("paddingLeft",this._display.x):this._display.x}y(){let e=this.getPrivate("y");if(e!=null)return e;let t=this.get("y"),i=this.parent;return i?t instanceof A?ce(t,i.innerHeight())+i.get("paddingTop",0):w(t)?t:e??i.get("paddingTop",this._display.y):this._display.y}_dispose(){super._dispose(),this._display.dispose(),this._removeTemplateField(),this._removeParent(this.parent),this._root._removeFocusElement(this);let e=this.get("tooltip");e&&e.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){let e=this._adjustedLocalBounds,t=this.x(),i=this.y();return{left:e.left+t,right:e.right+t,top:e.top+i,bottom:e.bottom+i}}globalBounds(){let e=this.localBounds(),t=this.toGlobal({x:e.left,y:e.top}),i=this.toGlobal({x:e.right,y:e.top}),r=this.toGlobal({x:e.right,y:e.bottom}),s=this.toGlobal({x:e.left,y:e.bottom});return{left:Math.min(t.x,i.x,r.x,s.x),top:Math.min(t.y,i.y,r.y,s.y),right:Math.max(t.x,i.x,r.x,s.x),bottom:Math.max(t.y,i.y,r.y,s.y)}}_onShow(e){}_onHide(e){}appear(e,t){return _e(this,void 0,void 0,function*(){return yield this.hide(0),t?new Promise((i,r)=>{this.setTimeout(()=>{i(this.show(e))},t)}):this.show(e)})}show(e){return _e(this,void 0,void 0,function*(){if(!this._isShowing){this._isHidden=!1,this._isShowing=!0,this._isHiding=!1,this.states.lookup("default").get("visible")&&this.set("visible",!0),this._onShow(e);let t=this.states.applyAnimate("default",e);yield nr(t),this._isShowing=!1}})}hide(e){return _e(this,void 0,void 0,function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let t=this.states.lookup("hidden");t||(t=this.states.create("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(e);let i=this.states.applyAnimate("hidden",e);yield nr(i),this._isHiding=!1}})}isHidden(){return this._isHidden}isShowing(){return this._isShowing}isHiding(){return this._isHiding}isHover(){return this._display.hovering()}isFocus(){return this._root.focused(this)}isDragging(){return this._isDragging}isVisible(){return!!(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden"))}isVisibleDeep(){return this._parent?this._parent.isVisibleDeep()&&this.isVisible():this.isVisible()}compositeOpacity(){let e=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*e:e}compositeScale(){let e=this.get("scale",1);return this._parent?this._parent.compositeScale()*e:e}compositeRotation(){let e=this.get("rotation",0);return this._parent?this._parent.compositeRotation()+e:e}width(){let e=this.get("width"),t=this.get("maxWidth",this.getPrivate("maxWidth")),i=this.get("minWidth",this.getPrivate("minWidth")),r=this.getPrivate("width"),s=0;if(w(r))s=r;else if(e==null)this._adjustedLocalBounds&&(s=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(e instanceof A){let n=this.parent;n?s=n.innerWidth()*e.value:s=this._root.width()*e.value}else w(e)&&(s=e);return w(i)&&(s=Math.max(i,s)),w(t)&&(s=Math.min(t,s)),s}maxWidth(){let e=this.get("maxWidth",this.getPrivate("maxWidth"));if(w(e))return e;{let i=this.get("width");if(w(i))return i}let t=this.parent;return t?t.innerWidth():this._root.width()}maxHeight(){let e=this.get("maxHeight",this.getPrivate("maxHeight"));if(w(e))return e;{let i=this.get("height");if(w(i))return i}let t=this.parent;return t?t.innerHeight():this._root.height()}height(){let e=this.get("height"),t=this.get("maxHeight",this.getPrivate("maxHeight")),i=this.get("minHeight",this.getPrivate("minHeight")),r=this.getPrivate("height"),s=0;if(w(r))s=r;else if(e==null)this._adjustedLocalBounds&&(s=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(e instanceof A){let n=this.parent;n?s=n.innerHeight()*e.value:s=this._root.height()*e.value}else w(e)&&(s=e);return w(i)&&(s=Math.max(i,s)),w(t)&&(s=Math.min(t,s)),s}_findStaticTemplate(e){return this._templateField&&e(this._templateField)?this._templateField:super._findStaticTemplate(e)}_walkParents(e){(this._parent||this._virtualParent)&&this._walkParent(e)}_walkParent(e){this._parent?this._parent._walkParent(e):this._virtualParent&&this._virtualParent._walkParent(e),e(this)}set virtualParent(e){this._virtualParent=e,this._applyThemes()}get parent(){return this._parent}_setParent(e,t=!1){let i=this._parent;e!==i&&(this.markDirtyBounds(),e.markDirty(),this._parent=e,t&&(this._removeParent(i),e&&(this._addPercentageSizeChildren(),this._addPercentagePositionChildren())),this.markDirtyPosition(),this._applyThemes())}getNumberFormatter(){return this.get("numberFormatter",this._root.numberFormatter)}getDateFormatter(){return this.get("dateFormatter",this._root.dateFormatter)}getDurationFormatter(){return this.get("durationFormatter",this._root.durationFormatter)}toGlobal(e){return this._display.toGlobal(e)}toLocal(e){return this._display.toLocal(e)}_getDownPoint(){let e=this._getDownPointId();if(e)return this._downPoints[e]}_getDownPointId(){if(this._downPoints)return sr(this._downPoints,(e,t)=>e>t?1:e<t?-1:0)[0]}toFront(){let e=this.parent;e&&e.children.moveValue(this,e.children.length-1)}toBack(){let e=this.parent;e&&e.children.moveValue(this,0)}};Object.defineProperty(ue,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Sprite"});Object.defineProperty(ue,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([ue.className])});var At;(function(a){a.ADD="lighter",a.COLOR="color",a.COLOR_BURN="color-burn",a.COLOR_DODGE="color-dodge",a.DARKEN="darken",a.DIFFERENCE="difference",a.DST_OVER="destination-over",a.EXCLUSION="exclusion",a.HARD_LIGHT="hard-light",a.HUE="hue",a.LIGHTEN="lighten",a.LUMINOSITY="luminosity",a.MULTIPLY="multiply",a.NORMAL="source-over",a.OVERLAY="overlay",a.SATURATION="saturation",a.SCREEN="screen",a.SOFT_LIGHT="soft-light",a.SRC_ATOP="source-atop",a.XOR="xor"})(At||(At={}));var jo=["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","fillPattern","strokePattern","fillGradient","strokeGradient","strokeDasharray","strokeDashoffset","shadowBlur","shadowColor","shadowOpacity","shadowOffsetX","shadowOffsetY","blur","sepia","invert","brightness","hue","contrast","saturate"],Z=class extends ue{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_clear",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_beforeChanged(){if(super._beforeChanged(),(this.isDirty("draw")||this.isDirty("svgPath"))&&this.markDirtyBounds(),(this.isDirty("fill")||this.isDirty("stroke")||this.isDirty("visible")||this.isDirty("forceHidden")||this.isDirty("scale")||this.isDirty("fillGradient")||this.isDirty("strokeGradient")||this.isDirty("fillPattern")||this.isDirty("strokePattern")||this.isDirty("fillOpacity")||this.isDirty("strokeOpacity")||this.isDirty("strokeWidth")||this.isDirty("draw")||this.isDirty("blendMode")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("svgPath")||this.isDirty("lineJoin")||this.isDirty("lineCap")||this.isDirty("shadowColor")||this.isDirty("shadowBlur")||this.isDirty("shadowOffsetX")||this.isDirty("shadowOffsetY"))&&(this._clear=!0),this._display.crisp=this.get("crisp",!1),this.isDirty("fillGradient")){let e=this.get("fillGradient");if(e){this._display.isMeasured=!0;let t=e.get("target");t&&(this._disposers.push(t.events.on("boundschanged",()=>{this._markDirtyKey("fill")})),this._disposers.push(t.events.on("positionchanged",()=>{this._markDirtyKey("fill")})))}}if(this.isDirty("strokeGradient")){let e=this.get("strokeGradient");if(e){this._display.isMeasured=!0;let t=e.get("target");t&&(this._disposers.push(t.events.on("boundschanged",()=>{this._markDirtyKey("stroke")})),this._disposers.push(t.events.on("positionchanged",()=>{this._markDirtyKey("stroke")})))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let e=this.get("strokeDasharray");w(e)&&(e<.5?e=[0]:e=[e]),this._display.setLineDash(e);let t=this.get("strokeDashoffset");t&&this._display.setLineDashOffset(t);let i=this.get("blendMode",At.NORMAL);this._display.blendMode=i;let r=this.get("draw");r&&typeof r=="function"&&r(this._display,this);let s=this.get("svgPath");s!=null&&this._display.svgPath(s)}}_afterChanged(){if(super._afterChanged(),this._clear){let e=this.get("fill"),t=this.get("fillGradient"),i=this.get("fillPattern"),r=this.get("fillOpacity"),s=this.get("stroke"),n=this.get("strokeGradient"),o=this.get("strokePattern"),l=this.get("shadowColor"),u=this.get("shadowBlur"),h=this.get("shadowOffsetX"),c=this.get("shadowOffsetY"),f=this.get("shadowOpacity");if(l&&(u||h||c)&&this._display.shadow(l,u,h,c,f),e&&!t&&(this._display.beginFill(e,r),this._display.endFill()),t){if(e){let m=t.get("stops",[]);m.length&&x(m,b=>{(!b.color||b.colorInherited)&&e&&(b.color=e,b.colorInherited=!0),(b.opacity==null||b.opacityInherited)&&(b.opacity=r,b.opacityInherited=!0)})}let d=t.getFill(this);d&&(this._display.beginFill(d,r),this._display.endFill())}if(i){let d=i.pattern;d&&(this._display.beginFill(d,r),this._display.endFill(),i instanceof ht&&i.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}if(s||n||o){let d=this.get("strokeOpacity"),m=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(m=m/this.get("scale",1)),this.get("crisp")&&(m/=this._root._renderer.resolution);let b=this.get("lineJoin"),p=this.get("lineCap");if(s&&!n&&(this._display.lineStyle(m,s,d,b,p),this._display.endStroke()),n){let g=n.get("stops",[]);g.length&&x(g,y=>{(!y.color||y.colorInherited)&&s&&(y.color=s,y.colorInherited=!0),(y.opacity==null||y.opacityInherited)&&(y.opacity=d,y.opacityInherited=!0)});let _=n.getFill(this);_&&(this._display.lineStyle(m,_,d,b,p),this._display.endStroke())}if(o){let g=o.pattern;g&&(this._display.lineStyle(m,g,d,b,p),this._display.endStroke(),o instanceof ht&&o.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}}this.getPrivate("showingTooltip")&&this.showTooltip()}this._clear=!1}};Object.defineProperty(Z,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Graphics"});Object.defineProperty(Z,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([Z.className])});var Pe=class extends Z{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){let e=this.width(),t=this.height(),i=0,r=0,s=e/Math.abs(e),n=t/Math.abs(t);if(this.get("containStroke",!1)){let o=this.get("strokeWidth",0);e-=o*s,t-=o*n,i+=o/2*s,r+=o/2*n}this._display.drawRect(i,r,e,t)}_updateSize(){this.markDirty(),this._clear=!0}};Object.defineProperty(Pe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Rectangle"});Object.defineProperty(Pe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Z.classNames.concat([Pe.className])});function ri(a,e){if(!(a>=0&&a<e))throw new Error("Index out of bounds: "+a)}var et=class{constructor(e=[]){Object.defineProperty(this,"_values",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new De}),this._values=e}get values(){return this._values}contains(e){return this._values.indexOf(e)!==-1}removeValue(e){let t=0,i=this._values.length;for(;t<i;)this._values[t]===e?(this.removeIndex(t),--i):++t}indexOf(e){return Ue(this._values,e)}get length(){return this._values.length}hasIndex(e){return e>=0&&e<this._values.length}getIndex(e){return this._values[e]}_onPush(e){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:e})}_onInsertIndex(e,t){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:e,newValue:t})}_onSetIndex(e,t,i){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:e,oldValue:t,newValue:i})}_onSwap(e,t){this.events.isEnabled("swap")&&this.events.dispatch("swap",{type:"swap",target:this,a:e,b:t})}_onRemoveIndex(e,t){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:e,oldValue:t})}_onMoveIndex(e,t,i){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:e,newIndex:t,value:i})}_onClear(e){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:e})}setIndex(e,t){ri(e,this._values.length);let i=this._values[e];return i!==t&&(this._values[e]=t,this._onSetIndex(e,i,t)),i}insertIndex(e,t){return ri(e,this._values.length+1),qt(this._values,e,t),this._onInsertIndex(e,t),t}swap(e,t){let i=this._values.length;if(ri(e,i),ri(t,i),e!==t){let r=this._values[e],s=this._values[t];this._values[e]=s,this._values[t]=r,this._onSwap(r,s)}}removeIndex(e){ri(e,this._values.length);let t=this._values[e];return vi(this._values,e),this._onRemoveIndex(e,t),t}moveValue(e,t){let i=this.indexOf(e);if(i!==-1)if(vi(this._values,i),t==null){let r=this._values.length;this._values.push(e),this._onMoveIndex(i,r,e)}else qt(this._values,t,e),this._onMoveIndex(i,t,e);else t==null?(this._values.push(e),this._onPush(e)):(qt(this._values,t,e),this._onInsertIndex(t,e));return e}push(e){return this._values.push(e),this._onPush(e),e}unshift(e){return this.insertIndex(0,e),e}pushAll(e){x(e,t=>{this.push(t)})}copyFrom(e){this.pushAll(e._values)}pop(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)}shift(){return this._values.length?this.removeIndex(0):void 0}setAll(e){let t=this._values;this._values=[],this._onClear(t),x(e,i=>{this._values.push(i),this._onPush(i)})}clear(){this.setAll([])}*[Symbol.iterator](){let e=this._values.length;for(let t=0;t<e;++t)yield this._values[t]}each(e){x(this._values,e)}eachReverse(e){nt(this._values,e)}},si=class extends et{constructor(){super(...arguments),Object.defineProperty(this,"autoDispose",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1})}swap(e,t){let i=this.autoDispose;this.autoDispose=!1,super.swap(e,t),this.autoDispose=i}_onSetIndex(e,t,i){this.autoDispose&&t.dispose(),super._onSetIndex(e,t,i)}_onRemoveIndex(e,t){this.autoDispose&&t.dispose(),super._onRemoveIndex(e,t)}_onClear(e){this.autoDispose&&x(e,t=>{t.dispose()}),super._onClear(e)}_dispose(){this.autoDispose&&x(this._values,e=>{e.dispose()})}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},Ye=class extends si{constructor(e,t){super(),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"make",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.template=e,this.make=t}_dispose(){super._dispose(),this.autoDispose&&this.template.dispose()}};var Mi=class extends et{constructor(e){super(),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_events",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._container=e,this._events=this.events.onAll(t=>{if(t.type==="clear")x(t.oldValues,i=>{this._onRemoved(i)});else if(t.type==="push")this._onInserted(t.newValue);else if(t.type==="setIndex")this._onRemoved(t.oldValue),this._onInserted(t.newValue,t.index);else if(t.type==="insertIndex")this._onInserted(t.newValue,t.index);else if(t.type==="removeIndex")this._onRemoved(t.oldValue);else if(t.type==="moveIndex")this._onRemoved(t.value),this._onInserted(t.value,t.newIndex);else throw new Error("Unknown IListEvent type")})}_onInserted(e,t){e._setParent(this._container,!0);let i=this._container._childrenDisplay;t===void 0?i.addChild(e._display):i.addChildAt(e._display,t)}_onRemoved(e){this._container._childrenDisplay.removeChild(e._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),x(this.values,e=>{e.dispose()}))}};function je(a,e){a.get("reverseChildren",!1)?a.children.eachReverse(e):a.children.each(e)}var Te=class extends z{};Object.defineProperty(Te,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Layout"});Object.defineProperty(Te,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([Te.className])});var Ge=class extends Te{updateContainer(e){let t=e.get("paddingLeft",0),i=e.innerWidth(),r=0;je(e,n=>{if(n.isVisible()&&n.get("position")=="relative"){let o=n.get("width");if(o instanceof A){r+=o.value;let l=i*o.value,u=n.get("minWidth",n.getPrivate("minWidth",-1/0));u>l&&(i-=u,r-=o.value);let h=n.get("maxWidth",n.getPrivate("maxWidth",1/0));l>h&&(i-=h,r-=o.value)}else w(o)||(o=n.width()),i-=o+n.get("marginLeft",0)+n.get("marginRight",0)}}),(i<=0||i==1/0)&&(i=.1),je(e,n=>{if(n.isVisible()&&n.get("position")=="relative"){let o=n.get("width");if(o instanceof A){let l=i*o.value/r-n.get("marginLeft",0)-n.get("marginRight",0),u=n.get("minWidth",n.getPrivate("minWidth",-1/0)),h=n.get("maxWidth",n.getPrivate("maxWidth",1/0));l=Math.min(Math.max(u,l),h),n.setPrivate("width",l)}else n._prevSettings.width instanceof A&&n.setPrivate("width",void 0)}});let s=t;je(e,n=>{if(n.get("position")=="relative")if(n.isVisible()){let o=n.adjustedLocalBounds(),l=n.get("marginLeft",0),u=n.get("marginRight",0),h=n.get("maxWidth"),c=o.left,f=o.right;h&&f-c>h&&(f=c+h);let d=s+l-c;n.setPrivate("x",d),s=d+f+u}else n.setPrivate("x",void 0)})}};Object.defineProperty(Ge,"className",{enumerable:!0,configurable:!0,writable:!0,value:"HorizontalLayout"});Object.defineProperty(Ge,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Te.classNames.concat([Ge.className])});var Xe=class extends Te{updateContainer(e){let t=e.get("paddingTop",0),i=e.innerHeight(),r=0;je(e,n=>{if(n.isVisible()&&n.get("position")=="relative"){let o=n.get("height");if(o instanceof A){r+=o.value;let l=i*o.value,u=n.get("minHeight",n.getPrivate("minHeight",-1/0));u>l&&(i-=u,r-=o.value);let h=n.get("maxHeight",n.getPrivate("maxHeight",1/0));l>h&&(i-=h,r-=o.value)}else w(o)||(o=n.height()),i-=o+n.get("marginTop",0)+n.get("marginBottom",0)}}),(i<=0||i==1/0)&&(i=.1),je(e,n=>{if(n.isVisible()&&n.get("position")=="relative"){let o=n.get("height");if(o instanceof A){let l=i*o.value/r-n.get("marginTop",0)-n.get("marginBottom",0),u=n.get("minHeight",n.getPrivate("minHeight",-1/0)),h=n.get("maxHeight",n.getPrivate("maxHeight",1/0));l=Math.min(Math.max(u,l),h),n.setPrivate("height",l)}else n._prevSettings.height instanceof A&&n.setPrivate("height",void 0)}});let s=t;je(e,n=>{if(n.get("position")=="relative")if(n.isVisible()){let o=n.adjustedLocalBounds(),l=n.get("marginTop",0),u=o.top,h=o.bottom,c=n.get("maxHeight");c&&h-u>c&&(h=u+c);let f=n.get("marginBottom",0),d=s+l-u;n.setPrivate("y",d),s=d+h+f}else n.setPrivate("y",void 0)})}};Object.defineProperty(Xe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"VerticalLayout"});Object.defineProperty(Xe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Te.classNames.concat([Xe.className])});var Ee=class extends Te{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(e){let t=e.get("paddingLeft",0),i=e.get("paddingRight",0),r=e.get("paddingTop",0),s=e.maxWidth()-t-i,n=s,o=1;je(e,m=>{if(m.get("visible")&&m.getPrivate("visible")&&!m.get("forceHidden")&&m.get("position")!="absolute"){let b=m.width();b<n&&(n=b),b>o&&(o=b)}}),n=ee(n,1,s),o=ee(o,1,s);let l=1;this.get("fixedWidthGrid")?l=s/o:l=s/n,l=Math.max(1,Math.floor(l)),l=Math.min(this.get("maxColumns",Number.MAX_VALUE),l);let u=this.getColumnWidths(e,l,o,s),h=r,c=0,f=0;l=u.length;let d=t;je(e,m=>{if(m.get("position")=="relative"&&m.isVisible()){let b=m.get("marginTop",0),p=m.get("marginBottom",0),g=m.adjustedLocalBounds(),_=m.get("marginLeft",0),y=m.get("marginRight",0),v=d+_-g.left,T=h+b-g.top;m.setPrivate("x",v),m.setPrivate("y",T),d+=u[c]+y,f=Math.max(f,m.height()+b+p),c++,c>=l&&(c=0,d=t,h+=f,f=0)}})}getColumnWidths(e,t,i,r){let s=0,n=[],o=0;return je(e,l=>{let u=l.adjustedLocalBounds();l.get("position")!="absolute"&&l.isVisible()&&(this.get("fixedWidthGrid")?n[o]=i:n[o]=Math.max(n[o]|0,u.right-u.left+l.get("marginLeft",0)+l.get("marginRight",0)),o<e.children.length-1&&(o++,o==t&&(o=0)))}),x(n,l=>{s+=l}),s>r?t>2?(t-=1,this.getColumnWidths(e,t,i,r)):[r]:n}};Object.defineProperty(Ee,"className",{enumerable:!0,configurable:!0,writable:!0,value:"GridLayout"});Object.defineProperty(Ee,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Te.classNames.concat([Ee.className])});var oe=class{static escape(e){return e.replace(/\[\[/g,this.prefix+"1").replace(/([^\/\]]{1})\]\]/g,"$1"+this.prefix+"2").replace(/\]\]/g,this.prefix+"2").replace(/\{\{/g,this.prefix+"3").replace(/\}\}/g,this.prefix+"4").replace(/\'\'/g,this.prefix+"5")}static unescape(e){return e.replace(new RegExp(this.prefix+"1","g"),"[[").replace(new RegExp(this.prefix+"2","g"),"]]").replace(new RegExp(this.prefix+"3","g"),"{{").replace(new RegExp(this.prefix+"4","g"),"}}").replace(new RegExp(this.prefix+"5","g"),"''")}static cleanUp(e){return e.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(e,t=!1,i=!1){let r=[];e=this.escape(e);let s=t?e.split("'"):[e];for(let n=0;n<s.length;n++){let o=s[n];if(o!=="")if(n%2===0){o=o.replace(/\]\[/g,"]"+Se+"["),o=o.replace(/\[\]/g,"[ ]");let l=o.split(/[\[\]]+/);for(let u=0;u<l.length;u++){let h=this.cleanUp(this.unescape(l[u]));h!==Se&&h!==""&&(u%2===0?r.push({type:"value",text:h}):r.push({type:i?"value":"format",text:"["+h+"]"}))}}else{let l=o.split(/[\[\]]+/);for(let u=0;u<l.length;u++){let h=this.cleanUp(this.unescape(l[u]));h!==""&&(u%2===0?r.push({type:"text",text:h}):this.isImage(h)?r.push({type:"image",text:"["+h+"]"}):r.push({type:"format",text:"["+h+"]"}))}}}return r}static isImage(e){return!!e.match(/img[ ]?:/)}static getTextStyle(e){let t={};if(e==""||e=="[ ]")return{};let i=e.match(/('[^']*')|("[^"]*")/gi);if(i)for(let s=0;s<i.length;s++)e=e.replace(i[s],i[s].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));let r=e.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!r)return{};for(let s=0;s<r.length;s++)if(r[s].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))t.fontWeight=r[s];else if(r[s].match(/^(underline|line-through)$/i))t.textDecoration=r[s];else if(r[s]!="/")if(!r[s].match(/:/))t.fill=O.fromString(r[s]);else{let n=r[s].replace("+"," ").split(/:[ ]*/);t[n[0]]=n[1]}return t}};Object.defineProperty(oe,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:"__amcharts__"});function ct(a,e){if(e!=null){e=""+e,e=oe.escape(e);let t=e.match(/\{([^}]+)\}/g),i;if(t)for(i=0;i<t.length;i++){let r=t[i].replace(/\{([^}]+)\}/,"$1"),s=Or(a,r,"");s==null&&(s=""),e=e.split(t[i]).join(s)}e=oe.unescape(e)}else e="";return e}function Or(a,e,t){let i,r=a.dataItem,s=[],n=/(format[a-zA-Z]*)\((.*)\)|([^.]+)/g,o;for(;o=n.exec(e),o!==null;)if(o[3]){s.push({prop:o[3]});let l=a.getDateFormatter().get("dateFields",[]),u=a.getNumberFormatter().get("numericFields",[]),h=a.getDurationFormatter().get("durationFields",[]);l.indexOf(o[3])!==-1?s.push({method:"formatDate",params:[]}):u.indexOf(o[3])!==-1?s.push({method:"formatNumber",params:[]}):h.indexOf(o[3])!==-1&&s.push({method:"formatDuration",params:[]})}else{let l=[];if(lt(o[2])!=""){let u=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,h;for(;h=u.exec(o[2]),h!==null;)l.push(h[1]||h[2]||h[3])}s.push({method:o[1],params:l})}if(r){i=vt(a,s,r._settings),(i==null||Ke(i))&&(i=vt(a,s,r));let l=r.dataContext;i==null&&l&&(i=vt(a,s,l),i==null&&(i=vt(a,[{prop:e}],l)),i==null&&l.dataContext&&(i=vt(a,s,l.dataContext))),i==null&&r.component&&r.component.dataItem!==r&&(i=Or(r.component,e,t))}return i==null&&(i=vt(a,s,a)),i==null&&a.parent&&(i=Or(a.parent,e,t)),i}function Hn(a,e){let t=a.getPrivate("customData");if(Ke(t))return t[e]}function vt(a,e,t,i){let r=t,s=!1;for(let n=0,o=e.length;n<o;n++){let l=e[n];if(l.prop){if(r instanceof ue){let u=r.get(l.prop);u==null&&(u=r.getPrivate(l.prop)),u==null&&(u=Hn(r,l.prop)),u==null&&(u=r[l.prop]),r=u}else if(r.get){let u=r.get(l.prop);u==null&&(u=r[l.prop]),r=u}else r=r[l.prop];if(r==null)return}else switch(l.method){case"formatNumber":let u=le(r);u!=null&&(r=a.getNumberFormatter().format(u,i||l.params[0]||void 0),s=!0);break;case"formatDate":let h=gs(r);if(!yi(h)||_i(h.getTime()))return;h!=null&&(r=a.getDateFormatter().format(h,i||l.params[0]||void 0),s=!0);break;case"formatDuration":let c=le(r);c!=null&&(r=a.getDurationFormatter().format(c,i||l.params[0]||void 0,l.params[1]||void 0),s=!0);break;case"urlEncode":case"encodeURIComponent":r=encodeURIComponent(r);break;default:r[l.method]&&r[l.method].apply(t,l.params);break}}if(!s){let n=[{method:"",params:i}];if(i==null)w(r)?(n[0].method="formatNumber",n[0].params=""):yi(r)&&(n[0].method="formatDate",n[0].params="");else{let o=Ls(i);o==="number"?n[0].method="formatNumber":o==="date"?n[0].method="formatDate":o==="duration"&&(n[0].method="formatDuration")}n[0].method&&(r=vt(a,n,r))}return r}var R=class a extends ue{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeContainer()}),Object.defineProperty(this,"_childrenDisplay",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeContainer()}),Object.defineProperty(this,"children",{enumerable:!0,configurable:!0,writable:!0,value:new Mi(this)}),Object.defineProperty(this,"_percentageSizeChildren",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_percentagePositionChildren",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_prevWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_prevHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_vsbd0",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_vsbd1",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hsbd0",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hsbd1",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_childrenPrep",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_childrenUpdt",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_afterChanged(){super._afterChanged(),this._childrenPrep=!1,this._childrenUpdt=!1}_dispose(){nt(this.allChildren(),e=>{e.dispose()}),this.getPrivate("htmlElement")&&this._root._removeHTMLContent(this),super._dispose()}_beforeChanged(){this._childrenPrep||this._prepareChildren(),this._childrenUpdt||this._updateChildren(),super._beforeChanged()}_changed(){if(super._changed(),this.isDirty("interactiveChildren")&&(this._display.interactiveChildren=this.get("interactiveChildren",!1)),this.isDirty("layout")&&(this._prevWidth=0,this._prevHeight=0,this.markDirtyBounds(),this._prevSettings.layout&&this.children.each(e=>{e.removePrivate("x"),e.removePrivate("y")})),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&this.children.each(e=>{e.markDirtyPosition()}),this.isDirty("maskContent")){let e=this._childrenDisplay,t=this._contentMask;this.get("maskContent")?t||(t=Pe.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=t,e.addChildAt(t._display,0),e.mask=t._display):t&&(e.removeChild(t._display),e.mask=null,t.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),x(this._percentageSizeChildren,e=>{e._updateSize()}),x(this._percentagePositionChildren,e=>{e.markDirtyPosition(),e._updateSize()}),this.updateBackground()}updateBackground(){let e=this.get("background"),t=this._localBounds;if(t&&!this.isHidden()){let i=t.left,r=t.top,s=t.right-i,n=t.bottom-r,o=this.get("maxWidth"),l=this.get("maxHeight");l&&n>l&&(n=l),o&&s>o&&(s=o);let u=this.width(),h=this.height();e&&(e.setAll({width:s,height:n,x:i,y:r}),this._display.interactive&&(e._display.interactive=!0));let c=this._contentMask;c&&c.setAll({width:u+1,height:h+1});let f=this.get("verticalScrollbar");if(f){f.set("height",h),f.set("x",u-f.width()-f.get("marginRight",0)),f.set("end",f.get("start",0)+h/this._contentHeight);let d=f.get("background");d&&d.setAll({width:f.width(),height:h});let m=!0;this._contentHeight<=h&&(m=!1),f.setPrivate("visible",m)}}}_applyThemes(e=!1){return super._applyThemes(e)?(this.eachChildren(t=>{t._applyThemes(e)}),!0):!1}_applyState(e){super._applyState(e),this.get("setStateOnChildren")&&this.eachChildren(t=>{t.states.apply(e)})}_applyStateAnimated(e,t){super._applyStateAnimated(e,t),this.get("setStateOnChildren")&&this.eachChildren(i=>{i.states.applyAnimate(e,t)})}innerWidth(){return this.width()-this.get("paddingRight",0)-this.get("paddingLeft",0)}innerHeight(){return this.height()-this.get("paddingTop",0)-this.get("paddingBottom",0)}_getBounds(){if(this.get("html")){let e=this._localBounds;e&&(this._contentWidth=e.right-e.left,this._contentHeight=e.bottom-e.top)}else{let e=this.get("width"),t=this.get("height"),i=this.getPrivate("width"),r=this.getPrivate("height"),s={left:0,top:0,right:this.width(),bottom:this.height()},n=this.get("layout"),o=!1,l=!1;if((n instanceof Ge||n instanceof Ee)&&(o=!0),n instanceof Xe&&(l=!0),!((e!=null||i!=null)&&(t!=null||r!=null)&&!this.get("verticalScrollbar"))){let u=Number.MAX_VALUE,h=u,c=-u,f=u,d=-u,m=this.get("paddingLeft",0),b=this.get("paddingTop",0),p=this.get("paddingRight",0),g=this.get("paddingBottom",0);this.children.each(v=>{if(v.get("position")!="absolute"&&v.get("isMeasured")){let T=v.adjustedLocalBounds(),j=v.x(),D=v.y(),$=j+T.left,L=j+T.right,E=D+T.top,k=D+T.bottom;o&&($-=v.get("marginLeft",0),L+=v.get("marginRight",0)),l&&(E-=v.get("marginTop",0),k+=v.get("marginBottom",0)),$<h&&(h=$),L>c&&(c=L),E<f&&(f=E),k>d&&(d=k)}}),h==u&&(h=0),c==-u&&(c=0),f==u&&(f=0),d==-u&&(d=0),s.left=h-m,s.top=f-b,s.right=c+p,s.bottom=d+g;let _=this.get("minWidth");w(_)&&_>0&&s.right-s.left<_&&(s.right>=_?s.left=s.right-_:s.right=s.left+_);let y=this.get("minHeight");w(y)&&y>0&&s.bottom-s.top<y&&(s.bottom>=y?s.top=s.bottom-y:s.bottom=s.top+y)}this._contentWidth=s.right-s.left,this._contentHeight=s.bottom-s.top,w(e)&&(s.left=0,s.right=e),w(i)&&(s.left=0,s.right=i),w(t)&&(s.top=0,s.bottom=t),w(r)&&(s.top=0,s.bottom=r),this._localBounds=s}}_updateBounds(){let e=this.get("layout");e&&e.updateContainer(this),super._updateBounds(),this.updateBackground()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){this._childrenPrep=!0;let e=this.innerWidth(),t=this.innerHeight();if(e!=this._prevWidth||t!=this._prevHeight){let i=this.get("layout"),r=!1,s=!1;i&&((i instanceof Ge||i instanceof Ee)&&(r=!0),i instanceof Xe&&(s=!0)),x(this._percentageSizeChildren,n=>{if(!r){let o=n.get("width");o instanceof A&&n.setPrivate("width",o.value*e)}if(!s){let o=n.get("height");o instanceof A&&n.setPrivate("height",o.value*t)}}),x(this._percentagePositionChildren,n=>{n.markDirtyPosition(),n.markDirtyBounds()}),this._prevWidth=e,this._prevHeight=t,this._sizeDirty=!0,this.updateBackground()}}_updateHTMLContent(){let e=this.get("html","");e&&e!==""?this._root._setHTMLContent(this,ct(this,e)):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}scrollToChild(e){let t=this.get("verticalScrollbar");if(t){let i=e.y(),r=this.innerHeight(),s=e.height(),n=this._contentHeight,o=1-(r-s/2)/n;if(i+s*.7+this._childrenDisplay.y>r||i-s*.3+this._childrenDisplay.y<0){let l=Math.max(0,Math.min(o,(i-s/2)/n));t.animate({key:"start",to:l,duration:t.get("animationDuration",0),easing:t.get("animationEasing")})}}}_updateChildren(){if(this._childrenUpdt=!0,this.isDirty("html")&&this._updateHTMLContent(),this.isDirty("verticalScrollbar")){let e=this.get("verticalScrollbar");if(e){e._setParent(this),e.startGrip.setPrivate("visible",!1),e.endGrip.setPrivate("visible",!1),this.set("maskContent",!0),this.set("paddingRight",e.width()+e.get("marginRight",0)+e.get("marginLeft",0));let t=this.get("background");t||(t=this.set("background",Pe.new(this._root,{themeTags:["background"],fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")}))),this._vsbd0=this.events.on("wheel",i=>{let r=i.originalEvent;if(ki(r,this))r.preventDefault();else return;let s=r.deltaY/5e3,n=e.get("start",0),o=e.get("end",1);n+s<=0&&(s=-n),o+s>=1&&(s=1-o),n+s>=0&&o+s<=1&&(e.set("start",n+s),e.set("end",o+s))}),this._disposers.push(this._vsbd0),this._vsbd1=e.events.on("rangechanged",()=>{let i=this._contentHeight,r=this._childrenDisplay,s=this._contentMask;r.y=-e.get("start",0)*i,r.markDirtyLayer(),s&&(s._display.y=-r.y,r.mask=s._display)}),this._disposers.push(this._vsbd1),this._display.addChild(e._display)}else{let t=this._prevSettings.verticalScrollbar;if(t){this._display.removeChild(t._display),this._vsbd0&&this._vsbd0.dispose(),this._vsbd1&&this._vsbd1.dispose();let i=this._childrenDisplay;i.y=0,this.setPrivate("height",void 0),this.set("maskContent",!1),this.set("paddingRight",void 0)}}}if(this.isDirty("background")){let e=this._prevSettings.background;e&&this._display.removeChild(e._display);let t=this.get("background");t instanceof ue&&(t.set("isMeasured",!1),t._setParent(this),this._display.addChildAt(t._display,0))}if(this.isDirty("mask")){let e=this.get("mask"),t=this._prevSettings.mask;if(t&&(this._display.removeChild(t._display),t!=e&&t.dispose()),e){let i=e.parent;i&&i.children.removeValue(e),e._setParent(this),this._display.addChildAt(e._display,0),this._childrenDisplay.mask=e._display}}}_processTemplateField(){super._processTemplateField(),this.children.each(e=>{e._processTemplateField()})}walkChildren(e){this.children.each((t,i)=>{t instanceof a&&t.walkChildren(e),e(t,i)})}eachChildren(e){let t=this.get("background");t&&e(t);let i=this.get("verticalScrollbar");i&&e(i);let r=this.get("mask");r&&e(r),this.children.values.forEach(s=>{e(s)})}allChildren(){let e=[];return this.eachChildren(t=>{e.push(t)}),e}_setDataItem(e){let t=e!==this._dataItem;super._setDataItem(e);let i=this.get("html","");i&&i!==""&&t&&this._root._setHTMLContent(this,ct(this,i))}contentWidth(){return this._contentWidth}contentHeight(){return this._contentHeight}};Object.defineProperty(R,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Container"});Object.defineProperty(R,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([R.className])});var Me=class extends ue{constructor(){super(...arguments),Object.defineProperty(this,"textStyle",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeTextStyle()}),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeText("",this.textStyle)}),Object.defineProperty(this,"_textStyles",{enumerable:!0,configurable:!0,writable:!0,value:["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","maxChars"]}),Object.defineProperty(this,"_originalScale",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_updateBounds(){if(this.get("text")){super._updateBounds();let e=this.get("fillGradient");e&&(this._display.style.fill=e.getFill(this))}else{let e={left:0,right:0,top:0,bottom:0};this._adjustedLocalBounds=e}}_changed(){super._changed(),this._display.clear();let e=this.textStyle;if(this.isDirty("opacity")){let t=this.get("opacity",1);this._display.alpha=t}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),this.get("role")=="tooltip"&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")&&this.getPrivate("tooltipElement")&&this._disposers.push(new U(()=>{this._root._removeTooltipElement(this)})),this.isDirty("width")&&(e.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(e.oversizedBehavior=this.get("oversizedBehavior","none"),this._display.invalidateVisibility(),this.markDirtyBounds()),this.isDirty("breakWords")&&(e.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(e.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(e.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(e.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")||this.isDirty("fillGradient")){let t=this.get("fill"),i=this.get("fillGradient"),r=this.get("fillOpacity");if(i){if(t){let s=i.get("stops",[]);s.length&&x(s,n=>{(!n.color||n.colorInherited)&&t&&(n.color=t,n.colorInherited=!0),(n.opacity==null||n.opacityInherited)&&(n.opacity=r,n.opacityInherited=!0)})}e.fill=i.getFill(this)}else t&&(e.fill=t)}if(this.isDirty("fillOpacity")){let t=this.get("fillOpacity",1);t&&(e.fillOpacity=t)}(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(e.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(e.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),x(this._textStyles,t=>{this._dirty[t]&&(e[t]=this.get(t),this.markDirtyBounds())}),e.fontSize=this.get("fontSize"),e.fontFamily=this.get("fontFamily"),this._display.style=e,this.isDirty("role")&&this.get("role")=="tooltip"&&this._root.updateTooltip(this)}_getText(){let e=this.get("text","");return this.get("maxChars")&&(e=Rs(e,this.get("maxChars",1e8),this.get("breakWords"),this.get("ellipsis"))),this.get("populateText")?ct(this,e):e}_getAccessibleText(){let e=this.get("ariaLabel");return e!==void 0?this.get("populateText")?ct(this,e):e:this._getText()}markDirtyText(){this._display.text=this._getText(),this.get("role")=="tooltip"&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(e){super._setDataItem(e),this.get("populateText")&&this.markDirtyText()}getNumberFormatter(){return this.parent?this.parent.getNumberFormatter():super.getNumberFormatter()}getDateFormatter(){return this.parent?this.parent.getDateFormatter():super.getDateFormatter()}getDurationFormatter(){return this.parent?this.parent.getDurationFormatter():super.getDurationFormatter()}};Object.defineProperty(Me,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Text"});Object.defineProperty(Me,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:ue.classNames.concat([Me.className])});var J=class extends R{constructor(){super(...arguments),Object.defineProperty(this,"_text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_textKeys",{enumerable:!0,configurable:!0,writable:!0,value:["text","fill","fillGradient","fillOpacity","textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","populateText","role","ignoreFormatting","maxChars","ariaLabel"]})}get text(){return this._text}_afterNew(){super._afterNew(),this._makeText(),x(this._textKeys,e=>{let t=this.get(e);t!=null&&this._text.set(e,t)}),this.get("html","")!==""&&this._text.set("text",""),this.onPrivate("maxWidth",()=>{this._setMaxDimentions()}),this.onPrivate("maxHeight",()=>{this._setMaxDimentions()})}_makeText(){this._text=this.children.push(Me.new(this._root,{}))}_updateChildren(){super._updateChildren();let e=this._text;if(x(this._textKeys,i=>{this._text.set(i,this.get(i))}),(this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("rotation"))&&this._setMaxDimentions(),this.get("html","")!==""?e.set("text",""):(e.set("text",this.get("text")),this._maybeUpdateHTMLColor()),(this.isDirty("fill")||this.isDirty("fillGradient"))&&this._maybeUpdateHTMLColor(),this.isDirty("textAlign")||this.isDirty("width")){let i=this.get("textAlign"),r;this.get("width")!=null?i=="right"?r=M:i=="center"?r=I:r=0:i=="left"||i=="start"?r=this.get("paddingLeft",0):(i=="right"||i=="end")&&(r=-this.get("paddingRight",0)),e.set("x",r)}let t=this.get("background");t&&t.setPrivate("visible",e._display.textVisible)}_maybeUpdateHTMLColor(){let e=this.getPrivate("htmlElement");e&&this.get("fill")&&(e.style.color=this.get("fill").toCSSHex())}_setMaxDimentions(){let e=this.get("rotation"),t=e==90||e==270||e==-90,i=this._text,r=this.get("maxWidth",this.getPrivate("maxWidth",1/0));w(r)?i.set(t?"maxHeight":"maxWidth",r-this.get("paddingTop",0)-this.get("paddingBottom",0)):i.set(t?"maxHeight":"maxWidth",void 0);let s=this.get("maxHeight",this.getPrivate("maxHeight",1/0));w(s)?i.set(t?"maxWidth":"maxHeight",s-this.get("paddingLeft",0)-this.get("paddingRight",0)):i.set(t?"maxWidth":"maxHeight",void 0),this.root.events.once("frameended",()=>{i.markDirtyBounds()})}_setDataItem(e){super._setDataItem(e),this._markDirtyKey("text"),this._markDirtyKey("html");let t=this._text;t.get("populateText")&&t.markDirtyText();let i=this.get("html");i&&i!==""&&this._updateHTMLContent()}getText(){return this._text._getText()}getAccessibleText(){return this._text._getAccessibleText()}};Object.defineProperty(J,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Label"});Object.defineProperty(J,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([J.className])});var tt=class extends Z{_beforeChanged(){super._beforeChanged(),(this.isDirty("pointerBaseWidth")||this.isDirty("cornerRadius")||this.isDirty("pointerLength")||this.isDirty("pointerX")||this.isDirty("pointerY")||this.isDirty("width")||this.isDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let e=this.width(),t=this.height();if(e>0&&t>0){let i=this.get("cornerRadius",8);i=ee(i,0,Math.min(e/2,t/2));let r=this.get("pointerX",0),s=this.get("pointerY",0),n=this.get("pointerBaseWidth",15)/2,o=0,l=0,u=e,h=0,c=e,f=t,d=0,m=t,b=(r-o)*(f-l)-(s-l)*(c-o),p=(r-d)*(h-m)-(s-m)*(u-d),g=this._display;if(g.moveTo(i,0),b>0&&p>0){let _=Math.round(ee(r,i+n,e-n-i));s=ee(s,-1/0,0),g.lineTo(_-n,0),g.lineTo(r,s),g.lineTo(_+n,0)}if(g.lineTo(e-i,0),g.arcTo(e,0,e,i,i),b>0&&p<0){let _=Math.round(ee(s,i+n,t-n-i));r=ee(r,e,1/0),g.lineTo(e,i),g.lineTo(e,Math.max(_-n,i)),g.lineTo(r,s),g.lineTo(e,_+n)}if(g.lineTo(e,t-i),g.arcTo(e,t,e-i,t,i),b<0&&p<0){let _=Math.round(ee(r,i+n,e-n-i));s=ee(s,t,1/0),g.lineTo(e-i,t),g.lineTo(_+n,t),g.lineTo(r,s),g.lineTo(_-n,t)}if(g.lineTo(i,t),g.arcTo(0,t,0,t-i,i),b<0&&p>0){let _=Math.round(ee(s,i+n,t-i-n));r=ee(r,-1/0,0),g.lineTo(0,t-i),g.lineTo(0,_+n),g.lineTo(r,s),g.lineTo(0,Math.max(_-n,i))}g.lineTo(0,i),g.arcTo(0,0,i,0,i),g.closePath()}}}};Object.defineProperty(tt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"PointedRectangle"});Object.defineProperty(tt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Z.classNames.concat([tt.className])});var He=class extends R{constructor(e,t,i,r=[]){super(e,t,i,r),Object.defineProperty(this,"_fx",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_fy",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_label",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fillDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fillGrDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_labelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_w",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_h",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_keepHoverDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_htmlContentHovered",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){this._settings.themeTags=Q(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultFn("background",()=>tt.new(this._root,{})).set("themeTags",["tooltip","background"]),this._label=this.children.push(J.new(this._root,{})),this._disposers.push(this._label.events.on("boundschanged",()=>{this._updateBackground()})),this._disposers.push(this.on("bounds",()=>{this._updateBackground()})),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate("htmlElement",t=>{t&&(this._disposers.push(V(t,"pointerover",i=>{this._htmlContentHovered=!0})),this._disposers.push(V(t,"pointerout",i=>{this._htmlContentHovered=!1})))})),this.on("visible",t=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",t=>{this._handleReaderAnnouncement()}),this._root._tooltips.push(this)}_handleReaderAnnouncement(){this.get("readerAnnounce")&&this.isVisibleDeep()&&this._root.readerAlert(this.label.getAccessibleText())}get label(){return this._label}_dispose(){super._dispose(),ye(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width"),this.get("labelText")!=null&&this.label.set("text",this.get("labelText")),this.get("labelHTML")!=null&&this.label.set("html",this.get("labelHTML")),this.get("labelAriaLabel")!=null&&this.label.set("ariaLabel",this.get("labelAriaLabel"))}_changed(){if(super._changed(),(this.isDirty("pointTo")||this.isDirty("pointerOrientation"))&&this._updateBackground(),this.isDirty("tooltipTarget")&&this.updateBackgroundColor(),this.isDirty("keepTargetHover"))if(this.get("keepTargetHover")){let t=this.get("background");this._keepHoverDp=new se([t.events.on("pointerover",i=>{let r=this.get("tooltipTarget");r&&(r.parent&&r.parent.getPrivate("tooltipTarget")==r&&(r=r.parent),r.hover())}),t.events.on("pointerout",i=>{let r=this.get("tooltipTarget");r&&(r.parent&&r.parent.getPrivate("tooltipTarget")==r&&(r=r.parent),this._htmlContentHovered||r.unhover())})]),this.label.onPrivate("htmlElement",i=>{this._keepHoverDp&&i&&this._keepHoverDp.disposers.push(V(i,"pointerleave",r=>{let s=this.root._renderer.getEvent(r);t.events.dispatch("pointerout",{type:"pointerout",originalEvent:s.event,point:s.point,simulated:!1,target:t})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let e=this.get("tooltipTarget"),t=this.get("background"),i,r;if(e&&t){if(i=e.get("fill"),r=e.get("stroke"),i==null&&(i=r),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),i!=null&&t.set("fill",i),this._fillDp=e.on("fill",s=>{s!=null&&(t.set("fill",s),this._updateTextColor(s))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let s=e.get("fillGradient");s!=null&&t.set("fillGradient",s),this._fillGrDp=e.on("fillGradient",n=>{n!=null&&t.set("fillGradient",n)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),i!=null&&t.set("stroke",i),this._strokeDp=e.on("fill",s=>{s!=null&&t.set("stroke",s)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),i!=null&&this.label.set("fill",i),this._labelDp=e.on("fill",s=>{s!=null&&this.label.set("fill",s)}),this._disposers.push(this._labelDp))}this._updateTextColor(i)}_updateTextColor(e){this.get("autoTextColor")&&(e==null&&(e=this.get("background").get("fill")),e==null&&(e=this._root.interfaceColors.get("background")),e instanceof O&&this.label.set("fill",O.alternative(e,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(e){super._setDataItem(e),this.label._setDataItem(e)}_updateBackground(){super.updateBackground();let e=this._root.container;if(e){let t=.5,i=.5,r=this.get("centerX");r instanceof A&&(t=r.value);let s=this.get("centerY");s instanceof A&&(i=s.value);let n=e.width(),o=e.height(),l=this.parent,u=0,h=0;if(l){u=l.x(),h=l.y();let k=l.get("layerMargin");k&&(u+=k.left||0,h+=k.top||0,n+=(k.left||0)+(k.right||0),o+=(k.top||0)+(k.bottom||0))}let c=this.get("bounds",{left:-u,top:-h,right:n-u,bottom:o-h});this._updateBounds();let f=this.width(),d=this.height();f===0&&(f=this._w),d===0&&(d=this._h);let m=this.get("pointTo",{x:n/2,y:o/2}),b=m.x,p=m.y,g=this.get("pointerOrientation"),_=this.get("background"),y=0,v=0,T=0;_ instanceof tt&&(y=_.get("pointerLength",0),v=_.get("strokeWidth",0)/2,T=v,_.set("width",f),_.set("height",d));let j=0,D=0,$=c.right-c.left,L=c.bottom-c.top;g=="horizontal"||g=="left"||g=="right"?(v=0,g=="horizontal"?b>c.left+$/2?(b-=f*(1-t)+y,T*=-1):b+=f*t+y:g=="left"?b+=f*(1-t)+y:(b-=f*t+y,T*=-1)):(T=0,g=="vertical"?p>c.top+d/2+y?p-=d*(1-i)+y:(p+=d*i+y,v*=-1):g=="down"?p-=d*(1-i)+y:(p+=d*i+y,v*=-1)),b=ee(b,c.left+f*t,c.left+$-f*(1-t))+T,p=ee(p,c.top+d*i,c.top+L-d*(1-i))-v,j=m.x-b+f*t+T,D=m.y-p+d*i-v,this._fx=b,this._fy=p;let E=this.get("animationDuration",0);if(E>0&&this.get("visible")&&this.get("opacity")>.1){let k=this.get("animationEasing");this.animate({key:"x",to:b,duration:E,easing:k}),this.animate({key:"y",to:p,duration:E,easing:k})}else this.set("x",b),this.set("y",p);_ instanceof tt&&(_.set("pointerX",j),_.set("pointerY",D)),f>0&&(this._w=f),d>0&&(this._h=d)}}};Object.defineProperty(He,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tooltip"});Object.defineProperty(He,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([He.className])});var ni=class extends z{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);let e="_big_number_suffix_",t="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(e+"3")},{number:1e6,suffix:this._t(e+"6")},{number:1e9,suffix:this._t(e+"9")},{number:1e12,suffix:this._t(e+"12")},{number:1e15,suffix:this._t(e+"15")},{number:1e18,suffix:this._t(e+"18")},{number:1e21,suffix:this._t(e+"21")},{number:1e24,suffix:this._t(e+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(t+"24")},{number:1e-21,suffix:this._t(t+"21")},{number:1e-18,suffix:this._t(t+"18")},{number:1e-15,suffix:this._t(t+"15")},{number:1e-12,suffix:this._t(t+"12")},{number:1e-9,suffix:this._t(t+"9")},{number:1e-6,suffix:this._t(t+"6")},{number:.001,suffix:this._t(t+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(i+"B")},{number:1024,suffix:this._t(i+"KB")},{number:1048576,suffix:this._t(i+"MB")},{number:1073741824,suffix:this._t(i+"GB")},{number:1099511627776,suffix:this._t(i+"TB")},{number:0x4000000000000,suffix:this._t(i+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){(t==null||Re(t)&&t.toLowerCase()==="number")&&(t=this.get("numberFormat",""));let r,s=Number(e);if(Ke(t))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),t).format(s):new Intl.NumberFormat(void 0,t).format(s)}catch{return"Invalid"}else{t=jt(t);let n=this.parseFormat(t,this._root.language),o;s>this.get("negativeBase")?o=n.positive:s<this.get("negativeBase")?o=n.negative:o=n.zero,i!=null&&!o.mod&&(o=Ts(o),o.decimals.active=s==0?0:i),r=o.template.split(Se).join(this.applyFormat(s,o))}return this.get("forceLTR")===!0&&(r="\u200E"+r),r}parseFormat(e,t){let i=t.translateEmpty("_thousandSeparator"),r=t.translateEmpty("_decimalSeparator"),s={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:r},template:"",source:"",parsed:!1}};e=e.replace("||",st);let n=e.split("|");return s.positive.source=n[0],typeof n[2]>"u"?s.zero=s.positive:s.zero.source=n[2],typeof n[1]>"u"?s.negative=s.positive:s.negative.source=n[1],N(s,(o,l)=>{if(l.parsed)return;let u=l.source;u.toLowerCase()==="number"&&(u=this.get("numberFormat","#,###.#####"));let h=oe.chunk(u,!0);for(let c=0;c<h.length;c++){let f=h[c];if(f.text=f.text.replace(st,"|"),f.type==="value"){let d=f.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(d)if(d===null||d[0]==="")l.template+=f.text;else{let m=d[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);m&&(l.mod=m[0].toLowerCase(),l.modSpacing=!!d[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));let b=d[0].split(".");if(b[0]!==""){l.thousands.active=(b[0].match(/0/g)||[]).length,l.thousands.passive=(b[0].match(/\#/g)||[]).length+l.thousands.active;let p=b[0].split(",");p.length===1||(l.thousands.interval=(p.pop()||"").length,l.thousands.interval===0&&(l.thousands.interval=-1))}typeof b[1]>"u"||(l.decimals.active=(b[1].match(/0/g)||[]).length,l.decimals.passive=(b[1].match(/\#/g)||[]).length+l.decimals.active),l.template+=f.text.split(d[0]).join(Se)}}else l.template+=f.text}l.parsed=!0}),s}applyFormat(e,t){let i=e<0;e=Math.abs(e);let r="",s="",n=t.mod?t.mod.split(""):[];if(n.indexOf("b")!==-1){let c=this.applyPrefix(e,this.get("bytePrefixes"),n.indexOf("!")!==-1);e=c[0],r=c[1],s=c[2],t.modSpacing&&(s=" "+s)}else if(n.indexOf("a")!==-1){let c=this.applyPrefix(e,e<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),n.indexOf("!")!==-1);e=c[0],r=c[1],s=c[2],t.modSpacing&&(s=" "+s)}else if(n.indexOf("p")!==-1){let c=Math.min(e.toString().length+2,21);e=parseFloat(e.toPrecision(c)),r=this._root.language.translate("_percentPrefix"),s=this._root.language.translate("_percentSuffix"),r==""&&s==""&&(s="%")}else if(n.indexOf("%")!==-1){let c=Math.min(e.toString().length+2,21);e*=100,e=parseFloat(e.toPrecision(c)),s="%"}else if(n.indexOf("\u2030")!==-1){let c=Math.min(e.toString().length+3,21);e*=1e3,e=parseFloat(e.toPrecision(c)),s="\u2030"}if(n.indexOf("e")!==-1){let c;t.decimals.passive>=0?c=e.toExponential(t.decimals.passive).split("e"):c=e.toExponential().split("e"),e=Number(c[0]),s="e"+c[1],t.modSpacing&&(s=" "+s)}else if(t.decimals.passive===0)e=Math.round(e);else if(t.decimals.passive>0){let c=Bs(e);if(c>0){let f=Math.pow(10,t.decimals.passive);e=Math.round(parseFloat((e*f).toFixed(c)))/f}}let o="",l=bs(e).split("."),u=l[0];if(u.length<t.thousands.active&&(u=Array(t.thousands.active-u.length+1).join("0")+u),t.thousands.interval>0){let c=[],f=u.split("").reverse().join("");for(let d=0,m=u.length;d<=m;d+=t.thousands.interval){let b=f.substr(d,t.thousands.interval).split("").reverse().join("");b!==""&&c.unshift(b)}u=c.join(t.thousands.separator)}o+=u,l.length===1&&l.push("");let h=l[1];return h.length<t.decimals.active&&(h+=Array(t.decimals.active-h.length+1).join("0")),h!==""&&(o+=t.decimals.separator+h),o===""&&(o="0"),e!==0&&i&&n.indexOf("s")===-1&&(o="-"+o),r&&(o=r+o),s&&(o+=s),o}applyPrefix(e,t,i=!1){let r=e,s="",n="",o=!1,l=1;for(let u=0,h=t.length;u<h;u++)t[u].number<=e&&(t[u].number===0?r=0:(r=e/t[u].number,l=t[u].number),s=t[u].prefix,n=t[u].suffix,o=!0);return!o&&i&&t.length&&e!=0&&(r=e/t[0].number,s=t[0].prefix,n=t[0].suffix,o=!0),o&&(r=parseFloat(r.toPrecision(Math.min(l.toString().length+Math.floor(r).toString().replace(/[^0-9]*/g,"").length,21)))),[r,s,n]}escape(e){return e.replace("||",st)}unescape(e){return e.replace(st,"|")}};function Js(a,e){let t=0,i=0,r=1,s=0,n=0,o=0,l=0,u=0;return a.formatToParts(e).forEach(h=>{switch(h.type){case"year":t=+h.value;break;case"month":i=+h.value-1;break;case"day":r=+h.value;break;case"hour":s=+h.value;break;case"minute":n=+h.value;break;case"second":o=+h.value;break;case"fractionalSecond":l=+h.value;break;case"weekday":switch(h.value){case"Sun":u=0;break;case"Mon":u=1;break;case"Tue":u=2;break;case"Wed":u=3;break;case"Thu":u=4;break;case"Fri":u=5;break;case"Sat":u=6;break}}}),s===24&&(s=0),{year:t,month:i,day:r,hour:s,minute:n,second:o,millisecond:l,weekday:u}}function qs(a,e){let{year:t,month:i,day:r,hour:s,minute:n,second:o,millisecond:l}=Js(a,e);return Date.UTC(t,i,r,s,n,o,l)}var ai=class{constructor(e,t){if(Object.defineProperty(this,"_utc",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dtf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=e,this._utc=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3}),this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(e){return new this(e,!0)}convertLocal(e){let t=this.offsetUTC(e),i=e.getTimezoneOffset(),r=new Date(e);r.setUTCMinutes(r.getUTCMinutes()-(t-i));let s=r.getTimezoneOffset();return i!=s&&r.setUTCMinutes(r.getUTCMinutes()+s-i),r}offsetUTC(e){let t=qs(this._utc,e),i=qs(this._dtf,e);return(t-i)/6e4}parseDate(e){return Js(this._dtf,e)}};var oi=class extends z{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i=!1){(typeof t>"u"||t==="")&&(t=this.get("dateFormat","yyyy-MM-dd"));let r,s=e;if(Ke(t))try{let u=this.get("intlLocales");return u?new Intl.DateTimeFormat(u,t).format(s):new Intl.DateTimeFormat(void 0,t).format(s)}catch{return"Invalid"}let n=this.parseFormat(t),o=this._root.timezone,l=s;return o&&!this._root.utc&&!i&&(s=o.convertLocal(s)),w(s.getTime())?(r=this.applyFormat(s,n,i,l),this.get("capitalize")&&(r=r.replace(/^.{1}/,r.substr(0,1).toUpperCase())),r):"Invalid date"}applyFormat(e,t,i=!1,r){let s=t.template,n,o,l,u,h,c,f,d,m=e.getTime();this._root.utc&&!i?(n=e.getUTCFullYear(),o=e.getUTCMonth(),l=e.getUTCDay(),u=e.getUTCDate(),h=e.getUTCHours(),c=e.getUTCMinutes(),f=e.getUTCSeconds(),d=e.getUTCMilliseconds()):(n=e.getFullYear(),o=e.getMonth(),l=e.getDay(),u=e.getDate(),h=e.getHours(),c=e.getMinutes(),f=e.getSeconds(),d=e.getMilliseconds());for(let b=0,p=t.parts.length;b<p;b++){let g="";switch(t.parts[b]){case"G":g=this._t(n<0?"_era_bc":"_era_ad");break;case"yyyy":g=Math.abs(n).toString(),n<0&&(g+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":g=Math.abs(n).toString().substr(-t.parts[b].length),n<0&&(g+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let _=Ns(e,this._root.utc);t.parts[b]=="YYYY"?g=Math.abs(_).toString():g=Math.abs(_).toString().substr(-t.parts[b].length),_<0&&(g+=this._t("_era_bc"));break;case"u":break;case"q":g=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":g=this._t(this._getMonth(o)).substr(0,1);break;case"MMMM":g=this._t(this._getMonth(o));break;case"MMM":g=this._t(this._getShortMonth(o));break;case"MM":g=K(o+1,2,"0");break;case"M":g=(o+1).toString();break;case"ww":g=K(_t(e,this._root.utc),2,"0");break;case"w":g=_t(e,this._root.utc).toString();break;case"W":g=Hs(e,this._root.utc).toString();break;case"dd":g=K(u,2,"0");break;case"d":g=u.toString();break;case"DD":case"DDD":g=K(dr(e,this._root.utc).toString(),t.parts[b].length,"0");break;case"D":g=dr(e,this._root.utc).toString();break;case"F":break;case"g":break;case"t":g=this._root.language.translateFunc("_dateOrd").call(this,u);break;case"E":g=(l||7).toString();break;case"EE":g=K((l||7).toString(),2,"0");break;case"EEE":case"eee":g=this._t(this._getShortWeekday(l));break;case"EEEE":case"eeee":g=this._t(this._getWeekday(l));break;case"EEEEE":case"eeeee":g=this._t(this._getShortWeekday(l)).substr(0,1);break;case"e":case"ee":g=(l-(this._root.locale.firstDayOfWeek||1)+1).toString(),t.parts[b]=="ee"&&(g=K(g,2,"0"));break;case"a":h>=12?g=this._t("PM"):g=this._t("AM");break;case"aa":h>=12?g=this._t("P.M."):g=this._t("A.M.");break;case"aaa":h>=12?g=this._t("P"):g=this._t("A");break;case"h":g=ei(h).toString();break;case"hh":g=K(ei(h),2,"0");break;case"H":g=h.toString();break;case"HH":g=K(h,2,"0");break;case"K":g=ei(h,0).toString();break;case"KK":g=K(ei(h,0),2,"0");break;case"k":g=(h+1).toString();break;case"kk":g=K(h+1,2,"0");break;case"m":g=c.toString();break;case"mm":g=K(c,2,"0");break;case"s":g=f.toString();break;case"ss":g=K(f,2,"0");break;case"S":case"SS":case"SSS":g=Math.round(d/1e3*Math.pow(10,t.parts[b].length)).toString();break;case"x":g=m.toString();break;case"n":case"nn":case"nnn":g=K(d,t.parts[b].length,"0");break;case"z":g=ti(r||e,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":g=ti(r||e,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":g=ti(r||e,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zzzz":g=ti(r||e,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"Z":case"ZZ":let y=this._root.utc?"UTC":this._root.timezone;y instanceof ai&&(y=y.name);let v=y?zs(y,r||e):e.getTimezoneOffset(),T=Math.abs(v)/60,j=Math.floor(T),D=T*60-j*60;this._root.utc&&(j=0,D=0),t.parts[b]=="Z"?(g="GMT",g+=v>0?"-":"+",g+=K(j,2)+":"+K(D,2)):(g=v>0?"-":"+",g+=K(j,2)+K(D,2));break;case"i":g=e.toISOString();break;case"I":g=e.toUTCString();break}s=s.replace(Se,g)}return s}parseFormat(e){let t={template:"",parts:[]},i=oe.chunk(e,!0);for(let r=0;r<i.length;r++){let s=i[r];if(s.type==="value"){if(s.text.match(/^date$/i)){let o=this.get("dateFormat","yyyy-MM-dd");Re(o)||(o="yyyy-MM-dd"),s.text=o}let n=s.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);if(n)for(let o=0;o<n.length;o++)t.parts.push(n[o]),s.text=s.text.replace(n[o],Se)}t.template+=s.text}return t}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(e){return this._months()[e]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(e){return this._shortMonths()[e]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(e){return this._weekdays()[e]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(e){return this._shortWeekdays()[e]}parse(e,t,i){if(typeof i>"u"&&(i=this._root.utc),e instanceof Date)return e;if(w(e))return new Date(e);if(t=="x")return new Date(parseInt(e));Re(e)||(e=e.toString());let r,s="";t=jt(t),t=t.substr(0,e.length);let n=this.parseFormat(t),o={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:i},u=0,h=0;for(let d=0;d<n.parts.length;d++){switch(h=d+u+1,n.parts[d]){case"yyyy":case"YYYY":s+="([0-9]{4})",o.year=h;break;case"yyy":case"YYY":s+="([0-9]{3})",o.year3=h;break;case"yy":case"YY":s+="([0-9]{2})",o.year2=h;break;case"y":case"Y":s+="([0-9]{1})",o.year1=h;break;case"MMMM":s+="("+this.getStringList(this._months()).join("|")+")",o.monthLong=h;break;case"MMM":s+="("+this.getStringList(this._shortMonths()).join("|")+")",o.monthShort=h;break;case"MM":case"M":s+="([0-9]{2}|[0-9]{1})",o.month=h;break;case"ww":case"w":s+="([0-9]{2}|[0-9]{1})",o.week=h;break;case"dd":case"d":s+="([0-9]{2}|[0-9]{1})",o.day=h;break;case"DDD":case"DD":case"D":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=h;break;case"dddd":s+="("+this.getStringList(this._weekdays()).join("|")+")",o.weekdayLong=h;break;case"ddd":s+="("+this.getStringList(this._shortWeekdays()).join("|")+")",o.weekdayShort=h;break;case"aaa":case"aa":case"a":s+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=h;break;case"hh":case"h":s+="([0-9]{2}|[0-9]{1})",o.hour12Base1=h;break;case"HH":case"H":s+="([0-9]{2}|[0-9]{1})",o.hourBase0=h;break;case"KK":case"K":s+="([0-9]{2}|[0-9]{1})",o.hour12Base0=h;break;case"kk":case"k":s+="([0-9]{2}|[0-9]{1})",o.hourBase1=h;break;case"mm":case"m":s+="([0-9]{2}|[0-9]{1})",o.minute=h;break;case"ss":case"s":s+="([0-9]{2}|[0-9]{1})",o.second=h;break;case"SSS":case"SS":case"S":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=h,o.millisecondDigits=n.parts[d].length;break;case"nnn":case"nn":case"n":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=h;break;case"x":s+="([0-9]{1,})",o.timestamp=h;break;case"Z":s+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=h;break;case"ZZ":s+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=h;break;case"i":s+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)",o.iso=h,u+=7;break;case"G":case"YYYY":case"YYY":case"YY":case"Y":case"MMMMM":case"W":case"EEEEE":case"EEEE":case"EEE":case"EE":case"E":case"eeeee":case"eeee":case"eee":case"ee":case"e":case"zzzz":case"zzz":case"zz":case"z":case"t":u--;break}s+="[^0-9]*"}let c=new RegExp(s),f=e.match(c);if(f){if(o.year>-1&&(l.year=parseInt(f[o.year])),o.year3>-1){let d=parseInt(f[o.year3]);d+=1e3,l.year=d}if(o.year2>-1){let d=parseInt(f[o.year2]);d>50?d+=1e3:d+=2e3,l.year=d}if(o.year1>-1){let d=parseInt(f[o.year1]);d=Math.floor(new Date().getFullYear()/10)*10+d,l.year=d}if(o.monthLong>-1&&(l.month=this.resolveMonth(f[o.monthLong])),o.monthShort>-1&&(l.month=this.resolveShortMonth(f[o.monthShort])),o.month>-1&&(l.month=parseInt(f[o.month])-1),o.week>-1&&o.day===-1&&(l.month=0,l.day=Fs(parseInt(f[o.week]),l.year,1,i)),o.day>-1&&(l.day=parseInt(f[o.day])),o.yearDay>-1&&(l.month=0,l.day=parseInt(f[o.yearDay])),o.hourBase0>-1&&(l.hour=parseInt(f[o.hourBase0])),o.hourBase1>-1&&(l.hour=parseInt(f[o.hourBase1])-1),o.hour12Base0>-1){let d=parseInt(f[o.hour12Base0]);d==11&&(d=0),o.am>-1&&!this.isAm(f[o.am])&&(d+=12),l.hour=d}if(o.hour12Base1>-1){let d=parseInt(f[o.hour12Base1]);d==12&&(d=0),o.am>-1&&!this.isAm(f[o.am])&&(d+=12),l.hour=d}if(o.minute>-1&&(l.minute=parseInt(f[o.minute])),o.second>-1&&(l.second=parseInt(f[o.second])),o.millisecond>-1){let d=parseInt(f[o.millisecond]);o.millisecondDigits==2?d*=10:o.millisecondDigits==1&&(d*=100),l.millisecond=d}if(o.timestamp>-1){l.timestamp=parseInt(f[o.timestamp]);let d=new Date(l.timestamp);l.year=d.getUTCFullYear(),l.month=d.getUTCMonth(),l.day=d.getUTCDate(),l.hour=d.getUTCHours(),l.minute=d.getUTCMinutes(),l.second=d.getUTCSeconds(),l.millisecond=d.getUTCMilliseconds()}o.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),f[o.zone])),o.iso>-1&&(l.year=le(f[o.iso+0]),l.month=le(f[o.iso+1])-1,l.day=le(f[o.iso+2]),l.hour=le(f[o.iso+3]),l.minute=le(f[o.iso+4]),l.second=le(f[o.iso+5]),l.millisecond=le(f[o.iso+6]),f[o.iso+7]=="Z"||f[o.iso+7]=="z"?l.utc=!0:f[o.iso+7]!=""&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),f[o.iso+7]))),l.utc?r=new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):r=new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else r=new Date(e);return r}resolveTimezoneOffset(e,t){if(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let r=t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),s=r[1],n=r[2],o=r[3],l=parseInt(n)*60+parseInt(o);s=="+"&&(l*=-1);let u=(e||new Date).getTimezoneOffset();return l-u}return 0}resolveMonth(e){let t=this._months().indexOf(e);return t>-1||!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._months()).indexOf(e),t>-1)?t:0}resolveShortMonth(e){let t=this._shortMonths().indexOf(e);return t>-1||(t=this._months().indexOf(e),t>-1)||this._root.language&&!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._shortMonths()).indexOf(e),t>-1)?t:0}isAm(e){return this.getStringList(["AM","A.M.","A"]).indexOf(e.toUpperCase())>-1}getStringList(e){let t=[];for(let i=0;i<e.length;i++)this._root.language?t.push(cr(this._t(e[i]))):t.push(cr(e[i]));return t}};var kr=class{constructor(){Object.defineProperty(this,"_observer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_targets",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this._observer=new ResizeObserver(e=>{x(e,t=>{x(this._targets,i=>{i.target===t.target&&i.callback()})})})}addTarget(e,t){this._observer.observe(e,{box:"border-box"}),this._targets.push({target:e,callback:t})}removeTarget(e){this._observer.unobserve(e),bt(this._targets,t=>t.target!==e)}},Ai=class a{constructor(){Object.defineProperty(this,"_timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_targets",{enumerable:!0,configurable:!0,writable:!0,value:[]})}addTarget(e,t){if(this._timer===null){let r=null,s=()=>{let n=Date.now();(r===null||n>r+a.delay)&&(r=n,x(this._targets,o=>{let l=o.target.getBoundingClientRect();(l.width!==o.size.width||l.height!==o.size.height)&&(o.size=l,o.callback())})),this._targets.length===0?this._timer=null:this._timer=requestAnimationFrame(s)};this._timer=requestAnimationFrame(s)}let i={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:e,callback:t,size:i})}removeTarget(e){bt(this._targets,t=>t.target!==e),this._targets.length===0&&this._timer!==null&&(cancelAnimationFrame(this._timer),this._timer=null)}};Object.defineProperty(Ai,"delay",{enumerable:!0,configurable:!0,writable:!0,value:200});var $i=null;function Fn(){return $i===null&&(typeof ResizeObserver<"u"?$i=new kr:$i=new Ai),$i}var Bi=class{constructor(e,t){Object.defineProperty(this,"_sensor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_listener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this._sensor=Fn(),this._element=e,this._listener=Ti(t),this._sensor.addTarget(e,t)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}};var xt=class extends z{};Object.defineProperty(xt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"InterfaceColors"});Object.defineProperty(xt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([xt.className])});var Ri=class extends z{constructor(){super(...arguments),Object.defineProperty(this,"_unitAliases",{enumerable:!0,configurable:!0,writable:!0,value:{Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}})}_setDefaults(){let e="_duration_millisecond",t="_duration_second",i="_duration_minute",r="_duration_hour",s="_duration_day",n="_duration_week",o="_duration_month",l="_duration_year",u="_second",h="_minute",c="_hour",f="_day",d="_week",m="_week",b="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(e),second:this._t(e+u),minute:this._t(e+h),hour:this._t(e+c),day:this._t(e+f),week:this._t(e+d),month:this._t(e+m),year:this._t(e+b)},second:{second:this._t(t),minute:this._t(t+h),hour:this._t(t+c),day:this._t(t+f),week:this._t(t+d),month:this._t(t+m),year:this._t(t+b)},minute:{minute:this._t(i),hour:this._t(i+c),day:this._t(i+f),week:this._t(i+d),month:this._t(i+m),year:this._t(i+b)},hour:{hour:this._t(r),day:this._t(r+f),week:this._t(r+d),month:this._t(r+m),year:this._t(r+b)},day:{day:this._t(s),week:this._t(s+d),month:this._t(s+m),year:this._t(s+b)},week:{week:this._t(n),month:this._t(n+m),year:this._t(n+b)},month:{month:this._t(o),year:this._t(o+b)},year:{year:this._t(l)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){let r=i||this.get("baseUnit");(typeof t>"u"||t==="")&&(this.get("durationFormat")!=null?t=this.get("durationFormat"):t=this.getFormat(le(e),void 0,r)),t=jt(t);let s=this.parseFormat(t,r),n=Number(e),o;n>this.get("negativeBase")?o=s.positive:n<this.get("negativeBase")?o=s.negative:o=s.zero;let l=this.applyFormat(n,o);return o.color!==""&&(l="["+o.color+"]"+l+"[/]"),l}parseFormat(e,t){let i=t||this.get("baseUnit"),r={positive:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1}};e=e.replace("||",st);let s=e.split("|");return r.positive.source=s[0],typeof s[2]>"u"?r.zero=r.positive:r.zero.source=s[2],typeof s[1]>"u"?r.negative=r.positive:r.negative.source=s[1],N(r,(n,o)=>{if(o.parsed)return;let l=o.source,u=[];u=o.source.match(/^\[([^\]]*)\]/),u&&u.length&&u[0]!==""&&(l=o.source.substr(u[0].length),o.color=u[1]);let h=oe.chunk(l,!0);for(let c=0;c<h.length;c++){let f=h[c];if(f.text=f.text.replace(st,"|"),f.type==="value"){f.text.match(/[yYMdDwhHKkmsSn]+a/)&&(o.absolute=!0,f.text=f.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let d=f.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(d)for(let m=0;m<d.length;m++)d[m]==null&&(d[m]=this._unitAliases[d[m]]),o.parts.push(d[m]),f.text=f.text.replace(d[m],Se)}o.template+=f.text}o.parsed=!0}),r}applyFormat(e,t){let i=!t.absolute&&e<this.get("negativeBase");e=Math.abs(e);let r=this.toTimeStamp(e,t.baseUnit),s=t.template,n={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let o=0,l=t.parts.length;o<l;o++){let u=t.parts[o],h=this._toTimeUnit(u.substr(0,1)),c,f=this._getUnitValue(h);o<l-1?c=Math.floor(r/f):c=Math.round(r/f),n[h]+=c,r-=c*f}N(n,(o,l)=>{o=="millisecond"&&l==1e3?(n.second++,n.millisecond=0):o=="second"&&l==60?(n.minute++,n.second=0):o=="minute"&&l==60?(n.hour++,n.minute=0):o=="hour"&&l==24?(n.day++,n.hour=0):o=="day"&&l==7&&t.parts.indexOf("w")!==-1?(n.week++,n.day=0):o=="day"&&l==30?(n.month++,n.day=0):o=="month"&&l==12&&(n.year++,n.month=0)});for(let o=0,l=t.parts.length;o<l;o++){let u=t.parts[o],h=this._toTimeUnit(u.substr(0,1)),c=u.length;s=s.replace(Se,K(n[h],c,"0"))}return i&&(s="-"+s),s}toTimeStamp(e,t){return e*this._getUnitValue(t)}_toTimeUnit(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year"}}getFormat(e,t,i){if(this.get("durationFormat")!=null)return this.get("durationFormat");if(i||(i=this.get("baseUnit")),t!=null&&e!=t){e=Math.abs(e),t=Math.abs(t);let r=this.getValueUnit(Math.max(e,t),i);return this.get("durationFormats")[i][r]}else{let r=this.getValueUnit(e,i);return this.get("durationFormats")[i][r]}}getValueUnit(e,t){t||(t=this.get("baseUnit"));let i,r=this.getMilliseconds(e,t);return Ds(this._getUnitValues(),(s,n)=>{if(s==t||i){if(r/n<=1)return i||(i=s),!1;i=s}return!0}),i}getMilliseconds(e,t){return t||(t=this.get("baseUnit")),e*this._getUnitValue(t)}_getUnitValue(e){return this._getUnitValues()[e]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}};var Li={firstDayOfWeek:1,_decimalSeparator:".",_thousandSeparator:",",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03BC",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date:"yyyy-MM-dd",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"AD",_era_bc:"BC",A:"",P:"",AM:"",PM:"","A.M.":"","P.M.":"",January:"",February:"",March:"",April:"",May:"",June:"",July:"",August:"",September:"",October:"",November:"",December:"",Jan:"",Feb:"",Mar:"",Apr:"","May(short)":"May",Jun:"",Jul:"",Aug:"",Sep:"",Oct:"",Nov:"",Dec:"",Sunday:"",Monday:"",Tuesday:"",Wednesday:"",Thursday:"",Friday:"",Saturday:"",Sun:"",Mon:"",Tue:"",Wed:"",Thu:"",Fri:"",Sat:"",_dateOrd:function(a){let e="th";if(a<11||a>13)switch(a%10){case 1:e="st";break;case 2:e="nd";break;case 3:e="rd";break}return e},"Zoom Out":"",Play:"",Stop:"",Legend:"","Press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Press ENTER to open":"","Press ENTER to print.":"","Press ENTER to export as %1.":"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:"",Confirm:""};var Ii=class extends z{_setDefaults(){this.setPrivate("defaultLocale",Li),super._setDefaults()}translate(e,t,...i){t||(t=this._root.locale||this.getPrivate("defaultLocale"));let r=e,s=t[e];if(s===null)r="";else if(s!=null)s&&(r=s);else if(t!==this.getPrivate("defaultLocale"))return this.translate(e,this.getPrivate("defaultLocale"),...i);if(i.length)for(let n=i.length,o=0;o<n;++o)r=r.split("%"+(o+1)).join(i[o]);return r}translateAny(e,t,...i){return this.translate(e,t,...i)}setTranslationAny(e,t,i){let r=i||this._root.locale;r[e]=t}setTranslationsAny(e,t){N(e,(i,r)=>{this.setTranslationAny(i,r,t)})}translateEmpty(e,t,...i){let r=this.translate(e,t,...i);return r==e?"":r}translateFunc(e,t){return this._root.locale[e]?this._root.locale[e]:t!==this.getPrivate("defaultLocale")?this.translateFunc(e,this.getPrivate("defaultLocale")):()=>""}translateAll(e,t){return this.isDefault()?e:Kt(e,i=>this.translate(i,t))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}};var Ni=class{constructor(e,t){if(Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rules",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._root=e,!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`")}static new(e){let t=new this(e,!0);return t.setupDefaultRules(),t}setupDefaultRules(){}_lookupRules(e){return this._rules[e]}ruleRaw(e,t=[]){let i=this._rules[e];i||(i=this._rules[e]=[]),t.sort(Ve);let{index:r,found:s}=ws(i,n=>{let o=Ve(n.tags.length,t.length);return o===0?ji(n.tags,t,Ve):o});if(s)return i[r].template;{let n=de.new({});return i.splice(r,0,{tags:t,template:n}),n}}rule(e,t=[]){return this.ruleRaw(e,t)}};function S(a,e,t,i){a.set(e,t.get(i)),t.on(i,r=>{a.set(e,r)})}var Hi=class extends Ni{setupDefaultRules(){super.setupDefaultRules();let e=this._root.language,t=this._root.interfaceColors,i=this._root.horizontalLayout,r=this._root.verticalLayout,s=this.rule.bind(this);s("InterfaceColors").setAll({stroke:O.fromHex(15066597),fill:O.fromHex(15987699),primaryButton:O.fromHex(6788316),primaryButtonHover:O.fromHex(6779356),primaryButtonDown:O.fromHex(6872182),primaryButtonActive:O.fromHex(6872182),primaryButtonDisabled:O.fromHex(14342874),primaryButtonTextDisabled:O.fromHex(16777215),primaryButtonText:O.fromHex(16777215),primaryButtonStroke:O.fromHex(16777215),secondaryButton:O.fromHex(14277081),secondaryButtonHover:O.fromHex(10724259),secondaryButtonDown:O.fromHex(9276813),secondaryButtonActive:O.fromHex(15132390),secondaryButtonText:O.fromHex(0),secondaryButtonStroke:O.fromHex(16777215),grid:O.fromHex(0),background:O.fromHex(16777215),alternativeBackground:O.fromHex(0),text:O.fromHex(0),alternativeText:O.fromHex(16777215),disabled:O.fromHex(11382189),positive:O.fromHex(5288704),negative:O.fromHex(11730944)});{let n=s("ColorSet");n.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[O.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),n.setPrivate("currentStep",0),n.setPrivate("currentPass",0)}s("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:Qe(Ne)}),s("Component").setAll({interpolationDuration:0,interpolationEasing:Qe(Ne)}),s("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:I,tooltipY:I,tooltipPosition:"fixed",isMeasured:!0}),s("Sprite").states.create("default",{visible:!0,opacity:1}),s("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),s("Graphics").setAll({strokeWidth:1}),s("Chart").setAll({width:M,height:M,interactiveChildren:!1}),s("ZoomableContainer").setAll({width:M,height:M,wheelable:!0,pinchZoom:!0,maxZoomLevel:32,minZoomLevel:1,zoomStep:2,animationEasing:Qe(Ne),animationDuration:600,maxPanOut:.4}),s("Sprite",["horizontal","center"]).setAll({centerX:I,x:I}),s("Sprite",["vertical","center"]).setAll({centerY:I,y:I}),s("Container",["horizontal","layout"]).setAll({layout:i}),s("Container",["vertical","layout"]).setAll({layout:r}),s("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),s("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),s("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),s("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),s("GrainPattern").setAll({width:200,height:200,colors:[O.fromHex(0)],size:1,horizontalGap:0,verticalGap:0,density:1,minOpacity:0,maxOpacity:.2});{let n=s("PatternSet");n.setAll({step:1}),S(n,"color",t,"stroke")}s("LinearGradient").setAll({rotation:90}),s("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:Ee.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),s("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:i,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:e.translate("Press ENTER to toggle"),role:"checkbox"});{let n=s("Rectangle",["legend","item","background"]);n.setAll({fillOpacity:0}),S(n,"fill",t,"background")}s("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:I,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),s("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:M,height:M,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{let n=s("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});S(n,"fill",t,"disabled"),S(n,"stroke",t,"disabled")}s("Label",["legend","label"]).setAll({centerY:I,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0});{let n=s("Label",["legend","label"]).states.create("disabled",{});S(n,"fill",t,"disabled")}s("Label",["legend","value","label"]).setAll({centerY:I,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:M,populateText:!0});{let n=s("Label",["legend","value","label"]).states.create("disabled",{});S(n,"fill",t,"disabled")}s("HeatLegend").setAll({stepCount:1}),s("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),s("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:M,width:15}),s("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:M,height:15}),s("HeatLegend",["vertical"]).setAll({height:M}),s("HeatLegend",["horizontal"]).setAll({width:M}),s("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),s("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{let n=s("Label");n.setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"1em",populateText:!1}),S(n,"fill",t,"text")}s("RadialLabel").setAll({textType:"regular",centerY:I,centerX:I,inside:!1,radius:0,baseRadius:M,orientation:"auto",textAlign:"center"}),s("EditableLabel").setAll({editOn:"click",themeTags:["editablelabel"],multiLine:!0}),s("RoundedRectangle",["editablelabel","background"]).setAll({fillOpacity:0,fill:O.fromHex(0),cornerRadiusBL:3,cornerRadiusBR:3,cornerRadiusTL:3,cornerRadiusTR:3,strokeOpacity:0,stroke:O.fromHex(0)}),s("RoundedRectangle",["editablelabel","background"]).states.create("active",{strokeOpacity:.2}),s("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),s("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),s("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{let n=s("Tick");n.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),S(n,"stroke",t,"grid")}s("Bullet").setAll({locationX:.5,locationY:.5}),s("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:I,centerY:I,animationEasing:Qe(Ne),exportable:!1}),s("Tooltip",["system"]).setAll({pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});{let n=s("PointedRectangle",["tooltip","system","background"]);n.setAll({strokeOpacity:.3}),S(n,"fill",t,"background"),S(n,"stroke",t,"grid")}s("Label",["tooltip","system"]).setAll({fontSize:12,fill:t.get("background")}),s("Polygon").setAll({animationEasing:Qe(Ne)}),s("Link").setAll({cornerRadius:8,setStateOnChildren:!0});{let n=s("OrthogonalLine",["link","line"]);n.setAll({isMeasured:!1,crisp:!0});let o=n.states.create("active",{strokeWidth:2});S(o,"stroke",t,"negative")}s("OrthogonalLine",["link","hit"]).setAll({strokeWidth:10,opacity:0,strokeOpacity:0});{let n=s("OrthogonalLine");n.setAll({strokeWidth:1,strokeOpacity:1,cornerRadius:10}),S(n,"stroke",t,"grid")}{let n=s("Triangle",["link"]);n.setAll({width:14,height:10,centerY:0}),S(n,"fill",t,"grid"),S(n,"stroke",t,"grid"),n.states.create("default",{stateAnimationDuration:0});let o=n.states.create("active",{stateAnimationDuration:0,stroke:Le(16777215),strokeWidth:2});o.set("draw",l=>{l.arc(0,0,11,0,Math.PI*2),l.moveTo(-4,-4),l.lineTo(4,4),l.moveTo(4,-4),l.lineTo(-4,4)}),S(o,"fill",t,"negative")}s("PointedRectangle",["tooltip","background"]).setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:O.fromHex(16777215)});{let n=s("Label",["tooltip"]);n.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),S(n,"fill",t,"alternativeText")}s("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:i,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),s("Button").states.create("hover",{}),s("Button").states.create("down",{stateAnimationDuration:0}),s("Button").states.create("active",{}),s("Button").states.create("disabled",{forceInactive:!0});{let n=s("RoundedRectangle",["button","background"]);S(n,"fill",t,"primaryButton"),S(n,"stroke",t,"primaryButtonStroke")}{let n=s("RoundedRectangle",["button","background"]).states.create("hover",{});S(n,"fill",t,"primaryButtonHover")}{let n=s("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0});S(n,"fill",t,"primaryButtonDown")}{let n=s("RoundedRectangle",["button","background"]).states.create("active",{});S(n,"fill",t,"primaryButtonActive")}{let n=s("RoundedRectangle",["button","background"]).states.create("disabled",{});S(n,"fill",t,"primaryButtonDisabled")}{let n=s("Graphics",["button","icon"]).states.create("disabled",{});S(n,"fill",t,"primaryButtonTextDisabled")}{let n=s("Label",["button"]).states.create("disabled",{});S(n,"fill",t,"primaryButtonTextDisabled")}{let n=s("Graphics",["button","icon"]);n.setAll({forceInactive:!0}),S(n,"stroke",t,"primaryButtonText")}{let n=s("Label",["button"]);S(n,"fill",t,"primaryButtonText")}s("ConfirmButton").setAll({toggleKey:"active",setStateOnChildren:!0,label:J.new(this._root,{text:e.translate("Confirm"),forceHidden:!0})});{let n=s("RoundedRectangle",["button","background","confirm"]).states.create("active",{});S(n,"fill",t,"negative")}s("Label",["button","confirm"]).setAll({paddingTop:0,paddingBottom:0,paddingRight:3,paddingLeft:5}),s("Label",["button","confirm"]).states.create("default",{stateAnimationDuration:0}),s("Label",["button","confirm"]).states.create("active",{forceHidden:!1,stateAnimationDuration:0});{let n=s("Graphics",["icon","confirm","button"]);n.setAll({stateAnimationDuration:0}),n.states.create("default",{stateAnimationDuration:0}),S(n,"stroke",t,"primaryButtonText")}{let n=s("Graphics",["icon","confirm","button"]).states.create("active",{svgPath:"M -5 1 L 0 6 L 8 -5",strokeWidth:2});S(n,"stroke",t,"primaryButtonText")}{let n=s("Graphics",["icon","confirm","button","secondary"]).states.create("active",{});S(n,"stroke",t,"primaryButtonText")}{let n=s("RoundedRectangle",["button","background","confirm","secondary"]).states.create("active",{fillOpacity:1});S(n,"fill",t,"negative")}{let n=s("RoundedRectangle",["button","background","confirm","secondary"]).states.create("hoverActive",{fillOpacity:1});S(n,"fill",t,"negative")}s("Button",["button","confirm"]).states.create("hoverActive",{}),s("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:M,role:"button",ariaLabel:e.translate("Zoom Out"),layer:30});{let n=s("RoundedRectangle",["background","button","zoom"]);n.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),S(n,"fill",t,"primaryButton")}{let n=s("RoundedRectangle",["background","button","zoom"]).states.create("hover",{});S(n,"fill",t,"primaryButtonHover")}{let n=s("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0});S(n,"fill",t,"primaryButtonDown")}{let n=s("Graphics",["icon","button","zoom"]);n.setAll({crisp:!0,strokeOpacity:.7,draw:o=>{o.moveTo(0,0),o.lineTo(12,0)}}),S(n,"stroke",t,"primaryButtonText")}s("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:I,centerY:I,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:e.translate("Use up and down arrows to move selection")});{let n=s("RoundedRectangle",["background","resize","button"]);n.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),S(n,"fill",t,"secondaryButton"),S(n,"stroke",t,"secondaryButtonStroke")}{let n=s("RoundedRectangle",["background","resize","button"]).states.create("hover",{});S(n,"fill",t,"secondaryButtonHover")}{let n=s("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0});S(n,"fill",t,"secondaryButtonDown")}{let n=s("Graphics",["resize","button","icon"]);n.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:o=>{o.moveTo(0,.5),o.lineTo(0,12.5),o.moveTo(4,.5),o.lineTo(4,12.5)}}),S(n,"stroke",t,"secondaryButtonText")}s("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),s("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),s("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:e.translate("Play"),toggleKey:"active"});{let n=s("RoundedRectangle",["play","background"]);n.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),S(n,"fill",t,"primaryButton")}{let n=s("Graphics",["play","icon"]);n.setAll({stateAnimationDuration:0,dx:1,draw:o=>{o.moveTo(0,-5),o.lineTo(8,0),o.lineTo(0,5),o.lineTo(0,-5)}}),S(n,"fill",t,"primaryButtonText")}s("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),s("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:n=>{n.moveTo(-4,-5),n.lineTo(-1,-5),n.lineTo(-1,5),n.lineTo(-4,5),n.lineTo(-4,-5),n.moveTo(4,-5),n.lineTo(1,-5),n.lineTo(1,5),n.lineTo(4,5),n.lineTo(4,-5)}}),s("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:e.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{let n=s("RoundedRectangle",["switch","background"]);n.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),S(n,"fill",t,"primaryButton")}{let n=s("Circle",["switch","icon"]);n.setAll({radius:8,centerY:0,centerX:0,dx:0}),S(n,"fill",t,"primaryButtonText")}s("Graphics",["switch","icon"]).states.create("active",{dx:16}),s("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:Qe(Ne)}),s("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:M}),s("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:M}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{let n=s("RoundedRectangle",["scrollbar","main","background"]);n.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),S(n,"fill",t,"fill")}{let n=s("RoundedRectangle",["scrollbar","thumb"]);n.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),S(n,"fill",t,"secondaryButton")}{let n=s("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{});S(n,"fill",t,"secondaryButtonHover")}{let n=s("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0});S(n,"fill",t,"secondaryButtonDown")}s("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:I,width:M,centerX:I,ariaLabel:e.translate("Use up and down arrows to move selection")}),s("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:I,centerY:I,height:M,ariaLabel:e.translate("Use left and right arrows to move selection")});{let n=s("PointedRectangle",["axis","tooltip","background"]);n.setAll({cornerRadius:0}),S(n,"fill",t,"alternativeBackground")}s("Label",["axis","tooltip"]).setAll({role:void 0}),s("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),s("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),s("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),s("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),s("Star").setAll({spikes:5,innerRadius:5,radius:10}),s("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),s("Tooltip",["indicator"]).setAll({forceHidden:!0}),s("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),s("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),s("SpriteResizer").setAll({rotationStep:10,isMeasured:!1}),s("Container",["resizer","grip"]).states.create("hover",{});{let n=s("RoundedRectangle",["resizer","grip"]);n.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),S(n,"fill",t,"background"),S(n,"stroke",t,"alternativeBackground")}{let n=s("RoundedRectangle",["resizer","grip","outline"]);n.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),n.states.create("hover",{fillOpacity:.3}),S(n,"fill",t,"alternativeBackground")}s("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),s("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{let n=s("Rectangle",["resizer","rectangle"]);n.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),S(n,"stroke",t,"alternativeBackground")}s("Graphics",["button","plus","icon"]).setAll({x:I,y:I,draw:n=>{n.moveTo(-4,0),n.lineTo(4,0),n.moveTo(0,-4),n.lineTo(0,4)}}),s("Graphics",["button","minus","icon"]).setAll({x:I,y:I,draw:n=>{n.moveTo(-4,0),n.lineTo(4,0)}}),s("Graphics",["button","home","icon"]).setAll({x:I,y:I,svgPath:"M 8 -1 L 6 -1 L 6 7 L 2 7 L 2 1 L -2 1 L -2 7 L -6 7 L -6 -1 L -8 -1 L 0 -9 L 8 -1 Z M 8 -1"}),s("Button",["zoomtools"]).setAll({marginTop:1,marginBottom:2}),s("ZoomTools").setAll({x:M,centerX:M,y:M,centerY:M,paddingRight:10,paddingBottom:10}),s("ProgressPie").setAll({radius:M,width:50,height:50,centerX:be(-50),centerY:be(-50),innerRadius:be(85),numberFormat:"#."});{let n=s("Label",["progresspie"]);n.setAll({centerX:I,centerY:I,fontSize:"0.75em"}),S(n,"fill",t,"primaryButton")}{let n=s("Circle",["progresspie"]);n.setAll({fillOpacity:.5}),S(n,"fill",t,"background")}{let n=s("Slice",["progresspie"]);n.setAll({startAngle:-90}),S(n,"fill",t,"primaryButton")}{let n=s("Slice",["progresspie","background"]);n.setAll({fillOpacity:.2,arc:360}),S(n,"fill",t,"primaryButton")}s("EditableLabel",["numericstepper"]).setAll({y:I,centerY:I,multiLine:!1,marginRight:2});{let n=s("Container",["numericstepper","buttons"]);n.setAll({layout:this._root.verticalLayout,centerY:I,y:I,marginRight:10,opacity:0}),n.states.create("active",{opacity:1}),n.states.create("default",{opacity:0})}{let n=s("Triangle",["numericstepper"]);n.setAll({width:17,height:11,marginTop:3,marginBottom:3,strokeWidth:5,strokeOpacity:0,cursorOverStyle:"pointer"}),S(n,"fill",t,"secondaryButton")}s("Triangle",["downbutton"]).setAll({rotation:180})}};var Bt=class{constructor(e=1,t=0,i=0,r=1,s=0,n=0){Object.defineProperty(this,"a",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"b",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"c",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"d",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ty",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.a=e,this.b=t,this.c=i,this.d=r,this.tx=s,this.ty=n}setTransform(e,t,i,r,s,n=1){this.a=Math.cos(s)*n,this.b=Math.sin(s)*n,this.c=-Math.sin(s)*n,this.d=Math.cos(s)*n,this.tx=e-(i*this.a+r*this.c),this.ty=t-(i*this.b+r*this.d)}apply(e){return{x:this.a*e.x+this.c*e.y+this.tx,y:this.b*e.x+this.d*e.y+this.ty}}applyInverse(e){let t=1/(this.a*this.d+this.c*-this.b);return{x:this.d*t*e.x+-this.c*t*e.y+(this.ty*this.c-this.tx*this.d)*t,y:this.a*t*e.y+-this.b*t*e.x+(-this.ty*this.a+this.tx*this.b)*t}}append(e){let t=this.a,i=this.b,r=this.c,s=this.d;this.a=e.a*t+e.b*r,this.b=e.a*i+e.b*s,this.c=e.c*t+e.d*r,this.d=e.c*i+e.d*s,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*i+e.ty*s+this.ty}prepend(e){let t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){let i=this.a,r=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty}copyFrom(e){this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty}};var zn=(function(){function a(e,t){var i=[],r=!0,s=!1,n=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(i.push(l.value),!(t&&i.length===t));r=!0);}catch(u){s=!0,n=u}finally{try{!r&&o.return&&o.return()}finally{if(s)throw n}}return i}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return a(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),li=Math.PI*2,Sr=function(e,t,i,r,s,n,o){var l=e.x,u=e.y;l*=t,u*=i;var h=r*l-s*u,c=s*l+r*u;return{x:h+n,y:c+o}},Wn=function(e,t){var i=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),r=Math.cos(e),s=Math.sin(e),n=Math.cos(e+t),o=Math.sin(e+t);return[{x:r-s*i,y:s+r*i},{x:n+o*i,y:o-n*i},{x:n,y:o}]},Qs=function(e,t,i,r){var s=e*r-t*i<0?-1:1,n=e*i+t*r;return n>1&&(n=1),n<-1&&(n=-1),s*Math.acos(n)},Un=function(e,t,i,r,s,n,o,l,u,h,c,f){var d=Math.pow(s,2),m=Math.pow(n,2),b=Math.pow(c,2),p=Math.pow(f,2),g=d*m-d*p-m*b;g<0&&(g=0),g/=d*p+m*b,g=Math.sqrt(g)*(o===l?-1:1);var _=g*s/n*f,y=g*-n/s*c,v=h*_-u*y+(e+i)/2,T=u*_+h*y+(t+r)/2,j=(c-_)/s,D=(f-y)/n,$=(-c-_)/s,L=(-f-y)/n,E=Qs(1,0,j,D),k=Qs(j,D,$,L);return l===0&&k>0&&(k-=li),l===1&&k<0&&(k+=li),[v,T,E,k]},Vn=function(e){var t=e.px,i=e.py,r=e.cx,s=e.cy,n=e.rx,o=e.ry,l=e.xAxisRotation,u=l===void 0?0:l,h=e.largeArcFlag,c=h===void 0?0:h,f=e.sweepFlag,d=f===void 0?0:f,m=[];if(n===0||o===0)return[];var b=Math.sin(u*li/360),p=Math.cos(u*li/360),g=p*(t-r)/2+b*(i-s)/2,_=-b*(t-r)/2+p*(i-s)/2;if(g===0&&_===0)return[];n=Math.abs(n),o=Math.abs(o);var y=Math.pow(g,2)/Math.pow(n,2)+Math.pow(_,2)/Math.pow(o,2);y>1&&(n*=Math.sqrt(y),o*=Math.sqrt(y));var v=Un(t,i,r,s,n,o,c,d,b,p,g,_),T=zn(v,4),j=T[0],D=T[1],$=T[2],L=T[3],E=Math.abs(L)/(li/4);Math.abs(1-E)<1e-7&&(E=1);var k=Math.max(Math.ceil(E),1);L/=k;for(var H=0;H<k;H++)m.push(Wn($,L)),$+=L;return m.map(function(P){var C=Sr(P[0],n,o,p,b,j,D),B=C.x,$e=C.y,F=Sr(P[1],n,o,p,b,j,D),q=F.x,ae=F.y,ge=Sr(P[2],n,o,p,b,j,D),We=ge.x,pe=ge.y;return{x1:B,y1:$e,x2:q,y2:ae,x:We,y:pe}})},en=Vn;function Yn(a,e,t){if(e!==t)throw new Error("Required "+t+" arguments for "+a+" but got "+e)}function ui(a,e,t){if(e<t)throw new Error("Required at least "+t+" arguments for "+a+" but got "+e)}function ke(a,e,t){if(ui(a,e,t),e%t!==0)throw new Error("Arguments for "+a+" must be in pairs of "+t)}function Gn(a){for(let e=0;e<a.length;e+=7){let t=e+3,i=a[t];if(i.length>1){let r=/^([01])([01])(.*)$/.exec(i);r!==null&&(a.splice(t,0,r[1]),++t,a.splice(t,0,r[2]),++t,r[3].length>0?a[t]=r[3]:a.splice(t,1))}if(++t,i=a[t],i.length>1){let r=/^([01])(.+)$/.exec(i);r!==null&&(a.splice(t,0,r[1]),++t,a[t]=r[2])}}}function tn(a){if(a===0||a===1)return a;throw new Error("Flag must be 0 or 1")}function Xn(a){let e=[0,0,0];for(let t=0;t<24;t++)e[t%3]<<=1,e[t%3]|=a&1,a>>=1;return(e[0]|0)+(e[1]<<8)+(e[2]<<16)}function Fi(a,e){for(;!(a.interactive&&!e(a));)if(a._parent)a=a._parent;else break}function Kn(a,e,t){return V(a,Oi(e),i=>{let r=ur(i),s=i.touches;s?(s.length==0&&(s=i.changedTouches),t(vs(s),r)):t([i],r)})}function rn(a){let e=document.createElement("canvas");e.width=1,e.height=1;let t=e.getContext("2d",{willReadFrequently:!0});t.drawImage(a,0,0,1,1);try{return t.getImageData(0,0,1,1),!1}catch{return console.warn('Image "'+a.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors'),!0}}function hi(a){a.width=0,a.height=0,a.style.width="0px",a.style.height="0px"}function sn(a){return Math.floor(a)+.5}var Cr=class{constructor(){Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y",{enumerable:!0,configurable:!0,writable:!0,value:0})}get x(){return this._x}get y(){return this._y}set x(e){this._x=e}set y(e){this._y=e}},Rt=class extends ot{constructor(e){super(),Object.defineProperty(this,"_layer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"mask",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"visible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"exportable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"interactive",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inactive",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"wheelable",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"cancelTouch",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isMeasured",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"buttonMode",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"alpha",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"compoundAlpha",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"angle",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"scale",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"crisp",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"pivot",{enumerable:!0,configurable:!0,writable:!0,value:new Cr}),Object.defineProperty(this,"filter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cursorOverStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_replacedCursorStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_localMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new Bt}),Object.defineProperty(this,"_matrix",{enumerable:!0,configurable:!0,writable:!0,value:new Bt}),Object.defineProperty(this,"_uMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new Bt}),Object.defineProperty(this,"_renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_localBounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_colorId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._renderer=e}subStatus(e){return{inactive:this.inactive==null?e.inactive:this.inactive,layer:this._layer||e.layer}}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let e=this;for(;;){if(e._layer)return e._layer;if(e._parent)e=e._parent;else return this._renderer.defaultLayer}}setLayer(e,t){e==null?this._layer=void 0:(this._layer=this._renderer.getLayer(e,!0),this._layer.visible=!0,this._layer.margin=t,t&&ut(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers),this._parent&&this._parent.registerChildLayer(this._layer),this._layer.dirty=!0,this._renderer.resizeLayer(this._layer),this._renderer.resizeGhost())}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(e){}_getColorId(){return this._colorId===void 0&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(e){return!e.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(e){return this._isInteractive(e)}contains(e){for(;;){if(e===this)return!0;if(e._parent)e=e._parent;else return!1}}toGlobal(e){return this._matrix.apply(e)}toLocal(e){return this._matrix.applyInverse(e)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._uMatrix}getLocalBounds(){return this._localBounds||(this._localBounds={left:1e7,top:1e7,right:-1e7,bottom:-1e7},this._addBounds(this._localBounds)),this._localBounds}getAdjustedBounds(e){this._setMatrix();let t=this.getLocalMatrix(),i=t.apply({x:e.left,y:e.top}),r=t.apply({x:e.right,y:e.top}),s=t.apply({x:e.right,y:e.bottom}),n=t.apply({x:e.left,y:e.bottom});return{left:Math.min(i.x,r.x,s.x,n.x),top:Math.min(i.y,r.y,s.y,n.y),right:Math.max(i.x,r.x,s.x,n.x),bottom:Math.max(i.y,r.y,s.y,n.y)}}on(e,t,i){return this.interactive?this._renderer._addEvent(this,e,t,i):new U(()=>{})}_setMatrix(){this._localMatrix.setTransform(this.x,this.y,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._matrix.copyFrom(this._localMatrix),this._parent&&this._matrix.prepend(this._parent._matrix)}_transform(e,t){let i=this._matrix,r=i.tx*t,s=i.ty*t;this.crisp&&(r=sn(r),s=sn(s)),e.setTransform(i.a*t,i.b*t,i.c*t,i.d*t,r,s)}_transformMargin(e,t,i){let r=this._matrix;e.setTransform(r.a*t,r.b*t,r.c*t,r.d*t,(r.tx+i.left)*t,(r.ty+i.top)*t)}_transformLayer(e,t,i){i.margin?this._transformMargin(e,i.scale||t,i.margin):this._transform(e,i.scale||t)}render(e,t=0){if(this.visible&&(this.exportable!==!1||!this._renderer._omitTainted)){this._setMatrix();let i=this.subStatus(e),r=this._renderer.resolution,s=this._renderer.layers,n=this._renderer._ghostLayer,o=n.context,l=this.mask;l&&l._setMatrix(),x(s,u=>{if(u){let h=u.context;h.save(),l&&(l._transformLayer(h,r,u),l._runPath(h),h.clip()),h.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(h,r,u),this.filter&&(h.filter=this.filter)}}),o.save(),l&&this._isInteractiveMask(i)&&(l._transformMargin(o,r,n.margin),l._runPath(o),o.clip()),this._transformMargin(o,r,n.margin),i.layer.order>0&&!t&&ys(this._renderer._deferredGhostLayers,i.layer.order),this._render(i,t),o.restore(),x(s,u=>{u&&u.context.restore()})}}_render(e,t=0){this.exportable===!1&&(e.layer.tainted=!0)}_ghostOnly(e=0){return e>0}_drawGhost(e,t=0){let i=this._isInteractive(e),r=e.layer.order||0;return!!(i&&(r==0&&!this._ghostOnly(t)||r==t))}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(e=>e.value===this)}shouldCancelTouch(){let e=this._renderer;return e.tapToActivate&&!e._touchActive?!1:this.cancelTouch?!0:this._parent?this._parent.shouldCancelTouch():!1}},jr=class extends Rt{constructor(){super(...arguments),Object.defineProperty(this,"interactiveChildren",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_childLayers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_children",{enumerable:!0,configurable:!0,writable:!0,value:[]})}_isInteractiveMask(e){return this.interactiveChildren||super._isInteractiveMask(e)}addChild(e){e._parent=this,this._children.push(e),e._layer&&this.registerChildLayer(e._layer)}addChildAt(e,t){e._parent=this,this._children.splice(t,0,e),e._layer&&this.registerChildLayer(e._layer)}removeChild(e){e._parent=void 0,re(this._children,e)}_render(e,t){super._render(e);let i=this._renderer;this.interactive&&this.interactiveChildren&&++i._forceInteractive,x(this._children,r=>{r.compoundAlpha=this.compoundAlpha*this.alpha,r.render(e,t)}),this.interactive&&this.interactiveChildren&&--i._forceInteractive}registerChildLayer(e){this._childLayers||(this._childLayers=[]),at(this._childLayers,e),this._parent&&this._parent.registerChildLayer(e)}markDirtyLayer(e=!1){super.markDirtyLayer(),e&&this._childLayers&&x(this._childLayers,t=>t.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&x(this._childLayers,e=>{e.dirty=!0})}};function te(a,e){a.left=Math.min(a.left,e.x),a.top=Math.min(a.top,e.y),a.right=Math.max(a.right,e.x),a.bottom=Math.max(a.bottom,e.y)}var ie=class{colorize(e,t){}colorizeGhost(e,t){this.colorize(e,t)}path(e){}pathGhost(e){this.path(e)}addBounds(e){}},Er=class extends ie{colorize(e,t){e.beginPath()}},ci=class extends ie{constructor(e){super(),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){t!==void 0?e.fillStyle=t:e.fillStyle=this.color}},Mr=class extends ie{constructor(e){super(),Object.defineProperty(this,"clearShadow",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.fill(),this.clearShadow&&(e.shadowColor="",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},$r=class extends ie{colorize(e,t){e.stroke()}},di=class extends ie{constructor(e,t,i,r){super(),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"lineCap",{enumerable:!0,configurable:!0,writable:!0,value:r})}colorize(e,t){t!==void 0?e.strokeStyle=t:e.strokeStyle=this.color,e.lineWidth=this.width,this.lineJoin&&(e.lineJoin=this.lineJoin),this.lineCap&&(e.lineCap=this.lineCap)}},Ar=class extends ie{constructor(e){super(),Object.defineProperty(this,"dash",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.setLineDash(this.dash)}},Br=class extends ie{constructor(e){super(),Object.defineProperty(this,"dashOffset",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.lineDashOffset=this.dashOffset}},Rr=class extends ie{constructor(e,t,i,r){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.rect(this.x,this.y,this.width,this.height)}addBounds(e){let t=this.x,i=this.y,r=t+this.width,s=i+this.height;te(e,{x:t,y:i}),te(e,{x:r,y:i}),te(e,{x:t,y:s}),te(e,{x:r,y:s})}},Lr=class extends ie{constructor(e,t,i){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:i})}path(e){e.moveTo(this.x+this.radius,this.y),e.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(e){te(e,{x:this.x-this.radius,y:this.y-this.radius}),te(e,{x:this.x+this.radius,y:this.y+this.radius})}},Ir=class extends ie{constructor(e,t,i,r){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radiusX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"radiusY",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.ellipse(0,0,this.radiusX,this.radiusY,0,0,Math.PI*2)}addBounds(e){te(e,{x:this.x-this.radiusX,y:this.y-this.radiusY}),te(e,{x:this.x+this.radiusX,y:this.y+this.radiusY})}},Nr=class extends ie{constructor(e,t,i,r,s,n){super(),Object.defineProperty(this,"cx",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cy",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"endAngle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"anticlockwise",{enumerable:!0,configurable:!0,writable:!0,value:n})}path(e){this.radius>0&&e.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(e){let t=Xs(this.cx,this.cy,this.startAngle*Mt,this.endAngle*Mt,this.radius);te(e,{x:t.left,y:t.top}),te(e,{x:t.right,y:t.bottom})}},Hr=class extends ie{constructor(e,t,i,r,s){super(),Object.defineProperty(this,"x1",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y1",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"x2",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"y2",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){this.radius>0&&e.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(e){}},Fr=class extends ie{constructor(e,t){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t})}path(e){e.lineTo(this.x,this.y)}addBounds(e){te(e,{x:this.x,y:this.y})}},zr=class extends ie{constructor(e,t){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t})}path(e){e.moveTo(this.x,this.y)}addBounds(e){te(e,{x:this.x,y:this.y})}},Wr=class extends ie{path(e){e.closePath()}},Ur=class extends ie{constructor(e,t,i,r,s,n){super(),Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"cpX2",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"cpY2",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,value:n})}path(e){e.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(e){te(e,{x:this.cpX,y:this.cpY}),te(e,{x:this.cpX2,y:this.cpY2}),te(e,{x:this.toX,y:this.toY})}},Vr=class extends ie{constructor(e,t,i,r){super(),Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(e){te(e,{x:this.cpX,y:this.cpY}),te(e,{x:this.toX,y:this.toY})}},Yr=class extends ie{constructor(e,t,i,r,s){super(),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"blur",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"offsetX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"offsetY",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"opacity",{enumerable:!0,configurable:!0,writable:!0,value:s})}colorize(e,t){this.opacity&&(e.fillStyle=this.color),e.shadowColor=this.color,e.shadowBlur=this.blur,e.shadowOffsetX=this.offsetX,e.shadowOffsetY=this.offsetY}colorizeGhost(e,t){}},Gr=class extends ie{constructor(e,t,i,r,s){super(),Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){e.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(e){te(e,{x:this.x,y:this.y}),te(e,{x:this.width,y:this.height})}},Xr=class extends Rt{constructor(){super(...arguments),Object.defineProperty(this,"_operations",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"blendMode",{enumerable:!0,configurable:!0,writable:!0,value:At.NORMAL}),Object.defineProperty(this,"_hasShadows",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_fillAlpha",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeAlpha",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}clear(){super.clear(),this._operations.length=0}_pushOp(e){this._operations.push(e)}beginFill(e,t=1){this._fillAlpha=t,e?e instanceof O?this._pushOp(new ci(e.toCSS(t))):(this.isMeasured=!0,this._pushOp(new ci(e))):this._pushOp(new ci("rgba(0, 0, 0, "+t+")"))}endFill(){this._pushOp(new Mr(this._hasShadows))}endStroke(){this._pushOp(new $r)}beginPath(){this._pushOp(new Er)}lineStyle(e=0,t,i=1,r,s){this._strokeAlpha=i,t?t instanceof O?this._pushOp(new di(e,t.toCSS(i),r,s)):this._pushOp(new di(e,t,r,s)):this._pushOp(new di(e,"rgba(0, 0, 0, "+i+")",r,s))}setLineDash(e){this._pushOp(new Ar(e||[]))}setLineDashOffset(e=0){this._pushOp(new Br(e))}drawRect(e,t,i,r){this._pushOp(new Rr(e,t,i,r))}drawCircle(e,t,i){this._pushOp(new Lr(e,t,i))}drawEllipse(e,t,i,r){this._pushOp(new Ir(e,t,i,r))}arc(e,t,i,r,s,n=!1){this._pushOp(new Nr(e,t,i,r,s,n))}arcTo(e,t,i,r,s){this._pushOp(new Hr(e,t,i,r,s))}lineTo(e,t){this._pushOp(new Fr(e,t))}moveTo(e,t){this._pushOp(new zr(e,t))}bezierCurveTo(e,t,i,r,s,n){this._pushOp(new Ur(e,t,i,r,s,n))}quadraticCurveTo(e,t,i,r){this._pushOp(new Vr(e,t,i,r))}closePath(){this._pushOp(new Wr)}shadow(e,t=0,i=0,r=0,s){this._hasShadows=!0,this._pushOp(new Yr(s?e.toCSS(s):e.toCSS(this._fillAlpha||this._strokeAlpha),t,i,r))}image(e,t,i,r,s){this._pushOp(new Gr(e,t,i,r,s))}svgPath(e){let t=0,i=0,r=null,s=null,n=null,o=null,l=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,u=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g,h=this._operations.length;try{let c;for(;(c=l.exec(e))!==null;){let f=c[1],d=c[2],m=[];for(;(c=u.exec(d))!==null;)m.push(c[1]);switch(f!=="S"&&f!=="s"&&f!=="C"&&f!=="c"&&(r=null,s=null),f!=="Q"&&f!=="q"&&f!=="T"&&f!=="t"&&(n=null,o=null),f){case"M":ke(f,m.length,2),t=+m[0],i=+m[1],this.moveTo(t,i);for(let p=2;p<m.length;p+=2)t=+m[p],i=+m[p+1],this.lineTo(t,i);break;case"m":ke(f,m.length,2),t+=+m[0],i+=+m[1],this.moveTo(t,i);for(let p=2;p<m.length;p+=2)t+=+m[p],i+=+m[p+1],this.lineTo(t,i);break;case"L":ke(f,m.length,2);for(let p=0;p<m.length;p+=2)t=+m[p],i=+m[p+1],this.lineTo(t,i);break;case"l":ke(f,m.length,2);for(let p=0;p<m.length;p+=2)t+=+m[p],i+=+m[p+1],this.lineTo(t,i);break;case"H":ui(f,m.length,1);for(let p=0;p<m.length;++p)t=+m[p],this.lineTo(t,i);break;case"h":ui(f,m.length,1);for(let p=0;p<m.length;++p)t+=+m[p],this.lineTo(t,i);break;case"V":ui(f,m.length,1);for(let p=0;p<m.length;++p)i=+m[p],this.lineTo(t,i);break;case"v":ui(f,m.length,1);for(let p=0;p<m.length;++p)i+=+m[p],this.lineTo(t,i);break;case"C":ke(f,m.length,6);for(let p=0;p<m.length;p+=6){let g=+m[p],_=+m[p+1];r=+m[p+2],s=+m[p+3],t=+m[p+4],i=+m[p+5],this.bezierCurveTo(g,_,r,s,t,i)}break;case"c":ke(f,m.length,6);for(let p=0;p<m.length;p+=6){let g=+m[p]+t,_=+m[p+1]+i;r=+m[p+2]+t,s=+m[p+3]+i,t+=+m[p+4],i+=+m[p+5],this.bezierCurveTo(g,_,r,s,t,i)}break;case"S":ke(f,m.length,4),(r===null||s===null)&&(r=t,s=i);for(let p=0;p<m.length;p+=4){let g=2*t-r,_=2*i-s;r=+m[p],s=+m[p+1],t=+m[p+2],i=+m[p+3],this.bezierCurveTo(g,_,r,s,t,i)}break;case"s":ke(f,m.length,4),(r===null||s===null)&&(r=t,s=i);for(let p=0;p<m.length;p+=4){let g=2*t-r,_=2*i-s;r=+m[p]+t,s=+m[p+1]+i,t+=+m[p+2],i+=+m[p+3],this.bezierCurveTo(g,_,r,s,t,i)}break;case"Q":ke(f,m.length,4);for(let p=0;p<m.length;p+=4)n=+m[p],o=+m[p+1],t=+m[p+2],i=+m[p+3],this.quadraticCurveTo(n,o,t,i);break;case"q":ke(f,m.length,4);for(let p=0;p<m.length;p+=4)n=+m[p]+t,o=+m[p+1]+i,t+=+m[p+2],i+=+m[p+3],this.quadraticCurveTo(n,o,t,i);break;case"T":ke(f,m.length,2),(n===null||o===null)&&(n=t,o=i);for(let p=0;p<m.length;p+=2)n=2*t-n,o=2*i-o,t=+m[p],i=+m[p+1],this.quadraticCurveTo(n,o,t,i);break;case"t":ke(f,m.length,2),(n===null||o===null)&&(n=t,o=i);for(let p=0;p<m.length;p+=2)n=2*t-n,o=2*i-o,t+=+m[p],i+=+m[p+1],this.quadraticCurveTo(n,o,t,i);break;case"A":case"a":let b=f==="a";Gn(m),ke(f,m.length,7);for(let p=0;p<m.length;p+=7){let g=+m[p+5],_=+m[p+6];b&&(g+=t,_+=i);let y=en({px:t,py:i,rx:+m[p],ry:+m[p+1],xAxisRotation:+m[p+2],largeArcFlag:tn(+m[p+3]),sweepFlag:tn(+m[p+4]),cx:g,cy:_});x(y,v=>{this.bezierCurveTo(v.x1,v.y1,v.x2,v.y2,v.x,v.y),t=v.x,i=v.y})}break;case"Z":case"z":Yn(f,m.length,0),this.closePath();break}}}catch(c){this._operations.length=h,console.warn(`Error when parsing svgPath:
3
+ `+c.message+`
4
+ `+e)}}_runPath(e){e.beginPath(),x(this._operations,t=>{t.path(e)})}_render(e,t=0){super._render(e);let i=e.layer.dirty,r=this._isInteractive(e),s=this._ghostOnly(t),n=this._drawGhost(e,t);if(i||r||s){let o=e.layer.context,l=this._renderer._ghostLayer.context;i&&!s&&(o.globalCompositeOperation=this.blendMode,o.beginPath());let u;n&&(l.beginPath(),u=this._getColorId()),x(this._operations,h=>{i&&!s&&(h.path(o),h.colorize(o,void 0)),n&&(h.pathGhost(l),h.colorizeGhost(l,u))})}}renderDetached(e){if(this.visible){this._setMatrix(),e.save();let t=this.mask;t&&(t._setMatrix(),t._transform(e,1),t._runPath(e),e.clip()),e.globalAlpha=this.compoundAlpha*this.alpha,this._transform(e,1),this.filter&&(e.filter=this.filter),e.globalCompositeOperation=this.blendMode,e.beginPath(),x(this._operations,i=>{i.path(e),i.colorize(e,void 0)}),e.restore()}}_addBounds(e){this.visible&&this.isMeasured&&x(this._operations,t=>{t.addBounds(e)})}},zi=class extends Rt{constructor(e,t,i){super(e),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolution",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"textVisible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"truncated",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_textInfo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScale",{enumerable:!0,configurable:!0,writable:!0,value:1}),this.text=t,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_shared(e){this.style.textAlign&&(e.textAlign=this.style.textAlign),this.style.direction&&(e.direction=this.style.direction),this.style.textBaseline&&(e.textBaseline=this.style.textBaseline)}_prerender(e,t=!1,i=!1){super._render(e);let r=e.layer.context,s=this._renderer._ghostLayer.context,n=this.style,o=this._getFontStyle(void 0,i);r.font=o,this._isInteractive(e)&&!t&&(s.font=o),n.fill&&(n.fill instanceof O?r.fillStyle=n.fill.toCSS(n.fillOpacity!=null?n.fillOpacity:1):r.fillStyle=n.fill),n.shadowColor&&(e.layer.context.shadowColor=n.shadowColor.toCSS(n.shadowOpacity||1)),n.shadowBlur&&(e.layer.context.shadowBlur=n.shadowBlur),n.shadowOffsetX&&(e.layer.context.shadowOffsetX=n.shadowOffsetX),n.shadowOffsetY&&(e.layer.context.shadowOffsetY=n.shadowOffsetY),this._shared(r),this._isInteractive(e)&&!t&&(s.fillStyle=this._getColorId(),this._shared(s))}_getFontStyle(e,t=!1){let i=this.style,r=[];return e&&e.fontVariant?r.push(e.fontVariant):i.fontVariant&&r.push(i.fontVariant),t||(e&&e.fontWeight?r.push(e.fontWeight):i.fontWeight&&r.push(i.fontWeight)),e&&e.fontStyle?r.push(e.fontStyle):i.fontStyle&&r.push(i.fontStyle),e&&e.fontSize?(w(e.fontSize)&&(e.fontSize=e.fontSize+"px"),r.push(e.fontSize)):i.fontSize&&(w(i.fontSize)&&(i.fontSize=i.fontSize+"px"),r.push(i.fontSize)),e&&e.fontFamily?r.push(e.fontFamily):i.fontFamily?r.push(i.fontFamily):r.length&&r.push("Arial"),r.join(" ")}_render(e,t=0){if(this._textInfo||this._measure(e),this.textVisible){let i=this._isInteractive(e),r=e.layer.context,s=e.layer.dirty,n=this._renderer._ghostLayer.context,o=this._ghostOnly(t),l=this._drawGhost(e,t);r.save(),n.save(),this._prerender(e),x(this._textInfo,(u,h)=>{x(u.textChunks,(c,f)=>{if(c.style&&(r.save(),n.save(),o||(r.font=c.style),this._isInteractive(e)&&(n.font=c.style)),c.fill&&(r.save(),o||(r.fillStyle=c.fill.toCSS())),s&&!o&&r.fillText(c.text,c.offsetX,u.offsetY+c.offsetY),c.textDecoration=="underline"||c.textDecoration=="line-through"){let d=1,m=1,b=c.height,p=this.style.oversizedBehavior||"";if(["truncate","wrap","wrap-no-break"].indexOf(p)>-1){let y=this._measureText(c.text,r);c.width=y.actualBoundingBoxLeft+y.actualBoundingBoxRight}let g=c.offsetX;switch(this.style.textAlign){case"right":case"end":g-=c.width;break;case"center":g-=c.width/2;break}if(c.style)switch(oe.getTextStyle(c.style).fontWeight){case"bolder":case"bold":case"700":case"800":case"900":d=2;break}b&&(m=b/20);let _;c.textDecoration=="line-through"?_=d+u.offsetY+c.offsetY-c.height/2:_=d+m*1.5+u.offsetY+c.offsetY,o||(r.save(),r.beginPath(),c.fill?r.strokeStyle=c.fill.toCSS():this.style.fill&&this.style.fill instanceof O&&(r.strokeStyle=this.style.fill.toCSS()),r.lineWidth=d*m,r.moveTo(g,_),r.lineTo(g+c.width,_),r.stroke(),r.restore())}i&&this.interactive&&l&&n.fillText(c.text,c.offsetX,u.offsetY+c.offsetY),c.fill&&r.restore(),c.style&&(r.restore(),n.restore())})}),r.restore(),n.restore()}}_addBounds(e){if(this.visible&&this.isMeasured){let t=this._measure({inactive:this.inactive,layer:this.getLayer()});te(e,{x:t.left,y:t.top}),te(e,{x:t.right,y:t.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(e){let t=e.layer.context,i=this._renderer._ghostLayer.context,r=this.style.direction=="rtl";this._textInfo=[];let s=this.style.oversizedBehavior,n=this.style.maxWidth,o=w(n)&&s=="truncate",l=w(n)&&(s=="wrap"||s=="wrap-no-break");t.save(),i.save(),this._prerender(e,!0,this._ignoreFontWeight());let u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",h=this.text.toString().replace(/\r/g,"").split(/\n/),c=!0,f=0,d=0,m=0,b;x(h,(g,_)=>{let y;for(g==""?y=[{type:"value",text:""}]:y=oe.chunk(g,!1,this.style.ignoreFormatting);y.length>0;){let v={offsetY:m,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},T=this._measureText(u,t),j=T.actualBoundingBoxAscent+T.actualBoundingBoxDescent;v.height=j,v.ascent=T.actualBoundingBoxAscent;let D,$=this.style.textDecoration,L,E,k=!1,H=!0,P=[],C;Zt(y,(B,$e)=>{if(B.type=="format")if(B.text=="[/]")c||(t.restore(),i.restore(),c=!0),L=void 0,b=void 0,E=void 0,$=this.style.textDecoration,C=void 0,D=B.text;else{c||(t.restore(),i.restore());let F=oe.getTextStyle(B.text),q=this._getFontStyle(F);t.save(),i.save(),t.font=q,b=q,D=B.text,F.textDecoration&&($=F.textDecoration),F.fill&&(L=F.fill),F.width&&(E=le(F.width)),F.verticalAlign&&(C=F.verticalAlign),c=!1;let ae=this._measureText(u,t),ge=ae.actualBoundingBoxAscent+ae.actualBoundingBoxDescent;ge>v.height&&(v.height=ge),ae.actualBoundingBoxAscent>v.ascent&&(v.ascent=ae.actualBoundingBoxAscent)}else if(B.type=="value"&&!k){let F=this._measureText(B.text,t),q=F.actualBoundingBoxLeft+F.actualBoundingBoxRight;if(o){this.truncated=void 0;let pe=H||this.style.breakWords||!1,Ae=this.style.ellipsis||"",St=this._measureText(Ae,t),Be=St.actualBoundingBoxLeft+St.actualBoundingBoxRight;if(v.width+q>n){let Xt=n-v.width-Be;B.text=this._truncateText(t,B.text,Xt,pe),B.text+=Ae,k=!0,this.truncated=!0}}else if(l&&v.width+q>n){let pe=n-v.width,Ae=this._truncateText(t,B.text,pe,!1,H&&this.style.oversizedBehavior!="wrap-no-break");if(Ae=="")return this.textVisible=!0,!1;P=y.slice($e+1),lt(Ae)!=lt(B.text)&&(P.unshift({type:"value",text:B.text.substr(Ae.length)}),D&&P.unshift({type:"format",text:D})),B.text=lt(Ae),y=[],k=!0}let ae=1,ge=1;if(b&&E&&E>q){let pe=q/E;switch(this.style.textAlign){case"right":case"end":ae=pe;break;case"center":ae=pe,ge=pe;break;default:ge=pe}q=E}let We=F.actualBoundingBoxAscent+F.actualBoundingBoxDescent;We>v.height&&(v.height=We),F.actualBoundingBoxAscent>v.ascent&&(v.ascent=F.actualBoundingBoxAscent),v.width+=q,v.left+=F.actualBoundingBoxLeft/ae,v.right+=F.actualBoundingBoxRight/ge,v.textChunks.push({style:b,fill:L,text:B.text,width:q,height:We,left:F.actualBoundingBoxLeft,right:F.actualBoundingBoxRight,ascent:F.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:$,verticalAlign:C}),H=!1}return!0}),this.style.lineHeight instanceof A?(v.height*=this.style.lineHeight.value,v.ascent*=this.style.lineHeight.value):(v.height*=this.style.lineHeight||1.2,v.ascent*=this.style.lineHeight||1.2),f<v.left&&(f=v.left),d<v.right&&(d=v.right),this._textInfo.push(v),m+=v.height,y=P||[]}}),c||(t.restore(),i.restore()),x(this._textInfo,(g,_)=>{let y=0;x(g.textChunks,v=>{if(v.offsetX=y+v.left-g.left,v.offsetY+=g.height-g.height*(this.style.baselineRatio||.19),y+=v.width*(r?-1:1),v.verticalAlign)switch(v.verticalAlign){case"super":v.offsetY-=g.height/2-v.height/2;break;case"sub":v.offsetY+=v.height/2;break}})});let p={left:r?-d:-f,top:0,right:r?f:d,bottom:m};if(s!=="none"){let g=this._fitRatio(p);if(g<1)if(s=="fit")w(this.style.minScale)&&g<this.style.minScale?(this.textVisible=!1,p.left=0,p.top=0,p.right=0,p.bottom=0):(this._originalScale||(this._originalScale=this.scale),this.scale=g,this.textVisible=!0);else if(s=="hide")this.textVisible=!1,p.left=0,p.top=0,p.right=0,p.bottom=0;else{switch(this.style.textAlign){case"right":case"end":p.left=r?n:-n,p.right=0;break;case"center":p.left=-n/2,p.right=n/2;break;default:p.left=0,p.right=r?-n:n}this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}else this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}return t.restore(),i.restore(),p}_fitRatio(e){let t=this.style.maxWidth,i=this.style.maxHeight;if(!w(t)&&!w(i))return 1;let r=e.right-e.left,s=e.bottom-e.top;return Math.min(t/r||1,i/s||1)}_truncateText(e,t,i,r=!1,s=!0){let n;do{if(r)t=t.slice(0,-1);else{let l=t.replace(/[^,;:!?\\\/\s​]+[,;:!?\\\/\s​]*$/g,"");if((l==""||l===t)&&s)r=!0;else{if(l=="")return t;t=l}}let o=this._measureText(t,e);n=o.actualBoundingBoxLeft+o.actualBoundingBoxRight}while(n>i&&t!="");return t}_measureText(e,t){let i=t.measureText(e),r={};if(i.actualBoundingBoxAscent==null){let n=document.createElement("div");n.innerText=e,n.style.visibility="hidden",n.style.position="absolute",n.style.top="-1000000px;",n.style.fontFamily=this.style.fontFamily||"",n.style.fontSize=this.style.fontSize+"",document.body.appendChild(n);let o=n.getBoundingClientRect();document.body.removeChild(n);let l=o.height,u=i.width;r={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:u,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:u}}else r={actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,fontBoundingBoxAscent:i.actualBoundingBoxAscent,fontBoundingBoxDescent:i.actualBoundingBoxDescent,width:i.width};let s=i.width;switch(this.style.textAlign){case"right":case"end":r.actualBoundingBoxLeft=s,r.actualBoundingBoxRight=0;break;case"center":r.actualBoundingBoxLeft=s/2,r.actualBoundingBoxRight=s/2;break;default:r.actualBoundingBoxLeft=0,r.actualBoundingBoxRight=s}return r}},Kr=class{constructor(){Object.defineProperty(this,"fill",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fillOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textAlign",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontFamily",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontWeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fontVariant",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textDecoration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowBlur",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineHeight",{enumerable:!0,configurable:!0,writable:!0,value:be(120)}),Object.defineProperty(this,"baselineRatio",{enumerable:!0,configurable:!0,writable:!0,value:.19}),Object.defineProperty(this,"direction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textBaseline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oversizedBehavior",{enumerable:!0,configurable:!0,writable:!0,value:"none"}),Object.defineProperty(this,"breakWords",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ellipsis",{enumerable:!0,configurable:!0,writable:!0,value:"\u2026"}),Object.defineProperty(this,"maxWidth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxHeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minScale",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ignoreFormatting",{enumerable:!0,configurable:!0,writable:!0,value:!1})}},Zr=class extends zi{constructor(){super(...arguments),Object.defineProperty(this,"textType",{enumerable:!0,configurable:!0,writable:!0,value:"circular"}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inside",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"orientation",{enumerable:!0,configurable:!0,writable:!0,value:"auto"}),Object.defineProperty(this,"kerning",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_textReversed",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_render(e,t=0){switch(this.textType){case"circular":this._renderCircular(e,t);break;default:super._render(e,t);break}}_renderCircular(e,t=0){if(this.textVisible){this._prerender(e);let i=this._isInteractive(e),r=e.layer.context,s=e.layer.dirty,n=this._renderer._ghostLayer.context;r.save(),i&&n.save(),this._textInfo||this._measure(e);let o=this.radius||0,l=this.startAngle||0,u=0,h=this.orientation,c=h=="auto"?"auto":h=="inward",f=this.inside,d=this.style.textAlign||"left",m=this.kerning||0,b=d=="left"?1:-1,p=!this._textReversed,g=this._ghostOnly(t),_=this._drawGhost(e,t);if(c=="auto"){let y=0,v=0;x(this._textInfo,(T,j)=>{let D=l+T.width/(o-T.height)/2*-b;D>y&&(y=D)}),d=="left"?v=(y+u/2)*Mt:d=="right"?v=(y-u/2)*Mt:v=l*Mt,v=Et(v),c=v>=270||v<=90}c==!0&&p&&(this._textInfo.reverse(),this._textReversed=!0),x(this._textInfo,(y,v)=>{let T=y.height;f||(o+=T),(b==-1&&c||b==1&&!c)&&p&&y.textChunks.reverse();let j=l;u=0,d=="center"&&(j+=y.width/(o-T)/2*-b,u=j-l),j+=Math.PI*(c?0:1),r.save(),i&&n.save(),g||r.rotate(j),i&&n.rotate(j);let D=0;x(y.textChunks,($,L)=>{let E=$.text,k=$.width;D=k/2/(o-T)*b,g||r.rotate(D),i&&n.rotate(D),$.style&&(r.save(),n.save(),g||(r.font=$.style),i&&(n.font=$.style)),$.fill&&(r.save(),g||(r.fillStyle=$.fill.toCSS())),g||(r.textBaseline="middle",r.textAlign="center"),i&&(n.textBaseline="middle",n.textAlign="center"),s&&!g&&r.fillText(E,0,(c?1:-1)*(0-o+T/2)),i&&_&&n.fillText(E,0,(c?1:-1)*(0-o+T/2)),$.fill&&r.restore(),$.style&&(r.restore(),n.restore()),D=(k/2+m)/(o-T)*b,g||r.rotate(D),i&&n.rotate(D)}),r.restore(),i&&n.restore(),f&&(o-=T)}),r.restore(),i&&n.restore()}}_measure(e){switch(this.textType){case"circular":return this._measureCircular(e);default:return super._measure(e)}}_measureCircular(e){let t=e.layer.context,i=this._renderer._ghostLayer.context,r=this.style.direction=="rtl",s=this.style.oversizedBehavior,n=this.style.maxWidth,o=w(n)&&s=="truncate",l=this.style.ellipsis||"",u;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,t.save(),i.save(),this._prerender(e,!0);let h=this.text.toString().replace(/\r/g,"").split(/\n/),c=!0,f=0,d=0;return x(h,(m,b)=>{let p=oe.chunk(m,!1,this.style.ignoreFormatting),g={offsetY:d,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},_,y,v;x(p,(T,j)=>{if(T.type=="format"){if(T.text=="[/]")c||(t.restore(),i.restore(),c=!0),y=void 0,_=void 0,v=void 0;else{let D=oe.getTextStyle(T.text),$=this._getFontStyle(D);t.save(),i.save(),t.font=$,_=$,D.fill&&(y=D.fill),D.width&&(v=le(D.width)),c=!1}o&&(u=this._measureText(l,t))}else if(T.type=="value"){let D=T.text.match(/./ug)||[];r&&(D=Is(T.text),D.reverse());for(let $=0;$<D.length;$++){let L=D[$],E=this._measureText(L,t),k=E.width;_&&v&&v>k&&(k=v);let H=E.actualBoundingBoxAscent+E.actualBoundingBoxDescent;if(H>g.height&&(g.height=H),E.actualBoundingBoxAscent>g.ascent&&(g.ascent=E.actualBoundingBoxAscent),f+=k,o){u||(u=this._measureText(l,t));let P=u.actualBoundingBoxLeft+u.actualBoundingBoxRight;if(f+P>n){g.textChunks.length==1?this.textVisible=!1:(g.width+=P,g.left+=u.actualBoundingBoxLeft,g.right+=u.actualBoundingBoxRight,g.textChunks.push({style:_,fill:y,text:l,width:P,height:H+u.actualBoundingBoxDescent,left:u.actualBoundingBoxLeft,right:u.actualBoundingBoxRight,ascent:u.actualBoundingBoxAscent,offsetX:0,offsetY:H,textDecoration:void 0}));break}}g.width+=k,g.left+=E.actualBoundingBoxLeft,g.right+=E.actualBoundingBoxRight,g.textChunks.push({style:_,fill:y,text:L,width:k,height:H+E.actualBoundingBoxDescent,left:E.actualBoundingBoxLeft,right:E.actualBoundingBoxRight,ascent:E.actualBoundingBoxAscent,offsetX:0,offsetY:H,textDecoration:void 0})}}}),this.style.lineHeight instanceof A?g.height*=this.style.lineHeight.value:g.height*=this.style.lineHeight||1.2,this._textInfo.push(g),d+=g.height}),c||(t.restore(),i.restore()),s=="hide"&&f>n&&(this.textVisible=!1),x(this._textInfo,m=>{x(m.textChunks,b=>{b.offsetY+=Math.round((m.height-b.height+(m.ascent-b.ascent))/2)})}),t.restore(),i.restore(),{left:0,top:0,right:0,bottom:0}}},qr=class extends Rt{constructor(e,t){super(e),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tainted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowBlur",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shadowOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imageMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.image=t}_dispose(){super._dispose(),this._imageMask&&hi(this._imageMask)}getLocalBounds(){if(!this._localBounds){let e=0,t=0;this.width&&(e=this.width),this.height&&(t=this.height),this._localBounds={left:0,top:0,right:e,bottom:t},this._addBounds(this._localBounds)}return this._localBounds}_render(e,t=0){if(super._render(e),this.image){if(this.tainted===void 0&&(this.tainted=rn(this.image),e.layer.tainted=!0),this.tainted&&this._renderer._omitTainted)return;let i=this._ghostOnly(t),r=this._drawGhost(e,t);if(e.layer.dirty&&!i){this.shadowColor&&(e.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(e.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(e.layer.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(e.layer.context.shadowOffsetY=this.shadowOffsetY);let s=this.width||this.image.naturalWidth,n=this.height||this.image.naturalHeight;e.layer.context.drawImage(this.image,0,0,s,n)}if(this.interactive&&this._isInteractive(e)&&r){let s=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(s,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}_getMask(e){if(this._imageMask===void 0){let t=this.width||e.naturalWidth,i=this.height||e.naturalHeight,r=document.createElement("canvas");r.width=t,r.height=i;let s=r.getContext("2d");s.imageSmoothingEnabled=!1,s.fillStyle=this._getColorId(),s.fillRect(0,0,t,i),rn(e)||(s.globalCompositeOperation="destination-in",s.drawImage(e,0,0,t,i)),this._imageMask=r}return this._imageMask}},Jr=class{constructor(e,t,i,r){Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"originalPoint",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"point",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"bbox",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"simulated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"native",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Je("touchevents")&&e instanceof Touch?this.id=e.identifier:this.id=null}},Wi=class extends wi{constructor(e){if(super(),Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("div")}),Object.defineProperty(this,"_layerDom",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("div")}),Object.defineProperty(this,"layers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_dirtyLayers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"defaultLayer",{enumerable:!0,configurable:!0,writable:!0,value:this.getLayer(0)}),Object.defineProperty(this,"_ghostLayer",{enumerable:!0,configurable:!0,writable:!0,value:new Qr}),Object.defineProperty(this,"_deferredGhostLayers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_patternCanvas",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("canvas")}),Object.defineProperty(this,"_patternContext",{enumerable:!0,configurable:!0,writable:!0,value:this._patternCanvas.getContext("2d")}),Object.defineProperty(this,"_realWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_realHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_calculatedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_calculatedHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"resolution",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interactionsEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_listeners",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_events",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_colorId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_colorMap",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_forceInteractive",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_omitTainted",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_hovering",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"_dragging",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_mousedown",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_lastPointerMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tapToActivate",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"tapToActivateTimeout",{enumerable:!0,configurable:!0,writable:!0,value:3e3}),Object.defineProperty(this,"_touchActive",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_touchActiveTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),e==null?this.resolution=window.devicePixelRatio:this.resolution=e,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new U(()=>{N(this._events,(t,i)=>{i.disposer.dispose()}),x(this.layers,t=>{hi(t.view),t.exportableView&&hi(t.exportableView)}),hi(this._ghostLayer.view),hi(this._patternCanvas)})),this._disposers.push(Ti(()=>{e==null&&(this.resolution=window.devicePixelRatio)})),Je("touchevents")){let t=i=>{this._dragging.length!==0&&Zt(this._dragging,r=>r.value.shouldCancelTouch()?(i.preventDefault(),!1):!0),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(V(window,"touchstart",t,{passive:!1})),this._disposers.push(V(this.view,"touchstart",t,{passive:!1})),this._disposers.push(V(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(V(window,"click",i=>{this._touchActive=!1},{passive:!0})),this._disposers.push(V(this.view,"click",i=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}Je("wheelevents")&&this._disposers.push(V(this.view,"wheel",t=>{let i=!1;this._hovering.forEach(r=>{if(r.wheelable)return i=!0,!1}),i&&t.preventDefault()},{passive:!1}))}resetImageArray(){this._ghostLayer.imageArray=void 0}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(e){e?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(e,t,i,r){return this.defaultLayer.context.createLinearGradient(e,t,i,r)}createRadialGradient(e,t,i,r,s,n){return this.defaultLayer.context.createRadialGradient(e,t,i,r,s,n)}createPattern(e,t,i,r,s){return this._patternCanvas.width=r,this._patternCanvas.height=s,this._patternContext.clearRect(0,0,r,s),t.renderDetached(this._patternContext),e.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,i)}makeContainer(){return new jr(this)}makeGraphics(){return new Xr(this)}makeText(e,t){return new zi(this,e,t)}makeTextStyle(){return new Kr}makeRadialText(e,t){return new Zr(this,e,t)}makePicture(e){return new qr(this,e)}resizeLayer(e){e.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resize(e,t,i,r){this._realWidth=e,this._realHeight=t,this._calculatedWidth=i,this._calculatedHeight=r,x(this.layers,s=>{s&&(s.dirty=!0,this.resizeLayer(s))}),this.resizeGhost(),this.view.style.width=i+"px",this.view.style.height=r+"px"}createDetachedLayer(e=!1){let t=document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:e}),r=new es(t,i);return t.style.position="absolute",t.style.top="0px",t.style.left="0px",r}getLayerByOrder(e){let t=this.layers,i=t.length;for(let r=0;r<i;r++){let s=t[r];if(s.order==e)return s}}getLayer(e,t=!0){let i=this.getLayerByOrder(e);if(i)return i;let r=this.createDetachedLayer(e==99);r.order=e,r.visible=t,r.view.className="am5-layer-"+e,r.visible&&this.resizeLayer(r);let s=this.layers;s.push(r),s.sort((u,h)=>u.order>h.order?1:u.order<h.order?-1:0);let n=s.length,o=Ue(s,r),l;for(let u=o+1;u<n;u++)if(s[u].visible){l=s[u];break}return r.visible&&(l===void 0?this._layerDom.appendChild(r.view):this._layerDom.insertBefore(r.view,l.view)),r}render(e){this._dirtyLayers.length=0,this._deferredGhostLayers=[],x(this.layers,i=>{i&&i.dirty&&i.visible&&(this._dirtyLayers.push(i),i.clear())}),this._ghostLayer.clear(),e.render({inactive:null,layer:this.defaultLayer});let t=this._deferredGhostLayers;if(t.length&&(t.sort((i,r)=>i-r),x(t,i=>{e.render({inactive:null,layer:this.defaultLayer},i)})),this._ghostLayer.context.restore(),x(this.layers,i=>{if(i){let r=i.context;r.beginPath(),r.moveTo(0,0),r.stroke()}}),x(this._dirtyLayers,i=>{i.context.restore(),i.dirty=!1}),this._hovering.size&&this._lastPointerMoveEvent){let{events:i,target:r,native:s}=this._lastPointerMoveEvent;x(i,n=>{this._dispatchGlobalMousemove(n,r,s)})}}paintId(e){let t=Xn(++this._colorId),i=O.fromHex(t).toCSS();return this._colorMap[i]=e,i}_removeObject(e){e._colorId!==void 0&&delete this._colorMap[e._colorId]}_adjustBoundingBox(e){let t=this._ghostLayer.margin;return new DOMRect(-t.left,-t.top,e.width+t.left+t.right,e.height+t.top+t.bottom)}getEvent(e,t=!0){let i=this.view.getBoundingClientRect(),r=e.clientX||0,s=e.clientY||0,n=this._calculatedWidth/this._realWidth,o=this._calculatedHeight/this._realHeight,l={x:r-i.left,y:s-i.top},u={x:(r-(t?i.left:0))*n,y:(s-(t?i.top:0))*o};return new Jr(e,l,u,this._adjustBoundingBox(i))}_getHitTarget(e,t,i){if(t.width===0||t.height===0||e.x<t.left||e.x>t.right||e.y<t.top||e.y>t.bottom||!i||!this._layerDom.contains(i))return;let r=this._ghostLayer.getImageData(e,t);if(r.data[0]===0&&r.data[1]===0&&r.data[2]===0)return!1;let s=O.fromRGB(r.data[0],r.data[1],r.data[2]).toCSS();return this._colorMap[s]}getObjectAtPoint(e){let t=this._ghostLayer.getImageArray(e);if(t[0]===0&&t[1]===0&&t[2]===0)return;let i=O.fromRGB(t[0],t[1],t[2]).toCSS();return this._colorMap[i]}_withEvents(e,t){let i=this._events[e];if(i!==void 0){i.dispatching=!0;try{t(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,bt(i.callbacks,r=>!r.disposed),i.callbacks.length===0&&(i.disposer.dispose(),delete this._events[e]))}}}_dispatchEventAll(e,t){this.interactionsEnabled&&this._withEvents(e,i=>{x(i.callbacks,r=>{r.disposed||r.callback.call(r.context,t)})})}_dispatchEvent(e,t,i){if(!this.interactionsEnabled)return!1;let r=!1;return this._withEvents(e,s=>{x(s.callbacks,n=>{!n.disposed&&n.object===t&&(n.callback.call(n.context,i),r=!0)})}),r}_dispatchMousedown(e,t){let i=e.button;if(i!=0&&i!=2&&i!=1&&i!==void 0)return;let r=this.getEvent(e),s=this._getHitTarget(r.originalPoint,r.bbox,t);if(s){let n=r.id,o=!1;Fi(s,l=>{let u={id:n,value:l};return this._mousedown.push(u),!o&&this._dispatchEvent("pointerdown",l,r)&&(o=!0,this._dragging.some(c=>c.value===l&&c.id===n)||this._dragging.push(u)),!0})}}_dispatchGlobalMousemove(e,t,i){let r=this.getEvent(e),s=this._getHitTarget(r.originalPoint,r.bbox,t);r.native=i,s?(this._hovering.forEach(n=>{n.contains(s)||(this._hovering.delete(n),n.cursorOverStyle&&Jt(document.body,"cursor",n._replacedCursorStyle),this._dispatchEvent("pointerout",n,r))}),r.native&&Fi(s,n=>(this._hovering.has(n)||(this._hovering.add(n),n.cursorOverStyle&&(n._replacedCursorStyle=$s(document.body,"cursor"),Jt(document.body,"cursor",n.cursorOverStyle)),this._dispatchEvent("pointerover",n,r)),!0))):(this._hovering.forEach(n=>{n.cursorOverStyle&&Jt(document.body,"cursor",n._replacedCursorStyle),this._dispatchEvent("pointerout",n,r)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",r)}removeHovering(e){this._hovering.delete(e),e.cursorOverStyle&&Jt(document.body,"cursor",e._replacedCursorStyle)}_dispatchGlobalMouseup(e,t){let i=this.getEvent(e);i.native=t,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(e){if(this._dragging.length!==0){let t=this.getEvent(e),i=t.id;this._dragging.forEach(r=>{r.id===i&&this._dispatchEvent("pointermove",r.value,t)})}}_dispatchDragEnd(e,t){let i=e.button,r;if(i==0||i===void 0)r="click";else if(i==2)r="rightclick";else if(i==1)r="middleclick";else return;let s=this.getEvent(e),n=s.id;if(this._mousedown.length!==0){let o=this._getHitTarget(s.originalPoint,s.bbox,t);o&&this._mousedown.forEach(l=>{l.id===n&&l.value.contains(o)&&this._dispatchEvent(r,l.value,s)}),this._mousedown.length=0}this._dragging.length!==0&&(this._dragging.forEach(o=>{o.id===n&&this._dispatchEvent("pointerup",o.value,s)}),this._dragging.length=0)}_dispatchDoubleClick(e,t){let i=this.getEvent(e),r=this._getHitTarget(i.originalPoint,i.bbox,t);r&&Fi(r,s=>!this._dispatchEvent("dblclick",s,i))}_dispatchWheel(e,t){let i=this.getEvent(e),r=this._getHitTarget(i.originalPoint,i.bbox,t);r&&Fi(r,s=>!this._dispatchEvent("wheel",s,i))}_makeSharedEvent(e,t){if(this._listeners[e]===void 0){let i=t();this._listeners[e]=new Ct(()=>{delete this._listeners[e],i.dispose()})}return this._listeners[e].increment()}_onPointerEvent(e,t){let i=!1,r=null;function s(){r=null,i=!1}return new se([new U(()=>{r!==null&&clearTimeout(r),s()}),V(this.view,Oi(e),n=>{i=!0,r!==null&&clearTimeout(r),r=window.setTimeout(s,0)}),Kn(window,e,(n,o)=>{r!==null&&(clearTimeout(r),r=null),t(n,o,i),i=!1})])}_initEvent(e){switch(e){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{let t=(i,r,s)=>{this._lastPointerMoveEvent={events:i,target:r,native:s},x(i,n=>{this._dispatchGlobalMousemove(n,r,s)})};return new se([this._onPointerEvent("pointerdown",t),this._onPointerEvent("pointermove",t)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{let t=this._onPointerEvent("pointerup",(r,s,n)=>{x(r,o=>{this._dispatchGlobalMouseup(o,n)}),this._lastPointerMoveEvent={events:r,target:s,native:n}}),i=this._onPointerEvent("pointercancel",(r,s,n)=>{x(r,o=>{this._dispatchGlobalMouseup(o,n)}),this._lastPointerMoveEvent={events:r,target:s,native:n}});return new U(()=>{t.dispose(),i.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{let t=this._onPointerEvent("pointerdown",(n,o)=>{x(n,l=>{this._dispatchMousedown(l,o)})}),i=this._onPointerEvent("pointermove",n=>{x(n,o=>{this._dispatchDragMove(o)})}),r=this._onPointerEvent("pointerup",(n,o)=>{x(n,l=>{this._dispatchDragEnd(l,o)})}),s=this._onPointerEvent("pointercancel",(n,o)=>{x(n,l=>{this._dispatchDragEnd(l,o)})});return new U(()=>{t.dispose(),i.dispose(),r.dispose(),s.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(t,i)=>{x(t,r=>{this._dispatchDoubleClick(r,i)})}));case"wheel":return this._makeSharedEvent("wheel",()=>V(this.view,Oi("wheel"),t=>{this._dispatchWheel(t,ur(t))},{passive:!1}))}}_addEvent(e,t,i,r){let s=this._events[t];s===void 0&&(s=this._events[t]={disposer:this._initEvent(t),callbacks:[],dispatching:!1,cleanup:!1});let n={object:e,context:r,callback:i,disposed:!1};return s.callbacks.push(n),new U(()=>{n.disposed=!0,s.dispatching?s.cleanup=!0:(re(s.callbacks,n),s.callbacks.length===0&&(s.disposer.dispose(),delete this._events[t]))})}getCanvas(e,t){this.render(e),t||(t={});let i=this.resolution,r=Math.floor(this._calculatedWidth*this.resolution),s=Math.floor(this._calculatedHeight*this.resolution);if(t.minWidth&&t.minWidth>r){let d=t.minWidth/r;d>i&&(i=d*this.resolution)}if(t.minHeight&&t.minHeight>s){let d=t.minHeight/s;d>i&&(i=d*this.resolution)}if(t.maxWidth&&t.maxWidth<r){let d=t.maxWidth/r;d<i&&(i=d*this.resolution)}if(t.maxHeight&&t.maxHeight>s){let d=t.maxHeight/s;d<i&&(i=d*this.resolution)}t.maintainPixelRatio&&(i/=this.resolution);let n=[],o=!1,l=document.createElement("canvas");i!=this.resolution&&(o=!0,r=r*i/this.resolution,s=s*i/this.resolution),l.width=r,l.height=s,l.style.position="fixed",l.style.top="-10000px",this.view.appendChild(l),n.push(l);let u=l.getContext("2d"),h=0,c=0,f=!1;return x(this.layers,d=>{if(d&&d.visible&&(d.tainted||o)){f=!0,d.exportableView=d.view,d.exportableContext=d.context,d.view=document.createElement("canvas"),d.view.style.position="fixed",d.view.style.top="-10000px",this.view.appendChild(d.view),n.push(d.view);let m=0,b=0;d.margin&&(m+=d.margin.left||0+d.margin.right||0,b+=d.margin.top||0+d.margin.bottom||0),d.view.width=r+m,d.view.height=s+b,d.context=d.view.getContext("2d"),d.dirty=!0,d.scale=i}}),f&&(this._omitTainted=!0,this.render(e),this._omitTainted=!1),x(this.layers,d=>{if(d&&d.visible){let m=0,b=0;d.margin&&(m=-(d.margin.left||0)*this.resolution,b=-(d.margin.top||0)*this.resolution),u.drawImage(d.view,m,b),d.exportableView&&(d.view=d.exportableView,d.exportableView=void 0),d.exportableContext&&(d.context=d.exportableContext,d.exportableContext=void 0),h<d.view.clientWidth&&(h=d.view.clientWidth),c<d.view.clientHeight&&(c=d.view.clientHeight),d.scale=void 0}}),l.style.width=h+"px",l.style.height=c+"px",x(n,d=>{d.style.position="",d.style.top="",this.view.removeChild(d)}),l}},Qr=class{constructor(){Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"margin",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_resolution",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_height",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"imageArray",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.view=document.createElement("canvas"),this.context=this.view.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.view.style.position="absolute",this.view.style.top="0px",this.view.style.left="0px"}resize(e,t,i,r,s){this._resolution=s,e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,r+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px",this._width=Math.floor(e*s),this._height=Math.floor(t*s),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=r+"px"}getImageData(e,t){return this.context.getImageData(Math.round((e.x-t.left)/t.width*this._width),Math.round((e.y-t.top)/t.height*this._height),1,1)}getImageArray(e){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);let t=this.imageArray,i=Math.round(e.x*this._resolution),s=(Math.round(e.y*this._resolution)*this._width+i)*4;return[t[s],t[s+1],t[s+2],t[s+3]]}setMargin(e){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,x(e,t=>{t.margin&&(this.margin.left=Math.max(this.margin.left,t.margin.left),this.margin.right=Math.max(this.margin.right,t.margin.right),this.margin.top=Math.max(this.margin.top,t.margin.top),this.margin.bottom=Math.max(this.margin.bottom,t.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}},es=class{constructor(e,t){Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tainted",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"margin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"order",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"visible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scale",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dirty",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"exportableView",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"exportableContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_height",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.view=e,this.context=t}resize(e,t,i,r,s){this.width!=null&&(e=this.width,i=this.width),this.height!=null&&(t=this.height,r=this.height),this.margin?(e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,r+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px"):(this.view.style.left="0px",this.view.style.top="0px"),this._width=Math.floor(e*s),this._height=Math.floor(t*s),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=r+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}};function nn(a,e){a==null?requestAnimationFrame(e):setTimeout(()=>{requestAnimationFrame(e)},1e3/a)}var ts=class a{constructor(e,t={},i){if(Object.defineProperty(this,"dom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_inner",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDirtyParents",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDirtyAnimation",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dirty",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyParents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyBounds",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyPositions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_ticker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_tickers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_updateTick",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"skipRenderFrame",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new De}),Object.defineProperty(this,"animationTime",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_animations",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rootContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tooltipContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipContainerSettings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltip",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"language",{enumerable:!0,configurable:!0,writable:!0,value:Ii.new(this,{})}),Object.defineProperty(this,"locale",{enumerable:!0,configurable:!0,writable:!0,value:Li}),Object.defineProperty(this,"utc",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timezone",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fps",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"numberFormatter",{enumerable:!0,configurable:!0,writable:!0,value:ni.new(this,{})}),Object.defineProperty(this,"dateFormatter",{enumerable:!0,configurable:!0,writable:!0,value:oi.new(this,{})}),Object.defineProperty(this,"durationFormatter",{enumerable:!0,configurable:!0,writable:!0,value:Ri.new(this,{})}),Object.defineProperty(this,"tabindex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_tabindexes",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_a11yD",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_focusElementDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_focusElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_focusedSprite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isShift",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_keyboardDragPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_readerAlertElement",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_skipNextGroupJump",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_logo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipDiv",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nonce",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interfaceColors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verticalLayout",{enumerable:!0,configurable:!0,writable:!0,value:Xe.new(this,{})}),Object.defineProperty(this,"horizontalLayout",{enumerable:!0,configurable:!0,writable:!0,value:Ge.new(this,{})}),Object.defineProperty(this,"gridLayout",{enumerable:!0,configurable:!0,writable:!0,value:Ee.new(this,{})}),Object.defineProperty(this,"_paused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"autoResize",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_fontHash",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"_isDisposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_resizeSensorDisposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltips",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_htmlElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_htmlEnabledContainers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"entitiesById",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_systemTooltip",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=t,t.accessible==!1&&(this._a11yD=!0),t.useSafeResolution==null&&(t.useSafeResolution=!0);let r;t.useSafeResolution&&(r=As()),this._renderer=new Wi(r);let s;if(e instanceof HTMLElement?s=e:s=document.getElementById(e),x(Oe.rootElements,l=>{if(l.dom===s)if(Oe.autoDispose)l.dispose();else throw new Error("You cannot have multiple Roots on the same DOM node")}),this.interfaceColors=xt.new(this,{}),s===null)throw new Error("Could not find HTML element with id `"+e+"`");this.dom=s;let n=document.createElement("div");n.style.position="relative",n.style.width="100%",n.style.height="100%",s.appendChild(n);let o=t.tooltipContainerBounds;o&&(this._tooltipContainerSettings=o),this._inner=n,this._updateComputedStyles(),Oe.rootElements.push(this)}static new(e,t){let i=new a(e,t,!0);return i._init(),i}moveDOM(e){let t;if(e instanceof HTMLElement?t=e:t=document.getElementById(e),t){for(;this.dom.childNodes.length>0;)t.appendChild(this.dom.childNodes[0]);this.dom=t,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){let e=this.dom.offsetWidth,t=this.dom.offsetHeight;e<=150||t<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){let e=this.tooltipContainer.children.push(R.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:be(100),centerY:M,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:M,cursorOverStyle:"pointer",background:Pe.new(this,{fill:Le(4671320),fillOpacity:0,tooltipY:5})}));e.set("tooltip",this.systemTooltip),e.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),e.states.create("hover",{});let t=e.children.push(Z.new(this,{stroke:Le(13421772),strokeWidth:3,svgPath:"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6",dx:-50,strokeOpacity:0}));t.states.create("hover",{stroke:Le(3976191)});let i=e.children.push(Z.new(this,{stroke:Le(8947848),strokeWidth:3,svgPath:"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0",dx:50,strokeOpacity:0})),r=Qe(Ne),s=1500;e.setTimeout(()=>{i.animate({key:"strokeOpacity",to:1,duration:s,easing:r}),i.animate({key:"dx",to:0,duration:s,easing:r}),t.animate({key:"dx",to:0,duration:s,easing:r}),t.animate({key:"strokeOpacity",to:1,duration:s,easing:r})},3e3),i.states.create("hover",{stroke:Le(4671320)}),this._logo=e,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(e){return this._settings.calculateSize?this._settings.calculateSize(e):{width:e.width,height:e.height}}_init(){let e=this._settings;e.accessible!==!1&&(e.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),e.ariaLabel&&this._inner.setAttribute("aria-label",e.ariaLabel),e.role&&this._inner.setAttribute("role",e.role));let t=this._renderer,i=this._getRealSize(),r=this._getCalculatedSize(i),s=Math.floor(r.width),n=Math.floor(r.height),o=Math.floor(i.width),l=Math.floor(i.height),u=R.new(this,{visible:!0,width:s,height:n});this._rootContainer=u,this._rootContainer._defaultThemes.push(Hi.new(this));let h=u.children.push(R.new(this,{visible:!0,width:M,height:M}));this.container=h,t.resize(o,l,s,n),this._inner.appendChild(t.view),this._initResizeSensor();let c=document.createElement("div");if(this._htmlElementContainer=c,c.className="am5-html-container",c.style.position="absolute",c.style.pointerEvents="none",this._tooltipContainerSettings||(c.style.overflow="hidden"),this._inner.appendChild(c),this._a11yD!==!0){let f=document.createElement("div");f.className="am5-reader-container",f.setAttribute("role","alert"),f.style.position="absolute",f.style.width="1px",f.style.height="1px",f.style.overflow="hidden",f.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=f,this._inner.appendChild(this._readerAlertElement);let d=document.createElement("div");d.className="am5-focus-container",d.style.position="absolute",d.style.pointerEvents="none",d.style.top="0px",d.style.left="0px",d.style.overflow="hidden",d.style.width=s+"px",d.style.height=n+"px",d.setAttribute("role","graphics-document"),ut(d,!1),this._focusElementContainer=d,this._inner.appendChild(this._focusElementContainer);let m=document.createElement("div");this._tooltipElementContainer=m,m.className="am5-tooltip-container",this._inner.appendChild(m),Je("keyboardevents")&&(this._disposers.push(V(window,"keydown",b=>{let p=Qt(b);p=="Shift"?this._isShift=!0:p=="Tab"&&(this._isShift=b.shiftKey)})),this._disposers.push(V(window,"keyup",b=>{Qt(b)=="Shift"&&(this._isShift=!1)})),this._disposers.push(V(d,"click",()=>{let b=this._focusedSprite;if(b){let p=b.get("clickAnnounceText","");p!==""&&this.readerAlert(p);let g=t.getEvent(new MouseEvent("click"));b.events.dispatch("click",{type:"click",originalEvent:g.event,point:g.point,simulated:!0,target:b})}})),this._disposers.push(V(d,"keydown",b=>{let p=this._focusedSprite;if(p){b.key=="Escape"&&(Es(),this._focusedSprite=void 0);let g=0,_=0,y=Qt(b);switch(y){case"Enter":case" ":let v=p.get("clickAnnounceText","");if(v!==""&&this.readerAlert(v),y==" "&&p.get("role")!="checkbox")return;b.preventDefault();let T=t.getEvent(new MouseEvent("mouse"));p.events.dispatch("click",{type:"click",originalEvent:T.event,point:T.point,simulated:!0,target:p});return;case"ArrowLeft":g=-6;break;case"ArrowRight":g=6;break;case"ArrowUp":_=-6;break;case"ArrowDown":_=6;break;default:return}if(g!=0||_!=0){if(b.preventDefault(),!p.isDragging()){this._keyboardDragPoint={x:0,y:0};let j=t.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));j.point={x:0,y:0},p.events.isEnabled("pointerdown")&&p.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:j.event,point:j.point,simulated:!0,target:p})}let v=this._keyboardDragPoint;v.x+=g,v.y+=_;let T=t.getEvent(new MouseEvent("mousemove",{clientX:v.x,clientY:v.y}),!1);p.events.isEnabled("globalpointermove")&&p.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:T.event,point:T.point,simulated:!0,target:p})}}})),this._disposers.push(V(d,"keyup",b=>{if(this._focusedSprite){let p=this._focusedSprite,g=Qt(b);switch(g){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(p.isDragging()){let y=this._keyboardDragPoint,v=t.getEvent(new MouseEvent("mouseup",{clientX:y.x,clientY:y.y}));p.events.isEnabled("globalpointerup")&&p.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:v.event,point:v.point,simulated:!0,target:p}),this._keyboardDragPoint=void 0;return}else if(p.get("focusableGroup")){let y=p.get("focusableGroup"),v=this._tabindexes.filter(D=>!!(D.get("focusableGroup")==y&&D.getPrivate("focusable")!==!1&&D.isVisibleDeep())),T=v.indexOf(p),j=v.length-1;T+=g=="ArrowRight"||g=="ArrowDown"?1:-1,T<0?T=j:T>j&&(T=0),Ms(v[T].getPrivate("focusElement").dom)}break;case"Tab":let _=p.get("focusableGroup");if(_&&this._isShift){this._skipNextGroupJump||(this._focusNext(p.getPrivate("focusElement").dom,-1,_),this._skipNextGroupJump=!0);return}break}}})))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){let e=He.new(this,{themeTags:["system"]});this._systemTooltip=e}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new Bi(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){let e=this._getRealSize(),t=this._getCalculatedSize(e),i=Math.floor(t.width),r=Math.floor(t.height);if(i>0&&r>0){let s=Math.floor(e.width),n=Math.floor(e.height),o=this._htmlElementContainer;if(o.style.width=i+"px",o.style.height=r+"px",this._a11yD!==!0){let u=this._focusElementContainer;u.style.width=i+"px",u.style.height=r+"px"}this._renderer.resize(s,n,i,r);let l=this._rootContainer;l.setPrivate("width",i),l.setPrivate("height",r),this._render(),this._handleLogo()}}_render(){if(this.skipRenderFrame){this.skipRenderFrame=!1;return}this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(e){x(this._tickers,t=>{t(e)})}_runAnimations(e){let t=0;return bt(this._animations,i=>{let r=i._runAnimation(e);return r===Ze.Stopped?!1:(r===Ze.Playing&&++t,!0)}),this._isDirtyAnimation=!1,t===0}_runDirties(){let e={};for(;this._isDirtyParents;)this._isDirtyParents=!1,G(this._dirtyParents).forEach(n=>{let o=this._dirtyParents[n];delete this._dirtyParents[n],o.isDisposed()||(e[o.uid]=o,o._prepareChildren())});G(e).forEach(n=>{e[n]._updateChildren()});let t=[];G(this._dirty).forEach(n=>{let o=this._dirty[n];o.isDisposed()?delete this._dirty[o.uid]:(t.push(o),o._beforeChanged())}),t.forEach(n=>{n._changed(),delete this._dirty[n.uid],n._clearDirty()}),this._isDirty=!1;let i={},r=[];G(this._dirtyBounds).forEach(n=>{let o=this._dirtyBounds[n];delete this._dirtyBounds[n],o.isDisposed()||(i[o.uid]=o.depth(),r.push(o))}),this._positionHTMLElements(),r.sort((n,o)=>Ve(i[o.uid],i[n.uid])),r.forEach(n=>{n._updateBounds()});let s=this._dirtyPositions;G(s).forEach(n=>{let o=s[n];delete s[n],o.isDisposed()||o._updatePosition()}),t.forEach(n=>{n._afterChanged()}),G(e).forEach(n=>{e[n]._childrenPrep=!1,e[n]._childrenUpdt=!1})}_renderFrame(e){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:e}),this._checkComputedStyles(),this._runTickers(e);let t=this._runAnimations(e);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:e}),this._tickers.length===0&&t&&!this._isDirtyAnimation&&!this._isDirty}else return!0}_runTicker(e,t){this.isDisposed()||(this.animationTime=e,this._renderFrame(e)?(this._ticker=null,this.animationTime=null):this._paused||(t?this._ticker:nn(this.fps,this._ticker)))}_runTickerNow(e=1e4){if(!this.isDisposed()){let t=performance.now()+e;for(;;){let i=performance.now();if(i>=t){this.animationTime=null;break}if(this.animationTime=i,this._renderFrame(i)){this.animationTime=null;break}}}}_startTicker(){this._ticker===null&&(this.animationTime=null,this._ticker=e=>{this._runTicker(e)},nn(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(e){this._updateTick=e,e&&this._startTicker()}_addDirtyEntity(e){this._isDirty=!0,this._dirty[e.uid]===void 0&&(this._dirty[e.uid]=e),this._startTicker()}_addDirtyParent(e){this._isDirty=!0,this._isDirtyParents=!0,this._dirtyParents[e.uid]===void 0&&(this._dirtyParents[e.uid]=e),this._startTicker()}_addDirtyBounds(e){this._isDirty=!0,this._dirtyBounds[e.uid]===void 0&&(this._dirtyBounds[e.uid]=e),this._startTicker()}_addDirtyPosition(e){this._isDirty=!0,this._dirtyPositions[e.uid]===void 0&&(this._dirtyPositions[e.uid]=e),this._startTicker()}_addAnimation(e){this._isDirtyAnimation=!0,this._animations.indexOf(e)===-1&&this._animations.push(e),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(e){return this._tickers.push(e),this._startTicker(),new U(()=>{re(this._tickers,e)})}markDirtyGlobal(e){e||(e=this.container),e.walkChildren(t=>{t instanceof R&&this.markDirtyGlobal(t),t.markDirty(),t.markDirtyBounds()})}width(){return Math.floor(this._getCalculatedSize(this._getRealSize()).width)}height(){return Math.floor(this._getCalculatedSize(this._getRealSize()).height)}dispose(){this._isDisposed||(this._isDisposed=!0,this._rootContainer.dispose(),this._renderer.dispose(),this.horizontalLayout.dispose(),this.verticalLayout.dispose(),this.interfaceColors.dispose(),x(this._disposers,e=>{e.dispose()}),this._inner&&js(this._inner),ye(Oe.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(e){if(this._a11yD!==!0){let t=this._readerAlertElement;e=hr(e),t.innerHTML==e&&(t.innerHTML=""),t.innerHTML=e}}setThemes(e){this._rootContainer.set("themes",e);let t=this.tooltipContainer;t&&t._applyThemes();let i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){let e=this._tooltipContainerSettings,t=this._rootContainer.children.push(R.new(this,{position:"absolute",isMeasured:!1,width:M,height:M,layer:e?35:30,layerMargin:e||void 0}));this.tooltipContainer=t;let i=He.new(this,{});this.container.set("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(e){this._a11yD!=!0&&(e.get("focusable")?at(this._tabindexes,e):ye(this._tabindexes,e),this._invalidateTabindexes())}_unregisterTabindexOrder(e){this._a11yD!=!0&&(ye(this._tabindexes,e),this._invalidateTabindexes())}_invalidateTabindexes(){if(this._a11yD==!0)return;this._tabindexes.sort((t,i)=>{let r=t.get("tabindexOrder",0),s=i.get("tabindexOrder",0);return r==s?0:r>s?1:-1});let e=[];x(this._tabindexes,(t,i)=>{t.getPrivate("focusElement")?this._moveFocusElement(i,t):this._makeFocusElement(i,t);let r=t.get("focusableGroup");r&&t.getPrivate("focusable")!==!1&&(e.indexOf(r)!==-1?t.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):e.push(r))})}_updateCurrentFocus(){this._a11yD!=!0&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(e,t){if(this._a11yD==!0||(t||(t=e.getPrivate("focusElement").dom),!t))return;let i=e.get("role");i?t.setAttribute("role",i):t.removeAttribute("role");let r=e.get("ariaLabel");if(r){let b=ct(e,r);t.setAttribute("aria-label",b)}else t.removeAttribute("aria-label");let s=e.get("ariaLive");s?t.setAttribute("aria-live",s):t.removeAttribute("aria-live");let n=e.get("ariaChecked");n!=null&&i&&["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(i)!==-1?t.setAttribute("aria-checked",n?"true":"false"):t.removeAttribute("aria-checked");let o=e.get("ariaCurrent");o!=null?t.setAttribute("aria-current",o):t.removeAttribute("aria-current");let l=e.get("ariaSelected");l!=null&&i&&["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(i)!==-1?t.setAttribute("aria-selected",l?"true":"false"):t.removeAttribute("aria-selected"),e.get("ariaHidden")?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden");let u=e.get("ariaOrientation");u?t.setAttribute("aria-orientation",u):t.removeAttribute("aria-orientation");let h=e.get("ariaValueNow");h?t.setAttribute("aria-valuenow",h):t.removeAttribute("aria-valuenow");let c=e.get("ariaValueMin");c?t.setAttribute("aria-valuemin",c):t.removeAttribute("aria-valuemin");let f=e.get("ariaValueMax");f?t.setAttribute("aria-valuemax",f):t.removeAttribute("aria-valuemax");let d=e.get("ariaValueText");d?t.setAttribute("aria-valuetext",d):t.removeAttribute("aria-valuetext");let m=e.get("ariaControls");m?t.setAttribute("aria-controls",m):t.removeAttribute("aria-controls"),e.get("visible")&&e.get("opacity")!==0&&e.get("role")!="tooltip"&&!e.isHidden()&&e.getPrivate("focusable")!==!1&&(e.height()||e.width())?(t.getAttribute("tabindex")!="-1"&&t.setAttribute("tabindex",""+this.tabindex),t.removeAttribute("aria-hidden")):(t.removeAttribute("tabindex"),t.setAttribute("aria-hidden","true"))}_makeFocusElement(e,t){if(t.getPrivate("focusElement")||this._a11yD==!0)return;let i=document.createElement("div");t.get("role")!="tooltip"&&(i.tabIndex=this.tabindex),i.style.position="absolute",ut(i,!1);let r=[];t.setPrivate("focusElement",{dom:i,disposers:r}),this._decorateFocusElement(t),r.push(V(i,"focus",s=>{this._handleFocus(s)})),r.push(V(i,"blur",s=>{this._handleBlur(s)})),this._moveFocusElement(e,t)}_removeFocusElement(e){if(this._a11yD==!0)return;ye(this._tabindexes,e);let t=e.getPrivate("focusElement");t&&(this._focusElementContainer.removeChild(t.dom),x(t.disposers,r=>{r.dispose()}))}_hideFocusElement(e){if(this._a11yD==!0)return;let t=e.getPrivate("focusElement");t.dom.style.display="none"}_moveFocusElement(e,t){if(this._a11yD==!0)return;let i=this._focusElementContainer,r=t.getPrivate("focusElement").dom;if(r===this._focusElementContainer.children[e])return;let s=this._focusElementContainer.children[e+1];s?i.insertBefore(r,s):i.append(r)}_positionFocusElement(e){if(this._a11yD==!0||e==null)return;this._focusElementContainer.scrollTop=0;let t=e.globalBounds(),i=t.right==t.left?e.width():t.right-t.left,r=t.top==t.bottom?e.height():t.bottom-t.top,s=this._settings.focusPadding!==void 0?this._settings.focusPadding:2,n=t.left-s,o=t.top-s;i<0&&(n+=i,i=Math.abs(i)),r<0&&(o+=r,r=Math.abs(r));let l=e.getPrivate("focusElement").dom;l.style.top=o+"px",l.style.left=n+"px",l.style.width=i+s*2+"px",l.style.height=r+s*2+"px"}_getSpriteByFocusElement(e){let t;return Zt(this._tabindexes,(i,r)=>i.getPrivate("focusElement").dom===e?(t=i,!1):!0),t}_handleFocus(e){if(this._a11yD==!0)return;let t=this._getSpriteByFocusElement(e.target);if(t){if(!t.isVisibleDeep()){this._focusNext(e.target,this._isShift?-1:1);return}this._positionFocusElement(t),this._focusedSprite=t,t.events.isEnabled("focus")&&t.events.dispatch("focus",{type:"focus",originalEvent:e,target:t}),t.getPrivate("focusElement").dom.tabIndex==-1&&(this._skipNextGroupJump=!1)}}_focusNext(e,t,i){if(this._a11yD==!0)return;let r=Array.from(document.querySelectorAll(["a[href]","area[href]","button:not([disabled])","details","input:not([disabled])","iframe:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contentEditable=""]','[contentEditable="true"]','[contentEditable="TRUE"]','[tabindex]:not([tabindex^="-"])'].join(","))),s=r.indexOf(e)+t;s<0?s=r.length-1:s>=r.length&&(s=0);let n=r[s];if(i&&t==-1){let o=this._getSpriteByFocusElement(n);if(o&&o.get("focusableGroup")==i){this._focusNext(n,t);return}}n.focus()}_handleBlur(e){if(this._a11yD==!0)return;let t=this._focusedSprite;t&&!t.isDisposed()&&t.events.isEnabled("blur")&&t.events.dispatch("blur",{type:"blur",originalEvent:e,target:t}),this._focusedSprite=void 0}updateTooltip(e){if(this._a11yD==!0)return;let t=hr(e._getText()),i=e.getPrivate("tooltipElement");e.get("role")=="tooltip"&&t!=""?(i||(i=this._makeTooltipElement(e)),i.innerHTML!=t&&(i.innerHTML=t),i.setAttribute("aria-hidden",e.isVisibleDeep()?"false":"true")):i&&(i.remove(),e.removePrivate("tooltipElement"))}_makeTooltipElement(e){let t=this._tooltipElementContainer,i=document.createElement("div");return i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.overflow="hidden",i.style.clip="rect(1px, 1px, 1px, 1px)",ut(i,!1),this._decorateFocusElement(e,i),t.append(i),e.setPrivate("tooltipElement",i),i}_removeTooltipElement(e){if(this._a11yD==!0)return;let t=e.getPrivate("tooltipElement");if(t){let i=t.parentElement;i&&i.removeChild(t)}}_invalidateAccessibility(e){if(this._a11yD==!0)return;this._focusElementDirty=!0;let t=e.getPrivate("focusElement");e.get("focusable")?t&&(this._decorateFocusElement(e),this._positionFocusElement(e)):t&&this._removeFocusElement(e)}focused(e){return this._focusedSprite===e}documentPointToRoot(e){let t=this._getRealSize(),i=this._getCalculatedSize(t),r=i.width/t.width,s=i.height/t.height;return{x:(e.x-t.left)*r,y:(e.y-t.top)*s}}rootPointToDocument(e){let t=this._getRealSize(),i=this._getCalculatedSize(t),r=i.width/t.width,s=i.height/t.height;return{x:e.x/r+t.left,y:e.y/s+t.top}}addDisposer(e){return this._disposers.push(e),e}_updateComputedStyles(){let e=window.getComputedStyle(this.dom),t="";N(e,(r,s)=>{Re(r)&&r.match(/^font/)&&(t+=s)});let i=t!=this._fontHash;return i&&(this._fontHash=t),i}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(e){e instanceof R?e.children.each(t=>{this._invalidateLabelBounds(t)}):e instanceof Me&&e.markDirtyBounds()}_hasLicense(){for(let e=0;e<Oe.licenses.length;e++)if(Oe.licenses[e].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(e){this._renderer.debugGhostView=e}set tapToActivate(e){this._renderer.tapToActivate=e}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(e){this._renderer.tapToActivateTimeout=e}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(e){let t=this._htmlElementContainer,i=document.createElement("div");e.setPrivate("htmlElement",i);let r=!1,s;e._walkParents(o=>{if(o.get("verticalScrollbar"))return r=!0,s=o,!1});let n;return r&&(n=document.createElement("div"),e.setPrivate("htmlElementWrapper",n),e.setPrivate("wrapperContainer",s),n.style.position="absolute",n.style.overflow="hidden",n.style.boxSizing="border-box",n.style.top="0px",n.style.left="0px",n.style.width="100%",n.style.height="100%",s.events.on("boundschanged",()=>{this._positionHTMLElement(e)})),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",ut(i,e.get("interactive",!1)),e.events.isEnabled("click")&&(ut(i,!0),this._disposers.push(V(i,"click",o=>{let l=this._renderer.getEvent(o);e.events.dispatch("click",{type:"click",originalEvent:l.event,point:l.point,simulated:!1,target:e})}))),this._positionHTMLElement(e),r?(n.append(i),t.append(n)):t.append(i),at(this._htmlEnabledContainers,e),i}_positionHTMLElements(){x(this._htmlEnabledContainers,e=>{this._positionHTMLElement(e)})}_positionHTMLElement(e){let t=e.getPrivate("htmlElementWrapper");if(t){let r=e.getPrivate("wrapperContainer");if(r){let s=r.globalBounds();t.style.clipPath="rect("+s.top+"px "+s.right+"px "+s.bottom+"px "+s.left+"px)"}}let i=e.getPrivate("htmlElement");if(i){x(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],y=>{let v=e.get(y);v?i.style[y]=v+"px":i.style[y]=""}),x(["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"],y=>{let v=e.get(y);v?y=="fontSize"&&!Re(v)?i.style[y]=v+"px":i.style[y]=v+"":i.style[y]=""});let n=e.compositeScale()||1,o=e.compositeRotation()||0;i.style.transform="",i.style.transformOrigin="";let l=e.compositeOpacity();setTimeout(()=>{i.style.opacity=l+""},10);let u=e.isVisibleDeep();u&&(i.style.display="block");let h={x:e.x()+e.get("dx",0),y:e.y()+e.get("dy",0)};e.parent&&(h=e.parent.toGlobal(h)),i.style.top=h.y+"px",i.style.left=h.x+"px";let c=e.get("width"),f=e.get("height"),d=0,m=0;if(c&&(d=e.width()),f&&(m=e.height()),!c||!f){i.style.position="fixed",i.style.width="",i.style.height="";let y=i.getBoundingClientRect();i.style.position="absolute",c||(d=y.width),f||(m=y.height);let v=d/n,T=m/n,j=e.get("centerX",0),D=e.get("centerY",0),$=0,L=0,E=0,k=0;j instanceof A?($=-j.value*v,L=(1-j.value)*v):($=-j,L=v-j),D instanceof A?(E=-D.value*T,k=(1-D.value)*T):(E=-D,k=T-D),e._localBounds={left:$,right:L,top:E,bottom:k};let H=e._adjustedLocalBounds,P=e._display.getAdjustedBounds(e._localBounds);e._adjustedLocalBounds=P,(H.left!==P.left||H.right!==P.right||H.top!==P.top||H.bottom!==P.bottom)&&e.markDirtyBounds()}d>0&&(i.style.minWidth=d+"px"),m>0&&(i.style.minHeight=m+"px"),(!u||l==0)&&(i.style.display="none");let b=e.get("centerX",0),p=tr(b)?b.percent+"%":b+"px",g=e.get("centerY",0),_=tr(g)?g.percent+"%":g+"px";(b||g)&&(i.style.transform="translate(-"+p+", -"+_+")"+i.style.transform),n!=1&&(i.style.transform+="scale("+n+")"),o!=0&&(i.style.transform+=" rotate("+o+"deg)"),i.style.transform!=""&&(i.style.transformOrigin=p+" "+_)}}_setHTMLContent(e,t){let i=e.getPrivate("htmlElement");i||(i=this._makeHTMLElement(e),this.autoResize||this.resize()),i.innerHTML!=t&&(i.innerHTML=t)}_removeHTMLContent(e){let t=e.getPrivate("htmlElementWrapper"),i=e.getPrivate("htmlElement");t?(this._htmlElementContainer.removeChild(t),e.removePrivate("htmlElement"),e.removePrivate("htmlElementWrapper"),e.removePrivate("wrapperContainer")):i&&(this._htmlElementContainer.removeChild(i),e.removePrivate("htmlElement"),e.removePrivate("wrapperContainer")),ye(this._htmlEnabledContainers,e)}};var Lt=class extends z{constructor(){super(...arguments),Object.defineProperty(this,"_index",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){super._afterNewApplyThemes()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("sprite")){let e=this.get("sprite");e&&(e.setAll({position:"absolute",role:"figure"}),this._disposers.push(e))}(this.isDirty("locationX")||this.isDirty("locationY"))&&this.series&&this.series._positionBullet(this)}};Object.defineProperty(Lt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Bullet"});Object.defineProperty(Lt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([Lt.className])});var fe=class extends Pe{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),i=e/Math.abs(e),r=t/Math.abs(t),s=0,n=0,o=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=i*o,t-=r*o,s+=i*o/2,n+=r*o/2);let l=e,u=t;if(w(l)&&w(u)){let h=Math.min(l,u)/2,c=ce(this.get("cornerRadiusTL",8),h),f=ce(this.get("cornerRadiusTR",8),h),d=ce(this.get("cornerRadiusBR",8),h),m=ce(this.get("cornerRadiusBL",8),h),b=Math.min(Math.abs(l/2),Math.abs(u/2));c=ee(c,0,b),f=ee(f,0,b),d=ee(d,0,b),m=ee(m,0,b);let p=this._display;p.moveTo(s+c*i,n),p.lineTo(s+l-f*i,n),f>0&&p.arcTo(s+l,n,s+l,n+f*r,f),p.lineTo(s+l,n+u-d*r),d>0&&p.arcTo(s+l,n+u,s+l-d*i,n+u,d),p.lineTo(s+m*i,n+u),m>0&&p.arcTo(s,n+u,s,n+u-m*r,m),p.lineTo(s,n+c*r),c>0&&p.arcTo(s,n,s+c*i,n,c),p.closePath()}}};Object.defineProperty(fe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RoundedRectangle"});Object.defineProperty(fe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Pe.classNames.concat([fe.className])});var Ui=class extends et{constructor(){super(...arguments),Object.defineProperty(this,"processor",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}incrementRef(){}decrementRef(){}_onPush(e){this.processor&&this.processor.processRow(e),super._onPush(e)}_onInsertIndex(e,t){this.processor&&this.processor.processRow(t),super._onInsertIndex(e,t)}_onSetIndex(e,t,i){this.processor&&this.processor.processRow(i),super._onSetIndex(e,t,i)}};var It=class extends ii{constructor(e,t,i){super(i),Object.defineProperty(this,"component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dataContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"open",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"close",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dataContext=t,this.component=e,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(e){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,e)}hide(e){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,e)}isHidden(){return!this.get("visible")}},it=class extends R{constructor(){super(...arguments),Object.defineProperty(this,"_data",{enumerable:!0,configurable:!0,writable:!0,value:new Ui}),Object.defineProperty(this,"_dataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_mainDataItems",{enumerable:!0,configurable:!0,writable:!0,value:this._dataItems}),Object.defineProperty(this,"valueFields",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"fields",{enumerable:!0,configurable:!0,writable:!0,value:["id"]}),Object.defineProperty(this,"_valueFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueFieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataChanged",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}set data(e){e.incrementRef(),this._data.decrementRef(),this._data=e}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll(e=>{let t=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,e.type==="clear")x(t,i=>{i.dispose()}),t.length=0,this._onDataClear();else if(e.type==="push"){let i=new It(this,e.newValue,this._makeDataItem(e.newValue));t.push(i),this.processDataItem(i)}else if(e.type==="setIndex"){let i=t[e.index],r=this._makeDataItem(e.newValue);i.bullets&&i.bullets.length==0&&(i.bullets=void 0),G(r).forEach(s=>{i.get(s)!=r[s]&&i.animate({key:s,to:r[s],duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})}),i.dataContext=e.newValue}else if(e.type==="insertIndex"){let i=new It(this,e.newValue,this._makeDataItem(e.newValue));t.splice(e.index,0,i),this.processDataItem(i)}else if(e.type==="removeIndex")t[e.index].dispose(),t.splice(e.index,1);else if(e.type==="moveIndex"){let i=t[e.oldIndex];t.splice(e.oldIndex,1),t.splice(e.newIndex,0,i)}else throw new Error("Unknown IStreamEvent type");this._afterDataChange()}))}_postUpdateData(){}updateData(e){let t=0;x(e,(i,r)=>{let s=this.dataItems[r];if(!s)this.data.push(i);else{let n=s.dataContext;n&&G(i).forEach(l=>{n[l]=i[l]});let o=this._makeDataItem(n);G(o).forEach(l=>{s.get(l)!=o[l]&&(s.set(l,o[l]),s.set(l+"Working",o[l]))})}t=r});for(let i=this.dataItems.length-1;i>t;i--){let r=this.dataItems[i];ye(this.dataItems,r),r.dispose()}this._postUpdateData()}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},x(this.valueFields,e=>{this.get(e+"Field")&&(this._valueFields.push(e),this._valueFieldsF[e]={fieldKey:e+"Field",workingKey:e+"Working"})})),this.fields&&(this._fields=[],this._fieldsF={},x(this.fields,e=>{this.get(e+"Field")&&(this._fields.push(e),this._fieldsF[e]=e+"Field")}))}get dataItems(){return this._dataItems}processDataItem(e){}_makeDataItem(e){let t={};return this._valueFields&&x(this._valueFields,i=>{let r=this.get(this._valueFieldsF[i].fieldKey);t[i]=e[r],t[this._valueFieldsF[i].workingKey]=t[i]}),this._fields&&x(this._fields,i=>{let r=this.get(this._fieldsF[i]);t[i]=e[r]}),t}makeDataItem(e,t){let i=new It(this,t,e);return this.processDataItem(i),i}pushDataItem(e,t){let i=this.makeDataItem(e,t);return this._mainDataItems.push(i),i}disposeDataItem(e){}showDataItem(e,t){return _e(this,void 0,void 0,function*(){e.set("visible",!0)})}hideDataItem(e,t){return _e(this,void 0,void 0,function*(){e.set("visible",!1)})}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){let e="datavalidated";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),this._dataChanged=!1}if(this._valuesDirty){let e="valueschanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}this.inited=!0}markDirtyValues(e){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}getDataItemById(e){return xi(this.dataItems,t=>t.get("id")==e)}};Object.defineProperty(it,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Component"});Object.defineProperty(it,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([it.className])});var dt=class extends z{_afterNew(){super._afterNewApplyThemes()}getFill(e){return{addColorStop:(t,i)=>{}}}_changed(){super._changed()}getBounds(e){let t=this.get("target");if(t){let i=t.globalBounds(),r=e.toLocal({x:i.left,y:i.top}),s=e.toLocal({x:i.right,y:i.top}),n=e.toLocal({x:i.right,y:i.bottom}),o=e.toLocal({x:i.left,y:i.bottom});return{left:Math.min(r.x,s.x,n.x,o.x),top:Math.min(r.y,s.y,n.y,o.y),right:Math.max(r.x,s.x,n.x,o.x),bottom:Math.max(r.y,s.y,n.y,o.y)}}return e._display.getLocalBounds()}};Object.defineProperty(dt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Gradient"});Object.defineProperty(dt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([dt.className])});var ft=class extends dt{getFill(e){let t=this.get("rotation",0),i=this.getBounds(e),r=i.left||0,s=i.right||0,n=i.top||0,o=i.bottom||0,l=xe(t),u=ve(t),h=l*(s-r),c=u*(o-n);h==0&&(h=1),c==0&&(c=1);let f=Math.max(h,c),d=this._root._renderer.createLinearGradient(r,n,r+f*l,n+f*u),m=this.get("stops");if(m){let b=0;x(m,p=>{let g=p.offset;w(g)||(g=b/(m.length-1));let _=p.opacity;w(_)||(_=1);let y=p.color;if(y){let v=p.lighten;v&&(y=O.lighten(y,v));let T=p.brighten;T&&(y=O.brighten(y,T)),d.addColorStop(g,"rgba("+y.r+","+y.g+","+y.b+","+_+")")}b++})}return d}};Object.defineProperty(ft,"className",{enumerable:!0,configurable:!0,writable:!0,value:"LinearGradient"});Object.defineProperty(ft,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:dt.classNames.concat([ft.className])});var Nt=class extends R{constructor(){super(...arguments),Object.defineProperty(this,"labelContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(R.new(this._root,{}))}),Object.defineProperty(this,"markerContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(R.new(this._root,{}))}),Object.defineProperty(this,"startLabel",{enumerable:!0,configurable:!0,writable:!0,value:this.labelContainer.children.push(J.new(this._root,{themeTags:["start"]}))}),Object.defineProperty(this,"endLabel",{enumerable:!0,configurable:!0,writable:!0,value:this.labelContainer.children.push(J.new(this._root,{themeTags:["end"]}))}),Object.defineProperty(this,"markers",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Ye(de.new({}),()=>fe._new(this._root,{themeTags:Q(this.markers.template.get("themeTags",[]),[this.get("orientation"),"heatlegend","marker"])},[this.markers.template])))})}_afterNew(){this._settings.themeTags=Q(this._settings.themeTags,["heatlegend",this._settings.orientation]),super._afterNew(),this.set("tooltip",He.new(this._root,{themeTags:["heatlegend"]}))}makeMarker(){let e=this.markers.make();return e.states.create("disabled",{}),e}showValue(e,t,i){let r=this.getTooltip();if(r&&w(e)){let s=this.get("startValue",0),n=this.get("endValue",1),o=(e-s)/(n-s);(o==1/0||o==-1/0||isNaN(o))&&(o=.5);let l=this.get("startColor"),u=this.get("endColor");t||(t=this.getNumberFormatter().format(e)),i||(i=O.interpolate(o,l,u)),r.label.set("text",t);let h;this.get("orientation")=="vertical"?h=this.markerContainer.toGlobal({x:0,y:this.innerHeight()*(1-o)}):h=this.markerContainer.toGlobal({x:this.innerWidth()*o,y:0});let c=r.get("background");c&&c.set("fill",i),r.set("pointTo",h),r.show()}}_prepareChildren(){super._prepareChildren();let e=this.labelContainer,t=this.get("orientation"),i=this.startLabel,r=this.endLabel,s=this.getTooltip();if(this.isDirty("orientation")&&(t=="vertical"?(this.markerContainer.setAll({layout:this._root.verticalLayout,height:M}),this.set("layout",this._root.horizontalLayout),i.setAll({y:M,x:void 0,centerY:M,centerX:M}),r.setAll({y:0,x:void 0,centerY:0,centerX:M}),e.setAll({height:M,width:void 0}),s&&s.set("pointerOrientation","horizontal")):(this.markerContainer.setAll({layout:this._root.horizontalLayout,width:M}),this.set("layout",this._root.verticalLayout),i.setAll({x:0,y:void 0,centerX:0,centerY:0}),r.setAll({x:M,y:void 0,centerX:M,centerY:0}),e.setAll({width:M,height:void 0}),s&&s.set("pointerOrientation","vertical"))),this.isDirty("stepCount")){let n=this.get("stepCount",1),o=this.get("startColor"),l=this.get("endColor"),u=this.get("startOpacity",1),h=this.get("endOpacity",1);if(this.markerContainer.children.clear(),n>1)for(let c=0;c<n;c++){let f=this.makeMarker();t=="vertical"?this.markerContainer.children.moveValue(f,0):this.markerContainer.children.push(f),o&&l&&f.setAll({fill:O.interpolate(c/n,o,l),fillOpacity:be(c/n*100).interpolate(u,h)})}else if(n==1){let c=this.makeMarker();this.markerContainer.children.push(c);let f=ft.new(this._root,{stops:[{color:o,opacity:u},{color:l,opacity:h}]});if(t=="vertical"){f.set("rotation",90);let d=f.get("stops");d&&d.reverse()}else f.set("rotation",0);o&&l&&c.set("fillGradient",f)}}(this.isDirty("startText")||this.isDirty("startValue"))&&i.set("text",this.get("startText",this.getNumberFormatter().format(this.get("startValue",0)))),(this.isDirty("endText")||this.isDirty("endValue"))&&r.set("text",this.get("endText",this.getNumberFormatter().format(this.get("endValue",1))))}};Object.defineProperty(Nt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"HeatLegend"});Object.defineProperty(Nt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([Nt.className])});var rs={};xn(rs,{add:()=>Qn,checkChange:()=>un,chooseInterval:()=>hn,copy:()=>Jn,getDateIntervalDuration:()=>Zn,getDuration:()=>Fe,getIntervalDuration:()=>on,getNextUnit:()=>an,getTime:()=>qn,getUnitValue:()=>ta,now:()=>ln,roun:()=>ea,round:()=>wt,sleep:()=>is,timeUnitDurations:()=>Vi});function is(a){return new Promise((e,t)=>{setTimeout(e,a)})}var Vi={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:365.242/12*864e5,year:31536e6};function an(a){switch(a){case"year":return;case"month":return"year";case"week":return"month";case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function Fe(a,e){return e==null&&(e=1),Vi[a]*e}function on(a){return a?Vi[a.timeUnit]*a.count:0}function Zn(a,e,t,i,r){let s=a.timeUnit,n=a.count;if(s=="hour"||s=="minute"||s=="second"||s=="millisecond")return Vi[a.timeUnit]*a.count;{let o=wt(new Date(e.getTime()),s,n,t,i,void 0,r).getTime(),l=o+n*Fe(s)*1.05;return l=wt(new Date(l),s,1,t,i,void 0,r).getTime(),l-o}}function ln(){return new Date}function qn(){return ln().getTime()}function Jn(a){return new Date(a.getTime())}function un(a,e,t,i,r){if(e-a>Fe(t,1.2))return!0;let s=new Date(a),n=new Date(e);r&&(s=r.convertLocal(s),n=r.convertLocal(n));let o=0,l=0;!i&&t!="millisecond"&&(o=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-o),l=n.getTimezoneOffset(),n.setUTCMinutes(n.getUTCMinutes()-l));let u=!1;switch(t){case"year":s.getUTCFullYear()!=n.getUTCFullYear()&&(u=!0);break;case"month":(s.getUTCFullYear()!=n.getUTCFullYear()||s.getUTCMonth()!=n.getUTCMonth())&&(u=!0);break;case"day":(s.getUTCMonth()!=n.getUTCMonth()||s.getUTCDate()!=n.getUTCDate())&&(u=!0);break;case"hour":s.getUTCHours()!=n.getUTCHours()&&(u=!0);break;case"minute":s.getUTCMinutes()!=n.getUTCMinutes()&&(u=!0);break;case"second":s.getUTCSeconds()!=n.getUTCSeconds()&&(u=!0);break;case"millisecond":s.getTime()!=n.getTime()&&(u=!0);break}if(u)return u;let h=an(t);return h?un(a,e,h,i,r):!1}function Qn(a,e,t,i,r){let s=0;switch(!i&&e!="millisecond"&&(s=a.getTimezoneOffset(),r&&(s-=r.offsetUTC(a)),a.setUTCMinutes(a.getUTCMinutes()-s)),e){case"day":let n=a.getUTCDate();a.setUTCDate(n+t);break;case"second":let o=a.getUTCSeconds();a.setUTCSeconds(o+t);break;case"millisecond":let l=a.getUTCMilliseconds();a.setUTCMilliseconds(l+t);break;case"hour":let u=a.getUTCHours();a.setUTCHours(u+t);break;case"minute":let h=a.getUTCMinutes();a.setUTCMinutes(h+t);break;case"year":let c=a.getUTCFullYear();a.setUTCFullYear(c+t);break;case"month":let f=a.getUTCDate(),d=new Date(a.getUTCFullYear(),a.getUTCMonth(),0).getUTCDate(),m=a.getUTCMonth();f>d?a.setUTCMonth(m+t,d):a.setUTCMonth(m+t);break;case"week":let b=a.getUTCDate();a.setUTCDate(b+t*7);break}if(!i&&e!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+s),e=="day"||e=="week"||e=="month"||e=="year")){let n=a.getTimezoneOffset();if(r&&(n+=r.offsetUTC(a)),n!=s){let o=n-s;a.setUTCMinutes(a.getUTCMinutes()+o),a.getTimezoneOffset()!=n&&a.setUTCMinutes(a.getUTCMinutes()-o)}}return a}function ea(a,e,t,i,r){let s;return r!=null&&(s=new Date(r)),wt(new Date(a),e,t,i.locale.firstDayOfWeek,i.utc,s,i.timezone).getTime()}function wt(a,e,t,i,r,s,n){if(!n||r){let o=0;switch(!r&&e!="millisecond"&&(o=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-o)),e){case"day":let l=a.getUTCDate();if(t>1){if(s){s=wt(s,"day",1);let g=a.getTime()-s.getTime(),_=Math.floor(g/Fe("day")/t),y=Fe("day",_*t);a.setTime(s.getTime()+y-o*Fe("minute"))}}else a.setUTCDate(l);a.setUTCHours(0,0,0,0);break;case"second":let u=a.getUTCSeconds();t>1&&(u=Math.floor(u/t)*t),a.setUTCSeconds(u,0);break;case"millisecond":if(t==1)return a;let h=a.getUTCMilliseconds();h=Math.floor(h/t)*t,a.setUTCMilliseconds(h);break;case"hour":let c=a.getUTCHours();t>1&&(c=Math.floor(c/t)*t),a.setUTCHours(c,0,0,0);break;case"minute":let f=a.getUTCMinutes();t>1&&(f=Math.floor(f/t)*t),a.setUTCMinutes(f,0,0);break;case"month":let d=a.getUTCMonth();t>1&&(t==2||t==3||t==4||t==6)&&(d=Math.floor(d/t)*t),a.setUTCMonth(d,1),a.setUTCHours(0,0,0,0);break;case"year":let m=a.getUTCFullYear();t>1&&(m=Math.floor(m/t)*t),a.setUTCFullYear(m,0,1),a.setUTCHours(0,0,0,0);break;case"week":if(t>1&&s){s=wt(s,"week",1);let g=a.getTime()-s.getTime(),_=Math.floor(g/Fe("week")/t),y=Fe("week",_*t);a.setTime(s.getTime()+y-o*Fe("minute"))}let b=a.getUTCDate(),p=a.getUTCDay();w(i)||(i=1),p>=i?b=b-p+i:b=b-(7+p)+i,a.setUTCDate(b),a.setUTCHours(0,0,0,0);break}if(!r&&e!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+o),e=="day"||e=="week"||e=="month"||e=="year")){let l=a.getTimezoneOffset();if(l!=o){let u=l-o;a.setUTCMinutes(a.getUTCMinutes()+u)}}return a}else{if(isNaN(a.getTime()))return a;let o=a.getTime(),l=n.offsetUTC(a),u=a.getTimezoneOffset(),h=n.parseDate(a),c=h.year,f=h.month,d=h.day,m=h.hour,b=h.minute,p=h.second,g=h.millisecond,_=h.weekday,y=l-u;switch(e){case"day":if(t>1&&s){s=wt(s,"day",1,i,r,void 0,n);let L=a.getTime()-s.getTime(),E=Math.floor(L/Fe("day")/t),k=Fe("day",E*t);a.setTime(s.getTime()+k),h=n.parseDate(a),c=h.year,f=h.month,d=h.day}m=0,b=y,p=0,g=0;break;case"second":b+=y,t>1&&(p=Math.floor(p/t)*t),g=0;break;case"millisecond":b+=y,t>1&&(g=Math.floor(g/t)*t);break;case"hour":t>1&&(m=Math.floor(m/t)*t),b=y,p=0,g=0;break;case"minute":t>1&&(b=Math.floor(b/t)*t),b+=y,p=0,g=0;break;case"month":t>1&&(f=Math.floor(f/t)*t),d=1,m=0,b=y,p=0,g=0;break;case"year":t>1&&(c=Math.floor(c/t)*t),f=0,d=1,m=0,b=y,p=0,g=0;break;case"week":w(i)||(i=1),_>=i?d=d-_+i:d=d-(7+_)+i,m=0,b=y,p=0,g=0;break}a=new Date(c,f,d,m,b,p,g);let v=a.getTime(),T=36e5;e=="hour"&&(T=36e5*t),v+T<=o&&(e=="hour"||e=="minute"||e=="second"||e=="millisecond")&&(a=new Date(v+T));let j=a.getTimezoneOffset(),$=n.offsetUTC(a)-j;return $!=y&&a.setTime(a.getTime()+($-y)*6e4),a}}function hn(a,e,t,i){let r=i[a],s=on(r),n=i.length-1;if(a>=n)return Object.assign({},i[n]);let o=Math.ceil(e/s);return e<s&&a>0?Object.assign({},i[a-1]):o<=t?Object.assign({},i[a]):a+1<i.length?hn(a+1,e,t,i):Object.assign({},i[a])}function ta(a,e){switch(e){case"day":return a.getDate();case"second":return a.getSeconds();case"millisecond":return a.getMilliseconds();case"hour":return a.getHours();case"minute":return a.getMinutes();case"month":return a.getMonth();case"year":return a.getFullYear();case"week":return _t(a)}}var rt=class extends it{constructor(){super(...arguments),Object.defineProperty(this,"_aggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionAggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_psi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pei",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_baseSeriesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:new et}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:R.new(this._root,{width:M,height:M,position:"absolute"})})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll(()=>{this._handleBullets(this.dataItems)}))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),e)}endIndex(){let e=this.dataItems.length;return Math.max(0,Math.min(this.getPrivate("endIndex",e),e))}_handleBullets(e){x(e,t=>{let i=t.bullets;i&&(x(i,r=>{r.dispose()}),t.bullets=void 0)}),this.markDirtyValues()}_makeBullets(e){this._shouldMakeBullet(e)&&(e.bullets=[],this.bullets.each(t=>{this._makeBullet(e,t)}))}_shouldMakeBullet(e){return!0}_makeBullet(e,t,i){let r=t(this._root,this,e);return r&&(r._index=i,this._makeBulletReal(e,r)),r}_makeBulletReal(e,t){let i=t.get("sprite");i&&(i._setDataItem(e),i.setRaw("position","absolute"),this.bulletsContainer.children.push(i)),t.series=this,e.bullets.push(t)}addBullet(e,t){e.bullets||(e.bullets=[]),t&&this._makeBulletReal(e,t)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._baseSeriesDirty=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();let e=this.dataItems,t=e.length,i=this.startIndex(),r=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){let n=this.getPrivate("baseValueSeries");n&&this._disposers.push(n.onPrivate("startIndex",()=>{this._baseSeriesDirty=!0,this.markDirtyValues()}))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,t),this._aggregatesCalculated=!0,i!=0&&(this._psi=void 0))),(this._psi!=i||this._pei!=r||this.isPrivateDirty("adjustedStartIndex"))&&!this._selectionAggregatesCalculated&&(i===0&&r===t&&this._aggregatesCalculated||this._calculateAggregates(i,r),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let n=this.get("tooltip");n&&(n.hide(0),n.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let n,o=this.get("legendDataItem");if(o&&(n=o.get("markerRectangle"),n&&this.isVisible())){if(this.isDirty("stroke")){let l=this.get("stroke");n.set("stroke",l)}if(this.isDirty("fill")){let l=this.get("fill");n.set("fill",l)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let n=this.startIndex(),o=this.endIndex();o<t&&o++;for(let l=n;l<o;l++){let u=e[l];u.bullets||this._makeBullets(u)}}}_handleRemoved(){}_adjustStartIndex(e){return e}_calculateAggregates(e,t){let i=this._valueFields;if(!i)throw new Error("No value fields are set for the series.");let r=this.get("excludeFromAggregate");r&&(i=i.filter(p=>r.indexOf(p)==-1));let s={},n={},o={},l={},u={},h={},c={},f={},d={};for(let p=0,g=i.length;p<g;p++){let _=i[p];s[_]=0,n[_]=0,o[_]=0}let m=this.dataItems,b=m.length;for(let p=0,g=i.length;p<g;p++){let _=i[p],y=_+"Change",v=_+"ChangePercent",T=_+"ChangePrevious",j=_+"ChangePreviousPercent",D=_+"ChangeSelection",$=_+"ChangeSelectionPercent",L="valueY";(_==="valueX"||_.endsWith("ValueX"))&&(L="valueX");let E=this.getPrivate("baseValueSeries"),k=this.getPrivate("adjustedStartIndex",e),H=(P,C,B)=>{if(e===0){let q=h[L],ae=C-q;P.setRaw(y,ae),P.setRaw(v,ae/q*100)}let $e=C-d[L],F=C-h[L];P.setRaw(T,$e),P.setRaw(j,$e/d[L]*100),P.setRaw(D,F),P.setRaw($,F/h[L]*100),d[B]=C};for(let P=k;P<t;P++){let C=m[P];if(C){let B=C.get(_);if(B!=null){l[_]==null&&(l[_]=B),u[_]==null&&(u[_]=B),h[_]==null&&(h[_]=B,d[_]=B,E&&(h[L]=E._getBase(L)));break}}}for(let P=k;P<t;P++){let C=m[P];if(C){let B=C._settings[_];B!=null&&(o[_]++,s[_]+=B,n[_]+=Math.abs(B),l[_]>B&&(l[_]=B),u[_]<B&&(u[_]=B),c[_]=B,H(C,B,_))}}if(f[_]=s[_]/o[_],t<b){let P=m[t];if(P){let C=P.get(_);C!=null&&H(P,C,_)}}if(t+1<b){let P=m[t+1];if(P){let C=P.get(_);C!=null&&H(P,C,_)}}e>0&&e--,delete d[_];for(let P=e;P<k;P++){let C=m[P];if(C){let B=C.get(_);d[_]==null&&(d[_]=B),B!=null&&H(C,B,_)}}}for(let p=0,g=i.length;p<g;p++){let _=i[p];this.setPrivate(_+"AverageSelection",f[_]),this.setPrivate(_+"CountSelection",o[_]),this.setPrivate(_+"SumSelection",s[_]),this.setPrivate(_+"AbsoluteSumSelection",n[_]),this.setPrivate(_+"LowSelection",l[_]),this.setPrivate(_+"HighSelection",u[_]),this.setPrivate(_+"OpenSelection",h[_]),this.setPrivate(_+"CloseSelection",c[_])}if(e===0&&t===b)for(let p=0,g=i.length;p<g;p++){let _=i[p];this.setPrivate(_+"Average",f[_]),this.setPrivate(_+"Count",o[_]),this.setPrivate(_+"Sum",s[_]),this.setPrivate(_+"AbsoluteSum",n[_]),this.setPrivate(_+"Low",l[_]),this.setPrivate(_+"High",u[_]),this.setPrivate(_+"Open",h[_]),this.setPrivate(_+"Close",c[_])}}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));let e=this.get("heatRules");if(this._valuesDirty&&e&&e.length>0&&x(e,t=>{let i=t.minValue||this.getPrivate(t.dataField+"Low")||0,r=t.maxValue||this.getPrivate(t.dataField+"High")||0;x(t.target._entities,s=>{let n=s.dataItem.get(t.dataField);if(!w(n)){t.neutral&&s.set(t.key,t.neutral);let o=s.states;if(o){let l=o.lookup("default");l&&t.neutral&&l.set(t.key,t.neutral)}if(!t.customFunction)return}if(t.customFunction)t.customFunction.call(this,s,i,r,n);else{let o;t.logarithmic?o=(Math.log(n)*Math.LOG10E-Math.log(i)*Math.LOG10E)/(Math.log(r)*Math.LOG10E-Math.log(i)*Math.LOG10E):o=(n-i)/(r-i),w(n)&&(!w(o)||Math.abs(o)==1/0)&&(o=.5);let l;w(t.min)?l=t.min+(t.max-t.min)*o:t.min instanceof O?l=O.interpolate(o,t.min,t.max):t.min instanceof A&&(l=ar(o,t.min,t.max)),s.set(t.key,l);let u=s.states;if(u){let h=u.lookup("default");h&&h.set(t.key,l)}}})}),this.get("visible")){let t=this.dataItems,i=t.length,r=this.startIndex(),s=this.endIndex();s<i&&s++,r>0&&r--;for(let n=0;n<r;n++)this._hideBullets(t[n]);for(let n=r;n<s;n++)this._positionBullets(t[n]);for(let n=s;n<i;n++)this._hideBullets(t[n])}}_positionBullets(e){e.bullets&&x(e.bullets,t=>{this._positionBullet(t);let i=t.get("sprite");t.get("dynamic")&&(i&&(i._markDirtyKey("fill"),i.markDirtySize()),i instanceof R&&i.walkChildren(r=>{r._markDirtyKey("fill"),r.markDirtySize(),r instanceof J&&r.text.markDirtyText()})),i instanceof J&&i.get("populateText")&&i.text.markDirtyText()})}_hideBullets(e){e.bullets&&x(e.bullets,t=>{let i=t.get("sprite");i&&i.setPrivate("visible",!1)})}_positionBullet(e){}_placeBulletsContainer(e){e.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){let e=this.bulletsContainer;e.parent&&e.parent.children.removeValue(e)}disposeDataItem(e){let t=e.bullets;t&&(x(t,i=>{i.dispose()}),e.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return _e(this,void 0,void 0,function*(){let r=[i.showDataItem.call(this,e,t)],s=e.bullets;s&&x(s,n=>{let o=n.get("sprite");o&&r.push(o.show(t))}),yield Promise.all(r)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return _e(this,void 0,void 0,function*(){let r=[i.hideDataItem.call(this,e,t)],s=e.bullets;s&&x(s,n=>{let o=n.get("sprite");o&&r.push(o.hide(t))}),yield Promise.all(r)})}_sequencedShowHide(e,t){return _e(this,void 0,void 0,function*(){if(this.get("sequencedInterpolation"))if(w(t)||(t=this.get("interpolationDuration",0)),t>0){let i=this.startIndex(),r=this.endIndex();yield Promise.all(Kt(this.dataItems,(s,n)=>_e(this,void 0,void 0,function*(){let o=t||0;(n<i-10||n>r+10)&&(o=0);let l=this.get("sequencedDelay",0)+o/(r-i);yield is(l*(n-i)),e?yield this.showDataItem(s,o):yield this.hideDataItem(s,o)})))}else yield Promise.all(Kt(this.dataItems,i=>e?this.showDataItem(i,0):this.hideDataItem(i,0)))})}updateLegendValue(e){if(e){let t=e.get("legendDataItem");if(t){let i=t.get("valueLabel");if(i){let s=i.text,n="";i._setDataItem(e),n=this.get("legendValueText",s.get("text","")),i.set("text",n),s.markDirtyText()}let r=t.get("label");if(r){let s=r.text,n="";r._setDataItem(e),n=this.get("legendLabelText",s.get("text","")),r.set("text",n),s.markDirtyText()}}}}updateLegendMarker(e){}_onHide(){super._onHide();let e=this.getTooltip();e&&e.hide()}hoverDataItem(e){}unhoverDataItem(e){}_getBase(e){let t=this.dataItems[this.startIndex()];return t?t.get(e):0}};Object.defineProperty(rt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Series"});Object.defineProperty(rt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:it.classNames.concat([rt.className])});var Ht=class extends rt{constructor(){super(...arguments),Object.defineProperty(this,"itemContainers",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Ye(de.new({}),()=>R._new(this._root,{themeTags:Q(this.itemContainers.template.get("themeTags",[]),["legend","item"]),themeTagsSelf:Q(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"]),background:fe.new(this._root,{themeTags:Q(this.itemContainers.template.get("themeTags",[]),["legend","item","background"]),themeTagsSelf:Q(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"])})},[this.itemContainers.template])))}),Object.defineProperty(this,"markers",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Ye(de.new({}),()=>R._new(this._root,{themeTags:Q(this.markers.template.get("themeTags",[]),["legend","marker"])},[this.markers.template])))}),Object.defineProperty(this,"labels",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Ye(de.new({}),()=>J._new(this._root,{themeTags:Q(this.labels.template.get("themeTags",[]),["legend","label"])},[this.labels.template])))}),Object.defineProperty(this,"valueLabels",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Ye(de.new({}),()=>J._new(this._root,{themeTags:Q(this.valueLabels.template.get("themeTags",[]),["legend","label","value"])},[this.valueLabels.template])))}),Object.defineProperty(this,"markerRectangles",{enumerable:!0,configurable:!0,writable:!0,value:this.addDisposer(new Ye(de.new({}),()=>fe._new(this._root,{themeTags:Q(this.markerRectangles.template.get("themeTags",[]),["legend","marker","rectangle"])},[this.markerRectangles.template])))})}_afterNew(){this._settings.themeTags=Q(this._settings.themeTags,["legend"]),this.fields.push("name","stroke","fill"),super._afterNew()}makeItemContainer(e){let t=this.children.push(this.itemContainers.make());return t._setDataItem(e),this.itemContainers.push(t),t.states.create("disabled",{}),t}makeMarker(){let e=this.markers.make();return this.markers.push(e),e.states.create("disabled",{}),e}makeLabel(){let e=this.labels.make();return e.states.create("disabled",{}),e}makeValueLabel(){let e=this.valueLabels.make();return e.states.create("disabled",{}),e}makeMarkerRectangle(){let e=this.markerRectangles.make();return e.states.create("disabled",{}),e}processDataItem(e){super.processDataItem(e);let t=this.makeItemContainer(e),i=this.get("nameField"),r=this.get("fillField"),s=this.get("strokeField");if(t){let n=this.get("clickTarget","itemContainer"),o=e.dataContext;o&&o.set&&o.set("legendDataItem",e),t._setDataItem(e),e.set("itemContainer",t);let l=this.makeMarker();if(l){t.children.push(l),l._setDataItem(e),e.set("marker",l);let c=this.get("useDefaultMarker"),f=l.children.push(this.makeMarkerRectangle()),d=e.get("fill"),m=e.get("stroke");e.set("markerRectangle",f),o&&o.get&&(d=o.get(r,d),m=o.get(s,m)),m||(m=d),c?o.on&&(o.on(r,()=>{f.set("fill",o.get(r))}),o.on(s,()=>{f.set("stroke",o.get(s))})):o&&o.createLegendMarker&&o.createLegendMarker(),f.setAll({fill:d,stroke:m});let b=o.component;b&&b.updateLegendMarker&&b.updateLegendMarker(o)}let u=this.makeLabel();if(u){t.children.push(u),u._setDataItem(e),e.set("label",u),u.text.on("text",()=>{t.setRaw("ariaLabel",u.text._getText()+(this.get("clickTarget")!=="none"?"; "+this._t("Press ENTER to toggle"):"")),t.markDirtyAccessibility()}),o&&o.get&&e.set("name",o.get(i));let c=e.get("name");c&&u.set("text",c)}let h=this.makeValueLabel();if(h&&(t.children.push(h),h._setDataItem(e),e.set("valueLabel",h)),o&&o.show&&(o.on("visible",c=>{t.set("disabled",!c)}),o.get("visible")||t.set("disabled",!0),n!="none")){let c=t;n=="marker"&&(c=l),this._addClickEvents(c,o,e)}this.children.values.sort((c,f)=>{let d=c.dataItem.dataContext,m=f.dataItem.dataContext;if(d&&m){let b=this.data.indexOf(d),p=this.data.indexOf(m);if(b>p)return 1;if(b<p)return-1}return 0}),o&&o.updateLegendValue&&o.updateLegendValue()}}_addClickEvents(e,t,i){e.set("cursorOverStyle","pointer"),e.events.on("pointerover",()=>{let r=t.component;r&&r.hoverDataItem&&r.hoverDataItem(t)}),e.events.on("pointerout",()=>{let r=t.component;r&&r.hoverDataItem&&r.unhoverDataItem(t)}),e.events.on("click",()=>{let r=i.get("label").text._getText();t.show&&t.isHidden&&(t.isHidden()||t.get("visible")===!1)?(t.show(),e.set("disabled",!1),this._root.readerAlert(this._t("%1 shown",this._root.locale,r))):t.hide&&(t.hide(),e.set("disabled",!0),this._root.readerAlert(this._t("%1 hidden",this._root.locale,r)))})}disposeDataItem(e){super.disposeDataItem(e);let t=e.dataContext;t&&t.get&&t.get("legendDataItem")==e&&t.set("legendDataItem",void 0);let i=e.get("itemContainer");i&&(this.itemContainers.removeValue(i),i.dispose());let r=e.get("marker");r&&(this.markers.removeValue(r),r.dispose());let s=e.get("markerRectangle");s&&(this.markerRectangles.removeValue(s),s.dispose());let n=e.get("label");n&&(this.labels.removeValue(n),n.dispose());let o=e.get("valueLabel");o&&(this.valueLabels.removeValue(o),o.dispose())}};Object.defineProperty(Ht,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Legend"});Object.defineProperty(Ht,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:rt.classNames.concat([Ht.className])});var Pt=class extends R{_afterNew(){this._settings.themeTags=Q(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",fe.new(this._root,{themeTags:Q(this._settings.themeTags,["background"])})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};Object.defineProperty(Pt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Button"});Object.defineProperty(Pt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([Pt.className])});var Ft=class extends R{constructor(){super(...arguments),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:this._makeThumb()}),Object.defineProperty(this,"startGrip",{enumerable:!0,configurable:!0,writable:!0,value:this._makeButton()}),Object.defineProperty(this,"endGrip",{enumerable:!0,configurable:!0,writable:!0,value:this._makeButton()}),Object.defineProperty(this,"_thumbBusy",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_startDown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_endDown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_thumbDown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_gripDown",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_addOrientationClass(){this._settings.themeTags=Q(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._settings.background||(this._settings.background=fe.new(this._root,{themeTags:Q(this._settings.themeTags,["main","background"])}))}_makeButton(){return this.children.push(Pt.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:Z.new(this._root,{themeTags:["icon"]})}))}_makeThumb(){return this.children.push(fe.new(this._root,{themeTags:["thumb",this.get("orientation")]}))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,i=this.thumb,r=this.get("background");r&&this._disposers.push(r.events.on("click",s=>{this.setPrivateRaw("isBusy",!0);let n=this._display.toLocal(s.point),o=this.width(),l=this.height(),u=this.get("orientation"),h;u=="vertical"?h=(n.y-i.height()/2)/l:h=(n.x-i.width()/2)/o;let c,f;u=="vertical"?(c=h*l,f="y"):(c=h*o,f="x");let d=this.get("animationDuration",0);d>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:f,to:c,duration:d,easing:this.get("animationEasing")}))):(this.thumb.set(f,c),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(i.events.on("dblclick",s=>{if(!ki(s.originalEvent,this))return;let n=this.get("animationDuration",0),o=this.get("animationEasing");this.animate({key:"start",to:0,duration:n,easing:o}),this.animate({key:"end",to:1,duration:n,easing:o})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(i.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(i.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(i.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e.set("x",0),t.set("x",0),this._disposers.push(i.adapters.add("y",s=>Math.max(Math.min(Number(s),this.height()-i.height()),0))),this._disposers.push(i.adapters.add("x",s=>this.width()/2)),this._disposers.push(e.adapters.add("x",s=>this.width()/2)),this._disposers.push(t.adapters.add("x",s=>this.width()/2)),this._disposers.push(e.adapters.add("y",s=>Math.max(Math.min(Number(s),this.height()),0))),this._disposers.push(t.adapters.add("y",s=>Math.max(Math.min(Number(s),this.height()),0)))):(e.set("y",0),t.set("y",0),this._disposers.push(i.adapters.add("x",s=>Math.max(Math.min(Number(s),this.width()-i.width()),0))),this._disposers.push(i.adapters.add("y",s=>this.height()/2)),this._disposers.push(e.adapters.add("y",s=>this.height()/2)),this._disposers.push(t.adapters.add("y",s=>this.height()/2)),this._disposers.push(e.adapters.add("x",s=>Math.max(Math.min(Number(s),this.width()),0))),this._disposers.push(t.adapters.add("x",s=>Math.max(Math.min(Number(s),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,i=this.get("orientation"),r=this.height(),s=this.width();i=="vertical"?(e.set("y",r*this.get("start",0)),t.set("y",r*this.get("end",1))):(e.set("x",s*this.get("start",0)),t.set("x",s*this.get("end",1)));let n=this.getPrivate("positionTextFunction"),o=Math.round(this.get("start",0)*100),l=Math.round(this.get("end",0)*100),u,h;n?(u=n.call(this,this.get("start",0)),h=n.call(this,this.get("end",0))):(u=o+"%",h=l+"%"),e.set("ariaLabel",this._t("From %1",void 0,u)),e.set("ariaValueNow",""+o),e.set("ariaValueText",o+"%"),e.set("ariaValueMin","0"),e.set("ariaValueMax","100"),t.set("ariaLabel",this._t("To %1",void 0,h)),t.set("ariaValueNow",""+l),t.set("ariaValueText",l+"%"),t.set("ariaValueMin","0"),t.set("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,i=this.endGrip,r=this.height(),s=this.width(),n=t.x(),o=i.x(),l=t.y(),u=i.y(),h=0,c=1;this.get("orientation")=="vertical"?w(l)&&w(u)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("height",u-l),e.set("y",l)),h=l/r,c=u/r):w(n)&&w(o)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("width",o-n),e.set("x",n)),h=n/s,c=o/s),this.getPrivate("isBusy")&&(this.get("start")!=h||this.get("end")!=c)&&(this.set("start",h),this.set("end",c));let f=this.getPrivate("positionTextFunction"),d=Math.round(this.get("start",0)*100),m=Math.round(this.get("end",0)*100),b,p;f?(b=f.call(this,this.get("start",0)),p=f.call(this,this.get("end",0))):(b=d+"%",p=m+"%"),e.set("ariaLabel",this._t("From %1 to %2",void 0,b,p)),e.set("ariaValueNow",""+d),e.set("ariaValueText",d+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,i=this.endGrip;if(this.get("orientation")=="vertical"){let r=e.height();t.set("y",e.y()),i.set("y",e.y()+r)}else{let r=e.width();t.set("x",e.x()),i.set("x",e.x()+r)}}};Object.defineProperty(Ft,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Scrollbar"});Object.defineProperty(Ft,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([Ft.className])});function cn(a){this._context=a}cn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(a,e){switch(a=+a,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,e):this._context.moveTo(a,e);break;case 1:this._point=2;default:this._context.lineTo(a,e);break}}};function fi(a){return new cn(a)}var Yi=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}}this._x0=e,this._y0=t}};function ia(a){return new Yi(a,!0)}function ra(a){return new Yi(a,!1)}function dn(a,e,t){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-e),a._y2+a._k*(a._y1-t),a._x2,a._y2)}function fn(a,e){this._context=a,this._k=(1-e)/6}fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:dn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(a,e){switch(a=+a,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,e):this._context.moveTo(a,e);break;case 1:this._point=2,this._x1=a,this._y1=e;break;case 2:this._point=3;default:dn(this,a,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var sa=(function a(e){function t(i){return new fn(i,e)}return t.tension=function(i){return a(+i)},t})(0);function ss(){}function pn(a){this._context=a}pn.prototype={areaStart:ss,areaEnd:ss,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(a,e){a=+a,e=+e,this._point?this._context.lineTo(a,e):(this._point=1,this._context.moveTo(a,e))}};function na(a){return new pn(a)}function W(a){return function(){return a}}var ns=Math.abs,he=Math.atan2,pt=Math.cos,mn=Math.max,Gi=Math.min,ze=Math.sin,Tt=Math.sqrt,me=1e-12,zt=Math.PI,pi=zt/2,gn=2*zt;function bn(a){return a>1?0:a<-1?zt:Math.acos(a)}function as(a){return a>=1?pi:a<=-1?-pi:Math.asin(a)}var os=Math.PI,ls=2*os,Dt=1e-6,aa=ls-Dt;function _n(a){this._+=a[0];for(let e=1,t=a.length;e<t;++e)this._+=arguments[e]+a[e]}function oa(a){let e=Math.floor(a);if(!(e>=0))throw new Error(`invalid digits: ${a}`);if(e>15)return _n;let t=10**e;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*t)/t+i[r]}}var Ot=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?_n:oa(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,i,r){this._append`Q${+e},${+t},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,t,i,r,s,n){this._append`C${+e},${+t},${+i},${+r},${this._x1=+s},${this._y1=+n}`}arcTo(e,t,i,r,s){if(e=+e,t=+t,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let n=this._x1,o=this._y1,l=i-e,u=r-t,h=n-e,c=o-t,f=h*h+c*c;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(f>Dt)if(!(Math.abs(c*l-u*h)>Dt)||!s)this._append`L${this._x1=e},${this._y1=t}`;else{let d=i-n,m=r-o,b=l*l+u*u,p=d*d+m*m,g=Math.sqrt(b),_=Math.sqrt(f),y=s*Math.tan((os-Math.acos((b+f-p)/(2*g*_)))/2),v=y/_,T=y/g;Math.abs(v-1)>Dt&&this._append`L${e+v*h},${t+v*c}`,this._append`A${s},${s},0,0,${+(c*d>h*m)},${this._x1=e+T*l},${this._y1=t+T*u}`}}arc(e,t,i,r,s,n){if(e=+e,t=+t,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(r),l=i*Math.sin(r),u=e+o,h=t+l,c=1^n,f=n?r-s:s-r;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>Dt||Math.abs(this._y1-h)>Dt)&&this._append`L${u},${h}`,i&&(f<0&&(f=f%ls+ls),f>aa?this._append`A${i},${i},0,1,${c},${e-o},${t-l}A${i},${i},0,1,${c},${this._x1=u},${this._y1=h}`:f>Dt&&this._append`A${i},${i},0,${+(f>=os)},${c},${this._x1=e+i*Math.cos(s)},${this._y1=t+i*Math.sin(s)}`)}rect(e,t,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function yn(){return new Ot}yn.prototype=Ot.prototype;function Wt(a){let e=3;return a.digits=function(t){if(!arguments.length)return e;if(t==null)e=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);e=i}return a},()=>new Ot(e)}function la(a){return a.innerRadius}function ua(a){return a.outerRadius}function ha(a){return a.startAngle}function ca(a){return a.endAngle}function da(a){return a&&a.padAngle}function fa(a,e,t,i,r,s,n,o){var l=t-a,u=i-e,h=n-r,c=o-s,f=c*l-h*u;if(!(f*f<me))return f=(h*(e-s)-c*(a-r))/f,[a+f*l,e+f*u]}function Xi(a,e,t,i,r,s,n){var o=a-t,l=e-i,u=(n?s:-s)/Tt(o*o+l*l),h=u*l,c=-u*o,f=a+h,d=e+c,m=t+h,b=i+c,p=(f+m)/2,g=(d+b)/2,_=m-f,y=b-d,v=_*_+y*y,T=r-s,j=f*b-m*d,D=(y<0?-1:1)*Tt(mn(0,T*T*v-j*j)),$=(j*y-_*D)/v,L=(-j*_-y*D)/v,E=(j*y+_*D)/v,k=(-j*_+y*D)/v,H=$-p,P=L-g,C=E-p,B=k-g;return H*H+P*P>C*C+B*B&&($=E,L=k),{cx:$,cy:L,x01:-h,y01:-c,x11:$*(r/T-1),y11:L*(r/T-1)}}function us(){var a=la,e=ua,t=W(0),i=null,r=ha,s=ca,n=da,o=null,l=Wt(u);function u(){var h,c,f=+a.apply(this,arguments),d=+e.apply(this,arguments),m=r.apply(this,arguments)-pi,b=s.apply(this,arguments)-pi,p=ns(b-m),g=b>m;if(o||(o=h=l()),d<f&&(c=d,d=f,f=c),!(d>me))o.moveTo(0,0);else if(p>gn-me)o.moveTo(d*pt(m),d*ze(m)),o.arc(0,0,d,m,b,!g),f>me&&(o.moveTo(f*pt(b),f*ze(b)),o.arc(0,0,f,b,m,g));else{var _=m,y=b,v=m,T=b,j=p,D=p,$=n.apply(this,arguments)/2,L=$>me&&(i?+i.apply(this,arguments):Tt(f*f+d*d)),E=Gi(ns(d-f)/2,+t.apply(this,arguments)),k=E,H=E,P,C;if(L>me){var B=as(L/f*ze($)),$e=as(L/d*ze($));(j-=B*2)>me?(B*=g?1:-1,v+=B,T-=B):(j=0,v=T=(m+b)/2),(D-=$e*2)>me?($e*=g?1:-1,_+=$e,y-=$e):(D=0,_=y=(m+b)/2)}var F=d*pt(_),q=d*ze(_),ae=f*pt(T),ge=f*ze(T);if(E>me){var We=d*pt(y),pe=d*ze(y),Ae=f*pt(v),St=f*ze(v),Be;if(p<zt)if(Be=fa(F,q,Ae,St,We,pe,ae,ge)){var Xt=F-Be[0],Ji=q-Be[1],Qi=We-Be[0],er=pe-Be[1],ds=1/ze(bn((Xt*Qi+Ji*er)/(Tt(Xt*Xt+Ji*Ji)*Tt(Qi*Qi+er*er)))/2),fs=Tt(Be[0]*Be[0]+Be[1]*Be[1]);k=Gi(E,(f-fs)/(ds-1)),H=Gi(E,(d-fs)/(ds+1))}else k=H=0}D>me?H>me?(P=Xi(Ae,St,F,q,d,H,g),C=Xi(We,pe,ae,ge,d,H,g),o.moveTo(P.cx+P.x01,P.cy+P.y01),H<E?o.arc(P.cx,P.cy,H,he(P.y01,P.x01),he(C.y01,C.x01),!g):(o.arc(P.cx,P.cy,H,he(P.y01,P.x01),he(P.y11,P.x11),!g),o.arc(0,0,d,he(P.cy+P.y11,P.cx+P.x11),he(C.cy+C.y11,C.cx+C.x11),!g),o.arc(C.cx,C.cy,H,he(C.y11,C.x11),he(C.y01,C.x01),!g))):(o.moveTo(F,q),o.arc(0,0,d,_,y,!g)):o.moveTo(F,q),!(f>me)||!(j>me)?o.lineTo(ae,ge):k>me?(P=Xi(ae,ge,We,pe,f,-k,g),C=Xi(F,q,Ae,St,f,-k,g),o.lineTo(P.cx+P.x01,P.cy+P.y01),k<E?o.arc(P.cx,P.cy,k,he(P.y01,P.x01),he(C.y01,C.x01),!g):(o.arc(P.cx,P.cy,k,he(P.y01,P.x01),he(P.y11,P.x11),!g),o.arc(0,0,f,he(P.cy+P.y11,P.cx+P.x11),he(C.cy+C.y11,C.cx+C.x11),g),o.arc(C.cx,C.cy,k,he(C.y11,C.x11),he(C.y01,C.x01),!g))):o.arc(0,0,f,T,v,g)}if(o.closePath(),h)return o=null,h+""||null}return u.centroid=function(){var h=(+a.apply(this,arguments)+ +e.apply(this,arguments))/2,c=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-zt/2;return[pt(c)*h,ze(c)*h]},u.innerRadius=function(h){return arguments.length?(a=typeof h=="function"?h:W(+h),u):a},u.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:W(+h),u):e},u.cornerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:W(+h),u):t},u.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:W(+h),u):i},u.startAngle=function(h){return arguments.length?(r=typeof h=="function"?h:W(+h),u):r},u.endAngle=function(h){return arguments.length?(s=typeof h=="function"?h:W(+h),u):s},u.padAngle=function(h){return arguments.length?(n=typeof h=="function"?h:W(+h),u):n},u.context=function(h){return arguments.length?(o=h??null,u):o},u}var Gh=Array.prototype.slice;function Ki(a){return typeof a=="object"&&"length"in a?a:Array.from(a)}function Zi(a){return a[0]}function qi(a){return a[1]}function hs(a,e){var t=W(!0),i=null,r=fi,s=null,n=Wt(o);a=typeof a=="function"?a:a===void 0?Zi:W(a),e=typeof e=="function"?e:e===void 0?qi:W(e);function o(l){var u,h=(l=Ki(l)).length,c,f=!1,d;for(i==null&&(s=r(d=n())),u=0;u<=h;++u)!(u<h&&t(c=l[u],u,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+a(c,u,l),+e(c,u,l));if(d)return s=null,d+""||null}return o.x=function(l){return arguments.length?(a=typeof l=="function"?l:W(+l),o):a},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:W(+l),o):e},o.defined=function(l){return arguments.length?(t=typeof l=="function"?l:W(!!l),o):t},o.curve=function(l){return arguments.length?(r=l,i!=null&&(s=r(i)),o):r},o.context=function(l){return arguments.length?(l==null?i=s=null:s=r(i=l),o):i},o}function pa(a,e,t){var i=null,r=W(!0),s=null,n=fi,o=null,l=Wt(u);a=typeof a=="function"?a:a===void 0?Zi:W(+a),e=typeof e=="function"?e:e===void 0?W(0):W(+e),t=typeof t=="function"?t:t===void 0?qi:W(+t);function u(c){var f,d,m,b=(c=Ki(c)).length,p,g=!1,_,y=new Array(b),v=new Array(b);for(s==null&&(o=n(_=l())),f=0;f<=b;++f){if(!(f<b&&r(p=c[f],f,c))===g)if(g=!g)d=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),m=f-1;m>=d;--m)o.point(y[m],v[m]);o.lineEnd(),o.areaEnd()}g&&(y[f]=+a(p,f,c),v[f]=+e(p,f,c),o.point(i?+i(p,f,c):y[f],t?+t(p,f,c):v[f]))}if(_)return o=null,_+""||null}function h(){return hs().defined(r).curve(n).context(s)}return u.x=function(c){return arguments.length?(a=typeof c=="function"?c:W(+c),i=null,u):a},u.x0=function(c){return arguments.length?(a=typeof c=="function"?c:W(+c),u):a},u.x1=function(c){return arguments.length?(i=c==null?null:typeof c=="function"?c:W(+c),u):i},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:W(+c),t=null,u):e},u.y0=function(c){return arguments.length?(e=typeof c=="function"?c:W(+c),u):e},u.y1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:W(+c),u):t},u.lineX0=u.lineY0=function(){return h().x(a).y(e)},u.lineY1=function(){return h().x(a).y(t)},u.lineX1=function(){return h().x(i).y(e)},u.defined=function(c){return arguments.length?(r=typeof c=="function"?c:W(!!c),u):r},u.curve=function(c){return arguments.length?(n=c,s!=null&&(o=n(s)),u):n},u.context=function(c){return arguments.length?(c==null?s=o=null:o=n(s=c),u):s},u}function vn(a,e){this._context=a,this._t=e}vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,e){switch(a=+a,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,e):this._context.moveTo(a,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(a,e);else{var t=this._x*(1-this._t)+a*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,e)}break}}this._x=a,this._y=e}};function ma(a){return new vn(a,1)}var Ut=class extends Z{constructor(){super(...arguments),Object.defineProperty(this,"ix",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"iy",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_generator",{enumerable:!0,configurable:!0,writable:!0,value:us()})}_getTooltipPoint(){let e=this.get("tooltipX"),t=this.get("tooltipY"),i=0,r=0;w(e)&&(i=e),w(t)&&(r=t);let s=this.get("radius",0),n=this.get("innerRadius",0),o=this.get("dRadius",0),l=this.get("dInnerRadius",0);return s+=o,n+=l,n<0&&(n=s+n),e instanceof A&&(i=this.ix*(n+(s-n)*e.value)),t instanceof A&&(r=this.iy*(n+(s-n)*t.value)),this.get("arc")>=360&&n==0&&(i=0,r=0),{x:i,y:r}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let e=this.get("startAngle",0),t=this.get("arc",0),i=this._generator;t<0&&(e=e+t,t=t*-1),t>.1&&i.cornerRadius(this.get("cornerRadius",0)),i.context(this._display);let r=this.get("radius",0),s=this.get("innerRadius",0),n=this.get("dRadius",0),o=this.get("dInnerRadius",0);r+=n,s+=o,s<0&&(s=r+s),i({innerRadius:s,outerRadius:r,startAngle:(e+90)*yt,endAngle:(e+t+90)*yt});let l=e+t/2;this.ix=xe(l),this.iy=ve(l);let u=this.get("shiftRadius",0);this.setRaw("dx",this.ix*u),this.setRaw("dy",this.iy*u),this.markDirtyPosition()}}};Object.defineProperty(Ut,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Slice"});Object.defineProperty(Ut,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Z.classNames.concat([Ut.className])});var mt=class extends R{constructor(){super(...arguments),Object.defineProperty(this,"chartContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(R.new(this._root,{width:M,height:M,interactiveChildren:!1}))}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:R.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:M,height:M})})}};Object.defineProperty(mt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Chart"});Object.defineProperty(mt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:R.classNames.concat([mt.className])});var Vt=class extends mt{constructor(){super(...arguments),Object.defineProperty(this,"seriesContainer",{enumerable:!0,configurable:!0,writable:!0,value:R.new(this._root,{width:M,height:M,isMeasured:!1})}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:new si})}_afterNew(){super._afterNew(),this._disposers.push(this.series);let e=this.seriesContainer.children;this._disposers.push(this.series.events.onAll(t=>{if(t.type==="clear"){x(t.oldValues,s=>{this._removeSeries(s)});let i=this.get("colors");i&&i.reset();let r=this.get("patterns");r&&r.reset()}else if(t.type==="push")e.moveValue(t.newValue),this._processSeries(t.newValue);else if(t.type==="setIndex")e.setIndex(t.index,t.newValue),this._processSeries(t.newValue);else if(t.type==="insertIndex")e.insertIndex(t.index,t.newValue),this._processSeries(t.newValue);else if(t.type==="removeIndex")this._removeSeries(t.oldValue);else if(t.type==="moveIndex")e.moveValue(t.value,t.newIndex),this._processSeries(t.value);else if(t.type==="swap"){let i=t.a,r=t.b,s=this.series.indexOf(i),n=this.series.indexOf(r);e.moveValue(i,n),e.moveValue(r,s),this.series.each(o=>{this._processSeries(o),o.markDirtyValues()})}else throw new Error("Unknown IListEvent type")}))}_processSeries(e){e.chart=this,e._placeBulletsContainer(this)}_removeSeries(e){e._handleRemoved(),e.isDisposed()||(this.seriesContainer.children.removeValue(e),e._removeBulletsContainer())}};Object.defineProperty(Vt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SerialChart"});Object.defineProperty(Vt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:mt.classNames.concat([Vt.className])});var Yt=class extends we{_beforeChanged(){super._beforeChanged(),this.isDirty("gap")&&(this._clear=!0)}_draw(){super._draw();let e=this.get("width",100),t=this.get("height",100),i=this.get("gap",0),r=this.get("strokeWidth",1);if(!i)this._display.moveTo(0,0),this._display.lineTo(e,0);else{let o=i+r,l=t/o,u=this.get("angle",0)*Math.PI/180;if(u===0)for(let h=-l;h<l*2;h++){let c=Math.round(h*o-o/2)+.5;this._display.moveTo(-e,c),this._display.lineTo(e*2,c)}else{let h=Math.cos(u),c=Math.sin(u),f=Math.sqrt(e*e+t*t)*2,d=o/Math.max(Math.abs(h),Math.abs(c)),m=Math.ceil(f/d)*2;for(let b=-m;b<m;b++){let p=b*o,g=p*c-f*h,_=p*h+f*c,y=p*c+f*h,v=p*h-f*c;this._display.moveTo(g,_),this._display.lineTo(y,v)}}}this._display.lineStyle(r,this.get("color"),this.get("colorOpacity"));let s=this.get("strokeDasharray");w(s)&&(s<.5?s=[0]:s=[s]),this._display.setLineDash(s);let n=this.get("strokeDashoffset");n&&this._display.setLineDashOffset(n),this._display.endStroke()}};Object.defineProperty(Yt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"LinePattern"});Object.defineProperty(Yt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:we.classNames.concat([Yt.className])});var Gt=class extends we{_beforeChanged(){super._beforeChanged(),this.isDirty("gap")&&(this._clear=!0)}_draw(){super._draw();let e=this.get("checkered",!1),t=this.get("centered",!0),i=this.get("gap",0),r=this.get("rotation",0),s=this.get("width",100),n=this.get("height",100),o=this.get("maxWidth",5),l=this.get("maxHeight",5),u=this._display,h=o+i,c=l+i,f=Math.round(s/h),d=Math.round(n/c);h=s/f,c=n/d,r!=0&&(u.x=h/2*xe(r),u.y=-c/2*ve(r));for(let p=r==0?0:-d*2;p<d*2;p++)for(let g=r==0?0:-f*2;g<f*2;g++)if(!e||(p&1)!=1&&(g&1)!=1||(p&1)==1&&(g&1)==1){let _=g*h,y=p*c;t&&(_+=(h-o)/2,y+=(c-l)/2),u.drawRect(_,y,o,l)}e?(s=s/2-i*2,n=n/2-i*2):(s-=i,n-=i);let m=this.get("color"),b=this.get("colorOpacity");(m||b)&&(u.beginFill(m,b),u.endFill())}};Object.defineProperty(Gt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RectanglePattern"});Object.defineProperty(Gt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:we.classNames.concat([Gt.className])});function cs(a,e){for(let t=0,i=e.length;t<i;t++){let r=e[t];if(r.length>0){let s=r[0];if(s.length>0){let n=s[0];a.moveTo(n.x,n.y);for(let o=0,l=r.length;o<l;o++)ga(a,r[o])}}}}function ga(a,e){for(let t=0,i=e.length;t<i;t++){let r=e[t];a.lineTo(r.x,r.y)}}var gt=class extends Z{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let e=this.get("points"),t=this.get("segments");if(e&&e.length>0){let i=e[0];this._display.moveTo(i.x,i.y),cs(this._display,[[e]])}else if(t)cs(this._display,t);else if(!this.get("draw")){let i=this.width(),r=this.height();this._display.moveTo(0,0),this._display.lineTo(i,r)}}}};Object.defineProperty(gt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Line"});Object.defineProperty(gt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Z.classNames.concat([gt.className])});var kt=class extends Me{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeRadialText("",this.textStyle)})}_afterNew(){super._afterNew()}_beforeChanged(){super._beforeChanged(),this._display.clear(),this.isDirty("textType")&&(this._display.textType=this.get("textType"),this.markDirtyBounds()),this.isDirty("radius")&&(this._display.radius=this.get("radius"),this.markDirtyBounds()),this.isDirty("startAngle")&&(this._display.startAngle=(this.get("startAngle",0)+90)*yt,this.markDirtyBounds()),this.isDirty("inside")&&(this._display.inside=this.get("inside"),this.markDirtyBounds()),this.isDirty("orientation")&&(this._display.orientation=this.get("orientation"),this.markDirtyBounds()),this.isDirty("kerning")&&(this._display.kerning=this.get("kerning"),this.markDirtyBounds())}};Object.defineProperty(kt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RadialText"});Object.defineProperty(kt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Me.classNames.concat([kt.className])});var mi=class extends J{constructor(){super(...arguments),Object.defineProperty(this,"_flipped",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){this._textKeys.push("textType","kerning"),super._afterNew()}_makeText(){this._text=this.children.push(kt.new(this._root,{}))}baseRadius(){let e=this.getPrivate("radius",0),t=this.getPrivate("innerRadius",0),i=this.get("baseRadius",0);return t+ce(i,e-t)}radius(){let e=this.get("inside",!1);return this.baseRadius()+this.get("radius",0)*(e?-1:1)}_updateChildren(){if(super._updateChildren(),this.isDirty("baseRadius")||this.isPrivateDirty("radius")||this.isPrivateDirty("innerRadius")||this.isDirty("labelAngle")||this.isDirty("radius")||this.isDirty("inside")||this.isDirty("orientation")||this.isDirty("textType")){let e=this.get("textType","adjusted"),t=this.get("inside",!1),i=this.get("orientation"),r=Et(this.get("labelAngle",0));this._text.set("startAngle",this.get("labelAngle",0)),this._text.set("inside",t);let s=ve(r),n=xe(r),o=this.baseRadius(),l=this.radius();if(this._display.angle=0,e=="circular")this.setAll({paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}),this.setRaw("x",void 0),this.setRaw("y",void 0),this._text.set("orientation",i),this._text.set("radius",l);else{o==0&&(r=0,l=0);let u=l*n,h=l*s;e=="radial"?(this.setRaw("x",u),this.setRaw("y",h),r<90||r>270||i!="auto"?(this._display.angle=r,this._flipped=!1):(this._display.angle=r+180,this._flipped=!0),this._dirty.rotation=!1):e=="adjusted"?(this.setRaw("centerX",I),this.setRaw("centerY",I),this.setRaw("x",u),this.setRaw("y",h)):e=="regular"&&(this.setRaw("x",u),this.setRaw("y",h))}this.markDirtyPosition(),this.markDirtyBounds()}}_updatePosition(){let e=this.get("textType","regular"),t=this.get("inside",!1),i=0,r=0,s=this.get("labelAngle",0),n=this.localBounds(),o=n.right-n.left,l=n.bottom-n.top;if(e=="radial"){if(this._flipped){let u=this.get("centerX");u instanceof A&&(o=o*(1-u.value*2)),i=o*xe(s),r=o*ve(s)}}else!t&&e=="adjusted"&&(i=o/2*xe(s),r=l/2*ve(s));this.setRaw("dx",i),this.setRaw("dy",r),super._updatePosition()}get text(){return this._text}};Object.defineProperty(mi,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RadialLabel"});Object.defineProperty(mi,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:J.classNames.concat([mi.className])});var gi=class extends gt{};Object.defineProperty(gi,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tick"});Object.defineProperty(gi,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:gt.classNames.concat([gi.className])});var bi=class extends z{_afterNew(){super._afterNewApplyThemes(),this._dirty.colors=!1}_beforeChanged(){this.isDirty("colors")&&this.reset()}generateColors(){this.setPrivate("currentPass",this.getPrivate("currentPass",0)+1);let e=this.getPrivate("currentPass"),t=this.get("colors",[this.get("baseColor",O.fromHex(16711680))]);this.getPrivate("numColors")||this.setPrivate("numColors",t.length);let i=this.getPrivate("numColors"),r=0,s=this.get("passOptions"),n=this.get("reuse");for(let o=r;o<i;o++)if(n)t.push(t[o]);else{let l=t[o].toHSL(),u=l.h+(s.hue||0)*e;for(;u>1;)u-=1;let h=l.s+(s.saturation||0)*e;h>1&&(h=1),h<0&&(h=0);let c=l.l+(s.lightness||0)*e;for(;c>1;)c-=1;t.push(O.fromHSL(u,h,c))}}getIndex(e){let t=this.get("colors",[]),i=this.get("saturation");return e>=t.length?(this.generateColors(),this.getIndex(e)):i!=null?O.saturate(t[e],i):t[e]}next(){let e=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",e+this.get("step",1)),this.getIndex(e)}reset(){this.setPrivate("currentStep",this.get("startIndex",0)),this.setPrivate("currentPass",0)}};Object.defineProperty(bi,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ColorSet"});Object.defineProperty(bi,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:z.classNames.concat([bi.className])});function Dd(a){return a!=null&&!a.isDisposed()}function Od(a){let e=Le(a),{r:t,g:i,b:r}=e;return{r:t,g:i,b:r}}function kd(a){let{r:e,g:t,b:i,a:r=1}=a,s=Math.round((1-r)*255+r*e),n=Math.round((1-r)*255+r*t),o=Math.round((1-r)*255+r*i);return .299*s+.587*n+.114*o>128}export{ya as a,ps as b,_e as c,va as d,xa as e,Pn as f,wa as g,A as h,be as i,wn as j,M as k,I as l,_i as m,w as n,Ke as o,Ta as p,x as q,ye as r,re as s,ys as t,vs as u,ws as v,Ps as w,G as x,Ts as y,N as z,Sa as A,se as B,V as C,Je as D,lr as E,ki as F,Qt as G,Aa as H,Ss as I,ce as J,Bs as K,Ba as L,Q as M,Ra as N,Le as O,O as P,et as Q,si as R,Ye as S,yt as T,Mt as U,Va as V,Ya as W,ee as X,ve as Y,xe as Z,Et as _,Xs as $,Ga as aa,Xa as ba,Oe as ca,Bn as da,Ve as ea,ao as fa,z as ga,de as ha,jo as ia,Z as ja,Pe as ka,ct as la,R as ma,J as na,He as oa,ni as pa,ai as qa,oi as ra,Ni as sa,S as ta,ts as ua,Lt as va,fe as wa,Pt as xa,It as ya,it as za,ft as Aa,Nt as Ba,an as Ca,Fe as Da,on as Ea,Zn as Fa,un as Ga,ea as Ha,wt as Ia,hn as Ja,rs as Ka,rt as La,Ht as Ma,mi as Na,Ft as Oa,us as Pa,fi as Qa,hs as Ra,pa as Sa,ia as Ta,ra as Ua,sa as Va,na as Wa,ma as Xa,Ut as Ya,Vt as Za,gi as _a,Yt as $a,Gt as ab,bi as bb,Dd as cb,Od as db,kd as eb};