@oliasoft-open-source/charts-library 5.0.0 → 5.0.1

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 (155) hide show
  1. package/dist/assets/Color-YHDXOIA2-D6i6tiFz.js +1 -0
  2. package/dist/assets/DocsRenderer-CFRXHY34-D88vu1Xb.js +580 -0
  3. package/dist/assets/{bar-chart.stories-BEwhK613.js → bar-chart.stories-D9mtWCnD.js} +35 -35
  4. package/dist/assets/client-9BU5HM4U.js +1 -0
  5. package/dist/assets/entry-preview-D2XJoWVM.js +10 -0
  6. package/dist/assets/entry-preview-docs-z3mMcuG4.js +46 -0
  7. package/dist/assets/get-draggableData-DO0Px5pc.js +2 -0
  8. package/dist/assets/iframe-DLnw2TiW.js +217 -0
  9. package/dist/assets/index-B-BONL6g.js +1 -0
  10. package/dist/assets/index-BGqSdrBK.js +1 -0
  11. package/dist/assets/index-CVdx34fM.js +1 -0
  12. package/dist/assets/index-D3-0uUTW.js +24 -0
  13. package/dist/assets/index-Dytf1aFS.js +8 -0
  14. package/dist/assets/index-eCxJ45ll.js +9 -0
  15. package/dist/assets/jsx-runtime-Y5Ju2SGo.js +9 -0
  16. package/dist/assets/legend-BI53UIaI.js +1346 -0
  17. package/dist/assets/legend-context-BNCYpFYh.js +68 -0
  18. package/dist/assets/line-chart-BdFuLh7N.js +1 -0
  19. package/dist/assets/line-chart.stories-BVsiy8CQ.js +1130 -0
  20. package/dist/assets/{line-chart.test-case.stories-Cq5J45Io.js → line-chart.test-case.stories-DgfMW1VB.js} +2 -2
  21. package/dist/assets/pie-chart.stories-BVurv17M.js +45 -0
  22. package/dist/assets/preview-CLM2f008.js +2 -0
  23. package/dist/assets/preview-DD_OYowb.js +1 -0
  24. package/dist/assets/preview-XObsormK.js +3 -0
  25. package/dist/assets/react-18-DZY5LW1V.js +1 -0
  26. package/dist/assets/react-CxVRKATl.js +1 -0
  27. package/dist/assets/scatter-chart.stories-DnivHhIH.js +41 -0
  28. package/dist/bar-chart/utils/use-bar-chart-config.d.ts +1 -1
  29. package/dist/bar-chart/utils/use-bar-chart-options.d.ts +1 -1
  30. package/dist/common/controls-portal.d.ts +1 -1
  31. package/dist/common/helpers/container.d.ts +1 -1
  32. package/dist/common/helpers/download-pgn.d.ts +1 -1
  33. package/dist/common/hooks/use-generated-labels.d.ts +1 -1
  34. package/dist/common/hooks/use-legend-state.d.ts +1 -1
  35. package/dist/common/hooks/use-reset.d.ts +1 -1
  36. package/dist/common/legend-component/legend-interface.d.ts +1 -1
  37. package/dist/common/legend-component/legend-panel.d.ts +1 -1
  38. package/dist/common/legend-component/state/legend-context.d.ts +1 -1
  39. package/dist/favicon.svg +1 -7
  40. package/dist/iframe.html +259 -51
  41. package/dist/index.html +80 -30
  42. package/dist/index.js.js +411 -574
  43. package/dist/index.js.js.map +1 -1
  44. package/dist/index.json +1 -1
  45. package/dist/line-chart/controls/controls-interfaces.d.ts +1 -1
  46. package/dist/line-chart/hooks/use-chart-functions.d.ts +1 -1
  47. package/dist/line-chart/hooks/use-chart-options.d.ts +1 -1
  48. package/dist/line-chart/hooks/use-chart-state.d.ts +1 -1
  49. package/dist/line-chart/hooks/use-toggle-handler.d.ts +1 -1
  50. package/dist/line-chart/line-chart.interface.d.ts +1 -1
  51. package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +1 -1
  52. package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +1 -1
  53. package/dist/line-chart/utils/get-axis-range-by-type.d.ts +1 -1
  54. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  55. package/dist/nunito-sans-bold.woff2 +0 -0
  56. package/dist/nunito-sans-italic.woff2 +0 -0
  57. package/dist/nunito-sans-regular.woff2 +0 -0
  58. package/dist/project.json +1 -1
  59. package/dist/sb-addons/actions-1/manager-bundle.js +3 -0
  60. package/dist/sb-addons/docs-2/manager-bundle.js +242 -0
  61. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  62. package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +5 -0
  63. package/dist/sb-common-assets/favicon.svg +1 -0
  64. package/dist/sb-manager/globals-module-info.js +1051 -1
  65. package/dist/sb-manager/globals-runtime.js +41591 -0
  66. package/dist/sb-manager/globals.js +48 -1
  67. package/dist/sb-manager/runtime.js +12048 -1
  68. package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +1 -1
  69. package/dist/src/components/common/helpers/chart-utils.d.ts +1 -0
  70. package/dist/src/components/line-chart/controls/axes-options/axes-options-interfaces.d.ts +7 -5
  71. package/dist/src/components/line-chart/controls/axes-options/axes-validation.d.ts +8 -0
  72. package/dist/src/components/line-chart/controls/controls-interfaces.d.ts +1 -1
  73. package/dist/src/components/line-chart/controls/controls.d.ts +1 -4
  74. package/dist/src/components/line-chart/hooks/use-chart-state.d.ts +2 -3
  75. package/dist/src/components/line-chart/line-chart.interface.d.ts +4 -0
  76. package/dist/src/components/line-chart/state/action-types.d.ts +0 -1
  77. package/dist/src/components/line-chart/state/helpers.d.ts +13 -0
  78. package/dist/src/components/line-chart/state/state.interfaces.d.ts +3 -12
  79. package/package.json +1 -1
  80. package/dist/assets/Color-6VNJS4EI-DLbcRNMp.js +0 -1
  81. package/dist/assets/DocsRenderer-NNNQARDV-BOzykHvd.js +0 -1
  82. package/dist/assets/WithTooltip-V3YHNWJZ-BeePhoIB.js +0 -1
  83. package/dist/assets/_getPrototype-Bgn98YsR.js +0 -3
  84. package/dist/assets/chunk-HLWAVYOI-BJEcfeBO.js +0 -364
  85. package/dist/assets/entry-preview-D8lfu5jc.js +0 -1
  86. package/dist/assets/entry-preview-docs-CRyh30bF.js +0 -54
  87. package/dist/assets/formatter-SWP5E3XI-Bj1a9__W.js +0 -156
  88. package/dist/assets/get-draggableData-DhvAHrT5.js +0 -2
  89. package/dist/assets/iframe-BurE_SJm.js +0 -8
  90. package/dist/assets/index-B7LTuyD5.js +0 -1
  91. package/dist/assets/index-BXzfdmYx.js +0 -24
  92. package/dist/assets/index-CZvFZgOq.js +0 -9
  93. package/dist/assets/index-D3eZ-H7s.js +0 -1
  94. package/dist/assets/index-DrFu-skq.js +0 -6
  95. package/dist/assets/index-uubelm5h.js +0 -9
  96. package/dist/assets/isPlainObject-DdO3KXLu.js +0 -1
  97. package/dist/assets/legend-BWpTckOL.js +0 -278
  98. package/dist/assets/legend-context-BAQplG-D.js +0 -71
  99. package/dist/assets/line-chart-L0zq38Nj.js +0 -1
  100. package/dist/assets/line-chart.stories-CurD8upE.js +0 -1130
  101. package/dist/assets/pie-chart.stories-Duex2I6n.js +0 -45
  102. package/dist/assets/preview-BBDnT5_b.js +0 -30
  103. package/dist/assets/preview-D4u66u8a.js +0 -2
  104. package/dist/assets/preview-FHoZfaOb.js +0 -17
  105. package/dist/assets/react-18-Xi5cNDBV.js +0 -1
  106. package/dist/assets/scatter-chart.stories-D0618GGr.js +0 -41
  107. package/dist/assets/syntaxhighlighter-MJWPISIS-Bmhn3z6A.js +0 -1
  108. package/dist/bar-chart/bar-chart.stories.d.ts +0 -807
  109. package/dist/common/helpers/range/estimate-close-values.test.d.ts +0 -1
  110. package/dist/common/helpers/range/range.test.d.ts +0 -1
  111. package/dist/common/plugins/annotation-dragger-plugin/helpers.test.d.ts +0 -1
  112. package/dist/line-chart/__tests__/test-data/app-test-case-1.json.d.ts +0 -8733
  113. package/dist/line-chart/__tests__/test-data/app-test-case-2.json.d.ts +0 -11614
  114. package/dist/line-chart/__tests__/test-data/app-test-case-3.json.d.ts +0 -34
  115. package/dist/line-chart/__tests__/test-data/app-test-case-4.json.d.ts +0 -411
  116. package/dist/line-chart/__tests__/test-data/app-test-case-5.json.d.ts +0 -2734
  117. package/dist/line-chart/__tests__/test-data/app-test-case-6.json.d.ts +0 -2236
  118. package/dist/line-chart/controls/axes-options/axes-options-form-state.test.d.ts +0 -1
  119. package/dist/line-chart/initialize/initialize-line-chart.test.d.ts +0 -1
  120. package/dist/line-chart/line-chart.stories.d.ts +0 -1729
  121. package/dist/line-chart/line-chart.test-case.stories.d.ts +0 -29
  122. package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.test.d.ts +0 -1
  123. package/dist/line-chart/utils/__tests__/get-annotations-data.test.d.ts +0 -1
  124. package/dist/line-chart/utils/__tests__/get-axes-data-from-metasets.test.d.ts +0 -1
  125. package/dist/line-chart/utils/__tests__/get-axes-type-from-key.test.d.ts +0 -1
  126. package/dist/line-chart/utils/__tests__/get-axis-range-by-type.test.d.ts +0 -1
  127. package/dist/line-chart/utils/__tests__/get-line-chart-tooltips.test.d.ts +0 -1
  128. package/dist/line-chart/utils/axis-formatting/axis-formatting.test.d.ts +0 -1
  129. package/dist/line-chart/utils/axis-scales/axis-scales.test.d.ts +0 -1
  130. package/dist/line-chart/utils/check-custom-option/check-custom-option.test.d.ts +0 -1
  131. package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-condition.test.d.ts +0 -1
  132. package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-data.test.d.ts +0 -1
  133. package/dist/line-chart/utils/datalabels-alignment/__tests__/get-datalabels-position.test.d.ts +0 -1
  134. package/dist/line-chart/utils/translations/get-translations.test.d.ts +0 -1
  135. package/dist/pie-chart/pie-chart.stories.d.ts +0 -263
  136. package/dist/sb-addons/actions-0/manager-bundle.js +0 -3
  137. package/dist/sb-addons/actions-0/manager-bundle.js.LEGAL.txt +0 -0
  138. package/dist/sb-addons/storybook-dark-mode-esm-preset-1/manager-bundle.js +0 -5
  139. package/dist/sb-addons/storybook-dark-mode-esm-preset-1/manager-bundle.js.LEGAL.txt +0 -0
  140. package/dist/sb-common-assets/fonts.css +0 -31
  141. package/dist/sb-manager/WithTooltip-V3YHNWJZ-MXTFSDU5.js +0 -1
  142. package/dist/sb-manager/chunk-5QAFKPS7.js +0 -7
  143. package/dist/sb-manager/chunk-7PRFHFSS.js +0 -9
  144. package/dist/sb-manager/chunk-XE6LDGTE.js +0 -406
  145. package/dist/sb-manager/chunk-YDUB7CS6.js +0 -348
  146. package/dist/sb-manager/chunk-ZEU7PDD3.js +0 -1
  147. package/dist/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +0 -156
  148. package/dist/sb-manager/index.js +0 -1
  149. package/dist/sb-manager/syntaxhighlighter-MJWPISIS-JOSCT6CQ.js +0 -1
  150. package/dist/sb-preview/globals.js +0 -1
  151. package/dist/sb-preview/runtime.js +0 -112
  152. package/dist/scatter-chart/scatter-chart.stories.d.ts +0 -279
  153. package/dist/src/components/line-chart/controls/axes-options/action-types.d.ts +0 -5
  154. package/dist/src/components/line-chart/controls/axes-options/axes-options-form-state.d.ts +0 -23
  155. package/dist/stories.json +0 -1
@@ -1,71 +0,0 @@
1
- var Nv=Object.defineProperty;var Cv=(e,t,n)=>t in e?Nv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var nt=(e,t,n)=>Cv(e,typeof t!="symbol"?t+"":t,n);import{r as Te,R as rg,g as sg,c as Fi}from"./index-uubelm5h.js";import{e as kv,j as Ov}from"./index-CZvFZgOq.js";/*!
2
- * @kurkle/color v0.3.4
3
- * https://github.com/kurkle/color#readme
4
- * (c) 2024 Jukka Kurkela
5
- * Released under the MIT License
6
- */function Rs(e){return e+.5|0}const oi=(e,t,n)=>Math.max(Math.min(e,n),t);function ps(e){return oi(Rs(e*2.55),0,255)}function ui(e){return oi(Rs(e*255),0,255)}function zn(e){return oi(Rs(e/2.55)/100,0,1)}function ch(e){return oi(Rs(e*100),0,100)}const tn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},dc=[..."0123456789ABCDEF"],Av=e=>dc[e&15],Iv=e=>dc[(e&240)>>4]+dc[e&15],Io=e=>(e&240)>>4===(e&15),Dv=e=>Io(e.r)&&Io(e.g)&&Io(e.b)&&Io(e.a);function Rv(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&tn[e[1]]*17,g:255&tn[e[2]]*17,b:255&tn[e[3]]*17,a:t===5?tn[e[4]]*17:255}:(t===7||t===9)&&(n={r:tn[e[1]]<<4|tn[e[2]],g:tn[e[3]]<<4|tn[e[4]],b:tn[e[5]]<<4|tn[e[6]],a:t===9?tn[e[7]]<<4|tn[e[8]]:255})),n}const Lv=(e,t)=>e<255?t(e):"";function Fv(e){var t=Dv(e)?Av:Iv;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Lv(e.a,t):void 0}const Bv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function og(e,t,n){const r=t*Math.min(n,1-n),i=(o,l=(o+e/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[i(0),i(8),i(4)]}function Wv(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function zv(e,t,n){const r=og(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Uv(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function Oc(e){const n=e.r/255,r=e.g/255,i=e.b/255,o=Math.max(n,r,i),l=Math.min(n,r,i),c=(o+l)/2;let f,h,d;return o!==l&&(d=o-l,h=c>.5?d/(2-o-l):d/(o+l),f=Uv(n,r,i,d,o),f=f*60+.5),[f|0,h||0,c]}function Ac(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ui)}function Ic(e,t,n){return Ac(og,e,t,n)}function Hv(e,t,n){return Ac(zv,e,t,n)}function Vv(e,t,n){return Ac(Wv,e,t,n)}function ag(e){return(e%360+360)%360}function Gv(e){const t=Bv.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?ps(+t[5]):ui(+t[5]));const i=ag(+t[2]),o=+t[3]/100,l=+t[4]/100;return t[1]==="hwb"?r=Hv(i,o,l):t[1]==="hsv"?r=Vv(i,o,l):r=Ic(i,o,l),{r:r[0],g:r[1],b:r[2],a:n}}function jv(e,t){var n=Oc(e);n[0]=ag(n[0]+t),n=Ic(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Kv(e){if(!e)return;const t=Oc(e),n=t[0],r=ch(t[1]),i=ch(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${zn(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const uh={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},fh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $v(){const e={},t=Object.keys(fh),n=Object.keys(uh);let r,i,o,l,c;for(r=0;r<t.length;r++){for(l=c=t[r],i=0;i<n.length;i++)o=n[i],c=c.replace(o,uh[o]);o=parseInt(fh[l],16),e[c]=[o>>16&255,o>>8&255,o&255]}return e}let Do;function Yv(e){Do||(Do=$v(),Do.transparent=[0,0,0,0]);const t=Do[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Xv=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function qv(e){const t=Xv.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const l=+t[7];n=t[8]?ps(l):oi(l*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?ps(r):oi(r,0,255)),i=255&(t[4]?ps(i):oi(i,0,255)),o=255&(t[6]?ps(o):oi(o,0,255)),{r,g:i,b:o,a:n}}}function Zv(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${zn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Gl=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,_r=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Jv(e,t,n){const r=_r(zn(e.r)),i=_r(zn(e.g)),o=_r(zn(e.b));return{r:ui(Gl(r+n*(_r(zn(t.r))-r))),g:ui(Gl(i+n*(_r(zn(t.g))-i))),b:ui(Gl(o+n*(_r(zn(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Ro(e,t,n){if(e){let r=Oc(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Ic(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function lg(e,t){return e&&Object.assign(t||{},e)}function hh(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ui(e[3]))):(t=lg(e,{r:0,g:0,b:0,a:1}),t.a=ui(t.a)),t}function Qv(e){return e.charAt(0)==="r"?qv(e):Gv(e)}class Ns{constructor(t){if(t instanceof Ns)return t;const n=typeof t;let r;n==="object"?r=hh(t):n==="string"&&(r=Rv(t)||Yv(t)||Qv(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=lg(this._rgb);return t&&(t.a=zn(t.a)),t}set rgb(t){this._rgb=hh(t)}rgbString(){return this._valid?Zv(this._rgb):void 0}hexString(){return this._valid?Fv(this._rgb):void 0}hslString(){return this._valid?Kv(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const l=n===o?.5:n,c=2*l-1,f=r.a-i.a,h=((c*f===-1?c:(c+f)/(1+c*f))+1)/2;o=1-h,r.r=255&h*r.r+o*i.r+.5,r.g=255&h*r.g+o*i.g+.5,r.b=255&h*r.b+o*i.b+.5,r.a=l*r.a+(1-l)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Jv(this._rgb,t._rgb,n)),this}clone(){return new Ns(this.rgb)}alpha(t){return this._rgb.a=ui(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Rs(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ro(this._rgb,2,t),this}darken(t){return Ro(this._rgb,2,-t),this}saturate(t){return Ro(this._rgb,1,t),this}desaturate(t){return Ro(this._rgb,1,-t),this}rotate(t){return jv(this._rgb,t),this}}/*!
7
- * Chart.js v4.4.7
8
- * https://www.chartjs.org
9
- * (c) 2024 Chart.js Contributors
10
- * Released under the MIT License
11
- */function Fn(){}const tS=(()=>{let e=0;return()=>e++})();function At(e){return e==null}function te(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Pt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ie(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ue(e,t){return ie(e)?e:t}function pt(e,t){return typeof e>"u"?t:e}const eS=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,cg=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ut(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Tt(e,t,n,r){let i,o,l;if(te(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Pt(e))for(l=Object.keys(e),o=l.length,i=0;i<o;i++)t.call(n,e[l[i]],l[i])}function sa(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function oa(e){if(te(e))return e.map(oa);if(Pt(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=oa(e[n[i]]);return t}return e}function ug(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function nS(e,t,n,r){if(!ug(e))return;const i=t[e],o=n[e];Pt(i)&&Pt(o)?Tn(i,o,r):t[e]=oa(o)}function Tn(e,t,n){const r=te(t)?t:[t],i=r.length;if(!Pt(e))return e;n=n||{};const o=n.merger||nS;let l;for(let c=0;c<i;++c){if(l=r[c],!Pt(l))continue;const f=Object.keys(l);for(let h=0,d=f.length;h<d;++h)o(f[h],e,l,n)}return e}function Ss(e,t){return Tn(e,t,{merger:iS})}function iS(e,t,n){if(!ug(e))return;const r=t[e],i=n[e];Pt(r)&&Pt(i)?Ss(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=oa(i))}const dh={"":e=>e,x:e=>e.x,y:e=>e.y};function rS(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function sS(e){const t=rS(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Hi(e,t){return(dh[t]||(dh[t]=sS(t)))(e)}function Dc(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Cs=e=>typeof e<"u",hi=e=>typeof e=="function",gh=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function oS(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const qt=Math.PI,$t=2*qt,aS=$t+qt,aa=Number.POSITIVE_INFINITY,lS=qt/180,oe=qt/2,Ai=qt/4,mh=qt*2/3,ai=Math.log10,nn=Math.sign;function zi(e,t,n){return Math.abs(e-t)<n}function ph(e){const t=Math.round(e);e=zi(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(ai(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function cS(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function wr(e){return!isNaN(parseFloat(e))&&isFinite(e)}function uS(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function fg(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Un(e){return e*(qt/180)}function fS(e){return e*(180/qt)}function bh(e){if(!ie(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function hg(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*qt&&(o+=$t),{angle:o,distance:i}}function gc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function hS(e,t){return(e-t+aS)%$t-qt}function yn(e){return(e%$t+$t)%$t}function ks(e,t,n,r){const i=yn(e),o=yn(t),l=yn(n),c=yn(o-i),f=yn(l-i),h=yn(i-o),d=yn(i-l);return i===o||i===l||r&&o===l||c>f&&h<d}function _e(e,t,n){return Math.max(t,Math.min(n,e))}function dS(e){return _e(e,-32768,32767)}function Hn(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Rc(e,t,n){n=n||(l=>e[l]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Bi=(e,t,n,r)=>Rc(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),gS=(e,t,n)=>Rc(e,n,r=>e[r][t]>=n);function mS(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const dg=["push","pop","shift","splice","unshift"];function pS(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),dg.forEach(n=>{const r="_onData"+Dc(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const l=i.apply(this,o);return e._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...o)}),l}})})}function _h(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(dg.forEach(o=>{delete e[o]}),delete e._chartjs)}function gg(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const mg=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function pg(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,mg.call(window,()=>{r=!1,e.apply(t,n)}))}}function bS(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Lc=e=>e==="start"?"left":e==="end"?"right":"center",be=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,_S=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function bg(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:l,_parsed:c}=e,f=l.axis,{min:h,max:d,minDefined:m,maxDefined:p}=l.getUserBounds();m&&(i=_e(Math.min(Bi(c,f,h).lo,n?r:Bi(t,f,l.getPixelForValue(h)).lo),0,r-1)),p?o=_e(Math.max(Bi(c,l.axis,d,!0).hi+1,n?0:Bi(t,f,l.getPixelForValue(d),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function _g(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Lo=e=>e===0||e===1,yh=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*$t/n)),vh=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*$t/n)+1,xs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*oe)+1,easeOutSine:e=>Math.sin(e*oe),easeInOutSine:e=>-.5*(Math.cos(qt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Lo(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Lo(e)?e:yh(e,.075,.3),easeOutElastic:e=>Lo(e)?e:vh(e,.075,.3),easeInOutElastic(e){return Lo(e)?e:e<.5?.5*yh(e*2,.1125,.45):.5+.5*vh(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-xs.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?xs.easeInBounce(e*2)*.5:xs.easeOutBounce(e*2-1)*.5+.5};function Fc(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Sh(e){return Fc(e)?e:new Ns(e)}function jl(e){return Fc(e)?e:new Ns(e).saturate(.5).darken(.1).hexString()}const yS=["x","y","borderWidth","radius","tension"],vS=["color","borderColor","backgroundColor"];function SS(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:vS},numbers:{type:"number",properties:yS}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function xS(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const xh=new Map;function TS(e,t){t=t||{};const n=e+JSON.stringify(t);let r=xh.get(n);return r||(r=new Intl.NumberFormat(e,t),xh.set(n,r)),r}function ga(e,t,n){return TS(t,n).format(e)}const yg={values(e){return te(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const h=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(h<1e-4||h>1e15)&&(i="scientific"),o=wS(e,n)}const l=ai(Math.abs(o)),c=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),f={notation:i,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(f,this.options.ticks.format),ga(e,r,f)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(ai(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?yg.numeric.call(this,e,t,n):""}};function wS(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Bc={formatters:yg};function MS(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Bc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Vi=Object.create(null),mc=Object.create(null);function Ts(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function Kl(e,t,n){return typeof t=="string"?Tn(Ts(e,t),n):Tn(Ts(e,""),t)}class PS{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>jl(i.backgroundColor),this.hoverBorderColor=(r,i)=>jl(i.borderColor),this.hoverColor=(r,i)=>jl(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Kl(this,t,n)}get(t){return Ts(this,t)}describe(t,n){return Kl(mc,t,n)}override(t,n){return Kl(Vi,t,n)}route(t,n,r,i){const o=Ts(this,t),l=Ts(this,r),c="_"+n;Object.defineProperties(o,{[c]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const f=this[c],h=l[i];return Pt(f)?Object.assign({},h,f):pt(f,h)},set(f){this[c]=f}}})}apply(t){t.forEach(n=>n(this))}}var zt=new PS({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[SS,xS,MS]);function ES(e){return!e||At(e.size)||At(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Th(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function Ii(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function wh(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function pc(e,t,n,r){vg(e,t,n,r,null)}function vg(e,t,n,r,i){let o,l,c,f,h,d,m,p;const S=t.pointStyle,P=t.rotation,E=t.radius;let I=(P||0)*lS;if(S&&typeof S=="object"&&(o=S.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(I),e.drawImage(S,-S.width/2,-S.height/2,S.width,S.height),e.restore();return}if(!(isNaN(E)||E<=0)){switch(e.beginPath(),S){default:i?e.ellipse(n,r,i/2,E,0,0,$t):e.arc(n,r,E,0,$t),e.closePath();break;case"triangle":d=i?i/2:E,e.moveTo(n+Math.sin(I)*d,r-Math.cos(I)*E),I+=mh,e.lineTo(n+Math.sin(I)*d,r-Math.cos(I)*E),I+=mh,e.lineTo(n+Math.sin(I)*d,r-Math.cos(I)*E),e.closePath();break;case"rectRounded":h=E*.516,f=E-h,l=Math.cos(I+Ai)*f,m=Math.cos(I+Ai)*(i?i/2-h:f),c=Math.sin(I+Ai)*f,p=Math.sin(I+Ai)*(i?i/2-h:f),e.arc(n-m,r-c,h,I-qt,I-oe),e.arc(n+p,r-l,h,I-oe,I),e.arc(n+m,r+c,h,I,I+oe),e.arc(n-p,r+l,h,I+oe,I+qt),e.closePath();break;case"rect":if(!P){f=Math.SQRT1_2*E,d=i?i/2:f,e.rect(n-d,r-f,2*d,2*f);break}I+=Ai;case"rectRot":m=Math.cos(I)*(i?i/2:E),l=Math.cos(I)*E,c=Math.sin(I)*E,p=Math.sin(I)*(i?i/2:E),e.moveTo(n-m,r-c),e.lineTo(n+p,r-l),e.lineTo(n+m,r+c),e.lineTo(n-p,r+l),e.closePath();break;case"crossRot":I+=Ai;case"cross":m=Math.cos(I)*(i?i/2:E),l=Math.cos(I)*E,c=Math.sin(I)*E,p=Math.sin(I)*(i?i/2:E),e.moveTo(n-m,r-c),e.lineTo(n+m,r+c),e.moveTo(n+p,r-l),e.lineTo(n-p,r+l);break;case"star":m=Math.cos(I)*(i?i/2:E),l=Math.cos(I)*E,c=Math.sin(I)*E,p=Math.sin(I)*(i?i/2:E),e.moveTo(n-m,r-c),e.lineTo(n+m,r+c),e.moveTo(n+p,r-l),e.lineTo(n-p,r+l),I+=Ai,m=Math.cos(I)*(i?i/2:E),l=Math.cos(I)*E,c=Math.sin(I)*E,p=Math.sin(I)*(i?i/2:E),e.moveTo(n-m,r-c),e.lineTo(n+m,r+c),e.moveTo(n+p,r-l),e.lineTo(n-p,r+l);break;case"line":l=i?i/2:Math.cos(I)*E,c=Math.sin(I)*E,e.moveTo(n-l,r-c),e.lineTo(n+l,r+c);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(I)*(i?i/2:E),r+Math.sin(I)*E);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Mr(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function ma(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function pa(e){e.restore()}function NS(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function CS(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function kS(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),At(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function OS(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),l=t-o.actualBoundingBoxLeft,c=t+o.actualBoundingBoxRight,f=n-o.actualBoundingBoxAscent,h=n+o.actualBoundingBoxDescent,d=i.strikethrough?(f+h)/2:h;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(l,d),e.lineTo(c,d),e.stroke()}}function AS(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Os(e,t,n,r,i,o={}){const l=te(t)?t:[t],c=o.strokeWidth>0&&o.strokeColor!=="";let f,h;for(e.save(),e.font=i.string,kS(e,o),f=0;f<l.length;++f)h=l[f],o.backdrop&&AS(e,o.backdrop),c&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),At(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(h,n,r,o.maxWidth)),e.fillText(h,n,r,o.maxWidth),OS(e,n,r,h,o),r+=Number(i.lineHeight);e.restore()}function la(e,t){const{x:n,y:r,w:i,h:o,radius:l}=t;e.arc(n+l.topLeft,r+l.topLeft,l.topLeft,1.5*qt,qt,!0),e.lineTo(n,r+o-l.bottomLeft),e.arc(n+l.bottomLeft,r+o-l.bottomLeft,l.bottomLeft,qt,oe,!0),e.lineTo(n+i-l.bottomRight,r+o),e.arc(n+i-l.bottomRight,r+o-l.bottomRight,l.bottomRight,oe,0,!0),e.lineTo(n+i,r+l.topRight),e.arc(n+i-l.topRight,r+l.topRight,l.topRight,0,-oe,!0),e.lineTo(n+l.topLeft,r)}const IS=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,DS=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function RS(e,t){const n=(""+e).match(IS);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const LS=e=>+e||0;function Wc(e,t){const n={},r=Pt(t),i=r?Object.keys(t):t,o=Pt(e)?r?l=>pt(e[l],e[t[l]]):l=>e[l]:()=>e;for(const l of i)n[l]=LS(o(l));return n}function Sg(e){return Wc(e,{top:"y",right:"x",bottom:"y",left:"x"})}function vr(e){return Wc(e,["topLeft","topRight","bottomLeft","bottomRight"])}function He(e){const t=Sg(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ge(e,t){e=e||{},t=t||zt.font;let n=pt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=pt(e.style,t.style);r&&!(""+r).match(DS)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:pt(e.family,t.family),lineHeight:RS(pt(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:pt(e.weight,t.weight),string:""};return i.string=ES(i),i}function jt(e,t,n,r){let i,o,l;for(i=0,o=e.length;i<o;++i)if(l=e[i],l!==void 0&&(t!==void 0&&typeof l=="function"&&(l=l(t)),n!==void 0&&te(l)&&(l=l[n%l.length]),l!==void 0))return l}function FS(e,t,n){const{min:r,max:i}=e,o=cg(t,(i-r)/2),l=(c,f)=>n&&c===0?0:c+f;return{min:l(r,-Math.abs(o)),max:l(i,o)}}function Gi(e,t){return Object.assign(Object.create(e),t)}function zc(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=Mg("_fallback",e));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:c=>zc([c,...e],t,o,r)};return new Proxy(l,{deleteProperty(c,f){return delete c[f],delete c._keys,delete e[0][f],!0},get(c,f){return Tg(c,f,()=>jS(f,t,e,c))},getOwnPropertyDescriptor(c,f){return Reflect.getOwnPropertyDescriptor(c._scopes[0],f)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(c,f){return Ph(c).includes(f)},ownKeys(c){return Ph(c)},set(c,f,h){const d=c._storage||(c._storage=i());return c[f]=d[f]=h,delete c._keys,!0}})}function Pr(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:xg(e,r),setContext:o=>Pr(e,o,n,r),override:o=>Pr(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,l){return delete o[l],delete e[l],!0},get(o,l,c){return Tg(o,l,()=>WS(o,l,c))},getOwnPropertyDescriptor(o,l){return o._descriptors.allKeys?Reflect.has(e,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,l)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,l){return Reflect.has(e,l)},ownKeys(){return Reflect.ownKeys(e)},set(o,l,c){return e[l]=c,delete o[l],!0}})}function xg(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:hi(n)?n:()=>n,isIndexable:hi(r)?r:()=>r}}const BS=(e,t)=>e?e+Dc(t):t,Uc=(e,t)=>Pt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Tg(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function WS(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:l}=e;let c=r[t];return hi(c)&&l.isScriptable(t)&&(c=zS(t,c,e,n)),te(c)&&c.length&&(c=US(t,c,e,l.isIndexable)),Uc(t,c)&&(c=Pr(c,i,o&&o[t],l)),c}function zS(e,t,n,r){const{_proxy:i,_context:o,_subProxy:l,_stack:c}=n;if(c.has(e))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+e);c.add(e);let f=t(o,l||r);return c.delete(e),Uc(e,f)&&(f=Hc(i._scopes,i,e,f)),f}function US(e,t,n,r){const{_proxy:i,_context:o,_subProxy:l,_descriptors:c}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Pt(t[0])){const f=t,h=i._scopes.filter(d=>d!==f);t=[];for(const d of f){const m=Hc(h,i,e,d);t.push(Pr(m,o,l&&l[e],c))}}return t}function wg(e,t,n){return hi(e)?e(t,n):e}const HS=(e,t)=>e===!0?t:typeof e=="string"?Hi(t,e):void 0;function VS(e,t,n,r,i){for(const o of t){const l=HS(n,o);if(l){e.add(l);const c=wg(l._fallback,n,i);if(typeof c<"u"&&c!==n&&c!==r)return c}else if(l===!1&&typeof r<"u"&&n!==r)return null}return!1}function Hc(e,t,n,r){const i=t._rootScopes,o=wg(t._fallback,n,r),l=[...e,...i],c=new Set;c.add(r);let f=Mh(c,l,n,o||n,r);return f===null||typeof o<"u"&&o!==n&&(f=Mh(c,l,o,f,r),f===null)?!1:zc(Array.from(c),[""],i,o,()=>GS(t,n,r))}function Mh(e,t,n,r,i){for(;n;)n=VS(e,t,n,r,i);return n}function GS(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return te(i)&&Pt(n)?n:i||{}}function jS(e,t,n,r){let i;for(const o of t)if(i=Mg(BS(o,e),n),typeof i<"u")return Uc(e,i)?Hc(n,r,e,i):i}function Mg(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Ph(e){let t=e._keys;return t||(t=e._keys=KS(e._scopes)),t}function KS(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const $S=Number.EPSILON||1e-14,Er=(e,t)=>t<e.length&&!e[t].skip&&e[t],Pg=e=>e==="x"?"y":"x";function YS(e,t,n,r){const i=e.skip?t:e,o=t,l=n.skip?t:n,c=gc(o,i),f=gc(l,o);let h=c/(c+f),d=f/(c+f);h=isNaN(h)?0:h,d=isNaN(d)?0:d;const m=r*h,p=r*d;return{previous:{x:o.x-m*(l.x-i.x),y:o.y-m*(l.y-i.y)},next:{x:o.x+p*(l.x-i.x),y:o.y+p*(l.y-i.y)}}}function XS(e,t,n){const r=e.length;let i,o,l,c,f,h=Er(e,0);for(let d=0;d<r-1;++d)if(f=h,h=Er(e,d+1),!(!f||!h)){if(zi(t[d],0,$S)){n[d]=n[d+1]=0;continue}i=n[d]/t[d],o=n[d+1]/t[d],c=Math.pow(i,2)+Math.pow(o,2),!(c<=9)&&(l=3/Math.sqrt(c),n[d]=i*l*t[d],n[d+1]=o*l*t[d])}}function qS(e,t,n="x"){const r=Pg(n),i=e.length;let o,l,c,f=Er(e,0);for(let h=0;h<i;++h){if(l=c,c=f,f=Er(e,h+1),!c)continue;const d=c[n],m=c[r];l&&(o=(d-l[n])/3,c[`cp1${n}`]=d-o,c[`cp1${r}`]=m-o*t[h]),f&&(o=(f[n]-d)/3,c[`cp2${n}`]=d+o,c[`cp2${r}`]=m+o*t[h])}}function ZS(e,t="x"){const n=Pg(t),r=e.length,i=Array(r).fill(0),o=Array(r);let l,c,f,h=Er(e,0);for(l=0;l<r;++l)if(c=f,f=h,h=Er(e,l+1),!!f){if(h){const d=h[t]-f[t];i[l]=d!==0?(h[n]-f[n])/d:0}o[l]=c?h?nn(i[l-1])!==nn(i[l])?0:(i[l-1]+i[l])/2:i[l-1]:i[l]}XS(e,i,o),qS(e,o,t)}function Fo(e,t,n){return Math.max(Math.min(e,n),t)}function JS(e,t){let n,r,i,o,l,c=Mr(e[0],t);for(n=0,r=e.length;n<r;++n)l=o,o=c,c=n<r-1&&Mr(e[n+1],t),o&&(i=e[n],l&&(i.cp1x=Fo(i.cp1x,t.left,t.right),i.cp1y=Fo(i.cp1y,t.top,t.bottom)),c&&(i.cp2x=Fo(i.cp2x,t.left,t.right),i.cp2y=Fo(i.cp2y,t.top,t.bottom)))}function QS(e,t,n,r,i){let o,l,c,f;if(t.spanGaps&&(e=e.filter(h=>!h.skip)),t.cubicInterpolationMode==="monotone")ZS(e,i);else{let h=r?e[e.length-1]:e[0];for(o=0,l=e.length;o<l;++o)c=e[o],f=YS(h,c,e[Math.min(o+1,l-(r?0:1))%l],t.tension),c.cp1x=f.previous.x,c.cp1y=f.previous.y,c.cp2x=f.next.x,c.cp2y=f.next.y,h=c}t.capBezierPoints&&JS(e,n)}function Vc(){return typeof window<"u"&&typeof document<"u"}function Gc(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ca(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const ba=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function tx(e,t){return ba(e).getPropertyValue(t)}const ex=["top","right","bottom","left"];function Ui(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=ex[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const nx=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function ix(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let l=!1,c,f;if(nx(i,o,e.target))c=i,f=o;else{const h=t.getBoundingClientRect();c=r.clientX-h.left,f=r.clientY-h.top,l=!0}return{x:c,y:f,box:l}}function vn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=ba(n),o=i.boxSizing==="border-box",l=Ui(i,"padding"),c=Ui(i,"border","width"),{x:f,y:h,box:d}=ix(e,n),m=l.left+(d&&c.left),p=l.top+(d&&c.top);let{width:S,height:P}=t;return o&&(S-=l.width+c.width,P-=l.height+c.height),{x:Math.round((f-m)/S*n.width/r),y:Math.round((h-p)/P*n.height/r)}}function rx(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&Gc(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const l=o.getBoundingClientRect(),c=ba(o),f=Ui(c,"border","width"),h=Ui(c,"padding");t=l.width-h.width-f.width,n=l.height-h.height-f.height,r=ca(c.maxWidth,o,"clientWidth"),i=ca(c.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||aa,maxHeight:i||aa}}const Bo=e=>Math.round(e*10)/10;function sx(e,t,n,r){const i=ba(e),o=Ui(i,"margin"),l=ca(i.maxWidth,e,"clientWidth")||aa,c=ca(i.maxHeight,e,"clientHeight")||aa,f=rx(e,t,n);let{width:h,height:d}=f;if(i.boxSizing==="content-box"){const p=Ui(i,"border","width"),S=Ui(i,"padding");h-=S.width+p.width,d-=S.height+p.height}return h=Math.max(0,h-o.width),d=Math.max(0,r?h/r:d-o.height),h=Bo(Math.min(h,l,f.maxWidth)),d=Bo(Math.min(d,c,f.maxHeight)),h&&!d&&(d=Bo(h/2)),(t!==void 0||n!==void 0)&&r&&f.height&&d>f.height&&(d=f.height,h=Bo(Math.floor(d*r))),{width:h,height:d}}function Eh(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const l=e.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${e.height}px`,l.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||l.height!==i||l.width!==o?(e.currentDevicePixelRatio=r,l.height=i,l.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const ox=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Vc()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Nh(e,t){const n=tx(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Li(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function ax(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function lx(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},l=Li(e,i,n),c=Li(i,o,n),f=Li(o,t,n),h=Li(l,c,n),d=Li(c,f,n);return Li(h,d,n)}const cx=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},ux=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Sr(e,t,n){return e?cx(t,n):ux()}function Eg(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function Ng(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Cg(e){return e==="angle"?{between:ks,compare:hS,normalize:yn}:{between:Hn,compare:(t,n)=>t-n,normalize:t=>t}}function Ch({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function fx(e,t,n){const{property:r,start:i,end:o}=n,{between:l,normalize:c}=Cg(r),f=t.length;let{start:h,end:d,loop:m}=e,p,S;if(m){for(h+=f,d+=f,p=0,S=f;p<S&&l(c(t[h%f][r]),i,o);++p)h--,d--;h%=f,d%=f}return d<h&&(d+=f),{start:h,end:d,loop:m,style:e.style}}function kg(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,l=t.length,{compare:c,between:f,normalize:h}=Cg(r),{start:d,end:m,loop:p,style:S}=fx(e,t,n),P=[];let E=!1,I=null,y,v,C;const w=()=>f(i,C,y)&&c(i,C)!==0,O=()=>c(o,y)===0||f(o,C,y),B=()=>E||w(),F=()=>!E||O();for(let H=d,Z=d;H<=m;++H)v=t[H%l],!v.skip&&(y=h(v[r]),y!==C&&(E=f(y,i,o),I===null&&B()&&(I=c(y,i)===0?H:Z),I!==null&&F()&&(P.push(Ch({start:I,end:H,loop:p,count:l,style:S})),I=null),Z=H,C=y));return I!==null&&P.push(Ch({start:I,end:m,loop:p,count:l,style:S})),P}function Og(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=kg(r[i],e.points,t);o.length&&n.push(...o)}return n}function hx(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function dx(e,t,n,r){const i=e.length,o=[];let l=t,c=e[t],f;for(f=t+1;f<=n;++f){const h=e[f%i];h.skip||h.stop?c.skip||(r=!1,o.push({start:t%i,end:(f-1)%i,loop:r}),t=l=h.stop?f:null):(l=f,c.skip&&(t=f)),c=h}return l!==null&&o.push({start:t%i,end:l%i,loop:r}),o}function gx(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:l,end:c}=hx(n,i,o,r);if(r===!0)return kh(e,[{start:l,end:c,loop:o}],n,t);const f=c<l?c+i:c,h=!!e._fullLoop&&l===0&&c===i-1;return kh(e,dx(n,l,f,h),n,t)}function kh(e,t,n,r){return!r||!r.setContext||!n?t:mx(e,t,n,r)}function mx(e,t,n,r){const i=e._chart.getContext(),o=Oh(e.options),{_datasetIndex:l,options:{spanGaps:c}}=e,f=n.length,h=[];let d=o,m=t[0].start,p=m;function S(P,E,I,y){const v=c?-1:1;if(P!==E){for(P+=f;n[P%f].skip;)P-=v;for(;n[E%f].skip;)E+=v;P%f!==E%f&&(h.push({start:P%f,end:E%f,loop:I,style:y}),d=y,m=E%f)}}for(const P of t){m=c?m:P.start;let E=n[m%f],I;for(p=m+1;p<=P.end;p++){const y=n[p%f];I=Oh(r.setContext(Gi(i,{type:"segment",p0:E,p1:y,p0DataIndex:(p-1)%f,p1DataIndex:p%f,datasetIndex:l}))),px(I,d)&&S(m,p-1,P.loop,d),E=y,d=I}m<p-1&&S(m,p-1,P.loop,d)}return h}function Oh(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function px(e,t){if(!t)return!1;const n=[],r=function(i,o){return Fc(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}/*!
12
- * Chart.js v4.4.7
13
- * https://www.chartjs.org
14
- * (c) 2024 Chart.js Contributors
15
- * Released under the MIT License
16
- */class bx{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],l=n.duration;o.forEach(c=>c({chart:t,initial:n.initial,numSteps:l,currentStep:Math.min(r-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=mg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let l=o.length-1,c=!1,f;for(;l>=0;--l)f=o[l],f._active?(f._total>r.duration&&(r.duration=f._total),f.tick(t),c=!0):(o[l]=o[o.length-1],o.pop());c&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Bn=new bx;const Ah="transparent",_x={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Sh(e||Ah),i=r.valid&&Sh(t||Ah);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class yx{constructor(t,n,r,i){const o=n[r];i=jt([t.to,i,o,t.from]);const l=jt([t.from,o,i]);this._active=!0,this._fn=t.fn||_x[t.type||typeof l],this._easing=xs[t.easing]||xs.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=l,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,l=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(l,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=jt([t.to,n,i,t.from]),this._from=jt([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,l=this._loop,c=this._to;let f;if(this._active=o!==c&&(l||n<r),!this._active){this._target[i]=c,this._notify(!0);return}if(n<0){this._target[i]=o;return}f=n/r%2,f=l&&f>1?2-f:f,f=this._easing(Math.min(1,Math.max(0,f))),this._target[i]=this._fn(o,c,f)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Ag{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Pt(t))return;const n=Object.keys(zt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Pt(o))return;const l={};for(const c of n)l[c]=o[c];(te(o.properties)&&o.properties||[i]).forEach(c=>{(c===i||!r.has(c))&&r.set(c,l)})})}_animateOptions(t,n){const r=n.options,i=Sx(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&vx(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),l=Object.keys(n),c=Date.now();let f;for(f=l.length-1;f>=0;--f){const h=l[f];if(h.charAt(0)==="$")continue;if(h==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[h];let m=o[h];const p=r.get(h);if(m)if(p&&m.active()){m.update(p,d,c);continue}else m.cancel();if(!p||!p.duration){t[h]=d;continue}o[h]=m=new yx(p,t,h,d),i.push(m)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Bn.add(this._chart,r),!0}}function vx(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Sx(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Ih(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function xx(e,t,n){if(n===!1)return!1;const r=Ih(e,n),i=Ih(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Tx(e){let t,n,r,i;return Pt(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function Ig(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function Dh(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let l,c,f,h;if(t===null)return;let d=!1;for(l=0,c=i.length;l<c;++l){if(f=+i[l],f===n){if(d=!0,r.all)continue;break}h=e.values[f],ie(h)&&(o||t===0||nn(t)===nn(h))&&(t+=h)}return!d&&!r.all?0:t}function wx(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",l=Object.keys(e),c=new Array(l.length);let f,h,d;for(f=0,h=l.length;f<h;++f)d=l[f],c[f]={[i]:d,[o]:e[d]};return c}function $l(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Mx(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Px(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Ex(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Rh(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function Lh(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:l,index:c}=r,f=o.axis,h=l.axis,d=Mx(o,l,r),m=t.length;let p;for(let S=0;S<m;++S){const P=t[S],{[f]:E,[h]:I}=P,y=P._stacks||(P._stacks={});p=y[h]=Ex(i,d,E),p[c]=I,p._top=Rh(p,l,!0,r.type),p._bottom=Rh(p,l,!1,r.type);const v=p._visualValues||(p._visualValues={});v[c]=I}}function Yl(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function Nx(e,t){return Gi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Cx(e,t,n){return Gi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function cs(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const Xl=e=>e==="reset"||e==="none",Fh=(e,t)=>t?e:Object.assign({},e),kx=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Ig(n,!0),values:null};class fi{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=$l(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&cs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(m,p,S,P)=>m==="x"?p:m==="r"?P:S,o=n.xAxisID=pt(r.xAxisID,Yl(t,"x")),l=n.yAxisID=pt(r.yAxisID,Yl(t,"y")),c=n.rAxisID=pt(r.rAxisID,Yl(t,"r")),f=n.indexAxis,h=n.iAxisID=i(f,o,l,c),d=n.vAxisID=i(f,l,o,c);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_h(this._data,this),t._stacked&&cs(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Pt(n)){const i=this._cachedMeta;this._data=wx(n,i)}else if(r!==n){if(r){_h(r,this);const i=this._cachedMeta;cs(i),i._parsed=[]}n&&Object.isExtensible(n)&&pS(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=$l(n.vScale,n),n.stack!==r.stack&&(i=!0,cs(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(Lh(this,n._parsed),n._stacked=$l(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:l}=r,c=o.axis;let f=t===0&&n===i.length?!0:r._sorted,h=t>0&&r._parsed[t-1],d,m,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{te(i[t])?p=this.parseArrayData(r,i,t,n):Pt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const S=()=>m[c]===null||h&&m[c]<h[c];for(d=0;d<n;++d)r._parsed[d+t]=m=p[d],f&&(S()&&(f=!1),h=m);r._sorted=f}l&&Lh(this,p)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:l}=t,c=o.axis,f=l.axis,h=o.getLabels(),d=o===l,m=new Array(i);let p,S,P;for(p=0,S=i;p<S;++p)P=p+r,m[p]={[c]:d||o.parse(h[P],P),[f]:l.parse(n[P],P)};return m}parseArrayData(t,n,r,i){const{xScale:o,yScale:l}=t,c=new Array(i);let f,h,d,m;for(f=0,h=i;f<h;++f)d=f+r,m=n[d],c[f]={x:o.parse(m[0],d),y:l.parse(m[1],d)};return c}parseObjectData(t,n,r,i){const{xScale:o,yScale:l}=t,{xAxisKey:c="x",yAxisKey:f="y"}=this._parsing,h=new Array(i);let d,m,p,S;for(d=0,m=i;d<m;++d)p=d+r,S=n[p],h[d]={x:o.parse(Hi(S,c),p),y:l.parse(Hi(S,f),p)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,l=n[t.axis],c={keys:Ig(i,!0),values:n._stacks[t.axis]._visualValues};return Dh(c,l,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let l=o===null?NaN:o;const c=i&&r._stacks[n.axis];i&&c&&(i.values=c,l=Dh(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,l),t.max=Math.max(t.max,l)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,l=i.length,c=this._getOtherScale(t),f=kx(n,r,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:m}=Px(c);let p,S;function P(){S=i[p];const E=S[c.axis];return!ie(S[t.axis])||d>E||m<E}for(p=0;p<l&&!(!P()&&(this.updateRangeFromParsed(h,t,S,f),o));++p);if(o){for(p=l-1;p>=0;--p)if(!P()){this.updateRangeFromParsed(h,t,S,f);break}}return h}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,l;for(i=0,o=n.length;i<o;++i)l=n[i][t.axis],ie(l)&&r.push(l);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Tx(pt(this.options.clip,xx(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,l=[],c=this._drawStart||0,f=this._drawCount||i.length-c,h=this.options.drawActiveElementsOnTop;let d;for(r.dataset&&r.dataset.draw(t,o,c,f),d=c;d<c+f;++d){const m=i[d];m.hidden||(m.active&&h?l.push(m):m.draw(t,o))}for(d=0;d<l.length;++d)l[d].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const l=this._cachedMeta.data[t];o=l.$context||(l.$context=Cx(this.getContext(),t,l)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Nx(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,l=t+"-"+n,c=o[l],f=this.enableOptionSharing&&Cs(r);if(c)return Fh(c,f);const h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),m=i?[`${t}Hover`,"hover",t,""]:[t,""],p=h.getOptionScopes(this.getDataset(),d),S=Object.keys(zt.elements[t]),P=()=>this.getContext(r,i,n),E=h.resolveNamedOptions(p,S,P,m);return E.$shared&&(E.$shared=f,o[l]=Object.freeze(Fh(E,f))),E}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,l=`animation-${n}`,c=o[l];if(c)return c;let f;if(i.options.animation!==!1){const d=this.chart.config,m=d.datasetAnimationScopeKeys(this._type,n),p=d.getOptionScopes(this.getDataset(),m);f=d.createResolver(p,this.getContext(t,r,n))}const h=new Ag(i,f&&f.animations);return f&&f._cacheable&&(o[l]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Xl(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),l=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:l}}updateElement(t,n,r,i){Xl(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Xl(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[c,f,h]of this._syncList)this[c](f,h);this._syncList=[];const i=r.length,o=n.length,l=Math.min(o,i);l&&this.parse(0,l),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,l=t+n;let c;const f=h=>{for(h.length+=n,c=h.length-1;c>=l;c--)h[c]=h[c-n]};for(f(o),c=t;c<l;++c)o[c]=new this.dataElementType;this._parsing&&f(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&cs(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}nt(fi,"defaults",{}),nt(fi,"datasetElementType",null),nt(fi,"dataElementType",null);function Ox(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=gg(r.sort((i,o)=>i-o))}return e._cache.$bar}function Ax(e){const t=e.iScale,n=Ox(t,e.type);let r=t._length,i,o,l,c;const f=()=>{l===32767||l===-32768||(Cs(c)&&(r=Math.min(r,Math.abs(l-c)||r)),c=l)};for(i=0,o=n.length;i<o;++i)l=t.getPixelForValue(n[i]),f();for(c=void 0,i=0,o=t.ticks.length;i<o;++i)l=t.getPixelForTick(i),f();return r}function Ix(e,t,n,r){const i=n.barThickness;let o,l;return At(i)?(o=t.min*n.categoryPercentage,l=n.barPercentage):(o=i*r,l=1),{chunk:o/r,ratio:l,start:t.pixels[e]-o/2}}function Dx(e,t,n,r){const i=t.pixels,o=i[e];let l=e>0?i[e-1]:null,c=e<i.length-1?i[e+1]:null;const f=n.categoryPercentage;l===null&&(l=o-(c===null?t.end-t.start:c-o)),c===null&&(c=o+o-l);const h=o-(o-Math.min(l,c))/2*f;return{chunk:Math.abs(c-l)/2*f/r,ratio:n.barPercentage,start:h}}function Rx(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),l=Math.min(i,o),c=Math.max(i,o);let f=l,h=c;Math.abs(l)>Math.abs(c)&&(f=c,h=l),t[n.axis]=h,t._custom={barStart:f,barEnd:h,start:i,end:o,min:l,max:c}}function Dg(e,t,n,r){return te(e)?Rx(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Bh(e,t,n,r){const i=e.iScale,o=e.vScale,l=i.getLabels(),c=i===o,f=[];let h,d,m,p;for(h=n,d=n+r;h<d;++h)p=t[h],m={},m[i.axis]=c||i.parse(l[h],h),f.push(Dg(p,m,o,h));return f}function ql(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Lx(e,t,n){return e!==0?nn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Fx(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function Bx(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:c,reverse:f,top:h,bottom:d}=Fx(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=h:(n._bottom||0)===r?i=d:(o[Wh(d,l,c,f)]=!0,i=h)),o[Wh(i,l,c,f)]=!0,e.borderSkipped=o}function Wh(e,t,n,r){return r?(e=Wx(e,t,n),e=zh(e,n,t)):e=zh(e,t,n),e}function Wx(e,t,n){return e===t?n:e===n?t:e}function zh(e,t,n){return e==="start"?t:e==="end"?n:e}function zx(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Jo extends fi{parsePrimitiveData(t,n,r,i){return Bh(t,n,r,i)}parseArrayData(t,n,r,i){return Bh(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:l}=t,{xAxisKey:c="x",yAxisKey:f="y"}=this._parsing,h=o.axis==="x"?c:f,d=l.axis==="x"?c:f,m=[];let p,S,P,E;for(p=r,S=r+i;p<S;++p)E=n[p],P={},P[o.axis]=o.parse(Hi(E,h),p),m.push(Dg(Hi(E,d),P,l,p));return m}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),l=o._custom,c=ql(l)?"["+l.start+", "+l.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:l,_cachedMeta:{vScale:c}}=this,f=c.getBasePixel(),h=c.isHorizontal(),d=this._getRuler(),{sharedOptions:m,includeOptions:p}=this._getSharedOptions(n,i);for(let S=n;S<n+r;S++){const P=this.getParsed(S),E=o||At(P[c.axis])?{base:f,head:f}:this._calculateBarValuePixels(S),I=this._calculateBarIndexPixels(S,d),y=(P._stacks||{})[c.axis],v={horizontal:h,base:E.base,enableBorderRadius:!y||ql(P._custom)||l===y._top||l===y._bottom,x:h?E.head:I.center,y:h?I.center:E.head,height:h?I.size:Math.abs(E.size),width:h?Math.abs(E.size):I.size};p&&(v.options=m||this.resolveDataElementOptions(S,t[S].active?"active":i));const C=v.options||t[S].options;Bx(v,C,y,l),zx(v,C,d.ratio),this.updateElement(t[S],S,v,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),o=r.options.stacked,l=[],c=this._cachedMeta.controller.getParsed(n),f=c&&c[r.axis],h=d=>{const m=d._parsed.find(S=>S[r.axis]===f),p=m&&m[d.vScale.axis];if(At(p)||isNaN(p))return!0};for(const d of i)if(!(n!==void 0&&h(d))&&((o===!1||l.indexOf(d.stack)===-1||o===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,l;for(o=0,l=n.data.length;o<l;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const c=t.barThickness;return{min:c||Ax(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:l}}=this,c=o||0,f=this.getParsed(t),h=f._custom,d=ql(h);let m=f[n.axis],p=0,S=r?this.applyStack(n,f,r):m,P,E;S!==m&&(p=S-m,S=m),d&&(m=h.barStart,S=h.barEnd-h.barStart,m!==0&&nn(m)!==nn(h.barEnd)&&(p=0),p+=m);const I=!At(o)&&!d?o:p;let y=n.getPixelForValue(I);if(this.chart.getDataVisibility(t)?P=n.getPixelForValue(p+S):P=y,E=P-y,Math.abs(E)<l){E=Lx(E,n,c)*l,m===c&&(y-=E/2);const v=n.getPixelForDecimal(0),C=n.getPixelForDecimal(1),w=Math.min(v,C),O=Math.max(v,C);y=Math.max(Math.min(y,O),w),P=y+E,r&&!d&&(f._stacks[n.axis]._visualValues[i]=n.getValueForPixel(P)-n.getValueForPixel(y))}if(y===n.getPixelForValue(c)){const v=nn(E)*n.getLineWidthForValue(c)/2;y+=v,E-=v}return{size:E,base:y,head:P,center:P+E/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,l=pt(i.maxBarThickness,1/0);let c,f;if(n.grouped){const h=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?Dx(t,n,i,h):Ix(t,n,i,h),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);c=d.start+d.chunk*m+d.chunk/2,f=Math.min(l,d.chunk*d.ratio)}else c=r.getPixelForValue(this.getParsed(t)[r.axis],t),f=Math.min(l,n.min*n.ratio);return{base:c-f/2,head:c+f/2,center:c,size:f}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}nt(Jo,"id","bar"),nt(Jo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),nt(Jo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function Ux(e,t,n){let r=1,i=1,o=0,l=0;if(t<$t){const c=e,f=c+t,h=Math.cos(c),d=Math.sin(c),m=Math.cos(f),p=Math.sin(f),S=(C,w,O)=>ks(C,c,f,!0)?1:Math.max(w,w*n,O,O*n),P=(C,w,O)=>ks(C,c,f,!0)?-1:Math.min(w,w*n,O,O*n),E=S(0,h,m),I=S(oe,d,p),y=P(qt,h,m),v=P(qt+oe,d,p);r=(E-y)/2,i=(I-v)/2,o=-(E+y)/2,l=-(I+v)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:l}}class bs extends fi{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=f=>+r[f];if(Pt(r[t])){const{key:f="value"}=this._parsing;o=h=>+Hi(r[h],f)}let l,c;for(l=t,c=t+n;l<c;++l)i._parsed[l]=o(l)}}_getRotation(){return Un(this.options.rotation-90)}_getCircumference(){return Un(this.options.circumference)}_getRotationExtents(){let t=$t,n=-$t;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),l=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+l)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,l=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-l)/2,0),f=Math.min(eS(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:d,rotation:m}=this._getRotationExtents(),{ratioX:p,ratioY:S,offsetX:P,offsetY:E}=Ux(m,d,f),I=(r.width-l)/p,y=(r.height-l)/S,v=Math.max(Math.min(I,y)/2,0),C=cg(this.options.radius,v),w=Math.max(C*f,0),O=(C-w)/this._getVisibleDatasetWeightTotal();this.offsetX=P*C,this.offsetY=E*C,i.total=this.calculateTotal(),this.outerRadius=C-O*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-O*h,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/$t)}updateElements(t,n,r,i){const o=i==="reset",l=this.chart,c=l.chartArea,h=l.options.animation,d=(c.left+c.right)/2,m=(c.top+c.bottom)/2,p=o&&h.animateScale,S=p?0:this.innerRadius,P=p?0:this.outerRadius,{sharedOptions:E,includeOptions:I}=this._getSharedOptions(n,i);let y=this._getRotation(),v;for(v=0;v<n;++v)y+=this._circumference(v,o);for(v=n;v<n+r;++v){const C=this._circumference(v,o),w=t[v],O={x:d+this.offsetX,y:m+this.offsetY,startAngle:y,endAngle:y+C,circumference:C,outerRadius:P,innerRadius:S};I&&(O.options=E||this.resolveDataElementOptions(v,w.active?"active":i)),y+=C,this.updateElement(w,v,O,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?$t*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=ga(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,l,c,f;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){l=r.getDatasetMeta(i),t=l.data,c=l.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)f=c.resolveDataElementOptions(i),f.borderAlign!=="inner"&&(n=Math.max(n,f.borderWidth||0,f.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(pt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}nt(bs,"id","doughnut"),nt(bs,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),nt(bs,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),nt(bs,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,l)=>{const f=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:f.backgroundColor,strokeStyle:f.borderColor,fontColor:i,lineWidth:f.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Qo extends fi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,l=this.chart._animationsDisabled;let{start:c,count:f}=bg(n,i,l);this._drawStart=c,this._drawCount=f,_g(n)&&(c=0,f=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!l,options:h},t),this.updateElements(i,c,f,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:l,vScale:c,_stacked:f,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:m}=this._getSharedOptions(n,i),p=l.axis,S=c.axis,{spanGaps:P,segment:E}=this.options,I=wr(P)?P:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||i==="none",v=n+r,C=t.length;let w=n>0&&this.getParsed(n-1);for(let O=0;O<C;++O){const B=t[O],F=y?B:{};if(O<n||O>=v){F.skip=!0;continue}const H=this.getParsed(O),Z=At(H[S]),it=F[p]=l.getPixelForValue(H[p],O),$=F[S]=o||Z?c.getBasePixel():c.getPixelForValue(f?this.applyStack(c,H,f):H[S],O);F.skip=isNaN(it)||isNaN($)||Z,F.stop=O>0&&Math.abs(H[p]-w[p])>I,E&&(F.parsed=H,F.raw=h.data[O]),m&&(F.options=d||this.resolveDataElementOptions(O,B.active?"active":i)),y||this.updateElement(B,O,F,i),w=H}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}nt(Qo,"id","line"),nt(Qo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),nt(Qo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class bc extends bs{}nt(bc,"id","pie"),nt(bc,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ta extends fi{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,l=this.getParsed(t),c=i.getLabelForValue(l.x),f=o.getLabelForValue(l.y);return{label:r[t]||"",value:"("+c+", "+f+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:o,count:l}=bg(n,r,i);if(this._drawStart=o,this._drawCount=l,_g(n)&&(o=0,l=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:f}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!f._decimated,c.points=r;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!i,options:h},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,o,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,i){const o=i==="reset",{iScale:l,vScale:c,_stacked:f,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(n,i),m=this.getSharedOptions(d),p=this.includeOptions(i,m),S=l.axis,P=c.axis,{spanGaps:E,segment:I}=this.options,y=wr(E)?E:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||i==="none";let C=n>0&&this.getParsed(n-1);for(let w=n;w<n+r;++w){const O=t[w],B=this.getParsed(w),F=v?O:{},H=At(B[P]),Z=F[S]=l.getPixelForValue(B[S],w),it=F[P]=o||H?c.getBasePixel():c.getPixelForValue(f?this.applyStack(c,B,f):B[P],w);F.skip=isNaN(Z)||isNaN(it)||H,F.stop=w>0&&Math.abs(B[S]-C[S])>y,I&&(F.parsed=B,F.raw=h.data[w]),p&&(F.options=m||this.resolveDataElementOptions(w,O.active?"active":i)),v||this.updateElement(O,w,F,i),C=B}this.updateSharedOptions(m,i,d)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let c=0;for(let f=n.length-1;f>=0;--f)c=Math.max(c,n[f].size(this.resolveDataElementOptions(f))/2);return c>0&&c}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,l)/2}}nt(ta,"id","scatter"),nt(ta,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),nt(ta,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function Di(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class jc{constructor(t){nt(this,"options");this.options=t||{}}static override(t){Object.assign(jc.prototype,t)}init(){}formats(){return Di()}parse(){return Di()}format(){return Di()}add(){return Di()}diff(){return Di()}startOf(){return Di()}endOf(){return Di()}}var Hx={_date:jc};function Vx(e,t,n,r){const{controller:i,data:o,_sorted:l}=e,c=i._cachedMeta.iScale;if(c&&t===c.axis&&t!=="r"&&l&&o.length){const f=c._reversePixels?gS:Bi;if(r){if(i._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const m=f(o,t,n-d),p=f(o,t,n+d);return{lo:m.lo,hi:p.hi}}}}else return f(o,t,n)}return{lo:0,hi:o.length-1}}function _a(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),l=n[t];for(let c=0,f=o.length;c<f;++c){const{index:h,data:d}=o[c],{lo:m,hi:p}=Vx(o[c],t,l,i);for(let S=m;S<=p;++S){const P=d[S];P.skip||r(P,h,S)}}}function Gx(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,l=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(l,2))}}function Zl(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||_a(e,n,t,function(c,f,h){!i&&!Mr(c,e.chartArea,0)||c.inRange(t.x,t.y,r)&&o.push({element:c,datasetIndex:f,index:h})},!0),o}function jx(e,t,n,r){let i=[];function o(l,c,f){const{startAngle:h,endAngle:d}=l.getProps(["startAngle","endAngle"],r),{angle:m}=hg(l,{x:t.x,y:t.y});ks(m,h,d)&&i.push({element:l,datasetIndex:c,index:f})}return _a(e,n,t,o),i}function Kx(e,t,n,r,i,o){let l=[];const c=Gx(n);let f=Number.POSITIVE_INFINITY;function h(d,m,p){const S=d.inRange(t.x,t.y,i);if(r&&!S)return;const P=d.getCenterPoint(i);if(!(!!o||e.isPointInArea(P))&&!S)return;const I=c(t,P);I<f?(l=[{element:d,datasetIndex:m,index:p}],f=I):I===f&&l.push({element:d,datasetIndex:m,index:p})}return _a(e,n,t,h),l}function Jl(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?jx(e,t,n,i):Kx(e,t,n,r,i,o)}function Uh(e,t,n,r,i){const o=[],l=n==="x"?"inXRange":"inYRange";let c=!1;return _a(e,n,t,(f,h,d)=>{f[l]&&f[l](t[n],i)&&(o.push({element:f,datasetIndex:h,index:d}),c=c||f.inRange(t.x,t.y,i))}),r&&!c?[]:o}var $x={modes:{index(e,t,n,r){const i=vn(t,e),o=n.axis||"x",l=n.includeInvisible||!1,c=n.intersect?Zl(e,i,o,r,l):Jl(e,i,o,!1,r,l),f=[];return c.length?(e.getSortedVisibleDatasetMetas().forEach(h=>{const d=c[0].index,m=h.data[d];m&&!m.skip&&f.push({element:m,datasetIndex:h.index,index:d})}),f):[]},dataset(e,t,n,r){const i=vn(t,e),o=n.axis||"xy",l=n.includeInvisible||!1;let c=n.intersect?Zl(e,i,o,r,l):Jl(e,i,o,!1,r,l);if(c.length>0){const f=c[0].datasetIndex,h=e.getDatasetMeta(f).data;c=[];for(let d=0;d<h.length;++d)c.push({element:h[d],datasetIndex:f,index:d})}return c},point(e,t,n,r){const i=vn(t,e),o=n.axis||"xy",l=n.includeInvisible||!1;return Zl(e,i,o,r,l)},nearest(e,t,n,r){const i=vn(t,e),o=n.axis||"xy",l=n.includeInvisible||!1;return Jl(e,i,o,n.intersect,r,l)},x(e,t,n,r){const i=vn(t,e);return Uh(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=vn(t,e);return Uh(e,i,"y",n.intersect,r)}}};const Rg=["left","top","right","bottom"];function us(e,t){return e.filter(n=>n.pos===t)}function Hh(e,t){return e.filter(n=>Rg.indexOf(n.pos)===-1&&n.box.axis===t)}function fs(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Yx(e){const t=[];let n,r,i,o,l,c;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:l,stackWeight:c=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:l&&o+l,stackWeight:c});return t}function Xx(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!Rg.includes(i))continue;const l=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=o}return t}function qx(e,t){const n=Xx(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,l,c;for(o=0,l=e.length;o<l;++o){c=e[o];const{fullSize:f}=c.box,h=n[c.stack],d=h&&c.stackWeight/h.weight;c.horizontal?(c.width=d?d*r:f&&t.availableWidth,c.height=i):(c.width=r,c.height=d?d*i:f&&t.availableHeight)}return n}function Zx(e){const t=Yx(e),n=fs(t.filter(h=>h.box.fullSize),!0),r=fs(us(t,"left"),!0),i=fs(us(t,"right")),o=fs(us(t,"top"),!0),l=fs(us(t,"bottom")),c=Hh(t,"x"),f=Hh(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(f).concat(l).concat(c),chartArea:us(t,"chartArea"),vertical:r.concat(i).concat(f),horizontal:o.concat(l).concat(c)}}function Vh(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Lg(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Jx(e,t,n,r){const{pos:i,box:o}=n,l=e.maxPadding;if(!Pt(i)){n.size&&(e[i]-=n.size);const m=r[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?o.height:o.width),n.size=m.size/m.count,e[i]+=n.size}o.getPadding&&Lg(l,o.getPadding());const c=Math.max(0,t.outerWidth-Vh(l,e,"left","right")),f=Math.max(0,t.outerHeight-Vh(l,e,"top","bottom")),h=c!==e.w,d=f!==e.h;return e.w=c,e.h=f,n.horizontal?{same:h,other:d}:{same:d,other:h}}function Qx(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function tT(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(l=>{o[l]=Math.max(t[l],n[l])}),o}return r(e?["left","right"]:["top","bottom"])}function _s(e,t,n,r){const i=[];let o,l,c,f,h,d;for(o=0,l=e.length,h=0;o<l;++o){c=e[o],f=c.box,f.update(c.width||t.w,c.height||t.h,tT(c.horizontal,t));const{same:m,other:p}=Jx(t,n,c,r);h|=m&&i.length,d=d||p,f.fullSize||i.push(c)}return h&&_s(i,t,n,r)||d}function Wo(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Gh(e,t,n,r){const i=n.padding;let{x:o,y:l}=t;for(const c of e){const f=c.box,h=r[c.stack]||{placed:0,weight:1},d=c.stackWeight/h.weight||1;if(c.horizontal){const m=t.w*d,p=h.size||f.height;Cs(h.start)&&(l=h.start),f.fullSize?Wo(f,i.left,l,n.outerWidth-i.right-i.left,p):Wo(f,t.left+h.placed,l,m,p),h.start=l,h.placed+=m,l=f.bottom}else{const m=t.h*d,p=h.size||f.width;Cs(h.start)&&(o=h.start),f.fullSize?Wo(f,o,i.top,p,n.outerHeight-i.bottom-i.top):Wo(f,o,t.top+h.placed,p,m),h.start=o,h.placed+=m,o=f.right}}t.x=o,t.y=l}var en={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=He(e.options.layout.padding),o=Math.max(t-i.width,0),l=Math.max(n-i.height,0),c=Zx(e.boxes),f=c.vertical,h=c.horizontal;Tt(e.boxes,E=>{typeof E.beforeLayout=="function"&&E.beforeLayout()});const d=f.reduce((E,I)=>I.box.options&&I.box.options.display===!1?E:E+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:l,vBoxMaxWidth:o/2/d,hBoxMaxHeight:l/2}),p=Object.assign({},i);Lg(p,He(r));const S=Object.assign({maxPadding:p,w:o,h:l,x:i.left,y:i.top},i),P=qx(f.concat(h),m);_s(c.fullSize,S,m,P),_s(f,S,m,P),_s(h,S,m,P)&&_s(f,S,m,P),Qx(S),Gh(c.leftAndTop,S,m,P),S.x+=S.w,S.y+=S.h,Gh(c.rightAndBottom,S,m,P),e.chartArea={left:S.left,top:S.top,right:S.left+S.w,bottom:S.top+S.h,height:S.h,width:S.w},Tt(c.chartArea,E=>{const I=E.box;Object.assign(I,e.chartArea),I.update(S.w,S.h,{left:0,top:0,right:0,bottom:0})})}};class Fg{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class eT extends Fg{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ea="$chartjs",nT={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jh=e=>e===null||e==="";function iT(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[ea]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",jh(i)){const o=Nh(e,"width");o!==void 0&&(e.width=o)}if(jh(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Nh(e,"height");o!==void 0&&(e.height=o)}return e}const Bg=ox?{passive:!0}:!1;function rT(e,t,n){e&&e.addEventListener(t,n,Bg)}function sT(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Bg)}function oT(e,t){const n=nT[e.type]||e.type,{x:r,y:i}=vn(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function ua(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function aT(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||ua(c.addedNodes,r),l=l&&!ua(c.removedNodes,r);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function lT(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||ua(c.removedNodes,r),l=l&&!ua(c.addedNodes,r);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const As=new Map;let Kh=0;function Wg(){const e=window.devicePixelRatio;e!==Kh&&(Kh=e,As.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function cT(e,t){As.size||window.addEventListener("resize",Wg),As.set(e,t)}function uT(e){As.delete(e),As.size||window.removeEventListener("resize",Wg)}function fT(e,t,n){const r=e.canvas,i=r&&Gc(r);if(!i)return;const o=pg((c,f)=>{const h=i.clientWidth;n(c,f),h<i.clientWidth&&n()},window),l=new ResizeObserver(c=>{const f=c[0],h=f.contentRect.width,d=f.contentRect.height;h===0&&d===0||o(h,d)});return l.observe(i),cT(e,o),l}function Ql(e,t,n){n&&n.disconnect(),t==="resize"&&uT(e)}function hT(e,t,n){const r=e.canvas,i=pg(o=>{e.ctx!==null&&n(oT(o,e))},e);return rT(r,t,i),i}class dT extends Fg{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(iT(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[ea])return!1;const r=n[ea].initial;["height","width"].forEach(o=>{const l=r[o];At(l)?n.removeAttribute(o):n.setAttribute(o,l)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[ea],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),l={attach:aT,detach:lT,resize:fT}[n]||hT;i[n]=l(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Ql,detach:Ql,resize:Ql}[n]||sT)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return sx(t,n,r,i)}isAttached(t){const n=t&&Gc(t);return!!(n&&n.isConnected)}}function gT(e){return!Vc()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?eT:dT}class fn{constructor(){nt(this,"x");nt(this,"y");nt(this,"active",!1);nt(this,"options");nt(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return wr(this.x)&&wr(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}nt(fn,"defaults",{}),nt(fn,"defaultRoutes");function mT(e,t){const n=e.options.ticks,r=pT(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?_T(t):[],l=o.length,c=o[0],f=o[l-1],h=[];if(l>i)return yT(t,h,o,l/i),h;const d=bT(o,t,i);if(l>0){let m,p;const S=l>1?Math.round((f-c)/(l-1)):null;for(zo(t,h,d,At(S)?0:c-S,c),m=0,p=l-1;m<p;m++)zo(t,h,d,o[m],o[m+1]);return zo(t,h,d,f,At(S)?t.length:f+S),h}return zo(t,h,d),h}function pT(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function bT(e,t,n){const r=vT(e),i=t.length/n;if(!r)return Math.max(i,1);const o=cS(r);for(let l=0,c=o.length-1;l<c;l++){const f=o[l];if(f>i)return f}return Math.max(i,1)}function _T(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function yT(e,t,n,r){let i=0,o=n[0],l;for(r=Math.ceil(r),l=0;l<e.length;l++)l===o&&(t.push(e[l]),i++,o=n[i*r])}function zo(e,t,n,r,i){const o=pt(r,0),l=Math.min(pt(i,e.length),e.length);let c=0,f,h,d;for(n=Math.ceil(n),i&&(f=i-r,n=f/Math.floor(f/n)),d=o;d<0;)c++,d=Math.round(o+c*n);for(h=Math.max(o,0);h<l;h++)h===d&&(t.push(e[h]),c++,d=Math.round(o+c*n))}function vT(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const ST=e=>e==="left"?"right":e==="right"?"left":e,$h=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Yh=(e,t)=>Math.min(t||e,e);function Xh(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function xT(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,l=e._endPixel,c=1e-6;let f=e.getPixelForTick(i),h;if(!(n&&(r===1?h=Math.max(f-o,l-f):t===0?h=(e.getPixelForTick(1)-f)/2:h=(f-e.getPixelForTick(i-1))/2,f+=i<t?h:-h,f<o-c||f>l+c)))return f}function TT(e,t){Tt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function hs(e){return e.drawTicks?e.tickLength:0}function qh(e,t){if(!e.display)return 0;const n=ge(e.font,t),r=He(e.padding);return(te(e.text)?e.text.length:1)*n.lineHeight+r.height}function wT(e,t){return Gi(e,{scale:t,type:"scale"})}function MT(e,t,n){return Gi(e,{tick:n,index:t,type:"tick"})}function PT(e,t,n){let r=Lc(e);return(n&&t!=="right"||!n&&t==="right")&&(r=ST(r)),r}function ET(e,t,n,r){const{top:i,left:o,bottom:l,right:c,chart:f}=e,{chartArea:h,scales:d}=f;let m=0,p,S,P;const E=l-i,I=c-o;if(e.isHorizontal()){if(S=be(r,o,c),Pt(n)){const y=Object.keys(n)[0],v=n[y];P=d[y].getPixelForValue(v)+E-t}else n==="center"?P=(h.bottom+h.top)/2+E-t:P=$h(e,n,t);p=c-o}else{if(Pt(n)){const y=Object.keys(n)[0],v=n[y];S=d[y].getPixelForValue(v)-I+t}else n==="center"?S=(h.left+h.right)/2-I+t:S=$h(e,n,t);P=be(r,l,i),m=n==="left"?-oe:oe}return{titleX:S,titleY:P,maxWidth:p,rotation:m}}class ji extends fn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=Ue(t,Number.POSITIVE_INFINITY),n=Ue(n,Number.NEGATIVE_INFINITY),r=Ue(r,Number.POSITIVE_INFINITY),i=Ue(i,Number.NEGATIVE_INFINITY),{min:Ue(t,r),max:Ue(n,i),minDefined:ie(t),maxDefined:ie(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),l;if(i&&o)return{min:n,max:r};const c=this.getMatchingVisibleMetas();for(let f=0,h=c.length;f<h;++f)l=c[f].controller.getMinMax(this,t),i||(n=Math.min(n,l.min)),o||(r=Math.max(r,l.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:Ue(n,Ue(r,n)),max:Ue(r,Ue(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ut(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:l}=this.options,c=l.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=FS(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const f=c<this.ticks.length;this._convertTicksToLabels(f?Xh(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=mT(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),f&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ut(this.options.afterUpdate,[this])}beforeSetDimensions(){ut(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ut(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ut(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ut(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ut(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ut(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ut(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Yh(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let l=i,c,f,h;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),m=d.widest.width,p=d.highest.height,S=_e(this.chart.width-m,0,this.maxWidth);c=t.offset?this.maxWidth/r:S/(r-1),m+6>c&&(c=S/(r-(t.offset?.5:1)),f=this.maxHeight-hs(t.grid)-n.padding-qh(t.title,this.chart.options.font),h=Math.sqrt(m*m+p*p),l=fS(Math.min(Math.asin(_e((d.highest.height+6)/c,-1,1)),Math.asin(_e(f/h,-1,1))-Math.asin(_e(p/h,-1,1)))),l=Math.max(i,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){ut(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ut(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,l=this._isVisible(),c=this.isHorizontal();if(l){const f=qh(i,n.options.font);if(c?(t.width=this.maxWidth,t.height=hs(o)+f):(t.height=this.maxHeight,t.width=hs(o)+f),r.display&&this.ticks.length){const{first:h,last:d,widest:m,highest:p}=this._getLabelSizes(),S=r.padding*2,P=Un(this.labelRotation),E=Math.cos(P),I=Math.sin(P);if(c){const y=r.mirror?0:I*m.width+E*p.height;t.height=Math.min(this.maxHeight,t.height+y+S)}else{const y=r.mirror?0:E*m.width+I*p.height;t.width=Math.min(this.maxWidth,t.width+y+S)}this._calculatePadding(h,d,I,E)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:l},position:c}=this.options,f=this.labelRotation!==0,h=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,S=0;f?h?(p=i*t.width,S=r*n.height):(p=r*t.height,S=i*n.width):o==="start"?S=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,S=n.width/2),this.paddingLeft=Math.max((p-d+l)*this.width/(this.width-d),0),this.paddingRight=Math.max((S-m+l)*this.width/(this.width-m),0)}else{let d=n.height/2,m=t.height/2;o==="start"?(d=0,m=t.height):o==="end"&&(d=n.height,m=0),this.paddingTop=d+l,this.paddingBottom=m+l}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ut(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)At(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Xh(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,l=[],c=[],f=Math.floor(n/Yh(n,r));let h=0,d=0,m,p,S,P,E,I,y,v,C,w,O;for(m=0;m<n;m+=f){if(P=t[m].label,E=this._resolveTickFontOptions(m),i.font=I=E.string,y=o[I]=o[I]||{data:{},gc:[]},v=E.lineHeight,C=w=0,!At(P)&&!te(P))C=Th(i,y.data,y.gc,C,P),w=v;else if(te(P))for(p=0,S=P.length;p<S;++p)O=P[p],!At(O)&&!te(O)&&(C=Th(i,y.data,y.gc,C,O),w+=v);l.push(C),c.push(w),h=Math.max(C,h),d=Math.max(w,d)}TT(o,n);const B=l.indexOf(h),F=c.indexOf(d),H=Z=>({width:l[Z]||0,height:c[Z]||0});return{first:H(0),last:H(n-1),widest:H(B),highest:H(F),widths:l,heights:c}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return dS(this._alignToPixels?Ii(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=MT(this.getContext(),t,r))}return this.$context||(this.$context=wT(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Un(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),l=t.autoSkipPadding||0,c=o?o.widest.width+l:0,f=o?o.highest.height+l:0;return this.isHorizontal()?f*r>c*i?c/r:f/i:f*i<c*r?f/r:c/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:l,border:c}=i,f=o.offset,h=this.isHorizontal(),m=this.ticks.length+(f?1:0),p=hs(o),S=[],P=c.setContext(this.getContext()),E=P.display?P.width:0,I=E/2,y=function(wt){return Ii(r,wt,E)};let v,C,w,O,B,F,H,Z,it,$,X,bt;if(l==="top")v=y(this.bottom),F=this.bottom-p,Z=v-I,$=y(t.top)+I,bt=t.bottom;else if(l==="bottom")v=y(this.top),$=t.top,bt=y(t.bottom)-I,F=v+I,Z=this.top+p;else if(l==="left")v=y(this.right),B=this.right-p,H=v-I,it=y(t.left)+I,X=t.right;else if(l==="right")v=y(this.left),it=t.left,X=y(t.right)-I,B=v+I,H=this.left+p;else if(n==="x"){if(l==="center")v=y((t.top+t.bottom)/2+.5);else if(Pt(l)){const wt=Object.keys(l)[0],Ct=l[wt];v=y(this.chart.scales[wt].getPixelForValue(Ct))}$=t.top,bt=t.bottom,F=v+I,Z=F+p}else if(n==="y"){if(l==="center")v=y((t.left+t.right)/2);else if(Pt(l)){const wt=Object.keys(l)[0],Ct=l[wt];v=y(this.chart.scales[wt].getPixelForValue(Ct))}B=v-I,H=B-p,it=t.left,X=t.right}const dt=pt(i.ticks.maxTicksLimit,m),ft=Math.max(1,Math.ceil(m/dt));for(C=0;C<m;C+=ft){const wt=this.getContext(C),Ct=o.setContext(wt),Ht=c.setContext(wt),V=Ct.lineWidth,k=Ct.color,W=Ht.dash||[],rt=Ht.dashOffset,Q=Ct.tickWidth,tt=Ct.tickColor,ht=Ct.tickBorderDash||[],Et=Ct.tickBorderDashOffset;w=xT(this,C,f),w!==void 0&&(O=Ii(r,w,V),h?B=H=it=X=O:F=Z=$=bt=O,S.push({tx1:B,ty1:F,tx2:H,ty2:Z,x1:it,y1:$,x2:X,y2:bt,width:V,color:k,borderDash:W,borderDashOffset:rt,tickWidth:Q,tickColor:tt,tickBorderDash:ht,tickBorderDashOffset:Et}))}return this._ticksLength=m,this._borderValue=v,S}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,l=this.isHorizontal(),c=this.ticks,{align:f,crossAlign:h,padding:d,mirror:m}=o,p=hs(r.grid),S=p+d,P=m?-d:S,E=-Un(this.labelRotation),I=[];let y,v,C,w,O,B,F,H,Z,it,$,X,bt="middle";if(i==="top")B=this.bottom-P,F=this._getXAxisLabelAlignment();else if(i==="bottom")B=this.top+P,F=this._getXAxisLabelAlignment();else if(i==="left"){const ft=this._getYAxisLabelAlignment(p);F=ft.textAlign,O=ft.x}else if(i==="right"){const ft=this._getYAxisLabelAlignment(p);F=ft.textAlign,O=ft.x}else if(n==="x"){if(i==="center")B=(t.top+t.bottom)/2+S;else if(Pt(i)){const ft=Object.keys(i)[0],wt=i[ft];B=this.chart.scales[ft].getPixelForValue(wt)+S}F=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")O=(t.left+t.right)/2-S;else if(Pt(i)){const ft=Object.keys(i)[0],wt=i[ft];O=this.chart.scales[ft].getPixelForValue(wt)}F=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(f==="start"?bt="top":f==="end"&&(bt="bottom"));const dt=this._getLabelSizes();for(y=0,v=c.length;y<v;++y){C=c[y],w=C.label;const ft=o.setContext(this.getContext(y));H=this.getPixelForTick(y)+o.labelOffset,Z=this._resolveTickFontOptions(y),it=Z.lineHeight,$=te(w)?w.length:1;const wt=$/2,Ct=ft.color,Ht=ft.textStrokeColor,V=ft.textStrokeWidth;let k=F;l?(O=H,F==="inner"&&(y===v-1?k=this.options.reverse?"left":"right":y===0?k=this.options.reverse?"right":"left":k="center"),i==="top"?h==="near"||E!==0?X=-$*it+it/2:h==="center"?X=-dt.highest.height/2-wt*it+it:X=-dt.highest.height+it/2:h==="near"||E!==0?X=it/2:h==="center"?X=dt.highest.height/2-wt*it:X=dt.highest.height-$*it,m&&(X*=-1),E!==0&&!ft.showLabelBackdrop&&(O+=it/2*Math.sin(E))):(B=H,X=(1-$)*it/2);let W;if(ft.showLabelBackdrop){const rt=He(ft.backdropPadding),Q=dt.heights[y],tt=dt.widths[y];let ht=X-rt.top,Et=0-rt.left;switch(bt){case"middle":ht-=Q/2;break;case"bottom":ht-=Q;break}switch(F){case"center":Et-=tt/2;break;case"right":Et-=tt;break;case"inner":y===v-1?Et-=tt:y>0&&(Et-=tt/2);break}W={left:Et,top:ht,width:tt+rt.width,height:Q+rt.height,color:ft.backdropColor}}I.push({label:w,font:Z,textOffset:X,options:{rotation:E,color:Ct,strokeColor:Ht,strokeWidth:V,textAlign:k,textBaseline:bt,translation:[O,B],backdrop:W}})}return I}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Un(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,l=this._getLabelSizes(),c=t+o,f=l.widest.width;let h,d;return n==="left"?i?(d=this.right+o,r==="near"?h="left":r==="center"?(h="center",d+=f/2):(h="right",d+=f)):(d=this.right-c,r==="near"?h="right":r==="center"?(h="center",d-=f/2):(h="left",d=this.left)):n==="right"?i?(d=this.left+o,r==="near"?h="right":r==="center"?(h="center",d-=f/2):(h="left",d-=f)):(d=this.left+c,r==="near"?h="left":r==="center"?(h="center",d+=f/2):(h="right",d=this.right)):h="right",{textAlign:h,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:l}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,l),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,l;const c=(f,h,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(f.x,f.y),r.lineTo(h.x,h.y),r.stroke(),r.restore())};if(n.display)for(o=0,l=i.length;o<l;++o){const f=i[o];n.drawOnChartArea&&c({x:f.x1,y:f.y1},{x:f.x2,y:f.y2},f),n.drawTicks&&c({x:f.tx1,y:f.ty1},{x:f.tx2,y:f.ty2},{color:f.tickColor,width:f.tickWidth,borderDash:f.tickBorderDash,borderDashOffset:f.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),l=r.display?o.width:0;if(!l)return;const c=i.setContext(this.getContext(0)).lineWidth,f=this._borderValue;let h,d,m,p;this.isHorizontal()?(h=Ii(t,this.left,l)-l/2,d=Ii(t,this.right,c)+c/2,m=p=f):(m=Ii(t,this.top,l)-l/2,p=Ii(t,this.bottom,c)+c/2,h=d=f),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(h,m),n.lineTo(d,p),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&ma(r,i);const o=this.getLabelItems(t);for(const l of o){const c=l.options,f=l.font,h=l.label,d=l.textOffset;Os(r,h,0,d,f,c)}i&&pa(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=ge(r.font),l=He(r.padding),c=r.align;let f=o.lineHeight/2;n==="bottom"||n==="center"||Pt(n)?(f+=l.bottom,te(r.text)&&(f+=o.lineHeight*(r.text.length-1))):f+=l.top;const{titleX:h,titleY:d,maxWidth:m,rotation:p}=ET(this,f,n,c);Os(t,r.text,0,0,o,{color:r.color,maxWidth:m,rotation:p,textAlign:PT(c,n,i),textBaseline:"middle",translation:[h,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=pt(t.grid&&t.grid.z,-1),i=pt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ji.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,l;for(o=0,l=n.length;o<l;++o){const c=n[o];c[r]===this.id&&(!t||c.type===t)&&i.push(c)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ge(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Uo{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;kT(n)&&(r=this.register(n));const i=this.items,o=t.id,l=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,NT(t,l,r),this.override&&zt.override(t.id,t.overrides)),l}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in zt[i]&&(delete zt[i][r],this.override&&delete Vi[r])}}function NT(e,t,n){const r=Tn(Object.create(null),[n?zt.get(n):{},zt.get(t),e.defaults]);zt.set(t,r),e.defaultRoutes&&CT(t,e.defaultRoutes),e.descriptors&&zt.describe(t,e.descriptors)}function CT(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),l=t[n].split("."),c=l.pop(),f=l.join(".");zt.route(o,i,f,c)})}function kT(e){return"id"in e&&"defaults"in e}class OT{constructor(){this.controllers=new Uo(fi,"datasets",!0),this.elements=new Uo(fn,"elements"),this.plugins=new Uo(Object,"plugins"),this.scales=new Uo(ji,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Tt(i,l=>{const c=r||this._getRegistryForType(l);this._exec(t,c,l)})})}_exec(t,n,r){const i=Dc(t);ut(r["before"+i],[],r),n[t](r),ut(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var _n=new OT;class AT{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),l=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),l}_notify(t,n,r,i){i=i||{};for(const o of t){const l=o.plugin,c=l[r],f=[n,i,o.options];if(ut(c,f,l)===!1&&i.cancelable)return!1}return!0}invalidate(){At(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=pt(r.options&&r.options.plugins,{}),o=IT(r);return i===!1&&!n?[]:RT(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,l)=>o.filter(c=>!l.some(f=>c.plugin.id===f.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function IT(e){const t={},n=[],r=Object.keys(_n.plugins.items);for(let o=0;o<r.length;o++)n.push(_n.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const l=i[o];n.indexOf(l)===-1&&(n.push(l),t[l.id]=!0)}return{plugins:n,localIds:t}}function DT(e,t){return!t&&e===!1?null:e===!0?{}:e}function RT(e,{plugins:t,localIds:n},r,i){const o=[],l=e.getContext();for(const c of t){const f=c.id,h=DT(r[f],i);h!==null&&o.push({plugin:c,options:LT(e.config,{plugin:c,local:n[f]},h,l)})}return o}function LT(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),l=e.getOptionScopes(r,o);return n&&t.defaults&&l.push(t.defaults),e.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function _c(e,t){const n=zt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function FT(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function BT(e,t){return e===t?"_index_":"_value_"}function Zh(e){if(e==="x"||e==="y"||e==="r")return e}function WT(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function yc(e,...t){if(Zh(e))return e;for(const n of t){const r=n.axis||WT(n.position)||e.length>1&&Zh(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Jh(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function zT(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Jh(e,"x",n[0])||Jh(e,"y",n[0])}return{}}function UT(e,t){const n=Vi[e.type]||{scales:{}},r=t.scales||{},i=_c(e.type,t),o=Object.create(null);return Object.keys(r).forEach(l=>{const c=r[l];if(!Pt(c))return console.error(`Invalid scale configuration for scale: ${l}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const f=yc(l,c,zT(l,e),zt.scales[c.type]),h=BT(f,i),d=n.scales||{};o[l]=Ss(Object.create(null),[{axis:f},c,d[f],d[h]])}),e.data.datasets.forEach(l=>{const c=l.type||e.type,f=l.indexAxis||_c(c,t),d=(Vi[c]||{}).scales||{};Object.keys(d).forEach(m=>{const p=FT(m,f),S=l[p+"AxisID"]||p;o[S]=o[S]||Object.create(null),Ss(o[S],[{axis:p},r[S],d[m]])})}),Object.keys(o).forEach(l=>{const c=o[l];Ss(c,[zt.scales[c.type],zt.scale])}),o}function zg(e){const t=e.options||(e.options={});t.plugins=pt(t.plugins,{}),t.scales=UT(e,t)}function Ug(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function HT(e){return e=e||{},e.data=Ug(e.data),zg(e),e}const Qh=new Map,Hg=new Set;function Ho(e,t){let n=Qh.get(e);return n||(n=t(),Qh.set(e,n),Hg.add(n)),n}const ds=(e,t,n)=>{const r=Hi(t,n);r!==void 0&&e.add(r)};class VT{constructor(t){this._config=HT(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ug(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),zg(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ho(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ho(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ho(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ho(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,l=this._cachedScopes(t,r),c=l.get(n);if(c)return c;const f=new Set;n.forEach(d=>{t&&(f.add(t),d.forEach(m=>ds(f,t,m))),d.forEach(m=>ds(f,i,m)),d.forEach(m=>ds(f,Vi[o]||{},m)),d.forEach(m=>ds(f,zt,m)),d.forEach(m=>ds(f,mc,m))});const h=Array.from(f);return h.length===0&&h.push(Object.create(null)),Hg.has(n)&&l.set(n,h),h}chartOptionScopes(){const{options:t,type:n}=this;return[t,Vi[n]||{},zt.datasets[n]||{},{type:n},zt,mc]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:l,subPrefixes:c}=td(this._resolverCache,t,i);let f=l;if(jT(l,n)){o.$shared=!1,r=hi(r)?r():r;const h=this.createResolver(t,r,c);f=Pr(l,r,h)}for(const h of n)o[h]=f[h];return o}createResolver(t,n,r=[""],i){const{resolver:o}=td(this._resolverCache,t,r);return Pt(n)?Pr(o,n,void 0,i):o}}function td(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:zc(t,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},r.set(i,o)),o}const GT=e=>Pt(e)&&Object.getOwnPropertyNames(e).some(t=>hi(e[t]));function jT(e,t){const{isScriptable:n,isIndexable:r}=xg(e);for(const i of t){const o=n(i),l=r(i),c=(l||o)&&e[i];if(o&&(hi(c)||GT(c))||l&&te(c))return!0}return!1}var KT="4.4.7";const $T=["top","bottom","left","right","chartArea"];function ed(e,t){return e==="top"||e==="bottom"||$T.indexOf(e)===-1&&t==="x"}function nd(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function id(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ut(n&&n.onComplete,[e],t)}function YT(e){const t=e.chart,n=t.options.animation;ut(n&&n.onProgress,[e],t)}function Vg(e){return Vc()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const na={},rd=e=>{const t=Vg(e);return Object.values(na).filter(n=>n.canvas===t).pop()};function XT(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const l=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=l)}}}function qT(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Vo(e,t,n){return e.options.clip?e[n]:t[n]}function ZT(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Vo(n,t,"left"),right:Vo(n,t,"right"),top:Vo(r,t,"top"),bottom:Vo(r,t,"bottom")}:t}var si;let Kc=(si=class{static register(...t){_n.add(...t),sd()}static unregister(...t){_n.remove(...t),sd()}constructor(t,n){const r=this.config=new VT(n),i=Vg(t),o=rd(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||gT(i)),this.platform.updateConfig(r);const c=this.platform.acquireContext(i,l.aspectRatio),f=c&&c.canvas,h=f&&f.height,d=f&&f.width;if(this.id=tS(),this.ctx=c,this.canvas=f,this.width=d,this.height=h,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new AT,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bS(m=>this.update(m),l.resizeDelay||0),this._dataChanges=[],na[this.id]=this,!c||!f){console.error("Failed to create chart: can't acquire context from the given item");return}Bn.listen(this,"complete",id),Bn.listen(this,"progress",YT),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return At(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return _n}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Eh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return wh(this.canvas,this.ctx),this}stop(){return Bn.stop(this),this}resize(t,n){Bn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(i,t,n,o),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),f=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,Eh(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),ut(r.onResize,[this,l],this),this.attached&&this._doResize(f)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Tt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((l,c)=>(l[c]=!1,l),{});let o=[];n&&(o=o.concat(Object.keys(n).map(l=>{const c=n[l],f=yc(l,c),h=f==="r",d=f==="x";return{options:c,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),Tt(o,l=>{const c=l.options,f=c.id,h=yc(f,c),d=pt(c.type,l.dtype);(c.position===void 0||ed(c.position,h)!==ed(l.dposition))&&(c.position=l.dposition),i[f]=!0;let m=null;if(f in r&&r[f].type===d)m=r[f];else{const p=_n.getScale(d);m=new p({id:f,type:d,ctx:this.ctx,chart:this}),r[m.id]=m}m.init(c,t)}),Tt(i,(l,c)=>{l||delete r[c]}),Tt(r,l=>{en.configure(this,l,l.options),en.addBox(this,l)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(nd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let l=this.getDatasetMeta(r);const c=o.type||this.config.type;if(l.type&&l.type!==c&&(this._destroyDatasetMeta(r),l=this.getDatasetMeta(r)),l.type=c,l.indexAxis=o.indexAxis||_c(c,this.options),l.order=o.order||0,l.index=r,l.label=""+o.label,l.visible=this.isDatasetVisible(r),l.controller)l.controller.updateIndex(r),l.controller.linkScales();else{const f=_n.getController(c),{datasetElementType:h,dataElementType:d}=zt.datasets[c];Object.assign(f,{dataElementType:_n.getElement(d),datasetElementType:h&&_n.getElement(h)}),l.controller=new f(this,r),t.push(l.controller)}}return this._updateMetasets(),t}_resetElements(){Tt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let h=0,d=this.data.datasets.length;h<d;h++){const{controller:m}=this.getDatasetMeta(h),p=!i&&o.indexOf(m)===-1;m.buildOrUpdateElements(p),l=Math.max(+m.getMaxOverflow(),l)}l=this._minPadding=r.layout.autoPadding?l:0,this._updateLayout(l),i||Tt(o,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nd("z","_idx"));const{_active:c,_lastEvent:f}=this;f?this._eventHandler(f,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){Tt(this.scales,t=>{en.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!gh(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const l=r==="_removeElements"?-o:o;XT(t,i,l)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(l=>l[0]===o).map((l,c)=>c+","+l.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!gh(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;en.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Tt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,hi(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Bn.has(this)?this.attached&&!Bn.running(this)&&Bn.start(this):(this.draw(),id({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const l=n[i];(!t||l.visible)&&r.push(l)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=ZT(t,this.chartArea),l={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(i&&ma(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&pa(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(t){return Mr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=$x.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Gi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),l=o.controller._resolveAnimations(void 0,i);Cs(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),l.update(o,{visible:r}),this.update(c=>c.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Bn.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),wh(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete na[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,l)=>{n.addEventListener(this,o,l),t[o]=l},i=(o,l,c)=>{o.offsetX=l,o.offsetY=c,this._eventHandler(o)};Tt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(f,h)=>{n.addEventListener(this,f,h),t[f]=h},i=(f,h)=>{t[f]&&(n.removeEventListener(this,f,h),delete t[f])},o=(f,h)=>{this.canvas&&this.resize(f,h)};let l;const c=()=>{i("attach",c),this.attached=!0,this.resize(),r("resize",o),r("detach",l)};l=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",c)},n.isAttached(this.canvas)?c():l()}unbindEvents(){Tt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Tt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,l,c,f;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),c=0,f=t.length;c<f;++c){l=t[c];const h=l&&this.getDatasetMeta(l.datasetIndex).controller;h&&h[i+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:l})=>{const c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[l],index:l}});!sa(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(f,h)=>f.filter(d=>!h.some(m=>d.datasetIndex===m.datasetIndex&&d.index===m.index)),l=o(n,t),c=r?t:o(t,n);l.length&&this.updateHoverStyle(l,i.mode,!1),c.length&&i.mode&&this.updateHoverStyle(c,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=l=>(l.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,l=n,c=this._getActiveElements(t,i,r,l),f=oS(t),h=qT(t,this._lastEvent,r,f);r&&(this._lastEvent=null,ut(o.onHover,[t,c,this],this),f&&ut(o.onClick,[t,c,this],this));const d=!sa(c,i);return(d||n)&&(this._active=c,this._updateHoverStyles(c,i,n)),this._lastEvent=h,d}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},nt(si,"defaults",zt),nt(si,"instances",na),nt(si,"overrides",Vi),nt(si,"registry",_n),nt(si,"version",KT),nt(si,"getChart",rd),si);function sd(){return Tt(Kc.instances,e=>e._plugins.invalidate())}function JT(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:l,outerRadius:c,innerRadius:f}=t;let h=i/c;e.beginPath(),e.arc(o,l,c,r-h,n+h),f>i?(h=i/f,e.arc(o,l,f,n+h,r-h,!0)):e.arc(o,l,i,n+oe,r-oe),e.closePath(),e.clip()}function QT(e){return Wc(e,["outerStart","outerEnd","innerStart","innerEnd"])}function tw(e,t,n,r){const i=QT(e.options.borderRadius),o=(n-t)/2,l=Math.min(o,r*t/2),c=f=>{const h=(n-Math.min(o,f))*r/2;return _e(f,0,Math.min(o,h))};return{outerStart:c(i.outerStart),outerEnd:c(i.outerEnd),innerStart:_e(i.innerStart,0,l),innerEnd:_e(i.innerEnd,0,l)}}function yr(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function fa(e,t,n,r,i,o){const{x:l,y:c,startAngle:f,pixelMargin:h,innerRadius:d}=t,m=Math.max(t.outerRadius+r+n-h,0),p=d>0?d+r+n+h:0;let S=0;const P=i-f;if(r){const ft=d>0?d-r:0,wt=m>0?m-r:0,Ct=(ft+wt)/2,Ht=Ct!==0?P*Ct/(Ct+r):P;S=(P-Ht)/2}const E=Math.max(.001,P*m-n/qt)/m,I=(P-E)/2,y=f+I+S,v=i-I-S,{outerStart:C,outerEnd:w,innerStart:O,innerEnd:B}=tw(t,p,m,v-y),F=m-C,H=m-w,Z=y+C/F,it=v-w/H,$=p+O,X=p+B,bt=y+O/$,dt=v-B/X;if(e.beginPath(),o){const ft=(Z+it)/2;if(e.arc(l,c,m,Z,ft),e.arc(l,c,m,ft,it),w>0){const V=yr(H,it,l,c);e.arc(V.x,V.y,w,it,v+oe)}const wt=yr(X,v,l,c);if(e.lineTo(wt.x,wt.y),B>0){const V=yr(X,dt,l,c);e.arc(V.x,V.y,B,v+oe,dt+Math.PI)}const Ct=(v-B/p+(y+O/p))/2;if(e.arc(l,c,p,v-B/p,Ct,!0),e.arc(l,c,p,Ct,y+O/p,!0),O>0){const V=yr($,bt,l,c);e.arc(V.x,V.y,O,bt+Math.PI,y-oe)}const Ht=yr(F,y,l,c);if(e.lineTo(Ht.x,Ht.y),C>0){const V=yr(F,Z,l,c);e.arc(V.x,V.y,C,y-oe,Z)}}else{e.moveTo(l,c);const ft=Math.cos(Z)*m+l,wt=Math.sin(Z)*m+c;e.lineTo(ft,wt);const Ct=Math.cos(it)*m+l,Ht=Math.sin(it)*m+c;e.lineTo(Ct,Ht)}e.closePath()}function ew(e,t,n,r,i){const{fullCircles:o,startAngle:l,circumference:c}=t;let f=t.endAngle;if(o){fa(e,t,n,r,f,i);for(let h=0;h<o;++h)e.fill();isNaN(c)||(f=l+(c%$t||$t))}return fa(e,t,n,r,f,i),e.fill(),f}function nw(e,t,n,r,i){const{fullCircles:o,startAngle:l,circumference:c,options:f}=t,{borderWidth:h,borderJoinStyle:d,borderDash:m,borderDashOffset:p}=f,S=f.borderAlign==="inner";if(!h)return;e.setLineDash(m||[]),e.lineDashOffset=p,S?(e.lineWidth=h*2,e.lineJoin=d||"round"):(e.lineWidth=h,e.lineJoin=d||"bevel");let P=t.endAngle;if(o){fa(e,t,n,r,P,i);for(let E=0;E<o;++E)e.stroke();isNaN(c)||(P=l+(c%$t||$t))}S&&JT(e,t,P),o||(fa(e,t,n,r,P,i),e.stroke())}class ys extends fn{constructor(n){super();nt(this,"circumference");nt(this,"endAngle");nt(this,"fullCircles");nt(this,"innerRadius");nt(this,"outerRadius");nt(this,"pixelMargin");nt(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,i){const o=this.getProps(["x","y"],i),{angle:l,distance:c}=hg(o,{x:n,y:r}),{startAngle:f,endAngle:h,innerRadius:d,outerRadius:m,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),S=(this.options.spacing+this.options.borderWidth)/2,P=pt(p,h-f),E=ks(l,f,h)&&f!==h,I=P>=$t||E,y=Hn(c,d+S,m+S);return I&&y}getCenterPoint(n){const{x:r,y:i,startAngle:o,endAngle:l,innerRadius:c,outerRadius:f}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:h,spacing:d}=this.options,m=(o+l)/2,p=(c+f+d+h)/2;return{x:r+Math.cos(m)*p,y:i+Math.sin(m)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,o=(r.offset||0)/4,l=(r.spacing||0)/2,c=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>$t?Math.floor(i/$t):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const f=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(f)*o,Math.sin(f)*o);const h=1-Math.sin(Math.min(qt,i||0)),d=o*h;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,ew(n,this,d,l,c),nw(n,this,d,l,c),n.restore()}}nt(ys,"id","arc"),nt(ys,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),nt(ys,"defaultRoutes",{backgroundColor:"backgroundColor"}),nt(ys,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Gg(e,t,n=t){e.lineCap=pt(n.borderCapStyle,t.borderCapStyle),e.setLineDash(pt(n.borderDash,t.borderDash)),e.lineDashOffset=pt(n.borderDashOffset,t.borderDashOffset),e.lineJoin=pt(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=pt(n.borderWidth,t.borderWidth),e.strokeStyle=pt(n.borderColor,t.borderColor)}function iw(e,t,n){e.lineTo(n.x,n.y)}function rw(e){return e.stepped?NS:e.tension||e.cubicInterpolationMode==="monotone"?CS:iw}function jg(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:l,end:c}=t,f=Math.max(i,l),h=Math.min(o,c),d=i<l&&o<l||i>c&&o>c;return{count:r,start:f,loop:t.loop,ilen:h<f&&!d?r+h-f:h-f}}function sw(e,t,n,r){const{points:i,options:o}=t,{count:l,start:c,loop:f,ilen:h}=jg(i,n,r),d=rw(o);let{move:m=!0,reverse:p}=r||{},S,P,E;for(S=0;S<=h;++S)P=i[(c+(p?h-S:S))%l],!P.skip&&(m?(e.moveTo(P.x,P.y),m=!1):d(e,E,P,p,o.stepped),E=P);return f&&(P=i[(c+(p?h:0))%l],d(e,E,P,p,o.stepped)),!!f}function ow(e,t,n,r){const i=t.points,{count:o,start:l,ilen:c}=jg(i,n,r),{move:f=!0,reverse:h}=r||{};let d=0,m=0,p,S,P,E,I,y;const v=w=>(l+(h?c-w:w))%o,C=()=>{E!==I&&(e.lineTo(d,I),e.lineTo(d,E),e.lineTo(d,y))};for(f&&(S=i[v(0)],e.moveTo(S.x,S.y)),p=0;p<=c;++p){if(S=i[v(p)],S.skip)continue;const w=S.x,O=S.y,B=w|0;B===P?(O<E?E=O:O>I&&(I=O),d=(m*d+w)/++m):(C(),e.lineTo(w,O),P=B,m=0,E=I=O),y=O}C()}function vc(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?ow:sw}function aw(e){return e.stepped?ax:e.tension||e.cubicInterpolationMode==="monotone"?lx:Li}function lw(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Gg(e,t.options),e.stroke(i)}function cw(e,t,n,r){const{segments:i,options:o}=t,l=vc(t);for(const c of i)Gg(e,o,c.style),e.beginPath(),l(e,t,c,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const uw=typeof Path2D=="function";function fw(e,t,n,r){uw&&!t.options.segment?lw(e,t,n,r):cw(e,t,n,r)}class Wi extends fn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;QS(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=gx(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,l=Og(this,{property:n,start:i,end:i});if(!l.length)return;const c=[],f=aw(r);let h,d;for(h=0,d=l.length;h<d;++h){const{start:m,end:p}=l[h],S=o[m],P=o[p];if(S===P){c.push(S);continue}const E=Math.abs((i-S[n])/(P[n]-S[n])),I=f(S,P,E,r.stepped);I[n]=t[n],c.push(I)}return c.length===1?c[0]:c}pathSegment(t,n,r){return vc(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=vc(this);let l=this._loop;n=n||0,r=r||this.points.length-n;for(const c of i)l&=o(t,this,c,{start:n,end:n+r-1});return!!l}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),fw(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}nt(Wi,"id","line"),nt(Wi,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),nt(Wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),nt(Wi,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function od(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class ia extends fn{constructor(n){super();nt(this,"parsed");nt(this,"skip");nt(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const o=this.options,{x:l,y:c}=this.getProps(["x","y"],i);return Math.pow(n-l,2)+Math.pow(r-c,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,r){return od(this,n,"x",r)}inYRange(n,r){return od(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!Mr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,pc(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}nt(ia,"id","point"),nt(ia,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),nt(ia,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Kg(e,t){const{x:n,y:r,base:i,width:o,height:l}=e.getProps(["x","y","base","width","height"],t);let c,f,h,d,m;return e.horizontal?(m=l/2,c=Math.min(n,i),f=Math.max(n,i),h=r-m,d=r+m):(m=o/2,c=n-m,f=n+m,h=Math.min(r,i),d=Math.max(r,i)),{left:c,top:h,right:f,bottom:d}}function li(e,t,n,r){return e?0:_e(t,n,r)}function hw(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=Sg(r);return{t:li(i.top,o.top,0,n),r:li(i.right,o.right,0,t),b:li(i.bottom,o.bottom,0,n),l:li(i.left,o.left,0,t)}}function dw(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=vr(i),l=Math.min(t,n),c=e.borderSkipped,f=r||Pt(i);return{topLeft:li(!f||c.top||c.left,o.topLeft,0,l),topRight:li(!f||c.top||c.right,o.topRight,0,l),bottomLeft:li(!f||c.bottom||c.left,o.bottomLeft,0,l),bottomRight:li(!f||c.bottom||c.right,o.bottomRight,0,l)}}function gw(e){const t=Kg(e),n=t.right-t.left,r=t.bottom-t.top,i=hw(e,n/2,r/2),o=dw(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function tc(e,t,n,r){const i=t===null,o=n===null,c=e&&!(i&&o)&&Kg(e,r);return c&&(i||Hn(t,c.left,c.right))&&(o||Hn(n,c.top,c.bottom))}function mw(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function pw(e,t){e.rect(t.x,t.y,t.w,t.h)}function ec(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,l=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+l,radius:e.radius}}class ra extends fn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:l}=gw(this),c=mw(l.radius)?la:pw;t.save(),(l.w!==o.w||l.h!==o.h)&&(t.beginPath(),c(t,ec(l,n,o)),t.clip(),c(t,ec(o,-n,l)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),c(t,ec(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return tc(this,t,n,r)}inXRange(t,n){return tc(this,t,null,n)}inYRange(t,n){return tc(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}nt(ra,"id","bar"),nt(ra,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),nt(ra,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function bw(e,t,n){const r=e.segments,i=e.points,o=t.points,l=[];for(const c of r){let{start:f,end:h}=c;h=$c(f,h,i);const d=Sc(n,i[f],i[h],c.loop);if(!t.segments){l.push({source:c,target:d,start:i[f],end:i[h]});continue}const m=Og(t,d);for(const p of m){const S=Sc(n,o[p.start],o[p.end],p.loop),P=kg(c,i,S);for(const E of P)l.push({source:E,target:p,start:{[n]:ad(d,S,"start",Math.max)},end:{[n]:ad(d,S,"end",Math.min)}})}}return l}function Sc(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=yn(i),o=yn(o)),{property:e,start:i,end:o}}function _w(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:l,end:c})=>{c=$c(l,c,i);const f=i[l],h=i[c];r!==null?(o.push({x:f.x,y:r}),o.push({x:h.x,y:r})):n!==null&&(o.push({x:n,y:f.y}),o.push({x:n,y:h.y}))}),o}function $c(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function ad(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function $g(e,t){let n=[],r=!1;return te(e)?(r=!0,n=e):n=_w(e,t),n.length?new Wi({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function ld(e){return e&&e.fill!==!1}function yw(e,t,n){let i=e[t].fill;const o=[t];let l;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!ie(i))return i;if(l=e[i],!l)return!1;if(l.visible)return i;o.push(i),i=l.fill}return!1}function vw(e,t,n){const r=ww(e);if(Pt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return ie(i)&&Math.floor(i)===i?Sw(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Sw(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function xw(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Pt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Tw(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Pt(e)?r=e.value:r=t.getBaseValue(),r}function ww(e){const t=e.options,n=t.fill;let r=pt(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Mw(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,l=r.points,c=Pw(t,n);c.push($g({x:null,y:t.bottom},r));for(let f=0;f<o.length;f++){const h=o[f];for(let d=h.start;d<=h.end;d++)Ew(i,l[d],c)}return new Wi({points:i,options:{}})}function Pw(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const o=r[i];if(o.index===t)break;o.hidden||n.unshift(o.dataset)}return n}function Ew(e,t,n){const r=[];for(let i=0;i<n.length;i++){const o=n[i],{first:l,last:c,point:f}=Nw(o,t,"x");if(!(!f||l&&c)){if(l)r.unshift(f);else if(e.push(f),!c)break}}e.push(...r)}function Nw(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],o=e.segments,l=e.points;let c=!1,f=!1;for(let h=0;h<o.length;h++){const d=o[h],m=l[d.start][n],p=l[d.end][n];if(Hn(i,m,p)){c=i===m,f=i===p;break}}return{first:c,last:f,point:r}}class Yg{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:o,radius:l}=this;return n=n||{start:0,end:$t},t.arc(i,o,l,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,o=t.angle;return{x:n+Math.cos(o)*i,y:r+Math.sin(o)*i,angle:o}}}function Cw(e){const{chart:t,fill:n,line:r}=e;if(ie(n))return kw(t,n);if(n==="stack")return Mw(e);if(n==="shape")return!0;const i=Ow(e);return i instanceof Yg?i:$g(i,r)}function kw(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function Ow(e){return(e.scale||{}).getPointPositionForValue?Iw(e):Aw(e)}function Aw(e){const{scale:t={},fill:n}=e,r=xw(n,t);if(ie(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Iw(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,o=r.reverse?t.max:t.min,l=Tw(n,t,o),c=[];if(r.grid.circular){const f=t.getPointPositionForValue(0,o);return new Yg({x:f.x,y:f.y,radius:t.getDistanceFromCenterForValue(l)})}for(let f=0;f<i;++f)c.push(t.getPointPositionForValue(f,l));return c}function nc(e,t,n){const r=Cw(t),{line:i,scale:o,axis:l}=t,c=i.options,f=c.fill,h=c.backgroundColor,{above:d=h,below:m=h}=f||{};r&&i.points.length&&(ma(e,n),Dw(e,{line:i,target:r,above:d,below:m,area:n,scale:o,axis:l}),pa(e))}function Dw(e,t){const{line:n,target:r,above:i,below:o,area:l,scale:c}=t,f=n._loop?"angle":t.axis;e.save(),f==="x"&&o!==i&&(cd(e,r,l.top),ud(e,{line:n,target:r,color:i,scale:c,property:f}),e.restore(),e.save(),cd(e,r,l.bottom)),ud(e,{line:n,target:r,color:o,scale:c,property:f}),e.restore()}function cd(e,t,n){const{segments:r,points:i}=t;let o=!0,l=!1;e.beginPath();for(const c of r){const{start:f,end:h}=c,d=i[f],m=i[$c(f,h,i)];o?(e.moveTo(d.x,d.y),o=!1):(e.lineTo(d.x,n),e.lineTo(d.x,d.y)),l=!!t.pathSegment(e,c,{move:l}),l?e.closePath():e.lineTo(m.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function ud(e,t){const{line:n,target:r,property:i,color:o,scale:l}=t,c=bw(n,r,i);for(const{source:f,target:h,start:d,end:m}of c){const{style:{backgroundColor:p=o}={}}=f,S=r!==!0;e.save(),e.fillStyle=p,Rw(e,l,S&&Sc(i,d,m)),e.beginPath();const P=!!n.pathSegment(e,f);let E;if(S){P?e.closePath():fd(e,r,m,i);const I=!!r.pathSegment(e,h,{move:P,reverse:!0});E=P&&I,E||fd(e,r,d,i)}e.closePath(),e.fill(E?"evenodd":"nonzero"),e.restore()}}function Rw(e,t,n){const{top:r,bottom:i}=t.chart.chartArea,{property:o,start:l,end:c}=n||{};o==="x"&&(e.beginPath(),e.rect(l,r,c-l,i-r),e.clip())}function fd(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var wE={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let o,l,c,f;for(l=0;l<r;++l)o=e.getDatasetMeta(l),c=o.dataset,f=null,c&&c.options&&c instanceof Wi&&(f={visible:e.isDatasetVisible(l),index:l,fill:vw(c,l,r),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:c}),o.$filler=f,i.push(f);for(l=0;l<r;++l)f=i[l],!(!f||f.fill===!1)&&(f.fill=yw(i,l,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let l=i.length-1;l>=0;--l){const c=i[l].$filler;c&&(c.line.updateControlPoints(o,c.axis),r&&c.fill&&nc(e.ctx,c,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;ld(o)&&nc(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!ld(r)||n.drawTime!=="beforeDatasetDraw"||nc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const hd=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Lw=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class dd extends fn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=ut(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=ge(r.font),o=i.size,l=this._computeTitleHeight(),{boxWidth:c,itemHeight:f}=hd(r,o);let h,d;n.font=i.string,this.isHorizontal()?(h=this.maxWidth,d=this._fitRows(l,o,c,f)+10):(d=this.maxHeight,h=this._fitCols(l,i,c,f)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:l,options:{labels:{padding:c}}}=this,f=this.legendHitBoxes=[],h=this.lineWidths=[0],d=i+c;let m=t;o.textAlign="left",o.textBaseline="middle";let p=-1,S=-d;return this.legendItems.forEach((P,E)=>{const I=r+n/2+o.measureText(P.text).width;(E===0||h[h.length-1]+I+2*c>l)&&(m+=d,h[h.length-(E>0?0:1)]=0,S+=d,p++),f[E]={left:0,top:S,row:p,width:I,height:i},h[h.length-1]+=I+c}),m}_fitCols(t,n,r,i){const{ctx:o,maxHeight:l,options:{labels:{padding:c}}}=this,f=this.legendHitBoxes=[],h=this.columnSizes=[],d=l-t;let m=c,p=0,S=0,P=0,E=0;return this.legendItems.forEach((I,y)=>{const{itemWidth:v,itemHeight:C}=Fw(r,n,o,I,i);y>0&&S+C+2*c>d&&(m+=p+c,h.push({width:p,height:S}),P+=p+c,E++,p=S=0),f[y]={left:P,top:S,col:E,width:v,height:C},p=Math.max(p,v),S+=C+c}),m+=p,h.push({width:p,height:S}),m}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,l=Sr(o,this.left,this.width);if(this.isHorizontal()){let c=0,f=be(r,this.left+i,this.right-this.lineWidths[c]);for(const h of n)c!==h.row&&(c=h.row,f=be(r,this.left+i,this.right-this.lineWidths[c])),h.top+=this.top+t+i,h.left=l.leftForLtr(l.x(f),h.width),f+=h.width+i}else{let c=0,f=be(r,this.top+t+i,this.bottom-this.columnSizes[c].height);for(const h of n)h.col!==c&&(c=h.col,f=be(r,this.top+t+i,this.bottom-this.columnSizes[c].height)),h.top=f,h.left+=this.left+i,h.left=l.leftForLtr(l.x(h.left),h.width),f+=h.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ma(t,this),this._draw(),pa(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:l}=t,c=zt.color,f=Sr(t.rtl,this.left,this.width),h=ge(l.font),{padding:d}=l,m=h.size,p=m/2;let S;this.drawTitle(),i.textAlign=f.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=h.string;const{boxWidth:P,boxHeight:E,itemHeight:I}=hd(l,m),y=function(B,F,H){if(isNaN(P)||P<=0||isNaN(E)||E<0)return;i.save();const Z=pt(H.lineWidth,1);if(i.fillStyle=pt(H.fillStyle,c),i.lineCap=pt(H.lineCap,"butt"),i.lineDashOffset=pt(H.lineDashOffset,0),i.lineJoin=pt(H.lineJoin,"miter"),i.lineWidth=Z,i.strokeStyle=pt(H.strokeStyle,c),i.setLineDash(pt(H.lineDash,[])),l.usePointStyle){const it={radius:E*Math.SQRT2/2,pointStyle:H.pointStyle,rotation:H.rotation,borderWidth:Z},$=f.xPlus(B,P/2),X=F+p;vg(i,it,$,X,l.pointStyleWidth&&P)}else{const it=F+Math.max((m-E)/2,0),$=f.leftForLtr(B,P),X=vr(H.borderRadius);i.beginPath(),Object.values(X).some(bt=>bt!==0)?la(i,{x:$,y:it,w:P,h:E,radius:X}):i.rect($,it,P,E),i.fill(),Z!==0&&i.stroke()}i.restore()},v=function(B,F,H){Os(i,H.text,B,F+I/2,h,{strikethrough:H.hidden,textAlign:f.textAlign(H.textAlign)})},C=this.isHorizontal(),w=this._computeTitleHeight();C?S={x:be(o,this.left+d,this.right-r[0]),y:this.top+d+w,line:0}:S={x:this.left+d,y:be(o,this.top+w+d,this.bottom-n[0].height),line:0},Eg(this.ctx,t.textDirection);const O=I+d;this.legendItems.forEach((B,F)=>{i.strokeStyle=B.fontColor,i.fillStyle=B.fontColor;const H=i.measureText(B.text).width,Z=f.textAlign(B.textAlign||(B.textAlign=l.textAlign)),it=P+p+H;let $=S.x,X=S.y;f.setWidth(this.width),C?F>0&&$+it+d>this.right&&(X=S.y+=O,S.line++,$=S.x=be(o,this.left+d,this.right-r[S.line])):F>0&&X+O>this.bottom&&($=S.x=$+n[S.line].width+d,S.line++,X=S.y=be(o,this.top+w+d,this.bottom-n[S.line].height));const bt=f.x($);if(y(bt,X,B),$=_S(Z,$+P+p,C?$+it:this.right,t.rtl),v(f.x($),X,B),C)S.x+=it+d;else if(typeof B.text!="string"){const dt=h.lineHeight;S.y+=Xg(B,dt)+d}else S.y+=O}),Ng(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ge(n.font),i=He(n.padding);if(!n.display)return;const o=Sr(t.rtl,this.left,this.width),l=this.ctx,c=n.position,f=r.size/2,h=i.top+f;let d,m=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),d=this.top+h,m=be(t.align,m,this.right-p);else{const P=this.columnSizes.reduce((E,I)=>Math.max(E,I.height),0);d=h+be(t.align,this.top,this.bottom-P-t.labels.padding-this._computeTitleHeight())}const S=be(c,m,m+p);l.textAlign=o.textAlign(Lc(c)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=r.string,Os(l,n.text,S,d,r)}_computeTitleHeight(){const t=this.options.title,n=ge(t.font),r=He(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Hn(t,this.left,this.right)&&Hn(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Hn(t,i.left,i.left+i.width)&&Hn(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!zw(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Lw(i,r);i&&!o&&ut(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ut(n.onHover,[t,r,this],this)}else r&&ut(n.onClick,[t,r,this],this)}}function Fw(e,t,n,r,i){const o=Bw(r,e,t,n),l=Ww(i,r,t.lineHeight);return{itemWidth:o,itemHeight:l}}function Bw(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,l)=>o.length>l.length?o:l)),t+n.size/2+r.measureText(i).width}function Ww(e,t,n){let r=e;return typeof t.text!="string"&&(r=Xg(t,n)),r}function Xg(e,t){const n=e.text?e.text.length:0;return t*n}function zw(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var ME={id:"legend",_element:dd,start(e,t,n){const r=e.legend=new dd({ctx:e.ctx,options:n,chart:e});en.configure(e,r,n),en.addBox(e,r)},stop(e){en.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;en.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:l,borderRadius:c}}=e.legend.options;return e._getSortedDatasetMetas().map(f=>{const h=f.controller.getStyle(n?0:void 0),d=He(h.borderWidth);return{text:t[f.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!f.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:r||h.pointStyle,rotation:h.rotation,textAlign:i||h.textAlign,borderRadius:l&&(c||h.borderRadius),datasetIndex:f.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class qg extends fn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=te(r.text)?r.text.length:1;this._padding=He(r.padding);const o=i*ge(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:l}=this,c=l.align;let f=0,h,d,m;return this.isHorizontal()?(d=be(c,r,o),m=n+t,h=o-r):(l.position==="left"?(d=r+t,m=be(c,i,n),f=qt*-.5):(d=o-t,m=be(c,n,i),f=qt*.5),h=i-n),{titleX:d,titleY:m,maxWidth:h,rotation:f}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ge(n.font),o=r.lineHeight/2+this._padding.top,{titleX:l,titleY:c,maxWidth:f,rotation:h}=this._drawArgs(o);Os(t,n.text,0,0,r,{color:n.color,maxWidth:f,rotation:h,textAlign:Lc(n.align),textBaseline:"middle",translation:[l,c]})}}function Uw(e,t){const n=new qg({ctx:e.ctx,options:t,chart:e});en.configure(e,n,t),en.addBox(e,n),e.titleBlock=n}var PE={id:"title",_element:qg,start(e,t,n){Uw(e,n)},stop(e){const t=e.titleBlock;en.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;en.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const vs={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const c=e[t].element;if(c&&c.hasValue()){const f=c.tooltipPosition();r.add(f.x),i+=f.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((c,f)=>c+f)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,l,c;for(o=0,l=e.length;o<l;++o){const f=e[o].element;if(f&&f.hasValue()){const h=f.getCenterPoint(),d=gc(t,h);d<i&&(i=d,c=f)}}if(c){const f=c.tooltipPosition();n=f.x,r=f.y}return{x:n,y:r}}};function bn(e,t){return t&&(te(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Wn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
17
- `)>-1?e.split(`
18
- `):e}function Hw(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:l,value:c}=o.getLabelAndValue(i);return{chart:e,label:l,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:c,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function gd(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:l,boxHeight:c}=t,f=ge(t.bodyFont),h=ge(t.titleFont),d=ge(t.footerFont),m=o.length,p=i.length,S=r.length,P=He(t.padding);let E=P.height,I=0,y=r.reduce((w,O)=>w+O.before.length+O.lines.length+O.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,m&&(E+=m*h.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),y){const w=t.displayColors?Math.max(c,f.lineHeight):f.lineHeight;E+=S*w+(y-S)*f.lineHeight+(y-1)*t.bodySpacing}p&&(E+=t.footerMarginTop+p*d.lineHeight+(p-1)*t.footerSpacing);let v=0;const C=function(w){I=Math.max(I,n.measureText(w).width+v)};return n.save(),n.font=h.string,Tt(e.title,C),n.font=f.string,Tt(e.beforeBody.concat(e.afterBody),C),v=t.displayColors?l+2+t.boxPadding:0,Tt(r,w=>{Tt(w.before,C),Tt(w.lines,C),Tt(w.after,C)}),v=0,n.font=d.string,Tt(e.footer,C),n.restore(),I+=P.width,{width:I,height:E}}function Vw(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Gw(e,t,n,r){const{x:i,width:o}=r,l=n.caretSize+n.caretPadding;if(e==="left"&&i+o+l>t.width||e==="right"&&i-o-l<0)return!0}function jw(e,t,n,r){const{x:i,width:o}=n,{width:l,chartArea:{left:c,right:f}}=e;let h="center";return r==="center"?h=i<=(c+f)/2?"left":"right":i<=o/2?h="left":i>=l-o/2&&(h="right"),Gw(h,e,t,n)&&(h="center"),h}function md(e,t,n){const r=n.yAlign||t.yAlign||Vw(e,n);return{xAlign:n.xAlign||t.xAlign||jw(e,t,n,r),yAlign:r}}function Kw(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function $w(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function pd(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:l}=e,{xAlign:c,yAlign:f}=n,h=i+o,{topLeft:d,topRight:m,bottomLeft:p,bottomRight:S}=vr(l);let P=Kw(t,c);const E=$w(t,f,h);return f==="center"?c==="left"?P+=h:c==="right"&&(P-=h):c==="left"?P-=Math.max(d,p)+i:c==="right"&&(P+=Math.max(m,S)+i),{x:_e(P,0,r.width-t.width),y:_e(E,0,r.height-t.height)}}function Go(e,t,n){const r=He(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function bd(e){return bn([],Wn(e))}function Yw(e,t,n){return Gi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function _d(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Zg={beforeTitle:Fn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Fn,beforeBody:Fn,beforeLabel:Fn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return At(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Fn,afterBody:Fn,beforeFooter:Fn,footer:Fn,afterFooter:Fn};function ke(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?Zg[t].call(n,r):i}class xc extends fn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new Ag(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Yw(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=ke(r,"beforeTitle",this,t),o=ke(r,"title",this,t),l=ke(r,"afterTitle",this,t);let c=[];return c=bn(c,Wn(i)),c=bn(c,Wn(o)),c=bn(c,Wn(l)),c}getBeforeBody(t,n){return bd(ke(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Tt(t,o=>{const l={before:[],lines:[],after:[]},c=_d(r,o);bn(l.before,Wn(ke(c,"beforeLabel",this,o))),bn(l.lines,ke(c,"label",this,o)),bn(l.after,Wn(ke(c,"afterLabel",this,o))),i.push(l)}),i}getAfterBody(t,n){return bd(ke(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=ke(r,"beforeFooter",this,t),o=ke(r,"footer",this,t),l=ke(r,"afterFooter",this,t);let c=[];return c=bn(c,Wn(i)),c=bn(c,Wn(o)),c=bn(c,Wn(l)),c}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],l=[];let c=[],f,h;for(f=0,h=n.length;f<h;++f)c.push(Hw(this.chart,n[f]));return t.filter&&(c=c.filter((d,m,p)=>t.filter(d,m,p,r))),t.itemSort&&(c=c.sort((d,m)=>t.itemSort(d,m,r))),Tt(c,d=>{const m=_d(t.callbacks,d);i.push(ke(m,"labelColor",this,d)),o.push(ke(m,"labelPointStyle",this,d)),l.push(ke(m,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=c,c}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,l=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const c=vs[r.position].call(this,i,this._eventPosition);l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r);const f=this._size=gd(this,r),h=Object.assign({},c,f),d=md(this.chart,r,h),m=pd(r,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:m.x,y:m.y,width:f.width,height:f.height,caretX:c.x,caretY:c.y}}this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:l,cornerRadius:c}=r,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:m}=vr(c),{x:p,y:S}=t,{width:P,height:E}=n;let I,y,v,C,w,O;return o==="center"?(w=S+E/2,i==="left"?(I=p,y=I-l,C=w+l,O=w-l):(I=p+P,y=I+l,C=w-l,O=w+l),v=I):(i==="left"?y=p+Math.max(f,d)+l:i==="right"?y=p+P-Math.max(h,m)-l:y=this.caretX,o==="top"?(C=S,w=C-l,I=y-l,v=y+l):(C=S+E,w=C+l,I=y+l,v=y-l),O=C),{x1:I,x2:y,x3:v,y1:C,y2:w,y3:O}}drawTitle(t,n,r){const i=this.title,o=i.length;let l,c,f;if(o){const h=Sr(r.rtl,this.x,this.width);for(t.x=Go(this,r.titleAlign,r),n.textAlign=h.textAlign(r.titleAlign),n.textBaseline="middle",l=ge(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=l.string,f=0;f<o;++f)n.fillText(i[f],h.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+c,f+1===o&&(t.y+=r.titleMarginBottom-c)}}_drawColorBox(t,n,r,i,o){const l=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:f,boxWidth:h}=o,d=ge(o.bodyFont),m=Go(this,"left",o),p=i.x(m),S=f<d.lineHeight?(d.lineHeight-f)/2:0,P=n.y+S;if(o.usePointStyle){const E={radius:Math.min(h,f)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},I=i.leftForLtr(p,h)+h/2,y=P+f/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,pc(t,E,I,y),t.strokeStyle=l.borderColor,t.fillStyle=l.backgroundColor,pc(t,E,I,y)}else{t.lineWidth=Pt(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,t.strokeStyle=l.borderColor,t.setLineDash(l.borderDash||[]),t.lineDashOffset=l.borderDashOffset||0;const E=i.leftForLtr(p,h),I=i.leftForLtr(i.xPlus(p,1),h-2),y=vr(l.borderRadius);Object.values(y).some(v=>v!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,la(t,{x:E,y:P,w:h,h:f,radius:y}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),la(t,{x:I,y:P+1,w:h-2,h:f-2,radius:y}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(E,P,h,f),t.strokeRect(E,P,h,f),t.fillStyle=l.backgroundColor,t.fillRect(I,P+1,h-2,f-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:l,displayColors:c,boxHeight:f,boxWidth:h,boxPadding:d}=r,m=ge(r.bodyFont);let p=m.lineHeight,S=0;const P=Sr(r.rtl,this.x,this.width),E=function(H){n.fillText(H,P.x(t.x+S),t.y+p/2),t.y+=p+o},I=P.textAlign(l);let y,v,C,w,O,B,F;for(n.textAlign=l,n.textBaseline="middle",n.font=m.string,t.x=Go(this,I,r),n.fillStyle=r.bodyColor,Tt(this.beforeBody,E),S=c&&I!=="right"?l==="center"?h/2+d:h+2+d:0,w=0,B=i.length;w<B;++w){for(y=i[w],v=this.labelTextColors[w],n.fillStyle=v,Tt(y.before,E),C=y.lines,c&&C.length&&(this._drawColorBox(n,t,w,P,r),p=Math.max(m.lineHeight,f)),O=0,F=C.length;O<F;++O)E(C[O]),p=m.lineHeight;Tt(y.after,E)}S=0,p=m.lineHeight,Tt(this.afterBody,E),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let l,c;if(o){const f=Sr(r.rtl,this.x,this.width);for(t.x=Go(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=f.textAlign(r.footerAlign),n.textBaseline="middle",l=ge(r.footerFont),n.fillStyle=r.footerColor,n.font=l.string,c=0;c<o;++c)n.fillText(i[c],f.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:l}=this,{x:c,y:f}=t,{width:h,height:d}=r,{topLeft:m,topRight:p,bottomLeft:S,bottomRight:P}=vr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(c+m,f),l==="top"&&this.drawCaret(t,n,r,i),n.lineTo(c+h-p,f),n.quadraticCurveTo(c+h,f,c+h,f+p),l==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(c+h,f+d-P),n.quadraticCurveTo(c+h,f+d,c+h-P,f+d),l==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(c+S,f+d),n.quadraticCurveTo(c,f+d,c,f+d-S),l==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(c,f+m),n.quadraticCurveTo(c,f,c+m,f),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const l=vs[t.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=gd(this,t),f=Object.assign({},l,this._size),h=md(n,t,f),d=pd(t,f,h,n);(i._to!==d.x||o._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const l=He(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),Eg(t,n.textDirection),o.y+=l.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),Ng(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:c,index:f})=>{const h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:h.data[f],index:f}}),o=!sa(r,i),l=this._positionChanged(i,n);(o||l)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],l=this._getActiveElements(t,o,n,r),c=this._positionChanged(l,t),f=n||!sa(l,o)||c;return f&&(this._active=l,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),f}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const l=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&l.reverse(),l}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,l=vs[o.position].call(this,t,n);return l!==!1&&(r!==l.x||i!==l.y)}}nt(xc,"positioners",vs);var EE={id:"tooltip",_element:xc,positioners:vs,afterInit(e,t,n){n&&(e.tooltip=new xc({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zg},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Xw=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function qw(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Xw(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Zw=(e,t)=>e===null?null:_e(Math.round(e),0,t);function yd(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class vd extends ji{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(At(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:qw(r,t,pt(n,t),this._addedLabels),Zw(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let l=t;l<=n;l++)i.push({value:l});return i}getLabelForValue(t){return yd.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}nt(vd,"id","category"),nt(vd,"defaults",{ticks:{callback:yd}});function Jw(e,t){const n=[],{bounds:i,step:o,min:l,max:c,precision:f,count:h,maxTicks:d,maxDigits:m,includeBounds:p}=e,S=o||1,P=d-1,{min:E,max:I}=t,y=!At(l),v=!At(c),C=!At(h),w=(I-E)/(m+1);let O=ph((I-E)/P/S)*S,B,F,H,Z;if(O<1e-14&&!y&&!v)return[{value:E},{value:I}];Z=Math.ceil(I/O)-Math.floor(E/O),Z>P&&(O=ph(Z*O/P/S)*S),At(f)||(B=Math.pow(10,f),O=Math.ceil(O*B)/B),i==="ticks"?(F=Math.floor(E/O)*O,H=Math.ceil(I/O)*O):(F=E,H=I),y&&v&&o&&uS((c-l)/o,O/1e3)?(Z=Math.round(Math.min((c-l)/O,d)),O=(c-l)/Z,F=l,H=c):C?(F=y?l:F,H=v?c:H,Z=h-1,O=(H-F)/Z):(Z=(H-F)/O,zi(Z,Math.round(Z),O/1e3)?Z=Math.round(Z):Z=Math.ceil(Z));const it=Math.max(bh(O),bh(F));B=Math.pow(10,At(f)?it:f),F=Math.round(F*B)/B,H=Math.round(H*B)/B;let $=0;for(y&&(p&&F!==l?(n.push({value:l}),F<l&&$++,zi(Math.round((F+$*O)*B)/B,l,Sd(l,w,e))&&$++):F<l&&$++);$<Z;++$){const X=Math.round((F+$*O)*B)/B;if(v&&X>c)break;n.push({value:X})}return v&&p&&H!==c?n.length&&zi(n[n.length-1].value,c,Sd(c,w,e))?n[n.length-1].value=c:n.push({value:c}):(!v||H===c)&&n.push({value:H}),n}function Sd(e,t,{horizontal:n,minRotation:r}){const i=Un(r),o=(n?Math.sin(i):Math.cos(i))||.001,l=.75*t*(""+e).length;return Math.min(t/o,l)}class Jg extends ji{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return At(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const l=f=>i=n?i:f,c=f=>o=r?o:f;if(t){const f=nn(i),h=nn(o);f<0&&h<0?c(0):f>0&&h>0&&l(0)}if(i===o){let f=o===0?1:Math.abs(o*.05);c(o+f),t||l(i-f)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,l=Jw(i,o);return t.bounds==="ticks"&&fg(l,this,"value"),t.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return ga(t,this.chart.options.locale,this.options.ticks.format)}}class xd extends Jg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ie(t)?t:0,this.max=ie(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Un(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}nt(xd,"id","linear"),nt(xd,"defaults",{ticks:{callback:Bc.formatters.numeric}});const Is=e=>Math.floor(ai(e)),Ri=(e,t)=>Math.pow(10,Is(e)+t);function Td(e){return e/Math.pow(10,Is(e))===1}function wd(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function Qw(e,t){const n=t-e;let r=Is(n);for(;wd(e,t,r)>10;)r++;for(;wd(e,t,r)<10;)r--;return Math.min(r,Is(e))}function tM(e,{min:t,max:n}){t=Ue(e.min,t);const r=[],i=Is(t);let o=Qw(t,n),l=o<0?Math.pow(10,Math.abs(o)):1;const c=Math.pow(10,o),f=i>o?Math.pow(10,i):0,h=Math.round((t-f)*l)/l,d=Math.floor((t-f)/c/10)*c*10;let m=Math.floor((h-d)/Math.pow(10,o)),p=Ue(e.min,Math.round((f+d+m*Math.pow(10,o))*l)/l);for(;p<n;)r.push({value:p,major:Td(p),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(o++,m=2,l=o>=0?1:l),p=Math.round((f+d+m*Math.pow(10,o))*l)/l;const S=Ue(e.max,p);return r.push({value:S,major:Td(S),significand:m}),r}class Md extends ji{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Jg.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return ie(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ie(t)?Math.max(0,t):null,this.max=ie(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ie(this._userMin)&&(this.min=t===Ri(this.min,0)?Ri(this.min,-1):Ri(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=c=>r=t?r:c,l=c=>i=n?i:c;r===i&&(r<=0?(o(1),l(10)):(o(Ri(r,-1)),l(Ri(i,1)))),r<=0&&o(Ri(i,-1)),i<=0&&l(Ri(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=tM(n,this);return t.bounds==="ticks"&&fg(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":ga(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ai(t),this._valueRange=ai(this.max)-ai(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ai(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}nt(Md,"id","logarithmic"),nt(Md,"defaults",{ticks:{callback:Bc.formatters.logarithmic,major:{enabled:!0}}});const ya={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ie=Object.keys(ya);function Pd(e,t){return e-t}function Ed(e,t){if(At(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let l=t;return typeof r=="function"&&(l=r(l)),ie(l)||(l=typeof r=="string"?n.parse(l,r):n.parse(l)),l===null?null:(i&&(l=i==="week"&&(wr(o)||o===!0)?n.startOf(l,"isoWeek",o):n.startOf(l,i)),+l)}function Nd(e,t,n,r){const i=Ie.length;for(let o=Ie.indexOf(e);o<i-1;++o){const l=ya[Ie[o]],c=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-t)/(c*l.size))<=r)return Ie[o]}return Ie[i-1]}function eM(e,t,n,r,i){for(let o=Ie.length-1;o>=Ie.indexOf(n);o--){const l=Ie[o];if(ya[l].common&&e._adapter.diff(i,r,l)>=t-1)return l}return Ie[n?Ie.indexOf(n):0]}function nM(e){for(let t=Ie.indexOf(e)+1,n=Ie.length;t<n;++t)if(ya[Ie[t]].common)return Ie[t]}function Cd(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Rc(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function iM(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),l=t[t.length-1].value;let c,f;for(c=o;c<=l;c=+i.add(c,1,r))f=n[c],f>=0&&(t[f].major=!0);return t}function kd(e,t,n){const r=[],i={},o=t.length;let l,c;for(l=0;l<o;++l)c=t[l],i[c]=l,r.push({value:c,major:!1});return o===0||!n?r:iM(e,r,i,n)}class ha extends ji{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new Hx._date(t.adapters.date);i.init(n),Ss(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Ed(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:l,maxDefined:c}=this.getUserBounds();function f(h){!l&&!isNaN(h.min)&&(i=Math.min(i,h.min)),!c&&!isNaN(h.max)&&(o=Math.max(o,h.max))}(!l||!c)&&(f(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&f(this.getMinMax(!1))),i=ie(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=ie(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,l=this.max,c=mS(i,o,l);return this._unit=n.unit||(r.autoSkip?Nd(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):eM(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:nM(this._unit),this.initOffsets(i),t.reverse&&c.reverse(),kd(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;n=_e(n,0,l),r=_e(r,0,l),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,l=o.unit||Nd(o.minUnit,n,r,this._getLabelCapacity(n)),c=pt(i.ticks.stepSize,1),f=l==="week"?o.isoWeekday:!1,h=wr(f)||f===!0,d={};let m=n,p,S;if(h&&(m=+t.startOf(m,"isoWeek",f)),m=+t.startOf(m,h?"day":l),t.diff(r,n,l)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+l);const P=i.ticks.source==="data"&&this.getDataTimestamps();for(p=m,S=0;p<r;p=+t.add(p,c,l),S++)Cd(d,p,P);return(p===r||i.bounds==="ticks"||S===1)&&Cd(d,p,P),Object.keys(d).sort(Pd).map(E=>+E)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,l=n||i[o];return this._adapter.format(t,l)}_tickFormatFunction(t,n,r,i){const o=this.options,l=o.ticks.callback;if(l)return ut(l,[t,n,r],this);const c=o.time.displayFormats,f=this._unit,h=this._majorUnit,d=f&&c[f],m=h&&c[h],p=r[n],S=h&&m&&p&&p.major;return this._adapter.format(t,i||(S?m:d))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Un(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),l=Math.sin(i),c=this._resolveTickFontOptions(0).size;return{w:r*o+c*l,h:r*l+c*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,kd(this,[t],this._majorUnit),i),l=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(Ed(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return gg(t.sort(Pd))}}nt(ha,"id","time"),nt(ha,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function jo(e,t,n){let r=0,i=e.length-1,o,l,c,f;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Bi(e,"pos",t)),{pos:o,time:c}=e[r],{pos:l,time:f}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Bi(e,"time",t)),{time:o,pos:c}=e[r],{time:l,pos:f}=e[i]);const h=l-o;return h?c+(f-c)*(t-o)/h:c}class Od extends ha{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=jo(n,this.min),this._tableRange=jo(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let l,c,f,h,d;for(l=0,c=t.length;l<c;++l)h=t[l],h>=n&&h<=r&&i.push(h);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(l=0,c=i.length;l<c;++l)d=i[l+1],f=i[l-1],h=i[l],Math.round((d+f)/2)!==h&&o.push({time:h,pos:l/(c-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(jo(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return jo(this._table,r*this._tableRange+this._minPos,!0)}}nt(Od,"id","timeseries"),nt(Od,"defaults",ha.defaults);const Qg="label";function Ad(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function rM(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function tm(e,t){e.labels=t}function em(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qg;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(l=>l[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function sM(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qg;const n={labels:[],datasets:[]};return tm(n,e.labels),em(n,e.datasets,t),n}function oM(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:l,data:c,options:f,plugins:h=[],fallbackContent:d,updateMode:m,...p}=e,S=Te.useRef(null),P=Te.useRef(null),E=()=>{S.current&&(P.current=new Kc(S.current,{type:l,data:sM(c,o),options:f&&{...f},plugins:h}),Ad(t,P.current))},I=()=>{Ad(t,null),P.current&&(P.current.destroy(),P.current=null)};return Te.useEffect(()=>{!i&&P.current&&f&&rM(P.current,f)},[i,f]),Te.useEffect(()=>{!i&&P.current&&tm(P.current.config.data,c.labels)},[i,c.labels]),Te.useEffect(()=>{!i&&P.current&&c.datasets&&em(P.current.config.data,c.datasets,o)},[i,c.datasets]),Te.useEffect(()=>{P.current&&(i?(I(),setTimeout(E)):P.current.update(m))},[i,f,c.labels,c.datasets,m]),Te.useEffect(()=>{P.current&&(I(),setTimeout(E))},[l]),Te.useEffect(()=>(E(),()=>I()),[]),rg.createElement("canvas",{ref:S,role:"img",height:n,width:r,...p},d)}const aM=Te.forwardRef(oM);function va(e,t){return Kc.register(t),Te.forwardRef((n,r)=>rg.createElement(aM,{...n,ref:r,type:e}))}const NE=va("line",Qo),CE=va("bar",Jo),kE=va("pie",bc),OE=va("scatter",ta);var nm={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
19
- * http://hammerjs.github.io/
20
- *
21
- * Copyright (c) 2016 Jorik Tangelder;
22
- * Licensed under the MIT license */(function(e){(function(t,n,r,i){var o=["","webkit","Moz","MS","ms","o"],l=n.createElement("div"),c="function",f=Math.round,h=Math.abs,d=Date.now;function m(_,M,A){return setTimeout(C(_,A),M)}function p(_,M,A){return Array.isArray(_)?(S(_,A[M],A),!0):!1}function S(_,M,A){var z;if(_)if(_.forEach)_.forEach(M,A);else if(_.length!==i)for(z=0;z<_.length;)M.call(A,_[z],z,_),z++;else for(z in _)_.hasOwnProperty(z)&&M.call(A,_[z],z,_)}function P(_,M,A){var z="DEPRECATED METHOD: "+M+`
23
- `+A+` AT
24
- `;return function(){var q=new Error("get-stack-trace"),et=q&&q.stack?q.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",yt=t.console&&(t.console.warn||t.console.log);return yt&&yt.call(t.console,z,et),_.apply(this,arguments)}}var E;typeof Object.assign!="function"?E=function(M){if(M===i||M===null)throw new TypeError("Cannot convert undefined or null to object");for(var A=Object(M),z=1;z<arguments.length;z++){var q=arguments[z];if(q!==i&&q!==null)for(var et in q)q.hasOwnProperty(et)&&(A[et]=q[et])}return A}:E=Object.assign;var I=P(function(M,A,z){for(var q=Object.keys(A),et=0;et<q.length;)(!z||z&&M[q[et]]===i)&&(M[q[et]]=A[q[et]]),et++;return M},"extend","Use `assign`."),y=P(function(M,A){return I(M,A,!0)},"merge","Use `assign`.");function v(_,M,A){var z=M.prototype,q;q=_.prototype=Object.create(z),q.constructor=_,q._super=z,A&&E(q,A)}function C(_,M){return function(){return _.apply(M,arguments)}}function w(_,M){return typeof _==c?_.apply(M&&M[0]||i,M):_}function O(_,M){return _===i?M:_}function B(_,M,A){S(it(M),function(z){_.addEventListener(z,A,!1)})}function F(_,M,A){S(it(M),function(z){_.removeEventListener(z,A,!1)})}function H(_,M){for(;_;){if(_==M)return!0;_=_.parentNode}return!1}function Z(_,M){return _.indexOf(M)>-1}function it(_){return _.trim().split(/\s+/g)}function $(_,M,A){if(_.indexOf&&!A)return _.indexOf(M);for(var z=0;z<_.length;){if(A&&_[z][A]==M||!A&&_[z]===M)return z;z++}return-1}function X(_){return Array.prototype.slice.call(_,0)}function bt(_,M,A){for(var z=[],q=[],et=0;et<_.length;){var yt=_[et][M];$(q,yt)<0&&z.push(_[et]),q[et]=yt,et++}return z=z.sort(function(ne,ae){return ne[M]>ae[M]}),z}function dt(_,M){for(var A,z,q=M[0].toUpperCase()+M.slice(1),et=0;et<o.length;){if(A=o[et],z=A?A+q:M,z in _)return z;et++}return i}var ft=1;function wt(){return ft++}function Ct(_){var M=_.ownerDocument||_;return M.defaultView||M.parentWindow||t}var Ht=/mobile|tablet|ip(ad|hone|od)|android/i,V="ontouchstart"in t,k=dt(t,"PointerEvent")!==i,W=V&&Ht.test(navigator.userAgent),rt="touch",Q="pen",tt="mouse",ht="kinect",Et=25,Ot=1,Bt=2,St=4,Lt=8,ye=1,ee=2,Gn=4,ue=8,rn=16,Ve=ee|Gn,fe=ue|rn,Or=Ve|fe,Bs=["x","y"],hn=["clientX","clientY"];function Vt(_,M){var A=this;this.manager=_,this.callback=M,this.element=_.element,this.target=_.options.inputTarget,this.domHandler=function(z){w(_.options.enable,[_])&&A.handler(z)},this.init()}Vt.prototype={handler:function(){},init:function(){this.evEl&&B(this.element,this.evEl,this.domHandler),this.evTarget&&B(this.target,this.evTarget,this.domHandler),this.evWin&&B(Ct(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&F(this.element,this.evEl,this.domHandler),this.evTarget&&F(this.target,this.evTarget,this.domHandler),this.evWin&&F(Ct(this.element),this.evWin,this.domHandler)}};function pi(_){var M,A=_.options.inputClass;return A?M=A:k?M=Wr:W?M=$n:V?M=Hr:M=Zi,new M(_,Yi)}function Yi(_,M,A){var z=A.pointers.length,q=A.changedPointers.length,et=M&Ot&&z-q===0,yt=M&(St|Lt)&&z-q===0;A.isFirst=!!et,A.isFinal=!!yt,et&&(_.session={}),A.eventType=M,xa(_,A),_.emit("hammer.input",A),_.recognize(A),_.session.prevInput=A}function xa(_,M){var A=_.session,z=M.pointers,q=z.length;A.firstInput||(A.firstInput=jn(M)),q>1&&!A.firstMultiple?A.firstMultiple=jn(M):q===1&&(A.firstMultiple=!1);var et=A.firstInput,yt=A.firstMultiple,Zt=yt?yt.center:et.center,ne=M.center=wn(z);M.timeStamp=d(),M.deltaTime=M.timeStamp-et.timeStamp,M.angle=_i(Zt,ne),M.distance=Kn(Zt,ne),bi(A,M),M.offsetDirection=qi(M.deltaX,M.deltaY);var ae=Xi(M.deltaTime,M.deltaX,M.deltaY);M.overallVelocityX=ae.x,M.overallVelocityY=ae.y,M.overallVelocity=h(ae.x)>h(ae.y)?ae.x:ae.y,M.scale=yt?Ir(yt.pointers,z):1,M.rotation=yt?Ar(yt.pointers,z):0,M.maxPointers=A.prevInput?M.pointers.length>A.prevInput.maxPointers?M.pointers.length:A.prevInput.maxPointers:M.pointers.length,Ta(A,M);var je=_.element;H(M.srcEvent.target,je)&&(je=M.srcEvent.target),M.target=je}function bi(_,M){var A=M.center,z=_.offsetDelta||{},q=_.prevDelta||{},et=_.prevInput||{};(M.eventType===Ot||et.eventType===St)&&(q=_.prevDelta={x:et.deltaX||0,y:et.deltaY||0},z=_.offsetDelta={x:A.x,y:A.y}),M.deltaX=q.x+(A.x-z.x),M.deltaY=q.y+(A.y-z.y)}function Ta(_,M){var A=_.lastInterval||M,z=M.timeStamp-A.timeStamp,q,et,yt,Zt;if(M.eventType!=Lt&&(z>Et||A.velocity===i)){var ne=M.deltaX-A.deltaX,ae=M.deltaY-A.deltaY,je=Xi(z,ne,ae);et=je.x,yt=je.y,q=h(je.x)>h(je.y)?je.x:je.y,Zt=qi(ne,ae),_.lastInterval=M}else q=A.velocity,et=A.velocityX,yt=A.velocityY,Zt=A.direction;M.velocity=q,M.velocityX=et,M.velocityY=yt,M.direction=Zt}function jn(_){for(var M=[],A=0;A<_.pointers.length;)M[A]={clientX:f(_.pointers[A].clientX),clientY:f(_.pointers[A].clientY)},A++;return{timeStamp:d(),pointers:M,center:wn(M),deltaX:_.deltaX,deltaY:_.deltaY}}function wn(_){var M=_.length;if(M===1)return{x:f(_[0].clientX),y:f(_[0].clientY)};for(var A=0,z=0,q=0;q<M;)A+=_[q].clientX,z+=_[q].clientY,q++;return{x:f(A/M),y:f(z/M)}}function Xi(_,M,A){return{x:M/_||0,y:A/_||0}}function qi(_,M){return _===M?ye:h(_)>=h(M)?_<0?ee:Gn:M<0?ue:rn}function Kn(_,M,A){A||(A=Bs);var z=M[A[0]]-_[A[0]],q=M[A[1]]-_[A[1]];return Math.sqrt(z*z+q*q)}function _i(_,M,A){A||(A=Bs);var z=M[A[0]]-_[A[0]],q=M[A[1]]-_[A[1]];return Math.atan2(q,z)*180/Math.PI}function Ar(_,M){return _i(M[1],M[0],hn)+_i(_[1],_[0],hn)}function Ir(_,M){return Kn(M[0],M[1],hn)/Kn(_[0],_[1],hn)}var Dr={mousedown:Ot,mousemove:Bt,mouseup:St},Rr="mousedown",Lr="mousemove mouseup";function Zi(){this.evEl=Rr,this.evWin=Lr,this.pressed=!1,Vt.apply(this,arguments)}v(Zi,Vt,{handler:function(M){var A=Dr[M.type];A&Ot&&M.button===0&&(this.pressed=!0),A&Bt&&M.which!==1&&(A=St),this.pressed&&(A&St&&(this.pressed=!1),this.callback(this.manager,A,{pointers:[M],changedPointers:[M],pointerType:tt,srcEvent:M}))}});var wa={pointerdown:Ot,pointermove:Bt,pointerup:St,pointercancel:Lt,pointerout:Lt},Ma={2:rt,3:Q,4:tt,5:ht},Fr="pointerdown",Br="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Fr="MSPointerDown",Br="MSPointerMove MSPointerUp MSPointerCancel");function Wr(){this.evEl=Fr,this.evWin=Br,Vt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}v(Wr,Vt,{handler:function(M){var A=this.store,z=!1,q=M.type.toLowerCase().replace("ms",""),et=wa[q],yt=Ma[M.pointerType]||M.pointerType,Zt=yt==rt,ne=$(A,M.pointerId,"pointerId");et&Ot&&(M.button===0||Zt)?ne<0&&(A.push(M),ne=A.length-1):et&(St|Lt)&&(z=!0),!(ne<0)&&(A[ne]=M,this.callback(this.manager,et,{pointers:A,changedPointers:[M],pointerType:yt,srcEvent:M}),z&&A.splice(ne,1))}});var Pa={touchstart:Ot,touchmove:Bt,touchend:St,touchcancel:Lt},Ea="touchstart",Na="touchstart touchmove touchend touchcancel";function zr(){this.evTarget=Ea,this.evWin=Na,this.started=!1,Vt.apply(this,arguments)}v(zr,Vt,{handler:function(M){var A=Pa[M.type];if(A===Ot&&(this.started=!0),!!this.started){var z=Ca.call(this,M,A);A&(St|Lt)&&z[0].length-z[1].length===0&&(this.started=!1),this.callback(this.manager,A,{pointers:z[0],changedPointers:z[1],pointerType:rt,srcEvent:M})}}});function Ca(_,M){var A=X(_.touches),z=X(_.changedTouches);return M&(St|Lt)&&(A=bt(A.concat(z),"identifier")),[A,z]}var ka={touchstart:Ot,touchmove:Bt,touchend:St,touchcancel:Lt},Oa="touchstart touchmove touchend touchcancel";function $n(){this.evTarget=Oa,this.targetIds={},Vt.apply(this,arguments)}v($n,Vt,{handler:function(M){var A=ka[M.type],z=Aa.call(this,M,A);z&&this.callback(this.manager,A,{pointers:z[0],changedPointers:z[1],pointerType:rt,srcEvent:M})}});function Aa(_,M){var A=X(_.touches),z=this.targetIds;if(M&(Ot|Bt)&&A.length===1)return z[A[0].identifier]=!0,[A,A];var q,et,yt=X(_.changedTouches),Zt=[],ne=this.target;if(et=A.filter(function(ae){return H(ae.target,ne)}),M===Ot)for(q=0;q<et.length;)z[et[q].identifier]=!0,q++;for(q=0;q<yt.length;)z[yt[q].identifier]&&Zt.push(yt[q]),M&(St|Lt)&&delete z[yt[q].identifier],q++;if(Zt.length)return[bt(et.concat(Zt),"identifier"),Zt]}var Ur=2500,Ws=25;function Hr(){Vt.apply(this,arguments);var _=C(this.handler,this);this.touch=new $n(this.manager,_),this.mouse=new Zi(this.manager,_),this.primaryTouch=null,this.lastTouches=[]}v(Hr,Vt,{handler:function(M,A,z){var q=z.pointerType==rt,et=z.pointerType==tt;if(!(et&&z.sourceCapabilities&&z.sourceCapabilities.firesTouchEvents)){if(q)Ia.call(this,A,z);else if(et&&Da.call(this,z))return;this.callback(M,A,z)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ia(_,M){_&Ot?(this.primaryTouch=M.changedPointers[0].identifier,zs.call(this,M)):_&(St|Lt)&&zs.call(this,M)}function zs(_){var M=_.changedPointers[0];if(M.identifier===this.primaryTouch){var A={x:M.clientX,y:M.clientY};this.lastTouches.push(A);var z=this.lastTouches,q=function(){var et=z.indexOf(A);et>-1&&z.splice(et,1)};setTimeout(q,Ur)}}function Da(_){for(var M=_.srcEvent.clientX,A=_.srcEvent.clientY,z=0;z<this.lastTouches.length;z++){var q=this.lastTouches[z],et=Math.abs(M-q.x),yt=Math.abs(A-q.y);if(et<=Ws&&yt<=Ws)return!0}return!1}var Us=dt(l.style,"touchAction"),Hs=Us!==i,Vs="compute",Vr="auto",Gr="manipulation",Mn="none",yi="pan-x",vi="pan-y",Ji=Ra();function jr(_,M){this.manager=_,this.set(M)}jr.prototype={set:function(_){_==Vs&&(_=this.compute()),Hs&&this.manager.element.style&&Ji[_]&&(this.manager.element.style[Us]=_),this.actions=_.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var _=[];return S(this.manager.recognizers,function(M){w(M.options.enable,[M])&&(_=_.concat(M.getTouchAction()))}),Qi(_.join(" "))},preventDefaults:function(_){var M=_.srcEvent,A=_.offsetDirection;if(this.manager.session.prevented){M.preventDefault();return}var z=this.actions,q=Z(z,Mn)&&!Ji[Mn],et=Z(z,vi)&&!Ji[vi],yt=Z(z,yi)&&!Ji[yi];if(q){var Zt=_.pointers.length===1,ne=_.distance<2,ae=_.deltaTime<250;if(Zt&&ne&&ae)return}if(!(yt&&et)&&(q||et&&A&Ve||yt&&A&fe))return this.preventSrc(M)},preventSrc:function(_){this.manager.session.prevented=!0,_.preventDefault()}};function Qi(_){if(Z(_,Mn))return Mn;var M=Z(_,yi),A=Z(_,vi);return M&&A?Mn:M||A?M?yi:vi:Z(_,Gr)?Gr:Vr}function Ra(){if(!Hs)return!1;var _={},M=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(A){_[A]=M?t.CSS.supports("touch-action",A):!0}),_}var Pn=1,we=2,Yn=4,dn=8,Ge=dn,Xn=16,De=32;function sn(_){this.options=E({},this.defaults,_||{}),this.id=wt(),this.manager=null,this.options.enable=O(this.options.enable,!0),this.state=Pn,this.simultaneous={},this.requireFail=[]}sn.prototype={defaults:{},set:function(_){return E(this.options,_),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(_){if(p(_,"recognizeWith",this))return this;var M=this.simultaneous;return _=tr(_,this),M[_.id]||(M[_.id]=_,_.recognizeWith(this)),this},dropRecognizeWith:function(_){return p(_,"dropRecognizeWith",this)?this:(_=tr(_,this),delete this.simultaneous[_.id],this)},requireFailure:function(_){if(p(_,"requireFailure",this))return this;var M=this.requireFail;return _=tr(_,this),$(M,_)===-1&&(M.push(_),_.requireFailure(this)),this},dropRequireFailure:function(_){if(p(_,"dropRequireFailure",this))return this;_=tr(_,this);var M=$(this.requireFail,_);return M>-1&&this.requireFail.splice(M,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(_){return!!this.simultaneous[_.id]},emit:function(_){var M=this,A=this.state;function z(q){M.manager.emit(q,_)}A<dn&&z(M.options.event+Gs(A)),z(M.options.event),_.additionalEvent&&z(_.additionalEvent),A>=dn&&z(M.options.event+Gs(A))},tryEmit:function(_){if(this.canEmit())return this.emit(_);this.state=De},canEmit:function(){for(var _=0;_<this.requireFail.length;){if(!(this.requireFail[_].state&(De|Pn)))return!1;_++}return!0},recognize:function(_){var M=E({},_);if(!w(this.options.enable,[this,M])){this.reset(),this.state=De;return}this.state&(Ge|Xn|De)&&(this.state=Pn),this.state=this.process(M),this.state&(we|Yn|dn|Xn)&&this.tryEmit(M)},process:function(_){},getTouchAction:function(){},reset:function(){}};function Gs(_){return _&Xn?"cancel":_&dn?"end":_&Yn?"move":_&we?"start":""}function js(_){return _==rn?"down":_==ue?"up":_==ee?"left":_==Gn?"right":""}function tr(_,M){var A=M.manager;return A?A.get(_):_}function Me(){sn.apply(this,arguments)}v(Me,sn,{defaults:{pointers:1},attrTest:function(_){var M=this.options.pointers;return M===0||_.pointers.length===M},process:function(_){var M=this.state,A=_.eventType,z=M&(we|Yn),q=this.attrTest(_);return z&&(A&Lt||!q)?M|Xn:z||q?A&St?M|dn:M&we?M|Yn:we:De}});function Si(){Me.apply(this,arguments),this.pX=null,this.pY=null}v(Si,Me,{defaults:{event:"pan",threshold:10,pointers:1,direction:Or},getTouchAction:function(){var _=this.options.direction,M=[];return _&Ve&&M.push(vi),_&fe&&M.push(yi),M},directionTest:function(_){var M=this.options,A=!0,z=_.distance,q=_.direction,et=_.deltaX,yt=_.deltaY;return q&M.direction||(M.direction&Ve?(q=et===0?ye:et<0?ee:Gn,A=et!=this.pX,z=Math.abs(_.deltaX)):(q=yt===0?ye:yt<0?ue:rn,A=yt!=this.pY,z=Math.abs(_.deltaY))),_.direction=q,A&&z>M.threshold&&q&M.direction},attrTest:function(_){return Me.prototype.attrTest.call(this,_)&&(this.state&we||!(this.state&we)&&this.directionTest(_))},emit:function(_){this.pX=_.deltaX,this.pY=_.deltaY;var M=js(_.direction);M&&(_.additionalEvent=this.options.event+M),this._super.emit.call(this,_)}});function er(){Me.apply(this,arguments)}v(er,Me,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Mn]},attrTest:function(_){return this._super.attrTest.call(this,_)&&(Math.abs(_.scale-1)>this.options.threshold||this.state&we)},emit:function(_){if(_.scale!==1){var M=_.scale<1?"in":"out";_.additionalEvent=this.options.event+M}this._super.emit.call(this,_)}});function xi(){sn.apply(this,arguments),this._timer=null,this._input=null}v(xi,sn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Vr]},process:function(_){var M=this.options,A=_.pointers.length===M.pointers,z=_.distance<M.threshold,q=_.deltaTime>M.time;if(this._input=_,!z||!A||_.eventType&(St|Lt)&&!q)this.reset();else if(_.eventType&Ot)this.reset(),this._timer=m(function(){this.state=Ge,this.tryEmit()},M.time,this);else if(_.eventType&St)return Ge;return De},reset:function(){clearTimeout(this._timer)},emit:function(_){this.state===Ge&&(_&&_.eventType&St?this.manager.emit(this.options.event+"up",_):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function Kr(){Me.apply(this,arguments)}v(Kr,Me,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Mn]},attrTest:function(_){return this._super.attrTest.call(this,_)&&(Math.abs(_.rotation)>this.options.threshold||this.state&we)}});function nr(){Me.apply(this,arguments)}v(nr,Me,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ve|fe,pointers:1},getTouchAction:function(){return Si.prototype.getTouchAction.call(this)},attrTest:function(_){var M=this.options.direction,A;return M&(Ve|fe)?A=_.overallVelocity:M&Ve?A=_.overallVelocityX:M&fe&&(A=_.overallVelocityY),this._super.attrTest.call(this,_)&&M&_.offsetDirection&&_.distance>this.options.threshold&&_.maxPointers==this.options.pointers&&h(A)>this.options.velocity&&_.eventType&St},emit:function(_){var M=js(_.offsetDirection);M&&this.manager.emit(this.options.event+M,_),this.manager.emit(this.options.event,_)}});function En(){sn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}v(En,sn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Gr]},process:function(_){var M=this.options,A=_.pointers.length===M.pointers,z=_.distance<M.threshold,q=_.deltaTime<M.time;if(this.reset(),_.eventType&Ot&&this.count===0)return this.failTimeout();if(z&&q&&A){if(_.eventType!=St)return this.failTimeout();var et=this.pTime?_.timeStamp-this.pTime<M.interval:!0,yt=!this.pCenter||Kn(this.pCenter,_.center)<M.posThreshold;this.pTime=_.timeStamp,this.pCenter=_.center,!yt||!et?this.count=1:this.count+=1,this._input=_;var Zt=this.count%M.taps;if(Zt===0)return this.hasRequireFailures()?(this._timer=m(function(){this.state=Ge,this.tryEmit()},M.interval,this),we):Ge}return De},failTimeout:function(){return this._timer=m(function(){this.state=De},this.options.interval,this),De},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Ge&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function on(_,M){return M=M||{},M.recognizers=O(M.recognizers,on.defaults.preset),new ir(_,M)}on.VERSION="2.0.7",on.defaults={domEvents:!1,touchAction:Vs,enable:!0,inputTarget:null,inputClass:null,preset:[[Kr,{enable:!1}],[er,{enable:!1},["rotate"]],[nr,{direction:Ve}],[Si,{direction:Ve},["swipe"]],[En],[En,{event:"doubletap",taps:2},["tap"]],[xi]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var La=1,$r=2;function ir(_,M){this.options=E({},on.defaults,M||{}),this.options.inputTarget=this.options.inputTarget||_,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=_,this.input=pi(this),this.touchAction=new jr(this,this.options.touchAction),rr(this,!0),S(this.options.recognizers,function(A){var z=this.add(new A[0](A[1]));A[2]&&z.recognizeWith(A[2]),A[3]&&z.requireFailure(A[3])},this)}ir.prototype={set:function(_){return E(this.options,_),_.touchAction&&this.touchAction.update(),_.inputTarget&&(this.input.destroy(),this.input.target=_.inputTarget,this.input.init()),this},stop:function(_){this.session.stopped=_?$r:La},recognize:function(_){var M=this.session;if(!M.stopped){this.touchAction.preventDefaults(_);var A,z=this.recognizers,q=M.curRecognizer;(!q||q&&q.state&Ge)&&(q=M.curRecognizer=null);for(var et=0;et<z.length;)A=z[et],M.stopped!==$r&&(!q||A==q||A.canRecognizeWith(q))?A.recognize(_):A.reset(),!q&&A.state&(we|Yn|dn)&&(q=M.curRecognizer=A),et++}},get:function(_){if(_ instanceof sn)return _;for(var M=this.recognizers,A=0;A<M.length;A++)if(M[A].options.event==_)return M[A];return null},add:function(_){if(p(_,"add",this))return this;var M=this.get(_.options.event);return M&&this.remove(M),this.recognizers.push(_),_.manager=this,this.touchAction.update(),_},remove:function(_){if(p(_,"remove",this))return this;if(_=this.get(_),_){var M=this.recognizers,A=$(M,_);A!==-1&&(M.splice(A,1),this.touchAction.update())}return this},on:function(_,M){if(_!==i&&M!==i){var A=this.handlers;return S(it(_),function(z){A[z]=A[z]||[],A[z].push(M)}),this}},off:function(_,M){if(_!==i){var A=this.handlers;return S(it(_),function(z){M?A[z]&&A[z].splice($(A[z],M),1):delete A[z]}),this}},emit:function(_,M){this.options.domEvents&&Fa(_,M);var A=this.handlers[_]&&this.handlers[_].slice();if(!(!A||!A.length)){M.type=_,M.preventDefault=function(){M.srcEvent.preventDefault()};for(var z=0;z<A.length;)A[z](M),z++}},destroy:function(){this.element&&rr(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function rr(_,M){var A=_.element;if(A.style){var z;S(_.options.cssProps,function(q,et){z=dt(A.style,et),M?(_.oldCssProps[z]=A.style[z],A.style[z]=q):A.style[z]=_.oldCssProps[z]||""}),M||(_.oldCssProps={})}}function Fa(_,M){var A=n.createEvent("Event");A.initEvent(_,!0,!0),A.gesture=M,M.target.dispatchEvent(A)}E(on,{INPUT_START:Ot,INPUT_MOVE:Bt,INPUT_END:St,INPUT_CANCEL:Lt,STATE_POSSIBLE:Pn,STATE_BEGAN:we,STATE_CHANGED:Yn,STATE_ENDED:dn,STATE_RECOGNIZED:Ge,STATE_CANCELLED:Xn,STATE_FAILED:De,DIRECTION_NONE:ye,DIRECTION_LEFT:ee,DIRECTION_RIGHT:Gn,DIRECTION_UP:ue,DIRECTION_DOWN:rn,DIRECTION_HORIZONTAL:Ve,DIRECTION_VERTICAL:fe,DIRECTION_ALL:Or,Manager:ir,Input:Vt,TouchAction:jr,TouchInput:$n,MouseInput:Zi,PointerEventInput:Wr,TouchMouseInput:Hr,SingleTouchInput:zr,Recognizer:sn,AttrRecognizer:Me,Tap:En,Pan:Si,Swipe:nr,Pinch:er,Rotate:Kr,Press:xi,on:B,off:F,each:S,merge:y,extend:I,assign:E,inherit:v,bindFn:C,prefixed:dt});var Ks=typeof t<"u"?t:typeof self<"u"?self:{};Ks.Hammer=on,e.exports?e.exports=on:t[r]=on})(window,document,"Hammer")})(nm);var lM=nm.exports;const ws=sg(lM);/*!
25
- * chartjs-plugin-zoom v2.2.0
26
- * https://www.chartjs.org/chartjs-plugin-zoom/2.2.0/
27
- * (c) 2016-2024 chartjs-plugin-zoom Contributors
28
- * Released under the MIT License
29
- */const Ds=e=>e&&e.enabled&&e.modifierKey,im=(e,t)=>e&&t[e+"Key"],Yc=(e,t)=>e&&!t[e+"Key"];function di(e,t,n){return e===void 0?!0:typeof e=="string"?e.indexOf(t)!==-1:typeof e=="function"?e({chart:n}).indexOf(t)!==-1:!1}function ic(e,t){return typeof e=="function"&&(e=e({chart:t})),typeof e=="string"?{x:e.indexOf("x")!==-1,y:e.indexOf("y")!==-1}:{x:!1,y:!1}}function cM(e,t){let n;return function(){return clearTimeout(n),n=setTimeout(e,t),t}}function uM({x:e,y:t},n){const r=n.scales,i=Object.keys(r);for(let o=0;o<i.length;o++){const l=r[i[o]];if(t>=l.top&&t<=l.bottom&&e>=l.left&&e<=l.right)return l}return null}function rm(e,t,n){const{mode:r="xy",scaleMode:i,overScaleMode:o}=e||{},l=uM(t,n),c=ic(r,n),f=ic(i,n);if(o){const d=ic(o,n);for(const m of["x","y"])d[m]&&(f[m]=c[m],c[m]=!1)}if(l&&f[l.axis])return[l];const h=[];return Tt(n.scales,function(d){c[d.axis]&&h.push(d)}),h}const Tc=new WeakMap;function Yt(e){let t=Tc.get(e);return t||(t={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},Tc.set(e,t)),t}function fM(e){Tc.delete(e)}function sm(e,t,n,r){const i=Math.max(0,Math.min(1,(e-t)/n||0)),o=1-i;return{min:r*i,max:r*o}}function om(e,t){const n=e.isHorizontal()?t.x:t.y;return e.getValueForPixel(n)}function am(e,t,n){const r=e.max-e.min,i=r*(t-1),o=om(e,n);return sm(o,e.min,r,i)}function hM(e,t,n){const r=om(e,n);if(r===void 0)return{min:e.min,max:e.max};const i=Math.log10(e.min),o=Math.log10(e.max),l=Math.log10(r),c=o-i,f=c*(t-1),h=sm(l,i,c,f);return{min:Math.pow(10,i+h.min),max:Math.pow(10,o-h.max)}}function dM(e,t){return t&&(t[e.id]||t[e.axis])||{}}function Id(e,t,n,r,i){let o=n[r];if(o==="original"){const l=e.originalScaleLimits[t.id][r];o=pt(l.options,l.scale)}return pt(o,i)}function gM(e,t,n){const r=e.getValueForPixel(t),i=e.getValueForPixel(n);return{min:Math.min(r,i),max:Math.max(r,i)}}function mM(e,{min:t,max:n,minLimit:r,maxLimit:i},o){const l=(e-n+t)/2;t-=l,n+=l;const c=o.min.options??o.min.scale,f=o.max.options??o.max.scale,h=e/1e6;return zi(t,c,h)&&(t=c),zi(n,f,h)&&(n=f),t<r?(t=r,n=Math.min(r+e,i)):n>i&&(n=i,t=Math.max(i-e,r)),{min:t,max:n}}function Ki(e,{min:t,max:n},r,i=!1){const o=Yt(e.chart),{options:l}=e,c=dM(e,r),{minRange:f=0}=c,h=Id(o,e,c,"min",-1/0),d=Id(o,e,c,"max",1/0);if(i==="pan"&&(t<h||n>d))return!0;const m=e.max-e.min,p=i?Math.max(n-t,f):m;if(i&&p===f&&m<=f)return!0;const S=mM(p,{min:t,max:n,minLimit:h,maxLimit:d},o.originalScaleLimits[e.id]);return l.min=S.min,l.max=S.max,o.updatedScaleLimits[e.id]=S,e.parse(S.min)!==e.min||e.parse(S.max)!==e.max}function pM(e,t,n,r){const i=am(e,t,n),o={min:e.min+i.min,max:e.max-i.max};return Ki(e,o,r,!0)}function bM(e,t,n,r){const i=hM(e,t,n);return Ki(e,i,r,!0)}function _M(e,t,n,r){Ki(e,gM(e,t,n),r,!0)}const Dd=e=>e===0||isNaN(e)?0:e<0?Math.min(Math.round(e),-1):Math.max(Math.round(e),1);function yM(e){const n=e.getLabels().length-1;e.min>0&&(e.min-=1),e.max<n&&(e.max+=1)}function vM(e,t,n,r){const i=am(e,t,n);e.min===e.max&&t<1&&yM(e);const o={min:e.min+Dd(i.min),max:e.max-Dd(i.max)};return Ki(e,o,r,!0)}function SM(e){return e.isHorizontal()?e.width:e.height}function xM(e,t,n){const i=e.getLabels().length-1;let{min:o,max:l}=e;const c=Math.max(l-o,1),f=Math.round(SM(e)/Math.max(c,10)),h=Math.round(Math.abs(t/f));let d;return t<-f?(l=Math.min(l+h,i),o=c===1?l:l-c,d=l===i):t>f&&(o=Math.max(0,o-h),l=c===1?o:o+c,d=o===0),Ki(e,{min:o,max:l},n)||d}const TM={second:500,minute:30*1e3,hour:30*60*1e3,day:12*60*60*1e3,week:3.5*24*60*60*1e3,month:15*24*60*60*1e3,quarter:60*24*60*60*1e3,year:182*24*60*60*1e3};function lm(e,t,n,r=!1){const{min:i,max:o,options:l}=e,c=l.time&&l.time.round,f=TM[c]||0,h=e.getValueForPixel(e.getPixelForValue(i+f)-t),d=e.getValueForPixel(e.getPixelForValue(o+f)-t);return isNaN(h)||isNaN(d)?!0:Ki(e,{min:h,max:d},n,r?"pan":!1)}function Rd(e,t,n){return lm(e,t,n,!0)}const wc={category:vM,default:pM,logarithmic:bM},Mc={default:_M},Pc={category:xM,default:lm,logarithmic:Rd,timeseries:Rd};function wM(e,t,n){const{id:r,options:{min:i,max:o}}=e;if(!t[r]||!n[r])return!0;const l=n[r];return l.min!==i||l.max!==o}function Ld(e,t){Tt(e,(n,r)=>{t[r]||delete e[r]})}function Cr(e,t){const{scales:n}=e,{originalScaleLimits:r,updatedScaleLimits:i}=t;return Tt(n,function(o){wM(o,r,i)&&(r[o.id]={min:{scale:o.min,options:o.options.min},max:{scale:o.max,options:o.options.max}})}),Ld(r,n),Ld(i,n),r}function Fd(e,t,n,r){const i=wc[e.type]||wc.default;ut(i,[e,t,n,r])}function Bd(e,t,n,r){const i=Mc[e.type]||Mc.default;ut(i,[e,t,n,r])}function MM(e){const t=e.chartArea;return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function Xc(e,t,n="none",r="api"){const{x:i=1,y:o=1,focalPoint:l=MM(e)}=typeof t=="number"?{x:t,y:t}:t,c=Yt(e),{options:{limits:f,zoom:h}}=c;Cr(e,c);const d=i!==1,m=o!==1,p=rm(h,l,e);Tt(p||e.scales,function(S){S.isHorizontal()&&d?Fd(S,i,l,f):!S.isHorizontal()&&m&&Fd(S,o,l,f)}),e.update(n),ut(h.onZoom,[{chart:e,trigger:r}])}function cm(e,t,n,r="none",i="api"){const o=Yt(e),{options:{limits:l,zoom:c}}=o,{mode:f="xy"}=c;Cr(e,o);const h=di(f,"x",e),d=di(f,"y",e);Tt(e.scales,function(m){m.isHorizontal()&&h?Bd(m,t.x,n.x,l):!m.isHorizontal()&&d&&Bd(m,t.y,n.y,l)}),e.update(r),ut(c.onZoom,[{chart:e,trigger:i}])}function PM(e,t,n,r="none",i="api"){var c;const o=Yt(e);Cr(e,o);const l=e.scales[t];Ki(l,n,void 0,!0),e.update(r),ut((c=o.options.zoom)==null?void 0:c.onZoom,[{chart:e,trigger:i}])}function EM(e,t="default"){const n=Yt(e),r=Cr(e,n);Tt(e.scales,function(i){const o=i.options;r[i.id]?(o.min=r[i.id].min.options,o.max=r[i.id].max.options):(delete o.min,delete o.max),delete n.updatedScaleLimits[i.id]}),e.update(t),ut(n.options.zoom.onZoomComplete,[{chart:e}])}function NM(e,t){const n=e.originalScaleLimits[t];if(!n)return;const{min:r,max:i}=n;return pt(i.options,i.scale)-pt(r.options,r.scale)}function CM(e){const t=Yt(e);let n=1,r=1;return Tt(e.scales,function(i){const o=NM(t,i.id);if(o){const l=Math.round(o/(i.max-i.min)*100)/100;n=Math.min(n,l),r=Math.max(r,l)}}),n<1?n:r}function Wd(e,t,n,r){const{panDelta:i}=r,o=i[e.id]||0;nn(o)===nn(t)&&(t+=o);const l=Pc[e.type]||Pc.default;ut(l,[e,t,n])?i[e.id]=0:i[e.id]=t}function um(e,t,n,r="none"){const{x:i=0,y:o=0}=typeof t=="number"?{x:t,y:t}:t,l=Yt(e),{options:{pan:c,limits:f}}=l,{onPan:h}=c||{};Cr(e,l);const d=i!==0,m=o!==0;Tt(n||e.scales,function(p){p.isHorizontal()&&d?Wd(p,i,f,l):!p.isHorizontal()&&m&&Wd(p,o,f,l)}),e.update(r),ut(h,[{chart:e}])}function fm(e){const t=Yt(e);Cr(e,t);const n={};for(const r of Object.keys(e.scales)){const{min:i,max:o}=t.originalScaleLimits[r]||{min:{},max:{}};n[r]={min:i.scale,max:o.scale}}return n}function kM(e){const t=Yt(e),n={};for(const r of Object.keys(e.scales))n[r]=t.updatedScaleLimits[r];return n}function OM(e){const t=fm(e);for(const n of Object.keys(e.scales)){const{min:r,max:i}=t[n];if(r!==void 0&&e.scales[n].min!==r||i!==void 0&&e.scales[n].max!==i)return!0}return!1}function zd(e){const t=Yt(e);return t.panning||t.dragging}const Ud=(e,t,n)=>Math.min(n,Math.max(t,e));function Ae(e,t){const{handlers:n}=Yt(e),r=n[t];r&&r.target&&(r.target.removeEventListener(t,r),delete n[t])}function Ms(e,t,n,r){const{handlers:i,options:o}=Yt(e),l=i[n];if(l&&l.target===t)return;Ae(e,n),i[n]=f=>r(e,f,o),i[n].target=t;const c=n==="wheel"?!1:void 0;t.addEventListener(n,i[n],{passive:c})}function AM(e,t){const n=Yt(e);n.dragStart&&(n.dragging=!0,n.dragEnd=t,e.update("none"))}function IM(e,t){const n=Yt(e);!n.dragStart||t.key!=="Escape"||(Ae(e,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,e.update("none"))}function Ec(e,t){if(e.target!==t.canvas){const n=t.canvas.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}return vn(e,t)}function hm(e,t,n){const{onZoomStart:r,onZoomRejected:i}=n;if(r){const o=Ec(t,e);if(ut(r,[{chart:e,event:t,point:o}])===!1)return ut(i,[{chart:e,event:t}]),!1}}function DM(e,t){if(e.legend){const o=vn(t,e);if(Mr(o,e.legend))return}const n=Yt(e),{pan:r,zoom:i={}}=n.options;if(t.button!==0||im(Ds(r),t)||Yc(Ds(i.drag),t))return ut(i.onZoomRejected,[{chart:e,event:t}]);hm(e,t,i)!==!1&&(n.dragStart=t,Ms(e,e.canvas.ownerDocument,"mousemove",AM),Ms(e,window.document,"keydown",IM))}function RM({begin:e,end:t},n){let r=t.x-e.x,i=t.y-e.y;const o=Math.abs(r/i);o>n?r=Math.sign(r)*Math.abs(i*n):o<n&&(i=Math.sign(i)*Math.abs(r/n)),t.x=e.x+r,t.y=e.y+i}function Hd(e,t,n,{min:r,max:i,prop:o}){e[r]=Ud(Math.min(n.begin[o],n.end[o]),t[r],t[i]),e[i]=Ud(Math.max(n.begin[o],n.end[o]),t[r],t[i])}function LM(e,t,n){const r={begin:Ec(t.dragStart,e),end:Ec(t.dragEnd,e)};if(n){const i=e.chartArea.width/e.chartArea.height;RM(r,i)}return r}function dm(e,t,n,r){const i=di(t,"x",e),o=di(t,"y",e),{top:l,left:c,right:f,bottom:h,width:d,height:m}=e.chartArea,p={top:l,left:c,right:f,bottom:h},S=LM(e,n,r&&i&&o);i&&Hd(p,e.chartArea,S,{min:"left",max:"right",prop:"x"}),o&&Hd(p,e.chartArea,S,{min:"top",max:"bottom",prop:"y"});const P=p.right-p.left,E=p.bottom-p.top;return{...p,width:P,height:E,zoomX:i&&P?1+(d-P)/d:1,zoomY:o&&E?1+(m-E)/m:1}}function FM(e,t){const n=Yt(e);if(!n.dragStart)return;Ae(e,"mousemove");const{mode:r,onZoomComplete:i,drag:{threshold:o=0,maintainAspectRatio:l}}=n.options.zoom,c=dm(e,r,{dragStart:n.dragStart,dragEnd:t},l),f=di(r,"x",e)?c.width:0,h=di(r,"y",e)?c.height:0,d=Math.sqrt(f*f+h*h);if(n.dragStart=n.dragEnd=null,d<=o){n.dragging=!1,e.update("none");return}cm(e,{x:c.left,y:c.top},{x:c.right,y:c.bottom},"zoom","drag"),n.dragging=!1,n.filterNextClick=!0,ut(i,[{chart:e}])}function BM(e,t,n){if(Yc(Ds(n.wheel),t)){ut(n.onZoomRejected,[{chart:e,event:t}]);return}if(hm(e,t,n)!==!1&&(t.cancelable&&t.preventDefault(),t.deltaY!==void 0))return!0}function WM(e,t){const{handlers:{onZoomComplete:n},options:{zoom:r}}=Yt(e);if(!BM(e,t,r))return;const i=t.target.getBoundingClientRect(),o=r.wheel.speed,l=t.deltaY>=0?2-1/(1-o):1+o,c={x:l,y:l,focalPoint:{x:t.clientX-i.left,y:t.clientY-i.top}};Xc(e,c,"zoom","wheel"),ut(n,[{chart:e}])}function zM(e,t,n,r){n&&(Yt(e).handlers[t]=cM(()=>ut(n,[{chart:e}]),r))}function UM(e,t){const n=e.canvas,{wheel:r,drag:i,onZoomComplete:o}=t.zoom;r.enabled?(Ms(e,n,"wheel",WM),zM(e,"onZoomComplete",o,250)):Ae(e,"wheel"),i.enabled?(Ms(e,n,"mousedown",DM),Ms(e,n.ownerDocument,"mouseup",FM)):(Ae(e,"mousedown"),Ae(e,"mousemove"),Ae(e,"mouseup"),Ae(e,"keydown"))}function HM(e){Ae(e,"mousedown"),Ae(e,"mousemove"),Ae(e,"mouseup"),Ae(e,"wheel"),Ae(e,"click"),Ae(e,"keydown")}function VM(e,t){return function(n,r){const{pan:i,zoom:o={}}=t.options;if(!i||!i.enabled)return!1;const l=r&&r.srcEvent;return l&&!t.panning&&r.pointerType==="mouse"&&(Yc(Ds(i),l)||im(Ds(o.drag),l))?(ut(i.onPanRejected,[{chart:e,event:r}]),!1):!0}}function GM(e,t){const n=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY),i=n/r;let o,l;return i>.3&&i<1.7?o=l=!0:n>r?o=!0:l=!0,{x:o,y:l}}function gm(e,t,n){if(t.scale){const{center:r,pointers:i}=n,o=1/t.scale*n.scale,l=n.target.getBoundingClientRect(),c=GM(i[0],i[1]),f=t.options.zoom.mode,h={x:c.x&&di(f,"x",e)?o:1,y:c.y&&di(f,"y",e)?o:1,focalPoint:{x:r.x-l.left,y:r.y-l.top}};Xc(e,h,"zoom","pinch"),t.scale=n.scale}}function jM(e,t,n){if(t.options.zoom.pinch.enabled){const r=vn(n,e);ut(t.options.zoom.onZoomStart,[{chart:e,event:n,point:r}])===!1?(t.scale=null,ut(t.options.zoom.onZoomRejected,[{chart:e,event:n}])):t.scale=1}}function KM(e,t,n){t.scale&&(gm(e,t,n),t.scale=null,ut(t.options.zoom.onZoomComplete,[{chart:e}]))}function mm(e,t,n){const r=t.delta;r&&(t.panning=!0,um(e,{x:n.deltaX-r.x,y:n.deltaY-r.y},t.panScales),t.delta={x:n.deltaX,y:n.deltaY})}function $M(e,t,n){const{enabled:r,onPanStart:i,onPanRejected:o}=t.options.pan;if(!r)return;const l=n.target.getBoundingClientRect(),c={x:n.center.x-l.left,y:n.center.y-l.top};if(ut(i,[{chart:e,event:n,point:c}])===!1)return ut(o,[{chart:e,event:n}]);t.panScales=rm(t.options.pan,c,e),t.delta={x:0,y:0},mm(e,t,n)}function YM(e,t){t.delta=null,t.panning&&(t.panning=!1,t.filterNextClick=!0,ut(t.options.pan.onPanComplete,[{chart:e}]))}const Nc=new WeakMap;function Vd(e,t){const n=Yt(e),r=e.canvas,{pan:i,zoom:o}=t,l=new ws.Manager(r);o&&o.pinch.enabled&&(l.add(new ws.Pinch),l.on("pinchstart",c=>jM(e,n,c)),l.on("pinch",c=>gm(e,n,c)),l.on("pinchend",c=>KM(e,n,c))),i&&i.enabled&&(l.add(new ws.Pan({threshold:i.threshold,enable:VM(e,n)})),l.on("panstart",c=>$M(e,n,c)),l.on("panmove",c=>mm(e,n,c)),l.on("panend",()=>YM(e,n))),Nc.set(e,l)}function Gd(e){const t=Nc.get(e);t&&(t.remove("pinchstart"),t.remove("pinch"),t.remove("pinchend"),t.remove("panstart"),t.remove("pan"),t.remove("panend"),t.destroy(),Nc.delete(e))}function XM(e,t){var l,c,f,h;const{pan:n,zoom:r}=e,{pan:i,zoom:o}=t;return((c=(l=r==null?void 0:r.zoom)==null?void 0:l.pinch)==null?void 0:c.enabled)!==((h=(f=o==null?void 0:o.zoom)==null?void 0:f.pinch)==null?void 0:h.enabled)||(n==null?void 0:n.enabled)!==(i==null?void 0:i.enabled)||(n==null?void 0:n.threshold)!==(i==null?void 0:i.threshold)}var qM="2.2.0";function Ko(e,t,n){const r=n.zoom.drag,{dragStart:i,dragEnd:o}=Yt(e);if(r.drawTime!==t||!o)return;const{left:l,top:c,width:f,height:h}=dm(e,n.zoom.mode,{dragStart:i,dragEnd:o},r.maintainAspectRatio),d=e.ctx;d.save(),d.beginPath(),d.fillStyle=r.backgroundColor||"rgba(225,225,225,0.3)",d.fillRect(l,c,f,h),r.borderWidth>0&&(d.lineWidth=r.borderWidth,d.strokeStyle=r.borderColor||"rgba(225,225,225)",d.strokeRect(l,c,f,h)),d.restore()}var AE={id:"zoom",version:qM,defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(e,t,n){const r=Yt(e);r.options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),ws&&Vd(e,n),e.pan=(i,o,l)=>um(e,i,o,l),e.zoom=(i,o)=>Xc(e,i,o),e.zoomRect=(i,o,l)=>cm(e,i,o,l),e.zoomScale=(i,o,l)=>PM(e,i,o,l),e.resetZoom=i=>EM(e,i),e.getZoomLevel=()=>CM(e),e.getInitialScaleBounds=()=>fm(e),e.getZoomedScaleBounds=()=>kM(e),e.isZoomedOrPanned=()=>OM(e),e.isZoomingOrPanning=()=>zd(e)},beforeEvent(e,{event:t}){if(zd(e))return!1;if(t.type==="click"||t.type==="mouseup"){const n=Yt(e);if(n.filterNextClick)return n.filterNextClick=!1,!1}},beforeUpdate:function(e,t,n){const r=Yt(e),i=r.options;r.options=n,XM(i,n)&&(Gd(e),Vd(e,n)),UM(e,n)},beforeDatasetsDraw(e,t,n){Ko(e,"beforeDatasetsDraw",n)},afterDatasetsDraw(e,t,n){Ko(e,"afterDatasetsDraw",n)},beforeDraw(e,t,n){Ko(e,"beforeDraw",n)},afterDraw(e,t,n){Ko(e,"afterDraw",n)},stop:function(e){HM(e),ws&&Gd(e),fM(e)},panFunctions:Pc,zoomFunctions:wc,zoomRectFunctions:Mc};/*!
30
- * chartjs-plugin-datalabels v2.2.0
31
- * https://chartjs-plugin-datalabels.netlify.app
32
- * (c) 2017-2022 chartjs-plugin-datalabels contributors
33
- * Released under the MIT license
34
- */var jd=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),Ps={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n=="string"?t.unshift.apply(t,n.split(`
35
- `)):Array.isArray(n)?e.push.apply(e,n):At(e)||t.unshift(""+n);return t},textSize:function(e,t,n){var r=[].concat(t),i=r.length,o=e.font,l=0,c;for(e.font=n.string,c=0;c<i;++c)l=Math.max(e.measureText(r[c]).width,l);return e.font=o,{height:i*n.lineHeight,width:l}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),r=[],i,o,l,c;for(i=0,l=t.length;i<l;++i)c=t[i],o=n.indexOf(c),o===-1?r.push([c,1]):n.splice(o,1);for(i=0,l=n.length;i<l;++i)r.push([n[i],-1]);return r},rasterize:function(e){return Math.round(e*jd)/jd}};function rc(e,t){var n=t.x,r=t.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var i=e.x-n,o=e.y-r,l=Math.sqrt(i*i+o*o);return{x:l?i/l:0,y:l?o/l:-1}}function ZM(e,t,n,r,i){switch(i){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return{x:e,y:t,vx:n,vy:r}}var JM=0,pm=1,bm=2,_m=4,ym=8;function $o(e,t,n){var r=JM;return e<n.left?r|=pm:e>n.right&&(r|=bm),t<n.top?r|=ym:t>n.bottom&&(r|=_m),r}function QM(e,t){for(var n=e.x0,r=e.y0,i=e.x1,o=e.y1,l=$o(n,r,t),c=$o(i,o,t),f,h,d;!(!(l|c)||l&c);)f=l||c,f&ym?(h=n+(i-n)*(t.top-r)/(o-r),d=t.top):f&_m?(h=n+(i-n)*(t.bottom-r)/(o-r),d=t.bottom):f&bm?(d=r+(o-r)*(t.right-n)/(i-n),h=t.right):f&pm&&(d=r+(o-r)*(t.left-n)/(i-n),h=t.left),f===l?(n=h,r=d,l=$o(n,r,t)):(i=h,o=d,c=$o(i,o,t));return{x0:n,x1:i,y0:r,y1:o}}function Yo(e,t){var n=t.anchor,r=e,i,o;return t.clamp&&(r=QM(r,t.area)),n==="start"?(i=r.x0,o=r.y0):n==="end"?(i=r.x1,o=r.y1):(i=(r.x0+r.x1)/2,o=(r.y0+r.y1)/2),ZM(i,o,e.vx,e.vy,t.align)}var Xo={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),o=e.innerRadius,l=e.outerRadius;return Yo({x0:e.x+r*o,y0:e.y+i*o,x1:e.x+r*l,y1:e.y+i*l,vx:r,vy:i},t)},point:function(e,t){var n=rc(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return Yo({x0:e.x-r,y0:e.y-i,x1:e.x+r,y1:e.y+i,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=rc(e,t.origin),r=e.x,i=e.y,o=0,l=0;return e.horizontal?(r=Math.min(e.x,e.base),o=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),l=Math.abs(e.base-e.y)),Yo({x0:r,y0:i+l,x1:r+o,y1:i,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=rc(e,t.origin);return Yo({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},Vn=Ps.rasterize;function tP(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,o=-i/2,l=-r/2;return{frame:{x:o-n.left-t,y:l-n.top-t,w:i+n.width+t*2,h:r+n.height+t*2},text:{x:o,y:l,w:i,h:r}}}function eP(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function nP(e){return e instanceof ys?Xo.arc:e instanceof ia?Xo.point:e instanceof ra?Xo.bar:Xo.fallback}function iP(e,t,n,r,i,o){var l=Math.PI/2;if(o){var c=Math.min(o,i/2,r/2),f=t+c,h=n+c,d=t+r-c,m=n+i-c;e.moveTo(t,h),f<d&&h<m?(e.arc(f,h,c,-Math.PI,-l),e.arc(d,h,c,-l,0),e.arc(d,m,c,0,l),e.arc(f,m,c,l,Math.PI)):f<d?(e.moveTo(f,n),e.arc(d,h,c,-l,l),e.arc(f,h,c,l,Math.PI+l)):h<m?(e.arc(f,h,c,-Math.PI,0),e.arc(f,m,c,0,Math.PI)):e.arc(f,h,c,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)}function rP(e,t,n){var r=n.backgroundColor,i=n.borderColor,o=n.borderWidth;!r&&(!i||!o)||(e.beginPath(),iP(e,Vn(t.x)+o/2,Vn(t.y)+o/2,Vn(t.w)-o,Vn(t.h)-o,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),i&&o&&(e.strokeStyle=i,e.lineWidth=o,e.lineJoin="miter",e.stroke()))}function sP(e,t,n){var r=n.lineHeight,i=e.w,o=e.x,l=e.y+r/2;return t==="center"?o+=i/2:(t==="end"||t==="right")&&(o+=i),{h:r,w:i,x:o,y:l}}function oP(e,t,n){var r=e.shadowBlur,i=n.stroked,o=Vn(n.x),l=Vn(n.y),c=Vn(n.w);i&&e.strokeText(t,o,l,c),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,o,l,c),r&&i&&(e.shadowBlur=r))}function aP(e,t,n,r){var i=r.textAlign,o=r.color,l=!!o,c=r.font,f=t.length,h=r.textStrokeColor,d=r.textStrokeWidth,m=h&&d,p;if(!(!f||!l&&!m))for(n=sP(n,i,c),e.font=c.string,e.textAlign=i,e.textBaseline="middle",e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,l&&(e.fillStyle=o),m&&(e.lineJoin="round",e.lineWidth=d,e.strokeStyle=h),p=0,f=t.length;p<f;++p)oP(e,t[p],{stroked:m,filled:l,w:n.w,x:n.x,y:n.y+n.h*p})}var vm=function(e,t,n,r){var i=this;i._config=e,i._index=r,i._model=null,i._rects=null,i._ctx=t,i._el=n};Tn(vm.prototype,{_modelize:function(e,t,n,r){var i=this,o=i._index,l=ge(jt([n.font,{}],r,o)),c=jt([n.color,zt.color],r,o);return{align:jt([n.align,"center"],r,o),anchor:jt([n.anchor,"center"],r,o),area:r.chart.chartArea,backgroundColor:jt([n.backgroundColor,null],r,o),borderColor:jt([n.borderColor,null],r,o),borderRadius:jt([n.borderRadius,0],r,o),borderWidth:jt([n.borderWidth,0],r,o),clamp:jt([n.clamp,!1],r,o),clip:jt([n.clip,!1],r,o),color:c,display:e,font:l,lines:t,offset:jt([n.offset,4],r,o),opacity:jt([n.opacity,1],r,o),origin:eP(i._el,r),padding:He(jt([n.padding,4],r,o)),positioner:nP(i._el),rotation:jt([n.rotation,0],r,o)*(Math.PI/180),size:Ps.textSize(i._ctx,t,l),textAlign:jt([n.textAlign,"start"],r,o),textShadowBlur:jt([n.textShadowBlur,0],r,o),textShadowColor:jt([n.textShadowColor,c],r,o),textStrokeColor:jt([n.textStrokeColor,c],r,o),textStrokeWidth:jt([n.textStrokeWidth,0],r,o)}},update:function(e){var t=this,n=null,r=null,i=t._index,o=t._config,l,c,f,h=jt([o.display,!0],e,i);h&&(l=e.dataset.data[i],c=pt(ut(o.formatter,[l,e]),l),f=At(c)?[]:Ps.toTextLines(c),f.length&&(n=t._modelize(h,f,o,e),r=tP(n))),t._model=n,t._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n=this,r=e.ctx,i=n._model,o=n._rects,l;this.visible()&&(r.save(),i.clip&&(l=i.area,r.beginPath(),r.rect(l.left,l.top,l.right-l.left,l.bottom-l.top),r.clip()),r.globalAlpha=Ps.bound(0,i.opacity,1),r.translate(Vn(t.x),Vn(t.y)),r.rotate(i.rotation),rP(r,o.frame,i),aP(r,i.lines,o.text,i),r.restore())}});var lP=Number.MIN_SAFE_INTEGER||-9007199254740991,cP=Number.MAX_SAFE_INTEGER||9007199254740991;function gs(e,t,n){var r=Math.cos(n),i=Math.sin(n),o=t.x,l=t.y;return{x:o+r*(e.x-o)-i*(e.y-l),y:l+i*(e.x-o)+r*(e.y-l)}}function Kd(e,t){var n=cP,r=lP,i=t.origin,o,l,c,f,h;for(o=0;o<e.length;++o)l=e[o],c=l.x-i.x,f=l.y-i.y,h=t.vx*c+t.vy*f,n=Math.min(n,h),r=Math.max(r,h);return{min:n,max:r}}function qo(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{vx:(t.x-e.x)/i,vy:(t.y-e.y)/i,origin:e,ln:i}}var Sm=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Tn(Sm.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=1,r=t._rect;return e=gs(e,t.center(),-t._rotation),!(e.x<r.x-n||e.y<r.y-n||e.x>r.x+r.w+n*2||e.y>r.y+r.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),r=[qo(t[0],t[1]),qo(t[0],t[3])],i,o,l;for(this._rotation!==e._rotation&&r.push(qo(n[0],n[1]),qo(n[0],n[3])),i=0;i<r.length;++i)if(o=Kd(t,r[i]),l=Kd(n,r[i]),o.max<l.min||l.max<o.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[gs({x:t.x,y:t.y},r,n),gs({x:t.x+t.w,y:t.y},r,n),gs({x:t.x+t.w,y:t.y+t.h},r,n),gs({x:t.x,y:t.y+t.h},r,n)]}});function xm(e,t,n){var r=t.positioner(e,t),i=r.vx,o=r.vy;if(!i&&!o)return{x:r.x,y:r.y};var l=n.w,c=n.h,f=t.rotation,h=Math.abs(l/2*Math.cos(f))+Math.abs(c/2*Math.sin(f)),d=Math.abs(l/2*Math.sin(f))+Math.abs(c/2*Math.cos(f)),m=1/Math.max(Math.abs(i),Math.abs(o));return h*=i*m,d*=o*m,h+=t.offset*i,d+=t.offset*o,{x:r.x+h,y:r.y+d}}function uP(e,t){var n,r,i,o;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)o=e[r].$layout,o._visible&&i._box.intersects(o._box)&&t(i,o);return e}function fP(e){var t,n,r,i,o,l,c;for(t=0,n=e.length;t<n;++t)r=e[t],i=r.$layout,i._visible&&(c=new Proxy(r._el,{get:(f,h)=>f.getProps([h],!0)[h]}),o=r.geometry(),l=xm(c,r.model(),o),i._box.update(l,o,r.rotation()));return uP(e,function(f,h){var d=f._hidable,m=h._hidable;d&&m||m?h._visible=!1:d&&(f._visible=!1)})}var Es={prepare:function(e){var t=[],n,r,i,o,l;for(n=0,i=e.length;n<i;++n)for(r=0,o=e[n].length;r<o;++r)l=e[n][r],t.push(l),l.$layout={_box:new Sm,_hidable:!1,_visible:!0,_set:n,_idx:l._index};return t.sort(function(c,f){var h=c.$layout,d=f.$layout;return h._idx===d._idx?d._set-h._set:d._idx-h._idx}),this.update(t),t},update:function(e){var t=!1,n,r,i,o,l;for(n=0,r=e.length;n<r;++n)i=e[n],o=i.model(),l=i.$layout,l._hidable=o&&o.display==="auto",l._visible=i.visible(),t|=l._hidable;t&&fP(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if(r=e[n].$layout,r&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,i,o,l,c;for(n=0,r=t.length;n<r;++n)i=t[n],o=i.$layout,o._visible&&(l=i.geometry(),c=xm(i._el,i.model(),l),o._box.update(c,l,i.rotation()),i.draw(e,c))}},hP=function(e){if(At(e))return null;var t=e,n,r,i;if(Pt(e))if(!At(e.label))t=e.label;else if(!At(e.r))t=e.r;else for(t="",n=Object.keys(e),i=0,r=n.length;i<r;++i)t+=(i!==0?", ":"")+n[i]+": "+e[n[i]];return""+t},dP={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:hP,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Oe="$datalabels",Tm="$default";function gP(e,t){var n=e.datalabels,r={},i=[],o,l;return n===!1?null:(n===!0&&(n={}),t=Tn({},[t,n]),o=t.labels||{},l=Object.keys(o),delete t.labels,l.length?l.forEach(function(c){o[c]&&i.push(Tn({},[t,o[c],{_key:c}]))}):i.push(t),r=i.reduce(function(c,f){return Tt(f.listeners||{},function(h,d){c[d]=c[d]||{},c[d][f._key||Tm]=h}),delete f.listeners,c},{}),{labels:i,listeners:r})}function Cc(e,t,n,r){if(t){var i=n.$context,o=n.$groups,l;t[o._set]&&(l=t[o._set][o._key],l&&ut(l,[i,r])===!0&&(e[Oe]._dirty=!0,n.update(i)))}}function mP(e,t,n,r,i){var o,l;!n&&!r||(n?r?n!==r&&(l=o=!0):l=!0:o=!0,l&&Cc(e,t.leave,n,i),o&&Cc(e,t.enter,r,i))}function pP(e,t){var n=e[Oe],r=n._listeners,i,o;if(!(!r.enter&&!r.leave)){if(t.type==="mousemove")o=Es.lookup(n._labels,t);else if(t.type!=="mouseout")return;i=n._hovered,n._hovered=o,mP(e,r,i,o,t)}}function bP(e,t){var n=e[Oe],r=n._listeners.click,i=r&&Es.lookup(n._labels,t);i&&Cc(e,r,i,t)}var IE={id:"datalabels",defaults:dP,beforeInit:function(e){e[Oe]={_actives:[]}},beforeUpdate:function(e){var t=e[Oe];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r=t.index,i=e[Oe],o=i._datasets[r]=[],l=e.isDatasetVisible(r),c=e.data.datasets[r],f=gP(c,n),h=t.meta.data||[],d=e.ctx,m,p,S,P,E,I,y,v;for(d.save(),m=0,S=h.length;m<S;++m)if(y=h[m],y[Oe]=[],l&&y&&e.getDataVisibility(m)&&!y.skip)for(p=0,P=f.labels.length;p<P;++p)E=f.labels[p],I=E._key,v=new vm(E,d,y,m),v.$groups={_set:r,_key:I||Tm},v.$context={active:!1,chart:e,dataIndex:m,dataset:c,datasetIndex:r},v.update(v.$context),y[Oe].push(v),o.push(v);d.restore(),Tn(i._listeners,f.listeners,{merger:function(C,w,O){w[C]=w[C]||{},w[C][t.index]=O[C],i._listened=!0}})},afterUpdate:function(e){e[Oe]._labels=Es.prepare(e[Oe]._datasets)},afterDatasetsDraw:function(e){Es.draw(e,e[Oe]._labels)},beforeEvent:function(e,t){if(e[Oe]._listened){var n=t.event;switch(n.type){case"mousemove":case"mouseout":pP(e,n);break;case"click":bP(e,n);break}}},afterEvent:function(e){var t=e[Oe],n=t._actives,r=t._actives=e.getActiveElements(),i=Ps.arrayDiff(n,r),o,l,c,f,h,d,m;for(o=0,l=i.length;o<l;++o)if(h=i[o],h[1])for(m=h[0].element[Oe]||[],c=0,f=m.length;c<f;++c)d=m[c],d.$context.active=h[1]===1,d.update(d.$context);(t._dirty||i.length)&&(Es.update(t._labels),e.render()),delete t._dirty}},da={exports:{}};/**
36
- * @license
37
- * Lodash <https://lodash.com/>
38
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
39
- * Released under MIT license <https://lodash.com/license>
40
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
41
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
42
- */da.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",m=1,p=2,S=4,P=1,E=2,I=1,y=2,v=4,C=8,w=16,O=32,B=64,F=128,H=256,Z=512,it=30,$="...",X=800,bt=16,dt=1,ft=2,wt=3,Ct=1/0,Ht=9007199254740991,V=17976931348623157e292,k=NaN,W=4294967295,rt=W-1,Q=W>>>1,tt=[["ary",F],["bind",I],["bindKey",y],["curry",C],["curryRight",w],["flip",Z],["partial",O],["partialRight",B],["rearg",H]],ht="[object Arguments]",Et="[object Array]",Ot="[object AsyncFunction]",Bt="[object Boolean]",St="[object Date]",Lt="[object DOMException]",ye="[object Error]",ee="[object Function]",Gn="[object GeneratorFunction]",ue="[object Map]",rn="[object Number]",Ve="[object Null]",fe="[object Object]",Or="[object Promise]",Bs="[object Proxy]",hn="[object RegExp]",Vt="[object Set]",pi="[object String]",Yi="[object Symbol]",xa="[object Undefined]",bi="[object WeakMap]",Ta="[object WeakSet]",jn="[object ArrayBuffer]",wn="[object DataView]",Xi="[object Float32Array]",qi="[object Float64Array]",Kn="[object Int8Array]",_i="[object Int16Array]",Ar="[object Int32Array]",Ir="[object Uint8Array]",Dr="[object Uint8ClampedArray]",Rr="[object Uint16Array]",Lr="[object Uint32Array]",Zi=/\b__p \+= '';/g,wa=/\b(__p \+=) '' \+/g,Ma=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fr=/&(?:amp|lt|gt|quot|#39);/g,Br=/[&<>"']/g,Wr=RegExp(Fr.source),Pa=RegExp(Br.source),Ea=/<%-([\s\S]+?)%>/g,Na=/<%([\s\S]+?)%>/g,zr=/<%=([\s\S]+?)%>/g,Ca=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ka=/^\w*$/,Oa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$n=/[\\^$.*+?()[\]{}|]/g,Aa=RegExp($n.source),Ur=/^\s+/,Ws=/\s/,Hr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ia=/\{\n\/\* \[wrapped with (.+)\] \*/,zs=/,? & /,Da=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Us=/[()=,{}\[\]\/\s]/,Hs=/\\(\\)?/g,Vs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vr=/\w*$/,Gr=/^[-+]0x[0-9a-f]+$/i,Mn=/^0b[01]+$/i,yi=/^\[object .+?Constructor\]$/,vi=/^0o[0-7]+$/i,Ji=/^(?:0|[1-9]\d*)$/,jr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qi=/($^)/,Ra=/['\n\r\u2028\u2029\\]/g,Pn="\\ud800-\\udfff",we="\\u0300-\\u036f",Yn="\\ufe20-\\ufe2f",dn="\\u20d0-\\u20ff",Ge=we+Yn+dn,Xn="\\u2700-\\u27bf",De="a-z\\xdf-\\xf6\\xf8-\\xff",sn="\\xac\\xb1\\xd7\\xf7",Gs="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",js="\\u2000-\\u206f",tr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Si="\\ufe0e\\ufe0f",er=sn+Gs+js+tr,xi="['’]",Kr="["+Pn+"]",nr="["+er+"]",En="["+Ge+"]",on="\\d+",La="["+Xn+"]",$r="["+De+"]",ir="[^"+Pn+er+on+Xn+De+Me+"]",rr="\\ud83c[\\udffb-\\udfff]",Fa="(?:"+En+"|"+rr+")",Ks="[^"+Pn+"]",_="(?:\\ud83c[\\udde6-\\uddff]){2}",M="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+Me+"]",z="\\u200d",q="(?:"+$r+"|"+ir+")",et="(?:"+A+"|"+ir+")",yt="(?:"+xi+"(?:d|ll|m|re|s|t|ve))?",Zt="(?:"+xi+"(?:D|LL|M|RE|S|T|VE))?",ne=Fa+"?",ae="["+Si+"]?",je="(?:"+z+"(?:"+[Ks,_,M].join("|")+")"+ae+ne+")*",Im="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tu=ae+ne+je,Rm="(?:"+[La,_,M].join("|")+")"+tu,Lm="(?:"+[Ks+En+"?",En,_,M,Kr].join("|")+")",Fm=RegExp(xi,"g"),Bm=RegExp(En,"g"),Ba=RegExp(rr+"(?="+rr+")|"+Lm+tu,"g"),Wm=RegExp([A+"?"+$r+"+"+yt+"(?="+[nr,A,"$"].join("|")+")",et+"+"+Zt+"(?="+[nr,A+q,"$"].join("|")+")",A+"?"+q+"+"+yt,A+"+"+Zt,Dm,Im,on,Rm].join("|"),"g"),zm=RegExp("["+z+Pn+Ge+Si+"]"),Um=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Hm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Vm=-1,Ut={};Ut[Xi]=Ut[qi]=Ut[Kn]=Ut[_i]=Ut[Ar]=Ut[Ir]=Ut[Dr]=Ut[Rr]=Ut[Lr]=!0,Ut[ht]=Ut[Et]=Ut[jn]=Ut[Bt]=Ut[wn]=Ut[St]=Ut[ye]=Ut[ee]=Ut[ue]=Ut[rn]=Ut[fe]=Ut[hn]=Ut[Vt]=Ut[pi]=Ut[bi]=!1;var Wt={};Wt[ht]=Wt[Et]=Wt[jn]=Wt[wn]=Wt[Bt]=Wt[St]=Wt[Xi]=Wt[qi]=Wt[Kn]=Wt[_i]=Wt[Ar]=Wt[ue]=Wt[rn]=Wt[fe]=Wt[hn]=Wt[Vt]=Wt[pi]=Wt[Yi]=Wt[Ir]=Wt[Dr]=Wt[Rr]=Wt[Lr]=!0,Wt[ye]=Wt[ee]=Wt[bi]=!1;var Gm={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},jm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Km={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$m={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ym=parseFloat,Xm=parseInt,eu=typeof Fi=="object"&&Fi&&Fi.Object===Object&&Fi,qm=typeof self=="object"&&self&&self.Object===Object&&self,he=eu||qm||Function("return this")(),Wa=t&&!t.nodeType&&t,Ti=Wa&&!0&&e&&!e.nodeType&&e,nu=Ti&&Ti.exports===Wa,za=nu&&eu.process,Ke=function(){try{var R=Ti&&Ti.require&&Ti.require("util").types;return R||za&&za.binding&&za.binding("util")}catch{}}(),iu=Ke&&Ke.isArrayBuffer,ru=Ke&&Ke.isDate,su=Ke&&Ke.isMap,ou=Ke&&Ke.isRegExp,au=Ke&&Ke.isSet,lu=Ke&&Ke.isTypedArray;function Re(R,G,U){switch(U.length){case 0:return R.call(G);case 1:return R.call(G,U[0]);case 2:return R.call(G,U[0],U[1]);case 3:return R.call(G,U[0],U[1],U[2])}return R.apply(G,U)}function Zm(R,G,U,st){for(var gt=-1,It=R==null?0:R.length;++gt<It;){var re=R[gt];G(st,re,U(re),R)}return st}function $e(R,G){for(var U=-1,st=R==null?0:R.length;++U<st&&G(R[U],U,R)!==!1;);return R}function Jm(R,G){for(var U=R==null?0:R.length;U--&&G(R[U],U,R)!==!1;);return R}function cu(R,G){for(var U=-1,st=R==null?0:R.length;++U<st;)if(!G(R[U],U,R))return!1;return!0}function qn(R,G){for(var U=-1,st=R==null?0:R.length,gt=0,It=[];++U<st;){var re=R[U];G(re,U,R)&&(It[gt++]=re)}return It}function $s(R,G){var U=R==null?0:R.length;return!!U&&sr(R,G,0)>-1}function Ua(R,G,U){for(var st=-1,gt=R==null?0:R.length;++st<gt;)if(U(G,R[st]))return!0;return!1}function Gt(R,G){for(var U=-1,st=R==null?0:R.length,gt=Array(st);++U<st;)gt[U]=G(R[U],U,R);return gt}function Zn(R,G){for(var U=-1,st=G.length,gt=R.length;++U<st;)R[gt+U]=G[U];return R}function Ha(R,G,U,st){var gt=-1,It=R==null?0:R.length;for(st&&It&&(U=R[++gt]);++gt<It;)U=G(U,R[gt],gt,R);return U}function Qm(R,G,U,st){var gt=R==null?0:R.length;for(st&&gt&&(U=R[--gt]);gt--;)U=G(U,R[gt],gt,R);return U}function Va(R,G){for(var U=-1,st=R==null?0:R.length;++U<st;)if(G(R[U],U,R))return!0;return!1}var tp=Ga("length");function ep(R){return R.split("")}function np(R){return R.match(Da)||[]}function uu(R,G,U){var st;return U(R,function(gt,It,re){if(G(gt,It,re))return st=It,!1}),st}function Ys(R,G,U,st){for(var gt=R.length,It=U+(st?1:-1);st?It--:++It<gt;)if(G(R[It],It,R))return It;return-1}function sr(R,G,U){return G===G?gp(R,G,U):Ys(R,fu,U)}function ip(R,G,U,st){for(var gt=U-1,It=R.length;++gt<It;)if(st(R[gt],G))return gt;return-1}function fu(R){return R!==R}function hu(R,G){var U=R==null?0:R.length;return U?Ka(R,G)/U:k}function Ga(R){return function(G){return G==null?n:G[R]}}function ja(R){return function(G){return R==null?n:R[G]}}function du(R,G,U,st,gt){return gt(R,function(It,re,Ft){U=st?(st=!1,It):G(U,It,re,Ft)}),U}function rp(R,G){var U=R.length;for(R.sort(G);U--;)R[U]=R[U].value;return R}function Ka(R,G){for(var U,st=-1,gt=R.length;++st<gt;){var It=G(R[st]);It!==n&&(U=U===n?It:U+It)}return U}function $a(R,G){for(var U=-1,st=Array(R);++U<R;)st[U]=G(U);return st}function sp(R,G){return Gt(G,function(U){return[U,R[U]]})}function gu(R){return R&&R.slice(0,_u(R)+1).replace(Ur,"")}function Le(R){return function(G){return R(G)}}function Ya(R,G){return Gt(G,function(U){return R[U]})}function Yr(R,G){return R.has(G)}function mu(R,G){for(var U=-1,st=R.length;++U<st&&sr(G,R[U],0)>-1;);return U}function pu(R,G){for(var U=R.length;U--&&sr(G,R[U],0)>-1;);return U}function op(R,G){for(var U=R.length,st=0;U--;)R[U]===G&&++st;return st}var ap=ja(Gm),lp=ja(jm);function cp(R){return"\\"+$m[R]}function up(R,G){return R==null?n:R[G]}function or(R){return zm.test(R)}function fp(R){return Um.test(R)}function hp(R){for(var G,U=[];!(G=R.next()).done;)U.push(G.value);return U}function Xa(R){var G=-1,U=Array(R.size);return R.forEach(function(st,gt){U[++G]=[gt,st]}),U}function bu(R,G){return function(U){return R(G(U))}}function Jn(R,G){for(var U=-1,st=R.length,gt=0,It=[];++U<st;){var re=R[U];(re===G||re===d)&&(R[U]=d,It[gt++]=U)}return It}function Xs(R){var G=-1,U=Array(R.size);return R.forEach(function(st){U[++G]=st}),U}function dp(R){var G=-1,U=Array(R.size);return R.forEach(function(st){U[++G]=[st,st]}),U}function gp(R,G,U){for(var st=U-1,gt=R.length;++st<gt;)if(R[st]===G)return st;return-1}function mp(R,G,U){for(var st=U+1;st--;)if(R[st]===G)return st;return st}function ar(R){return or(R)?bp(R):tp(R)}function an(R){return or(R)?_p(R):ep(R)}function _u(R){for(var G=R.length;G--&&Ws.test(R.charAt(G)););return G}var pp=ja(Km);function bp(R){for(var G=Ba.lastIndex=0;Ba.test(R);)++G;return G}function _p(R){return R.match(Ba)||[]}function yp(R){return R.match(Wm)||[]}var vp=function R(G){G=G==null?he:lr.defaults(he.Object(),G,lr.pick(he,Hm));var U=G.Array,st=G.Date,gt=G.Error,It=G.Function,re=G.Math,Ft=G.Object,qa=G.RegExp,Sp=G.String,Ye=G.TypeError,qs=U.prototype,xp=It.prototype,cr=Ft.prototype,Zs=G["__core-js_shared__"],Js=xp.toString,Rt=cr.hasOwnProperty,Tp=0,yu=function(){var s=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),Qs=cr.toString,wp=Js.call(Ft),Mp=he._,Pp=qa("^"+Js.call(Rt).replace($n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),to=nu?G.Buffer:n,Qn=G.Symbol,eo=G.Uint8Array,vu=to?to.allocUnsafe:n,no=bu(Ft.getPrototypeOf,Ft),Su=Ft.create,xu=cr.propertyIsEnumerable,io=qs.splice,Tu=Qn?Qn.isConcatSpreadable:n,Xr=Qn?Qn.iterator:n,wi=Qn?Qn.toStringTag:n,ro=function(){try{var s=Ci(Ft,"defineProperty");return s({},"",{}),s}catch{}}(),Ep=G.clearTimeout!==he.clearTimeout&&G.clearTimeout,Np=st&&st.now!==he.Date.now&&st.now,Cp=G.setTimeout!==he.setTimeout&&G.setTimeout,so=re.ceil,oo=re.floor,Za=Ft.getOwnPropertySymbols,kp=to?to.isBuffer:n,wu=G.isFinite,Op=qs.join,Ap=bu(Ft.keys,Ft),se=re.max,me=re.min,Ip=st.now,Dp=G.parseInt,Mu=re.random,Rp=qs.reverse,Ja=Ci(G,"DataView"),qr=Ci(G,"Map"),Qa=Ci(G,"Promise"),ur=Ci(G,"Set"),Zr=Ci(G,"WeakMap"),Jr=Ci(Ft,"create"),ao=Zr&&new Zr,fr={},Lp=ki(Ja),Fp=ki(qr),Bp=ki(Qa),Wp=ki(ur),zp=ki(Zr),lo=Qn?Qn.prototype:n,Qr=lo?lo.valueOf:n,Pu=lo?lo.toString:n;function x(s){if(Xt(s)&&!mt(s)&&!(s instanceof Nt)){if(s instanceof Xe)return s;if(Rt.call(s,"__wrapped__"))return Nf(s)}return new Xe(s)}var hr=function(){function s(){}return function(a){if(!Kt(a))return{};if(Su)return Su(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function co(){}function Xe(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}x.templateSettings={escape:Ea,evaluate:Na,interpolate:zr,variable:"",imports:{_:x}},x.prototype=co.prototype,x.prototype.constructor=x,Xe.prototype=hr(co.prototype),Xe.prototype.constructor=Xe;function Nt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function Up(){var s=new Nt(this.__wrapped__);return s.__actions__=Pe(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Pe(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Pe(this.__views__),s}function Hp(){if(this.__filtered__){var s=new Nt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function Vp(){var s=this.__wrapped__.value(),a=this.__dir__,u=mt(s),g=a<0,b=u?s.length:0,T=eb(0,b,this.__views__),N=T.start,D=T.end,L=D-N,j=g?D:N-1,K=this.__iteratees__,Y=K.length,J=0,ot=me(L,this.__takeCount__);if(!u||!g&&b==L&&ot==L)return qu(s,this.__actions__);var lt=[];t:for(;L--&&J<ot;){j+=a;for(var vt=-1,ct=s[j];++vt<Y;){var Mt=K[vt],kt=Mt.iteratee,We=Mt.type,xe=kt(ct);if(We==ft)ct=xe;else if(!xe){if(We==dt)continue t;break t}}lt[J++]=ct}return lt}Nt.prototype=hr(co.prototype),Nt.prototype.constructor=Nt;function Mi(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function Gp(){this.__data__=Jr?Jr(null):{},this.size=0}function jp(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function Kp(s){var a=this.__data__;if(Jr){var u=a[s];return u===f?n:u}return Rt.call(a,s)?a[s]:n}function $p(s){var a=this.__data__;return Jr?a[s]!==n:Rt.call(a,s)}function Yp(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=Jr&&a===n?f:a,this}Mi.prototype.clear=Gp,Mi.prototype.delete=jp,Mi.prototype.get=Kp,Mi.prototype.has=$p,Mi.prototype.set=Yp;function Nn(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function Xp(){this.__data__=[],this.size=0}function qp(s){var a=this.__data__,u=uo(a,s);if(u<0)return!1;var g=a.length-1;return u==g?a.pop():io.call(a,u,1),--this.size,!0}function Zp(s){var a=this.__data__,u=uo(a,s);return u<0?n:a[u][1]}function Jp(s){return uo(this.__data__,s)>-1}function Qp(s,a){var u=this.__data__,g=uo(u,s);return g<0?(++this.size,u.push([s,a])):u[g][1]=a,this}Nn.prototype.clear=Xp,Nn.prototype.delete=qp,Nn.prototype.get=Zp,Nn.prototype.has=Jp,Nn.prototype.set=Qp;function Cn(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function t0(){this.size=0,this.__data__={hash:new Mi,map:new(qr||Nn),string:new Mi}}function e0(s){var a=To(this,s).delete(s);return this.size-=a?1:0,a}function n0(s){return To(this,s).get(s)}function i0(s){return To(this,s).has(s)}function r0(s,a){var u=To(this,s),g=u.size;return u.set(s,a),this.size+=u.size==g?0:1,this}Cn.prototype.clear=t0,Cn.prototype.delete=e0,Cn.prototype.get=n0,Cn.prototype.has=i0,Cn.prototype.set=r0;function Pi(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new Cn;++a<u;)this.add(s[a])}function s0(s){return this.__data__.set(s,f),this}function o0(s){return this.__data__.has(s)}Pi.prototype.add=Pi.prototype.push=s0,Pi.prototype.has=o0;function ln(s){var a=this.__data__=new Nn(s);this.size=a.size}function a0(){this.__data__=new Nn,this.size=0}function l0(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function c0(s){return this.__data__.get(s)}function u0(s){return this.__data__.has(s)}function f0(s,a){var u=this.__data__;if(u instanceof Nn){var g=u.__data__;if(!qr||g.length<i-1)return g.push([s,a]),this.size=++u.size,this;u=this.__data__=new Cn(g)}return u.set(s,a),this.size=u.size,this}ln.prototype.clear=a0,ln.prototype.delete=l0,ln.prototype.get=c0,ln.prototype.has=u0,ln.prototype.set=f0;function Eu(s,a){var u=mt(s),g=!u&&Oi(s),b=!u&&!g&&ri(s),T=!u&&!g&&!b&&pr(s),N=u||g||b||T,D=N?$a(s.length,Sp):[],L=D.length;for(var j in s)(a||Rt.call(s,j))&&!(N&&(j=="length"||b&&(j=="offset"||j=="parent")||T&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||In(j,L)))&&D.push(j);return D}function Nu(s){var a=s.length;return a?s[ul(0,a-1)]:n}function h0(s,a){return wo(Pe(s),Ei(a,0,s.length))}function d0(s){return wo(Pe(s))}function tl(s,a,u){(u!==n&&!cn(s[a],u)||u===n&&!(a in s))&&kn(s,a,u)}function ts(s,a,u){var g=s[a];(!(Rt.call(s,a)&&cn(g,u))||u===n&&!(a in s))&&kn(s,a,u)}function uo(s,a){for(var u=s.length;u--;)if(cn(s[u][0],a))return u;return-1}function g0(s,a,u,g){return ti(s,function(b,T,N){a(g,b,u(b),N)}),g}function Cu(s,a){return s&&mn(a,le(a),s)}function m0(s,a){return s&&mn(a,Ne(a),s)}function kn(s,a,u){a=="__proto__"&&ro?ro(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function el(s,a){for(var u=-1,g=a.length,b=U(g),T=s==null;++u<g;)b[u]=T?n:Rl(s,a[u]);return b}function Ei(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function qe(s,a,u,g,b,T){var N,D=a&m,L=a&p,j=a&S;if(u&&(N=b?u(s,g,b,T):u(s)),N!==n)return N;if(!Kt(s))return s;var K=mt(s);if(K){if(N=ib(s),!D)return Pe(s,N)}else{var Y=pe(s),J=Y==ee||Y==Gn;if(ri(s))return Qu(s,D);if(Y==fe||Y==ht||J&&!b){if(N=L||J?{}:yf(s),!D)return L?K0(s,m0(N,s)):j0(s,Cu(N,s))}else{if(!Wt[Y])return b?s:{};N=rb(s,Y,D)}}T||(T=new ln);var ot=T.get(s);if(ot)return ot;T.set(s,N),Yf(s)?s.forEach(function(ct){N.add(qe(ct,a,u,ct,s,T))}):Kf(s)&&s.forEach(function(ct,Mt){N.set(Mt,qe(ct,a,u,Mt,s,T))});var lt=j?L?Sl:vl:L?Ne:le,vt=K?n:lt(s);return $e(vt||s,function(ct,Mt){vt&&(Mt=ct,ct=s[Mt]),ts(N,Mt,qe(ct,a,u,Mt,s,T))}),N}function p0(s){var a=le(s);return function(u){return ku(u,s,a)}}function ku(s,a,u){var g=u.length;if(s==null)return!g;for(s=Ft(s);g--;){var b=u[g],T=a[b],N=s[b];if(N===n&&!(b in s)||!T(N))return!1}return!0}function Ou(s,a,u){if(typeof s!="function")throw new Ye(l);return as(function(){s.apply(n,u)},a)}function es(s,a,u,g){var b=-1,T=$s,N=!0,D=s.length,L=[],j=a.length;if(!D)return L;u&&(a=Gt(a,Le(u))),g?(T=Ua,N=!1):a.length>=i&&(T=Yr,N=!1,a=new Pi(a));t:for(;++b<D;){var K=s[b],Y=u==null?K:u(K);if(K=g||K!==0?K:0,N&&Y===Y){for(var J=j;J--;)if(a[J]===Y)continue t;L.push(K)}else T(a,Y,g)||L.push(K)}return L}var ti=sf(gn),Au=sf(il,!0);function b0(s,a){var u=!0;return ti(s,function(g,b,T){return u=!!a(g,b,T),u}),u}function fo(s,a,u){for(var g=-1,b=s.length;++g<b;){var T=s[g],N=a(T);if(N!=null&&(D===n?N===N&&!Be(N):u(N,D)))var D=N,L=T}return L}function _0(s,a,u,g){var b=s.length;for(u=_t(u),u<0&&(u=-u>b?0:b+u),g=g===n||g>b?b:_t(g),g<0&&(g+=b),g=u>g?0:qf(g);u<g;)s[u++]=a;return s}function Iu(s,a){var u=[];return ti(s,function(g,b,T){a(g,b,T)&&u.push(g)}),u}function de(s,a,u,g,b){var T=-1,N=s.length;for(u||(u=ob),b||(b=[]);++T<N;){var D=s[T];a>0&&u(D)?a>1?de(D,a-1,u,g,b):Zn(b,D):g||(b[b.length]=D)}return b}var nl=of(),Du=of(!0);function gn(s,a){return s&&nl(s,a,le)}function il(s,a){return s&&Du(s,a,le)}function ho(s,a){return qn(a,function(u){return Dn(s[u])})}function Ni(s,a){a=ni(a,s);for(var u=0,g=a.length;s!=null&&u<g;)s=s[pn(a[u++])];return u&&u==g?s:n}function Ru(s,a,u){var g=a(s);return mt(s)?g:Zn(g,u(s))}function ve(s){return s==null?s===n?xa:Ve:wi&&wi in Ft(s)?tb(s):db(s)}function rl(s,a){return s>a}function y0(s,a){return s!=null&&Rt.call(s,a)}function v0(s,a){return s!=null&&a in Ft(s)}function S0(s,a,u){return s>=me(a,u)&&s<se(a,u)}function sl(s,a,u){for(var g=u?Ua:$s,b=s[0].length,T=s.length,N=T,D=U(T),L=1/0,j=[];N--;){var K=s[N];N&&a&&(K=Gt(K,Le(a))),L=me(K.length,L),D[N]=!u&&(a||b>=120&&K.length>=120)?new Pi(N&&K):n}K=s[0];var Y=-1,J=D[0];t:for(;++Y<b&&j.length<L;){var ot=K[Y],lt=a?a(ot):ot;if(ot=u||ot!==0?ot:0,!(J?Yr(J,lt):g(j,lt,u))){for(N=T;--N;){var vt=D[N];if(!(vt?Yr(vt,lt):g(s[N],lt,u)))continue t}J&&J.push(lt),j.push(ot)}}return j}function x0(s,a,u,g){return gn(s,function(b,T,N){a(g,u(b),T,N)}),g}function ns(s,a,u){a=ni(a,s),s=Tf(s,a);var g=s==null?s:s[pn(Je(a))];return g==null?n:Re(g,s,u)}function Lu(s){return Xt(s)&&ve(s)==ht}function T0(s){return Xt(s)&&ve(s)==jn}function w0(s){return Xt(s)&&ve(s)==St}function is(s,a,u,g,b){return s===a?!0:s==null||a==null||!Xt(s)&&!Xt(a)?s!==s&&a!==a:M0(s,a,u,g,is,b)}function M0(s,a,u,g,b,T){var N=mt(s),D=mt(a),L=N?Et:pe(s),j=D?Et:pe(a);L=L==ht?fe:L,j=j==ht?fe:j;var K=L==fe,Y=j==fe,J=L==j;if(J&&ri(s)){if(!ri(a))return!1;N=!0,K=!1}if(J&&!K)return T||(T=new ln),N||pr(s)?pf(s,a,u,g,b,T):J0(s,a,L,u,g,b,T);if(!(u&P)){var ot=K&&Rt.call(s,"__wrapped__"),lt=Y&&Rt.call(a,"__wrapped__");if(ot||lt){var vt=ot?s.value():s,ct=lt?a.value():a;return T||(T=new ln),b(vt,ct,u,g,T)}}return J?(T||(T=new ln),Q0(s,a,u,g,b,T)):!1}function P0(s){return Xt(s)&&pe(s)==ue}function ol(s,a,u,g){var b=u.length,T=b,N=!g;if(s==null)return!T;for(s=Ft(s);b--;){var D=u[b];if(N&&D[2]?D[1]!==s[D[0]]:!(D[0]in s))return!1}for(;++b<T;){D=u[b];var L=D[0],j=s[L],K=D[1];if(N&&D[2]){if(j===n&&!(L in s))return!1}else{var Y=new ln;if(g)var J=g(j,K,L,s,a,Y);if(!(J===n?is(K,j,P|E,g,Y):J))return!1}}return!0}function Fu(s){if(!Kt(s)||lb(s))return!1;var a=Dn(s)?Pp:yi;return a.test(ki(s))}function E0(s){return Xt(s)&&ve(s)==hn}function N0(s){return Xt(s)&&pe(s)==Vt}function C0(s){return Xt(s)&&ko(s.length)&&!!Ut[ve(s)]}function Bu(s){return typeof s=="function"?s:s==null?Ce:typeof s=="object"?mt(s)?Uu(s[0],s[1]):zu(s):ah(s)}function al(s){if(!os(s))return Ap(s);var a=[];for(var u in Ft(s))Rt.call(s,u)&&u!="constructor"&&a.push(u);return a}function k0(s){if(!Kt(s))return hb(s);var a=os(s),u=[];for(var g in s)g=="constructor"&&(a||!Rt.call(s,g))||u.push(g);return u}function ll(s,a){return s<a}function Wu(s,a){var u=-1,g=Ee(s)?U(s.length):[];return ti(s,function(b,T,N){g[++u]=a(b,T,N)}),g}function zu(s){var a=Tl(s);return a.length==1&&a[0][2]?Sf(a[0][0],a[0][1]):function(u){return u===s||ol(u,s,a)}}function Uu(s,a){return Ml(s)&&vf(a)?Sf(pn(s),a):function(u){var g=Rl(u,s);return g===n&&g===a?Ll(u,s):is(a,g,P|E)}}function go(s,a,u,g,b){s!==a&&nl(a,function(T,N){if(b||(b=new ln),Kt(T))O0(s,a,N,u,go,g,b);else{var D=g?g(El(s,N),T,N+"",s,a,b):n;D===n&&(D=T),tl(s,N,D)}},Ne)}function O0(s,a,u,g,b,T,N){var D=El(s,u),L=El(a,u),j=N.get(L);if(j){tl(s,u,j);return}var K=T?T(D,L,u+"",s,a,N):n,Y=K===n;if(Y){var J=mt(L),ot=!J&&ri(L),lt=!J&&!ot&&pr(L);K=L,J||ot||lt?mt(D)?K=D:Jt(D)?K=Pe(D):ot?(Y=!1,K=Qu(L,!0)):lt?(Y=!1,K=tf(L,!0)):K=[]:ls(L)||Oi(L)?(K=D,Oi(D)?K=Zf(D):(!Kt(D)||Dn(D))&&(K=yf(L))):Y=!1}Y&&(N.set(L,K),b(K,L,g,T,N),N.delete(L)),tl(s,u,K)}function Hu(s,a){var u=s.length;if(u)return a+=a<0?u:0,In(a,u)?s[a]:n}function Vu(s,a,u){a.length?a=Gt(a,function(T){return mt(T)?function(N){return Ni(N,T.length===1?T[0]:T)}:T}):a=[Ce];var g=-1;a=Gt(a,Le(at()));var b=Wu(s,function(T,N,D){var L=Gt(a,function(j){return j(T)});return{criteria:L,index:++g,value:T}});return rp(b,function(T,N){return G0(T,N,u)})}function A0(s,a){return Gu(s,a,function(u,g){return Ll(s,g)})}function Gu(s,a,u){for(var g=-1,b=a.length,T={};++g<b;){var N=a[g],D=Ni(s,N);u(D,N)&&rs(T,ni(N,s),D)}return T}function I0(s){return function(a){return Ni(a,s)}}function cl(s,a,u,g){var b=g?ip:sr,T=-1,N=a.length,D=s;for(s===a&&(a=Pe(a)),u&&(D=Gt(s,Le(u)));++T<N;)for(var L=0,j=a[T],K=u?u(j):j;(L=b(D,K,L,g))>-1;)D!==s&&io.call(D,L,1),io.call(s,L,1);return s}function ju(s,a){for(var u=s?a.length:0,g=u-1;u--;){var b=a[u];if(u==g||b!==T){var T=b;In(b)?io.call(s,b,1):dl(s,b)}}return s}function ul(s,a){return s+oo(Mu()*(a-s+1))}function D0(s,a,u,g){for(var b=-1,T=se(so((a-s)/(u||1)),0),N=U(T);T--;)N[g?T:++b]=s,s+=u;return N}function fl(s,a){var u="";if(!s||a<1||a>Ht)return u;do a%2&&(u+=s),a=oo(a/2),a&&(s+=s);while(a);return u}function xt(s,a){return Nl(xf(s,a,Ce),s+"")}function R0(s){return Nu(br(s))}function L0(s,a){var u=br(s);return wo(u,Ei(a,0,u.length))}function rs(s,a,u,g){if(!Kt(s))return s;a=ni(a,s);for(var b=-1,T=a.length,N=T-1,D=s;D!=null&&++b<T;){var L=pn(a[b]),j=u;if(L==="__proto__"||L==="constructor"||L==="prototype")return s;if(b!=N){var K=D[L];j=g?g(K,L,D):n,j===n&&(j=Kt(K)?K:In(a[b+1])?[]:{})}ts(D,L,j),D=D[L]}return s}var Ku=ao?function(s,a){return ao.set(s,a),s}:Ce,F0=ro?function(s,a){return ro(s,"toString",{configurable:!0,enumerable:!1,value:Bl(a),writable:!0})}:Ce;function B0(s){return wo(br(s))}function Ze(s,a,u){var g=-1,b=s.length;a<0&&(a=-a>b?0:b+a),u=u>b?b:u,u<0&&(u+=b),b=a>u?0:u-a>>>0,a>>>=0;for(var T=U(b);++g<b;)T[g]=s[g+a];return T}function W0(s,a){var u;return ti(s,function(g,b,T){return u=a(g,b,T),!u}),!!u}function mo(s,a,u){var g=0,b=s==null?g:s.length;if(typeof a=="number"&&a===a&&b<=Q){for(;g<b;){var T=g+b>>>1,N=s[T];N!==null&&!Be(N)&&(u?N<=a:N<a)?g=T+1:b=T}return b}return hl(s,a,Ce,u)}function hl(s,a,u,g){var b=0,T=s==null?0:s.length;if(T===0)return 0;a=u(a);for(var N=a!==a,D=a===null,L=Be(a),j=a===n;b<T;){var K=oo((b+T)/2),Y=u(s[K]),J=Y!==n,ot=Y===null,lt=Y===Y,vt=Be(Y);if(N)var ct=g||lt;else j?ct=lt&&(g||J):D?ct=lt&&J&&(g||!ot):L?ct=lt&&J&&!ot&&(g||!vt):ot||vt?ct=!1:ct=g?Y<=a:Y<a;ct?b=K+1:T=K}return me(T,rt)}function $u(s,a){for(var u=-1,g=s.length,b=0,T=[];++u<g;){var N=s[u],D=a?a(N):N;if(!u||!cn(D,L)){var L=D;T[b++]=N===0?0:N}}return T}function Yu(s){return typeof s=="number"?s:Be(s)?k:+s}function Fe(s){if(typeof s=="string")return s;if(mt(s))return Gt(s,Fe)+"";if(Be(s))return Pu?Pu.call(s):"";var a=s+"";return a=="0"&&1/s==-1/0?"-0":a}function ei(s,a,u){var g=-1,b=$s,T=s.length,N=!0,D=[],L=D;if(u)N=!1,b=Ua;else if(T>=i){var j=a?null:q0(s);if(j)return Xs(j);N=!1,b=Yr,L=new Pi}else L=a?[]:D;t:for(;++g<T;){var K=s[g],Y=a?a(K):K;if(K=u||K!==0?K:0,N&&Y===Y){for(var J=L.length;J--;)if(L[J]===Y)continue t;a&&L.push(Y),D.push(K)}else b(L,Y,u)||(L!==D&&L.push(Y),D.push(K))}return D}function dl(s,a){return a=ni(a,s),s=Tf(s,a),s==null||delete s[pn(Je(a))]}function Xu(s,a,u,g){return rs(s,a,u(Ni(s,a)),g)}function po(s,a,u,g){for(var b=s.length,T=g?b:-1;(g?T--:++T<b)&&a(s[T],T,s););return u?Ze(s,g?0:T,g?T+1:b):Ze(s,g?T+1:0,g?b:T)}function qu(s,a){var u=s;return u instanceof Nt&&(u=u.value()),Ha(a,function(g,b){return b.func.apply(b.thisArg,Zn([g],b.args))},u)}function gl(s,a,u){var g=s.length;if(g<2)return g?ei(s[0]):[];for(var b=-1,T=U(g);++b<g;)for(var N=s[b],D=-1;++D<g;)D!=b&&(T[b]=es(T[b]||N,s[D],a,u));return ei(de(T,1),a,u)}function Zu(s,a,u){for(var g=-1,b=s.length,T=a.length,N={};++g<b;){var D=g<T?a[g]:n;u(N,s[g],D)}return N}function ml(s){return Jt(s)?s:[]}function pl(s){return typeof s=="function"?s:Ce}function ni(s,a){return mt(s)?s:Ml(s,a)?[s]:Ef(Dt(s))}var z0=xt;function ii(s,a,u){var g=s.length;return u=u===n?g:u,!a&&u>=g?s:Ze(s,a,u)}var Ju=Ep||function(s){return he.clearTimeout(s)};function Qu(s,a){if(a)return s.slice();var u=s.length,g=vu?vu(u):new s.constructor(u);return s.copy(g),g}function bl(s){var a=new s.constructor(s.byteLength);return new eo(a).set(new eo(s)),a}function U0(s,a){var u=a?bl(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function H0(s){var a=new s.constructor(s.source,Vr.exec(s));return a.lastIndex=s.lastIndex,a}function V0(s){return Qr?Ft(Qr.call(s)):{}}function tf(s,a){var u=a?bl(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function ef(s,a){if(s!==a){var u=s!==n,g=s===null,b=s===s,T=Be(s),N=a!==n,D=a===null,L=a===a,j=Be(a);if(!D&&!j&&!T&&s>a||T&&N&&L&&!D&&!j||g&&N&&L||!u&&L||!b)return 1;if(!g&&!T&&!j&&s<a||j&&u&&b&&!g&&!T||D&&u&&b||!N&&b||!L)return-1}return 0}function G0(s,a,u){for(var g=-1,b=s.criteria,T=a.criteria,N=b.length,D=u.length;++g<N;){var L=ef(b[g],T[g]);if(L){if(g>=D)return L;var j=u[g];return L*(j=="desc"?-1:1)}}return s.index-a.index}function nf(s,a,u,g){for(var b=-1,T=s.length,N=u.length,D=-1,L=a.length,j=se(T-N,0),K=U(L+j),Y=!g;++D<L;)K[D]=a[D];for(;++b<N;)(Y||b<T)&&(K[u[b]]=s[b]);for(;j--;)K[D++]=s[b++];return K}function rf(s,a,u,g){for(var b=-1,T=s.length,N=-1,D=u.length,L=-1,j=a.length,K=se(T-D,0),Y=U(K+j),J=!g;++b<K;)Y[b]=s[b];for(var ot=b;++L<j;)Y[ot+L]=a[L];for(;++N<D;)(J||b<T)&&(Y[ot+u[N]]=s[b++]);return Y}function Pe(s,a){var u=-1,g=s.length;for(a||(a=U(g));++u<g;)a[u]=s[u];return a}function mn(s,a,u,g){var b=!u;u||(u={});for(var T=-1,N=a.length;++T<N;){var D=a[T],L=g?g(u[D],s[D],D,u,s):n;L===n&&(L=s[D]),b?kn(u,D,L):ts(u,D,L)}return u}function j0(s,a){return mn(s,wl(s),a)}function K0(s,a){return mn(s,bf(s),a)}function bo(s,a){return function(u,g){var b=mt(u)?Zm:g0,T=a?a():{};return b(u,s,at(g,2),T)}}function dr(s){return xt(function(a,u){var g=-1,b=u.length,T=b>1?u[b-1]:n,N=b>2?u[2]:n;for(T=s.length>3&&typeof T=="function"?(b--,T):n,N&&Se(u[0],u[1],N)&&(T=b<3?n:T,b=1),a=Ft(a);++g<b;){var D=u[g];D&&s(a,D,g,T)}return a})}function sf(s,a){return function(u,g){if(u==null)return u;if(!Ee(u))return s(u,g);for(var b=u.length,T=a?b:-1,N=Ft(u);(a?T--:++T<b)&&g(N[T],T,N)!==!1;);return u}}function of(s){return function(a,u,g){for(var b=-1,T=Ft(a),N=g(a),D=N.length;D--;){var L=N[s?D:++b];if(u(T[L],L,T)===!1)break}return a}}function $0(s,a,u){var g=a&I,b=ss(s);function T(){var N=this&&this!==he&&this instanceof T?b:s;return N.apply(g?u:this,arguments)}return T}function af(s){return function(a){a=Dt(a);var u=or(a)?an(a):n,g=u?u[0]:a.charAt(0),b=u?ii(u,1).join(""):a.slice(1);return g[s]()+b}}function gr(s){return function(a){return Ha(sh(rh(a).replace(Fm,"")),s,"")}}function ss(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=hr(s.prototype),g=s.apply(u,a);return Kt(g)?g:u}}function Y0(s,a,u){var g=ss(s);function b(){for(var T=arguments.length,N=U(T),D=T,L=mr(b);D--;)N[D]=arguments[D];var j=T<3&&N[0]!==L&&N[T-1]!==L?[]:Jn(N,L);if(T-=j.length,T<u)return hf(s,a,_o,b.placeholder,n,N,j,n,n,u-T);var K=this&&this!==he&&this instanceof b?g:s;return Re(K,this,N)}return b}function lf(s){return function(a,u,g){var b=Ft(a);if(!Ee(a)){var T=at(u,3);a=le(a),u=function(D){return T(b[D],D,b)}}var N=s(a,u,g);return N>-1?b[T?a[N]:N]:n}}function cf(s){return An(function(a){var u=a.length,g=u,b=Xe.prototype.thru;for(s&&a.reverse();g--;){var T=a[g];if(typeof T!="function")throw new Ye(l);if(b&&!N&&xo(T)=="wrapper")var N=new Xe([],!0)}for(g=N?g:u;++g<u;){T=a[g];var D=xo(T),L=D=="wrapper"?xl(T):n;L&&Pl(L[0])&&L[1]==(F|C|O|H)&&!L[4].length&&L[9]==1?N=N[xo(L[0])].apply(N,L[3]):N=T.length==1&&Pl(T)?N[D]():N.thru(T)}return function(){var j=arguments,K=j[0];if(N&&j.length==1&&mt(K))return N.plant(K).value();for(var Y=0,J=u?a[Y].apply(this,j):K;++Y<u;)J=a[Y].call(this,J);return J}})}function _o(s,a,u,g,b,T,N,D,L,j){var K=a&F,Y=a&I,J=a&y,ot=a&(C|w),lt=a&Z,vt=J?n:ss(s);function ct(){for(var Mt=arguments.length,kt=U(Mt),We=Mt;We--;)kt[We]=arguments[We];if(ot)var xe=mr(ct),ze=op(kt,xe);if(g&&(kt=nf(kt,g,b,ot)),T&&(kt=rf(kt,T,N,ot)),Mt-=ze,ot&&Mt<j){var Qt=Jn(kt,xe);return hf(s,a,_o,ct.placeholder,u,kt,Qt,D,L,j-Mt)}var un=Y?u:this,Ln=J?un[s]:s;return Mt=kt.length,D?kt=gb(kt,D):lt&&Mt>1&&kt.reverse(),K&&L<Mt&&(kt.length=L),this&&this!==he&&this instanceof ct&&(Ln=vt||ss(Ln)),Ln.apply(un,kt)}return ct}function uf(s,a){return function(u,g){return x0(u,s,a(g),{})}}function yo(s,a){return function(u,g){var b;if(u===n&&g===n)return a;if(u!==n&&(b=u),g!==n){if(b===n)return g;typeof u=="string"||typeof g=="string"?(u=Fe(u),g=Fe(g)):(u=Yu(u),g=Yu(g)),b=s(u,g)}return b}}function _l(s){return An(function(a){return a=Gt(a,Le(at())),xt(function(u){var g=this;return s(a,function(b){return Re(b,g,u)})})})}function vo(s,a){a=a===n?" ":Fe(a);var u=a.length;if(u<2)return u?fl(a,s):a;var g=fl(a,so(s/ar(a)));return or(a)?ii(an(g),0,s).join(""):g.slice(0,s)}function X0(s,a,u,g){var b=a&I,T=ss(s);function N(){for(var D=-1,L=arguments.length,j=-1,K=g.length,Y=U(K+L),J=this&&this!==he&&this instanceof N?T:s;++j<K;)Y[j]=g[j];for(;L--;)Y[j++]=arguments[++D];return Re(J,b?u:this,Y)}return N}function ff(s){return function(a,u,g){return g&&typeof g!="number"&&Se(a,u,g)&&(u=g=n),a=Rn(a),u===n?(u=a,a=0):u=Rn(u),g=g===n?a<u?1:-1:Rn(g),D0(a,u,g,s)}}function So(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=Qe(a),u=Qe(u)),s(a,u)}}function hf(s,a,u,g,b,T,N,D,L,j){var K=a&C,Y=K?N:n,J=K?n:N,ot=K?T:n,lt=K?n:T;a|=K?O:B,a&=~(K?B:O),a&v||(a&=-4);var vt=[s,a,b,ot,Y,lt,J,D,L,j],ct=u.apply(n,vt);return Pl(s)&&wf(ct,vt),ct.placeholder=g,Mf(ct,s,a)}function yl(s){var a=re[s];return function(u,g){if(u=Qe(u),g=g==null?0:me(_t(g),292),g&&wu(u)){var b=(Dt(u)+"e").split("e"),T=a(b[0]+"e"+(+b[1]+g));return b=(Dt(T)+"e").split("e"),+(b[0]+"e"+(+b[1]-g))}return a(u)}}var q0=ur&&1/Xs(new ur([,-0]))[1]==Ct?function(s){return new ur(s)}:Ul;function df(s){return function(a){var u=pe(a);return u==ue?Xa(a):u==Vt?dp(a):sp(a,s(a))}}function On(s,a,u,g,b,T,N,D){var L=a&y;if(!L&&typeof s!="function")throw new Ye(l);var j=g?g.length:0;if(j||(a&=-97,g=b=n),N=N===n?N:se(_t(N),0),D=D===n?D:_t(D),j-=b?b.length:0,a&B){var K=g,Y=b;g=b=n}var J=L?n:xl(s),ot=[s,a,u,g,b,K,Y,T,N,D];if(J&&fb(ot,J),s=ot[0],a=ot[1],u=ot[2],g=ot[3],b=ot[4],D=ot[9]=ot[9]===n?L?0:s.length:se(ot[9]-j,0),!D&&a&(C|w)&&(a&=-25),!a||a==I)var lt=$0(s,a,u);else a==C||a==w?lt=Y0(s,a,D):(a==O||a==(I|O))&&!b.length?lt=X0(s,a,u,g):lt=_o.apply(n,ot);var vt=J?Ku:wf;return Mf(vt(lt,ot),s,a)}function gf(s,a,u,g){return s===n||cn(s,cr[u])&&!Rt.call(g,u)?a:s}function mf(s,a,u,g,b,T){return Kt(s)&&Kt(a)&&(T.set(a,s),go(s,a,n,mf,T),T.delete(a)),s}function Z0(s){return ls(s)?n:s}function pf(s,a,u,g,b,T){var N=u&P,D=s.length,L=a.length;if(D!=L&&!(N&&L>D))return!1;var j=T.get(s),K=T.get(a);if(j&&K)return j==a&&K==s;var Y=-1,J=!0,ot=u&E?new Pi:n;for(T.set(s,a),T.set(a,s);++Y<D;){var lt=s[Y],vt=a[Y];if(g)var ct=N?g(vt,lt,Y,a,s,T):g(lt,vt,Y,s,a,T);if(ct!==n){if(ct)continue;J=!1;break}if(ot){if(!Va(a,function(Mt,kt){if(!Yr(ot,kt)&&(lt===Mt||b(lt,Mt,u,g,T)))return ot.push(kt)})){J=!1;break}}else if(!(lt===vt||b(lt,vt,u,g,T))){J=!1;break}}return T.delete(s),T.delete(a),J}function J0(s,a,u,g,b,T,N){switch(u){case wn:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case jn:return!(s.byteLength!=a.byteLength||!T(new eo(s),new eo(a)));case Bt:case St:case rn:return cn(+s,+a);case ye:return s.name==a.name&&s.message==a.message;case hn:case pi:return s==a+"";case ue:var D=Xa;case Vt:var L=g&P;if(D||(D=Xs),s.size!=a.size&&!L)return!1;var j=N.get(s);if(j)return j==a;g|=E,N.set(s,a);var K=pf(D(s),D(a),g,b,T,N);return N.delete(s),K;case Yi:if(Qr)return Qr.call(s)==Qr.call(a)}return!1}function Q0(s,a,u,g,b,T){var N=u&P,D=vl(s),L=D.length,j=vl(a),K=j.length;if(L!=K&&!N)return!1;for(var Y=L;Y--;){var J=D[Y];if(!(N?J in a:Rt.call(a,J)))return!1}var ot=T.get(s),lt=T.get(a);if(ot&&lt)return ot==a&&lt==s;var vt=!0;T.set(s,a),T.set(a,s);for(var ct=N;++Y<L;){J=D[Y];var Mt=s[J],kt=a[J];if(g)var We=N?g(kt,Mt,J,a,s,T):g(Mt,kt,J,s,a,T);if(!(We===n?Mt===kt||b(Mt,kt,u,g,T):We)){vt=!1;break}ct||(ct=J=="constructor")}if(vt&&!ct){var xe=s.constructor,ze=a.constructor;xe!=ze&&"constructor"in s&&"constructor"in a&&!(typeof xe=="function"&&xe instanceof xe&&typeof ze=="function"&&ze instanceof ze)&&(vt=!1)}return T.delete(s),T.delete(a),vt}function An(s){return Nl(xf(s,n,Of),s+"")}function vl(s){return Ru(s,le,wl)}function Sl(s){return Ru(s,Ne,bf)}var xl=ao?function(s){return ao.get(s)}:Ul;function xo(s){for(var a=s.name+"",u=fr[a],g=Rt.call(fr,a)?u.length:0;g--;){var b=u[g],T=b.func;if(T==null||T==s)return b.name}return a}function mr(s){var a=Rt.call(x,"placeholder")?x:s;return a.placeholder}function at(){var s=x.iteratee||Wl;return s=s===Wl?Bu:s,arguments.length?s(arguments[0],arguments[1]):s}function To(s,a){var u=s.__data__;return ab(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Tl(s){for(var a=le(s),u=a.length;u--;){var g=a[u],b=s[g];a[u]=[g,b,vf(b)]}return a}function Ci(s,a){var u=up(s,a);return Fu(u)?u:n}function tb(s){var a=Rt.call(s,wi),u=s[wi];try{s[wi]=n;var g=!0}catch{}var b=Qs.call(s);return g&&(a?s[wi]=u:delete s[wi]),b}var wl=Za?function(s){return s==null?[]:(s=Ft(s),qn(Za(s),function(a){return xu.call(s,a)}))}:Hl,bf=Za?function(s){for(var a=[];s;)Zn(a,wl(s)),s=no(s);return a}:Hl,pe=ve;(Ja&&pe(new Ja(new ArrayBuffer(1)))!=wn||qr&&pe(new qr)!=ue||Qa&&pe(Qa.resolve())!=Or||ur&&pe(new ur)!=Vt||Zr&&pe(new Zr)!=bi)&&(pe=function(s){var a=ve(s),u=a==fe?s.constructor:n,g=u?ki(u):"";if(g)switch(g){case Lp:return wn;case Fp:return ue;case Bp:return Or;case Wp:return Vt;case zp:return bi}return a});function eb(s,a,u){for(var g=-1,b=u.length;++g<b;){var T=u[g],N=T.size;switch(T.type){case"drop":s+=N;break;case"dropRight":a-=N;break;case"take":a=me(a,s+N);break;case"takeRight":s=se(s,a-N);break}}return{start:s,end:a}}function nb(s){var a=s.match(Ia);return a?a[1].split(zs):[]}function _f(s,a,u){a=ni(a,s);for(var g=-1,b=a.length,T=!1;++g<b;){var N=pn(a[g]);if(!(T=s!=null&&u(s,N)))break;s=s[N]}return T||++g!=b?T:(b=s==null?0:s.length,!!b&&ko(b)&&In(N,b)&&(mt(s)||Oi(s)))}function ib(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&Rt.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function yf(s){return typeof s.constructor=="function"&&!os(s)?hr(no(s)):{}}function rb(s,a,u){var g=s.constructor;switch(a){case jn:return bl(s);case Bt:case St:return new g(+s);case wn:return U0(s,u);case Xi:case qi:case Kn:case _i:case Ar:case Ir:case Dr:case Rr:case Lr:return tf(s,u);case ue:return new g;case rn:case pi:return new g(s);case hn:return H0(s);case Vt:return new g;case Yi:return V0(s)}}function sb(s,a){var u=a.length;if(!u)return s;var g=u-1;return a[g]=(u>1?"& ":"")+a[g],a=a.join(u>2?", ":" "),s.replace(Hr,`{
43
- /* [wrapped with `+a+`] */
44
- `)}function ob(s){return mt(s)||Oi(s)||!!(Tu&&s&&s[Tu])}function In(s,a){var u=typeof s;return a=a??Ht,!!a&&(u=="number"||u!="symbol"&&Ji.test(s))&&s>-1&&s%1==0&&s<a}function Se(s,a,u){if(!Kt(u))return!1;var g=typeof a;return(g=="number"?Ee(u)&&In(a,u.length):g=="string"&&a in u)?cn(u[a],s):!1}function Ml(s,a){if(mt(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||Be(s)?!0:ka.test(s)||!Ca.test(s)||a!=null&&s in Ft(a)}function ab(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function Pl(s){var a=xo(s),u=x[a];if(typeof u!="function"||!(a in Nt.prototype))return!1;if(s===u)return!0;var g=xl(u);return!!g&&s===g[0]}function lb(s){return!!yu&&yu in s}var cb=Zs?Dn:Vl;function os(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||cr;return s===u}function vf(s){return s===s&&!Kt(s)}function Sf(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Ft(u))}}function ub(s){var a=No(s,function(g){return u.size===h&&u.clear(),g}),u=a.cache;return a}function fb(s,a){var u=s[1],g=a[1],b=u|g,T=b<(I|y|F),N=g==F&&u==C||g==F&&u==H&&s[7].length<=a[8]||g==(F|H)&&a[7].length<=a[8]&&u==C;if(!(T||N))return s;g&I&&(s[2]=a[2],b|=u&I?0:v);var D=a[3];if(D){var L=s[3];s[3]=L?nf(L,D,a[4]):D,s[4]=L?Jn(s[3],d):a[4]}return D=a[5],D&&(L=s[5],s[5]=L?rf(L,D,a[6]):D,s[6]=L?Jn(s[5],d):a[6]),D=a[7],D&&(s[7]=D),g&F&&(s[8]=s[8]==null?a[8]:me(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=b,s}function hb(s){var a=[];if(s!=null)for(var u in Ft(s))a.push(u);return a}function db(s){return Qs.call(s)}function xf(s,a,u){return a=se(a===n?s.length-1:a,0),function(){for(var g=arguments,b=-1,T=se(g.length-a,0),N=U(T);++b<T;)N[b]=g[a+b];b=-1;for(var D=U(a+1);++b<a;)D[b]=g[b];return D[a]=u(N),Re(s,this,D)}}function Tf(s,a){return a.length<2?s:Ni(s,Ze(a,0,-1))}function gb(s,a){for(var u=s.length,g=me(a.length,u),b=Pe(s);g--;){var T=a[g];s[g]=In(T,u)?b[T]:n}return s}function El(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var wf=Pf(Ku),as=Cp||function(s,a){return he.setTimeout(s,a)},Nl=Pf(F0);function Mf(s,a,u){var g=a+"";return Nl(s,sb(g,mb(nb(g),u)))}function Pf(s){var a=0,u=0;return function(){var g=Ip(),b=bt-(g-u);if(u=g,b>0){if(++a>=X)return arguments[0]}else a=0;return s.apply(n,arguments)}}function wo(s,a){var u=-1,g=s.length,b=g-1;for(a=a===n?g:a;++u<a;){var T=ul(u,b),N=s[T];s[T]=s[u],s[u]=N}return s.length=a,s}var Ef=ub(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(Oa,function(u,g,b,T){a.push(b?T.replace(Hs,"$1"):g||u)}),a});function pn(s){if(typeof s=="string"||Be(s))return s;var a=s+"";return a=="0"&&1/s==-1/0?"-0":a}function ki(s){if(s!=null){try{return Js.call(s)}catch{}try{return s+""}catch{}}return""}function mb(s,a){return $e(tt,function(u){var g="_."+u[0];a&u[1]&&!$s(s,g)&&s.push(g)}),s.sort()}function Nf(s){if(s instanceof Nt)return s.clone();var a=new Xe(s.__wrapped__,s.__chain__);return a.__actions__=Pe(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function pb(s,a,u){(u?Se(s,a,u):a===n)?a=1:a=se(_t(a),0);var g=s==null?0:s.length;if(!g||a<1)return[];for(var b=0,T=0,N=U(so(g/a));b<g;)N[T++]=Ze(s,b,b+=a);return N}function bb(s){for(var a=-1,u=s==null?0:s.length,g=0,b=[];++a<u;){var T=s[a];T&&(b[g++]=T)}return b}function _b(){var s=arguments.length;if(!s)return[];for(var a=U(s-1),u=arguments[0],g=s;g--;)a[g-1]=arguments[g];return Zn(mt(u)?Pe(u):[u],de(a,1))}var yb=xt(function(s,a){return Jt(s)?es(s,de(a,1,Jt,!0)):[]}),vb=xt(function(s,a){var u=Je(a);return Jt(u)&&(u=n),Jt(s)?es(s,de(a,1,Jt,!0),at(u,2)):[]}),Sb=xt(function(s,a){var u=Je(a);return Jt(u)&&(u=n),Jt(s)?es(s,de(a,1,Jt,!0),n,u):[]});function xb(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:_t(a),Ze(s,a<0?0:a,g)):[]}function Tb(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:_t(a),a=g-a,Ze(s,0,a<0?0:a)):[]}function wb(s,a){return s&&s.length?po(s,at(a,3),!0,!0):[]}function Mb(s,a){return s&&s.length?po(s,at(a,3),!0):[]}function Pb(s,a,u,g){var b=s==null?0:s.length;return b?(u&&typeof u!="number"&&Se(s,a,u)&&(u=0,g=b),_0(s,a,u,g)):[]}function Cf(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var b=u==null?0:_t(u);return b<0&&(b=se(g+b,0)),Ys(s,at(a,3),b)}function kf(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var b=g-1;return u!==n&&(b=_t(u),b=u<0?se(g+b,0):me(b,g-1)),Ys(s,at(a,3),b,!0)}function Of(s){var a=s==null?0:s.length;return a?de(s,1):[]}function Eb(s){var a=s==null?0:s.length;return a?de(s,Ct):[]}function Nb(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:_t(a),de(s,a)):[]}function Cb(s){for(var a=-1,u=s==null?0:s.length,g={};++a<u;){var b=s[a];g[b[0]]=b[1]}return g}function Af(s){return s&&s.length?s[0]:n}function kb(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var b=u==null?0:_t(u);return b<0&&(b=se(g+b,0)),sr(s,a,b)}function Ob(s){var a=s==null?0:s.length;return a?Ze(s,0,-1):[]}var Ab=xt(function(s){var a=Gt(s,ml);return a.length&&a[0]===s[0]?sl(a):[]}),Ib=xt(function(s){var a=Je(s),u=Gt(s,ml);return a===Je(u)?a=n:u.pop(),u.length&&u[0]===s[0]?sl(u,at(a,2)):[]}),Db=xt(function(s){var a=Je(s),u=Gt(s,ml);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?sl(u,n,a):[]});function Rb(s,a){return s==null?"":Op.call(s,a)}function Je(s){var a=s==null?0:s.length;return a?s[a-1]:n}function Lb(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var b=g;return u!==n&&(b=_t(u),b=b<0?se(g+b,0):me(b,g-1)),a===a?mp(s,a,b):Ys(s,fu,b,!0)}function Fb(s,a){return s&&s.length?Hu(s,_t(a)):n}var Bb=xt(If);function If(s,a){return s&&s.length&&a&&a.length?cl(s,a):s}function Wb(s,a,u){return s&&s.length&&a&&a.length?cl(s,a,at(u,2)):s}function zb(s,a,u){return s&&s.length&&a&&a.length?cl(s,a,n,u):s}var Ub=An(function(s,a){var u=s==null?0:s.length,g=el(s,a);return ju(s,Gt(a,function(b){return In(b,u)?+b:b}).sort(ef)),g});function Hb(s,a){var u=[];if(!(s&&s.length))return u;var g=-1,b=[],T=s.length;for(a=at(a,3);++g<T;){var N=s[g];a(N,g,s)&&(u.push(N),b.push(g))}return ju(s,b),u}function Cl(s){return s==null?s:Rp.call(s)}function Vb(s,a,u){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&Se(s,a,u)?(a=0,u=g):(a=a==null?0:_t(a),u=u===n?g:_t(u)),Ze(s,a,u)):[]}function Gb(s,a){return mo(s,a)}function jb(s,a,u){return hl(s,a,at(u,2))}function Kb(s,a){var u=s==null?0:s.length;if(u){var g=mo(s,a);if(g<u&&cn(s[g],a))return g}return-1}function $b(s,a){return mo(s,a,!0)}function Yb(s,a,u){return hl(s,a,at(u,2),!0)}function Xb(s,a){var u=s==null?0:s.length;if(u){var g=mo(s,a,!0)-1;if(cn(s[g],a))return g}return-1}function qb(s){return s&&s.length?$u(s):[]}function Zb(s,a){return s&&s.length?$u(s,at(a,2)):[]}function Jb(s){var a=s==null?0:s.length;return a?Ze(s,1,a):[]}function Qb(s,a,u){return s&&s.length?(a=u||a===n?1:_t(a),Ze(s,0,a<0?0:a)):[]}function t_(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:_t(a),a=g-a,Ze(s,a<0?0:a,g)):[]}function e_(s,a){return s&&s.length?po(s,at(a,3),!1,!0):[]}function n_(s,a){return s&&s.length?po(s,at(a,3)):[]}var i_=xt(function(s){return ei(de(s,1,Jt,!0))}),r_=xt(function(s){var a=Je(s);return Jt(a)&&(a=n),ei(de(s,1,Jt,!0),at(a,2))}),s_=xt(function(s){var a=Je(s);return a=typeof a=="function"?a:n,ei(de(s,1,Jt,!0),n,a)});function o_(s){return s&&s.length?ei(s):[]}function a_(s,a){return s&&s.length?ei(s,at(a,2)):[]}function l_(s,a){return a=typeof a=="function"?a:n,s&&s.length?ei(s,n,a):[]}function kl(s){if(!(s&&s.length))return[];var a=0;return s=qn(s,function(u){if(Jt(u))return a=se(u.length,a),!0}),$a(a,function(u){return Gt(s,Ga(u))})}function Df(s,a){if(!(s&&s.length))return[];var u=kl(s);return a==null?u:Gt(u,function(g){return Re(a,n,g)})}var c_=xt(function(s,a){return Jt(s)?es(s,a):[]}),u_=xt(function(s){return gl(qn(s,Jt))}),f_=xt(function(s){var a=Je(s);return Jt(a)&&(a=n),gl(qn(s,Jt),at(a,2))}),h_=xt(function(s){var a=Je(s);return a=typeof a=="function"?a:n,gl(qn(s,Jt),n,a)}),d_=xt(kl);function g_(s,a){return Zu(s||[],a||[],ts)}function m_(s,a){return Zu(s||[],a||[],rs)}var p_=xt(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,Df(s,u)});function Rf(s){var a=x(s);return a.__chain__=!0,a}function b_(s,a){return a(s),s}function Mo(s,a){return a(s)}var __=An(function(s){var a=s.length,u=a?s[0]:0,g=this.__wrapped__,b=function(T){return el(T,s)};return a>1||this.__actions__.length||!(g instanceof Nt)||!In(u)?this.thru(b):(g=g.slice(u,+u+(a?1:0)),g.__actions__.push({func:Mo,args:[b],thisArg:n}),new Xe(g,this.__chain__).thru(function(T){return a&&!T.length&&T.push(n),T}))});function y_(){return Rf(this)}function v_(){return new Xe(this.value(),this.__chain__)}function S_(){this.__values__===n&&(this.__values__=Xf(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function x_(){return this}function T_(s){for(var a,u=this;u instanceof co;){var g=Nf(u);g.__index__=0,g.__values__=n,a?b.__wrapped__=g:a=g;var b=g;u=u.__wrapped__}return b.__wrapped__=s,a}function w_(){var s=this.__wrapped__;if(s instanceof Nt){var a=s;return this.__actions__.length&&(a=new Nt(this)),a=a.reverse(),a.__actions__.push({func:Mo,args:[Cl],thisArg:n}),new Xe(a,this.__chain__)}return this.thru(Cl)}function M_(){return qu(this.__wrapped__,this.__actions__)}var P_=bo(function(s,a,u){Rt.call(s,u)?++s[u]:kn(s,u,1)});function E_(s,a,u){var g=mt(s)?cu:b0;return u&&Se(s,a,u)&&(a=n),g(s,at(a,3))}function N_(s,a){var u=mt(s)?qn:Iu;return u(s,at(a,3))}var C_=lf(Cf),k_=lf(kf);function O_(s,a){return de(Po(s,a),1)}function A_(s,a){return de(Po(s,a),Ct)}function I_(s,a,u){return u=u===n?1:_t(u),de(Po(s,a),u)}function Lf(s,a){var u=mt(s)?$e:ti;return u(s,at(a,3))}function Ff(s,a){var u=mt(s)?Jm:Au;return u(s,at(a,3))}var D_=bo(function(s,a,u){Rt.call(s,u)?s[u].push(a):kn(s,u,[a])});function R_(s,a,u,g){s=Ee(s)?s:br(s),u=u&&!g?_t(u):0;var b=s.length;return u<0&&(u=se(b+u,0)),Oo(s)?u<=b&&s.indexOf(a,u)>-1:!!b&&sr(s,a,u)>-1}var L_=xt(function(s,a,u){var g=-1,b=typeof a=="function",T=Ee(s)?U(s.length):[];return ti(s,function(N){T[++g]=b?Re(a,N,u):ns(N,a,u)}),T}),F_=bo(function(s,a,u){kn(s,u,a)});function Po(s,a){var u=mt(s)?Gt:Wu;return u(s,at(a,3))}function B_(s,a,u,g){return s==null?[]:(mt(a)||(a=a==null?[]:[a]),u=g?n:u,mt(u)||(u=u==null?[]:[u]),Vu(s,a,u))}var W_=bo(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function z_(s,a,u){var g=mt(s)?Ha:du,b=arguments.length<3;return g(s,at(a,4),u,b,ti)}function U_(s,a,u){var g=mt(s)?Qm:du,b=arguments.length<3;return g(s,at(a,4),u,b,Au)}function H_(s,a){var u=mt(s)?qn:Iu;return u(s,Co(at(a,3)))}function V_(s){var a=mt(s)?Nu:R0;return a(s)}function G_(s,a,u){(u?Se(s,a,u):a===n)?a=1:a=_t(a);var g=mt(s)?h0:L0;return g(s,a)}function j_(s){var a=mt(s)?d0:B0;return a(s)}function K_(s){if(s==null)return 0;if(Ee(s))return Oo(s)?ar(s):s.length;var a=pe(s);return a==ue||a==Vt?s.size:al(s).length}function $_(s,a,u){var g=mt(s)?Va:W0;return u&&Se(s,a,u)&&(a=n),g(s,at(a,3))}var Y_=xt(function(s,a){if(s==null)return[];var u=a.length;return u>1&&Se(s,a[0],a[1])?a=[]:u>2&&Se(a[0],a[1],a[2])&&(a=[a[0]]),Vu(s,de(a,1),[])}),Eo=Np||function(){return he.Date.now()};function X_(s,a){if(typeof a!="function")throw new Ye(l);return s=_t(s),function(){if(--s<1)return a.apply(this,arguments)}}function Bf(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,On(s,F,n,n,n,n,a)}function Wf(s,a){var u;if(typeof a!="function")throw new Ye(l);return s=_t(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Ol=xt(function(s,a,u){var g=I;if(u.length){var b=Jn(u,mr(Ol));g|=O}return On(s,g,a,u,b)}),zf=xt(function(s,a,u){var g=I|y;if(u.length){var b=Jn(u,mr(zf));g|=O}return On(a,g,s,u,b)});function Uf(s,a,u){a=u?n:a;var g=On(s,C,n,n,n,n,n,a);return g.placeholder=Uf.placeholder,g}function Hf(s,a,u){a=u?n:a;var g=On(s,w,n,n,n,n,n,a);return g.placeholder=Hf.placeholder,g}function Vf(s,a,u){var g,b,T,N,D,L,j=0,K=!1,Y=!1,J=!0;if(typeof s!="function")throw new Ye(l);a=Qe(a)||0,Kt(u)&&(K=!!u.leading,Y="maxWait"in u,T=Y?se(Qe(u.maxWait)||0,a):T,J="trailing"in u?!!u.trailing:J);function ot(Qt){var un=g,Ln=b;return g=b=n,j=Qt,N=s.apply(Ln,un),N}function lt(Qt){return j=Qt,D=as(Mt,a),K?ot(Qt):N}function vt(Qt){var un=Qt-L,Ln=Qt-j,lh=a-un;return Y?me(lh,T-Ln):lh}function ct(Qt){var un=Qt-L,Ln=Qt-j;return L===n||un>=a||un<0||Y&&Ln>=T}function Mt(){var Qt=Eo();if(ct(Qt))return kt(Qt);D=as(Mt,vt(Qt))}function kt(Qt){return D=n,J&&g?ot(Qt):(g=b=n,N)}function We(){D!==n&&Ju(D),j=0,g=L=b=D=n}function xe(){return D===n?N:kt(Eo())}function ze(){var Qt=Eo(),un=ct(Qt);if(g=arguments,b=this,L=Qt,un){if(D===n)return lt(L);if(Y)return Ju(D),D=as(Mt,a),ot(L)}return D===n&&(D=as(Mt,a)),N}return ze.cancel=We,ze.flush=xe,ze}var q_=xt(function(s,a){return Ou(s,1,a)}),Z_=xt(function(s,a,u){return Ou(s,Qe(a)||0,u)});function J_(s){return On(s,Z)}function No(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new Ye(l);var u=function(){var g=arguments,b=a?a.apply(this,g):g[0],T=u.cache;if(T.has(b))return T.get(b);var N=s.apply(this,g);return u.cache=T.set(b,N)||T,N};return u.cache=new(No.Cache||Cn),u}No.Cache=Cn;function Co(s){if(typeof s!="function")throw new Ye(l);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function Q_(s){return Wf(2,s)}var ty=z0(function(s,a){a=a.length==1&&mt(a[0])?Gt(a[0],Le(at())):Gt(de(a,1),Le(at()));var u=a.length;return xt(function(g){for(var b=-1,T=me(g.length,u);++b<T;)g[b]=a[b].call(this,g[b]);return Re(s,this,g)})}),Al=xt(function(s,a){var u=Jn(a,mr(Al));return On(s,O,n,a,u)}),Gf=xt(function(s,a){var u=Jn(a,mr(Gf));return On(s,B,n,a,u)}),ey=An(function(s,a){return On(s,H,n,n,n,a)});function ny(s,a){if(typeof s!="function")throw new Ye(l);return a=a===n?a:_t(a),xt(s,a)}function iy(s,a){if(typeof s!="function")throw new Ye(l);return a=a==null?0:se(_t(a),0),xt(function(u){var g=u[a],b=ii(u,0,a);return g&&Zn(b,g),Re(s,this,b)})}function ry(s,a,u){var g=!0,b=!0;if(typeof s!="function")throw new Ye(l);return Kt(u)&&(g="leading"in u?!!u.leading:g,b="trailing"in u?!!u.trailing:b),Vf(s,a,{leading:g,maxWait:a,trailing:b})}function sy(s){return Bf(s,1)}function oy(s,a){return Al(pl(a),s)}function ay(){if(!arguments.length)return[];var s=arguments[0];return mt(s)?s:[s]}function ly(s){return qe(s,S)}function cy(s,a){return a=typeof a=="function"?a:n,qe(s,S,a)}function uy(s){return qe(s,m|S)}function fy(s,a){return a=typeof a=="function"?a:n,qe(s,m|S,a)}function hy(s,a){return a==null||ku(s,a,le(a))}function cn(s,a){return s===a||s!==s&&a!==a}var dy=So(rl),gy=So(function(s,a){return s>=a}),Oi=Lu(function(){return arguments}())?Lu:function(s){return Xt(s)&&Rt.call(s,"callee")&&!xu.call(s,"callee")},mt=U.isArray,my=iu?Le(iu):T0;function Ee(s){return s!=null&&ko(s.length)&&!Dn(s)}function Jt(s){return Xt(s)&&Ee(s)}function py(s){return s===!0||s===!1||Xt(s)&&ve(s)==Bt}var ri=kp||Vl,by=ru?Le(ru):w0;function _y(s){return Xt(s)&&s.nodeType===1&&!ls(s)}function yy(s){if(s==null)return!0;if(Ee(s)&&(mt(s)||typeof s=="string"||typeof s.splice=="function"||ri(s)||pr(s)||Oi(s)))return!s.length;var a=pe(s);if(a==ue||a==Vt)return!s.size;if(os(s))return!al(s).length;for(var u in s)if(Rt.call(s,u))return!1;return!0}function vy(s,a){return is(s,a)}function Sy(s,a,u){u=typeof u=="function"?u:n;var g=u?u(s,a):n;return g===n?is(s,a,n,u):!!g}function Il(s){if(!Xt(s))return!1;var a=ve(s);return a==ye||a==Lt||typeof s.message=="string"&&typeof s.name=="string"&&!ls(s)}function xy(s){return typeof s=="number"&&wu(s)}function Dn(s){if(!Kt(s))return!1;var a=ve(s);return a==ee||a==Gn||a==Ot||a==Bs}function jf(s){return typeof s=="number"&&s==_t(s)}function ko(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Ht}function Kt(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function Xt(s){return s!=null&&typeof s=="object"}var Kf=su?Le(su):P0;function Ty(s,a){return s===a||ol(s,a,Tl(a))}function wy(s,a,u){return u=typeof u=="function"?u:n,ol(s,a,Tl(a),u)}function My(s){return $f(s)&&s!=+s}function Py(s){if(cb(s))throw new gt(o);return Fu(s)}function Ey(s){return s===null}function Ny(s){return s==null}function $f(s){return typeof s=="number"||Xt(s)&&ve(s)==rn}function ls(s){if(!Xt(s)||ve(s)!=fe)return!1;var a=no(s);if(a===null)return!0;var u=Rt.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Js.call(u)==wp}var Dl=ou?Le(ou):E0;function Cy(s){return jf(s)&&s>=-9007199254740991&&s<=Ht}var Yf=au?Le(au):N0;function Oo(s){return typeof s=="string"||!mt(s)&&Xt(s)&&ve(s)==pi}function Be(s){return typeof s=="symbol"||Xt(s)&&ve(s)==Yi}var pr=lu?Le(lu):C0;function ky(s){return s===n}function Oy(s){return Xt(s)&&pe(s)==bi}function Ay(s){return Xt(s)&&ve(s)==Ta}var Iy=So(ll),Dy=So(function(s,a){return s<=a});function Xf(s){if(!s)return[];if(Ee(s))return Oo(s)?an(s):Pe(s);if(Xr&&s[Xr])return hp(s[Xr]());var a=pe(s),u=a==ue?Xa:a==Vt?Xs:br;return u(s)}function Rn(s){if(!s)return s===0?s:0;if(s=Qe(s),s===Ct||s===-1/0){var a=s<0?-1:1;return a*V}return s===s?s:0}function _t(s){var a=Rn(s),u=a%1;return a===a?u?a-u:a:0}function qf(s){return s?Ei(_t(s),0,W):0}function Qe(s){if(typeof s=="number")return s;if(Be(s))return k;if(Kt(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=Kt(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=gu(s);var u=Mn.test(s);return u||vi.test(s)?Xm(s.slice(2),u?2:8):Gr.test(s)?k:+s}function Zf(s){return mn(s,Ne(s))}function Ry(s){return s?Ei(_t(s),-9007199254740991,Ht):s===0?s:0}function Dt(s){return s==null?"":Fe(s)}var Ly=dr(function(s,a){if(os(a)||Ee(a)){mn(a,le(a),s);return}for(var u in a)Rt.call(a,u)&&ts(s,u,a[u])}),Jf=dr(function(s,a){mn(a,Ne(a),s)}),Ao=dr(function(s,a,u,g){mn(a,Ne(a),s,g)}),Fy=dr(function(s,a,u,g){mn(a,le(a),s,g)}),By=An(el);function Wy(s,a){var u=hr(s);return a==null?u:Cu(u,a)}var zy=xt(function(s,a){s=Ft(s);var u=-1,g=a.length,b=g>2?a[2]:n;for(b&&Se(a[0],a[1],b)&&(g=1);++u<g;)for(var T=a[u],N=Ne(T),D=-1,L=N.length;++D<L;){var j=N[D],K=s[j];(K===n||cn(K,cr[j])&&!Rt.call(s,j))&&(s[j]=T[j])}return s}),Uy=xt(function(s){return s.push(n,mf),Re(Qf,n,s)});function Hy(s,a){return uu(s,at(a,3),gn)}function Vy(s,a){return uu(s,at(a,3),il)}function Gy(s,a){return s==null?s:nl(s,at(a,3),Ne)}function jy(s,a){return s==null?s:Du(s,at(a,3),Ne)}function Ky(s,a){return s&&gn(s,at(a,3))}function $y(s,a){return s&&il(s,at(a,3))}function Yy(s){return s==null?[]:ho(s,le(s))}function Xy(s){return s==null?[]:ho(s,Ne(s))}function Rl(s,a,u){var g=s==null?n:Ni(s,a);return g===n?u:g}function qy(s,a){return s!=null&&_f(s,a,y0)}function Ll(s,a){return s!=null&&_f(s,a,v0)}var Zy=uf(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=Qs.call(a)),s[a]=u},Bl(Ce)),Jy=uf(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=Qs.call(a)),Rt.call(s,a)?s[a].push(u):s[a]=[u]},at),Qy=xt(ns);function le(s){return Ee(s)?Eu(s):al(s)}function Ne(s){return Ee(s)?Eu(s,!0):k0(s)}function t1(s,a){var u={};return a=at(a,3),gn(s,function(g,b,T){kn(u,a(g,b,T),g)}),u}function e1(s,a){var u={};return a=at(a,3),gn(s,function(g,b,T){kn(u,b,a(g,b,T))}),u}var n1=dr(function(s,a,u){go(s,a,u)}),Qf=dr(function(s,a,u,g){go(s,a,u,g)}),i1=An(function(s,a){var u={};if(s==null)return u;var g=!1;a=Gt(a,function(T){return T=ni(T,s),g||(g=T.length>1),T}),mn(s,Sl(s),u),g&&(u=qe(u,m|p|S,Z0));for(var b=a.length;b--;)dl(u,a[b]);return u});function r1(s,a){return th(s,Co(at(a)))}var s1=An(function(s,a){return s==null?{}:A0(s,a)});function th(s,a){if(s==null)return{};var u=Gt(Sl(s),function(g){return[g]});return a=at(a),Gu(s,u,function(g,b){return a(g,b[0])})}function o1(s,a,u){a=ni(a,s);var g=-1,b=a.length;for(b||(b=1,s=n);++g<b;){var T=s==null?n:s[pn(a[g])];T===n&&(g=b,T=u),s=Dn(T)?T.call(s):T}return s}function a1(s,a,u){return s==null?s:rs(s,a,u)}function l1(s,a,u,g){return g=typeof g=="function"?g:n,s==null?s:rs(s,a,u,g)}var eh=df(le),nh=df(Ne);function c1(s,a,u){var g=mt(s),b=g||ri(s)||pr(s);if(a=at(a,4),u==null){var T=s&&s.constructor;b?u=g?new T:[]:Kt(s)?u=Dn(T)?hr(no(s)):{}:u={}}return(b?$e:gn)(s,function(N,D,L){return a(u,N,D,L)}),u}function u1(s,a){return s==null?!0:dl(s,a)}function f1(s,a,u){return s==null?s:Xu(s,a,pl(u))}function h1(s,a,u,g){return g=typeof g=="function"?g:n,s==null?s:Xu(s,a,pl(u),g)}function br(s){return s==null?[]:Ya(s,le(s))}function d1(s){return s==null?[]:Ya(s,Ne(s))}function g1(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=Qe(u),u=u===u?u:0),a!==n&&(a=Qe(a),a=a===a?a:0),Ei(Qe(s),a,u)}function m1(s,a,u){return a=Rn(a),u===n?(u=a,a=0):u=Rn(u),s=Qe(s),S0(s,a,u)}function p1(s,a,u){if(u&&typeof u!="boolean"&&Se(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=Rn(s),a===n?(a=s,s=0):a=Rn(a)),s>a){var g=s;s=a,a=g}if(u||s%1||a%1){var b=Mu();return me(s+b*(a-s+Ym("1e-"+((b+"").length-1))),a)}return ul(s,a)}var b1=gr(function(s,a,u){return a=a.toLowerCase(),s+(u?ih(a):a)});function ih(s){return Fl(Dt(s).toLowerCase())}function rh(s){return s=Dt(s),s&&s.replace(jr,ap).replace(Bm,"")}function _1(s,a,u){s=Dt(s),a=Fe(a);var g=s.length;u=u===n?g:Ei(_t(u),0,g);var b=u;return u-=a.length,u>=0&&s.slice(u,b)==a}function y1(s){return s=Dt(s),s&&Pa.test(s)?s.replace(Br,lp):s}function v1(s){return s=Dt(s),s&&Aa.test(s)?s.replace($n,"\\$&"):s}var S1=gr(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),x1=gr(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),T1=af("toLowerCase");function w1(s,a,u){s=Dt(s),a=_t(a);var g=a?ar(s):0;if(!a||g>=a)return s;var b=(a-g)/2;return vo(oo(b),u)+s+vo(so(b),u)}function M1(s,a,u){s=Dt(s),a=_t(a);var g=a?ar(s):0;return a&&g<a?s+vo(a-g,u):s}function P1(s,a,u){s=Dt(s),a=_t(a);var g=a?ar(s):0;return a&&g<a?vo(a-g,u)+s:s}function E1(s,a,u){return u||a==null?a=0:a&&(a=+a),Dp(Dt(s).replace(Ur,""),a||0)}function N1(s,a,u){return(u?Se(s,a,u):a===n)?a=1:a=_t(a),fl(Dt(s),a)}function C1(){var s=arguments,a=Dt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var k1=gr(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function O1(s,a,u){return u&&typeof u!="number"&&Se(s,a,u)&&(a=u=n),u=u===n?W:u>>>0,u?(s=Dt(s),s&&(typeof a=="string"||a!=null&&!Dl(a))&&(a=Fe(a),!a&&or(s))?ii(an(s),0,u):s.split(a,u)):[]}var A1=gr(function(s,a,u){return s+(u?" ":"")+Fl(a)});function I1(s,a,u){return s=Dt(s),u=u==null?0:Ei(_t(u),0,s.length),a=Fe(a),s.slice(u,u+a.length)==a}function D1(s,a,u){var g=x.templateSettings;u&&Se(s,a,u)&&(a=n),s=Dt(s),a=Ao({},a,g,gf);var b=Ao({},a.imports,g.imports,gf),T=le(b),N=Ya(b,T),D,L,j=0,K=a.interpolate||Qi,Y="__p += '",J=qa((a.escape||Qi).source+"|"+K.source+"|"+(K===zr?Vs:Qi).source+"|"+(a.evaluate||Qi).source+"|$","g"),ot="//# sourceURL="+(Rt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Vm+"]")+`
45
- `;s.replace(J,function(ct,Mt,kt,We,xe,ze){return kt||(kt=We),Y+=s.slice(j,ze).replace(Ra,cp),Mt&&(D=!0,Y+=`' +
46
- __e(`+Mt+`) +
47
- '`),xe&&(L=!0,Y+=`';
48
- `+xe+`;
49
- __p += '`),kt&&(Y+=`' +
50
- ((__t = (`+kt+`)) == null ? '' : __t) +
51
- '`),j=ze+ct.length,ct}),Y+=`';
52
- `;var lt=Rt.call(a,"variable")&&a.variable;if(!lt)Y=`with (obj) {
53
- `+Y+`
54
- }
55
- `;else if(Us.test(lt))throw new gt(c);Y=(L?Y.replace(Zi,""):Y).replace(wa,"$1").replace(Ma,"$1;"),Y="function("+(lt||"obj")+`) {
56
- `+(lt?"":`obj || (obj = {});
57
- `)+"var __t, __p = ''"+(D?", __e = _.escape":"")+(L?`, __j = Array.prototype.join;
58
- function print() { __p += __j.call(arguments, '') }
59
- `:`;
60
- `)+Y+`return __p
61
- }`;var vt=oh(function(){return It(T,ot+"return "+Y).apply(n,N)});if(vt.source=Y,Il(vt))throw vt;return vt}function R1(s){return Dt(s).toLowerCase()}function L1(s){return Dt(s).toUpperCase()}function F1(s,a,u){if(s=Dt(s),s&&(u||a===n))return gu(s);if(!s||!(a=Fe(a)))return s;var g=an(s),b=an(a),T=mu(g,b),N=pu(g,b)+1;return ii(g,T,N).join("")}function B1(s,a,u){if(s=Dt(s),s&&(u||a===n))return s.slice(0,_u(s)+1);if(!s||!(a=Fe(a)))return s;var g=an(s),b=pu(g,an(a))+1;return ii(g,0,b).join("")}function W1(s,a,u){if(s=Dt(s),s&&(u||a===n))return s.replace(Ur,"");if(!s||!(a=Fe(a)))return s;var g=an(s),b=mu(g,an(a));return ii(g,b).join("")}function z1(s,a){var u=it,g=$;if(Kt(a)){var b="separator"in a?a.separator:b;u="length"in a?_t(a.length):u,g="omission"in a?Fe(a.omission):g}s=Dt(s);var T=s.length;if(or(s)){var N=an(s);T=N.length}if(u>=T)return s;var D=u-ar(g);if(D<1)return g;var L=N?ii(N,0,D).join(""):s.slice(0,D);if(b===n)return L+g;if(N&&(D+=L.length-D),Dl(b)){if(s.slice(D).search(b)){var j,K=L;for(b.global||(b=qa(b.source,Dt(Vr.exec(b))+"g")),b.lastIndex=0;j=b.exec(K);)var Y=j.index;L=L.slice(0,Y===n?D:Y)}}else if(s.indexOf(Fe(b),D)!=D){var J=L.lastIndexOf(b);J>-1&&(L=L.slice(0,J))}return L+g}function U1(s){return s=Dt(s),s&&Wr.test(s)?s.replace(Fr,pp):s}var H1=gr(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Fl=af("toUpperCase");function sh(s,a,u){return s=Dt(s),a=u?n:a,a===n?fp(s)?yp(s):np(s):s.match(a)||[]}var oh=xt(function(s,a){try{return Re(s,n,a)}catch(u){return Il(u)?u:new gt(u)}}),V1=An(function(s,a){return $e(a,function(u){u=pn(u),kn(s,u,Ol(s[u],s))}),s});function G1(s){var a=s==null?0:s.length,u=at();return s=a?Gt(s,function(g){if(typeof g[1]!="function")throw new Ye(l);return[u(g[0]),g[1]]}):[],xt(function(g){for(var b=-1;++b<a;){var T=s[b];if(Re(T[0],this,g))return Re(T[1],this,g)}})}function j1(s){return p0(qe(s,m))}function Bl(s){return function(){return s}}function K1(s,a){return s==null||s!==s?a:s}var $1=cf(),Y1=cf(!0);function Ce(s){return s}function Wl(s){return Bu(typeof s=="function"?s:qe(s,m))}function X1(s){return zu(qe(s,m))}function q1(s,a){return Uu(s,qe(a,m))}var Z1=xt(function(s,a){return function(u){return ns(u,s,a)}}),J1=xt(function(s,a){return function(u){return ns(s,u,a)}});function zl(s,a,u){var g=le(a),b=ho(a,g);u==null&&!(Kt(a)&&(b.length||!g.length))&&(u=a,a=s,s=this,b=ho(a,le(a)));var T=!(Kt(u)&&"chain"in u)||!!u.chain,N=Dn(s);return $e(b,function(D){var L=a[D];s[D]=L,N&&(s.prototype[D]=function(){var j=this.__chain__;if(T||j){var K=s(this.__wrapped__),Y=K.__actions__=Pe(this.__actions__);return Y.push({func:L,args:arguments,thisArg:s}),K.__chain__=j,K}return L.apply(s,Zn([this.value()],arguments))})}),s}function Q1(){return he._===this&&(he._=Mp),this}function Ul(){}function tv(s){return s=_t(s),xt(function(a){return Hu(a,s)})}var ev=_l(Gt),nv=_l(cu),iv=_l(Va);function ah(s){return Ml(s)?Ga(pn(s)):I0(s)}function rv(s){return function(a){return s==null?n:Ni(s,a)}}var sv=ff(),ov=ff(!0);function Hl(){return[]}function Vl(){return!1}function av(){return{}}function lv(){return""}function cv(){return!0}function uv(s,a){if(s=_t(s),s<1||s>Ht)return[];var u=W,g=me(s,W);a=at(a),s-=W;for(var b=$a(g,a);++u<s;)a(u);return b}function fv(s){return mt(s)?Gt(s,pn):Be(s)?[s]:Pe(Ef(Dt(s)))}function hv(s){var a=++Tp;return Dt(s)+a}var dv=yo(function(s,a){return s+a},0),gv=yl("ceil"),mv=yo(function(s,a){return s/a},1),pv=yl("floor");function bv(s){return s&&s.length?fo(s,Ce,rl):n}function _v(s,a){return s&&s.length?fo(s,at(a,2),rl):n}function yv(s){return hu(s,Ce)}function vv(s,a){return hu(s,at(a,2))}function Sv(s){return s&&s.length?fo(s,Ce,ll):n}function xv(s,a){return s&&s.length?fo(s,at(a,2),ll):n}var Tv=yo(function(s,a){return s*a},1),wv=yl("round"),Mv=yo(function(s,a){return s-a},0);function Pv(s){return s&&s.length?Ka(s,Ce):0}function Ev(s,a){return s&&s.length?Ka(s,at(a,2)):0}return x.after=X_,x.ary=Bf,x.assign=Ly,x.assignIn=Jf,x.assignInWith=Ao,x.assignWith=Fy,x.at=By,x.before=Wf,x.bind=Ol,x.bindAll=V1,x.bindKey=zf,x.castArray=ay,x.chain=Rf,x.chunk=pb,x.compact=bb,x.concat=_b,x.cond=G1,x.conforms=j1,x.constant=Bl,x.countBy=P_,x.create=Wy,x.curry=Uf,x.curryRight=Hf,x.debounce=Vf,x.defaults=zy,x.defaultsDeep=Uy,x.defer=q_,x.delay=Z_,x.difference=yb,x.differenceBy=vb,x.differenceWith=Sb,x.drop=xb,x.dropRight=Tb,x.dropRightWhile=wb,x.dropWhile=Mb,x.fill=Pb,x.filter=N_,x.flatMap=O_,x.flatMapDeep=A_,x.flatMapDepth=I_,x.flatten=Of,x.flattenDeep=Eb,x.flattenDepth=Nb,x.flip=J_,x.flow=$1,x.flowRight=Y1,x.fromPairs=Cb,x.functions=Yy,x.functionsIn=Xy,x.groupBy=D_,x.initial=Ob,x.intersection=Ab,x.intersectionBy=Ib,x.intersectionWith=Db,x.invert=Zy,x.invertBy=Jy,x.invokeMap=L_,x.iteratee=Wl,x.keyBy=F_,x.keys=le,x.keysIn=Ne,x.map=Po,x.mapKeys=t1,x.mapValues=e1,x.matches=X1,x.matchesProperty=q1,x.memoize=No,x.merge=n1,x.mergeWith=Qf,x.method=Z1,x.methodOf=J1,x.mixin=zl,x.negate=Co,x.nthArg=tv,x.omit=i1,x.omitBy=r1,x.once=Q_,x.orderBy=B_,x.over=ev,x.overArgs=ty,x.overEvery=nv,x.overSome=iv,x.partial=Al,x.partialRight=Gf,x.partition=W_,x.pick=s1,x.pickBy=th,x.property=ah,x.propertyOf=rv,x.pull=Bb,x.pullAll=If,x.pullAllBy=Wb,x.pullAllWith=zb,x.pullAt=Ub,x.range=sv,x.rangeRight=ov,x.rearg=ey,x.reject=H_,x.remove=Hb,x.rest=ny,x.reverse=Cl,x.sampleSize=G_,x.set=a1,x.setWith=l1,x.shuffle=j_,x.slice=Vb,x.sortBy=Y_,x.sortedUniq=qb,x.sortedUniqBy=Zb,x.split=O1,x.spread=iy,x.tail=Jb,x.take=Qb,x.takeRight=t_,x.takeRightWhile=e_,x.takeWhile=n_,x.tap=b_,x.throttle=ry,x.thru=Mo,x.toArray=Xf,x.toPairs=eh,x.toPairsIn=nh,x.toPath=fv,x.toPlainObject=Zf,x.transform=c1,x.unary=sy,x.union=i_,x.unionBy=r_,x.unionWith=s_,x.uniq=o_,x.uniqBy=a_,x.uniqWith=l_,x.unset=u1,x.unzip=kl,x.unzipWith=Df,x.update=f1,x.updateWith=h1,x.values=br,x.valuesIn=d1,x.without=c_,x.words=sh,x.wrap=oy,x.xor=u_,x.xorBy=f_,x.xorWith=h_,x.zip=d_,x.zipObject=g_,x.zipObjectDeep=m_,x.zipWith=p_,x.entries=eh,x.entriesIn=nh,x.extend=Jf,x.extendWith=Ao,zl(x,x),x.add=dv,x.attempt=oh,x.camelCase=b1,x.capitalize=ih,x.ceil=gv,x.clamp=g1,x.clone=ly,x.cloneDeep=uy,x.cloneDeepWith=fy,x.cloneWith=cy,x.conformsTo=hy,x.deburr=rh,x.defaultTo=K1,x.divide=mv,x.endsWith=_1,x.eq=cn,x.escape=y1,x.escapeRegExp=v1,x.every=E_,x.find=C_,x.findIndex=Cf,x.findKey=Hy,x.findLast=k_,x.findLastIndex=kf,x.findLastKey=Vy,x.floor=pv,x.forEach=Lf,x.forEachRight=Ff,x.forIn=Gy,x.forInRight=jy,x.forOwn=Ky,x.forOwnRight=$y,x.get=Rl,x.gt=dy,x.gte=gy,x.has=qy,x.hasIn=Ll,x.head=Af,x.identity=Ce,x.includes=R_,x.indexOf=kb,x.inRange=m1,x.invoke=Qy,x.isArguments=Oi,x.isArray=mt,x.isArrayBuffer=my,x.isArrayLike=Ee,x.isArrayLikeObject=Jt,x.isBoolean=py,x.isBuffer=ri,x.isDate=by,x.isElement=_y,x.isEmpty=yy,x.isEqual=vy,x.isEqualWith=Sy,x.isError=Il,x.isFinite=xy,x.isFunction=Dn,x.isInteger=jf,x.isLength=ko,x.isMap=Kf,x.isMatch=Ty,x.isMatchWith=wy,x.isNaN=My,x.isNative=Py,x.isNil=Ny,x.isNull=Ey,x.isNumber=$f,x.isObject=Kt,x.isObjectLike=Xt,x.isPlainObject=ls,x.isRegExp=Dl,x.isSafeInteger=Cy,x.isSet=Yf,x.isString=Oo,x.isSymbol=Be,x.isTypedArray=pr,x.isUndefined=ky,x.isWeakMap=Oy,x.isWeakSet=Ay,x.join=Rb,x.kebabCase=S1,x.last=Je,x.lastIndexOf=Lb,x.lowerCase=x1,x.lowerFirst=T1,x.lt=Iy,x.lte=Dy,x.max=bv,x.maxBy=_v,x.mean=yv,x.meanBy=vv,x.min=Sv,x.minBy=xv,x.stubArray=Hl,x.stubFalse=Vl,x.stubObject=av,x.stubString=lv,x.stubTrue=cv,x.multiply=Tv,x.nth=Fb,x.noConflict=Q1,x.noop=Ul,x.now=Eo,x.pad=w1,x.padEnd=M1,x.padStart=P1,x.parseInt=E1,x.random=p1,x.reduce=z_,x.reduceRight=U_,x.repeat=N1,x.replace=C1,x.result=o1,x.round=wv,x.runInContext=R,x.sample=V_,x.size=K_,x.snakeCase=k1,x.some=$_,x.sortedIndex=Gb,x.sortedIndexBy=jb,x.sortedIndexOf=Kb,x.sortedLastIndex=$b,x.sortedLastIndexBy=Yb,x.sortedLastIndexOf=Xb,x.startCase=A1,x.startsWith=I1,x.subtract=Mv,x.sum=Pv,x.sumBy=Ev,x.template=D1,x.times=uv,x.toFinite=Rn,x.toInteger=_t,x.toLength=qf,x.toLower=R1,x.toNumber=Qe,x.toSafeInteger=Ry,x.toString=Dt,x.toUpper=L1,x.trim=F1,x.trimEnd=B1,x.trimStart=W1,x.truncate=z1,x.unescape=U1,x.uniqueId=hv,x.upperCase=H1,x.upperFirst=Fl,x.each=Lf,x.eachRight=Ff,x.first=Af,zl(x,function(){var s={};return gn(x,function(a,u){Rt.call(x.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),x.VERSION=r,$e(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){x[s].placeholder=x}),$e(["drop","take"],function(s,a){Nt.prototype[s]=function(u){u=u===n?1:se(_t(u),0);var g=this.__filtered__&&!a?new Nt(this):this.clone();return g.__filtered__?g.__takeCount__=me(u,g.__takeCount__):g.__views__.push({size:me(u,W),type:s+(g.__dir__<0?"Right":"")}),g},Nt.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),$e(["filter","map","takeWhile"],function(s,a){var u=a+1,g=u==dt||u==wt;Nt.prototype[s]=function(b){var T=this.clone();return T.__iteratees__.push({iteratee:at(b,3),type:u}),T.__filtered__=T.__filtered__||g,T}}),$e(["head","last"],function(s,a){var u="take"+(a?"Right":"");Nt.prototype[s]=function(){return this[u](1).value()[0]}}),$e(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Nt.prototype[s]=function(){return this.__filtered__?new Nt(this):this[u](1)}}),Nt.prototype.compact=function(){return this.filter(Ce)},Nt.prototype.find=function(s){return this.filter(s).head()},Nt.prototype.findLast=function(s){return this.reverse().find(s)},Nt.prototype.invokeMap=xt(function(s,a){return typeof s=="function"?new Nt(this):this.map(function(u){return ns(u,s,a)})}),Nt.prototype.reject=function(s){return this.filter(Co(at(s)))},Nt.prototype.slice=function(s,a){s=_t(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Nt(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=_t(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Nt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Nt.prototype.toArray=function(){return this.take(W)},gn(Nt.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),g=/^(?:head|last)$/.test(a),b=x[g?"take"+(a=="last"?"Right":""):a],T=g||/^find/.test(a);b&&(x.prototype[a]=function(){var N=this.__wrapped__,D=g?[1]:arguments,L=N instanceof Nt,j=D[0],K=L||mt(N),Y=function(Mt){var kt=b.apply(x,Zn([Mt],D));return g&&J?kt[0]:kt};K&&u&&typeof j=="function"&&j.length!=1&&(L=K=!1);var J=this.__chain__,ot=!!this.__actions__.length,lt=T&&!J,vt=L&&!ot;if(!T&&K){N=vt?N:new Nt(this);var ct=s.apply(N,D);return ct.__actions__.push({func:Mo,args:[Y],thisArg:n}),new Xe(ct,J)}return lt&&vt?s.apply(this,D):(ct=this.thru(Y),lt?g?ct.value()[0]:ct.value():ct)})}),$e(["pop","push","shift","sort","splice","unshift"],function(s){var a=qs[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",g=/^(?:pop|shift)$/.test(s);x.prototype[s]=function(){var b=arguments;if(g&&!this.__chain__){var T=this.value();return a.apply(mt(T)?T:[],b)}return this[u](function(N){return a.apply(mt(N)?N:[],b)})}}),gn(Nt.prototype,function(s,a){var u=x[a];if(u){var g=u.name+"";Rt.call(fr,g)||(fr[g]=[]),fr[g].push({name:a,func:u})}}),fr[_o(n,y).name]=[{name:"wrapper",func:n}],Nt.prototype.clone=Up,Nt.prototype.reverse=Hp,Nt.prototype.value=Vp,x.prototype.at=__,x.prototype.chain=y_,x.prototype.commit=v_,x.prototype.next=S_,x.prototype.plant=T_,x.prototype.reverse=w_,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=M_,x.prototype.first=x.prototype.head,Xr&&(x.prototype[Xr]=x_),x},lr=vp();Ti?((Ti.exports=lr)._=lr,Wa._=lr):he._=lr}).call(Fi)})(da,da.exports);var ms=da.exports,wm={},sc={},oc={},ac={},kc={exports:{}};/**
62
- * @license Fraction.js v4.3.7 31/08/2023
63
- * https://www.xarg.org/2014/03/rational-numbers-in-javascript/
64
- *
65
- * Copyright (c) 2023, Robert Eisele (robert@raw.org)
66
- * Dual licensed under the MIT or GPL Version 2 licenses.
67
- **/(function(e,t){(function(n){var r=2e3,i={s:1,n:0,d:1};function o(y,v){if(isNaN(y=parseInt(y,10)))throw E();return y*v}function l(y,v){if(v===0)throw P();var C=Object.create(S.prototype);C.s=y<0?-1:1,y=y<0?-y:y;var w=p(y,v);return C.n=y/w,C.d=v/w,C}function c(y){for(var v={},C=y,w=2,O=4;O<=C;){for(;C%w===0;)C/=w,v[w]=(v[w]||0)+1;O+=1+2*w++}return C!==y?C>1&&(v[C]=(v[C]||0)+1):v[y]=(v[y]||0)+1,v}var f=function(y,v){var C=0,w=1,O=1,B=0,F=0,H=0,Z=1,it=1,$=0,X=1,bt=1,dt=1,ft=1e7,wt;if(y!=null)if(v!==void 0){if(C=y,w=v,O=C*w,C%1!==0||w%1!==0)throw I()}else switch(typeof y){case"object":{if("d"in y&&"n"in y)C=y.n,w=y.d,"s"in y&&(C*=y.s);else if(0 in y)C=y[0],1 in y&&(w=y[1]);else throw E();O=C*w;break}case"number":{if(y<0&&(O=y,y=-y),y%1===0)C=y;else if(y>0){for(y>=1&&(it=Math.pow(10,Math.floor(1+Math.log(y)/Math.LN10)),y/=it);X<=ft&&dt<=ft;)if(wt=($+bt)/(X+dt),y===wt){X+dt<=ft?(C=$+bt,w=X+dt):dt>X?(C=bt,w=dt):(C=$,w=X);break}else y>wt?($+=bt,X+=dt):(bt+=$,dt+=X),X>ft?(C=bt,w=dt):(C=$,w=X);C*=it}else(isNaN(y)||isNaN(v))&&(w=C=NaN);break}case"string":{if(X=y.match(/\d+|./g),X===null)throw E();if(X[$]==="-"?(O=-1,$++):X[$]==="+"&&$++,X.length===$+1?F=o(X[$++],O):X[$+1]==="."||X[$]==="."?(X[$]!=="."&&(B=o(X[$++],O)),$++,($+1===X.length||X[$+1]==="("&&X[$+3]===")"||X[$+1]==="'"&&X[$+3]==="'")&&(F=o(X[$],O),Z=Math.pow(10,X[$].length),$++),(X[$]==="("&&X[$+2]===")"||X[$]==="'"&&X[$+2]==="'")&&(H=o(X[$+1],O),it=Math.pow(10,X[$+1].length)-1,$+=3)):X[$+1]==="/"||X[$+1]===":"?(F=o(X[$],O),Z=o(X[$+2],1),$+=3):X[$+3]==="/"&&X[$+1]===" "&&(B=o(X[$],O),F=o(X[$+2],O),Z=o(X[$+4],1),$+=5),X.length<=$){w=Z*it,O=C=H+w*B+it*F;break}}default:throw E()}if(w===0)throw P();i.s=O<0?-1:1,i.n=Math.abs(C),i.d=Math.abs(w)};function h(y,v,C){for(var w=1;v>0;y=y*y%C,v>>=1)v&1&&(w=w*y%C);return w}function d(y,v){for(;v%2===0;v/=2);for(;v%5===0;v/=5);if(v===1)return 0;for(var C=10%v,w=1;C!==1;w++)if(C=C*10%v,w>r)return 0;return w}function m(y,v,C){for(var w=1,O=h(10,C,v),B=0;B<300;B++){if(w===O)return B;w=w*10%v,O=O*10%v}return 0}function p(y,v){if(!y)return v;if(!v)return y;for(;;){if(y%=v,!y)return v;if(v%=y,!v)return y}}function S(y,v){if(f(y,v),this instanceof S)y=p(i.d,i.n),this.s=i.s,this.n=i.n/y,this.d=i.d/y;else return l(i.s*i.n,i.d)}var P=function(){return new Error("Division by Zero")},E=function(){return new Error("Invalid argument")},I=function(){return new Error("Parameters must be integer")};S.prototype={s:1,n:0,d:1,abs:function(){return l(this.n,this.d)},neg:function(){return l(-this.s*this.n,this.d)},add:function(y,v){return f(y,v),l(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(y,v){return f(y,v),l(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(y,v){return f(y,v),l(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(y,v){return f(y,v),l(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return l(this.s*this.n,this.d)},mod:function(y,v){if(isNaN(this.n)||isNaN(this.d))return new S(NaN);if(y===void 0)return l(this.s*this.n%this.d,1);if(f(y,v),i.n===0&&this.d===0)throw P();return l(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d)},gcd:function(y,v){return f(y,v),l(p(i.n,this.n)*p(i.d,this.d),i.d*this.d)},lcm:function(y,v){return f(y,v),i.n===0&&this.n===0?l(0,1):l(i.n*this.n,p(i.n,this.n)*p(i.d,this.d))},ceil:function(y){return y=Math.pow(10,y||0),isNaN(this.n)||isNaN(this.d)?new S(NaN):l(Math.ceil(y*this.s*this.n/this.d),y)},floor:function(y){return y=Math.pow(10,y||0),isNaN(this.n)||isNaN(this.d)?new S(NaN):l(Math.floor(y*this.s*this.n/this.d),y)},round:function(y){return y=Math.pow(10,y||0),isNaN(this.n)||isNaN(this.d)?new S(NaN):l(Math.round(y*this.s*this.n/this.d),y)},roundTo:function(y,v){return f(y,v),l(this.s*Math.round(this.n*i.d/(this.d*i.n))*i.n,i.d)},inverse:function(){return l(this.s*this.d,this.n)},pow:function(y,v){if(f(y,v),i.d===1)return i.s<0?l(Math.pow(this.s*this.d,i.n),Math.pow(this.n,i.n)):l(Math.pow(this.s*this.n,i.n),Math.pow(this.d,i.n));if(this.s<0)return null;var C=c(this.n),w=c(this.d),O=1,B=1;for(var F in C)if(F!=="1"){if(F==="0"){O=0;break}if(C[F]*=i.n,C[F]%i.d===0)C[F]/=i.d;else return null;O*=Math.pow(F,C[F])}for(var F in w)if(F!=="1"){if(w[F]*=i.n,w[F]%i.d===0)w[F]/=i.d;else return null;B*=Math.pow(F,w[F])}return i.s<0?l(B,O):l(O,B)},equals:function(y,v){return f(y,v),this.s*this.n*i.d===i.s*i.n*this.d},compare:function(y,v){f(y,v);var C=this.s*this.n*i.d-i.s*i.n*this.d;return(0<C)-(C<0)},simplify:function(y){if(isNaN(this.n)||isNaN(this.d))return this;y=y||.001;for(var v=this.abs(),C=v.toContinued(),w=1;w<C.length;w++){for(var O=l(C[w-1],1),B=w-2;B>=0;B--)O=O.inverse().add(C[B]);if(Math.abs(O.sub(v).valueOf())<y)return O.mul(this.s)}return this},divisible:function(y,v){return f(y,v),!(!(i.n*this.d)||this.n*i.d%(i.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(y){var v,C="",w=this.n,O=this.d;return this.s<0&&(C+="-"),O===1?C+=w:(y&&(v=Math.floor(w/O))>0&&(C+=v,C+=" ",w%=O),C+=w,C+="/",C+=O),C},toLatex:function(y){var v,C="",w=this.n,O=this.d;return this.s<0&&(C+="-"),O===1?C+=w:(y&&(v=Math.floor(w/O))>0&&(C+=v,w%=O),C+="\\frac{",C+=w,C+="}{",C+=O,C+="}"),C},toContinued:function(){var y,v=this.n,C=this.d,w=[];if(isNaN(v)||isNaN(C))return w;do w.push(Math.floor(v/C)),y=v%C,v=C,C=y;while(v!==1);return w},toString:function(y){var v=this.n,C=this.d;if(isNaN(v)||isNaN(C))return"NaN";y=y||15;var w=d(v,C),O=m(v,C,w),B=this.s<0?"-":"";if(B+=v/C|0,v%=C,v*=10,v&&(B+="."),w){for(var F=O;F--;)B+=v/C|0,v%=C,v*=10;B+="(";for(var F=w;F--;)B+=v/C|0,v%=C,v*=10;B+=")"}else for(var F=y;v&&F--;)B+=v/C|0,v%=C,v*=10;return B}},Object.defineProperty(t,"__esModule",{value:!0}),t.default=S,e.exports=S})()})(kc,kc.exports);var _P=kc.exports,lc={},Sn={},xn={};Object.defineProperty(xn,"__esModule",{value:!0});xn.convertStringToNumber=xn.getLocaleFormatFromString=xn.getLocaleFormat=xn.isLocaleSupported=void 0;function yP(e){const t=[e],n={localeMatcher:"lookup"};return Intl.NumberFormat.supportedLocalesOf(t,n).length>0}xn.isLocaleSupported=yP;function vP(e){const t={bg:{decimal:",",thousands:" "},ca:{decimal:",",thousands:"."},cs:{decimal:",",thousands:" "},da:{decimal:",",thousands:"."},de:{decimal:",",thousands:"."},el:{decimal:",",thousands:"."},en:{decimal:".",thousands:","},es:{decimal:",",thousands:"."},fi:{decimal:",",thousands:" "},fr:{decimal:",",thousands:" "},ssr:{decimal:".",thousands:"'"},hu:{decimal:",",thousands:" "},it:{decimal:",",thousands:"."},slf:{decimal:".",thousands:"'"},ja:{decimal:".",thousands:"'"},nl:{decimal:",",thousands:"."},no:{decimal:",",thousands:" "},nb:{decimal:",",thousands:" "},nn:{decimal:",",thousands:" "},pl:{decimal:",",thousands:" "},pt:{decimal:",",thousands:"."},ro:{decimal:",",thousands:"."},ru:{decimal:",",thousands:" "},hr:{decimal:",",thousands:"."},sr:{decimal:",",thousands:"."},sv:{decimal:",",thousands:"."},tr:{decimal:",",thousands:"."},id:{decimal:".",thousands:","},uk:{decimal:",",thousands:" "},be:{decimal:",",thousands:" "},sl:{decimal:",",thousands:"."},et:{decimal:".",thousands:" "},lv:{decimal:",",thousands:" "},lt:{decimal:",",thousands:"."},af:{decimal:".",thousands:","},fo:{decimal:",",thousands:"."}},n={thousands:",",decimal:".",useGrouping:!0},r=e.search("-");r>0&&(e=e.substr(0,r));const i=t[e];if(i){try{const l=new Intl.NumberFormat(e).resolvedOptions();i.useGrouping=l.useGrouping}catch{i.useGrouping=!0}return i}return n}xn.getLocaleFormat=vP;function SP(e){const t={thousands:",",decimal:".",useGrouping:!0};e.trim();let n=e.indexOf(" ");n>0&&(t.thousands=" ");const r=e.indexOf(".");return n=e.indexOf(","),r<n&&(t.decimal=",",r>0&&(t.thousands=".")),t}xn.getLocaleFormatFromString=SP;function xP(e,{thousands:t=",",decimal:n=".",useGrouping:r=!0}){if(typeof e=="number")return e;const i=r?3:1,o=new RegExp("^\\s*([+-]?(?:(?:\\d{1,3}(?:\\"+t+"\\d{"+i+",3})+)|\\d*))(?:\\"+n+"(\\d*))?\\s*$"),l=e.match(o);if(!(l!=null&&l.length===3))return e;const c=l[1].replace(new RegExp("\\"+t,"g"),""),f=l[2];return parseFloat(c+"."+f)}xn.convertStringToNumber=xP;Object.defineProperty(Sn,"__esModule",{value:!0});Sn.convertArrayFromLocale=Sn.convertNumberFromLocale=Sn.convertArrayToLocale=Sn.convertNumberToLocale=void 0;const xr=xn,Tr={maximumFractionDigits:20};function TP(e,t){let n;try{t?n=new Intl.NumberFormat(t,Tr):n=new Intl.NumberFormat(void 0,Tr)}catch{n=new Intl.NumberFormat(void 0,Tr)}return n.format(e)}Sn.convertNumberToLocale=TP;function wP(e,t){let n;try{t?n=new Intl.NumberFormat(t,Tr):n=new Intl.NumberFormat(void 0,Tr)}catch{n=new Intl.NumberFormat(void 0,Tr)}return e.map(n.format)}Sn.convertArrayToLocale=wP;function MP(e,t){let n;return t?n=(0,xr.getLocaleFormat)(t):n=(0,xr.getLocaleFormatFromString)(e),(0,xr.convertStringToNumber)(e,n)}Sn.convertNumberFromLocale=MP;function PP(e,t){let n;if(t)n=(0,xr.getLocaleFormat)(t);else{let r=e==null?void 0:e.findIndex(i=>i.includes(",")||i.includes("."));r<0&&(r=0),n=(0,xr.getLocaleFormatFromString)(e[r])}return e.map(r=>(0,xr.convertStringToNumber)(r,n))}Sn.convertArrayFromLocale=PP;var cc={},uc={},$d;function kr(){return $d||($d=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toString=e.toNum=e.isScientificStringNum=e.isValidNum=void 0;const t=mi(),n=Fs(),r=Ls(),i=h=>typeof h=="string"&&(0,n.isValueWithUnit)(h)?(0,n.getValue)(h):h,o=h=>{const d=i(h);if((0,t.isEmptyString)(d)||Number.isNaN(d)||d===1/0||d===-1/0)return!0;if(!((0,t.isNull)(d)||(0,t.isUndefined)(d)||(0,t.isTrailingPeriodSeparator)(d)||(0,t.isTrailingCommaSeparator)(d)||(0,t.isArray)(d)||(0,t.isObject)(d))){const m=(0,t.cleanNumStr)(String(d));if(m.includes(n.SEPARATOR))return!1;const p=(0,t.isFraction)(m)?(0,t.numFraction)(m):(0,t.isNumeric)(m)?parseFloat(m):m;if(p===1/0||p===-1/0)return!0;if(!(0,t.isNumeric)(p))return!1;if(!Number.isNaN(p))return!0}return!1};e.isValidNum=o;const l=h=>typeof h=="string"?(0,e.isValidNum)(h)&&h.toLowerCase().includes("e"):!1;e.isScientificStringNum=l;const c=(h,d,m)=>{const p=d??h,S=i(h);if((0,e.isValidNum)(S)){const P=(0,t.cleanNumStr)(String(S)),E=(0,t.isFraction)(P)?(0,t.numFraction)(P):(0,t.isNumeric)(P)?parseFloat(P):P;return E===1/0||E===-1/0?E:Number.isNaN(E)||!(0,t.isNumeric)(E)?p:m&&E<m?m:E}else return p};e.toNum=c;const f=h=>{if((0,e.isValidNum)(h)){if(typeof h=="string")return h;if(typeof h=="number")return Number.isNaN(h)||!Number.isFinite(h)?String(h):(0,r.formatDecimalDisplayNumber)(h,{noThousandsSeparator:!0})}return h};e.toString=f}(uc)),uc}var Yd;function qc(){return Yd||(Yd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unParseNumber=e.parseNumber=e.hasTrailingZeros=e.countTrailingZeros=void 0;const t=Fs(),n=kr(),r=mi(),i=(h,d=!1)=>{var m,p,S,P;const E=d?/0+((?=[|eE])|$)/:/(0+|0+\.0+)((?=[|eE])|$)/;return typeof h=="string"&&(!d||h.includes(".")||h.includes(","))&&(P=(S=(p=(m=h==null?void 0:h.match(E))===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.replaceAll(/[.,]/g,""))===null||S===void 0?void 0:S.length)!==null&&P!==void 0?P:0};e.countTrailingZeros=i;const o=h=>(0,e.countTrailingZeros)(h)>0;e.hasTrailingZeros=o;const l=(h,d=!1)=>{const m=typeof h=="string",p=m&&(0,t.isValueWithUnit)(h),S=p?(0,t.getUnit)(h):null,P=(0,r.cleanNumStr)(p?(0,t.getValue)(h):h);return{number:d&&(0,e.hasTrailingZeros)(h)?P:(0,n.toNum)(P),unit:S,isString:m}};e.parseNumber=l;const c=(h,d)=>String(d?h:(0,n.toString)(h)),f=({value:h,unit:d,isString:m,isScientific:p})=>{const S=typeof h=="number"&&m?c(h,p):h;return d?(0,t.withUnit)(S,d):S};e.unParseNumber=f}(cc)),cc}var fc={},hc={},Xd;function Mm(){return Xd||(Xd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isDeepCloseTo=e.isCloseToOrLessThan=e.isCloseToOrGreaterThan=e.isCloseTo=e.DEFAULT_MAX_RELATIVE_DIFF=void 0;const t=qc(),n=Fs(),r=kr(),i=mi();e.DEFAULT_MAX_RELATIVE_DIFF=Number.EPSILON;const o=(m,p)=>{const{number:S,unit:P}=(0,t.parseNumber)(m),{number:E,unit:I}=(0,t.parseNumber)(p),v=P&&I&&P!==I?(0,n.convertAndGetValue)(E,P,I):E;return{firstNumber:S,secondNumber:v}},l=m=>{if(m!=null){if((0,i.isNumeric)(m)&&typeof m=="number")return m;if((0,i.isPercentage)(m)){const p=(0,r.toNum)(m==null?void 0:m.toString().replace("%",""));if((0,i.isNumeric)(p))return p/100}}return null},c=(m,p,S={relativeDiff:e.DEFAULT_MAX_RELATIVE_DIFF})=>{const{relativeDiff:P,absoluteDiff:E}=S,y=l(P??E);if(m===null||p===null)return!1;const v=(0,n.isValueWithUnit)(m),C=(0,n.isValueWithUnit)(p);if(v&&!C||!v&&C)throw new Error(`Parameters must either both have units or both not have units. Received "${m}" and "${p}"`);if(y===null)return console.warn("Tolerance number is not defined!"),m===p;if(y<=0||y<Number.EPSILON)throw Error("Unpredictable results - toleranceNumber should be bigger than zero or less then EPSILON");const{firstNumber:w,secondNumber:O}=o(m,p);if((w===1/0||w==="Infinity")&&(O===1/0||O==="Infinity")||(w===-1/0||w==="-Infinity")&&(O===-1/0||O==="-Infinity"))return!0;if(typeof w=="number"&&typeof O=="number"){if(w===O)return!0;if(E||w===0||O===0){const B=Math.abs(w-O);return(0,e.isCloseTo)(B,y,{relativeDiff:"1%"})||B<y}else return 2*Math.abs((w-O)/(w+O))<y}return!1};e.isCloseTo=c;const f=(m,p,S={relativeDiff:e.DEFAULT_MAX_RELATIVE_DIFF})=>{if(m===null||p===null)return!1;const{firstNumber:P,secondNumber:E}=o(m,p);return typeof P=="number"&&typeof E=="number"?(0,e.isCloseTo)(P,E,S)||P>E:!1};e.isCloseToOrGreaterThan=f;const h=(m,p,S={relativeDiff:e.DEFAULT_MAX_RELATIVE_DIFF})=>{if(m===null||p===null)return!1;const{firstNumber:P,secondNumber:E}=o(m,p);return typeof P=="number"&&typeof E=="number"?(0,e.isCloseTo)(P,E,S)||P<E:!1};e.isCloseToOrLessThan=h;const d=(m,p,S={relativeDiff:e.DEFAULT_MAX_RELATIVE_DIFF})=>{if(Array.isArray(m)&&Array.isArray(p))return m.length!==p.length?!1:m.every((P,E)=>(0,e.isDeepCloseTo)(P,p[E],S));if(typeof m=="object"&&m!==null&&typeof p=="object"&&p!==null){const P=Object.keys(m),E=Object.keys(p);return P.length!==E.length?!1:P.every(I=>(0,e.isDeepCloseTo)(m[I],p[I],S))}return Number.isNaN(m)&&Number.isNaN(p)||m===""&&p===""?!0:typeof m=="number"&&typeof p=="number"||(0,n.isValueWithUnit)(m)&&(0,n.isValueWithUnit)(p)||(0,r.isValidNum)(m)&&(0,r.isValidNum)(p)?(0,e.isCloseTo)(m,p,S):!0};e.isDeepCloseTo=d}(hc)),hc}var qd;function Zc(){return qd||(qd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.roundToFixed=e.roundByRange=e.roundNumberByRange=e.roundByMagnitudeToFixed=e.roundByMagnitude=e.roundNumberByMagnitude=e.roundToDecimalPrecision=e.roundToPrecision=e.roundNumberToDecimalPrecision=e.roundNumberToFixedPrecision=e.roundNumberToPrecision=e.round=e.roundNumber=void 0;const t=qc(),n=mi(),r=kr(),i=Ls(),o=Mm(),l=4,c=(w,O=l)=>{const B=10**O;return Math.round(w*B)/B};e.roundNumber=c;const f=(w,O=l)=>{if(typeof w=="number")return(0,e.roundNumber)(w,O);if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;const{number:B,unit:F,isString:H}=(0,t.parseNumber)(w),Z=!(0,n.isNumeric)(B)||typeof B=="string"&&B.endsWith(".")?w:(0,e.roundNumber)(B,O);return(0,t.unParseNumber)({value:Z,unit:F,isString:H,isScientific:(0,r.isScientificStringNum)(w)})};e.round=f;const h=(w,O=l)=>Number(w.toPrecision(O));e.roundNumberToPrecision=h;const d=(w,O=l)=>{const B=(0,r.toNum)(w).toPrecision(O),[F,H]=B.split(".");if(H){const Z=O-F.length;return`${F}.${H.padEnd(Z,"0")}`}else return F};e.roundNumberToFixedPrecision=d;const m=(w,O=l)=>{if(Math.abs(w)>1){const[B,F]=(0,i.formatDecimal)(w,"").split(".");if(F){const H=(+`0.${F}`).toPrecision(O).slice(1);return Number(B+H)}else return w}return(0,e.roundNumberToPrecision)(w,O)};e.roundNumberToDecimalPrecision=m;const p=(w,O=l)=>{if(typeof w=="number")return(0,e.roundNumberToPrecision)(w,O);if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;const{number:B,unit:F,isString:H}=(0,t.parseNumber)(w),Z=!(0,n.isNumeric)(B)||typeof B=="string"&&B.endsWith(".")?w:(0,e.roundNumberToPrecision)(B,O);return(0,t.unParseNumber)({value:Z,unit:F,isString:H,isScientific:(0,r.isScientificStringNum)(w)})};e.roundToPrecision=p;const S=(w,O=l)=>{if(typeof w=="number")return(0,e.roundNumberToDecimalPrecision)(w,O);if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;const{number:B,unit:F,isString:H}=(0,t.parseNumber)(w),Z=!(0,n.isNumeric)(B)||typeof B=="string"&&B.endsWith(".")?w:(0,e.roundNumberToDecimalPrecision)(B,O);return(0,t.unParseNumber)({value:Z,unit:F,isString:H,isScientific:(0,r.isScientificStringNum)(w)})};e.roundToDecimalPrecision=S;const P=(w,O=l,B=!1)=>{const F=10**O,H=F&&w>F?(0,e.roundNumber)(w,0):B?(0,e.roundNumberToFixedPrecision)(w,O):(0,e.roundNumberToPrecision)(w,O);return B?String(H):H};e.roundNumberByMagnitude=P;const E=(w,O=l)=>{if(typeof w=="number")return(0,e.roundNumberByMagnitude)(w,O);if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;const{number:B,unit:F,isString:H}=(0,t.parseNumber)(w),Z=!(0,n.isNumeric)(B)||typeof B=="string"&&B.endsWith(".")?w:(0,e.roundNumberByMagnitude)(B,O);return(0,t.unParseNumber)({value:Z,unit:F,isString:H,isScientific:(0,r.isScientificStringNum)(w)})};e.roundByMagnitude=E;const I=(w,O=l)=>{if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;if(typeof w=="number")return(0,e.roundNumberByMagnitude)(w,O,!0);const{number:F,unit:H}=(0,t.parseNumber)(w,!0),Z=!(0,n.isNumeric)(F)||typeof F=="string"&&F.endsWith(".")?w:(0,e.roundNumberByMagnitude)(F,O,!0);return(0,t.unParseNumber)({value:Z,unit:H,isString:!0,isScientific:(0,r.isScientificStringNum)(w)})};e.roundByMagnitudeToFixed=I;const y=(w,O,B,F=l)=>{if((0,o.isCloseToOrLessThan)(B,O))return w;const H=B-O,Z=Math.floor(Math.log10(H)),it=Math.max(F,0-Z);return(0,e.roundNumber)(w,it)};e.roundNumberByRange=y;const v=(w,O,B,F=l)=>{if(typeof w=="number")return(0,e.roundNumberByRange)(w,O,B,F);if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;const{number:H,unit:Z,isString:it}=(0,t.parseNumber)(w),$=!(0,n.isNumeric)(H)||typeof H=="string"&&H.endsWith(".")?w:(0,e.roundNumberByRange)(H,O,B,F);return(0,t.unParseNumber)({value:$,unit:Z,isString:it,isScientific:(0,r.isScientificStringNum)(w)})};e.roundByRange=v;const C=(w,O=l)=>{if(w===null||Number.isNaN(w)||w===1/0||w===-1/0||w===void 0)return w;if(typeof w=="number")return w.toFixed(O);const{number:B,unit:F,isString:H}=(0,t.parseNumber)(w),Z=!(0,n.isNumeric)(B)||typeof B=="string"&&B.endsWith(".")?w:B.toFixed(O);return(0,t.unParseNumber)({value:Z,unit:F,isString:H,isScientific:(0,r.isScientificStringNum)(w)})};e.roundToFixed=C}(fc)),fc}var Zd;function Ls(){return Zd||(Zd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.displayNumberToFixed=e.displayNumber=e.formatDisplayNumber=e.formatScientificDisplayNumber=e.formatDecimalDisplayNumber=e.formatDecimal=void 0;const t=Sn,n=qc(),r=kr(),i=Zc(),o=mi(),l=Jc(),c=1e-4,f=1e7,h={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻"},d=(y,v)=>{const C="0".repeat(v);return v>0&&y!=="0"?y.includes(".")?`${y}${C}`:`${y}.${C}`:y},m=(y,v,C=!1)=>{const w=(0,t.convertNumberToLocale)((0,r.toNum)(y),"en-US").replaceAll(",",v);return C?d(w,(0,n.countTrailingZeros)(y,!0)):w};e.formatDecimal=m;const p=(y,v)=>{const{nonBreakingSpace:C}=v??{};if(y==="")return y;if(y==null)return"";if(!(0,r.isValidNum)(y))return(0,o.trim)(y.toString());const w=v!=null&&v.noThousandsSeparator?"":C?" ":" ";return(0,e.formatDecimal)(y,w,v==null?void 0:v.preserveTrailingZeros)};e.formatDecimalDisplayNumber=p;const S=(y,v)=>{const{roundScientificCoefficient:C,eNotation:w}=v??{};if(Number.isNaN(y))return"Invalid";if(y==null)return"";if(!(0,r.isValidNum)(y)||y==="")return(0,o.trim)(y.toString());const O=(0,r.toNum)(y);if(!Number.isFinite(O))return(0,o.trim)(y.toString());const B=w?"e":"·10",[F,H]=O.toExponential().split("e"),Z=typeof C=="number"?(0,i.round)(F,C):F,it=H==="+0"||H==="-0",$=[...H.replaceAll("+","")].map(X=>w?X:h[X]).join("");return it?Z:`${Z}${B}${$}`};e.formatScientificDisplayNumber=S;const P=(y,v)=>{const C=Math.abs((0,r.toNum)(y));return((v==null?void 0:v.scientific)==="auto"&&(v!=null&&v.autoScientificBelow)&&(v!=null&&v.autoScientificAbove)?C<(v==null?void 0:v.autoScientificBelow)||C>(v==null?void 0:v.autoScientificAbove):v==null?void 0:v.scientific)?(0,e.formatScientificDisplayNumber)(y,v):(0,e.formatDecimalDisplayNumber)(y,v)};e.formatDisplayNumber=P;const E=(y,v)=>{var C,w,O,B,F,H;const Z={scientific:(C=v==null?void 0:v.scientific)!==null&&C!==void 0?C:"auto",eNotation:(w=v==null?void 0:v.eNotation)!==null&&w!==void 0?w:!1,autoScientificBelow:(O=v==null?void 0:v.autoScientificBelow)!==null&&O!==void 0?O:c,autoScientificAbove:(B=v==null?void 0:v.autoScientificAbove)!==null&&B!==void 0?B:f,withUnit:(F=v==null?void 0:v.withUnit)!==null&&F!==void 0?F:!1,nonBreakingSpace:(H=v==null?void 0:v.nonBreakingSpace)!==null&&H!==void 0?H:!1,roundScientificCoefficient:v==null?void 0:v.roundScientificCoefficient},{withUnit:it}=Z;if(y==null)return"";const{number:$,unit:X}=(0,n.parseNumber)(y),bt=(0,e.formatDisplayNumber)($,Z),dt=X?l.LABELS===null||l.LABELS===void 0?void 0:l.LABELS[X]:"";return it&&X?bt===""?dt:`${bt} ${dt}`:bt};e.displayNumber=E;const I=(y,v)=>{var C,w,O,B,F,H;const Z={scientific:(C=v==null?void 0:v.scientific)!==null&&C!==void 0?C:"auto",eNotation:(w=v==null?void 0:v.eNotation)!==null&&w!==void 0?w:!1,autoScientificBelow:(O=v==null?void 0:v.autoScientificBelow)!==null&&O!==void 0?O:c,autoScientificAbove:(B=v==null?void 0:v.autoScientificAbove)!==null&&B!==void 0?B:f,withUnit:(F=v==null?void 0:v.withUnit)!==null&&F!==void 0?F:!1,nonBreakingSpace:(H=v==null?void 0:v.nonBreakingSpace)!==null&&H!==void 0?H:!1,roundScientificCoefficient:v==null?void 0:v.roundScientificCoefficient},{withUnit:it}=Z;if(y==null)return"";const $=!0,{number:X,unit:bt}=(0,n.parseNumber)(y,$),dt=(0,e.formatDisplayNumber)(X,{...Z,preserveTrailingZeros:!0}),ft=bt?l.LABELS===null||l.LABELS===void 0?void 0:l.LABELS[bt]:"";return it&&bt?dt===""?ft:`${dt} ${ft}`:dt};e.displayNumberToFixed=I}(lc)),lc}var Jd;function mi(){return Jd||(Jd=1,function(e){var t=Fi&&Fi.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(e,"__esModule",{value:!0}),e.get_conf_int_from_k=e.get_k_from_conf_int=e.erf=e.newton=e.isNonNumerical=e.cleanNum=e.stripLeadingZeros=e.cleanNumStr=e.trim=e.numFraction=e.asFraction=e.fraction=e.getNumberOfDigitsToShow=e.charCount=e.formatNumber=e.allNumbers=e.isNumeric=e.isFraction=e.isEmptyValueWithUnit=e.isPercentage=e.isTrailingCommaSeparator=e.isTrailingPeriodSeparator=e.isEmptyString=e.isObject=e.isArray=e.isUndefined=e.isNull=void 0;const n=t(_P),r=Ls(),i=Fs(),o=k=>k===null;e.isNull=o;const l=k=>k===void 0;e.isUndefined=l;const c=k=>k&&k.constructor===Array;e.isArray=c;const f=k=>k&&k.constructor===Object;e.isObject=f;const h=k=>k==="";e.isEmptyString=h;const d=k=>k&&k[k.length-1]===".";e.isTrailingPeriodSeparator=d;const m=k=>k&&k[k.length-1]===",";e.isTrailingCommaSeparator=m;const p=k=>typeof k=="string"&&/^\d+(\.\d+)?%$/.test(k);e.isPercentage=p;function S(k){return typeof k=="string"&&k.length>0&&k.startsWith("|")}e.isEmptyValueWithUnit=S;const P=k=>k.trim().replace(/\s+/g," "),E=k=>{if(typeof k!="string"||!k.includes("/"))return!1;try{return new n.default(P(k)),!0}catch(W){return W.message==="Division by Zero"}};e.isFraction=E;function I(k){if(k==null||Array.isArray(k)||typeof k=="object"||Number.isNaN(k)||k==="NaN"||k===1/0||k===-1/0||k==="Infinity"||k==="-Infinity")return!1;if((0,e.isFraction)(k))return!0;const W=parseFloat(k);return typeof k=="string"?!isNaN(W)&&(i.EXP_NOTATION_RE.test(k)||isFinite(k)):isFinite(k)}e.isNumeric=I;function y(k){return!k.some(W=>typeof W!="number")}e.allNumbers=y;const v=k=>(0,r.displayNumber)(k);e.formatNumber=v;function C(k,W){const rt=(k+"")[0];let Q=0,tt=W.indexOf(rt,0)+1;for(;tt>0;)tt=W.indexOf(rt,tt)+1,Q+=1;return Q}e.charCount=C;function w(k,W=20){const rt=Math.min(4,W);let Q=rt;if(typeof k!="number")return rt;const tt=String(k);if(/-?[0-9.,]*[Ee]-?[0-9]+/.test(tt)){for(;Math.abs(k)*10**Q<1&&Q<W;)Q++;return Math.min(Q+(rt-1),W)}if(k>1||k<-1)return rt;for(let Et=2;Et<tt.length;Et++)if(tt[Et]!=="0")return Math.min(W,Q+Et-2);return Q}e.getNumberOfDigitsToShow=w;function O(k){if(k instanceof Array||k===null||k===void 0)return NaN;if(typeof k=="string"&&(k=P(k)),k==="")return NaN;let W=NaN,rt=!1;try{const Q=new n.default(k);Q!==void 0&&(W=Q.valueOf())}catch(Q){Q instanceof Error&&Q.message==="Division by Zero"&&(rt=!0)}return rt?1/0:W}e.fraction=O;function B(k){return typeof k=="string"&&(k=P(k)),k===""&&(k="0"),new n.default(k).toFraction(!0)}e.asFraction=B;function F(k){if(k instanceof Array||k===null||k===void 0||k===""||k===1/0||k===-1/0||k==="Infinity"||k==="-Infinity"||Number.isNaN(k)||k==="NaN")return k;typeof k=="string"&&(k=P(k));let W=k;try{const rt=new n.default(k);rt!==void 0&&(W=rt.valueOf())}catch(rt){if(rt.message==="Division by Zero")return k.charAt(0)==="-"?-1/0:1/0;console.warn("Error in numFraction() method: ",k)}return W.valueOf()}e.numFraction=F;const H=k=>k.trim().replace(/[\t\r\n]/g,"");e.trim=H;function Z(k){let W=(0,e.trim)(k+"");const rt=C("/",W),Q=C(" ",W)+C(" ",W);let tt=C(".",W),ht=C(",",W);return rt===0&&Q>0&&(W=W.replace(/\s/g,"")),ht>1&&(W=W.replace(/,/g,"")),tt>1&&(W=W.replace(/\./g,"")),ht=C(",",W),tt=C(".",W),tt===1&&ht===1?(W.indexOf(",")>W.indexOf(".")?(W=W.replace(".",""),W=W.replace(",",".")):W=W.replace(",",""),W.indexOf(".")===0&&(W=0+W),W):(!tt&&ht&&(W=W.replace(",",".")),W.indexOf(".")===0&&(W=0+W),W)}e.cleanNumStr=Z;const it=k=>{const W=(k==null?void 0:k[0])==="-",rt=/^-/mg,Q=/^(?:0+(?=[1-9])|0+(?=0))/mg,tt=k.replace(rt,"").replace(Q,"");return W?`-${tt}`:tt};e.stripLeadingZeros=it;function $(k){return typeof k=="number"?k:parseFloat(Z(k))}e.cleanNum=$;const X=k=>!I(k);e.isNonNumerical=X;const{abs:bt,exp:dt,sqrt:ft}=Math;function wt(k,W,rt,Q=1e-8,tt=30){let ht=rt,Et=0,Ot=1;for(;Ot>Q&&Et<tt;){const Bt=ht-k(ht)/W(ht);if(Ot=bt(k(Bt)-k(ht)),Ot<Q)return[Bt,!0,Et];ht=Bt,Et++}return[rt,!1,Et]}e.newton=wt;function Ct(k){const W=1/(1+.5*bt(k)),rt=1-W*dt(-(k**2)-1.26551223+W*(1.00002368+W*(.37409196+W*(.09678418+W*(-.18628806+W*(.27886807+W*(-1.13520398+W*(1.48851587+W*(-.82215223+W*.17087277)))))))));return k>=0?rt:-rt}e.erf=Ct;function Ht(k){const W=tt=>k-Ct(tt/ft(2)),rt=tt=>-ft(2/Math.PI)*dt(-.5*tt**2),[Q]=wt(W,rt,1);return Q}e.get_k_from_conf_int=Ht;function V(k){return Ct(k/ft(2))}e.get_conf_int_from_k=V}(ac)),ac}var Qd;function Jc(){return Qd||(Qd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UNITS_DESCRIPTION=e.QUANTITIES_DESCRIPTION=e.SPECIAL_NUMBERS_STRING=e.KNOWN_UNITS=e.INTERMEDIATE_CONVERSIONS=e.UNIT_ALIASES=e.DEPRECATED_UNITS=e.KNOWN_CONVERSIONS=e.UNIT_FROM_KEY=e.ALT_UNITS=e.LABELS=void 0;const t=mi();e.LABELS=Object.freeze({in:"in",mm:"mm",cm:"cm",m:"m",microM:"μm",km:"km",ft:"ft",usft:"usft",in2:"in²",cm2:"cm²",m2:"m²",kg:"kg",tonnes:"t",mt:"mt",kip:"kip",bbl:"bbl",m3:"m³",Mm3:"Mm³",MMSCF:"MMSCF",lbm:"lbm","kg/mol":"kg/mol","lbf/mol":"lbf/mol",sg:"sg",ppg:"ppg","kg/m3":"kg/m³","lbm/ft3":"lbm/ft³",s:"s",min:"min",h:"h",d:"d",month:"month",year:"year","bbl/ft":"bbl/ft",lpm:"L/min",lps:"L/s",bpm:"bbl/min","m3/min":"m³/min","m3/s":"m³/s",MMSCFD:"MMSCFD",bar:"Bar",Pa:"Pa",kPa:"kPa",MPa:"MPa",GPa:"GPa",kPsi:"Psi",ksi:"ksi","lbf/100ft2":"lbf/100ft²","1/Pa":"Pa⁻¹","1/kPa":"kPa⁻¹","1/MPa":"MPa⁻¹","1/GPa":"GPa⁻¹","1/psi":"psi⁻¹","kPa/m":"kPa/m","1/bar":"bar⁻¹",klbf:"klbf","psi/ft":"Psi/ft","bar/100m":"bar/100m","psi/100ft":"psi/100ft","kPa/100m":"kPa/100m",C:"°C",F:"°F",K:"K","C/100m":"°C/100m","C/m":"°C/m","Pa/C":"Pa/°C","Bar/C":"Bar/°C","psi/F":"psi/°F","F/100ft":"°F/100ft","F/ft":"°F/ft","K/100m":"K/100m","K/m":"K/m","lbf/ft":"lbf/ft",N:"N",kN:"kN","N/m":"N/m","daN/m":"daN/m",lbf:"lbf",kgf:"kgf",rad:"rad","BTU/lbm":"BTU/lbm",ppf:"ppf","kg/m":"kg/m","E-06/degC":"10⁻⁶/°C","E-06/degF":"10⁻⁶/°F","1/K":"K⁻¹",km2:"km²",ft2:"ft²",mm2:"mm²",mile2:"mile²",ft3:"ft³","g/cm3":"g/cm³",Sm3:"Sm³","ft3/s":"ft³/s","ft3/d":"ft³/d","m3/d":"m³/d","1/m3/d":"1/m³/d","s/m3":"s/m³","1/MMSCFD":"1/MMSCFD","bbl/d":"bbl/d",tonneForce:"tonne-force",USGal:"US gal","g/mol":"g/mol",Nm:"N⋅m",kNm:"kN⋅m",ftlbf:"ft⋅lbf","J/(kg*degC)":"J/(kg⋅°C)","J/(kg*degK)":"J/(kg⋅K)","J/(s*m*degK)":"J/(s⋅m⋅K)","BTU/(lbm*degF)":"BTU/(lbm⋅°F)","BTU/(h*ft*degF)":"BTU/(h⋅ft⋅°F)",l:"L","l/m":"L/m","kJ/kg":"kJ/kg","J/kg":"J/kg",deg:"°","W/(mK)":"W/(m⋅K)",psi:"psi","deg/100ft":"°/100ft","deg/30m":"°/30m","deg/10m":"°/10m","%":"%",Hz:"Hz","1/s":"1/s",rpm:"rpm","Pa/m":"Pa/m","bar/m":"bar/m",gpm:"gpm","kg/s":"kg/s","lbm/s":"lbm/s","deg/m":"°/m","deg/ft":"°/ft","rad/m":"rad/m","rad/ft":"rad/ft","dyn/cm":"dyn/cm","mN/m":"mN/m","m/s":"m/s","ft/s":"ft/s","m/min":"m/min","ft/min":"ft/min","m/h":"m/h","ft/h":"ft/h",mph:"mph","km/h":"km/h","m/s2":"m/s²","ft/s2":"ft/s²","Pa*s":"Pa⋅s",P:"P","mPa*s":"mPa⋅s",cP:"cP",W:"W",hhp:"hhp",hp:"hp",kW:"kW",MW:"MW","BTU/h":"BTU/h","W/m2":"W/m²","hhp/in2":"hhp/in²","hhp/ft2":"hhp/ft²","Mm3/d":"Mm³/d","STB/d":"STB/d","Sm3/d":"Sm³/d","MSm3/d":"MSm³/d","SCF/STB":"SCF / STB","Sm3/Sm3":"Sm³ / Sm³","SCF/d":"SCF/d",STB:"STB",SCF:"SCF",MSm3:"MSm³",Gsg:"sg",Gppg:"ppg","Gkg/m3":"kg/m³","Glbm/ft3":"lbm/ft³","lb/ft3":"lb/ft³","°N":"°N","°S":"°S","°W":"°W","°E":"°E",fr:" ",mD:"mD",CI:"CI",Sigma:"σ","Sm3/d/bar":"Sm³/d/bar","STB/d/psi":"STB/d/psi","m3/s/bar":"m³/s/bar","lb/ft":"lb/ft","E-09/bar":"10⁻⁹/bar","E-10/psi":"10⁻¹⁰/psi","E-14/pa":"10⁻¹⁴/pa","m3/m":" m³/m","cm3/m":"cm³/m","mm3/m":"mm³/m","ft3/ft":"ft³/ft","in3/ft":"in³/ft",lk:"lk",ftCla:"ftCla",lkCla:"lkCla",ftSe:"ftSe",ydSe:"ydSe",chSe:"chSe","chSe(T)":"chSe(T)",ftGC:"ftGC",ydInd:"ydInd","d/stand":"d/stand","h/stand":"h/stand","min/stand":"min/stand","s/stand":"s/stand","m3/t":"m3/t","L/100kg":"L/100kg"}),e.ALT_UNITS=Object.freeze({acceleration:["ft/s2","m/s2"],angleGradient:["deg/30m","rad/m","deg/m","deg/ft","rad/ft","deg/100ft","deg/10m"],angles:["deg","rad"],areaOther:["in2","ft2","mm2","cm2","m2","mile2","km2"],areaTubular:["in2","cm2","ft2","m2"],blowoutFlowRate:["lpm","bpm","m3/min","ft3/s","m3/s","MMSCFD","ft3/d","m3/d","bbl/d","Mm3/d","STB/d","Sm3/d","MSm3/d","SCF/d"],blowoutGasFlowRate:["MMSCFD","Sm3/d","MSm3/d","SCF/d"],blowoutOilFlowRate:["Sm3/d","STB/d"],deg:["deg","rad"],density:["sg","ppg","kg/m3","lbm/ft3","g/cm3","lb/ft3","kPa/m"],densityGas:["Gsg","Gppg","Gkg/m3","Glbm/ft3"],densityOil:["sg","ppg","kg/m3","lbm/ft3"],densityOilGas:["ppg","kg/m3","lbm/ft3"],densitySolid:["sg","ppg","kg/m3","lbm/ft3"],depth:["m","ft"],diameters:["in","m","cm","ft","mm"],distance:["m","ft"],dls:["deg/10m","deg/30m","deg/100ft"],doglegSeverity:["deg/10m","deg/30m","deg/100ft"],duration:["s","h","d","min"],durationShort:["s","min","h","d"],durationLong:["min","h","d","month","year"],flowrate:["lpm","gpm","bpm","ft3/d","ft3/s","m3/s","m3/d","m3/min","Mm3/d","bbl/d","MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],fluidCompressibility:["1/bar","1/psi","1/Pa","1/kPa","1/MPa","1/GPa"],force:["tonnes","lbf","kgf","N","kN","tonneForce","klbf"],forceGradient:["lbf/ft","N/m"],frequency:["Hz"],gasVolume:["MMSCF","Sm3","MSm3","SCF"],gor:["Sm3/Sm3","SCF/STB"],height:["m","ft"],intensity:["W/m2","hhp/in2","hhp/ft2"],interfacialTension:["dyn/cm","N/m","lbf/ft","mN/m"],latitude:["°N","°S"],length:["m","cm","ft","km","in","mm"],linearCapacity:["l/m","bbl/ft"],longitude:["°E","°W"],massFlowRate:["kg/s","lbm/s"],moleWeight:["kg/mol","lbf/mol","g/mol"],oilVolume:["STB","Sm3"],percentage:["%","fr"],permeability:["mD","m2"],power:["hp","W","hhp","MW","kW","BTU/h"],pressure:["bar","psi","Pa","kPa","MPa","ksi","GPa","lbf/100ft2"],pressureGradient:["bar/100m","Pa/m","bar/m","psi/100ft","psi/ft","kPa/m"],pressurechange:["bar","psi","Pa","MPa","kPa"],gasliftFlowRate:["STB/d","Sm3/d","SCF/d"],productionFlowRate:["MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],productionFlowRateOil:["MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],productionFlowRateGas:["MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],injectionFlowRate:["lpm","lps","bpm","gpm","MMSCFD","STB/d","Sm3/d","MSm3/d","SCF/d"],pumpRate:["lpm","lps","bpm","m3/s","ft3/s","gpm"],rotationalSpeed:["rpm","Hz"],roughness:["m","microM","in"],rpm:["rpm","Hz"],sdstats:["CI","Sigma"],specificHeatCapacity:["J/(kg*degC)","J/(kg*degK)","BTU/(lbm*degF)"],speed:["km/h","ft/min","mph","ft/h","ft/s","m/min","m/s","m/h"],inverseStandSpeed:["d/stand","h/stand","min/stand","s/stand"],rop:["ft/h","ft/min","ft/s","km/h","m/h","m/min","m/s","mph"],stress:["MPa","kPa","psi","bar","Pa","ksi","lbf/100ft2"],temperature:["C","F","K"],pressurePerTemperature:["Pa/C","Bar/C","psi/F"],tempgrad:["C/100m","F/100ft","K/100m","C/m","F/ft","K/m"],thermalConductivity:["BTU/(h*ft*degF)","W/(mK)"],thermalExpansionCoefficient:["E-06/degC","E-06/degF","1/K"],torque:["Nm","ftlbf","kNm"],torqueGradient:["N","lbf","tonnes"],turbulentSkin:["s/m3","1/m3/d","1/MMSCFD"],viscosity:["Pa*s","P","mPa*s","cP"],inflowProductivityIndex:["Sm3/d/bar","STB/d/psi","m3/s/bar"],volume:["m3","bbl","Mm3","l","USGal","ft3","STB","Sm3","MMSCF","MSm3","SCF"],kickToleranceVolume:["m3","bbl","USGal","ft3","STB","Sm3","SCF"],weight:["tonnes","kg","lbf","mt","kip","N"],weightGradient:["ppf","kg/m"],wgrad:["sg","ppg"],wltubulars:["ppf","kg/m"],youngsModulus:["Pa","psi"],massPerLength:["kg/m","lb/ft"],wearFactor:["E-09/bar","E-10/psi","E-14/pa"],volumeGradient:["m3/m","cm3/m","mm3/m","ft3/ft","in3/ft"],shearStress:["Pa","lbf/100ft2"],location:["lk","ftCla","lkCla","ftSe","ydSe","chSe","chSe(T)","ftGC","ydInd","ft","m","usft"],mixingRequirements:["m3/t","L/100kg"],entalphy:["J/kg","kJ/kg","BTU/lbm"]}),e.UNIT_FROM_KEY=Object.freeze({density:"sg",densityGas:"Gsg",densityOil:"sg",densityOilGas:"kg/m3",densitySolid:"kg/m3",length:"m",roughness:"m",speed:"m/s",diameters:"in",duration:"s",durationShort:"h",durationLong:"d",pressurechange:"bar",temperature:"C",tempgrad:"C/100m",volume:"m3",kickToleranceVolume:"m3",weight:"kg",force:"N",wgrad:"sg",wltubulars:"ppf",flowrate:"lpm",permeability:"mD",interfacialTension:"dyn/cm",deg:"deg",dls:"deg/30m",percentage:"%",latitude:"°N",longitude:"°E",torque:"Nm",rpm:"rpm",testSingleUnit:"m",turbulentSkin:"1/m3/d",pressurePerTemperature:"Pa/C",sdstats:"Sigma",acceleration:"m/s2",massFlowRate:"kg/s",angleGradient:"deg/m",viscosity:"Pa*s",weightGradient:"kg/m",intensity:"W/m2",gor:"Sm3/Sm3",inflowProductivityIndex:"Sm3/d/bar",wearFactor:"E-09/psi",location:"m",inverseStandSpeed:"s/stand",mixingRequirements:"m3/t",entalphy:"J/kg",shearStress:"Pa",volumeGradient:"m3/m"});const n=Object.freeze({g:.0980665175317196,ft_to_m:.3048,inch_to_m:.0254,lbf_to_kg:.45359237,kg_to_lbf:2.20462262184877,ppf_to_kgm:.45359237/.3048,kg_cm3:.0293984025938081,bar_to_psi:14.503773773022,bar_to_pascal:1e5,sg_to_ppg:8.345404265,bbl_to_m3:.158987294928,USGal_to_m3:.003785411784,kelvin_to_degrees:273.15,tonnes_to_pascal:9806.65,therm_exp_coeff:1242e-8,psi_to_pascal:6894.75729,ft3_to_m3:.028316846592,ft3_to_in3:1728,day_to_second:60*60*24,m3_per_m_to_ft3_per_ft:10.763910416709722,in3_per_ft_to_m3_per_m:537633333333e-16});e.KNOWN_CONVERSIONS=Object.freeze({"m|mm":i=>i*1e3,"m|cm":i=>i*100,"m|km":i=>i/1e3,"m|ft":i=>i/n.ft_to_m,"m|in":i=>i/n.inch_to_m,"m|microM":i=>i*1e6,"mm|m":i=>i/1e3,"cm|m":i=>i/100,"km|m":i=>i*1e3,"ft|m":i=>i*n.ft_to_m,"in|m":i=>i*n.inch_to_m,"microM|m":i=>i/1e6,"m2|mm2":i=>i*1e6,"m2|cm2":i=>i*1e4,"m2|km2":i=>i/1e6,"m2|in2":i=>i*1550.0031,"m2|ft2":i=>i*10.76391,"m2|mile2":i=>i*3861022e-13,"mm2|m2":i=>i/1e6,"cm2|m2":i=>i/1e4,"km2|m2":i=>i*1e6,"in2|m2":i=>i/1550.0031,"ft2|m2":i=>i/10.76391,"mile2|m2":i=>i/3861022e-13,"m3|bbl":i=>i/n.bbl_to_m3,"m3|ft3":i=>i/n.ft3_to_m3,"m3|l":i=>i*1e3,"m3|Mm3":i=>i/1e6,"m3|USGal":i=>i/n.USGal_to_m3,"bbl|m3":i=>i*n.bbl_to_m3,"ft3|m3":i=>i*n.ft3_to_m3,"Mm3|m3":i=>i*1e6,"l|m3":i=>i/1e3,"USGal|m3":i=>i*n.USGal_to_m3,"m3|Sm3":i=>i*1,"m3|STB":i=>i*6.289512957422142,"Sm3|m3":i=>i*1,"STB|m3":i=>i*.1589948230919721,"m3|MMSCF":i=>i*1e6/n.ft3_to_m3,"m3|MSm3":i=>i*1e-6,"m3|SCF":i=>i/n.ft3_to_m3,"MMSCF|m3":i=>i*1e-6*n.ft3_to_m3,"MSm3|m3":i=>i*1e6,"SCF|m3":i=>i*n.ft3_to_m3,"kg/m3|sg":i=>i*.001,"kg/m3|g/cm3":i=>i*.001,"kg/m3|lbm/ft3":i=>i/16.01846337,"kg/m3|lb/ft3":i=>i/16.01846337,"kg/m3|ppg":i=>i*.008345404265,"sg|kg/m3":i=>i*1e3,"g/cm3|kg/m3":i=>i*1e3,"lbm/ft3|kg/m3":i=>i*16.01846337,"lb/ft3|kg/m3":i=>i*16.01846337,"ppg|kg/m3":i=>i/.008345404265,"sg|kPa/m":i=>i*9.81,"kPa/m|sg":i=>i/9.81,"Gkg/m3|Gsg":i=>i/1.225,"Gkg/m3|Glbm/ft3":i=>i/16.0176516725,"Gkg/m3|Gppg":i=>i/119.8659491193,"Gsg|Gkg/m3":i=>i*1.225,"Glbm/ft3|Gkg/m3":i=>i*16.0176516725,"Gppg|Gkg/m3":i=>i*119.8659491193,"ppf|kg/m":i=>i*.45359237/.3048,"kg/m|ppf":i=>i*1/(.45359237/.3048),"kg/m|lbf/ft":i=>i/.67196897675131,"lbf/ft|kg/m":i=>i*.67196897675131,"Pa|psi":i=>i*.0254**2/(.45359237*9.80665),"psi|Pa":i=>i*(.45359237*9.80665)/.0254**2,"Pa|bar":i=>i*1e-5,"Pa|kPa":i=>i*.001,"Pa|MPa":i=>i*1e-6,"Pa|GPa":i=>i*1e-9,"bar|Pa":i=>i*1e5,"kPa|Pa":i=>i*1e3,"MPa|Pa":i=>i*1e6,"GPa|Pa":i=>i*1e9,"psi|ksi":i=>i/1e3,"ksi|psi":i=>i*1e3,"psi|lbf/100ft2":i=>i*14400,"lbf/100ft2|psi":i=>i/14400,"1/psi|1/Pa":i=>i/6894.75729,"1/bar|1/Pa":i=>i*1e-5,"1/kPa|1/Pa":i=>i*.001,"1/MPa|1/Pa":i=>i*1e-6,"1/GPa|1/Pa":i=>i*1e-9,"1/Pa|1/psi":i=>i*6894.75729,"1/Pa|1/bar":i=>i*1e5,"1/Pa|1/kPa":i=>i*1e3,"1/Pa|1/MPa":i=>i*1e6,"1/Pa|1/GPa":i=>i*1e9,"C|F":i=>i*1.8+32,"F|C":i=>(i-32)*5/9,"K|C":i=>i-n.kelvin_to_degrees,"C|K":i=>i+n.kelvin_to_degrees,"C/100m|F/100ft":i=>i*1.8*n.ft_to_m,"F/100ft|C/100m":i=>i*5/9/n.ft_to_m,"C/100m|C/m":i=>i/100,"C/m|C/100m":i=>i*100,"C/100m|F/ft":i=>i*1.8/100*n.ft_to_m,"F/ft|C/100m":i=>i*5/9*100/n.ft_to_m,"C/100m|K/m":i=>i/100,"K/m|C/100m":i=>i*100,"K/100m|C/100m":i=>i,"C/100m|K/100m":i=>i,"Pa/C|Bar/C":i=>i*1e-5,"Pa/C|psi/F":i=>i/1.8/6894.75729,"Bar/C|Pa/C":i=>i*1e5,"psi/F|Pa/C":i=>i*1.8*6894.75729,"kg|kgf":i=>i,"kg|lbf":i=>i*n.kg_to_lbf,"kg|t":i=>i/1e3,"kg|tonnes":i=>i/1e3,"kg|mt":i=>i/1e3,"kg|kip":i=>i*n.kg_to_lbf*.001,"kgf|kg":i=>i,"lbf|kg":i=>i*n.lbf_to_kg,"t|kg":i=>i*1e3,"tonnes|kg":i=>i*1e3,"mt|kg":i=>i*1e3,"kip|kg":i=>i*1e3*n.lbf_to_kg,"tonnes|lbf":i=>i*1e3*n.kg_to_lbf,"lbf|tonnes":i=>i*n.lbf_to_kg/1e3,"t|lbf":i=>i*1e3*n.kg_to_lbf,"lbf|t":i=>i*n.lbf_to_kg/1e3,"mt|lbf":i=>i*1e3*n.kg_to_lbf,"lbf|mt":i=>i/(1e3*n.kg_to_lbf),"kgf|lbf":i=>i*n.kg_to_lbf,"lbf|kgf":i=>i*n.lbf_to_kg,"kg|g":i=>i*1e3,"g|kg":i=>i/1e3,"kgf|t":i=>i/1e3,"t|kgf":i=>i*1e3,"kgf|tonnes":i=>i/1e3,"tonnes|kgf":i=>i*1e3,"kg/m|lb/ft":i=>i*1.4881639435695537,"lb/ft|kg/m":i=>i*.6719689751395069,"kg|N":i=>i*n.g*100,"N|kg":i=>i/(n.g*100),"m/s|km/h":i=>i*3.6,"km/h|m/s":i=>i/3.6,"m/s|ft/s":i=>i/n.ft_to_m,"m/s|ft/min":i=>i*60/n.ft_to_m,"m/s|ft/h":i=>i*3600/n.ft_to_m,"m/s|m/min":i=>i*60,"m/s|m/h":i=>i*3600,"ft/s|m/s":i=>i*n.ft_to_m,"ft/min|m/s":i=>i*n.ft_to_m/60,"ft/h|m/s":i=>i*n.ft_to_m/3600,"m/min|m/s":i=>i/60,"m/h|m/s":i=>i/3600,"m/s|mph":i=>i*2.2369362920544,"mph|m/s":i=>i/2.2369362920544,"ft/h|ft/d":i=>i*24,"ft/d|ft/h":i=>i/24,"ft/h|m/h":i=>i*n.ft_to_m,"m/h|ft/h":i=>i/n.ft_to_m,"ft/d|m/h":i=>i*n.ft_to_m/24,"m/h|ft/d":i=>i*24/n.ft_to_m,"ft/d|m/d":i=>i*n.ft_to_m,"m/d|ft/d":i=>i/n.ft_to_m,"m/h|m/d":i=>i*24,"m/d|m/h":i=>i/24,"l/m|bbl/ft":i=>i*.0019171343228277056,"bbl/ft|l/m":i=>i/.0019171343228277056,"m3/s|ft3/s":i=>i/n.ft3_to_m3,"m3/s|lpm":i=>i*6e4,"m3/s|bpm":i=>i*377.388646,"m3/s|m3/min":i=>i*60,"m3/s|m3/d":i=>i*n.day_to_second,"m3/s|bbl/d":i=>i*543439.6505653338,"m3/s|ft3/d":i=>i*n.day_to_second/n.ft3_to_m3,"m3/s|gpm":i=>i*25e11/157725491,"m3/s|MMSCFD":i=>i/.32774128,"m3/s|STB/d":i=>i*1346875e8/247854343,"m3/s|Sm3/d":i=>i*n.day_to_second,"m3/s|MSm3/d":i=>i/11.59722222222222,"m3/s|SCF/d":i=>i*3.0511872047366146e6,"ft3/s|m3/s":i=>i*n.ft3_to_m3,"lpm|m3/s":i=>i/6e4,"lps|lpm":i=>i*60,"lpm|lps":i=>i/60,"bpm|m3/s":i=>i/377.388646,"m3/d|m3/s":i=>i/n.day_to_second,"m3/min|m3/s":i=>i/60,"bbl/d|m3/s":i=>i/n.day_to_second*n.bbl_to_m3,"ft3/d|m3/s":i=>i/n.day_to_second*n.ft3_to_m3,"ft3/d|m3/d":i=>i*n.ft3_to_m3,"m3/d|ft3/d":i=>i/n.ft3_to_m3,"m3/d|ft3/s":i=>i/n.ft3_to_m3/n.day_to_second,"gpm|m3/s":i=>i*157725491/25e11,"MMSCFD|m3/s":i=>i*.32774128,"Mm3/d|m3/d":i=>i*1e6,"m3/d|Mm3/d":i=>i*1e-6,"STB/d|m3/s":i=>i*184021785986e-17,"Sm3/d|m3/d":i=>i,"m3/d|Sm3/d":i=>i,"Sm3/d|m3/s":i=>i/n.day_to_second,"MSm3/d|Sm3/d":i=>i*1e6,"Sm3/d|MSm3/d":i=>i*1e-6,"MSm3/d|m3/s":i=>i*11.59722222222222,"SCF/d|m3/s":i=>i*32774128e-14,"1/m3/d|1/MMSCFD":i=>i*28316.85,"1/MMSCFD|1/m3/d":i=>i/28316.85,"s/m3|1/m3/d":i=>i/86400,"1/m3/d|s/m3":i=>i*86400,"kg/s|lbm/s":i=>i*2.20462262,"lbm/s|kg/s":i=>i/2.20462262,"mD|m2":i=>i*9869233e-19,"m2|mD":i=>i/9869233e-19,"N/m|lbf/ft":i=>i*.22480894387096*n.ft_to_m,"lbf/ft|N/m":i=>i/.22480894387096/n.ft_to_m,"dyn/cm|mN/m":i=>i,"mN/m|dyn/cm":i=>i,"dyn/cm|N/m":i=>i*.001,"N/m|dyn/cm":i=>i*1e3,"mN/m|N/m":i=>i*.001,"N/m|mN/m":i=>i*1e3,"Nm|ftlbf":i=>i*.737562058700684,"Nm|kNm":i=>i/1e3,"kNm|Nm":i=>i*1e3,"ftlbf|Nm":i=>i/.737562058700684,"N|kN":i=>i*.001,"N|kgf":i=>i*2e4/196133,"N|lbf":i=>i*2e12/8896443230521,"kN|lbf":i=>i*1e3*2e12/8896443230521,"N|tonneForce":i=>i*20/196133,"kN|N":i=>i/.001,"kgf|N":i=>i*196133/2e4,"lbf|N":i=>i*8896443230521/2e12,"lbf|kN":i=>i*8896443230521/(2e12*1e3),"lbf|tonneForce":i=>i*45359237/1e11,"klbf|tonneForce":i=>i*45359237/(1e11*.001),"tonneForce|N":i=>i*196133/20,"tonneForce|lbf":i=>i*1e11/45359237,"tonneForce|klbf":i=>i*1e11/(45359237*1e3),"klbf|lbf":i=>i*1e3,"lbf|klbf":i=>i/1e3,"s|min":i=>i/60,"s|h":i=>i/3600,"s|d":i=>i/(24*3600),"min|s":i=>i*60,"h|s":i=>i*3600,"d|s":i=>i*24*3600,"year|d":i=>i*365.25,"d|year":i=>i/365.25,"year|month":i=>i*12,"month|year":i=>i/12,"month|d":i=>i*30.4375,"d|month":i=>i/30.4375,"s/stand|min/stand":i=>i/60,"s/stand|h/stand":i=>i/3600,"s/stand|d/stand":i=>i/86400,"min/stand|s/stand":i=>i*60,"h/stand|s/stand":i=>i*3600,"d/stand|s/stand":i=>i*86400,"min/stand|h/stand":i=>i/60,"min/stand|d/stand":i=>i/1440,"h/stand|min/stand":i=>i*60,"h/stand|d/stand":i=>i/24,"d/stand|min/stand":i=>i*1440,"d/stand|h/stand":i=>i*24,"%|fr":i=>i*.01,"fr|%":i=>i/.01,"deg|rad":i=>i*Math.PI/180,"rad|deg":i=>i*180/Math.PI,"W|hp":i=>i/745.699872,"hp|W":i=>i*745.699872,"W|kW":i=>i/1e3,"W|MW":i=>i/1e6,"kW|W":i=>i*1e3,"MW|W":i=>i*1e6,"W|BTU/h":i=>i*3.4121416351331,"BTU/h|W":i=>i/3.4121416351331,"hhp|hp":i=>i,"hp|hhp":i=>i,"°N|°S":i=>i,"°S|°N":i=>i,"°W|°E":i=>i,"°E|°W":i=>i,"BTU/(Kg*K)|BTU/(lbm*degF)":i=>i/4186.798188,"BTU/(lbm*degF)|J/(kg*degC)":i=>i*4186.798188,"BTU/(lbm*degF)|BTU/(Kg*K)":i=>i*4186.798188,"J/(kg*degK)|J/(kg*degC)":i=>i,"J/(kg*degC)|BTU/(lbm*degF)":i=>i/4186.798188,"J/(kg*degC)|J/(kg*degK)":i=>i,"J/(kg*degC)|J/(s*m*degK)":i=>i,"BTU/(h*ft*degF)|W/(mK)":i=>i*1.7295772056,"BTU/(h*ft*degF)|J/(s*m*degK)":i=>i*1.7295772056,"W/(mK)|BTU/(h*ft*degF)":i=>i/1.7295772056,"W/(mK)|J/(s*m*degK)":i=>i,"W/(m*degK)|J/(s*m*degK)":i=>i,"W/(m*degK)|BTU/(h*ft*degF)":i=>i/1.7295772056,"J/(s*m*degK)|BTU/(h*ft*degF)":i=>i/1.7295772056,"J/(s*m*degK)|W/(m*degK)":i=>i,"J/(s*m*degK)|W/(mK)":i=>i,"J/(s*m*degK)|J/(kg*degC)":i=>i,"E-06/degF|E-06/degC":i=>i*1.8,"E-06/degC|E-06/degF":i=>i/1.8,"E-06/degC|1/K":i=>i/1e6,"1/K|E-06/degC":i=>i*1e6,"rpm|Hz":i=>i/60,"Hz|rpm":i=>i*60,"CI|Sigma":i=>(0,t.get_k_from_conf_int)(i),"Sigma|CI":i=>(0,t.get_conf_int_from_k)(i),"g/mol|kg/mol":i=>i/1e3,"kg/mol|g/mol":i=>i*1e3,"lbf/mol|kg/mol":i=>i/n.kg_to_lbf,"kg/mol|lbf/mol":i=>i*n.kg_to_lbf,"m/s2|ft/s2":i=>i/n.ft_to_m,"ft/s2|m/s2":i=>i*n.ft_to_m,"Pa*s|P":i=>i*10,"P|Pa*s":i=>i/10,"mPa*s|Pa*s":i=>i/1e3,"Pa*s|mPa*s":i=>i*1e3,"cP|Pa*s":i=>i*.001,"Pa*s|cP":i=>i/.001,"Pa/m|bar/m":i=>i*1e-5,"bar/m|Pa/m":i=>i*1e5,"Pa/m|kPa/m":i=>i/1e3,"kPa/m|Pa/m":i=>i*1e3,"Pa/m|bar/100m":i=>i*.001,"bar/100m|Pa/m":i=>i*1e3,"bar/m|bar/100m":i=>i*100,"bar/100m|bar/m":i=>i/100,"psi/ft|Pa/m":i=>i*6894.75729/n.ft_to_m,"Pa/m|psi/ft":i=>i/6894.75729*n.ft_to_m,"psi/100ft|Pa/m":i=>i*68.9475729/n.ft_to_m,"Pa/m|psi/100ft":i=>i/68.9475729*n.ft_to_m,"deg/30m|deg/100ft":i=>i*(100*n.ft_to_m/30),"deg/100ft|deg/30m":i=>i/(100*n.ft_to_m/30),"deg/30m|deg/m":i=>i/30,"deg/m|deg/30m":i=>i*30,"deg/100ft|deg/ft":i=>i/100,"deg/ft|deg/100ft":i=>i*100,"deg/100ft|deg/m":i=>i/(100*n.ft_to_m),"deg/m|deg/100ft":i=>i*(100*n.ft_to_m),"deg/ft|deg/m":i=>i/n.ft_to_m,"deg/m|deg/ft":i=>i*n.ft_to_m,"deg/m|rad/m":i=>i*Math.PI/180,"rad/m|deg/m":i=>i*180/Math.PI,"rad/ft|deg/m":i=>i*180/Math.PI/n.ft_to_m,"deg/m|rad/ft":i=>i*Math.PI/180*n.ft_to_m,"deg/10m|deg/100ft":i=>i*(10*n.ft_to_m),"deg/100ft|deg/10m":i=>i/(10*n.ft_to_m),"deg/10m|deg/m":i=>i/10,"deg/m|deg/10m":i=>i*10,"deg/30m|deg/10m":i=>i/3,"deg/10m|deg/30m":i=>i*3,"deg/10m|rad/m":i=>i*Math.PI/180/10,"rad/m|deg/10m":i=>i*180/Math.PI*10,"W/m2|hhp/in2":i=>i*(1/745.699872/1550.0031),"W/m2|hhp/ft2":i=>i*(1/745.699872/10.76391),"hhp/in2|W/m2":i=>i/(1/745.699872/1550.0031),"hhp/ft2|W/m2":i=>i/(1/745.699872/10.76391),"SCF/STB|Sm3/Sm3":i=>i*.178099173553719,"Sm3/Sm3|SCF/STB":i=>i*5.614849187935035,"Sm3/d/bar|m3/s/bar":i=>i/86400,"STB/d/psi|m3/s/bar":i=>i/37468.77736,"m3/s/bar|Sm3/d/bar":i=>i*86400,"m3/s/bar|STB/d/psi":i=>i*37468.77736,"E-10/psi|E-09/bar":i=>i*1.450377378,"E-10/psi|E-14/pa":i=>i*1.450377378,"E-14/pa|E-10/psi":i=>i/1.450377378,"E-09/bar|E-10/psi":i=>i/1.450377378,"E-14/pa|1/Pa":i=>i/Math.pow(10,14),"E-09/bar|1/bar":i=>i/Math.pow(10,9),"E-10/psi|1/psi":i=>i/Math.pow(10,10),"1/Pa|E-14/pa":i=>i*Math.pow(10,14),"1/bar|E-09/bar":i=>i*Math.pow(10,9),"1/psi|E-10/psi":i=>i*Math.pow(10,10),"m3/m|cm3/m":i=>i*10**6,"m3/m|mm3/m":i=>i*10**9,"m3/m|ft3/ft":i=>i*n.m3_per_m_to_ft3_per_ft,"m3/m|in3/ft":i=>i*n.m3_per_m_to_ft3_per_ft*n.ft3_to_in3,"cm3/m|m3/m":i=>i*1e-6,"cm3/m|mm3/m":i=>i*1e3,"cm3/m|ft3/ft":i=>i*n.m3_per_m_to_ft3_per_ft*1e-6,"cm3/m|in3/ft":i=>i*n.m3_per_m_to_ft3_per_ft*1e-6*n.ft3_to_in3,"mm3/m|m3/m":i=>i*1e-9,"mm3/m|cm3/m":i=>i*.001,"mm3/m|ft3/ft":i=>i*n.m3_per_m_to_ft3_per_ft*1e-9,"mm3/m|in3/ft":i=>i*n.m3_per_m_to_ft3_per_ft*1e-9*n.ft3_to_in3,"ft3/ft|m3/m":i=>i*.09290304,"ft3/ft|cm3/m":i=>i*92903.04,"ft3/ft|mm3/m":i=>i*92903040,"ft3/ft|in3/ft":i=>i*1728,"in3/ft|m3/m":i=>i*n.in3_per_ft_to_m3_per_m,"in3/ft|cm3/m":i=>i*n.in3_per_ft_to_m3_per_m*1e6,"in3/ft|mm3/m":i=>i*n.in3_per_ft_to_m3_per_m*1e9,"in3/ft|ft3/ft":i=>i/n.ft3_to_in3,"Pa|lbf/100ft2":i=>i*2.088543423315013,"lbf/100ft2|Pa":i=>i*.4788025898033584,"usft|m":i=>i*.30480060960121924,"lk|m":i=>i*.201168,"ftCla|m":i=>i*.3047972651151,"lkCla|m":i=>i*.2011057269733667,"ftGC|m":i=>i*.30479971018150875,"ydInd|m":i=>i*.9143985307444408,"ftSe|m":i=>i*(12/39.370147),"ydSe|m":i=>i*.9143991154275526,"chSe|m":i=>i*20.11676512155263,"chSe(T)|m":i=>i*20.116756,"m|usft":i=>i/.30480060960121924,"m|lk":i=>i/.201168,"m|ftCla":i=>i/.3047972651151,"m|lkCla":i=>i/.2011057269733667,"m|ftGC":i=>i/.30479971018150875,"m|ydInd":i=>i/.9143985307444408,"m|ftSe":i=>i/(12/39.370147),"m|ydSe":i=>i/.9143991154275526,"m|chSe":i=>i/20.11676512155263,"m|chSe(T)":i=>i/20.116756,"m3/t|L/100kg":i=>i*100,"L/100kg|m3/t":i=>i*.01,"kJ/kg|J/kg":i=>i*1e3,"J/kg|kJ/kg":i=>i/1e3,"BTU/lbm|J/kg":i=>i*2326,"J/kg|BTU/lbm":i=>i/2326}),e.DEPRECATED_UNITS=Object.freeze({"N-m":"Nm","ft-lbf":"ftlbf","BTU/hr":"BTU/h","BTU/(htf*degF)":"BTU/(h*ft*degF)","BTU/(hft*degF)":"BTU/(h*ft*degF)"}),e.UNIT_ALIASES=Object.freeze({"lbs/ft":"lb/ft","lbm/ft":"lb/ft",ftUS:"usft"}),e.INTERMEDIATE_CONVERSIONS=Object.freeze({mm:"m",cm:"m",km:"m",ft:"m",in:"m",microM:"m",lbf:"kg",t:"kg",tonnes:"kg",mt:"kg",kip:"kg",kW:"W",MW:"W",hp:"W",hhp:"hp",mm2:"m2",cm2:"m2",km2:"m2",in2:"m2",ft2:"m2",mile2:"m2",bbl:"m3",ft3:"m3",Mm3:"m3",l:"m3",USGal:"m3",Sm3:"m3",STB:"m3",MMSCF:"m3",MSm3:"m3",SCF:"m3",kN:"N",kgf:"N",tonneForce:"N",klbf:"lbf",psi:"Pa",bar:"Pa",kPa:"Pa",MPa:"Pa",ksi:"psi","lbf/100ft2":"psi","psi/100ft":"Pa/m","psi/ft":"Pa/m","bar/100m":"Pa/m","bar/m":"Pa/m","Pa/m":"kPa/m",sg:"kg/m3","g/cm3":"kg/m3","lbm/ft3":"kg/m3","lb/ft3":"kg/m3",ppg:"kg/m3","kPa/m":"sg",Gsg:"Gkg/m3",Gppg:"Gkg/m3","Glbm/ft3":"Gkg/m3","1/psi":"1/Pa","1/bar":"1/Pa","1/kPa":"1/Pa","1/MPa":"1/Pa","1/GPa":"1/Pa","ft/s":"m/s","ft/min":"m/s","ft/h":"m/s","m/min":"m/s","m/h":"m/s",mph:"m/s","ft3/s":"m3/s",lpm:"m3/s",lps:"lpm",bpm:"m3/s","m3/d":"m3/s","bbl/d":"m3/s","ft3/d":"m3/s","STB/d":"m3/s","Sm3/d":"m3/s",gpm:"m3/s",MMSCFD:"m3/s","Mm3/d":"m3/d","m3/min":"m3/s","MSm3/d":"m3/s","lbf/ft":"N/m",min:"s",h:"s",d:"s",month:"d",year:"d","J/(kg*degK)":"J/(kg*degC)","BTU/(lbm*degF)":"J/(kg*degC)","BTU/(Kg*K)":"J/(kg*degC)","BTU/(h*ft*degF)":"J/(s*m*degK)","W/(m*degK)":"J/(s*m*degK)","W/(mK)":"J/(s*m*degK)",K:"C","C/m":"C/100m","F/ft":"C/100m","K/m":"C/100m","F/100ft":"C/100m","K/100m":"C/100m","Bar/C":"Pa/C","s/m3":"1/m3/d","1/MMSCFD":"1/m3/d",P:"Pa*s","mPa*s":"Pa*s",cP:"Pa*s","hhp/in2":"W/m2","hhp/ft2":"W/m2","Sm3/d/bar":"m3/s/bar","STB/d/psi":"m3/s/bar","deg/100ft":"deg/m","deg/30m":"deg/m","deg/10m":"deg/m","deg/ft":"deg/m","rad/ft":"deg/m","lbf/mol":"kg/mol","g/mol":"kg/mol","1/K":"E-06/degC","E-09/bar":"E-10/psi","E-14/pa":"E-10/psi","1/Pa":"E-14/pa",kNm:"Nm",ftlbf:"Nm",lk:"m",ftCla:"m",lkCla:"m",ftSe:"m",ydSe:"m",chSe:"m","chSe(T)":"m",ftGC:"m",ydInd:"m","BTU/lbm":"J/kg"}),e.KNOWN_UNITS=Object.freeze(Array.from(new Set(Object.values(e.ALT_UNITS).flat())));const r=[NaN,-1/0,1/0];e.SPECIAL_NUMBERS_STRING=r.map(i=>i.toString()),e.QUANTITIES_DESCRIPTION={density:"Density",length:"Length",duration:"Duration",temperature:"Temperature",tempgrad:"Temperature Gradient",volume:"Volume",weight:"Weight",angles:"Angles",depth:"Depth",distance:"Distances",height:"Height",diameters:"Diameters",doglegSeverity:"Dogleg severity",fluidCompressibility:"Fluid Compressibility",force:"Force",gasVolume:"Gas volume",oilVolume:"Oil volume",moleWeight:"Mole weight",linearCapacity:"Linear Capacity",stress:"Stress",thermalConductivity:"Thermal conductivity",specificHeatCapacity:"Specific heat capacity",thermalExpansionCoefficient:"Thermal expansion coefficient",youngsModulus:"Youngs Modulus",torque:"Torque",areaOther:"Area - Other",areaTubular:"Area - Tubular",pumpRate:"Pump Rate",pressure:"Pressure",blowoutFlowRate:"Flowrate (blowout)",percentage:"Percentage",frequency:"Frequency",torqueGradient:"Torque gradient",pressureGradient:"Pressure gradient",flowrate:"Volumetric flow rate",massFlowRate:"Mass flow rate",angleGradient:"Angle gradient",weightGradient:"Weight gradient",forceGradient:"Force gradient",interfacialTension:"Interfacial tension",acceleration:"Acceleration",viscosity:"Viscosity",power:"Power",intensity:"Power intensity",gasliftFlowRate:"Flowrate (Gas lift)",productionFlowRate:"Flowrate (production)",productionFlowRateOil:"Flowrate for Oil (production)",productionFlowRateGas:"Flowrate for Gas (production)",injectionFlowRate:"Flowrate (injection)",blowoutOilFlowRate:"Flowrate for Oil (blowout)",blowoutGasFlowRate:"Flowrate for Gas (blowout)",gor:"Gas Oil Ratio",rotationalSpeed:"Rotational Speed",densityGas:"Density for gas",inflowProductivityIndex:"Inflow productivity index",latitude:"Latitude",longitude:"Longitude",permeability:"Permeability",sdstats:"sdstats",roughness:"Material Roughness",wltubulars:"Tubular weight",speed:"Velocity",inverseStandSpeed:"Inverse Stand velocity",rop:"Rate of Penetration (ROP)",densityOil:"Density for oil",densityOilGas:"Density for oil/gas",kickToleranceVolume:"Volume for kick tolerance",densitySolid:"Density for solid",massPerLength:"Mass Per Length",durationShort:"Duration (TempSim short)",durationLong:"Duration (TempSim long)",wearFactor:"Wear factor",turbulentSkin:"Turbulent skin",pressurePerTemperature:"Pressure per temperature",location:"Location coordinates length",mixingRequirements:"Ratio between water and cement",Entalphy:"Entalphy",shearStress:"Shear Stress, force parallel to surface",volumeGradient:"Rate of Volume change per unit",deg:"Degree, a unit of angular measurement",dls:"Dogleg Severity, measure of wellbore curvature changes per unit length",wgrad:"Weight Gradient, change in weight per unit length",entalphy:"Entalphy, total heat content of a system",pressurechange:"Change in pressure over time or between two points",rpm:"Rotations per minute, a measure of the frequency of rotation, specifying the number of full rotations completed in one minute around a fixed axis"},e.UNITS_DESCRIPTION={in:"Inches",mm:"Milimeters",cm:"Centimeters",m:"Meters",km:"Kilometers",ft:"Feets",usft:"US Feets",in2:"Square inches",cm2:"Square centimeters",m2:"Square meters",kg:"Kilograms",tonnes:"Tonnes",mt:"Metric tonnes",kip:"Kip",bbl:"Barrels",Mm3:"Mega cubic meters",MMSCF:"Million Standard Cubic Feet",lbm:"Pound mass","kg/mol":"Kilograms per mole","lbf/mol":"Pounds per mole",sg:"Specific gravity",ppg:"Pounds per gallon","kg/m3":"Kilogram per cubic meters","lbm/ft3":"Pounds per cubic foot",s:"Seconds",min:"Minutes",h:"Hours",d:"Days",month:"Months",year:"Years","bbl/ft":"Barrels per foot",lpm:"Litres per minute",bpm:"Barrels per minute","m3/min":"Cubic meters per minute","m3/s":"Cubic meters per second",MMSCFD:"Million Standard Cubic Feet per day","1/MMSCFD":"Inverse Million Standard Cubic Feet per day",bar:"Bar",Pa:"Pascals",kPa:"Kilopascals",MPa:"Megapascals",kPsi:"Kilo pounds per square inch","kPa/m":"Kilopascals per meter","psi/ft":"Psi per foot","bar/100m":"Bars per 100m","psi/100ft":"Psi per 100ft","kPa/100m":"Kilopascals per 100m",C:"Degrees Celsius",F:"Degrees Fahrenheit",K:"Kelvins","C/100m":"Degrees Celsius per 100m","F/100ft":"Degrees Fahrenheit per 100m","K/100m":"Kelvins per 100m","lbf/ft":"Pound force / foot","Pa/C":"Pascal per celsius","Bar/C":"Bar per celsius","psi/F":"Psi per fahrenheit",N:"Newtons",kN:"Kilo Newtons","N/m":"Newtons per meter","daN/m":"Decanewtons per meter",lbf:"Pound force",kgf:"Kilogram force",rad:"Radians","BTU/lbm":"British Thermal Units per pound",ppf:"Pound per foot","kg/m":"Kilograms per meter","E-06/degC":"Micro per degree Celsius","E-06/degF":"Micro per degree Fahrenheit",km2:"Square kilometers",ft2:"Square feet",mm2:"Square millimeters",mile2:"Square miles",ft3:"Cubic feet","g/cm3":"Grams per cubic centimeter",Sm3:"Standard cubic meter","ft3/s":"Cubic feet per second","ft3/d":"Cubic feet per day","m3/d":"Cubic meter per day","1/m3/d":"Inverse Cubic meter per day","s/m3":"Seconds per cubic meters","bbl/d":"Barrels per day",tonneForce:"Tonne force",USGal:"US gallon","g/mol":"Grams per mol",Nm:"Newton meter",kNm:"Kilo Newton meter",ftlbf:"Foot pound","J/(kg*degC)":"Joules per kilogram degree Celsius","J/(kg*degK)":"Joules per kilogram degree Kelwin","BTU/(lbm*degF)":"British Thermal Unit per pound Fahrenheit","BTU/(h*ft*degF)":"British Thermal Units per hour feet degree Fahrenheit",l:"Litres","l/m":"Litres per meter","kJ/kg":"Kilo joules per kilogram","J/kg":"Joules per kilogram",deg:"Degrees","W/(mK)":"Watts per milli Kelvin",psi:"Pounds per square inch","1/bar":"1/bar","1/psi":"1/psi","deg/100ft":"Degrees per 100ft","deg/10m":"Degrees per 10m","deg/30m":"Degrees per 30m","%":"Percent",Hz:"Hertz","1/s":"Inverse second",rpm:"Revolutions per minute","Pa/m":"Pascal per meter","bar/m":"Bar per meter",gpm:"Gallons per minute","kg/s":"Kilograms per second","lbm/s":"Pound mass per second","deg/m":"Degrees per meter","deg/ft":"Degrees per foot","rad/m":"Radians per meter","rad/ft":"Radians per foot","dyn/cm":"Dyn per centimeter","mN/m":"Millinewtons per meter","1/kPa":"1/kPa",m3:"Cubic meters","m/s":"Meters per second","ft/s":"Feet per second","m/min":"Meters per minute","ft/min":"Feet per min","m/h":"Meters per hour","ft/h":"Feet per hour",mph:"Miles per hour","km/h":"Kilometers per hour","m/s2":"Meters per second squared","ft/s2":"Feet per second squared","Pa*s":"Pascal seconds",P:"Poise (dyne second per square centimeter)","mPa*s":"Millipascal seconds",cP:"Centi Poise",W:"Watts",hhp:"Hydraulic horsepower",hp:"Horsepower",kW:"Kilowatts",MW:"Megawatts","BTU/h":"British Thermal Units per hour","hhp/in2":"Hydraulic horsepower per square inch","hhp/ft2":"Hydraulic horsepower per square feet","Mm3/d":"Mega cubic meters per day","STB/d":"Stock Tank Barrel per day","Sm3/d":"Standard cubic meters per day","MSm3/d":"Mega standard cubic meters per day","SCF/STB":"Standard Cubic Feet per Stock Tank Barrel","Sm3/Sm3":"Standard cubic meters per Standard cubic meter","SCF/d":"Standard cubic feet per day",STB:"Stock Tank Barrel",SCF:"Standard Cubic Feet",Gsg:"Gas - specific gravity",Gppg:"Gas - pounds per gallon","Gkg/m3":"Gas - kilogram per cubic meters","Glbm/ft3":"Gas - pounds per cubic foot",MSm3:"Mega standard cubic meters","m3/s/bar":"Cubic per second per bar","Sm3/d/bar":"Standard cubic per day per bar","STB/d/psi":"Standard barrels per day per psi",klbf:"kilopound force","1/Pa":"1/Pascal","1/MPa":"1/MPa",ksi:"Kilopound per square inch","lbf/100ft2":"Pounds per 100 square foot","lb/ft3":"lb/ft3","°N":"°N (latitude)","°S":"°S (latitude)","°W":"°W (longitude)","°E":"°E (longitude)",fr:"Fraction",mD:"Millidarcy",Sigma:"Sigma",CI:"Confidence Interval","J/(s*m*degK)":"Joules per second meter Kelvin","C/m":"Degrees Celsius per meter","F/ft":"Degrees Fahrenheit per meter","K/m":"Kelvin per meter",microM:"Micro meter","W/m2":"Watt per square meter","1/K":"Inverse Kelvin","lb/ft":"Pound Per Feet","E-09/bar":"Nano per bar","E-10/psi":"10⁻¹⁰ per psi","E-14/pa":"10⁻¹⁴ per pascal",lk:"Link",ftCla:"Clark`s foot",lkCla:"Clark`s link",ftSe:"British foot (Sears 1922)",ydSe:"British yard (Sears 1922)",chSe:"British chain (Sears 1922)","chSe(T)":"British chain (Sears 1922 Truncated)",ftGC:"Gold Coast foot",ydInd:"Indian yard","d/stand":"Day per stand","h/stand":"Hour per stand","min/stand":"Minute per stand","s/stand":"Second per stand","m3/t":"Cubic meter per ton","L/100kg":"Liter per 100kg",GPa:"Gigapascals, unit of pressure","cm3/m":"Cubic cm per meter","in3/ft":"Cubic inches per foot","ft3/ft":"Cubic feet per foot","m3/m":"Cubic meters per meter","mm3/m":"Cubic millimeters per meter","1/GPa":"Inverse gigapascal",lps:"Liters per second"}}(oc)),oc}var Nr={},EP=Object.getOwnPropertyNames,NP=(e,t)=>function(){return t||(0,e[EP(e)[0]])((t={exports:{}}).exports,t),t.exports},CP=NP({"node_modules/ajv/dist/runtime/ucs2length.js"(e){Object.defineProperty(e,"__esModule",{value:!0});function t(n){const r=n.length;let i=0,o=0,l;for(;o<r;)i++,l=n.charCodeAt(o++),l>=55296&&l<=56319&&o<r&&(l=n.charCodeAt(o),(l&64512)===56320&&o++);return i}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'}});Object.defineProperty(Nr,"__esModule",{value:!0});Nr.numberSchemaValidator=Nr.testSchemaValidator=void 0;Nr.testSchemaValidator=Pm;var kP=CP().default;function Pm(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let o=null,l=0;if(e&&typeof e=="object"&&!Array.isArray(e)){if(e.name===void 0){const c={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};o===null?o=[c]:o.push(c),l++}if(e.name!==void 0){let c=e.name;if(typeof c=="string"){if(kP(c)<1){const f={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};o===null?o=[f]:o.push(f),l++}}else{const f={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};o===null?o=[f]:o.push(f),l++}}}else{const c={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};o===null?o=[c]:o.push(c),l++}return Pm.errors=o,l===0}Nr.numberSchemaValidator=Em;function Em(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let o=null,l=0;if(!(typeof e=="number"&&isFinite(e))){const c={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"number"},message:"must be number"};o===null?o=[c]:o.push(c),l++}if(l>0){const c=[];for(const h of o)h.keyword!=="errorMessage"&&!h.emUsed&&(h.instancePath===t||h.instancePath.indexOf(t)===0&&h.instancePath[t.length]==="/")&&h.schemaPath.indexOf("#")===0&&h.schemaPath[1]==="/"&&(c.push(h),h.emUsed=!0);if(c.length){const h={instancePath:t,schemaPath:"#/errorMessage",keyword:"errorMessage",params:{errors:c},message:"Must be a numerical value"};o===null?o=[h]:o.push(h),l++}const f=[];for(const h of o)h.emUsed||f.push(h);o=f,l=f.length}return Em.errors=o,l===0}var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.transformErrors=void 0;const OP=e=>e==null?void 0:e.map(({message:t})=>t);Sa.transformErrors=OP;var tg;function Fs(){return tg||(tg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNumber=e.withPrettyUnitLabel=e.validateAndClean=e.altUnitsList=e.convertSamePrecision=e.unumWithUnit=e.withUnit=e.roundNumberWithLabel=e.convertTable=e.toBase=e.convertAndGetValueStrict=e.convertAndGetValue=e.isValueWithUnit=e.unum=e.getUnit=e.getValue=e.split=e.to=e.checkAndCleanDecimalComma=e.getAltUnitsListByQuantity=e.unitFromQuantity=e.unitFromKey=e.label=e.getQuantities=e.getUnitsForQuantity=e.showAltUnitsList=e.EXP_NOTATION_RE=e.SEPARATOR=void 0;const t=Jc(),n=mi(),r=Ls(),i=kr(),o=Zc(),l=Nr,c=Sa;e.SEPARATOR="|";const f=/^(-?[0-9., /]*?(?:e[-+]?[0-9]+)?)([^0-9-., /].*)?$/;e.EXP_NOTATION_RE=/^[-+]?[0-9]*\.?[0-9]+(?:\/[0-9]*\.?[0-9]+)?(?:[eE][-+]?[0-9]+)?$/;function h(V){return t.ALT_UNITS[V]}e.showAltUnitsList=h;function d(V){return h(V)}e.getUnitsForQuantity=d;function m(){return Object.keys(t.ALT_UNITS)}e.getQuantities=m;function p(V){return t.LABELS[V]}e.label=p;function S(V){return t.UNIT_FROM_KEY[V]}e.unitFromKey=S;function P(V){return S(V)}e.unitFromQuantity=P;function E(V){const k=h(V);return k?k.map(W=>({unit:W,label:p(W)})):void 0}e.getAltUnitsListByQuantity=E;function I(V){const k=/\.{2,}/,W=/,/;if(typeof V=="string")for(;k.test(V)||W.test(V);)V=V.replace(k,"."),V=V.replace(W,".");return V}e.checkAndCleanDecimalComma=I;function y(V,k,W){if(V=I(V),W==="undefined"&&console.warn('Inconsistent "to unit" - debug call to "Units.to()"'),k==="undefined"&&(k=W,console.warn('Inconsistent "from unit" - debug call to "Units.to()"')),k===W)return(0,i.toNum)(V);if(V===1/0||V==="Infinity")return 1/0;if(V===-1/0||V==="-Infinity")return-1/0;if((0,n.isNonNumerical)(V)&&V!=="")return NaN;const rt=t.KNOWN_CONVERSIONS[k+"|"+W];if(rt)return rt((0,i.toNum)(V));if(t.DEPRECATED_UNITS[k])return console.warn(`Unit '${k}' is deprecated - use '${t.DEPRECATED_UNITS[k]}' instead.`),y(V,t.DEPRECATED_UNITS[k],W);if(t.DEPRECATED_UNITS[W])return console.warn(`Unit '${W}' is deprecated - use '${t.DEPRECATED_UNITS[W]}' instead.`),y(V,k,t.DEPRECATED_UNITS[W]);if(t.UNIT_ALIASES[W])return y(V,k,t.UNIT_ALIASES[W]);if(t.UNIT_ALIASES[k])return y(V,t.UNIT_ALIASES[k],W);const Q=t.INTERMEDIATE_CONVERSIONS[k];if(Q){const tt=y(V,k,Q);return y(tt,Q,W)}else{const tt=t.INTERMEDIATE_CONVERSIONS[W];if(W&&tt&&tt!==W){const ht=y(V,k,tt);return y(ht,tt,W)}}throw console.error("no conversions found",V,k,"->",W),new Error("No conversions found: "+V+" "+k+" -> "+W)}e.to=y;function v(V){let k,W=V!=null?String(V):"";return(0,n.charCount)(e.SEPARATOR,W)>1&&(k=W.split(e.SEPARATOR),W=k.slice(0,-1).join("")+e.SEPARATOR+k.slice(-1)),W.indexOf(e.SEPARATOR)>=0?k=W.split(e.SEPARATOR):t.SPECIAL_NUMBERS_STRING.includes(W)?k=[W,""]:(k=(0,n.cleanNumStr)(W).match(f),k&&(k=k.slice(1))),k||(k=["0",""]),k[1]==null&&(k[1]=""),[k[0],k[1]]}e.split=v;function C(V){return v(V)[0]}e.getValue=C;function w(V){return v(V)[1]}e.getUnit=w;function O(V,k,W){if(V==null||V==="")return 0;if(typeof V=="string"&&V.startsWith("NaN")||typeof V=="number"&&isNaN(V))return NaN;const rt=(0,n.cleanNumStr)(V).replaceAll("+",""),Q=v(rt);if(!Q){if(k&&W)return O(V+W,k);throw new Error("unum: invalid number: "+V)}if(Q[0]==null&&(Q[0]="0"),Q[1]&&(W=Q[1]),!W&&k!==W)throw new Error(`unum: unable to figure out unit: ${V} fromUnit ${W}`);if(k===W){const tt=Q[0]?(0,i.toNum)(Q[0]):0;if(tt===1/0||tt==="Infinity")return 1/0;if(tt===-1/0||tt==="-Infinity")return-1/0;if(typeof tt=="string"&&e.EXP_NOTATION_RE.test(tt))return parseFloat(tt);if(!(0,n.isNumeric)(tt)&&tt!==1/0&&tt!==-1/0)throw new Error("unum: invalid number: "+tt+", "+typeof tt);return(0,n.cleanNum)(tt)}return y(Q[0],W,k)}e.unum=O;function B(V){if(!V)return!1;const k=String(V).split(e.SEPARATOR);return k.length===2&&t.KNOWN_UNITS.includes(k[1])}e.isValueWithUnit=B;function F(V,k,W){return O(V,k,W)}e.convertAndGetValue=F;function H(V,k,W){if(V===""||V===null)return V;if(typeof V=="string"&&B(V)&&C(V)==="")return"";const rt=typeof V=="string",Q=F(V,k,W);return rt?String((0,i.toString)(Q)):Q}e.convertAndGetValueStrict=H;function Z(V,k){const W=S(k),rt=v((V||"").toString());return O(V,W,rt[1]||W)}e.toBase=Z;function it(V,k,W,rt=!1){if(!k||!k.length||!k[0].length)return k;V||(V=k[0]),W||(W=V);const Q=k[0][0],tt=Q&&v(`${Q}`),Et=!(tt&&tt[0]&&isNaN(tt[1]))&&isNaN(k[0][0]);let Ot=Et?1:0;const Bt=Et?k[0]:W,St=[V];for(;Ot<k.length;Ot++){const Lt=Array(V.length),ye=k[Ot];for(let ee=0;ee<Lt.length;ee++)Lt[ee]=V[ee]&&ye[ee]?O(ye[ee],V[ee],Bt[ee]):ye[ee];St.push(Lt)}return rt&&St.shift(),St}e.convertTable=it;function $(V,k=2){return(0,r.displayNumber)((0,o.round)(V,k),{withUnit:!0})}e.roundNumberWithLabel=$;function X(V,k,W=""){if((V===null||V===""||V===void 0)&&(V=W),k===null)return String(V);let[rt,Q]=String(V).includes(e.SEPARATOR)?v(String(V)):[V,k];return Q||(Q=k),[rt,Q].join(e.SEPARATOR)}e.withUnit=X;function bt(V,k,W){return X(O(V,k,W),k)}e.unumWithUnit=bt;function dt(V,k,W){const rt=String(V),Q=v(rt),tt=!Q[1]||Q[1]==k?Number(Q[0]):y(Q[0],String(Q[1]),k);let ht="0",Et=W;if(tt!==0){if(!Et){if(Q[1]===k)return rt;const St=String(Q[0]).match(/^[-+.,0]*(\d*)[.,]?(\d*)/);St?Et=Math.max(3,St[1].length+St[2].length):Et=3}const Ot=Math.pow(10,--Et),Bt=Math.abs(tt);if(Bt>=1e5*Ot||Bt*1e4*(1+Ot)<Ot)ht=tt.toExponential(Et);else if(Bt>=Ot)ht=tt.toFixed();else{const St=Math.floor(Math.log10(Bt));ht=tt.toFixed(Et-St);let Lt=ht.length;if(ht[--Lt]=="0"){for(;ht[--Lt]=="0";);ht=ht.slice(0,Lt+(ht[Lt]=="."?0:1))}}}return X(ht,k)}e.convertSamePrecision=dt;function ft(V,k){var W,rt;let Q=V;return w(V)||(Q=X(V,(W=P(k))!==null&&W!==void 0?W:"")),((rt=t.ALT_UNITS[k])!==null&&rt!==void 0?rt:[]).map(ht=>[...v(dt(Q,ht)),p(ht)])}e.altUnitsList=ft;function wt(V,k){const W=v(V)[1],rt=/[^0-9.,-Ee]/g,Q=/^([^(e|E)]*[eE])|[eE]/g,tt=/^[E|e]*|[E|e]*$/g,ht=/,/g,Et=/^([^.]*\.)|\./g,Ot=/\.(?=e)/g,Bt=/-|[eE]-/g,St=k.replace(rt,"").replace(Q,"$1").replace(tt,"").replace(ht,".").replace(Et,"$1").replace(Ot,"").replace(Bt,(Lt,ye)=>ye===0||Lt.toLowerCase()==="e-"?Lt:"");return Number.isFinite(+St)?`${St}${W?"|":""}${W}`:V}e.validateAndClean=wt;function Ct(V){var k;const[W,rt]=v(V),Q=(k=t.LABELS[rt])!==null&&k!==void 0?k:"";return`${W} ${Q}`}e.withPrettyUnitLabel=Ct;function Ht(V){let k=V;return typeof V=="string"&&B(V)&&(k=C(V)),k=I(k),(0,n.isNumeric)(k)?{valid:(0,l.numberSchemaValidator)((0,i.toNum)(k)),errors:(0,c.transformErrors)(l.numberSchemaValidator.errors)}:{valid:(0,l.numberSchemaValidator)(k),errors:(0,c.transformErrors)(l.numberSchemaValidator.errors)}}e.validateNumber=Ht}(sc)),sc}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.numFraction=e.asFraction=e.isFraction=e.fraction=e.getNumberOfDigitsToShow=e.charCount=e.displayNumberToFixed=e.displayNumber=e.formatNumber=e.allNumbers=e.isEmptyValueWithUnit=e.isNonNumerical=e.isNumeric=e.isCloseToOrGreaterThan=e.isCloseToOrLessThan=e.isDeepCloseTo=e.isCloseTo=e.roundByRange=e.roundByMagnitudeToFixed=e.roundByMagnitude=e.roundToDecimalPrecision=e.roundToPrecision=e.roundToFixed=e.round=e.validateNumber=e.withPrettyUnitLabel=e.convertAndGetValueStrict=e.convertAndGetValue=e.convertSamePrecision=e.getUnit=e.getValue=e.isValueWithUnit=e.validateAndClean=e.unumWithUnit=e.withUnit=e.roundNumberWithLabel=e.convertTable=e.altUnitsList=e.toBase=e.unum=e.split=e.to=e.unitFromQuantity=e.unitFromKey=e.checkAndCleanDecimalComma=e.getQuantities=e.getUnitsForQuantity=e.getAltUnitsListByQuantity=e.showAltUnitsList=e.label=void 0,e.UNITS_DESCRIPTION=e.QUANTITIES_DESCRIPTION=e.KNOWN_UNITS=e.INTERMEDIATE_CONVERSIONS=e.UNIT_ALIASES=e.DEPRECATED_UNITS=e.KNOWN_CONVERSIONS=e.UNIT_FROM_KEY=e.LABELS=e.ALT_UNITS=e.stripLeadingZeros=e.isScientificStringNum=e.isValidNum=e.toString=e.toNum=e.cleanNum=e.cleanNumStr=void 0;const t=Fs();Object.defineProperty(e,"label",{enumerable:!0,get:function(){return t.label}}),Object.defineProperty(e,"showAltUnitsList",{enumerable:!0,get:function(){return t.showAltUnitsList}}),Object.defineProperty(e,"getAltUnitsListByQuantity",{enumerable:!0,get:function(){return t.getAltUnitsListByQuantity}}),Object.defineProperty(e,"checkAndCleanDecimalComma",{enumerable:!0,get:function(){return t.checkAndCleanDecimalComma}}),Object.defineProperty(e,"unitFromKey",{enumerable:!0,get:function(){return t.unitFromKey}}),Object.defineProperty(e,"to",{enumerable:!0,get:function(){return t.to}}),Object.defineProperty(e,"split",{enumerable:!0,get:function(){return t.split}}),Object.defineProperty(e,"unum",{enumerable:!0,get:function(){return t.unum}}),Object.defineProperty(e,"toBase",{enumerable:!0,get:function(){return t.toBase}}),Object.defineProperty(e,"altUnitsList",{enumerable:!0,get:function(){return t.altUnitsList}}),Object.defineProperty(e,"convertTable",{enumerable:!0,get:function(){return t.convertTable}}),Object.defineProperty(e,"roundNumberWithLabel",{enumerable:!0,get:function(){return t.roundNumberWithLabel}}),Object.defineProperty(e,"withUnit",{enumerable:!0,get:function(){return t.withUnit}}),Object.defineProperty(e,"unumWithUnit",{enumerable:!0,get:function(){return t.unumWithUnit}}),Object.defineProperty(e,"validateAndClean",{enumerable:!0,get:function(){return t.validateAndClean}}),Object.defineProperty(e,"isValueWithUnit",{enumerable:!0,get:function(){return t.isValueWithUnit}}),Object.defineProperty(e,"getValue",{enumerable:!0,get:function(){return t.getValue}}),Object.defineProperty(e,"getUnit",{enumerable:!0,get:function(){return t.getUnit}}),Object.defineProperty(e,"convertSamePrecision",{enumerable:!0,get:function(){return t.convertSamePrecision}}),Object.defineProperty(e,"convertAndGetValue",{enumerable:!0,get:function(){return t.convertAndGetValue}}),Object.defineProperty(e,"convertAndGetValueStrict",{enumerable:!0,get:function(){return t.convertAndGetValueStrict}}),Object.defineProperty(e,"getUnitsForQuantity",{enumerable:!0,get:function(){return t.getUnitsForQuantity}}),Object.defineProperty(e,"getQuantities",{enumerable:!0,get:function(){return t.getQuantities}}),Object.defineProperty(e,"unitFromQuantity",{enumerable:!0,get:function(){return t.unitFromQuantity}}),Object.defineProperty(e,"withPrettyUnitLabel",{enumerable:!0,get:function(){return t.withPrettyUnitLabel}}),Object.defineProperty(e,"validateNumber",{enumerable:!0,get:function(){return t.validateNumber}});const n=Jc();Object.defineProperty(e,"ALT_UNITS",{enumerable:!0,get:function(){return n.ALT_UNITS}}),Object.defineProperty(e,"LABELS",{enumerable:!0,get:function(){return n.LABELS}}),Object.defineProperty(e,"UNIT_FROM_KEY",{enumerable:!0,get:function(){return n.UNIT_FROM_KEY}}),Object.defineProperty(e,"KNOWN_CONVERSIONS",{enumerable:!0,get:function(){return n.KNOWN_CONVERSIONS}}),Object.defineProperty(e,"DEPRECATED_UNITS",{enumerable:!0,get:function(){return n.DEPRECATED_UNITS}}),Object.defineProperty(e,"UNIT_ALIASES",{enumerable:!0,get:function(){return n.UNIT_ALIASES}}),Object.defineProperty(e,"INTERMEDIATE_CONVERSIONS",{enumerable:!0,get:function(){return n.INTERMEDIATE_CONVERSIONS}}),Object.defineProperty(e,"KNOWN_UNITS",{enumerable:!0,get:function(){return n.KNOWN_UNITS}}),Object.defineProperty(e,"QUANTITIES_DESCRIPTION",{enumerable:!0,get:function(){return n.QUANTITIES_DESCRIPTION}}),Object.defineProperty(e,"UNITS_DESCRIPTION",{enumerable:!0,get:function(){return n.UNITS_DESCRIPTION}});const r=mi();Object.defineProperty(e,"isNumeric",{enumerable:!0,get:function(){return r.isNumeric}}),Object.defineProperty(e,"isNonNumerical",{enumerable:!0,get:function(){return r.isNonNumerical}}),Object.defineProperty(e,"isEmptyValueWithUnit",{enumerable:!0,get:function(){return r.isEmptyValueWithUnit}}),Object.defineProperty(e,"allNumbers",{enumerable:!0,get:function(){return r.allNumbers}}),Object.defineProperty(e,"formatNumber",{enumerable:!0,get:function(){return r.formatNumber}}),Object.defineProperty(e,"charCount",{enumerable:!0,get:function(){return r.charCount}}),Object.defineProperty(e,"getNumberOfDigitsToShow",{enumerable:!0,get:function(){return r.getNumberOfDigitsToShow}}),Object.defineProperty(e,"fraction",{enumerable:!0,get:function(){return r.fraction}}),Object.defineProperty(e,"isFraction",{enumerable:!0,get:function(){return r.isFraction}}),Object.defineProperty(e,"asFraction",{enumerable:!0,get:function(){return r.asFraction}}),Object.defineProperty(e,"numFraction",{enumerable:!0,get:function(){return r.numFraction}}),Object.defineProperty(e,"cleanNumStr",{enumerable:!0,get:function(){return r.cleanNumStr}}),Object.defineProperty(e,"cleanNum",{enumerable:!0,get:function(){return r.cleanNum}}),Object.defineProperty(e,"stripLeadingZeros",{enumerable:!0,get:function(){return r.stripLeadingZeros}});const i=kr();Object.defineProperty(e,"toNum",{enumerable:!0,get:function(){return i.toNum}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return i.toString}}),Object.defineProperty(e,"isValidNum",{enumerable:!0,get:function(){return i.isValidNum}}),Object.defineProperty(e,"isScientificStringNum",{enumerable:!0,get:function(){return i.isScientificStringNum}});const o=Ls();Object.defineProperty(e,"displayNumber",{enumerable:!0,get:function(){return o.displayNumber}}),Object.defineProperty(e,"displayNumberToFixed",{enumerable:!0,get:function(){return o.displayNumberToFixed}});const l=Zc();Object.defineProperty(e,"round",{enumerable:!0,get:function(){return l.round}}),Object.defineProperty(e,"roundToFixed",{enumerable:!0,get:function(){return l.roundToFixed}}),Object.defineProperty(e,"roundToPrecision",{enumerable:!0,get:function(){return l.roundToPrecision}}),Object.defineProperty(e,"roundToDecimalPrecision",{enumerable:!0,get:function(){return l.roundToDecimalPrecision}}),Object.defineProperty(e,"roundByMagnitude",{enumerable:!0,get:function(){return l.roundByMagnitude}}),Object.defineProperty(e,"roundByMagnitudeToFixed",{enumerable:!0,get:function(){return l.roundByMagnitudeToFixed}}),Object.defineProperty(e,"roundByRange",{enumerable:!0,get:function(){return l.roundByRange}});const c=Mm();Object.defineProperty(e,"isCloseTo",{enumerable:!0,get:function(){return c.isCloseTo}}),Object.defineProperty(e,"isDeepCloseTo",{enumerable:!0,get:function(){return c.isDeepCloseTo}}),Object.defineProperty(e,"isCloseToOrLessThan",{enumerable:!0,get:function(){return c.isCloseToOrLessThan}}),Object.defineProperty(e,"isCloseToOrGreaterThan",{enumerable:!0,get:function(){return c.isCloseToOrGreaterThan}})})(wm);var Nm={exports:{}};/*!
68
- Copyright (c) 2018 Jed Watson.
69
- Licensed under the MIT License (MIT), see
70
- http://jedwatson.github.io/classnames
71
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",l=0;l<arguments.length;l++){var c=arguments[l];c&&(o=i(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var l="";for(var c in o)t.call(o,c)&&o[c]&&(l=i(l,c));return l}function i(o,l){return l?o?o+" "+l:o+l:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Nm);var AP=Nm.exports;const IP=sg(AP),eg=10,DP=e=>e.reduce((t,n,r)=>{if(r===0)return t;const i=Math.abs(n-e[r-1]);return Math.max(i,t)},0),RP=(e,t,n)=>{const{axis:r,left:i,top:o,right:l,bottom:c}=n,f=r==="x",h=f?i:o,d=f?l:c,m=e>h,p=e<d,S=t.indexOf(e)!==-1;return m&&p&&!S},LP=(e,t)=>{const n=e.sort((c,f)=>c-f),r=DP(e)/10,i=e[0],o=(e.length+1)*eg;return[...Array(o)].map((c,f)=>{const h=i+(f-eg+1)*r;return parseFloat(h.toFixed(1))}).filter(c=>RP(c,n,t))},FP=e=>{var c,f,h,d,m,p,S,P,E;const{chart:t,ctx:n}=e,r=t.config;if(!((d=(h=(f=(c=r==null?void 0:r.options)==null?void 0:c.scales)==null?void 0:f[e.id])==null?void 0:h.grid)!=null&&d.drawOnChartArea)||r.options.indexAxis===e.axis)return;const i=e.axis==="x",o=e.ticks.map((I,y)=>e.getPixelForTick(y)).sort((I,y)=>I-y),l=LP(o,e);n.save(),n.strokeStyle=((E=(P=(S=(p=(m=r==null?void 0:r._config)==null?void 0:m.options)==null?void 0:p.scales)==null?void 0:S[e.id])==null?void 0:P.grid)==null?void 0:E.color)||"rgba(0,0,0,0.06)",n.lineWidth=.5,l.forEach(I=>{if(n.beginPath(),i){const{top:y,bottom:v}=t.chartArea;n.moveTo(I,y),n.lineTo(I,v)}else{const{left:y,right:v}=t.chartArea;n.moveTo(y,I),n.lineTo(v,I)}n.stroke()}),n.restore()},BP={id:"minorGridlines",beforeDatasetsDraw:e=>{const{scales:t}=e;Object.keys(t).forEach(n=>FP(t[n]))}},gi={ZERO:0,INITIAL:2,HOVERED:6,POINT_HOVERED:8},WP="rgba(0,0,0,0.1)",zP=[10,2],UP=12,Cm='"Roobert", "Noto Sans", sans-serif',km="hsl(60, 10.34482759%, 12.5%)",ng=12,DE=8,RE=4,Zo="transparent",LE=[1,10,100,1e3,1e4],HP=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac"],FE="99",VP=16777215,BE="auto",WE={NO:0,FAST:1e3},GP="new_chart",jP="htmlLegend",KP=9,zE=1/10**KP,UE=[{offset:0,color:"rgba(144,238,144,0.8)"},{offset:.6,color:"rgba(255,255,224,0.8)"},{offset:.8,color:"rgba(255,255,224,0.8)"},{offset:.92,color:"rgba(255,182,193,0.5)"},{offset:.99,color:"rgba(255,182,193,0.8)"}];var Qc=(e=>(e.X="x",e.Y="y",e))(Qc||{}),ci=(e=>(e.Bottom="bottom",e.Top="top",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomLeft="bottom-left",e.BottomRight="bottom-right",e))(ci||{}),$P=(e=>(e.Line="line",e.Bar="bar",e))($P||{}),$i=(e=>(e.Pointer="pointer",e.Initial="initial",e.Grab="grab",e.Grabbing="grabbing",e.Crosshair="crosshair",e.Move="move",e))($i||{}),YP=(e=>(e.Category="category",e.Linear="linear",e.Logarithmic="logarithmic",e))(YP||{}),Om=(e=>(e.Vertical="vertical",e))(Om||{}),XP=(e=>(e.Y="yLabel",e.X="xLabel",e))(XP||{}),qP=(e=>(e.End="end",e.Start="start",e.Center="center",e.Right="right",e.Left="left",e))(qP||{}),ZP=(e=>(e.Box="box",e.Ellipse="ellipse",e.Line="line",e.Text="text",e))(ZP||{}),Am=(e=>(e.Circle="circle",e.Square="rect",e.Diamond="rectRot",e.Triangle="triangle",e))(Am||{}),JP=(e=>(e.Nearest="nearest",e))(JP||{}),QP=(e=>(e.X="x",e.Y="y",e.XY="xy",e.Z="z",e))(QP||{}),tE=(e=>(e.Shift="Shift",e))(tE||{}),eE=(e=>(e.Mousemove="mousemove",e.Mouseout="mouseout",e.Click="click",e.Touchstart="touchstart",e.Touchmove="touchmove",e.Dblclick="dblclick",e))(eE||{});const nE={id:"chartAreaBorder",beforeDraw(e,t,n){const{ctx:r,chartArea:{left:i,top:o,width:l,height:c}}=e;r.save(),r.strokeStyle=n.borderColor,r.lineWidth=n.borderWidth,r.setLineDash(n.borderDash||[]),r.lineDashOffset=n.borderDashOffset??0,r.strokeRect(i,o,l,c),r.restore()}},HE=(e,t)=>{var i;let n=[];e.showMinorGridlines&&n.push(BP);const r=t==null?void 0:t.customLegend;return r!=null&&r.customLegendPlugin&&(r!=null&&r.customLegendContainerID)&&n.push({id:jP,...(i=t==null?void 0:t.customLegend)==null?void 0:i.customLegendPlugin}),n.push(nE),n},iE=e=>{const t=`#${Math.floor(Math.random()*VP).toString(16)}`;return e.includes(t)?iE(e):(e.push(t),e)},VE=e=>e.title!==""?{display:!0,text:e.title}:{},GE=e=>e===Om.Vertical,jE=(e,t)=>{const[n,r]=e===Qc.Y?[ci.Left,ci.Right]:[ci.Top,ci.Bottom];return t%2===0?n:r},KE=(e,t)=>{const{width:n,height:r,staticChartHeight:i=!1,squareAspectRatio:o=0}=e,l=o?t.squareAspectRatio:"";let c="";return n||r?c="":c=i?t==null?void 0:t.fixedHeight:t==null?void 0:t.stretchHeight,IP(t.chart,c,l)},$E=(e,t)=>{const{legend:n}=e||{};return{position:(n==null?void 0:n.position)||ci.Top,display:n==null?void 0:n.display,align:n==null?void 0:n.align,labels:{boxHeight:ng,boxWidth:n!=null&&n.usePointStyle?ng:void 0,usePointStyle:n==null?void 0:n.usePointStyle},onClick:t}},YE=e=>{const{error:t}=e.dataset.data[e==null?void 0:e.dataIndex];return t?`Error: ${wm.round(t,4)}`:""},XE=(e,t)=>{var i,o,l;const n=(l=(o=(i=e==null?void 0:e.dataset)==null?void 0:i.data)==null?void 0:o[e==null?void 0:e.dataIndex])==null?void 0:l.label,r=Array.isArray(n)?n.join(" , "):n;return t&&(r!=null&&r.length)?` (${r})`:""},qE=e=>e?e.reduce((n,r,i)=>{var l;const o=((l=r.label)==null?void 0:l.replace(/\s/g,"_"))||String(i);return[...n,o]},[]).join("_"):GP,ZE=()=>{zt.font.size=UP,zt.font.family=Cm,zt.color=km,zt.borderColor=WP},JE=e=>!!(e==null||e===""||Array.isArray(e)&&e.length===0||typeof e=="object"&&Object.keys(e).length===0),rE="TOGGLE_DATA_VISIBILITY",sE="RESET_STATE",oE={annotation:[]},aE=(e,t)=>{var n;switch(t.type){case sE:return t.payload;case rE:{const{chartInstance:r,dsConfig:i,annotationConfig:o}=t.payload,{datasetIndex:l,datasets:c,dataset:f}=i,{annotationIndex:h}=o,d=ms.cloneDeep(e),m=ms.defaultTo(r==null?void 0:r.isDatasetVisible(l),!0);if(l>=0&&(r==null||r.setDatasetVisibility(l,!m),f!=null&&f.displayGroup)){const p=f.displayGroup;c.forEach((S,P)=>{S.displayGroup===p&&(r==null||r.setDatasetVisibility(Number(P),!m))})}if(h>=0){const p=ms.findIndex(d.annotation,{annotationIndex:h});if(p>=0){const S=ms.defaultTo((n=d.annotation[p])==null?void 0:n.display,!1);ms.set(d,["annotation",p,"display"],!S)}}return d}default:return e}};var lE=(e=>(e.MOUSEDOWN="mousedown",e.MOUSEMOVE="mousemove",e.MOUSEUP="mouseup",e))(lE||{}),ce=(e=>(e.POINT="point",e.BOX="box",e.LINE="line",e.ELLIPSE="ellipse",e))(ce||{}),cE=(e=>(e.X="x",e.Y="y",e.Both="both",e))(cE||{});const uE=(e,t,n)=>{var r;t.canvas.style.cursor=$i.Pointer,(r=e.options.scaleID)!=null&&r.includes(Qc.X)&&e.options.label&&(e.options.label.xAdjust=t.chartArea.left),e.options.borderWidth=gi.HOVERED,e.options.label&&(e.label.options.display=!0,e.options.label.enabled=!0),n!=null&&n.enableDrag&&(t.hoveredAnnotationId=e.options.id||null,t.update()),t.draw()},fE=(e,t,n)=>{e.options.borderWidth=gi.INITIAL,t.canvas.style.cursor=$i.Initial,t.hoveredAnnotationId=null,e.options.label&&(e.label.options.display=!1,e.options.label.enabled=!1),n!=null&&n.enableDrag&&(t.hoveredAnnotationId=null,t.update()),t.draw()},hE=(e,t,n)=>{n!=null&&n.enableDrag&&(t.hoveredAnnotationId=e.options.id||null,t.update(),e.options.borderWidth=gi.HOVERED,t.canvas.style.cursor=$i.Pointer),t.draw()},dE=(e,t,n)=>{n!=null&&n.enableDrag&&(t.hoveredAnnotationId=null,e.options.borderWidth=gi.INITIAL,t.canvas.style.cursor=$i.Initial,t.update()),t.draw()},gE=(e,t,n)=>{n!=null&&n.enableDrag&&(t.hoveredAnnotationId=e.options.id||null,t.update(),e.options.borderWidth=gi.POINT_HOVERED,t.canvas.style.cursor=$i.Pointer),t.draw()},mE=(e,t,n)=>{n!=null&&n.enableDrag&&(t.hoveredAnnotationId=null,e.options.borderWidth=gi.INITIAL,t.canvas.style.cursor=$i.Initial,t.update()),t.draw()},pE=e=>e==null?void 0:e.map((t,n)=>{var y,v,C,w,O,B;const r=(t==null?void 0:t.annotationAxis)??void 0,i=(t==null?void 0:t.color)??HP[n],o=(t==null?void 0:t.type)??ce.LINE,l=t==null?void 0:t.adjustScaleRange,c={[ce.LINE]:i,[ce.POINT]:i,[ce.BOX]:i,[ce.ELLIPSE]:Zo}[o]||Zo,f=o===ce.LINE?gi.INITIAL:0,h=o===ce.LINE?zP:void 0,d={content:t==null?void 0:t.label,display:!0,font:{weight:"normal"}},m={[ce.LINE]:{backgroundColor:i,content:t==null?void 0:t.label,display:!1,position:ci.Top},[ce.POINT]:{backgroundColor:((y=t==null?void 0:t.labelConfig)==null?void 0:y.backgroundColor)??Zo,content:t==null?void 0:t.label,display:((v=t==null?void 0:t.labelConfig)==null?void 0:v.display)??!!(t!=null&&t.label),position:((C=t==null?void 0:t.labelConfig)==null?void 0:C.position)??ci.Bottom,color:((w=t==null?void 0:t.labelConfig)==null?void 0:w.color)??km,font:((O=t==null?void 0:t.labelConfig)==null?void 0:O.font)??`12px ${Cm}`,borderWidth:gi.INITIAL,padding:5,borderRadius:3,borderColor:((B=t==null?void 0:t.labelConfig)==null?void 0:B.borderColor)??Zo},[ce.BOX]:d,[ce.ELLIPSE]:d}[o]||d,p=({element:F},{chart:H})=>{switch(o){case ce.LINE:uE(F,H,t);break;case ce.BOX:hE(F,H,t);break;case ce.POINT:gE(F,H,t);break}},S=({element:F},{chart:H})=>{switch(o){case ce.LINE:fE(F,H,t);break;case ce.BOX:dE(F,H,t);break;case ce.POINT:mE(F,H,t);break}},P=()=>(F,H)=>t!=null&&t.onDragStart?t==null?void 0:t.onDragStart(F,H):void 0,E=()=>(F,H)=>t!=null&&t.onDrag?t==null?void 0:t.onDrag(F,H):void 0,I=()=>(F,H)=>t!=null&&t.onDragEnd?t==null?void 0:t.onDragEnd(F,H):void 0;return{...t,display:t==null?void 0:t.display,annotationIndex:n,id:`${t==null?void 0:t.label}-${t==null?void 0:t.value}-${n}`,scaleID:r,label:m,backgroundColor:i,borderColor:c,borderWidth:f,borderDash:h,type:o,adjustScaleRange:l,enter:p,leave:S,onDragStart:P,onDrag:E,onDragEnd:I,pointStyle:(t==null?void 0:t.pointStyle)??Am.Circle,resizable:(t==null?void 0:t.resizable)??!0,displayDragCoordinates:(t==null?void 0:t.displayDragCoordinates)??!0}}),bE=({showAnnotations:e,annotationsData:t})=>e&&t&&(t==null?void 0:t.length)?pE(t)??[]:[],_E=(e,t,n)=>{const r=Te.useRef(e);Te.useEffect(()=>{kv(e,r==null?void 0:r.current)||(t({type:"RESET_STATE",payload:e}),r.current=e)},[...n])},yE=Te.createContext(void 0),ig=({children:e,options:t})=>{const{showAnnotations:n=!0,annotationsData:r=[]}=(t==null?void 0:t.annotations)??{},i=bE({showAnnotations:n,annotationsData:r}),o={...oE,annotation:i},[l,c]=Te.useReducer(aE,o),f=Te.useMemo(()=>({state:l,dispatch:c}),[l,t,c]);return _E(o,c,[t]),Ov.jsx(yE.Provider,{value:f,children:e})};try{ig.displayName="LegendProvider",ig.__docgenInfo={description:"",displayName:"LegendProvider",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"TChartsOption"}}}}}catch{}export{gi as $,qP as A,WP as B,HP as C,Cm as D,OE as E,HE as F,UE as G,ia as H,$P as I,FE as J,jE as K,ng as L,LE as M,YE as N,JP as O,ci as P,XE as Q,XP as R,YP as S,RE as T,CE as U,Wi as V,ra as W,qE as X,JE as Y,tE as Z,QP as _,DE as a,zP as a0,zE as a1,KP as a2,Am as a3,eE as a4,ce as a5,$i as a6,cE as a7,lE as a8,NE as a9,hg as aA,zt as aB,yE as aC,rE as aD,$E as aE,jP as aF,ZP as aG,Pt as aa,te as ab,fn as ac,Un as ad,gc as ae,Cs as af,He as ag,qt as ah,ma as ai,pa as aj,hi as ak,lS as al,la as am,vr as an,bs as ao,Ag as ap,pt as aq,ie as ar,ut as as,Ai as at,oe as au,mh as av,$t as aw,fS as ax,wr as ay,ge as az,ig as b,IP as c,wm as d,kE as e,WE as f,iE as g,Kc as h,xd as i,vd as j,Md as k,ys as l,EE as m,PE as n,wE as o,ME as p,AE as q,IE as r,ZE as s,ms as t,GE as u,Qc as v,UP as w,VE as x,BE as y,KE as z};