@svgrid/grid-wc 3.0.0 → 3.0.2

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 (96) hide show
  1. package/README.md +130 -110
  2. package/dist/GridMenus-B1mC1aPp.js +1077 -0
  3. package/dist/SvChartMenu-CBMKm7Xb.js +413 -0
  4. package/dist/SvDateRangeInput-BrYTQEMM.js +197 -0
  5. package/dist/SvDateTimePicker-CnLlqNDQ.js +766 -0
  6. package/dist/SvField-Bmzp3ObZ.js +147 -0
  7. package/dist/SvGridCellEditor-B005dmV1.js +560 -0
  8. package/dist/SvGridChart-4TcL9Rj2.js +3702 -0
  9. package/dist/SvGridChartBuilder-C4OL4XYx.js +1165 -0
  10. package/dist/SvGridChartPanel-CfHA8Ioq.js +1743 -0
  11. package/dist/SvGridChartView-Ci-9_EJ0.js +45 -0
  12. package/dist/SvGridDropdown-BlA6iw9m.js +257 -0
  13. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +178 -7
  14. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  15. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +77 -2
  16. package/dist/{shadow/cell-formatting-C0OsDmi_.js → cell-formatting-Eypm-id0.js} +1 -1
  17. package/dist/chart/SvChartMenu-C-sbGNk8.js +586 -0
  18. package/dist/chart/chart-export-BHGuh_kZ.js +127 -0
  19. package/dist/chart/chart-export-pdf-BjkkIEkE.js +104 -0
  20. package/dist/chart/chart-summary-B86RFA3M.js +137 -0
  21. package/dist/chart/chart-trend-DP6DSsBa.js +56 -0
  22. package/dist/chart/chart-validate-CD6ptiwg.js +180 -0
  23. package/dist/chart/client-BuB0wIgc.js +2757 -0
  24. package/dist/chart/sv-chart-element.d.ts +98 -0
  25. package/dist/chart/sv-chart-element.js +7282 -0
  26. package/dist/chart-DoqdUoGg.js +4398 -0
  27. package/dist/chart-export-pdf-BirUdchl.js +104 -0
  28. package/dist/chart-summary-BP9i-v8M.js +137 -0
  29. package/dist/chart-validate-CD6ptiwg.js +180 -0
  30. package/dist/{shadow/client-DjwUji8D.js → client-DEF0GRjE.js} +1 -1
  31. package/dist/{shadow/column-resize-DvCRUrN3.js → column-resize-DUPgynvc.js} +3 -3
  32. package/dist/date-format-DMTwV8NC.js +1128 -0
  33. package/dist/{export-format-B6FUgOll.js → export-format-uGayRKWM.js} +3 -3
  34. package/dist/focus-trap-DvlOlOGM.js +65 -0
  35. package/dist/list-option-DrRyivWp.js +82 -0
  36. package/dist/react/chart.d.ts +99 -0
  37. package/dist/react/chart.js +49 -0
  38. package/dist/react/index.d.ts +28 -0
  39. package/dist/react/index.js +4 -1
  40. package/dist/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
  41. package/dist/shadow/GridMenus-B1mC1aPp.js +1077 -0
  42. package/dist/shadow/SvChartMenu-CBMKm7Xb.js +413 -0
  43. package/dist/shadow/SvDateRangeInput-BrYTQEMM.js +197 -0
  44. package/dist/shadow/SvDateTimePicker-CnLlqNDQ.js +766 -0
  45. package/dist/shadow/SvField-Bmzp3ObZ.js +147 -0
  46. package/dist/shadow/SvGridCellEditor-B005dmV1.js +560 -0
  47. package/dist/shadow/SvGridChart-4TcL9Rj2.js +3702 -0
  48. package/dist/shadow/SvGridChartBuilder-C4OL4XYx.js +1165 -0
  49. package/dist/shadow/SvGridChartPanel-CfHA8Ioq.js +1743 -0
  50. package/dist/shadow/SvGridChartView-Ci-9_EJ0.js +45 -0
  51. package/dist/shadow/SvGridDropdown-BlA6iw9m.js +257 -0
  52. package/dist/{cell-formatting-C0OsDmi_.js → shadow/cell-formatting-Eypm-id0.js} +1 -1
  53. package/dist/shadow/chart-DoqdUoGg.js +4398 -0
  54. package/dist/shadow/chart-export-pdf-BirUdchl.js +104 -0
  55. package/dist/shadow/chart-summary-BP9i-v8M.js +137 -0
  56. package/dist/shadow/chart-validate-CD6ptiwg.js +180 -0
  57. package/dist/{client-DjwUji8D.js → shadow/client-DEF0GRjE.js} +1 -1
  58. package/dist/{column-resize-DvCRUrN3.js → shadow/column-resize-DUPgynvc.js} +3 -3
  59. package/dist/shadow/date-format-DMTwV8NC.js +1128 -0
  60. package/dist/shadow/{export-format-C8kZGZfz.js → export-format-DhdZREP1.js} +3 -3
  61. package/dist/shadow/focus-trap-DvlOlOGM.js +65 -0
  62. package/dist/shadow/list-option-DrRyivWp.js +82 -0
  63. package/dist/shadow/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
  64. package/dist/shadow/sv-grid-shadow-element.d.ts +15 -0
  65. package/dist/shadow/sv-grid-shadow-element.js +4853 -3626
  66. package/dist/shadow/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
  67. package/dist/sv-grid-element.d.ts +15 -0
  68. package/dist/sv-grid-element.js +4809 -3612
  69. package/dist/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
  70. package/dist/vue/chart.d.ts +64 -0
  71. package/dist/vue/chart.js +41 -0
  72. package/dist/vue/index.d.ts +11 -2
  73. package/dist/vue/index.js +4 -1
  74. package/package.json +18 -5
  75. package/dist/GridMenus-DpmS1pzo.js +0 -1121
  76. package/dist/SvDateRangeInput-u4ibte8S.js +0 -196
  77. package/dist/SvDateTimePicker-DVFiDxUq.js +0 -765
  78. package/dist/SvField-ChCI-O2O.js +0 -146
  79. package/dist/SvGridCellEditor-DvsQyE9a.js +0 -550
  80. package/dist/SvGridChart-yK5Zv85y.js +0 -1199
  81. package/dist/SvGridChartPanel-B38_VjXM.js +0 -584
  82. package/dist/SvGridChartView-ScXTF6t-.js +0 -50
  83. package/dist/SvGridDropdown-DnAESFDu.js +0 -256
  84. package/dist/chart-uvs3sFJA.js +0 -1220
  85. package/dist/date-format-CPHqTHN6.js +0 -1127
  86. package/dist/shadow/GridMenus-DpmS1pzo.js +0 -1121
  87. package/dist/shadow/SvDateRangeInput-u4ibte8S.js +0 -196
  88. package/dist/shadow/SvDateTimePicker-DVFiDxUq.js +0 -765
  89. package/dist/shadow/SvField-ChCI-O2O.js +0 -146
  90. package/dist/shadow/SvGridCellEditor-DvsQyE9a.js +0 -550
  91. package/dist/shadow/SvGridChart-yK5Zv85y.js +0 -1199
  92. package/dist/shadow/SvGridChartPanel-B38_VjXM.js +0 -584
  93. package/dist/shadow/SvGridChartView-ScXTF6t-.js +0 -50
  94. package/dist/shadow/SvGridDropdown-DnAESFDu.js +0 -256
  95. package/dist/shadow/chart-uvs3sFJA.js +0 -1220
  96. package/dist/shadow/date-format-CPHqTHN6.js +0 -1127
@@ -0,0 +1,3702 @@
1
+ (function(){try{var c=".sv-grid-chart.svelte-kvdein{background:var(--sg-chart-bg,transparent);flex-direction:column;gap:8px;width:100%;display:flex;position:relative}.sv-grid-chart.is-legend-top.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein){order:-2}.sv-grid-chart.is-legend-top.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein){order:-1}.sv-grid-chart.is-legend-left.svelte-kvdein,.sv-grid-chart.is-legend-right.svelte-kvdein{grid-template-rows:auto 1fr auto;align-items:start;display:grid}.sv-grid-chart.is-legend-left.svelte-kvdein{grid-template-columns:auto minmax(0,1fr);grid-template-areas:\"tb tb\"\"lg svg\"\"lg br\"}.sv-grid-chart.is-legend-right.svelte-kvdein{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:\"tb tb\"\"svg lg\"\"br lg\"}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein){grid-area:tb}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein){grid-area:svg}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-brush-host:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-brush-host:where(.svelte-kvdein){grid-area:br}.sv-grid-chart-brush-host.svelte-kvdein{min-width:0;display:block}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein){grid-area:lg}.sv-grid-chart-legend.is-vertical.svelte-kvdein{flex-direction:column;align-items:flex-start;gap:4px;max-width:180px;padding-top:6px}.sv-grid-chart.is-autosize.svelte-kvdein{min-height:0}.sv-grid-chart.is-autosize.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein){flex:none;min-height:0}.sv-grid-chart-svg.svelte-kvdein{width:100%;height:auto;display:block}.sv-grid-chart-title.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(14px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-subtitle.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(11.5px * var(--sg-chart-font-scale,1));font-family:inherit}.sv-grid-chart-caption.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(10px * var(--sg-chart-font-scale,1));font-family:inherit}.sv-grid-chart-refband.svelte-kvdein{pointer-events:none}.sv-grid-chart-wipe.svelte-kvdein{animation:.7s cubic-bezier(.2,.7,.2,1) both svelte-kvdein-sv-grid-chart-wipe}@keyframes svelte-kvdein-sv-grid-chart-wipe{0%{width:0}}.sv-grid-chart-marks.is-enter-grow.svelte-kvdein .sv-grid-chart-bar:where(.svelte-kvdein){transform-box:fill-box;transform-origin:50% 100%;animation:.5s cubic-bezier(.2,.7,.2,1) both svelte-kvdein-sv-grid-chart-grow}@keyframes svelte-kvdein-sv-grid-chart-grow{0%{transform:scaleY(.02)}}.sv-grid-chart-marks.is-enter-none.svelte-kvdein :where(.svelte-kvdein),.sv-grid-chart-marks.is-enter-none.svelte-kvdein{animation:none!important}.sv-grid-chart-svg.is-pannable.svelte-kvdein{cursor:grab}.sv-grid-chart-svg.is-pannable.svelte-kvdein:active{cursor:grabbing}.sv-grid-chart-presets.svelte-kvdein{gap:2px;margin-right:6px;display:inline-flex}.sv-grid-chart-crumbs.svelte-kvdein{font-size:calc(11.5px * var(--sg-chart-font-scale,1));align-items:center;gap:2px;margin-right:8px;display:inline-flex}.sv-grid-chart-crumb.is-current.svelte-kvdein{color:var(--sg-fg,#0f172a);padding:0 4px;font-weight:600}.sv-grid-chart-crumb-sep.svelte-kvdein{color:var(--sg-muted,#64748b)}.sv-grid-chart-arc.is-drillable.svelte-kvdein,.sv-grid-chart-slice.is-drillable.svelte-kvdein{cursor:zoom-in}.sv-grid-chart-bar.is-selected.svelte-kvdein,.sv-grid-chart-slice.is-selected.svelte-kvdein,.sv-grid-chart-arc.is-selected.svelte-kvdein{stroke:var(--sg-fg,#0f172a);stroke-width:2px}.sv-grid-chart-dot.is-selected.svelte-kvdein{stroke:var(--sg-fg,#0f172a);stroke-width:2px;r:5}.sv-grid-chart-scatter.is-selected.svelte-kvdein{stroke:var(--sg-fg,#0f172a);stroke-width:2px;fill-opacity:1}.sv-grid-chart-preset.svelte-kvdein{padding-inline:6px}.sv-grid-chart-arc-track.svelte-kvdein{fill:var(--sg-border,#e2e8f0);opacity:.45;pointer-events:none}.sv-grid-chart-arc.svelte-kvdein{transition:opacity .1s;animation:.3s both svelte-kvdein-sv-grid-chart-in}.sv-grid-chart-ribbon.svelte-kvdein{transition:opacity .1s}.sv-grid-chart-stem.svelte-kvdein line:where(.svelte-kvdein){stroke-linecap:round}.sv-grid-chart-dot.is-stroked.svelte-kvdein{fill:none}.sv-grid-chart-tooltip.is-custom.svelte-kvdein{color:inherit;box-shadow:none;background:0 0;border:0;padding:0}.sv-grid-chart-gridline.svelte-kvdein{stroke:var(--sg-border,#e2e8f0);stroke-width:1px;opacity:.6}.sv-grid-chart-gridline.is-zero.svelte-kvdein{stroke:var(--sg-muted,#94a3b8);opacity:.9}.sv-grid-chart-axis.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(10px * var(--sg-chart-font-scale,1));font-family:inherit}.sv-grid-chart-axis-title.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(11px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-group-label.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-weight:600}.sv-grid-chart-crosshair.svelte-kvdein{stroke:var(--sg-accent,#2563eb);stroke-width:1px;stroke-dasharray:3 3;opacity:.65;pointer-events:none}.sv-grid-chart-callout.svelte-kvdein{opacity:.8;pointer-events:none}.sv-grid-chart-callout-label.svelte-kvdein{font-size:calc(10.5px * var(--sg-chart-font-scale,1));fill:var(--sg-fg,#0f172a);pointer-events:none;font-family:inherit}.sv-grid-chart-crosshair-label.svelte-kvdein rect:where(.svelte-kvdein){fill:var(--sg-fg,#0f172a);opacity:.85}.sv-grid-chart-crosshair-label.svelte-kvdein text:where(.svelte-kvdein){fill:var(--sg-bg,#fff);font-size:calc(9.5px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-refline.svelte-kvdein{stroke-width:1.5px;opacity:.9;pointer-events:none}.sv-grid-chart-reflabel.svelte-kvdein{font-size:calc(9.5px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-overlay.svelte-kvdein{opacity:.85;pointer-events:none}.sv-grid-chart-annotation-marker.svelte-kvdein{pointer-events:none}.sv-grid-chart-annotation-marker.has-text.svelte-kvdein{pointer-events:auto;cursor:help}.sv-grid-chart-annotation-marker.svelte-kvdein:focus-visible{outline:2px solid var(--sg-accent,#2563eb);outline-offset:2px}.sv-grid-chart-annotation-label.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-serieslabel.svelte-kvdein{font-size:calc(10.5px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-annotation-flagtext.svelte-kvdein{font-size:calc(9px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-refpill.svelte-kvdein text:where(.svelte-kvdein){font-size:calc(9.5px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-drawing-hit.svelte-kvdein{stroke:#0000;stroke-width:10px;fill:#0000;pointer-events:stroke}.sv-grid-chart-drawing.is-fib.svelte-kvdein .sv-grid-chart-drawing-hit:where(.svelte-kvdein),.sv-grid-chart-drawing.is-rect.svelte-kvdein rect:where(.svelte-kvdein),.sv-grid-chart-drawing.is-text.svelte-kvdein text:where(.svelte-kvdein){pointer-events:all}.sv-grid-chart-drawing[role=button].svelte-kvdein{cursor:pointer}.sv-grid-chart-drawing.svelte-kvdein:focus-visible{outline:none}.sv-grid-chart-drawing.is-selected.svelte-kvdein line:where(.svelte-kvdein),.sv-grid-chart-drawing.is-selected.svelte-kvdein rect:where(.svelte-kvdein),.sv-grid-chart-drawing.svelte-kvdein:focus-visible line:where(.svelte-kvdein),.sv-grid-chart-drawing.svelte-kvdein:focus-visible rect:where(.svelte-kvdein){filter:drop-shadow(0 0 2px var(--sg-accent,#2563eb))}.sv-grid-chart-drawing-label.svelte-kvdein{font-size:calc(9px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-drawing-text.svelte-kvdein{font-size:calc(11px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-drawing-handle.svelte-kvdein{cursor:move}.sv-grid-chart-textdraft.svelte-kvdein{z-index:11;width:160px;font:inherit;font-size:calc(12px * var(--sg-chart-font-scale,1));border:1px solid var(--sg-accent,#2563eb);background:var(--sg-bg,#fff);color:var(--sg-fg,#0f172a);border-radius:4px;padding:3px 6px;position:absolute;transform:translateY(-50%);box-shadow:0 4px 12px #00000026}.sv-grid-chart-svg.is-drawing.svelte-kvdein{cursor:crosshair}.sv-grid-chart-drawtools.svelte-kvdein{border-right:1px solid var(--sg-border,#e2e8f0);gap:2px;margin-right:2px;padding-right:6px;display:inline-flex}.sv-grid-chart-heatcell.svelte-kvdein{stroke:var(--sg-border,#cbd5e1);stroke-width:1px;cursor:default;transition:opacity .1s}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-heatcell:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-heatcell.svelte-kvdein:hover{opacity:.85}.sv-grid-chart-heatlabel.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));pointer-events:none;-webkit-user-select:none;user-select:none;font-family:inherit;font-weight:600}.sv-grid-chart-heatlegend.svelte-kvdein{stroke:var(--sg-border,#cbd5e1);stroke-width:1px}.sv-grid-chart-funnel-seg.svelte-kvdein{stroke:var(--sg-bg,#fff);stroke-width:2px;cursor:default;transition:opacity .1s}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-funnel-seg:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-funnel-seg.svelte-kvdein:hover{opacity:.88}.sv-grid-chart-funnel-label.svelte-kvdein{font-size:calc(11px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-funnel-value.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));opacity:.85;pointer-events:none;font-family:inherit}.sv-grid-chart-radar-ring.svelte-kvdein{fill:none;stroke:var(--sg-border,#e2e8f0);stroke-width:1px;opacity:.6}.sv-grid-chart-radar-spoke.svelte-kvdein{stroke:var(--sg-border,#e2e8f0);stroke-width:1px;opacity:.6}.sv-grid-chart-radar-poly.svelte-kvdein{pointer-events:none;transition:opacity .1s}.sv-grid-chart-radar-dot.svelte-kvdein{cursor:default;transition:r .1s}.sv-grid-chart-radar-dot.svelte-kvdein:hover{r:4.5}.sv-grid-chart-calendar-cell.svelte-kvdein{stroke:var(--sg-border,#e2e8f0);stroke-width:.5px;cursor:default;transition:opacity .1s}.sv-grid-chart-calendar-cell.is-blank.svelte-kvdein{stroke-opacity:.5}.sv-grid-chart-calendar-cell.svelte-kvdein:hover{opacity:.85}.sv-grid-chart-calendar-legend.svelte-kvdein{stroke:var(--sg-border,#cbd5e1);stroke-width:.5px}.sv-grid-chart-gauge-value.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(22px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:800}.sv-grid-chart-gauge-tick.svelte-kvdein{stroke:var(--sg-muted,#94a3b8);stroke-width:1px;opacity:.4}.sv-grid-chart-gauge-tick.is-major.svelte-kvdein{stroke-width:2px;opacity:.7}.sv-grid-chart-gauge-needle.svelte-kvdein{fill:var(--sg-fg,#0f172a);stroke:var(--sg-bg,#fff);stroke-width:.75px;stroke-linejoin:round}.sv-grid-chart-gauge-hub.svelte-kvdein{fill:var(--sg-fg,#0f172a);stroke:var(--sg-bg,#fff);stroke-width:2px}.sv-grid-chart-gauge-hub-dot.svelte-kvdein{fill:var(--sg-bg,#fff)}.sv-grid-chart-treemap-cell.svelte-kvdein{stroke:var(--sg-bg,#fff);stroke-width:1px;cursor:default;transition:opacity .1s}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-treemap-cell:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-treemap-cell.svelte-kvdein:hover{opacity:.88}.sv-grid-chart-treemap-label.svelte-kvdein{font-size:calc(11px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-treemap-value.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit}.sv-grid-chart-sankey-node.svelte-kvdein{cursor:default;transition:opacity .1s}.sv-grid-chart-sankey-node.svelte-kvdein:hover{opacity:.88}.sv-grid-chart-sankey-link.svelte-kvdein{cursor:default;transition:stroke-opacity .1s}.sv-grid-chart-sankey-link.svelte-kvdein:hover{stroke-opacity:.6}.sv-grid-chart-sankey-label.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(11px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-brush.svelte-kvdein{border-top:1px solid var(--sg-border,#e2e8f0);-webkit-user-select:none;user-select:none;touch-action:none;width:100%;height:auto;margin-top:4px;display:block}.sv-grid-chart-brush-mask.svelte-kvdein{fill:var(--sg-bg,#fff);fill-opacity:.65;pointer-events:none}.sv-grid-chart-brush-window.svelte-kvdein{fill:var(--sg-accent,#2563eb);fill-opacity:.1;stroke:var(--sg-accent,#2563eb);stroke-width:1px;cursor:grab}.sv-grid-chart-brush-window.svelte-kvdein:active{cursor:grabbing}.sv-grid-chart-brush-handle.svelte-kvdein{fill:var(--sg-accent,#2563eb);fill-opacity:.4;cursor:ew-resize}.sv-grid-chart-brush-handle.svelte-kvdein:hover{fill-opacity:.7}.sv-grid-chart-scatter.svelte-kvdein{stroke-width:1px;transition:opacity .2s}.is-clickable.svelte-kvdein .sv-grid-chart-scatter:where(.svelte-kvdein),.sv-grid-chart-scatter.svelte-kvdein:hover{cursor:pointer}.sv-grid-chart-cat-hit.svelte-kvdein{fill:#0000}.sv-grid-chart-cat-hit.svelte-kvdein:focus-visible,.sv-grid-chart-slice.svelte-kvdein:focus-visible,.sv-grid-chart-arc.svelte-kvdein:focus-visible,.sv-grid-chart-heatcell.svelte-kvdein:focus-visible,.sv-grid-chart-funnel-seg.svelte-kvdein:focus-visible,.sv-grid-chart-treemap-cell.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-node.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-link.svelte-kvdein:focus-visible,.sv-grid-chart-calendar-cell.svelte-kvdein:focus-visible,.sv-grid-chart-radar-dot.svelte-kvdein:focus-visible,.sv-grid-chart-scatter.svelte-kvdein:focus-visible,.sv-grid-chart-brush.svelte-kvdein:focus-visible{outline:2px solid var(--sg-accent,#2563eb);outline-offset:1px}.sv-grid-chart-datalabel.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(9.5px * var(--sg-chart-font-scale,1));font-variant-numeric:tabular-nums;pointer-events:none;font-weight:600}.sv-grid-chart-datalabel-leader.svelte-kvdein{stroke:var(--sg-muted,#64748b);stroke-width:1px;pointer-events:none}.sv-grid-chart-datalabel.on-bar.svelte-kvdein{fill:#fff}.sv-grid-chart-donut-total.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(16px * var(--sg-chart-font-scale,1));font-variant-numeric:tabular-nums;font-weight:800}.sv-grid-chart-donut-label.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(10px * var(--sg-chart-font-scale,1))}.sv-grid-chart-bar.svelte-kvdein{transition:x .3s,y .3s,width .3s,height .3s}.sv-grid-chart-dot.svelte-kvdein{transition:cx .3s,cy .3s}.sv-grid-chart-candle.svelte-kvdein{stroke-width:1px;transition:x .3s,y .3s,width .3s,height .3s}.sv-grid-chart-wick.svelte-kvdein,.sv-grid-chart-ohlc.svelte-kvdein{stroke-width:1px;shape-rendering:crispedges}.sv-grid-chart-box.svelte-kvdein{stroke-width:1px;transition:x .3s,y .3s,width .3s,height .3s}.sv-grid-chart-whisker.svelte-kvdein,.sv-grid-chart-errorbar.svelte-kvdein{stroke-width:1px;shape-rendering:crispedges}.sv-grid-chart-median.svelte-kvdein{stroke-width:2px;shape-rendering:crispedges}.sv-grid-chart-outlier.svelte-kvdein{stroke-width:1px}.is-clickable.svelte-kvdein .sv-grid-chart-cat-hit:where(.svelte-kvdein),.is-clickable.svelte-kvdein .sv-grid-chart-slice:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-empty.svelte-kvdein{color:var(--sg-muted,#94a3b8);font-size:calc(13px * var(--sg-chart-font-scale,1));pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.sv-grid-chart-toolbar.svelte-kvdein{flex-wrap:wrap;justify-content:flex-end;gap:4px;display:flex}.sv-grid-chart-tool.svelte-kvdein{border:1px solid var(--sg-border,#cbd5e1);background:var(--sg-bg,#fff);color:var(--sg-fg,#1e293b);font-size:calc(11px * var(--sg-chart-font-scale,1));cursor:pointer;border-radius:4px;align-items:center;gap:4px;padding:3px 8px;font-weight:500;transition:background-color .1s,border-color .1s;display:inline-flex}.sv-grid-chart-tool.svelte-kvdein:hover{background:var(--sg-row-hover-bg,#f1f5f9);border-color:var(--sg-accent,#2563eb)}.sv-grid-chart-tool.is-on.svelte-kvdein{background:var(--sg-accent,#2563eb);border-color:var(--sg-accent,#2563eb);color:var(--sg-on-accent,#fff)}.sv-grid-chart-svg.is-annotating.svelte-kvdein{cursor:copy}.sv-grid-chart-annotation-marker.is-removable.svelte-kvdein{cursor:pointer}.sv-grid-chart-svg.is-zoomable.svelte-kvdein{cursor:crosshair}.sv-grid-chart-svg.is-dragging.svelte-kvdein{cursor:crosshair;-webkit-user-select:none;user-select:none}.sv-grid-chart-zoom-rect.svelte-kvdein{fill:var(--sg-accent,#2563eb);fill-opacity:.12;stroke:var(--sg-accent,#2563eb);stroke-width:1px;stroke-dasharray:3 3;pointer-events:none}.sv-grid-chart-tooltip.svelte-kvdein{z-index:10;pointer-events:none;white-space:nowrap;background:var(--sg-fg,#0f172a);color:var(--sg-bg,#fff);font-size:calc(11.5px * var(--sg-chart-font-scale,1));border-radius:6px;flex-direction:column;gap:1px;padding:6px 9px;line-height:1.4;display:flex;position:absolute;transform:translate(-50%,calc(-100% - 12px));box-shadow:0 6px 18px #00000047}.sv-grid-chart-tooltip.is-below.svelte-kvdein{transform:translate(-50%,16px)}.sv-grid-chart-tooltip.is-fixed.svelte-kvdein{transform:none}.sv-grid-chart-tooltip.is-fixed.is-right.svelte-kvdein{transform:translate(-100%)}.sv-grid-chart-tooltip.is-fixed.is-bottom.svelte-kvdein{transform:translateY(-100%)}.sv-grid-chart-tooltip.is-fixed.is-right.is-bottom.svelte-kvdein{transform:translate(-100%,-100%)}.sv-grid-chart-tooltip.is-pinned.svelte-kvdein{pointer-events:auto;-webkit-user-select:text;user-select:text;box-shadow:0 0 0 2px var(--sg-accent,#2563eb), 0 6px 18px #00000047}.sv-grid-chart-tooltip-title.svelte-kvdein{opacity:.75;font-size:calc(10.5px * var(--sg-chart-font-scale,1));margin-bottom:1px}.sv-grid-chart-tooltip-row.svelte-kvdein{align-items:center;gap:6px;display:flex}.sv-grid-chart-tooltip-dot.svelte-kvdein{border-radius:2px;flex-shrink:0;width:8px;height:8px}.sv-grid-chart-tooltip-row-label.svelte-kvdein{opacity:.85}.sv-grid-chart-tooltip-row-value.svelte-kvdein{font-variant-numeric:tabular-nums;margin-left:auto;padding-left:10px;font-weight:700}.sv-grid-chart-legend.svelte-kvdein{font-size:calc(12px * var(--sg-chart-font-scale,1));color:var(--sg-fg,#0f172a);flex-wrap:wrap;gap:6px 12px;display:flex}.sv-grid-chart-legend-item.svelte-kvdein{color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;gap:6px;padding:1px 2px;display:inline-flex}.sv-grid-chart-legend-item.svelte-kvdein:disabled{cursor:default}.sv-grid-chart-legend-item.is-off.svelte-kvdein{color:var(--sg-muted,#94a3b8);text-decoration:line-through}.sv-grid-chart-legend-item.is-isolated.svelte-kvdein{background:var(--sg-header-bg,#f1f5f9);font-weight:700}.sv-grid-chart-legend-more.svelte-kvdein{border:1px dashed var(--sg-border,#cbd5e1);color:var(--sg-muted,#64748b);font:inherit;font-size:calc(11px * var(--sg-chart-font-scale,1));cursor:pointer;background:0 0;border-radius:999px;padding:1px 7px}.sv-grid-chart-legend-more.svelte-kvdein:hover{color:var(--sg-fg,#0f172a);border-color:var(--sg-accent,#2563eb)}.sv-grid-chart-sr-only.svelte-kvdein{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.sv-grid-chart-swatch.svelte-kvdein{box-sizing:border-box;border:1.5px solid #0000;border-radius:3px;width:12px;height:12px;display:inline-block}@keyframes svelte-kvdein-sv-grid-chart-in{0%{opacity:0}to{opacity:1}}.sv-grid-chart-bar.svelte-kvdein,.sv-grid-chart-linepath.svelte-kvdein,.sv-grid-chart-area.svelte-kvdein,.sv-grid-chart-slice.svelte-kvdein,.sv-grid-chart-candle.svelte-kvdein,.sv-grid-chart-box.svelte-kvdein,.sv-grid-chart-funnel-seg.svelte-kvdein,.sv-grid-chart-heatcell.svelte-kvdein,.sv-grid-chart-treemap-cell.svelte-kvdein{animation:.3s ease-out both svelte-kvdein-sv-grid-chart-in}@media (prefers-reduced-motion:reduce){.sv-grid-chart-bar.svelte-kvdein,.sv-grid-chart-dot.svelte-kvdein,.sv-grid-chart-candle.svelte-kvdein,.sv-grid-chart-box.svelte-kvdein{transition:none}.sv-grid-chart-bar.svelte-kvdein,.sv-grid-chart-linepath.svelte-kvdein,.sv-grid-chart-area.svelte-kvdein,.sv-grid-chart-slice.svelte-kvdein,.sv-grid-chart-candle.svelte-kvdein,.sv-grid-chart-box.svelte-kvdein,.sv-grid-chart-funnel-seg.svelte-kvdein,.sv-grid-chart-heatcell.svelte-kvdein,.sv-grid-chart-treemap-cell.svelte-kvdein{animation:none}}@media (forced-colors:active){.sv-grid-chart-svg.svelte-kvdein,.sv-grid-chart-brush.svelte-kvdein,.sv-grid-chart-swatch.svelte-kvdein{forced-color-adjust:none}.sv-grid-chart-axis.svelte-kvdein,.sv-grid-chart-axis-title.svelte-kvdein,.sv-grid-chart-title.svelte-kvdein,.sv-grid-chart-subtitle.svelte-kvdein,.sv-grid-chart-caption.svelte-kvdein,.sv-grid-chart-datalabel.svelte-kvdein,.sv-grid-chart-callout-label.svelte-kvdein,.sv-grid-chart-donut-total.svelte-kvdein,.sv-grid-chart-donut-label.svelte-kvdein,.sv-grid-chart-sankey-label.svelte-kvdein,.sv-grid-chart-annotation-label.svelte-kvdein{fill:canvastext}.sv-grid-chart-gridline.svelte-kvdein{stroke:graytext;opacity:1}.sv-grid-chart-crosshair.svelte-kvdein{stroke:highlight;opacity:1}.sv-grid-chart-crosshair-label.svelte-kvdein rect:where(.svelte-kvdein),.sv-grid-chart-refpill.svelte-kvdein rect:where(.svelte-kvdein){fill:highlight;opacity:1}.sv-grid-chart-crosshair-label.svelte-kvdein text:where(.svelte-kvdein),.sv-grid-chart-refpill.svelte-kvdein text:where(.svelte-kvdein){fill:highlighttext}.sv-grid-chart-cat-hit.svelte-kvdein:focus-visible,.sv-grid-chart-slice.svelte-kvdein:focus-visible,.sv-grid-chart-arc.svelte-kvdein:focus-visible,.sv-grid-chart-heatcell.svelte-kvdein:focus-visible,.sv-grid-chart-funnel-seg.svelte-kvdein:focus-visible,.sv-grid-chart-treemap-cell.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-node.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-link.svelte-kvdein:focus-visible,.sv-grid-chart-calendar-cell.svelte-kvdein:focus-visible,.sv-grid-chart-radar-dot.svelte-kvdein:focus-visible,.sv-grid-chart-scatter.svelte-kvdein:focus-visible,.sv-grid-chart-brush.svelte-kvdein:focus-visible,.sv-grid-chart-annotation-marker.svelte-kvdein:focus-visible{outline:3px solid highlight}.sv-grid-chart-slice.is-selected.svelte-kvdein,.sv-grid-chart-arc.is-selected.svelte-kvdein{stroke:highlight;stroke-width:3px}.sv-grid-chart-brush-mask.svelte-kvdein{fill:canvas;fill-opacity:.7}.sv-grid-chart-brush-window.svelte-kvdein{stroke:highlight;fill:highlight;fill-opacity:.2}.sv-grid-chart-brush-handle.svelte-kvdein{fill:highlight}.sv-grid-chart-tooltip.svelte-kvdein{border:1px solid canvastext}.sv-grid-chart-legend-item.is-off.svelte-kvdein .sv-grid-chart-swatch:where(.svelte-kvdein){forced-color-adjust:auto}}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridChart"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridChart");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
2
+ import { C as e, D as t, E as n, O as r, T as i, _ as a, a as o, b as s, d as c, g as l, i as u, j as d, n as ee, t as te, v as ne, w as re, x as ie, y as f } from "./chart-DoqdUoGg.js";
3
+ import { A as p, B as ae, C as oe, D as se, E as m, F as ce, H as h, I as g, J as _, L as v, M as y, O as b, P as le, Q as x, R as S, T as C, U as ue, V as de, X as fe, Y as w, Z as T, a as pe, d as me, et as E, f as D, it as O, j as k, k as A, n as j, nt as he, o as ge, q as M, rt as _e, s as ve, tt as ye, v as N, w as P, x as be, y as F, z as xe } from "./client-DEF0GRjE.js";
4
+ import { a as Se } from "./editor-contract-peBDxir_.js";
5
+ //#region ../grid/dist/chart-zoom.js
6
+ function Ce(e, t, n) {
7
+ if (n <= 0) return null;
8
+ let r = Math.max(0, Math.min(n - 1, Math.round(e))), i = Math.max(0, Math.min(n - 1, Math.round(t)));
9
+ return i < r && ([r, i] = [i, r]), r === 0 && i === n - 1 ? null : {
10
+ i0: r,
11
+ i1: i
12
+ };
13
+ }
14
+ function we(e, t, n, r) {
15
+ if (t <= 2) return null;
16
+ let i = e ? e.i0 : 0, a = e ? e.i1 : t - 1, o = a - i + 1, s = Math.max(2, Math.min(t, Math.round(o * r)));
17
+ if (s === o) return e;
18
+ let c = o > 1 ? (Math.max(i, Math.min(a, n)) - i) / (o - 1) : .5, l = Math.round(n - c * (s - 1));
19
+ return l = Math.max(0, Math.min(t - s, l)), Ce(l, l + s - 1, t);
20
+ }
21
+ function Te(e, t, n) {
22
+ if (!e || !n) return e;
23
+ let r = e.i1 - e.i0, i = e.i0 + Math.round(n);
24
+ return i = Math.max(0, Math.min(t - 1 - r, i)), Ce(i, i + r, t);
25
+ }
26
+ function Ee(e, t, n, r) {
27
+ return !Number.isFinite(r) || r <= 0 ? e : we(e, t, n, 1 / r);
28
+ }
29
+ function De(e, t, n) {
30
+ let r = e.length;
31
+ if (!r) return null;
32
+ let i = e.map((e) => Date.parse(e)), a = [...i].reverse().find(Number.isFinite);
33
+ if (a == null) return null;
34
+ let o = n ?? a, s = 864e5, c, l = o;
35
+ if (typeof t == "object") {
36
+ if (t.from) c = Date.parse(t.from);
37
+ else if (t.days) c = o - t.days * s;
38
+ else return null;
39
+ t.to && (l = Date.parse(t.to));
40
+ } else switch (t) {
41
+ case "1W":
42
+ c = o - 7 * s;
43
+ break;
44
+ case "1M":
45
+ c = Oe(o, -1);
46
+ break;
47
+ case "3M":
48
+ c = Oe(o, -3);
49
+ break;
50
+ case "6M":
51
+ c = Oe(o, -6);
52
+ break;
53
+ case "1Y":
54
+ c = Oe(o, -12);
55
+ break;
56
+ case "YTD": {
57
+ let e = new Date(o);
58
+ c = Date.UTC(e.getUTCFullYear(), 0, 1);
59
+ break;
60
+ }
61
+ default: return null;
62
+ }
63
+ if (!Number.isFinite(c) || !Number.isFinite(l)) return null;
64
+ let u = -1, d = -1;
65
+ for (let e = 0; e < r; e += 1) {
66
+ let t = i[e];
67
+ Number.isFinite(t) && (t >= c && u < 0 && (u = e), t <= l && (d = e));
68
+ }
69
+ return u < 0 || d < 0 || d < u ? null : Ce(u, d, r);
70
+ }
71
+ function Oe(e, t) {
72
+ let n = new Date(e);
73
+ return Date.UTC(n.getUTCFullYear(), n.getUTCMonth() + t, n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes());
74
+ }
75
+ function ke(e, t) {
76
+ let n = -1, r = Infinity;
77
+ for (let i = 0; i < e.length; i += 1) {
78
+ let a = Date.parse(e[i]);
79
+ if (!Number.isFinite(a)) continue;
80
+ let o = Math.abs(a - t);
81
+ o < r && (r = o, n = i);
82
+ }
83
+ return n;
84
+ }
85
+ //#endregion
86
+ //#region ../grid/dist/chart-sync.svelte.js
87
+ var I = /* @__PURE__ */ new Map();
88
+ function Ae(e) {
89
+ let t = I.get(e);
90
+ if (t) return t;
91
+ let n = fe({
92
+ hover: null,
93
+ zoom: null
94
+ });
95
+ return I.set(e, n), n;
96
+ }
97
+ function je(e, t) {
98
+ Ae(e).hover = t;
99
+ }
100
+ function Me(e, t, n, r, i = null) {
101
+ Ae(e).zoom = {
102
+ window: t,
103
+ count: n,
104
+ from: r,
105
+ labels: i
106
+ };
107
+ }
108
+ //#endregion
109
+ //#region ../grid/dist/chart-motion.js
110
+ var L = (e, t, n) => e + (t - e) * n, R = (e) => Math.round(e * 100) / 100;
111
+ function Ne(e, t, n) {
112
+ return n >= 1 ? t : n <= 0 && e.type === t.type ? e : e.type === t.type ? {
113
+ ...t,
114
+ bars: Fe(e.bars, t.bars, n, t.plot.y + t.plot.h),
115
+ lines: Ie(e.lines, t.lines, n),
116
+ candles: Re(e.candles, t.candles, n),
117
+ slices: ze(e.slices, t.slices, n),
118
+ arcs: Ve(e.arcs, t.arcs, n),
119
+ yTicks: t.yTicks.map((t) => {
120
+ let r = e.yTicks.find((e) => e.value === t.value);
121
+ return r ? {
122
+ ...t,
123
+ y: R(L(r.y, t.y, n))
124
+ } : t;
125
+ })
126
+ } : t;
127
+ }
128
+ var Pe = (e) => `${e.series}\u0000${e.label}`;
129
+ function Fe(e, t, n, r) {
130
+ if (!e.length && !t.length) return t;
131
+ let i = new Map(e.map((e) => [Pe(e), e])), a = /* @__PURE__ */ new Set(), o = t.map((e) => {
132
+ let t = Pe(e);
133
+ a.add(t);
134
+ let o = i.get(t);
135
+ if (!o) {
136
+ let t = L(r, e.y, n);
137
+ return {
138
+ ...e,
139
+ y: R(t),
140
+ h: R(Math.max(0, L(0, e.h, n)))
141
+ };
142
+ }
143
+ return {
144
+ ...e,
145
+ x: R(L(o.x, e.x, n)),
146
+ y: R(L(o.y, e.y, n)),
147
+ w: R(L(o.w, e.w, n)),
148
+ h: R(L(o.h, e.h, n))
149
+ };
150
+ });
151
+ for (let t of e) a.has(Pe(t)) || o.push({
152
+ ...t,
153
+ y: R(L(t.y, r, n)),
154
+ h: R(Math.max(0, L(t.h, 0, n)))
155
+ });
156
+ return o;
157
+ }
158
+ function Ie(e, t, n) {
159
+ if (!e.length) return t;
160
+ let r = new Map(e.map((e) => [e.label, e]));
161
+ return t.map((e) => {
162
+ let t = r.get(e.label);
163
+ if (!t || t.points.length !== e.points.length) return e;
164
+ let i = e.points.map((e, r) => {
165
+ let i = t.points[r];
166
+ return !e.defined || !i.defined ? e : {
167
+ ...e,
168
+ x: R(L(i.x, e.x, n)),
169
+ y: R(L(i.y, e.y, n))
170
+ };
171
+ });
172
+ return {
173
+ ...e,
174
+ points: i,
175
+ path: f(i, !!e.smooth, { step: e.step })
176
+ };
177
+ });
178
+ }
179
+ var Le = (e) => `${e.series}\u0000${e.label}`;
180
+ function Re(e, t, n) {
181
+ if (!e.length) return t;
182
+ let r = new Map(e.map((e) => [Le(e), e]));
183
+ return t.map((e) => {
184
+ let t = r.get(Le(e));
185
+ if (!t) return e;
186
+ let i = L(t.yOpen, e.yOpen, n), a = L(t.yClose, e.yClose, n);
187
+ return {
188
+ ...e,
189
+ x: R(L(t.x, e.x, n)),
190
+ xCenter: R(L(t.xCenter, e.xCenter, n)),
191
+ yOpen: R(i),
192
+ yClose: R(a),
193
+ yHigh: R(L(t.yHigh, e.yHigh, n)),
194
+ yLow: R(L(t.yLow, e.yLow, n)),
195
+ bodyY: R(Math.min(i, a)),
196
+ bodyH: R(Math.max(1, Math.abs(a - i)))
197
+ };
198
+ });
199
+ }
200
+ function ze(e, t, n) {
201
+ if (!e.length || t.some((e) => !e.arc)) return t;
202
+ let r = new Map(e.map((e) => [e.label, e]));
203
+ return t.map((e) => {
204
+ let t = r.get(e.label);
205
+ if (!t?.arc || !e.arc) return e;
206
+ let i = L(t.arc.a0, e.arc.a0, n), a = L(t.arc.a1, e.arc.a1, n), o = (i + a) / 2, s = (e.arc.r + e.arc.ir) / 2 || e.arc.r * .6;
207
+ return {
208
+ ...e,
209
+ path: ne(e.arc.cx, e.arc.cy, e.arc.ir, e.arc.r, i, a),
210
+ cx: R(e.arc.cx + s * Math.cos(o)),
211
+ cy: R(e.arc.cy + s * Math.sin(o)),
212
+ arc: {
213
+ ...e.arc,
214
+ a0: i,
215
+ a1: a
216
+ }
217
+ };
218
+ });
219
+ }
220
+ var Be = (e) => e.nodePath ? e.nodePath.join("/") : `${e.series}\u0000${e.label}`;
221
+ function Ve(e, t, n) {
222
+ if (!e.length) return t;
223
+ let r = new Map(e.map((e) => [Be(e), e]));
224
+ return t.map((e) => {
225
+ let t = r.get(Be(e));
226
+ if (!t) return e;
227
+ let i = L(t.a0, e.a0, n), a = L(t.a1, e.a1, n), o = L(t.r0, e.r0, n), s = L(t.r1, e.r1, n), c = (i + a) / 2, l = (o + s) / 2;
228
+ return {
229
+ ...e,
230
+ a0: i,
231
+ a1: a,
232
+ r0: o,
233
+ r1: s,
234
+ path: ne(e.cx, e.cy, o, s, i, a),
235
+ lx: R(e.cx + l * Math.cos(c)),
236
+ ly: R(e.cy + l * Math.sin(c))
237
+ };
238
+ });
239
+ }
240
+ //#endregion
241
+ //#region ../grid/dist/chart-export.js
242
+ function He(e) {
243
+ return e instanceof SVGSVGElement ? e : e.querySelector("svg.sv-grid-chart-svg") ?? e.querySelector("svg");
244
+ }
245
+ function Ue(e, t, n) {
246
+ return getComputedStyle(e).getPropertyValue(t).trim() || n;
247
+ }
248
+ function We(e, t = {}) {
249
+ let n = He(e);
250
+ if (!n) throw Error("chartToSvgString: no <svg> found");
251
+ let r = Ue(n, "--sg-fg", "#0f172a"), i = Ue(n, "--sg-muted", "#64748b"), a = Ue(n, "--sg-border", "#e2e8f0"), o = t.background ?? Ue(n, "--sg-bg", "#ffffff"), s = n.viewBox.baseVal, c = s && s.width ? s.width : n.clientWidth || 520, l = s && s.height ? s.height : n.clientHeight || 300, u = n.cloneNode(!0);
252
+ u.setAttribute("width", String(c)), u.setAttribute("height", String(l)), u.setAttribute("xmlns", "http://www.w3.org/2000/svg");
253
+ let d = [
254
+ "fill",
255
+ "fill-opacity",
256
+ "stroke",
257
+ "stroke-width",
258
+ "stroke-opacity",
259
+ "stroke-dasharray",
260
+ "stroke-linecap",
261
+ "stroke-linejoin",
262
+ "opacity",
263
+ "font-size",
264
+ "font-family",
265
+ "font-weight",
266
+ "text-anchor"
267
+ ], ee = n.querySelectorAll("*"), te = u.querySelectorAll("*");
268
+ for (let e = 0; e < ee.length; e += 1) {
269
+ let t = te[e];
270
+ if (!t || !t.style) continue;
271
+ let n = getComputedStyle(ee[e]);
272
+ for (let e of d) {
273
+ let r = n.getPropertyValue(e);
274
+ r && r !== "normal" && t.style.setProperty(e, r);
275
+ }
276
+ }
277
+ u.querySelectorAll(".sv-grid-chart-hit").forEach((e) => e.remove());
278
+ let ne = document.createElementNS("http://www.w3.org/2000/svg", "style");
279
+ ne.textContent = `
280
+ .sv-grid-chart-axis { fill: ${i}; font-size: 10px; font-family: sans-serif; }
281
+ .sv-grid-chart-gridline { stroke: ${a}; stroke-width: 1; opacity: 0.6; }
282
+ .sv-grid-chart-gridline.is-zero { stroke: ${i}; opacity: 0.9; }
283
+ .sv-grid-chart-datalabel { fill: ${r}; font-size: 9.5px; font-weight: 600; font-family: sans-serif; }
284
+ .sv-grid-chart-datalabel.on-bar { fill: #fff; }
285
+ .sv-grid-chart-donut-total { fill: ${r}; font-size: 16px; font-weight: 800; font-family: sans-serif; }
286
+ .sv-grid-chart-donut-label { fill: ${i}; font-size: 10px; font-family: sans-serif; }
287
+ `, u.insertBefore(ne, u.firstChild);
288
+ let re = document.createElementNS("http://www.w3.org/2000/svg", "rect");
289
+ return re.setAttribute("x", "0"), re.setAttribute("y", "0"), re.setAttribute("width", String(c)), re.setAttribute("height", String(l)), re.setAttribute("fill", o), u.insertBefore(re, ne.nextSibling), new XMLSerializer().serializeToString(u);
290
+ }
291
+ function Ge(e, t) {
292
+ let n = document.createElement("a");
293
+ n.href = e, n.download = t, document.body.appendChild(n), n.click(), n.remove();
294
+ }
295
+ function Ke(e, t = "chart.svg", n = {}) {
296
+ let r = We(e, n), i = URL.createObjectURL(new Blob([r], { type: "image/svg+xml" }));
297
+ Ge(i, t), setTimeout(() => URL.revokeObjectURL(i), 1e3);
298
+ }
299
+ function qe(e, t = {}) {
300
+ let n = We(e, t), r = t.scale ?? 2, i = He(e), a = i.viewBox.baseVal, o = (a && a.width ? a.width : i.clientWidth || 520) * r, s = (a && a.height ? a.height : i.clientHeight || 300) * r;
301
+ return new Promise((e, t) => {
302
+ let r = URL.createObjectURL(new Blob([n], { type: "image/svg+xml" })), i = new Image();
303
+ i.onload = () => {
304
+ let n = document.createElement("canvas");
305
+ n.width = Math.round(o), n.height = Math.round(s);
306
+ let a = n.getContext("2d");
307
+ if (!a) {
308
+ URL.revokeObjectURL(r), t(/* @__PURE__ */ Error("canvas 2d context unavailable"));
309
+ return;
310
+ }
311
+ a.drawImage(i, 0, 0, n.width, n.height), URL.revokeObjectURL(r), n.toBlob((n) => n ? e(n) : t(/* @__PURE__ */ Error("toBlob failed")), "image/png");
312
+ }, i.onerror = () => {
313
+ URL.revokeObjectURL(r), t(/* @__PURE__ */ Error("failed to rasterize chart SVG"));
314
+ }, i.src = r;
315
+ });
316
+ }
317
+ async function Je(e, t = "chart.png", n = {}) {
318
+ let r = await qe(e, n), i = URL.createObjectURL(r);
319
+ Ge(i, t), setTimeout(() => URL.revokeObjectURL(i), 1e3);
320
+ }
321
+ var z = (e) => {
322
+ let t = e == null || typeof e == "number" && !Number.isFinite(e) ? "" : String(e);
323
+ return /[",\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
324
+ };
325
+ function Ye(e) {
326
+ let t = e.series ?? [];
327
+ if (t.some((e) => e.points?.length)) {
328
+ let e = [
329
+ "Series",
330
+ "X",
331
+ "Y",
332
+ "Size",
333
+ "Label"
334
+ ].map(z).join(","), n = [];
335
+ for (let e of t) for (let t of e.points ?? []) n.push([
336
+ e.label,
337
+ t.x,
338
+ t.y,
339
+ t.r ?? "",
340
+ t.label ?? ""
341
+ ].map(z).join(","));
342
+ return n.length ? [e, ...n].join("\n") : "";
343
+ }
344
+ let n = e.categories ?? [];
345
+ if (!n.length || !t.length) return "";
346
+ let r = ["Category"];
347
+ for (let e of t) e.ohlc ? r.push(`${e.label} Open`, `${e.label} High`, `${e.label} Low`, `${e.label} Close`, ...e.volumes ? [`${e.label} Volume`] : []) : e.boxes ? r.push(`${e.label} Min`, `${e.label} Q1`, `${e.label} Median`, `${e.label} Q3`, `${e.label} Max`, `${e.label} Outliers`) : e.errors ? r.push(e.label, `${e.label} Low`, `${e.label} High`) : e.lowValues ? r.push(`${e.label} low`, `${e.label} high`) : e.targets ? r.push(e.label, `${e.label} target`) : r.push(e.label);
348
+ let i = n.map((e, n) => {
349
+ let r = [e];
350
+ for (let e of t) if (e.ohlc) {
351
+ let t = e.ohlc[n];
352
+ r.push(t?.o ?? "", t?.h ?? "", t?.l ?? "", t?.c ?? ""), e.volumes && r.push(e.volumes[n] ?? "");
353
+ } else if (e.boxes) {
354
+ let t = e.boxes[n];
355
+ r.push(t?.min ?? "", t?.q1 ?? "", t?.median ?? "", t?.q3 ?? "", t?.max ?? "", t?.outliers?.join(" ") ?? "");
356
+ } else if (e.errors) {
357
+ let t = e.values[n], i = e.errors[n], a = i == null ? "" : typeof i == "number" ? (t ?? 0) - Math.abs(i) : Math.min(i.lo, i.hi), o = i == null ? "" : typeof i == "number" ? (t ?? 0) + Math.abs(i) : Math.max(i.lo, i.hi);
358
+ r.push(t ?? "", a, o);
359
+ } else e.lowValues ? r.push(e.lowValues[n] ?? "", e.values[n] ?? "") : e.targets ? r.push(e.values[n] ?? "", e.targets[n] ?? "") : r.push(e.values[n] ?? "");
360
+ return r.map(z).join(",");
361
+ });
362
+ return [r.map(z).join(","), ...i].join("\n");
363
+ }
364
+ function Xe(e) {
365
+ let t = e.series ?? [];
366
+ return t.some((e) => e.points?.length) ? !0 : !!(e.categories?.length && t.length);
367
+ }
368
+ function Ze(e, t = "chart.csv") {
369
+ let n = Ye(e);
370
+ if (!n) return !1;
371
+ let r = URL.createObjectURL(new Blob([n], { type: "text/csv;charset=utf-8" }));
372
+ return Ge(r, t), setTimeout(() => URL.revokeObjectURL(r), 1e3), !0;
373
+ }
374
+ //#endregion
375
+ //#region ../grid/dist/chart-messages.js
376
+ var Qe = {
377
+ chartLabel: "{type} chart",
378
+ dataTable: "{type} chart data",
379
+ dataTableCapped: ", first {shown} of {total} rows",
380
+ noData: "No data",
381
+ noValue: "no value",
382
+ seriesAtCategory: "{series}: {value} at {category}",
383
+ densePoints: "{count} points, {from} to {to}. Arrow keys step through values.",
384
+ drillIn: ", drill in",
385
+ sankeyNode: "{label}: in {in}, out {out}",
386
+ total: "Total",
387
+ rSquared: "R² {value}",
388
+ describeChart: "Describe chart",
389
+ describeCopied: "Description copied",
390
+ drillPath: "Drilldown path",
391
+ drillRoot: "All",
392
+ dateRange: "Date range",
393
+ showLast: "Show the last {preset}",
394
+ pan: "Pan",
395
+ panTitle: "Drag the plot to pan the zoomed window",
396
+ resetZoom: "Reset zoom",
397
+ resetZoomTitle: "Reset zoom (or double-click the plot)",
398
+ annotate: "Annotate",
399
+ annotateOnTitle: "Click the plot to pin a note, or a marker to remove it",
400
+ annotateOffTitle: "Pin notes on the chart",
401
+ drawingTools: "Drawing tools",
402
+ draw: "Draw: {tool}",
403
+ toolTrend: "Trend",
404
+ toolRay: "Ray",
405
+ toolFib: "Fib",
406
+ toolRect: "Rect",
407
+ toolArrow: "Arrow",
408
+ toolText: "Text",
409
+ drawing: "{tool} drawing",
410
+ deleteDrawing: "Delete",
411
+ deleteDrawingTitle: "Remove the selected drawing (Delete)",
412
+ clearDrawings: "Clear",
413
+ clearDrawingsTitle: "Remove every drawing",
414
+ noteText: "Note text",
415
+ removeNote: "Remove note: {label}",
416
+ png: "PNG",
417
+ downloadPng: "Download PNG",
418
+ svg: "SVG",
419
+ downloadSvg: "Download SVG",
420
+ pdf: "PDF",
421
+ downloadPdf: "Download PDF",
422
+ downloadCsv: "Download CSV",
423
+ print: "Print",
424
+ printTitle: "Print the chart",
425
+ copy: "Copy",
426
+ copied: "✓ Copied",
427
+ copyTitle: "Copy chart as image",
428
+ copyAsImage: "Copy as image",
429
+ range: "Range",
430
+ series: "Series",
431
+ showSeries: "Show",
432
+ hideSeries: "Hide",
433
+ isolateHint: "double-click to isolate",
434
+ showMore: "+{n} more",
435
+ showLess: "Show less",
436
+ rangeBrush: "Range brush",
437
+ brushRange: "{from} to {to}"
438
+ };
439
+ function $e(e) {
440
+ return Se(Qe, e);
441
+ }
442
+ function et(e, t) {
443
+ return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e);
444
+ }
445
+ //#endregion
446
+ //#region ../grid/dist/SvGridChart.svelte
447
+ var tt = k("<span class=\"sv-grid-chart-crumb is-current svelte-kvdein\" aria-current=\"page\"> </span>"), nt = k("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button>"), rt = k("<span class=\"sv-grid-chart-crumb-sep svelte-kvdein\" aria-hidden=\"true\">/</span> <!>", 1), it = k("<nav class=\"sv-grid-chart-crumbs svelte-kvdein\"><button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button> <!></nav>"), at = k("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-preset svelte-kvdein\"> </button>"), ot = k("<span class=\"sv-grid-chart-presets svelte-kvdein\" role=\"group\"></span>"), st = k("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 9l-3 3 3 3\"></path><path d=\"M9 5l3-3 3 3\"></path><path d=\"M15 19l-3 3-3-3\"></path><path d=\"M19 9l3 3-3 3\"></path><path d=\"M2 12h20\"></path><path d=\"M12 2v20\"></path></svg> </button>"), ct = k("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"></path><path d=\"M21 17a9 9 0 0 0-15-6.7L3 13\"></path></svg> </button>"), lt = k("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2v6\"></path><circle cx=\"12\" cy=\"11\" r=\"3\"></circle><path d=\"M12 14v8\"></path></svg> </button>"), ut = k("<button type=\"button\"> </button>"), dt = k("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button>", 1), ft = k("<span class=\"sv-grid-chart-drawtools svelte-kvdein\" role=\"group\"><!> <!></span>"), pt = k("<div class=\"sv-grid-chart-toolbar svelte-kvdein\" role=\"toolbar\"><!> <!> <!> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button></div>"), mt = k("<div class=\"sv-grid-chart-toolbar is-crumbs-only svelte-kvdein\" role=\"toolbar\"><!></div>"), ht = y("<clipPath><rect></rect></clipPath>"), gt = y("<linearGradient x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\"></stop><stop offset=\"1\"></stop></linearGradient>"), _t = y("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\"><rect width=\"6\" height=\"6\"></rect><rect width=\"3\" height=\"6\" fill=\"rgba(255,255,255,0.35)\"></rect></pattern>"), vt = y("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><path d=\"M0 0L6 6 M6 0L0 6\" stroke=\"rgba(255,255,255,0.45)\" stroke-width=\"1\"></path></pattern>"), yt = y("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><circle cx=\"3\" cy=\"3\" r=\"1.2\" fill=\"rgba(255,255,255,0.55)\"></circle></pattern>"), bt = y("<pattern width=\"8\" height=\"8\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(-45)\"><rect width=\"8\" height=\"8\"></rect><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"8\" stroke=\"rgba(0,0,0,0.18)\" stroke-width=\"2\"></line></pattern>"), xt = y("<defs><!><!><!></defs>"), St = y("<text class=\"sv-grid-chart-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ct = y("<text class=\"sv-grid-chart-subtitle svelte-kvdein\" text-anchor=\"middle\"> </text>"), wt = y("<text class=\"sv-grid-chart-caption svelte-kvdein\" text-anchor=\"start\"> </text>"), Tt = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), Et = y("<!><text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Dt = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), Ot = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), kt = y("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), At = y("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), jt = y("<!><!><!><!><!>", 1), Mt = y("<line></line>"), Nt = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), Pt = y("<!><!>", 1), Ft = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), It = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>"), Lt = y("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\"> </text>"), Rt = y("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>"), zt = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\" opacity=\"0.5\"></line>"), Bt = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line><!><text class=\"sv-grid-chart-axis sv-grid-chart-group-label svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Vt = y("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ht = y("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ut = y("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Wt = y("<!><!><!><!><!><!><!><!>", 1), Gt = y("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"end\"> </text>"), Kt = y("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), qt = y("<rect class=\"sv-grid-chart-refband svelte-kvdein\"></rect><!>", 1), Jt = y("<path class=\"sv-grid-chart-band svelte-kvdein\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), Yt = y("<path class=\"sv-grid-chart-area svelte-kvdein\" stroke=\"none\"></path>"), Xt = y("<circle class=\"sv-grid-chart-dot is-active svelte-kvdein\" r=\"4\"></circle>"), Zt = y("<circle></circle>"), Qt = y("<path fill=\"none\" stroke-width=\"1.5\"></path>"), $t = y("<path></path>"), en = y("<g class=\"svelte-kvdein\"><!><!><path class=\"sv-grid-chart-linepath svelte-kvdein\" fill=\"none\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), tn = y("<rect rx=\"1\"></rect>"), nn = y("<circle class=\"sv-grid-chart-dot svelte-kvdein\" fill-opacity=\"0.55\"></circle>"), rn = y("<g class=\"sv-grid-chart-stem svelte-kvdein\"><line class=\"svelte-kvdein\"></line><!><circle class=\"sv-grid-chart-dot svelte-kvdein\"></circle></g>"), an = y("<line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line><line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line><line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line>", 1), on = y("<line class=\"sv-grid-chart-wick svelte-kvdein\"></line><rect class=\"sv-grid-chart-candle svelte-kvdein\"></rect>", 1), sn = y("<circle class=\"sv-grid-chart-outlier svelte-kvdein\" r=\"2\" fill=\"none\"></circle>"), cn = y("<line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><rect class=\"sv-grid-chart-box svelte-kvdein\" fill-opacity=\"0.25\"></rect><line class=\"sv-grid-chart-median svelte-kvdein\"></line><!>", 1), ln = y("<line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line><line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line><line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line>", 1), un = y("<circle fill-opacity=\"0.7\"></circle>"), dn = y("<g class=\"sv-grid-chart-refpill svelte-kvdein\"><rect height=\"16\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" fill=\"#fff\" class=\"svelte-kvdein\"> </text></g>"), fn = y("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"end\"> </text>"), pn = y("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><!>", 1), mn = y("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"start\"> </text>", 1), hn = y("<path class=\"sv-grid-chart-overlay-band svelte-kvdein\" fill-opacity=\"0.1\" stroke-opacity=\"0.35\" stroke-width=\"1\"></path>"), gn = y("<!><path class=\"sv-grid-chart-overlay svelte-kvdein\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>", 1), _n = y("<line class=\"sv-grid-chart-datalabel-leader svelte-kvdein\"></line>"), vn = y("<!><text> </text>", 1), yn = y("<text class=\"sv-grid-chart-serieslabel svelte-kvdein\" text-anchor=\"start\"> </text>"), bn = y("<line stroke-width=\"1.5\"></line><rect height=\"13\" rx=\"2\"></rect><text class=\"sv-grid-chart-annotation-flagtext svelte-kvdein\" text-anchor=\"middle\" fill=\"#fff\"> </text>", 1), xn = y("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.2\"></path><text class=\"sv-grid-chart-annotation-flagtext svelte-kvdein\" text-anchor=\"middle\" fill=\"#fff\"> </text><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), Sn = y("<rect width=\"9\" height=\"9\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></rect><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), Cn = y("<circle stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), wn = y("<g><!></g>"), Tn = y("<path class=\"svelte-kvdein\"></path>"), En = y("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.5\" class=\"svelte-kvdein\"></line><!>", 1), Dn = y("<rect fill-opacity=\"0.08\" stroke-width=\"1.2\" class=\"svelte-kvdein\"></rect>"), On = y("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.2\" stroke-dasharray=\"4 3\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\" text-anchor=\"end\"> </text>", 1), kn = y("<line stroke-width=\"1\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\"> </text>", 1), An = y("<!><rect class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></rect>", 1), jn = y("<text class=\"sv-grid-chart-drawing-text svelte-kvdein\"> </text>"), Mn = y("<circle class=\"sv-grid-chart-drawing-handle svelte-kvdein\" r=\"5\" fill=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle>"), Nn = y("<g><!><!></g>"), Pn = y("<rect fill=\"var(--sg-accent, #2563eb)\" fill-opacity=\"0.08\" stroke=\"var(--sg-accent, #2563eb)\" stroke-dasharray=\"4 3\"></rect>"), Fn = y("<line stroke=\"var(--sg-accent, #2563eb)\" stroke-width=\"1.5\" stroke-dasharray=\"4 3\"></line>"), In = y("<circle r=\"3.5\" fill=\"var(--sg-accent, #2563eb)\"></circle><!>", 1), Ln = y("<g class=\"sv-grid-chart-drawings\"><!><!></g>"), Rn = y("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line>"), zn = y("<g class=\"sv-grid-chart-crosshair-label svelte-kvdein\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" class=\"svelte-kvdein\"> </text></g>"), Bn = y("<g class=\"sv-grid-chart-crosshair-label svelte-kvdein\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" class=\"svelte-kvdein\"> </text></g><!>", 1), Vn = y("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line><!>", 1), Hn = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), Un = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text>"), Wn = y("<text class=\"sv-grid-chart-heatlabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), Gn = y("<rect class=\"sv-grid-chart-heatcell svelte-kvdein\"></rect><!>", 1), Kn = y("<stop></stop>"), qn = y("<defs><linearGradient x1=\"0\" y1=\"1\" x2=\"0\" y2=\"0\"></linearGradient></defs><rect class=\"sv-grid-chart-heatlegend svelte-kvdein\" width=\"10\"></rect><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>", 1), Jn = y("<!><!><!><!>", 1), Yn = y("<text class=\"sv-grid-chart-funnel-label svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-funnel-value svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Xn = y("<path class=\"sv-grid-chart-funnel-seg svelte-kvdein\"></path><!>", 1), Zn = y("<circle class=\"sv-grid-chart-radar-ring svelte-kvdein\"></circle>"), Qn = y("<line class=\"sv-grid-chart-radar-spoke svelte-kvdein\"></line><text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>", 1), $n = y("<circle class=\"sv-grid-chart-radar-dot svelte-kvdein\" r=\"3\" role=\"img\"></circle>"), er = y("<path class=\"sv-grid-chart-radar-poly svelte-kvdein\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), tr = y("<!><!><!>", 1), nr = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>"), rr = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), ir = y("<rect rx=\"2\" role=\"img\"></rect>"), ar = y("<rect class=\"sv-grid-chart-calendar-legend svelte-kvdein\" width=\"10\" height=\"10\" rx=\"2\"></rect><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>", 1), or = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\">Less</text><!><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\">More</text>", 1), sr = y("<!><!><!><!>", 1), cr = y("<line></line>"), lr = y("<path fill=\"none\" stroke-width=\"4\" stroke-linecap=\"butt\" opacity=\"0.7\"></path>"), ur = y("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), dr = y("<!><path fill=\"none\" stroke=\"var(--sg-border, #e2e8f0)\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path class=\"sv-grid-chart-gauge-needle svelte-kvdein\"></path><circle class=\"sv-grid-chart-gauge-hub svelte-kvdein\"></circle><circle class=\"sv-grid-chart-gauge-hub-dot svelte-kvdein\" r=\"2.5\"></circle><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-gauge-value svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), fr = y("<text class=\"sv-grid-chart-treemap-label svelte-kvdein\"> </text>"), pr = y("<text class=\"sv-grid-chart-treemap-value svelte-kvdein\" opacity=\"0.85\"> </text>"), mr = y("<rect class=\"sv-grid-chart-treemap-cell svelte-kvdein\"></rect><!><!>", 1), hr = y("<path class=\"sv-grid-chart-sankey-link svelte-kvdein\" fill=\"none\" stroke-opacity=\"0.35\" role=\"img\"></path>"), gr = y("<rect class=\"sv-grid-chart-sankey-node svelte-kvdein\" role=\"img\"></rect><text class=\"sv-grid-chart-sankey-label svelte-kvdein\"> </text>", 1), _r = y("<!><!>", 1), vr = y("<circle class=\"sv-grid-chart-gridline svelte-kvdein\" fill=\"none\"></circle>"), yr = y("<text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>"), br = y("<path class=\"sv-grid-chart-arc-track svelte-kvdein\"></path>"), xr = y("<path class=\"sv-grid-chart-ribbon svelte-kvdein\" fill-opacity=\"0.45\" stroke-opacity=\"0.6\"></path>"), Sr = y("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path>"), Cr = y("<text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>"), wr = y("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\" pointer-events=\"none\"> </text>"), Tr = y("<!><!><!><!><!><!>", 1), Er = y("<rect></rect>"), Dr = y("<line class=\"sv-grid-chart-bullet-target\" stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\"></line>"), Or = y("<g class=\"sv-grid-chart-bullet\"><!><rect class=\"sv-grid-chart-bar svelte-kvdein\"></rect><!></g>"), kr = y("<polyline class=\"sv-grid-chart-callout svelte-kvdein\" fill=\"none\" stroke-width=\"1\"></polyline><text class=\"sv-grid-chart-callout-label svelte-kvdein\"> </text>", 1), Ar = y("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), jr = y("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), Mr = y("<text class=\"sv-grid-chart-donut-total svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-donut-label svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Nr = y("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\" data-dense=\"true\"></rect>"), Pr = y("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\"></rect>"), Fr = y("<rect class=\"sv-grid-chart-zoom-rect svelte-kvdein\"></rect>"), Ir = y("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), Lr = y("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), Rr = y("<rect opacity=\"0.55\"></rect>"), zr = k("<div class=\"sv-grid-chart-brush-host svelte-kvdein\"><svg class=\"sv-grid-chart-brush svelte-kvdein\" width=\"100%\" role=\"slider\" tabindex=\"0\" aria-orientation=\"horizontal\"><!><!><rect class=\"sv-grid-chart-brush-mask svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-mask svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-window svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-kvdein\" width=\"8\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-kvdein\" width=\"8\"></rect></svg></div>"), Br = k("<div class=\"sv-grid-chart-empty svelte-kvdein\"> </div>"), Vr = k("<input class=\"sv-grid-chart-textdraft svelte-kvdein\" type=\"text\"/>"), Hr = k("<span class=\"sv-grid-chart-tooltip-dot svelte-kvdein\"></span>"), Ur = k("<span class=\"sv-grid-chart-tooltip-row-label svelte-kvdein\"> </span>"), Wr = k("<span class=\"sv-grid-chart-tooltip-row svelte-kvdein\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-kvdein\"> </span></span>"), Gr = k("<span class=\"sv-grid-chart-tooltip-title svelte-kvdein\"> </span> <!>", 1), Kr = k("<div role=\"tooltip\"><!></div>"), qr = k("<span class=\"sv-grid-chart-swatch svelte-kvdein\"></span> ", 1), Jr = k("<button type=\"button\"><!></button>"), Yr = k("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-kvdein\"> </button>"), Xr = k("<div><!> <!></div>"), Zr = k("<div class=\"sv-grid-chart-live sv-grid-chart-sr-only svelte-kvdein\" aria-live=\"polite\" aria-atomic=\"true\"> </div>"), Qr = k("<th> </th>"), $r = k("<td> </td>"), ei = k("<tr></tr>"), ti = k("<div><!> <svg width=\"100%\"><!><!><!><!><!><!><g><!><!><!><!><!><!><!><!></g><!><!><g></g><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!> <!> <!> <!> <!> <!> <!> <div class=\"sv-grid-chart-sr-only svelte-kvdein\"><table><caption> <!><!></caption><thead><tr></tr></thead><tbody></tbody></table></div></div>");
448
+ function ni(ne, f) {
449
+ he(f, !0);
450
+ let ce = j(f, "legend", 3, !0), y = j(f, "interactive", 3, !0), k = j(f, "tooltipMode", 3, "shared"), Se = j(f, "tooltipPosition", 3, "follow"), Ce = j(f, "tooltipSticky", 3, !1), Oe = j(f, "zoomable", 3, !1), I = j(f, "zoom", 15, null), L = j(f, "rangePresets", 3, !1), R = j(f, "contextMenu", 3, !1), Pe = j(f, "animate", 3, !1), Fe = j(f, "drillable", 3, !1), Ie = j(f, "drillPath", 31, () => fe([])), Le = j(f, "selectable", 3, !1), Re = j(f, "selected", 31, () => fe([])), ze = j(f, "announce", 3, !0), Be = j(f, "describe", 3, !0), Ve = j(f, "live", 3, !1), He = j(f, "hoverHighlight", 3, !0), Ue = j(f, "crosshairLabels", 3, !0), We = j(f, "brush", 3, !1), Ge = j(f, "brushHeight", 3, 88), Ke = j(f, "autosize", 3, !1), qe = j(f, "annotatable", 3, !1), Je = j(f, "drawable", 3, !1), z = E(() => $e(f.localeText)), Ye = x("");
451
+ ue(() => {
452
+ if (!Be()) {
453
+ T(Ye, "");
454
+ return;
455
+ }
456
+ let e = S(W), t = !0;
457
+ return import("./chart-summary-BP9i-v8M.js").then(({ chartSummary: n }) => {
458
+ t && T(Ye, n(e), !0);
459
+ }), () => {
460
+ t = !1;
461
+ };
462
+ });
463
+ async function Qe() {
464
+ if (S(Ye)) {
465
+ try {
466
+ await navigator.clipboard?.writeText(S(Ye));
467
+ } catch {}
468
+ T(Vo, `${S(z).describeCopied}. ${S(Ye)}`);
469
+ }
470
+ }
471
+ let ni = x(0), ri = x(0), ii = E(() => f.width ?? (Ke() && S(ni) > 24 ? S(ni) : f.spec.width ?? 520)), ai = E(() => f.height ?? (Ke() && S(ri) > 24 ? S(ri) : f.spec.height ?? 300)), oi = E(() => {
472
+ if (!f.spec.responsive?.length) return;
473
+ let e;
474
+ for (let t of u(f.spec.responsive, S(ii), S(ai))) t.legend !== void 0 && (e = t.legend);
475
+ return e;
476
+ }), B = E(() => {
477
+ if (!f.spec.responsive?.length) return f.spec;
478
+ let { responsive: e, ...t } = o(f.spec, S(ii), S(ai));
479
+ return t;
480
+ }), si = E(() => S(oi) ?? ce()), ci = E(() => S(si) === !0 ? "bottom" : S(si) === !1 ? null : S(si)), li = E(() => S(ci) === "left" || S(ci) === "right"), ui = x(0), di = x(0), fi = x(0), pi = x(0), mi = E(() => {
481
+ if (!Ke() || S(ni) <= 24) return null;
482
+ let e = S(bi) ? S(ui) : 0, t = S(ci) ? S(fi) : 0, n = S(ci) ? S(di) : 0, r = We() && !Na.has(f.spec.type) ? S(pi) : 0, i = Math.max(120, Math.round(S(ni) - (S(li) ? n + 8 : 0))), a = e + (S(li) ? 0 : t) + r, o = S(li) ? 16 : (e ? 8 : 0) + (t ? 8 : 0) + (r ? 8 : 0);
483
+ return {
484
+ width: i,
485
+ height: S(ri) > 24 ? Math.max(120, Math.round(S(ri) - a - o)) : void 0
486
+ };
487
+ }), hi = E(() => f.width ?? S(mi)?.width), gi = E(() => f.height ?? S(mi)?.height), _i = E(() => typeof f.dataLabels == "object" ? {
488
+ show: !0,
489
+ ...f.dataLabels
490
+ } : f.dataLabels === void 0 ? S(B).dataLabels ? {
491
+ show: S(B).dataLabels.show !== !1,
492
+ ...S(B).dataLabels
493
+ } : { show: !1 } : { show: !!f.dataLabels }), vi = E(() => Oe() ? Oe() === !0 ? {
494
+ drag: !0,
495
+ wheel: !1,
496
+ pinch: !1,
497
+ pan: !1,
498
+ axis: "x"
499
+ } : {
500
+ drag: Oe().drag !== !1,
501
+ wheel: Oe().wheel ?? !1,
502
+ pinch: Oe().pinch ?? !!Oe().wheel,
503
+ pan: Oe().pan ?? !1,
504
+ axis: Oe().axis ?? "x"
505
+ } : null), yi = x(!1), bi = E(() => f.toolbar ?? (!!Oe() || !!f.onDrill || qe() || !!L() || Fe() || !!Je())), xi = x(!1), V = (e) => f.formatValue ? f.formatValue(e) : S(B).valueFormat ? d(e, S(B).valueFormat, S(B)) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), Si = E(() => {
506
+ let e = S(B).y2Axis;
507
+ return f.formatValue ? f.formatValue : e?.formatter ? (t) => e.formatter(t, -1) : e?.format ? (t) => d(t, e.format, S(B)) : (e) => Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e);
508
+ }), Ci = E(() => new Set(S(B).series.filter((e) => e.axis === "right").map((e) => e.label))), wi = (e) => e && S(Ci).has(e) ? S(Si) : V, Ti = x(fe(new Set(f.spec.series.filter((e) => e.visible === !1).map((e) => e.label)))), Ei = x(null), Di = x(null), Oi = x(null), ki = E(() => S(B).palette ?? S(Di) ?? n), Ai = `svgc-${Math.random().toString(36).slice(2, 8)}`, ji = E(() => S(B).series.map((e, t) => ({
509
+ ...e,
510
+ color: e.color ?? S(ki)[t % S(ki).length]
511
+ }))), Mi = E(() => S(B).series.map((e, t) => e.pattern ? e.pattern : S(B).patternFallback ? [
512
+ "stripe",
513
+ "crosshatch",
514
+ "dots",
515
+ "diagonal"
516
+ ][t % 4] : "solid")), Ni = E(() => {
517
+ let e = {};
518
+ return S(ji).forEach((t, n) => {
519
+ let r = S(Mi)[n];
520
+ e[t.label] = r === "solid" || !r ? t.color : `url(#${Ai}-pat-${n})`;
521
+ }), e;
522
+ }), Pi = E(() => S(ji).map((e, t) => ({
523
+ id: `${Ai}-pat-${t}`,
524
+ color: e.color,
525
+ kind: S(Mi)[t] ?? "solid"
526
+ })).filter((e) => e.kind !== "solid")), Fi = E(() => {
527
+ if (S(Ei) == null) return S(Ti);
528
+ let e = S(B).type === "pie" ? S(Ja) : S(B).series.map((e) => e.label);
529
+ return new Set(e.filter((e) => e !== S(Ei)));
530
+ }), Ii = E(() => I() !== null);
531
+ function Li(e) {
532
+ if (!(e === null && I() === null || e !== null && I() !== null && e.i0 === I().i0 && e.i1 === I().i1 && (e.y?.min ?? null) === (I().y?.min ?? null) && (e.y?.max ?? null) === (I().y?.max ?? null)) && (I(e), f.onZoom?.(e), f.syncGroup && !zi)) {
533
+ let t = S(B).categories.length;
534
+ Me(f.syncGroup, e, t, Ri, e ? [S(B).categories[e.i0] ?? "", S(B).categories[e.i1] ?? ""] : null);
535
+ }
536
+ }
537
+ let Ri = Symbol("svchart"), zi = !1, Bi = E(() => f.syncGroup ? Ae(f.syncGroup) : null), Vi = x(!1);
538
+ function Hi(e) {
539
+ Li(e);
540
+ }
541
+ function Ui() {
542
+ Li(null);
543
+ }
544
+ function Wi(e, t) {
545
+ let n = Ao(e, t);
546
+ return n == null ? null : (I() ? I().i0 : 0) + n;
547
+ }
548
+ function Gi(e) {
549
+ if (!S(vi)?.wheel || !S(K) || S(xi) || S(vi).wheel === "modifier" && !(e.ctrlKey || e.metaKey)) return;
550
+ let t = ea(e);
551
+ if (!t || t.x < S(G).plot.x || t.x > S(G).plot.x + S(G).plot.w) return;
552
+ e.preventDefault();
553
+ let n = Wi(e.clientX, e.currentTarget) ?? 0, r = e.deltaY > 0 ? 1.25 : .8;
554
+ Li(we(I(), S(B).categories.length, n, r));
555
+ }
556
+ let Ki = /* @__PURE__ */ new Map(), qi = null, Ji = null, Yi = (e) => !!S(vi)?.pan && S(Ii) && (S(yi) || (S(vi).pan === "shift" || S(vi).pan === !0) && e.shiftKey), Xi = x(null), Zi = x(null), Qi = x(null), $i = E(() => {
557
+ if (!S(Zi) || !S(Qi)) return null;
558
+ let e = Math.min(S(Zi).x, S(Qi).x), t = Math.min(S(Zi).y, S(Qi).y), n = Math.abs(S(Qi).x - S(Zi).x), r = Math.abs(S(Qi).y - S(Zi).y);
559
+ return n > 4 && r > 4 ? {
560
+ x: e,
561
+ y: t,
562
+ w: n,
563
+ h: r
564
+ } : null;
565
+ });
566
+ function ea(e) {
567
+ if (!S(Xi)) return null;
568
+ let t = S(Xi).getBoundingClientRect();
569
+ return {
570
+ x: (e.clientX - t.left) / t.width * S(G).width,
571
+ y: (e.clientY - t.top) / t.height * S(G).height
572
+ };
573
+ }
574
+ function ta(e) {
575
+ let t = S(q) ? e.y - S(G).plot.y : e.x - S(G).plot.x, n = Math.floor(t / S(wo));
576
+ return Math.max(0, Math.min(S(W).categories.length - 1, n));
577
+ }
578
+ function na(e) {
579
+ if (S(xi) || S(la) || S(ha) || !S(vi) || !S(K)) return;
580
+ let t = ea(e);
581
+ if (t && !(t.x < S(G).plot.x || t.x > S(G).plot.x + S(G).plot.w || t.y < S(G).plot.y || t.y > S(G).plot.y + S(G).plot.h)) {
582
+ if (e.target.setPointerCapture?.(e.pointerId), S(vi).pinch && (Ki.set(e.pointerId, t), Ki.size === 2)) {
583
+ let [e, t] = [...Ki.values()];
584
+ qi = {
585
+ dist: Math.hypot(e.x - t.x, e.y - t.y) || 1,
586
+ mid: ta({
587
+ x: (e.x + t.x) / 2,
588
+ y: (e.y + t.y) / 2
589
+ }) + (I() ? I().i0 : 0),
590
+ start: I()
591
+ }, T(Zi, null), T(Qi, null);
592
+ return;
593
+ }
594
+ if (Yi(e)) {
595
+ Ji = {
596
+ startIndex: ta(t),
597
+ start: I()
598
+ };
599
+ return;
600
+ }
601
+ S(vi).drag && (T(Zi, t, !0), T(Qi, t, !0));
602
+ }
603
+ }
604
+ function ra(e) {
605
+ if (qi && Ki.has(e.pointerId)) {
606
+ let t = ea(e);
607
+ t && Ki.set(e.pointerId, t);
608
+ let [n, r] = [...Ki.values()];
609
+ if (n && r) {
610
+ let e = Math.hypot(n.x - r.x, n.y - r.y) || 1;
611
+ Li(Ee(qi.start, S(B).categories.length, qi.mid, e / qi.dist));
612
+ }
613
+ return;
614
+ }
615
+ if (Ji) {
616
+ let t = ea(e);
617
+ if (!t) return;
618
+ let n = Ji.startIndex - ta(t);
619
+ Li(Te(Ji.start, S(B).categories.length, n));
620
+ return;
621
+ }
622
+ S(Zi) && T(Qi, ea(e), !0);
623
+ }
624
+ function ia(e) {
625
+ if (e && Ki.delete(e.pointerId), qi) {
626
+ Ki.size < 2 && (qi = null);
627
+ return;
628
+ }
629
+ if (Ji) {
630
+ Ji = null;
631
+ return;
632
+ }
633
+ if (!S(Zi) || !S(Qi)) {
634
+ T(Zi, null), T(Qi, null);
635
+ return;
636
+ }
637
+ let t = S($i);
638
+ if (t) {
639
+ let e = S(vi)?.axis ?? "x", n = ta({
640
+ x: t.x,
641
+ y: t.y
642
+ }), r = ta({
643
+ x: t.x + t.w,
644
+ y: t.y + t.h
645
+ }), i = I() ? I().i0 : 0, a = e === "y" ? I()?.i0 ?? 0 : i + Math.min(n, r), o = e === "y" ? I()?.i1 ?? S(B).categories.length - 1 : i + Math.max(n, r), s;
646
+ if (e !== "x" && S(uo) && !S(q)) {
647
+ let e = S(uo).yInvert(t.y), n = S(uo).yInvert(t.y + t.h);
648
+ Number.isFinite(e) && Number.isFinite(n) && e !== n && (s = {
649
+ min: Math.min(e, n),
650
+ max: Math.max(e, n)
651
+ });
652
+ }
653
+ (o > a || s) && Li({
654
+ i0: a,
655
+ i1: Math.max(a, o),
656
+ ...s ? { y: s } : {}
657
+ });
658
+ }
659
+ T(Zi, null), T(Qi, null);
660
+ }
661
+ function aa() {
662
+ Oe() && S(Ii) && Ui();
663
+ }
664
+ let oa = [
665
+ "trend",
666
+ "hray",
667
+ "fib",
668
+ "rect",
669
+ "arrow",
670
+ "text"
671
+ ], sa = E(() => ({
672
+ trend: S(z).toolTrend,
673
+ hray: S(z).toolRay,
674
+ fib: S(z).toolFib,
675
+ rect: S(z).toolRect,
676
+ arrow: S(z).toolArrow,
677
+ text: S(z).toolText
678
+ })), ca = E(() => Je() ? Je() === !0 ? oa : Je() : []), la = x(null), H = x(null), ua = x(null), da = x(null), fa = x(null), pa = x("");
679
+ function ma() {
680
+ let e = S(fa), t = S(pa).trim();
681
+ T(fa, null), T(pa, ""), !(!e || !t) && ba([..._a(), {
682
+ id: `d${Date.now().toString(36)}${ga++}`,
683
+ kind: "text",
684
+ points: [{
685
+ x: e.x,
686
+ y: e.y
687
+ }],
688
+ text: t
689
+ }]);
690
+ }
691
+ let ha = x(null), ga = 0, _a = () => S(B).drawings ?? [];
692
+ function va(e) {
693
+ if (!S(uo)) return null;
694
+ let t = S(G).axes?.x;
695
+ if (t?.type === "number") return S(uo).xInvertValue(e);
696
+ if (t?.type === "time") return new Date(S(uo).xInvertValue(e)).toISOString();
697
+ let n = Math.round(S(uo).xInvert(e));
698
+ return S(W).categories[n] ?? null;
699
+ }
700
+ function ya(e) {
701
+ let t = ea(e);
702
+ if (!t || !S(uo) || t.x < S(G).plot.x || t.x > S(G).plot.x + S(G).plot.w || t.y < S(G).plot.y || t.y > S(G).plot.y + S(G).plot.h) return null;
703
+ let n = va(t.x);
704
+ if (n == null) return null;
705
+ let r = S(uo).yInvert(t.y);
706
+ return Number.isFinite(r) ? {
707
+ x: n,
708
+ y: Math.round(r * 1e3) / 1e3,
709
+ px: t.x,
710
+ py: t.y
711
+ } : null;
712
+ }
713
+ function ba(e) {
714
+ f.onDrawingsChange?.(e);
715
+ }
716
+ function xa(e) {
717
+ T(la, S(la) === e ? null : e, !0), T(H, null), T(ua, null), T(fa, null);
718
+ }
719
+ function Sa(e) {
720
+ if (!S(la)) return;
721
+ let t = ya(e);
722
+ if (!t) return;
723
+ if (S(la) === "text") {
724
+ let n = S(ss)?.getBoundingClientRect();
725
+ T(pa, ""), T(fa, {
726
+ x: t.x,
727
+ y: t.y,
728
+ left: n ? e.clientX - n.left : 0,
729
+ top: n ? e.clientY - n.top : 0
730
+ }, !0);
731
+ return;
732
+ }
733
+ if (S(la) === "hray") {
734
+ ba([..._a(), {
735
+ id: `d${Date.now().toString(36)}${ga++}`,
736
+ kind: S(la),
737
+ points: [{
738
+ x: t.x,
739
+ y: t.y
740
+ }]
741
+ }]);
742
+ return;
743
+ }
744
+ if (!S(H)) {
745
+ T(H, t, !0), T(ua, {
746
+ x: t.px,
747
+ y: t.py
748
+ }, !0);
749
+ return;
750
+ }
751
+ let n = S(H);
752
+ T(H, null), T(ua, null), ba([..._a(), {
753
+ id: `d${Date.now().toString(36)}${ga++}`,
754
+ kind: S(la),
755
+ points: [{
756
+ x: n.x,
757
+ y: n.y
758
+ }, {
759
+ x: t.x,
760
+ y: t.y
761
+ }]
762
+ }]);
763
+ }
764
+ function Ca(e) {
765
+ if (S(ha)) {
766
+ let t = ya(e);
767
+ if (!t) return;
768
+ let { id: n, index: r } = S(ha);
769
+ ba(_a().map((e) => e.id === n ? {
770
+ ...e,
771
+ points: e.points.map((e, n) => n === r ? {
772
+ x: t.x,
773
+ y: t.y
774
+ } : e)
775
+ } : e));
776
+ return;
777
+ }
778
+ if (S(H)) {
779
+ let t = ea(e);
780
+ t && T(ua, t, !0);
781
+ }
782
+ }
783
+ function wa(e) {
784
+ ba(_a().filter((t) => t.id !== e)), S(da) === e && T(da, null);
785
+ }
786
+ function Ta(e, t) {
787
+ (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), wa(t));
788
+ }
789
+ function Ea(e) {
790
+ if (e.key === "Escape") {
791
+ if (S(us)) {
792
+ Da();
793
+ return;
794
+ }
795
+ S(la) && (S(H) ? (T(H, null), T(ua, null)) : T(la, null));
796
+ }
797
+ }
798
+ function Da() {
799
+ T(us, null), Q();
800
+ }
801
+ function Oa(e) {
802
+ if (!(!Ce() || !S(ls))) {
803
+ if (S(us) && S(us).index === e) {
804
+ Da();
805
+ return;
806
+ }
807
+ T(us, {
808
+ index: e,
809
+ series: S(ls).ctx.series ?? null
810
+ }, !0);
811
+ }
812
+ }
813
+ ue(() => {
814
+ if (!S(us) || typeof document > "u") return;
815
+ let e = (e) => {
816
+ S(ss) && e.target instanceof Node && S(ss).contains(e.target) || Da();
817
+ };
818
+ return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
819
+ });
820
+ let ka = (e) => {
821
+ e.focus();
822
+ }, Aa = E(() => S(B).type === "candlestick" || S(B).type === "ohlc"), ja = E(() => S(B).type === "ohlc"), Ma = E(() => Math.max(50, (S(hi) ?? S(B).width ?? 520) - 60)), Na = /* @__PURE__ */ new Set([
823
+ "pie",
824
+ "heatmap",
825
+ "funnel",
826
+ "radar",
827
+ "calendar",
828
+ "gauge",
829
+ "treemap",
830
+ "sankey",
831
+ "sunburst",
832
+ "radial-bar",
833
+ "radial-column",
834
+ "nightingale",
835
+ "chord",
836
+ "bullet"
837
+ ]), Pa = /* @__PURE__ */ new Set([
838
+ "lollipop",
839
+ "dumbbell",
840
+ "range-area",
841
+ "range-bar",
842
+ "stream",
843
+ "pareto"
844
+ ]), Fa = E(() => We() && !Na.has(S(B).type)), Ia = E(() => ({
845
+ ...S(B),
846
+ width: S(hi) ?? S(B).width,
847
+ height: Ge(),
848
+ title: void 0,
849
+ subtitle: void 0,
850
+ caption: void 0,
851
+ yAxisTitle: void 0,
852
+ y2AxisTitle: void 0,
853
+ xAxisTitle: void 0,
854
+ xAxis: {
855
+ ...S(B).xAxis,
856
+ title: void 0,
857
+ labels: !1
858
+ },
859
+ yAxis: {
860
+ ...S(B).yAxis,
861
+ title: void 0,
862
+ labels: !1
863
+ },
864
+ y2Axis: {
865
+ ...S(B).y2Axis,
866
+ title: void 0,
867
+ labels: !1
868
+ },
869
+ referenceLines: void 0,
870
+ referenceBands: void 0,
871
+ annotations: void 0,
872
+ drawings: void 0,
873
+ seriesLabels: void 0,
874
+ dataLabels: { show: !1 },
875
+ type: S(Aa) || S(B).type === "boxplot" || Pa.has(S(B).type) ? "line" : S(B).type === "histogram" ? "bar" : S(B).type,
876
+ stackOffset: void 0,
877
+ series: S(ji).filter((e) => !S(Fi).has(e.label)).map((e) => e.ohlc || e.boxes ? {
878
+ ...e,
879
+ ohlc: void 0,
880
+ boxes: void 0,
881
+ errors: void 0,
882
+ type: "line"
883
+ } : e.errors || e.type && Pa.has(e.type) || e.type === "scatter" ? {
884
+ ...e,
885
+ errors: void 0,
886
+ type: e.type && (Pa.has(e.type) || e.type === "scatter") ? "line" : e.type
887
+ } : e)
888
+ })), U = E(() => S(Fa) ? te(re(S(Ia), S(Ma))) : null), La = E(() => {
889
+ let e = S(B).categories.length;
890
+ return !I() || e === 0 ? {
891
+ t0: 0,
892
+ t1: 1
893
+ } : {
894
+ t0: I().i0 / e,
895
+ t1: (I().i1 + 1) / e
896
+ };
897
+ }), Ra = x(null);
898
+ function za(e, t) {
899
+ let n = t.getBoundingClientRect();
900
+ return S(U) ? (e.clientX - n.left) / n.width * S(U).width : 0;
901
+ }
902
+ function Ba(e, t) {
903
+ if (!S(U)) return;
904
+ let n = e.currentTarget, r = za(e, n.ownerSVGElement ?? n);
905
+ T(Ra, {
906
+ mode: t,
907
+ startX: r,
908
+ startT0: S(La).t0,
909
+ startT1: S(La).t1
910
+ }, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
911
+ }
912
+ function Va(e) {
913
+ if (!S(Ra) || !S(U)) return;
914
+ let t = (za(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - S(Ra).startX) / S(U).plot.w, n = S(B).categories.length;
915
+ if (n === 0) return;
916
+ let r = S(Ra).startT0, i = S(Ra).startT1;
917
+ if (S(Ra).mode === "move") {
918
+ let e = i - r;
919
+ r = Math.max(0, Math.min(1 - e, r + t)), i = r + e;
920
+ } else S(Ra).mode === "left" ? r = Math.max(0, Math.min(i - 1 / n, r + t)) : i = Math.min(1, Math.max(r + 1 / n, i + t));
921
+ let a = Math.max(0, Math.floor(r * n)), o = Math.min(n - 1, Math.ceil(i * n) - 1);
922
+ a === 0 && o === n - 1 ? Li(null) : Li({
923
+ i0: a,
924
+ i1: Math.max(a, o),
925
+ ...I()?.y ? { y: I().y } : {}
926
+ });
927
+ }
928
+ function Ha(e) {
929
+ T(Ra, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
930
+ }
931
+ let Ua = E(() => S(B).tree ?? S(B).treemap ?? null), Wa = E(() => Fe() && !!S(Ua) && (S(B).type === "sunburst" || S(B).type === "treemap" || S(B).type === "pie")), Ga = E(() => S(Wa) && Ie().length ? l(S(Ua), Ie()) : S(Ua)), Ka = (e) => e.value ?? (e.children ?? []).reduce((e, t) => e + Ka(t), 0), qa = E(() => S(B).type === "pie" && S(Wa) && S(Ga) ? S(Ga) : null), Ja = E(() => S(qa) ? (S(qa).children ?? []).map((e) => e.name) : S(B).categories), Ya = (e) => !!S(qa) && !!S(qa).children?.find((t) => t.name === e)?.children?.length;
932
+ function Xa(e) {
933
+ Ie(e);
934
+ }
935
+ function Za(e) {
936
+ return !S(Wa) || !e || !S(Ua) || !l(S(Ua), e)?.children?.length ? !1 : (Xa(e), !0);
937
+ }
938
+ let W = E(() => {
939
+ if (S(qa)) {
940
+ let e = S(qa).children ?? [], t = S(B).series[0]?.label ?? S(qa).name, n = e.map((e) => S(Fi).has(e.name) ? 0 : Ka(e)), r = e.map((e) => e.color ?? null);
941
+ return {
942
+ ...S(B),
943
+ categories: S(Ja),
944
+ series: [{
945
+ label: t,
946
+ values: n,
947
+ ...r.some(Boolean) ? { colors: r } : {}
948
+ }]
949
+ };
950
+ }
951
+ if (S(Wa) && S(Ga) && Ie().length) {
952
+ let e = {
953
+ ...S(B),
954
+ tree: S(Ga),
955
+ treemap: S(Ga)
956
+ };
957
+ return S(B).type === "treemap" ? e : {
958
+ ...e,
959
+ series: S(ji)
960
+ };
961
+ }
962
+ if (S(B).type === "pie" || S(ho)) {
963
+ let e = S(ji)[0];
964
+ if (!e) return S(B);
965
+ let t = e.values.map((e, t) => S(Fi).has(S(B).categories[t] ?? String(t)) ? 0 : e);
966
+ return {
967
+ ...S(B),
968
+ series: [{
969
+ ...e,
970
+ values: t
971
+ }]
972
+ };
973
+ }
974
+ let e = S(ji).filter((e) => !S(Fi).has(e.label)), t = I() ? c({
975
+ ...S(B),
976
+ series: e
977
+ }, I().i0, I().i1) : {
978
+ ...S(B),
979
+ series: e
980
+ };
981
+ if (I()?.y) {
982
+ let e = I().y.axis === "right" ? "y2Axis" : "yAxis";
983
+ t = {
984
+ ...t,
985
+ [e]: {
986
+ ...t[e] ?? {},
987
+ min: I().y.min,
988
+ max: I().y.max,
989
+ nice: !1
990
+ }
991
+ };
992
+ }
993
+ return re(t, S(Ma));
994
+ }), Qa = x(!1), $a = E(() => te({
995
+ ...S(W),
996
+ palette: S(ki),
997
+ ...S(hi) || S(gi) ? {
998
+ width: S(hi),
999
+ height: S(gi)
1000
+ } : {},
1001
+ ...f.dataLabels === void 0 ? {} : { dataLabels: S(_i) }
1002
+ }, S(Qa) ? "dark" : "light")), eo = E(() => Pe() ? Pe() === !0 ? {
1003
+ duration: 400,
1004
+ enter: "fade",
1005
+ update: !0
1006
+ } : {
1007
+ duration: Pe().duration ?? 400,
1008
+ enter: Pe().enter ?? "fade",
1009
+ update: Pe().update ?? !0
1010
+ } : null), to = x(!1);
1011
+ ue(() => {
1012
+ if (typeof matchMedia != "function") return;
1013
+ let e = matchMedia("(prefers-reduced-motion: reduce)");
1014
+ T(to, e.matches, !0);
1015
+ let t = () => T(to, e.matches, !0);
1016
+ return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
1017
+ });
1018
+ let no = x(null), G = E(() => S(no) && S(no).t < 1 ? Ne(S(no).from, S($a), S(no).t) : S($a)), ro = null, io = 0;
1019
+ ue(() => {
1020
+ let e = S($a);
1021
+ ae(() => {
1022
+ let t = ro;
1023
+ if (ro = e, !t || !S(eo)?.update || S(to) || S(eo).duration <= 0 || Ve() || e.bars.length + e.arcs.length > 600 || e.lines.some((e) => e.points.length > 600) || t.type !== e.type) return;
1024
+ let n = S(no) && S(no).t < 1 ? Ne(S(no).from, t, S(no).t) : t;
1025
+ cancelAnimationFrame(io);
1026
+ let r = performance.now(), i = S(eo).duration;
1027
+ T(no, {
1028
+ from: n,
1029
+ t: 0
1030
+ }, !0);
1031
+ let a = (e) => {
1032
+ let t = Math.min(1, (e - r) / i), o = 1 - (1 - t) ** 3;
1033
+ T(no, t >= 1 ? null : {
1034
+ from: n,
1035
+ t: o
1036
+ }, !0), t < 1 && (io = requestAnimationFrame(a));
1037
+ };
1038
+ io = requestAnimationFrame(a);
1039
+ });
1040
+ });
1041
+ let ao = E(() => S(to) || Ve() ? "none" : S(eo)?.enter ?? "fade"), oo = E(() => S(G).lines.flatMap((e, t) => e.style?.gradient ? [{
1042
+ id: `${Ai}-grad-${t}`,
1043
+ ...e.style.gradient
1044
+ }] : [])), so = E(() => S(B).yAxis?.title ?? S(B).yAxisTitle), co = E(() => S(B).y2Axis?.title ?? S(B).y2AxisTitle), lo = E(() => S(B).xAxis?.title ?? S(B).xAxisTitle), uo = E(() => i(S(G))), fo = E(() => ({
1045
+ geo: S(G),
1046
+ scales: S(uo),
1047
+ xOf: S(uo)?.xOf ?? null,
1048
+ yOf: S(uo)?.yOf ?? null
1049
+ })), K = E(() => !Na.has(S(B).type)), po = E(() => S(B).type === "sunburst" || S(B).type === "radial-bar" || S(B).type === "radial-column" || S(B).type === "nightingale" || S(B).type === "chord"), mo = E(() => S(B).type === "bullet"), ho = E(() => (S(B).type === "radial-bar" || S(B).type === "radial-column" || S(B).type === "nightingale") && S(B).series.length === 1), go = E(() => S(B).type === "scatter"), _o = E(() => S(B).type === "heatmap"), vo = E(() => S(B).type === "funnel"), yo = E(() => S(B).type === "radar"), bo = E(() => S(B).type === "calendar"), xo = E(() => S(B).type === "gauge"), So = E(() => S(B).type === "treemap"), Co = E(() => S(B).type === "sankey"), q = E(() => S(G).orientation === "horizontal"), wo = E(() => (S(q) ? S(G).plot.h : S(G).plot.w) / Math.max(1, S(W).categories.length)), To = E(() => S(K) && !S(go) && !S(q) && S(wo) < 4 && S(W).categories.length > 1), Eo = E(() => I() ? I().i1 - I().i0 + 1 : S(B).categories.length), Do = E(() => S(_i).show && S(K) && !S(go) ? s(S(G), S(_i), (e, t) => wi(t)(e), {
1050
+ stacked: !!(S(B).stacked || S(B).stacked100),
1051
+ dense: S(To),
1052
+ share: !!S(B).stacked100
1053
+ }) : []), Oo = 1e3;
1054
+ function ko(e, t, n) {
1055
+ let r = n.ownerSVGElement ?? n;
1056
+ if (!r || typeof r.getBoundingClientRect != "function") return null;
1057
+ let i = r.getBoundingClientRect();
1058
+ if (!i.width || !i.height) return null;
1059
+ let a = r.viewBox?.baseVal, o = a && a.width ? a.width / i.width : 1, s = a && a.height ? a.height / i.height : 1;
1060
+ return {
1061
+ x: (e - i.left) * o + (a ? a.x : 0),
1062
+ y: (t - i.top) * s + (a ? a.y : 0)
1063
+ };
1064
+ }
1065
+ function Ao(e, t) {
1066
+ let n = ko(e, 0, t);
1067
+ if (!n) return null;
1068
+ let r = n.x, i = S(G).lines[0]?.points, a = S(W).categories.length;
1069
+ if (!i || i.length !== a) {
1070
+ let e = Math.floor((r - S(G).plot.x) / S(wo));
1071
+ return e >= 0 && e < a ? e : null;
1072
+ }
1073
+ let o = 0, s = i.length - 1;
1074
+ for (; o < s;) {
1075
+ let e = o + s >> 1;
1076
+ i[e].x < r ? o = e + 1 : s = e;
1077
+ }
1078
+ return o > 0 && Math.abs(i[o - 1].x - r) <= Math.abs(i[o].x - r) && --o, o;
1079
+ }
1080
+ let jo = x(0);
1081
+ function Mo(e) {
1082
+ if (qs(e, S(jo)) || Bs(e, S(jo))) return;
1083
+ let t = S(W).categories.length - 1, n = Math.max(1, Math.floor(t / 10)), r = S(jo);
1084
+ switch (e.key) {
1085
+ case "ArrowRight":
1086
+ case "ArrowDown":
1087
+ r = Math.min(t, S(jo) + 1);
1088
+ break;
1089
+ case "ArrowLeft":
1090
+ case "ArrowUp":
1091
+ r = Math.max(0, S(jo) - 1);
1092
+ break;
1093
+ case "Home":
1094
+ r = 0;
1095
+ break;
1096
+ case "End":
1097
+ r = t;
1098
+ break;
1099
+ case "PageDown":
1100
+ r = Math.min(t, S(jo) + n);
1101
+ break;
1102
+ case "PageUp":
1103
+ r = Math.max(0, S(jo) - n);
1104
+ break;
1105
+ case "Enter":
1106
+ case " ":
1107
+ e.preventDefault(), js(e, S(jo));
1108
+ return;
1109
+ default: return;
1110
+ }
1111
+ e.preventDefault(), T(jo, r, !0), xs(e.currentTarget, r);
1112
+ }
1113
+ let No = x(null), Po = E(() => S(Oi) ?? (He() ? S(No) : null)), J = (e) => S(Po) && S(Po) !== e ? .18 : 1, Fo = null;
1114
+ function Io(e) {
1115
+ f.onHover && (e === Fo || e !== null && Fo !== null && e.category === Fo.category && e.index === Fo.index && e.series === Fo.series && e.value === Fo.value || (Fo = e, f.onHover(e)));
1116
+ }
1117
+ let Y = E(() => Le() === "multi" ? "multi" : Le() ? "single" : null), Lo = (e, t, n, r) => e.category === t && e.series === n && (e.index === void 0 || r === void 0 || e.index === r), Ro = (e, t, n) => Re().some((r) => Lo(r, e, t, n)), zo = (e, t, n) => S(Y) && Re().length && !Ro(e, t, n) ? .35 : 1;
1118
+ function Bo(e, t, n, r) {
1119
+ if (!S(Y)) return;
1120
+ let i = r === void 0 ? {
1121
+ category: e,
1122
+ series: t
1123
+ } : {
1124
+ category: e,
1125
+ series: t,
1126
+ index: r
1127
+ }, a = S(Y) === "multi" || !!(n && (n.ctrlKey || n.metaKey || n.shiftKey)), o;
1128
+ o = Ro(e, t, r) ? a ? Re().filter((n) => !Lo(n, e, t, r)) : [] : a ? [...Re(), i] : [i], Re(o), f.onSelectionChange?.(o);
1129
+ }
1130
+ let X = x(null), Vo = x(""), Ho = E(() => S(B).type === "heatmap" || S(B).type === "calendar" || S(B).type === "gauge" ? [] : S(B).type === "pie" || S(ho) ? S(Ja).map((e, t) => ({
1131
+ label: e,
1132
+ color: S(B).categoryColors?.[e] ?? S(W).series[0]?.colors?.[t] ?? S(ki)[t % S(ki).length],
1133
+ off: S(Ti).has(e)
1134
+ })) : S(B).type === "sunburst" || S(B).type === "chord" ? S(G).legend.map((e) => ({
1135
+ label: e.label,
1136
+ color: e.color,
1137
+ off: !1
1138
+ })) : S(ji).map((e) => ({
1139
+ label: e.label,
1140
+ color: e.color,
1141
+ off: S(Ti).has(e.label)
1142
+ }))), Uo = E(() => L() ? L() === !0 ? [
1143
+ "1W",
1144
+ "1M",
1145
+ "3M",
1146
+ "6M",
1147
+ "YTD",
1148
+ "1Y",
1149
+ "All"
1150
+ ] : L() : []), Wo = E(() => S(Uo).length > 0 && S(K) && (S(B).xType === "time" || S(B).xType === "ordinal-time" || S(B).xAxis?.type === "time" || S(B).xAxis?.type === "ordinal-time")), Go = (e) => typeof e == "string" ? e : e.label;
1151
+ function Ko(e) {
1152
+ Li(De(S(B).categories, e));
1153
+ }
1154
+ let qo = E(() => S(B).type !== "sunburst" && S(B).type !== "chord"), Jo = x(!1), Yo = E(() => S(Ho).length > 10), Xo = E(() => S(Yo) && !S(Jo) ? S(Ho).slice(0, 10) : S(Ho)), Zo = E(() => S(B).type === "pie" ? S(G).slices.every((e) => e.value <= 0) : S(B).type === "scatter" ? S(G).scatterPoints.length === 0 : S(B).type === "heatmap" ? S(G).heatmapCells.length === 0 : S(B).type === "funnel" ? S(G).funnelSegments.length === 0 : S(B).type === "radar" ? S(G).radarSeries.length === 0 : S(B).type === "calendar" ? S(G).calendarCells.length === 0 : S(B).type === "gauge" ? !S(G).gauge : S(B).type === "treemap" ? S(G).treemapCells.length === 0 : S(B).type === "sankey" ? S(G).sankeyNodes.length === 0 : S(Aa) ? S(G).candles.length === 0 : S(B).type === "boxplot" ? S(G).boxes.length === 0 : S(po) ? S(G).arcs.length === 0 : S(mo) ? S(G).bullets.length === 0 : S(G).bars.length === 0 && S(G).stems.length === 0 && S(G).lines.every((e) => e.points.every((e) => !e.defined))), Qo = null;
1155
+ function $o(e) {
1156
+ if (!y() || !S(qo)) return;
1157
+ if (S(Ei) != null) {
1158
+ Qo = {
1159
+ label: S(Ei),
1160
+ at: Date.now()
1161
+ }, T(Ei, null);
1162
+ return;
1163
+ }
1164
+ let t = new Set(S(Ti));
1165
+ t.has(e) ? t.delete(e) : t.add(e), T(Ti, t, !0);
1166
+ }
1167
+ function es(e) {
1168
+ if (!y() || !S(qo)) return;
1169
+ let t = Qo;
1170
+ Qo = null;
1171
+ let n = new Set(S(Ti));
1172
+ if (n.delete(e), t && t.label === e && Date.now() - t.at < 600) {
1173
+ T(Ti, n, !0);
1174
+ return;
1175
+ }
1176
+ T(Ti, n, !0), T(Ei, S(Ei) === e ? null : e, !0);
1177
+ }
1178
+ let ts = (e, t) => Number.isFinite(e) ? wi(t)(e) : "", ns = E(() => {
1179
+ if (S(B).type === "pie") {
1180
+ let e = S(qa) ? S(W).series[0] : S(ji)[0];
1181
+ return {
1182
+ cols: ["Category", "Value"],
1183
+ rows: S(Ja).map((t, n) => [t, ts(e?.values[n])])
1184
+ };
1185
+ }
1186
+ if (S(go)) {
1187
+ let e = [];
1188
+ for (let t of S(ji)) for (let n of t.points ?? []) e.push([
1189
+ t.label,
1190
+ V(n.x),
1191
+ V(n.y),
1192
+ n.r == null ? "" : V(n.r)
1193
+ ]);
1194
+ return {
1195
+ cols: [
1196
+ "Series",
1197
+ "X",
1198
+ "Y",
1199
+ "Size"
1200
+ ],
1201
+ rows: e
1202
+ };
1203
+ }
1204
+ if (S(po)) return {
1205
+ cols: [
1206
+ S(B).type === "chord" ? "Group" : "Category",
1207
+ "Series",
1208
+ "Value"
1209
+ ],
1210
+ rows: S(G).arcs.map((e) => [
1211
+ e.nodePath ? e.nodePath.join(" / ") : e.label,
1212
+ e.series,
1213
+ V(e.value)
1214
+ ])
1215
+ };
1216
+ if (S(mo)) return {
1217
+ cols: [
1218
+ "Category",
1219
+ "Value",
1220
+ "Target"
1221
+ ],
1222
+ rows: S(G).bullets.map((e) => [
1223
+ e.label,
1224
+ V(e.value),
1225
+ e.target == null ? "" : V(e.target)
1226
+ ])
1227
+ };
1228
+ if (S(Aa)) {
1229
+ let e = [];
1230
+ for (let t of S(ji)) (t.ohlc ?? []).forEach((n, r) => {
1231
+ n && e.push([
1232
+ S(B).categories[r] ?? String(r),
1233
+ t.label,
1234
+ V(n.o),
1235
+ V(n.h),
1236
+ V(n.l),
1237
+ V(n.c)
1238
+ ]);
1239
+ });
1240
+ return {
1241
+ cols: [
1242
+ "Date",
1243
+ "Series",
1244
+ "Open",
1245
+ "High",
1246
+ "Low",
1247
+ "Close"
1248
+ ],
1249
+ rows: e
1250
+ };
1251
+ }
1252
+ if (S(B).type === "waterfall") {
1253
+ let e = S(ji)[0];
1254
+ return {
1255
+ cols: ["Category", e?.label ?? "Value"],
1256
+ rows: S(B).categories.map((t, n) => {
1257
+ let r = S(G).bars.find((e) => e.index === n);
1258
+ return [t, r ? V(r.value) : ts(e?.values[n])];
1259
+ })
1260
+ };
1261
+ }
1262
+ return {
1263
+ cols: ["Category", ...S(ji).map((e) => e.label)],
1264
+ rows: S(B).categories.map((e, t) => [e, ...S(ji).map((e) => ts(e.values[t], e.label))])
1265
+ };
1266
+ }), rs = E(() => S(ns).rows.length > Oo), is = E(() => S(rs) ? S(ns).rows.slice(0, Oo) : S(ns).rows);
1267
+ function as(e, t = 12) {
1268
+ return e.length > t ? e.slice(0, t - 1) + "…" : e;
1269
+ }
1270
+ let os = (e, t) => f.formatValue ? f.formatValue(e) : t, ss = x(null);
1271
+ function cs(e) {
1272
+ if (!e) return !1;
1273
+ let t = 0, n = 0, r = 0, i = e.trim().startsWith("#") ? e.trim().slice(1) : "";
1274
+ if (i.length === 6) t = parseInt(i.slice(0, 2), 16), n = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
1275
+ else {
1276
+ let i = /rgba?\(([^)]+)\)/.exec(e);
1277
+ if (!i) return !1;
1278
+ let a = i[1].split(",").map((e) => parseFloat(e));
1279
+ t = a[0] ?? 0, n = a[1] ?? 0, r = a[2] ?? 0;
1280
+ }
1281
+ return .299 * t + .587 * n + .114 * r < 128;
1282
+ }
1283
+ ue(() => {
1284
+ if (!S(ss) || typeof window > "u") return;
1285
+ let e = S(ss), t = () => {
1286
+ let t = getComputedStyle(e);
1287
+ T(Qa, cs(t.getPropertyValue("--sg-bg")), !0);
1288
+ let r = [];
1289
+ for (let e = 1; e <= 8; e += 1) {
1290
+ let i = t.getPropertyValue(`--sg-chart-${e}`).trim();
1291
+ r.push(i || n[e - 1]);
1292
+ }
1293
+ (!S(Di) || r.some((e, t) => e !== S(Di)[t])) && T(Di, r.some((e, t) => e !== n[t]) ? r : null, !0);
1294
+ };
1295
+ t();
1296
+ let r = new MutationObserver(t);
1297
+ return r.observe(document.documentElement, {
1298
+ attributes: !0,
1299
+ attributeFilter: [
1300
+ "data-theme",
1301
+ "class",
1302
+ "style"
1303
+ ]
1304
+ }), () => r.disconnect();
1305
+ });
1306
+ let ls = x(null), us = x(null), ds = x(null);
1307
+ function Z(e, t, n, r, i) {
1308
+ if (!y() || !S(ss) || r.length === 0 || S(us) && S(ls)) return;
1309
+ let a = S(ss).getBoundingClientRect(), o = {
1310
+ category: n,
1311
+ index: -1,
1312
+ rows: r,
1313
+ ...i
1314
+ }, s = f.tooltipFormat?.(o), c = Se() !== "follow", l, u;
1315
+ if (c && S(Xi)) {
1316
+ let e = S(Xi).getBoundingClientRect(), t = e.width / (S(G).width || 1), n = e.height / (S(G).height || 1), r = Se() === "top-right" || Se() === "bottom-right", i = Se() === "bottom-left" || Se() === "bottom-right";
1317
+ l = e.left - a.left + (r ? (S(G).plot.x + S(G).plot.w) * t - 8 : S(G).plot.x * t + 8), u = e.top - a.top + (i ? (S(G).plot.y + S(G).plot.h) * n - 8 : S(G).plot.y * n + 8);
1318
+ } else l = Math.max(70, Math.min(a.width - 70, e - a.left)), u = t - a.top;
1319
+ T(ls, {
1320
+ left: l,
1321
+ top: u,
1322
+ below: !c && u < 44,
1323
+ fixed: c,
1324
+ title: s?.title ?? n,
1325
+ rows: s?.rows ?? r,
1326
+ ctx: o
1327
+ }, !0), Io({
1328
+ category: o.category,
1329
+ index: o.index,
1330
+ series: o.series ?? null,
1331
+ value: o.value ?? null
1332
+ });
1333
+ }
1334
+ function fs(e, t) {
1335
+ let n = null, r = Infinity;
1336
+ for (let i of S(G).lines) {
1337
+ let a = i.points[e];
1338
+ if (!a?.defined) continue;
1339
+ let o = Math.abs(a.y - t);
1340
+ o < r && (r = o, n = i.label);
1341
+ }
1342
+ for (let i of S(G).bars) {
1343
+ if (i.label !== S(W).categories[e]) continue;
1344
+ let a = t < i.y ? i.y - t : t > i.y + i.h ? t - (i.y + i.h) : 0;
1345
+ a < r && (r = a, n = i.series);
1346
+ }
1347
+ for (let i of S(G).candles) {
1348
+ if (i.label !== S(W).categories[e]) continue;
1349
+ let a = t < i.yHigh ? i.yHigh - t : t > i.yLow ? t - i.yLow : 0;
1350
+ a < r && (r = a, n = i.series);
1351
+ }
1352
+ return n === null ? null : {
1353
+ label: n,
1354
+ distance: r
1355
+ };
1356
+ }
1357
+ function ps(t) {
1358
+ let n = [];
1359
+ if (S(B).type === "waterfall") {
1360
+ let e = S(G).bars.find((e) => e.index === t), r = S(W).series[0];
1361
+ return e && r && n.push({
1362
+ label: r.label,
1363
+ color: e.color,
1364
+ value: V(e.value)
1365
+ }), n;
1366
+ }
1367
+ for (let e of S(W).series) {
1368
+ let r = e.color, i = e.ohlc?.[t];
1369
+ if (i) {
1370
+ n.push({
1371
+ label: `${e.label} O`,
1372
+ color: r,
1373
+ value: V(i.o)
1374
+ }), n.push({
1375
+ label: `${e.label} H`,
1376
+ value: V(i.h)
1377
+ }), n.push({
1378
+ label: `${e.label} L`,
1379
+ value: V(i.l)
1380
+ }), n.push({
1381
+ label: `${e.label} C`,
1382
+ value: V(i.c)
1383
+ });
1384
+ continue;
1385
+ }
1386
+ let a = e.boxes?.[t];
1387
+ if (a) {
1388
+ n.push({
1389
+ label: `${e.label} max`,
1390
+ color: r,
1391
+ value: V(a.max)
1392
+ }), n.push({
1393
+ label: `${e.label} Q3`,
1394
+ value: V(a.q3)
1395
+ }), n.push({
1396
+ label: `${e.label} median`,
1397
+ value: V(a.median)
1398
+ }), n.push({
1399
+ label: `${e.label} Q1`,
1400
+ value: V(a.q1)
1401
+ }), n.push({
1402
+ label: `${e.label} min`,
1403
+ value: V(a.min)
1404
+ }), a.outliers?.length && n.push({
1405
+ label: `${e.label} outliers`,
1406
+ value: String(a.outliers.length)
1407
+ });
1408
+ continue;
1409
+ }
1410
+ let o = e.values[t], s = wi(e.label), c = e.lowValues?.[t];
1411
+ if (Number.isFinite(o) && Number.isFinite(c)) {
1412
+ n.push({
1413
+ label: e.label,
1414
+ color: r,
1415
+ value: `${s(c)} to ${s(o)}`
1416
+ });
1417
+ continue;
1418
+ }
1419
+ let l = e.targets?.[t];
1420
+ if (Number.isFinite(o) && Number.isFinite(l)) {
1421
+ n.push({
1422
+ label: e.label,
1423
+ color: r,
1424
+ value: s(o)
1425
+ }), n.push({
1426
+ label: `${e.label} target`,
1427
+ value: s(l)
1428
+ });
1429
+ continue;
1430
+ }
1431
+ if (Number.isFinite(o)) {
1432
+ n.push({
1433
+ label: e.label,
1434
+ color: r,
1435
+ value: s(o)
1436
+ });
1437
+ let i = e.errors?.[t];
1438
+ if (i != null) {
1439
+ let t = typeof i == "number" ? o - Math.abs(i) : Math.min(i.lo, i.hi), r = typeof i == "number" ? o + Math.abs(i) : Math.max(i.lo, i.hi);
1440
+ Number.isFinite(t) && Number.isFinite(r) && n.push({
1441
+ label: `${e.label} range`,
1442
+ value: `${s(t)} - ${s(r)}`
1443
+ });
1444
+ }
1445
+ }
1446
+ }
1447
+ for (let r of S(G).overlays) {
1448
+ let i = r.points[t];
1449
+ if (!i?.defined) continue;
1450
+ let a = S(W).series.find((e) => e.overlay && r.label === `${e.label} (${e.overlay})`);
1451
+ if (!a?.overlay) continue;
1452
+ let o = r.r2 === void 0 ? "" : ` (${et(S(z).rSquared, { value: r.r2.toFixed(2) })})`;
1453
+ n.push({
1454
+ label: `${a.label} ${e(a.overlay)}`,
1455
+ color: r.color,
1456
+ value: `${wi(a.label)(i.value)}${o}`
1457
+ });
1458
+ }
1459
+ return n;
1460
+ }
1461
+ let ms = x(null);
1462
+ function hs(e) {
1463
+ let t = S(G).axes?.y, n = t ? Math.abs(t.max - t.min) : 100, r = n >= 100 ? 0 : n >= 10 ? 1 : n >= 1 ? 2 : 3, i = Number(e.toFixed(r)), a = S(B).yAxis;
1464
+ return a?.formatter ? a.formatter(i, -1) : a?.format ? d(i, a.format, S(B)) : os(i, V(i));
1465
+ }
1466
+ let gs = E(() => S(B).xType === "time" || S(B).xType === "ordinal-time" || S(B).xAxis?.type === "time" || S(B).xAxis?.type === "ordinal-time"), _s = E(() => S(gs) ? t(S(W).categories.map((e) => Date.parse(e))) : "day"), vs = (e) => {
1467
+ let t = Date.parse(e);
1468
+ return Number.isFinite(t) ? r(t) : e;
1469
+ };
1470
+ function ys(e) {
1471
+ let t = S(W).categories[e] ?? "";
1472
+ if (!S(gs)) return t;
1473
+ let n = Date.parse(t);
1474
+ return Number.isFinite(n) ? S(B).xAxis?.formatter ? S(B).xAxis.formatter(n, e) : r(n, S(_s)) : t;
1475
+ }
1476
+ function bs(e, t, n, r) {
1477
+ T(ds, n, !0);
1478
+ let i = ea({
1479
+ clientX: e,
1480
+ clientY: t
1481
+ })?.y;
1482
+ T(ms, i != null && Number.isFinite(i) && i >= S(G).plot.y && i <= S(G).plot.y + S(G).plot.h ? i : null, !0);
1483
+ let a = S(W).categories[n] ?? "", o = ps(n), s, c, l = S(X) && S(W).series.some((e) => e.label === S(X)) ? S(X) : null;
1484
+ if (l) s = l, c = S(W).series.find((e) => e.label === l)?.values[n], o = o.filter((e) => e.label === l || e.label?.startsWith(l + " "));
1485
+ else {
1486
+ let i = r ? ko(e, t, r) : ea({
1487
+ clientX: e,
1488
+ clientY: t
1489
+ }), a = i && Number.isFinite(i.y) ? fs(n, i.y) : null;
1490
+ T(No, a && a.distance <= 18 ? a.label : null, !0), k() === "single" && a && r && (s = a.label, c = S(W).series.find((e) => e.label === a.label)?.values[n], o = o.filter((e) => e.label === a.label || e.label?.startsWith(a.label + " ")));
1491
+ }
1492
+ if (Z(e, t, ys(n), o, {
1493
+ category: a,
1494
+ index: n,
1495
+ series: s,
1496
+ value: c
1497
+ }), f.syncGroup && !S(Vi)) {
1498
+ let e = Date.parse(a);
1499
+ je(f.syncGroup, {
1500
+ label: a,
1501
+ index: (I() ? I().i0 : 0) + n,
1502
+ time: Number.isFinite(e) ? e : null,
1503
+ from: Ri
1504
+ });
1505
+ }
1506
+ }
1507
+ function xs(e, t) {
1508
+ let n = e.getBoundingClientRect();
1509
+ if (bs(n.left + n.width / 2, n.top + 12, t), !ze()) return;
1510
+ let r = ys(t);
1511
+ if (S(X)) {
1512
+ let e = S(W).series.find((e) => e.label === S(X))?.values[t];
1513
+ T(Vo, et(S(z).seriesAtCategory, {
1514
+ series: S(X),
1515
+ value: Number.isFinite(e) ? wi(S(X))(e) : S(z).noValue,
1516
+ category: r
1517
+ }), !0);
1518
+ } else T(Vo, `${r}: ${ps(t).map((e) => `${e.label ?? ""} ${e.value}`).join(", ")}`);
1519
+ }
1520
+ function Q() {
1521
+ S(us) || (T(ds, null), T(ms, null), T(No, null), T(ls, null), Io(null), f.syncGroup && !S(Vi) && S(Bi)?.hover?.from === Ri && je(f.syncGroup, null));
1522
+ }
1523
+ ue(() => {
1524
+ if (!S(Bi)) return;
1525
+ let e = S(Bi).hover;
1526
+ ae(() => {
1527
+ if (!e) {
1528
+ S(Vi) && (T(Vi, !1), T(ds, null), T(ls, null));
1529
+ return;
1530
+ }
1531
+ if (e.from === Ri) return;
1532
+ let t = S(W).categories.indexOf(e.label);
1533
+ if (t < 0 && e.time != null && (t = ke(S(W).categories, e.time)), t < 0 || !S(Xi) || !S(uo)) return;
1534
+ T(Vi, !0);
1535
+ let n = S(Xi).getBoundingClientRect(), r = n.width / S(G).width, i = n.height / S(G).height, a = S(uo).xOf(t);
1536
+ bs(n.left + a * r, n.top + (S(G).plot.y + 12) * i, t), T(Vi, !0);
1537
+ });
1538
+ }), ue(() => {
1539
+ if (!S(Bi)) return;
1540
+ let e = S(Bi).zoom;
1541
+ ae(() => {
1542
+ if (!e || e.from === Ri) return;
1543
+ let t = S(B).categories.length, n = e.window;
1544
+ if (n && e.count !== t) {
1545
+ if (!e.labels) return;
1546
+ let r = ke(S(B).categories, Date.parse(e.labels[0])), i = ke(S(B).categories, Date.parse(e.labels[1]));
1547
+ if (r < 0 || i < 0) return;
1548
+ n = r === 0 && i === t - 1 ? null : {
1549
+ i0: Math.min(r, i),
1550
+ i1: Math.max(r, i)
1551
+ };
1552
+ }
1553
+ zi = !0;
1554
+ try {
1555
+ Li(n);
1556
+ } finally {
1557
+ zi = !1;
1558
+ }
1559
+ });
1560
+ });
1561
+ function Ss(e, t, n, r, i) {
1562
+ Z(e, t, n, [{ value: `${V(r)} · ${i.toFixed(1)}%` }], {
1563
+ series: n,
1564
+ value: r
1565
+ });
1566
+ }
1567
+ function Cs(t, n, r) {
1568
+ T(No, r.series, !0);
1569
+ let i = [{
1570
+ label: "x",
1571
+ value: V(r.x)
1572
+ }, {
1573
+ label: "y",
1574
+ value: V(r.y)
1575
+ }], a = S(W).series.find((e) => e.label === r.series && e.overlay), o = a?.overlay ? S(G).overlays.find((e) => e.label === `${a.label} (${a.overlay})`) : void 0;
1576
+ if (a?.overlay && o) {
1577
+ let t = o.r2 === void 0 ? "" : ` (${et(S(z).rSquared, { value: o.r2.toFixed(2) })})`;
1578
+ i.push({
1579
+ label: e(a.overlay),
1580
+ color: o.color,
1581
+ value: `${o.equation ?? ""}${t}`
1582
+ });
1583
+ }
1584
+ Z(t, n, r.label || r.series, i, {
1585
+ series: r.series,
1586
+ value: r.y
1587
+ });
1588
+ }
1589
+ function ws(e, t, n) {
1590
+ Z(e, t, `${n.rowLabel} · ${n.colLabel}`, [{
1591
+ color: n.color,
1592
+ value: V(n.value)
1593
+ }]);
1594
+ }
1595
+ function Ts(e, t, n) {
1596
+ let r = [{ value: V(n.value) }, {
1597
+ label: "conversion",
1598
+ value: `${(n.conversion * 100).toFixed(1)}%`
1599
+ }];
1600
+ n.dropoff > 0 && r.push({
1601
+ label: "drop-off",
1602
+ value: `${(n.dropoff * 100).toFixed(1)}%`
1603
+ }), Z(e, t, n.label, r, { value: n.value });
1604
+ }
1605
+ function Es(e, t, n) {
1606
+ T(No, S(ho) || S(B).type === "sunburst" || S(B).type === "chord" ? n.label : n.series, !0), Z(e, t, n.series ? `${n.label} \u00b7 ${n.series}` : n.label, [{
1607
+ color: n.color,
1608
+ value: V(n.value)
1609
+ }], {
1610
+ category: n.label,
1611
+ series: n.series || void 0,
1612
+ value: n.value
1613
+ });
1614
+ }
1615
+ function Ds(e, t, n) {
1616
+ Z(e, t, `${n.source} \u2192 ${n.target}`, [{
1617
+ color: n.color,
1618
+ value: V(n.value)
1619
+ }], {
1620
+ category: n.source,
1621
+ series: n.target,
1622
+ value: n.value
1623
+ });
1624
+ }
1625
+ function Os(e, t, n) {
1626
+ T(No, n.series, !0);
1627
+ let r = [{
1628
+ color: n.color,
1629
+ label: n.series,
1630
+ value: V(n.value)
1631
+ }];
1632
+ n.target != null && r.push({
1633
+ label: "target",
1634
+ value: V(n.target)
1635
+ }), Z(e, t, n.label, r, {
1636
+ category: n.label,
1637
+ series: n.series,
1638
+ value: n.value
1639
+ });
1640
+ }
1641
+ function ks(e, t, n) {
1642
+ T(No, n.series, !0);
1643
+ let r = [{
1644
+ color: n.color,
1645
+ label: n.series,
1646
+ value: n.dumbbell && n.value2 != null ? `${V(n.value2)} to ${V(n.value)}` : V(n.value)
1647
+ }];
1648
+ Z(e, t, n.label, r, {
1649
+ category: n.label,
1650
+ series: n.series,
1651
+ value: n.value
1652
+ });
1653
+ }
1654
+ function As(e, t, n, r, i, a) {
1655
+ T(No, n, !0), Z(e, t, `${n} · ${r}`, [{
1656
+ color: a,
1657
+ value: V(i)
1658
+ }], {
1659
+ category: r,
1660
+ series: n,
1661
+ value: i
1662
+ });
1663
+ }
1664
+ function js(e, t) {
1665
+ if (S(la)) return;
1666
+ Ce() && "clientX" in e && !S(xi) && (S(us) && S(us).index === t ? Da() : (T(us, null), bs(e.clientX, e.clientY, t, e.currentTarget), Oa(t)));
1667
+ let n = S(W).categories[t] ?? "";
1668
+ if (!S(Y)) {
1669
+ Ms(n, "", 0, t, e);
1670
+ return;
1671
+ }
1672
+ let r = "clientX" in e ? ea(e) : null, i = r ? fs(t, r.y) : null, a = S(X) ?? i?.label ?? (S(W).series.length === 1 ? S(W).series[0].label : "");
1673
+ Ms(n, a, S(W).series.find((e) => e.label === a)?.values[t] ?? 0, t, e);
1674
+ }
1675
+ function Ms(e, t, n, r, i) {
1676
+ if (Bo(e, t, i, r), S(xi) && f.onAnnotate && r !== void 0) {
1677
+ let i = t ? n : S(W).series[0]?.values[r];
1678
+ f.onAnnotate({
1679
+ category: e,
1680
+ index: r,
1681
+ value: Number.isFinite(i) ? i : 0
1682
+ });
1683
+ return;
1684
+ }
1685
+ let a;
1686
+ if (r !== void 0) {
1687
+ let e = [];
1688
+ for (let n of S(W).series) {
1689
+ if (!n.rowIds || t && n.label !== t) continue;
1690
+ let i = n.rowIds[r];
1691
+ i?.length && e.push(i);
1692
+ }
1693
+ e.length && (a = e.flat());
1694
+ }
1695
+ let o = {
1696
+ category: e,
1697
+ series: t,
1698
+ value: n,
1699
+ rowIds: a
1700
+ };
1701
+ f.onSelect?.(o), a && a.length && f.onDrill?.(o);
1702
+ }
1703
+ function Ns(e, t) {
1704
+ let n = e.ownerSVGElement ?? e.closest("svg");
1705
+ if (!n) return;
1706
+ let r = n.querySelector(`[data-cat-index="${t}"]`);
1707
+ r && (r.focus?.(), xs(r, t));
1708
+ }
1709
+ function Ps(e, t) {
1710
+ if (qs(e, t)) return;
1711
+ let n = S(W).categories.length - 1, r = e.currentTarget;
1712
+ if (Bs(e, t)) return;
1713
+ let i = S(q) ? "ArrowDown" : "ArrowRight", a = S(q) ? "ArrowUp" : "ArrowLeft", o = S(q) ? "ArrowRight" : "ArrowUp", s = S(q) ? "ArrowLeft" : "ArrowDown";
1714
+ switch (e.key) {
1715
+ case i:
1716
+ e.preventDefault(), Ns(r, Math.min(n, t + 1));
1717
+ return;
1718
+ case a:
1719
+ e.preventDefault(), Ns(r, Math.max(0, t - 1));
1720
+ return;
1721
+ case o:
1722
+ case s: {
1723
+ e.preventDefault();
1724
+ let n = S(W).series.map((e) => e.label);
1725
+ if (!n.length) return;
1726
+ let i = (S(X) ? n.indexOf(S(X)) : -1) + (e.key === s ? 1 : -1);
1727
+ T(X, i < 0 || i >= n.length ? null : n[i], !0), T(Oi, S(X), !0), xs(r, t);
1728
+ return;
1729
+ }
1730
+ case "Home":
1731
+ e.preventDefault(), Ns(r, 0);
1732
+ return;
1733
+ case "End":
1734
+ e.preventDefault(), Ns(r, n);
1735
+ return;
1736
+ case "PageDown":
1737
+ e.preventDefault(), Ns(r, Math.min(n, t + Math.max(1, Math.floor(n / 10))));
1738
+ return;
1739
+ case "PageUp":
1740
+ e.preventDefault(), Ns(r, Math.max(0, t - Math.max(1, Math.floor(n / 10))));
1741
+ return;
1742
+ case "Enter":
1743
+ case " ":
1744
+ if (!f.onSelect && !S(Y)) return;
1745
+ e.preventDefault(), js(e, t);
1746
+ return;
1747
+ case "Escape":
1748
+ S(X) && (T(X, null), T(Oi, null), xs(r, t));
1749
+ return;
1750
+ }
1751
+ }
1752
+ let Fs = x(fe({
1753
+ sel: "",
1754
+ i: 0
1755
+ })), Is = (e, t) => y() ? (S(Fs).sel === e ? S(Fs).i : 0) === t ? 0 : -1 : void 0;
1756
+ function Ls(e, t) {
1757
+ (S(Fs).sel !== e || S(Fs).i !== t) && T(Fs, {
1758
+ sel: e,
1759
+ i: t
1760
+ }, !0);
1761
+ }
1762
+ function Rs(e, t, n, r, i) {
1763
+ if (e.key === "Enter" || e.key === " ") {
1764
+ r && (e.preventDefault(), r());
1765
+ return;
1766
+ }
1767
+ let a = e.currentTarget, o = a.ownerSVGElement ?? a.closest("svg");
1768
+ if (!o) return;
1769
+ let s = o.querySelectorAll(t), c = s.length;
1770
+ if (!c) return;
1771
+ let l = i && i.colMajor ? i.cols : 1, u = i ? i.colMajor ? 1 : i.cols : 1, d;
1772
+ switch (e.key) {
1773
+ case "ArrowRight":
1774
+ d = n + l;
1775
+ break;
1776
+ case "ArrowLeft":
1777
+ d = n - l;
1778
+ break;
1779
+ case "ArrowDown":
1780
+ d = n + u;
1781
+ break;
1782
+ case "ArrowUp":
1783
+ d = n - u;
1784
+ break;
1785
+ case "Home":
1786
+ d = 0;
1787
+ break;
1788
+ case "End":
1789
+ d = c - 1;
1790
+ break;
1791
+ case "PageDown":
1792
+ d = n + Math.max(1, Math.floor(c / 10));
1793
+ break;
1794
+ case "PageUp":
1795
+ d = n - Math.max(1, Math.floor(c / 10));
1796
+ break;
1797
+ default: return;
1798
+ }
1799
+ e.preventDefault(), d = Math.max(0, Math.min(c - 1, d)), d !== n && (T(Fs, {
1800
+ sel: t,
1801
+ i: d
1802
+ }, !0), s[d].focus?.());
1803
+ }
1804
+ let zs = (e) => {
1805
+ let t = e.getBoundingClientRect();
1806
+ return {
1807
+ x: t.left + t.width / 2,
1808
+ y: t.top
1809
+ };
1810
+ };
1811
+ function Bs(e, t) {
1812
+ if (!S(vi) || !S(K)) return !1;
1813
+ let n = S(B).categories.length, r = (I()?.i0 ?? 0) + t, i, a = S(q) ? "ArrowDown" : "ArrowRight", o = S(q) ? "ArrowUp" : "ArrowLeft";
1814
+ if (e.key === "+" || e.key === "=") i = we(I(), n, r, .8);
1815
+ else if (e.key === "-" || e.key === "_") i = we(I(), n, r, 1.25);
1816
+ else if (e.key === "0") i = null;
1817
+ else if (e.shiftKey && I() && (e.key === a || e.key === o)) {
1818
+ let t = I().i1 - I().i0 + 1;
1819
+ i = Te(I(), n, (e.key === a ? 1 : -1) * Math.max(1, Math.floor(t / 10)));
1820
+ }
1821
+ if (i === void 0) return !1;
1822
+ e.preventDefault(), Li(i);
1823
+ let s = Math.max(0, Math.min(i ? i.i1 - i.i0 : n - 1, r - (i?.i0 ?? 0)));
1824
+ return xe().then(() => {
1825
+ let e = S(Xi)?.querySelector(S(To) ? "[data-dense=\"true\"]" : `[data-cat-index="${s}"]`);
1826
+ e && (e.focus?.(), S(To) && T(jo, s, !0), xs(e, s));
1827
+ }), !0;
1828
+ }
1829
+ function Vs(e) {
1830
+ let t = S(B).categories.length;
1831
+ if (!t) return;
1832
+ let n = I() ?? {
1833
+ i0: 0,
1834
+ i1: t - 1
1835
+ }, r = n.i1 - n.i0 + 1, i = (n.i0 + n.i1) / 2, a = e.shiftKey ? r : Math.max(1, Math.floor(r / 10)), o;
1836
+ switch (e.key) {
1837
+ case "ArrowRight":
1838
+ o = Te(I(), t, a);
1839
+ break;
1840
+ case "ArrowLeft":
1841
+ o = Te(I(), t, -a);
1842
+ break;
1843
+ case "ArrowUp":
1844
+ case "+":
1845
+ case "=":
1846
+ o = we(I(), t, i, .8);
1847
+ break;
1848
+ case "ArrowDown":
1849
+ case "-":
1850
+ case "_":
1851
+ o = we(I(), t, i, 1.25);
1852
+ break;
1853
+ case "Home":
1854
+ o = I() ? {
1855
+ ...I(),
1856
+ i0: 0,
1857
+ i1: r - 1
1858
+ } : null;
1859
+ break;
1860
+ case "End":
1861
+ o = I() ? {
1862
+ ...I(),
1863
+ i0: t - r,
1864
+ i1: t - 1
1865
+ } : null;
1866
+ break;
1867
+ case "0":
1868
+ case "Escape":
1869
+ o = null;
1870
+ break;
1871
+ default: return;
1872
+ }
1873
+ e.preventDefault(), Li(o);
1874
+ }
1875
+ let Hs = x("idle"), Us = x(null), Ws = x(null);
1876
+ function Gs(e) {
1877
+ if (!R()) return;
1878
+ e.preventDefault();
1879
+ let t = S(K) && !S(go) ? Ao(e.clientX, e.currentTarget) : null;
1880
+ Ks(e.clientX, e.clientY, t);
1881
+ }
1882
+ function Ks(e, t, n) {
1883
+ let r = n == null ? {} : {
1884
+ category: S(W).categories[n],
1885
+ index: (I() ? I().i0 : 0) + n,
1886
+ ...S(X) ? {
1887
+ series: S(X),
1888
+ value: S(W).series.find((e) => e.label === S(X))?.values[n]
1889
+ } : {}
1890
+ }, i = () => T(Us, {
1891
+ x: e,
1892
+ y: t,
1893
+ target: r
1894
+ }, !0);
1895
+ S(Ws) ? i() : import("./SvChartMenu-CBMKm7Xb.js").then((e) => {
1896
+ T(Ws, e.default, !0), i();
1897
+ });
1898
+ }
1899
+ function qs(e, t) {
1900
+ if (!R() || !(e.key === "ContextMenu" || e.key === "F10" && e.shiftKey)) return !1;
1901
+ e.preventDefault();
1902
+ let n = e.currentTarget.getBoundingClientRect();
1903
+ return Ks(n.left + n.width / 2, n.top + Math.min(n.height / 2, 24), t), !0;
1904
+ }
1905
+ let Js = E(() => {
1906
+ if (!S(Us)) return [];
1907
+ let e = [
1908
+ {
1909
+ label: S(z).downloadPng,
1910
+ onSelect: () => {
1911
+ Qs("png");
1912
+ }
1913
+ },
1914
+ {
1915
+ label: S(z).downloadSvg,
1916
+ onSelect: () => {
1917
+ Qs("svg");
1918
+ }
1919
+ },
1920
+ {
1921
+ label: S(z).downloadPdf,
1922
+ onSelect: () => {
1923
+ $s();
1924
+ }
1925
+ },
1926
+ ...Xe(S(B)) ? [{
1927
+ label: S(z).downloadCsv,
1928
+ onSelect: () => {
1929
+ Ze(S(B));
1930
+ }
1931
+ }] : [],
1932
+ {
1933
+ label: S(z).copyAsImage,
1934
+ onSelect: () => {
1935
+ tc();
1936
+ }
1937
+ },
1938
+ {
1939
+ label: S(z).print,
1940
+ onSelect: () => {
1941
+ ec();
1942
+ }
1943
+ },
1944
+ ...Be() && S(Ye) ? [{
1945
+ label: S(z).describeChart,
1946
+ onSelect: () => {
1947
+ Qe();
1948
+ }
1949
+ }] : []
1950
+ ];
1951
+ Oe() && S(Ii) && e.push({ separator: !0 }, {
1952
+ label: S(z).resetZoom,
1953
+ onSelect: Ui
1954
+ }), S(Wo) && e.push({ separator: !0 }, {
1955
+ label: S(z).range,
1956
+ children: S(Uo).map((e) => ({
1957
+ label: Go(e),
1958
+ onSelect: () => Ko(e)
1959
+ }))
1960
+ }), S(qo) && S(Ho).length > 1 && e.push({ separator: !0 }, {
1961
+ label: S(z).series,
1962
+ children: S(Ho).map((e) => ({
1963
+ label: `${e.off ? " " : "✓"} ${e.label}`,
1964
+ onSelect: () => $o(e.label)
1965
+ }))
1966
+ });
1967
+ let t = typeof R() == "function" ? R()(S(Us).target) : Array.isArray(R()) ? R() : [];
1968
+ return t.length && e.push({ separator: !0 }, ...t), e;
1969
+ });
1970
+ function Ys() {
1971
+ if (!S(Xi)) return null;
1972
+ let e = S(Xi).cloneNode(!0);
1973
+ e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
1974
+ let t = S(Xi).getBoundingClientRect();
1975
+ t.width && e.setAttribute("width", String(Math.round(t.width))), t.height && e.setAttribute("height", String(Math.round(t.height)));
1976
+ let n = document.createElement("style"), r = Array.from(document.styleSheets), i = [];
1977
+ for (let e of r) try {
1978
+ for (let t of Array.from(e.cssRules ?? [])) {
1979
+ let e = t.cssText;
1980
+ e.includes(".sv-grid-chart") && i.push(e);
1981
+ }
1982
+ } catch {}
1983
+ if (n.textContent = i.join("\n"), e.insertBefore(n, e.firstChild), S(ss) && typeof getComputedStyle == "function") {
1984
+ let t = getComputedStyle(S(ss)), n = [
1985
+ "--sg-bg",
1986
+ "--sg-fg",
1987
+ "--sg-muted",
1988
+ "--sg-border",
1989
+ "--sg-accent",
1990
+ "--sg-chart-bg",
1991
+ "--sg-chart-font-scale"
1992
+ ].map((e) => {
1993
+ let n = t.getPropertyValue(e).trim();
1994
+ return n ? `${e}:${n}` : "";
1995
+ }).filter(Boolean);
1996
+ t.fontFamily && n.push(`font-family:${t.fontFamily}`), n.length && e.setAttribute("style", n.join(";"));
1997
+ }
1998
+ return new XMLSerializer().serializeToString(e);
1999
+ }
2000
+ function Xs(e, t) {
2001
+ let n = URL.createObjectURL(e), r = document.createElement("a");
2002
+ r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
2003
+ }
2004
+ async function Zs(e) {
2005
+ return new Promise((t) => {
2006
+ let n = S(Xi)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? S(G).width)), i = Math.max(1, Math.round(n?.height ?? S(G).height)), a = window.devicePixelRatio || 1, o = document.createElement("canvas");
2007
+ o.width = r * a, o.height = i * a;
2008
+ let s = o.getContext("2d");
2009
+ if (!s) {
2010
+ t(null);
2011
+ return;
2012
+ }
2013
+ let c = new Image();
2014
+ c.onload = () => {
2015
+ s.scale(a, a), s.drawImage(c, 0, 0, r, i), o.toBlob((e) => t(e), "image/png");
2016
+ }, c.onerror = () => t(null), c.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(e);
2017
+ });
2018
+ }
2019
+ async function Qs(e) {
2020
+ let t = Ys();
2021
+ if (!t) return;
2022
+ let n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
2023
+ if (e === "svg") {
2024
+ Xs(new Blob([t], { type: "image/svg+xml" }), `chart-${n}.svg`);
2025
+ return;
2026
+ }
2027
+ let r = await Zs(t);
2028
+ r && Xs(r, `chart-${n}.png`);
2029
+ }
2030
+ async function $s() {
2031
+ if (!S(ss)) return;
2032
+ let e = await import("./chart-export-pdf-BirUdchl.js"), t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
2033
+ await e.downloadChartPdf(S(ss), `chart-${t}.pdf`, {
2034
+ title: S(B).title,
2035
+ subtitle: S(B).subtitle,
2036
+ caption: S(B).caption
2037
+ });
2038
+ }
2039
+ async function ec() {
2040
+ S(ss) && (await import("./chart-export-pdf-BirUdchl.js")).printChart(S(ss), { title: S(B).title });
2041
+ }
2042
+ async function tc() {
2043
+ let e = Ys();
2044
+ if (!e) {
2045
+ T(Hs, "err");
2046
+ return;
2047
+ }
2048
+ try {
2049
+ let t = await Zs(e);
2050
+ if (!t) throw Error("rasterize failed");
2051
+ let n = window.ClipboardItem;
2052
+ n && navigator.clipboard?.write ? await navigator.clipboard.write([new n({ "image/png": t })]) : await navigator.clipboard.writeText(e), T(Hs, "ok");
2053
+ } catch {
2054
+ T(Hs, "err");
2055
+ }
2056
+ setTimeout(() => T(Hs, "idle"), 1500);
2057
+ }
2058
+ var nc = {
2059
+ zoomTo: Hi,
2060
+ resetZoom: Ui
2061
+ }, rc = ti();
2062
+ let ic;
2063
+ {
2064
+ let e = (e) => {
2065
+ var t = it(), n = M(t), r = M(n, !0);
2066
+ O(n);
2067
+ var i = w(n, 2);
2068
+ P(i, 17, Ie, C, (e, t, n) => {
2069
+ var r = rt(), i = w(_(r), 2), a = (e) => {
2070
+ var n = tt(), r = M(n, !0);
2071
+ O(n), h(() => b(r, S(t))), A(e, n);
2072
+ }, o = (e) => {
2073
+ var r = nt(), i = M(r, !0);
2074
+ O(r), h(() => b(i, S(t))), g("click", r, () => Xa(Ie().slice(0, n + 1))), A(e, r);
2075
+ };
2076
+ m(i, (e) => {
2077
+ n === Ie().length - 1 ? e(a) : e(o, -1);
2078
+ }), A(e, r);
2079
+ }), O(t), h(() => {
2080
+ D(t, "aria-label", S(z).drillPath), b(r, S(Ua)?.name || S(z).drillRoot);
2081
+ }), g("click", n, () => Xa([])), A(e, t);
2082
+ };
2083
+ var ac = M(rc), oc = (t) => {
2084
+ var n = pt(), r = M(n), i = (t) => {
2085
+ e(t);
2086
+ };
2087
+ m(r, (e) => {
2088
+ S(Wa) && Ie().length && e(i);
2089
+ });
2090
+ var a = w(r, 2), o = (e) => {
2091
+ var t = ot();
2092
+ P(t, 21, () => S(Uo), (e) => Go(e), (e, t) => {
2093
+ var n = at(), r = M(n, !0);
2094
+ O(n), h((e, t) => {
2095
+ D(n, "title", e), b(r, t);
2096
+ }, [() => et(S(z).showLast, { preset: Go(S(t)) }), () => Go(S(t))]), g("click", n, () => Ko(S(t))), A(e, n);
2097
+ }), O(t), h(() => D(t, "aria-label", S(z).dateRange)), A(e, t);
2098
+ };
2099
+ m(a, (e) => {
2100
+ S(Wo) && e(o);
2101
+ });
2102
+ var s = w(a, 2), c = (e) => {
2103
+ var t = st();
2104
+ let n;
2105
+ var r = w(M(t));
2106
+ O(t), h(() => {
2107
+ n = F(t, 1, "sv-grid-chart-tool svelte-kvdein", null, n, { "is-on": S(yi) }), D(t, "aria-pressed", S(yi)), D(t, "title", S(z).panTitle), b(r, ` ${S(z).pan ?? ""}`);
2108
+ }), g("click", t, () => T(yi, !S(yi))), A(e, t);
2109
+ };
2110
+ m(s, (e) => {
2111
+ S(vi) && (S(vi).pan === "mode" || S(vi).pan === !0) && S(Ii) && e(c);
2112
+ });
2113
+ var l = w(s, 2), u = (e) => {
2114
+ var t = ct(), n = w(M(t));
2115
+ O(t), h(() => {
2116
+ D(t, "title", S(z).resetZoomTitle), b(n, ` ${S(z).resetZoom ?? ""}`);
2117
+ }), g("click", t, Ui), A(e, t);
2118
+ };
2119
+ m(l, (e) => {
2120
+ Oe() && S(Ii) && e(u);
2121
+ });
2122
+ var d = w(l, 2), ee = (e) => {
2123
+ var t = lt();
2124
+ let n;
2125
+ var r = w(M(t));
2126
+ O(t), h(() => {
2127
+ n = F(t, 1, "sv-grid-chart-tool svelte-kvdein", null, n, { "is-on": S(xi) }), D(t, "aria-pressed", S(xi)), D(t, "title", S(xi) ? S(z).annotateOnTitle : S(z).annotateOffTitle), b(r, ` ${S(z).annotate ?? ""}`);
2128
+ }), g("click", t, () => T(xi, !S(xi))), A(e, t);
2129
+ };
2130
+ m(d, (e) => {
2131
+ qe() && e(ee);
2132
+ });
2133
+ var te = w(d, 2), ne = (e) => {
2134
+ var t = ft(), n = M(t);
2135
+ P(n, 16, () => S(ca), (e) => e, (e, t) => {
2136
+ var n = ut();
2137
+ let r;
2138
+ var i = M(n, !0);
2139
+ O(n), h((e) => {
2140
+ r = F(n, 1, "sv-grid-chart-tool sv-grid-chart-drawtool svelte-kvdein", null, r, { "is-on": S(la) === t }), D(n, "aria-pressed", S(la) === t), D(n, "title", e), b(i, S(sa)[t]);
2141
+ }, [() => et(S(z).draw, { tool: S(sa)[t] })]), g("click", n, () => xa(t)), A(e, n);
2142
+ });
2143
+ var r = w(n, 2), i = (e) => {
2144
+ var t = dt(), n = _(t), r = M(n, !0);
2145
+ O(n);
2146
+ var i = w(n, 2), a = M(i, !0);
2147
+ O(i), h(() => {
2148
+ n.disabled = !S(da), D(n, "title", S(z).deleteDrawingTitle), b(r, S(z).deleteDrawing), D(i, "title", S(z).clearDrawingsTitle), b(a, S(z).clearDrawings);
2149
+ }), g("click", n, () => S(da) && wa(S(da))), g("click", i, () => ba([])), A(e, t);
2150
+ }, a = E(() => _a().length);
2151
+ m(r, (e) => {
2152
+ S(a) && e(i);
2153
+ }), O(t), h(() => D(t, "aria-label", S(z).drawingTools)), A(e, t);
2154
+ };
2155
+ m(te, (e) => {
2156
+ S(ca).length && S(K) && e(ne);
2157
+ });
2158
+ var re = w(te, 2), ie = M(re, !0);
2159
+ O(re);
2160
+ var f = w(re, 2), p = M(f, !0);
2161
+ O(f);
2162
+ var ae = w(f, 2), oe = M(ae, !0);
2163
+ O(ae);
2164
+ var se = w(ae, 2), ce = M(se, !0);
2165
+ O(se);
2166
+ var v = w(se, 2), y = M(v, !0);
2167
+ O(v), O(n), h(() => {
2168
+ D(re, "title", S(z).downloadPng), b(ie, S(z).png), D(f, "title", S(z).downloadSvg), b(p, S(z).svg), D(ae, "title", S(z).downloadPdf), b(oe, S(z).pdf), D(se, "title", S(z).printTitle), b(ce, S(z).print), D(v, "title", S(z).copyTitle), b(y, S(Hs) === "ok" ? S(z).copied : S(z).copy);
2169
+ }), g("click", re, () => Qs("png")), g("click", f, () => Qs("svg")), g("click", ae, $s), g("click", se, ec), g("click", v, tc), ge(n, "clientHeight", (e) => T(ui, e)), A(t, n);
2170
+ }, sc = (t) => {
2171
+ var n = mt(), r = M(n);
2172
+ e(r), O(n), ge(n, "clientHeight", (e) => T(ui, e)), A(t, n);
2173
+ };
2174
+ m(ac, (e) => {
2175
+ S(bi) ? e(oc) : S(Wa) && Ie().length && e(sc, 1);
2176
+ });
2177
+ var $ = w(ac, 2);
2178
+ let t, n;
2179
+ var cc = M($), lc = (e) => {
2180
+ var t = xt(), n = M(t), r = (e) => {
2181
+ var t = ht(), n = M(t);
2182
+ let r;
2183
+ O(t), h(() => {
2184
+ D(t, "id", `${Ai}-plot`), D(n, "x", S(G).plot.x - 4), D(n, "y", S(G).plot.y - 4), D(n, "width", S(G).plot.w + 8), D(n, "height", S(G).plot.h + 8), r = F(n, 0, "svelte-kvdein", null, r, { "sv-grid-chart-wipe": S(ao) === "wipe" });
2185
+ }), A(e, t);
2186
+ };
2187
+ m(n, (e) => {
2188
+ S(K) && e(r);
2189
+ });
2190
+ var i = w(n);
2191
+ P(i, 17, () => S(oo), (e) => e.id, (e, t) => {
2192
+ var n = gt(), r = M(n), i = w(r);
2193
+ O(n), h(() => {
2194
+ D(n, "id", S(t).id), D(r, "stop-color", S(t).from), D(i, "stop-color", S(t).to === "transparent" ? S(t).from : S(t).to), D(i, "stop-opacity", S(t).to === "transparent" ? 0 : 1);
2195
+ }), A(e, n);
2196
+ });
2197
+ var a = w(i);
2198
+ P(a, 17, () => S(Pi), (e) => e.id, (e, t) => {
2199
+ var n = p(), r = _(n), i = (e) => {
2200
+ var n = _t(), r = M(n);
2201
+ _e(), O(n), h(() => {
2202
+ D(n, "id", S(t).id), D(r, "fill", S(t).color);
2203
+ }), A(e, n);
2204
+ }, a = (e) => {
2205
+ var n = vt(), r = M(n);
2206
+ _e(), O(n), h(() => {
2207
+ D(n, "id", S(t).id), D(r, "fill", S(t).color);
2208
+ }), A(e, n);
2209
+ }, o = (e) => {
2210
+ var n = yt(), r = M(n);
2211
+ _e(), O(n), h(() => {
2212
+ D(n, "id", S(t).id), D(r, "fill", S(t).color);
2213
+ }), A(e, n);
2214
+ }, s = (e) => {
2215
+ var n = bt(), r = M(n);
2216
+ _e(), O(n), h(() => {
2217
+ D(n, "id", S(t).id), D(r, "fill", S(t).color);
2218
+ }), A(e, n);
2219
+ };
2220
+ m(r, (e) => {
2221
+ S(t).kind === "stripe" ? e(i) : S(t).kind === "crosshatch" ? e(a, 1) : S(t).kind === "dots" ? e(o, 2) : S(t).kind === "diagonal" && e(s, 3);
2222
+ }), A(e, n);
2223
+ }), O(t), A(e, t);
2224
+ };
2225
+ m(cc, (e) => {
2226
+ (S(Pi).length || S(oo).length || S(K)) && e(lc);
2227
+ });
2228
+ var uc = w(cc), dc = (e) => {
2229
+ var t = St(), n = M(t, !0);
2230
+ O(t), h(() => {
2231
+ D(t, "x", S(G).frame.title.x), D(t, "y", S(G).frame.title.y), b(n, S(G).frame.title.text);
2232
+ }), A(e, t);
2233
+ };
2234
+ m(uc, (e) => {
2235
+ S(G).frame.title && e(dc);
2236
+ });
2237
+ var fc = w(uc), pc = (e) => {
2238
+ var t = Ct(), n = M(t, !0);
2239
+ O(t), h(() => {
2240
+ D(t, "x", S(G).frame.subtitle.x), D(t, "y", S(G).frame.subtitle.y), b(n, S(G).frame.subtitle.text);
2241
+ }), A(e, t);
2242
+ };
2243
+ m(fc, (e) => {
2244
+ S(G).frame.subtitle && e(pc);
2245
+ });
2246
+ var mc = w(fc), hc = (e) => {
2247
+ var t = wt(), n = M(t, !0);
2248
+ O(t), h(() => {
2249
+ D(t, "x", S(G).frame.caption.x), D(t, "y", S(G).frame.caption.y), b(n, S(G).frame.caption.text);
2250
+ }), A(e, t);
2251
+ };
2252
+ m(mc, (e) => {
2253
+ S(G).frame.caption && e(hc);
2254
+ });
2255
+ var gc = w(mc), _c = (e) => {
2256
+ var t = jt(), n = _(t);
2257
+ P(n, 17, () => S(G).valueTicks, (e) => e.label + e.x, (e, t, n, r) => {
2258
+ var i = Et(), a = _(i), o = (e) => {
2259
+ var n = Tt();
2260
+ h(() => {
2261
+ D(n, "x1", S(t).x), D(n, "y1", S(G).plot.y), D(n, "x2", S(t).x), D(n, "y2", S(G).plot.y + S(G).plot.h);
2262
+ }), A(e, n);
2263
+ };
2264
+ m(a, (e) => {
2265
+ S(G).grid.x && e(o);
2266
+ });
2267
+ var s = w(a), c = M(s, !0);
2268
+ O(s), h(() => {
2269
+ D(s, "x", S(t).x), D(s, "y", S(G).plot.y + S(G).plot.h + 14), b(c, S(t).label);
2270
+ }), A(e, i);
2271
+ });
2272
+ var r = w(n), i = (e) => {
2273
+ var t = p(), n = _(t);
2274
+ P(n, 17, () => S(G).catTicks, (e) => e.value, (e, t, n, r) => {
2275
+ var i = Dt();
2276
+ h(() => {
2277
+ D(i, "x1", S(G).plot.x), D(i, "y1", S(t).y), D(i, "x2", S(G).plot.x + S(G).plot.w), D(i, "y2", S(t).y);
2278
+ }), A(e, i);
2279
+ }), A(e, t);
2280
+ };
2281
+ m(r, (e) => {
2282
+ S(G).grid.y && e(i);
2283
+ });
2284
+ var a = w(r);
2285
+ P(a, 17, () => S(G).catTicks, (e) => e.value, (e, t, n, r) => {
2286
+ var i = Ot(), a = M(i, !0);
2287
+ O(i), h((e) => {
2288
+ D(i, "x", S(G).plot.x - 6), D(i, "y", S(t).y + 3), b(a, e);
2289
+ }, [() => as(S(t).label, 18)]), A(e, i);
2290
+ });
2291
+ var o = w(a), s = (e) => {
2292
+ var t = kt();
2293
+ D(t, "x", 13);
2294
+ var n = M(t, !0);
2295
+ O(t), h(() => {
2296
+ D(t, "y", S(G).plot.y + S(G).plot.h / 2), D(t, "transform", `rotate(-90 13 ${S(G).plot.y + S(G).plot.h / 2})`), b(n, S(so));
2297
+ }), A(e, t);
2298
+ };
2299
+ m(o, (e) => {
2300
+ S(so) && e(s);
2301
+ });
2302
+ var c = w(o), l = (e) => {
2303
+ var t = At(), n = M(t, !0);
2304
+ O(t), h(() => {
2305
+ D(t, "x", S(G).plot.x + S(G).plot.w / 2), D(t, "y", S(G).height - 3 - S(G).frame.bottom), b(n, S(lo));
2306
+ }), A(e, t);
2307
+ };
2308
+ m(c, (e) => {
2309
+ S(lo) && e(l);
2310
+ }), A(e, t);
2311
+ }, vc = (e) => {
2312
+ var t = Wt(), n = _(t);
2313
+ P(n, 17, () => S(G).yTicks, (e) => e.value, (e, t, n, r) => {
2314
+ var i = Pt(), a = _(i), o = (e) => {
2315
+ var n = Mt();
2316
+ let r;
2317
+ h(() => {
2318
+ r = F(n, 0, "sv-grid-chart-gridline svelte-kvdein", null, r, { "is-zero": S(t).value === 0 }), D(n, "x1", S(G).plot.x), D(n, "y1", S(t).y), D(n, "x2", S(G).plot.x + S(G).plot.w), D(n, "y2", S(t).y);
2319
+ }), A(e, n);
2320
+ };
2321
+ m(a, (e) => {
2322
+ (S(G).grid.y || S(t).value === 0) && e(o);
2323
+ });
2324
+ var s = w(a), c = (e) => {
2325
+ var n = Nt(), r = M(n, !0);
2326
+ O(n), h((e) => {
2327
+ D(n, "x", S(G).plot.x - 6), D(n, "y", S(t).y + 3), b(r, e);
2328
+ }, [() => os(S(t).value, S(t).label)]), A(e, n);
2329
+ };
2330
+ m(s, (e) => {
2331
+ S(t).label && e(c);
2332
+ }), A(e, i);
2333
+ });
2334
+ var r = w(n), i = (e) => {
2335
+ var t = p(), n = _(t);
2336
+ P(n, 17, () => S(G).xTicks, (e) => e.label + e.x, (e, t, n, r) => {
2337
+ var i = Ft();
2338
+ h(() => {
2339
+ D(i, "x1", S(t).x), D(i, "y1", S(G).plot.y), D(i, "x2", S(t).x), D(i, "y2", S(G).plot.y + S(G).plot.h);
2340
+ }), A(e, i);
2341
+ }), A(e, t);
2342
+ };
2343
+ m(r, (e) => {
2344
+ S(G).grid.x && e(i);
2345
+ });
2346
+ var a = w(r), o = (e) => {
2347
+ var t = p(), n = _(t);
2348
+ P(n, 17, () => S(G).y2Ticks, (e) => e.value, (e, t, n, r) => {
2349
+ var i = p(), a = _(i), o = (e) => {
2350
+ var n = It(), r = M(n, !0);
2351
+ O(n), h((e) => {
2352
+ D(n, "x", S(G).plot.x + S(G).plot.w + 6), D(n, "y", S(t).y + 3), b(r, e);
2353
+ }, [() => os(S(t).value, S(t).label)]), A(e, n);
2354
+ };
2355
+ m(a, (e) => {
2356
+ S(t).label && e(o);
2357
+ }), A(e, i);
2358
+ }), A(e, t);
2359
+ };
2360
+ m(a, (e) => {
2361
+ S(G).hasRightAxis && e(o);
2362
+ });
2363
+ var s = w(a);
2364
+ P(s, 17, () => S(G).xTicks, (e) => e.label + e.x, (e, t, n, r) => {
2365
+ var i = p(), a = _(i), o = (e) => {}, s = (e) => {
2366
+ var n = Lt(), r = M(n, !0);
2367
+ O(n), h((e) => {
2368
+ D(n, "x", S(t).x), D(n, "y", S(G).plot.y + S(G).plot.h + 12), D(n, "text-anchor", S(G).xLabelAngle < 0 ? "end" : "start"), D(n, "transform", `rotate(${S(G).xLabelAngle} ${S(t).x} ${S(G).plot.y + S(G).plot.h + 12})`), b(r, e);
2369
+ }, [() => as(S(t).label, Math.abs(S(G).xLabelAngle) >= 60 ? 18 : 12)]), A(e, n);
2370
+ }, c = (e) => {
2371
+ var n = Rt(), r = M(n, !0);
2372
+ O(n), h((e) => {
2373
+ D(n, "x", S(t).x), D(n, "y", S(G).plot.y + S(G).plot.h + 16), b(r, e);
2374
+ }, [() => as(S(t).label, 16)]), A(e, n);
2375
+ };
2376
+ m(a, (e) => {
2377
+ S(t).label ? S(G).xLabelRotated ? e(s, 1) : e(c, -1) : e(o);
2378
+ }), A(e, i);
2379
+ });
2380
+ var c = w(s);
2381
+ P(c, 17, () => S(G).categoryGroupTicks, (e) => e.label + e.x0, (e, t) => {
2382
+ let n = E(() => S(G).plot.y + S(G).plot.h + (S(G).xLabelRotated ? 46 : 32));
2383
+ var r = Bt(), i = _(r), a = w(i), o = (e) => {
2384
+ var r = zt();
2385
+ h(() => {
2386
+ D(r, "x1", S(t).x0), D(r, "y1", S(G).plot.y + S(G).plot.h), D(r, "x2", S(t).x0), D(r, "y2", S(n) - 9);
2387
+ }), A(e, r);
2388
+ };
2389
+ m(a, (e) => {
2390
+ S(t).x0 > S(G).plot.x + 1 && e(o);
2391
+ });
2392
+ var s = w(a), c = M(s, !0);
2393
+ O(s), h((e) => {
2394
+ D(i, "x1", S(t).x0 + 3), D(i, "y1", S(n) - 9), D(i, "x2", S(t).x1 - 3), D(i, "y2", S(n) - 9), D(s, "x", S(t).xCenter), D(s, "y", S(n)), b(c, e);
2395
+ }, [() => as(S(t).label, Math.max(4, Math.floor((S(t).x1 - S(t).x0) / 7)))]), A(e, r);
2396
+ });
2397
+ var l = w(c), u = (e) => {
2398
+ var t = Vt();
2399
+ D(t, "x", 13);
2400
+ var n = M(t, !0);
2401
+ O(t), h(() => {
2402
+ D(t, "y", S(G).plot.y + S(G).plot.h / 2), D(t, "transform", `rotate(-90 13 ${S(G).plot.y + S(G).plot.h / 2})`), b(n, S(so));
2403
+ }), A(e, t);
2404
+ };
2405
+ m(l, (e) => {
2406
+ S(so) && e(u);
2407
+ });
2408
+ var d = w(l), ee = (e) => {
2409
+ var t = Ht(), n = M(t, !0);
2410
+ O(t), h(() => {
2411
+ D(t, "x", S(G).width - 12), D(t, "y", S(G).plot.y + S(G).plot.h / 2), D(t, "transform", `rotate(90 ${S(G).width - 12} ${S(G).plot.y + S(G).plot.h / 2})`), b(n, S(co));
2412
+ }), A(e, t);
2413
+ };
2414
+ m(d, (e) => {
2415
+ S(co) && e(ee);
2416
+ });
2417
+ var te = w(d), ne = (e) => {
2418
+ var t = Ut(), n = M(t, !0);
2419
+ O(t), h(() => {
2420
+ D(t, "x", S(G).plot.x + S(G).plot.w / 2), D(t, "y", S(G).height - 3 - S(G).frame.bottom), b(n, S(lo));
2421
+ }), A(e, t);
2422
+ };
2423
+ m(te, (e) => {
2424
+ S(lo) && e(ne);
2425
+ }), A(e, t);
2426
+ };
2427
+ m(gc, (e) => {
2428
+ S(q) ? e(_c) : S(K) && e(vc, 1);
2429
+ });
2430
+ var yc = w(gc);
2431
+ P(yc, 17, () => S(G).referenceBands, C, (e, t) => {
2432
+ var n = qt(), r = _(n), i = w(r), a = (e) => {
2433
+ var n = p(), r = _(n), i = (e) => {
2434
+ var n = Gt(), r = M(n, !0);
2435
+ O(n), h(() => {
2436
+ D(n, "x", S(t).x + S(t).w - 3), D(n, "y", S(t).y + 10), D(n, "fill", S(t).color), b(r, S(t).label);
2437
+ }), A(e, n);
2438
+ }, a = (e) => {
2439
+ var n = Kt(), r = M(n, !0);
2440
+ O(n), h(() => {
2441
+ D(n, "x", S(t).x + S(t).w / 2), D(n, "y", S(t).y + 10), D(n, "fill", S(t).color), b(r, S(t).label);
2442
+ }), A(e, n);
2443
+ };
2444
+ m(r, (e) => {
2445
+ S(t).axis === "y" ? e(i) : e(a, -1);
2446
+ }), A(e, n);
2447
+ };
2448
+ m(i, (e) => {
2449
+ S(t).label && e(a);
2450
+ }), h(() => {
2451
+ D(r, "x", S(t).x), D(r, "y", S(t).y), D(r, "width", S(t).w), D(r, "height", S(t).h), D(r, "fill", S(t).color), D(r, "fill-opacity", S(t).opacity);
2452
+ }), A(e, n);
2453
+ });
2454
+ var bc = w(yc);
2455
+ let r;
2456
+ var xc = M(bc);
2457
+ P(xc, 19, () => S(G).lines, (e, t) => e.label + t, (e, t, n) => {
2458
+ let r = E(() => S(t).style?.gradient ? `${Ai}-grad-${S(n)}` : null);
2459
+ var i = en(), a = M(i), o = (e) => {
2460
+ var n = Jt();
2461
+ h(() => {
2462
+ D(n, "d", S(t).bandPath), D(n, "fill", S(t).color);
2463
+ }), A(e, n);
2464
+ };
2465
+ m(a, (e) => {
2466
+ S(t).bandPath && e(o);
2467
+ });
2468
+ var s = w(a), c = (e) => {
2469
+ var n = Yt();
2470
+ h(() => {
2471
+ D(n, "d", S(t).areaPath), D(n, "fill", S(r) ? `url(#${S(r)})` : S(Ni)[S(t).label] ?? S(t).color), D(n, "fill-opacity", S(r) ? .6 : S(t).range ? .35 : .15);
2472
+ }), A(e, n);
2473
+ };
2474
+ m(s, (e) => {
2475
+ S(t).areaPath && e(c);
2476
+ });
2477
+ var l = w(s), u = w(l), d = (e) => {
2478
+ let n = E(() => S(t).points[S(ds) ?? -1]);
2479
+ var r = p(), i = _(r), a = (e) => {
2480
+ var r = Xt();
2481
+ h(() => {
2482
+ D(r, "cx", S(n).x), D(r, "cy", S(n).y), D(r, "fill", S(n).marker?.color ?? S(t).color);
2483
+ }), A(e, r);
2484
+ };
2485
+ m(i, (e) => {
2486
+ S(n)?.defined && e(a);
2487
+ }), A(e, r);
2488
+ }, ee = (e) => {
2489
+ var n = p(), r = _(n);
2490
+ P(r, 17, () => S(t).points, C, (e, n, r) => {
2491
+ var i = p(), a = _(i), o = (e) => {
2492
+ let i = E(() => S(n).marker?.shape ?? "circle"), a = E(() => (S(n).marker?.size ?? 3) + +(S(ds) === r)), o = E(() => S(n).marker?.color ?? S(t).color);
2493
+ var s = p(), c = _(s), l = (e) => {
2494
+ var i = Zt();
2495
+ let s;
2496
+ h((e, t) => {
2497
+ s = F(i, 0, "sv-grid-chart-dot svelte-kvdein", null, s, e), D(i, "cx", S(n).x), D(i, "cy", S(n).y), D(i, "r", S(a)), D(i, "fill", S(o)), N(i, t);
2498
+ }, [() => ({
2499
+ "is-active": S(ds) === r,
2500
+ "is-selected": Ro(S(n).label, S(t).label)
2501
+ }), () => `opacity:${zo(S(n).label, S(t).label)}`]), A(e, i);
2502
+ }, u = (e) => {
2503
+ var t = Qt();
2504
+ let s;
2505
+ h((e) => {
2506
+ s = F(t, 0, "sv-grid-chart-dot is-stroked svelte-kvdein", null, s, { "is-active": S(ds) === r }), D(t, "d", e), D(t, "stroke", S(o));
2507
+ }, [() => ie(S(i), S(n).x, S(n).y, S(a))]), A(e, t);
2508
+ }, d = (e) => {
2509
+ var t = $t();
2510
+ let s;
2511
+ h((e) => {
2512
+ s = F(t, 0, "sv-grid-chart-dot svelte-kvdein", null, s, { "is-active": S(ds) === r }), D(t, "d", e), D(t, "fill", S(o));
2513
+ }, [() => ie(S(i), S(n).x, S(n).y, S(a))]), A(e, t);
2514
+ };
2515
+ m(c, (e) => {
2516
+ S(i) === "circle" ? e(l) : S(i) === "cross" ? e(u, 1) : e(d, -1);
2517
+ }), A(e, s);
2518
+ };
2519
+ m(a, (e) => {
2520
+ S(n).defined && S(n).marker?.shape !== "none" && e(o);
2521
+ }), A(e, i);
2522
+ }), A(e, n);
2523
+ };
2524
+ m(u, (e) => {
2525
+ S(To) ? e(d) : e(ee, -1);
2526
+ }), O(i), h((e) => {
2527
+ N(i, e), D(l, "d", S(t).path), D(l, "stroke", S(t).color), D(l, "stroke-width", S(t).style?.strokeWidth ?? (S(t).range ? 1 : 2)), D(l, "stroke-dasharray", S(t).style?.dash);
2528
+ }, [() => `opacity:${J(S(t).label) * (S(t).style?.opacity ?? 1)}`]), A(e, i);
2529
+ });
2530
+ var Sc = w(xc), Cc = (e) => {
2531
+ var t = p(), n = _(t);
2532
+ se(n, () => f.underlay, () => S(fo)), A(e, t);
2533
+ };
2534
+ m(Sc, (e) => {
2535
+ f.underlay && e(Cc);
2536
+ });
2537
+ var wc = w(Sc);
2538
+ P(wc, 17, () => S(G).bars, C, (e, t) => {
2539
+ var n = tn();
2540
+ let r;
2541
+ h((e, i, a) => {
2542
+ r = F(n, 0, "sv-grid-chart-bar svelte-kvdein", null, r, e), D(n, "x", S(t).x), D(n, "y", S(t).y), D(n, "width", S(t).w), D(n, "height", S(t).h), D(n, "fill", i), N(n, a);
2543
+ }, [
2544
+ () => ({ "is-selected": Ro(S(t).label, S(t).series, S(t).index) }),
2545
+ () => S(Ni)[S(t).series]?.startsWith("url(") ? S(Ni)[S(t).series] : S(t).color,
2546
+ () => `opacity:${J(S(t).series) * (S(t).opacity ?? 1) * zo(S(t).label, S(t).series, S(t).index)}`
2547
+ ]), g("click", n, function(...e) {
2548
+ (S(Y) ? (e) => {
2549
+ e.stopPropagation(), Ms(S(t).label, S(t).series, S(t).value, S(t).index, e);
2550
+ } : void 0)?.apply(this, e);
2551
+ }), A(e, n);
2552
+ });
2553
+ var Tc = w(wc);
2554
+ P(Tc, 17, () => S(G).stems, C, (e, t) => {
2555
+ var n = rn(), r = M(n), i = w(r), a = (e) => {
2556
+ var n = nn();
2557
+ h(() => {
2558
+ D(n, "cx", S(t).xCenter), D(n, "cy", S(t).y0), D(n, "r", S(t).r), D(n, "fill", S(t).color2 ?? S(t).color), D(n, "stroke", S(t).color2 ?? S(t).color);
2559
+ }), A(e, n);
2560
+ };
2561
+ m(i, (e) => {
2562
+ S(t).dumbbell && e(a);
2563
+ });
2564
+ var o = w(i);
2565
+ O(n), h((e) => {
2566
+ N(n, e), D(r, "x1", S(t).xCenter), D(r, "y1", S(t).y0), D(r, "x2", S(t).xCenter), D(r, "y2", S(t).y1), D(r, "stroke", S(t).dumbbell ? "var(--sg-muted, #94a3b8)" : S(t).color), D(r, "stroke-width", S(t).dumbbell ? 2 : 1.5), D(o, "cx", S(t).xCenter), D(o, "cy", S(t).y1), D(o, "r", S(t).r), D(o, "fill", S(t).color);
2567
+ }, [() => `opacity:${J(S(t).series)}`]), g("mousemove", n, (e) => ks(e.clientX, e.clientY, S(t))), v("mouseleave", n, Q), A(e, n);
2568
+ });
2569
+ var Ec = w(Tc);
2570
+ P(Ec, 17, () => S(G).candles, C, (e, t) => {
2571
+ var n = p(), r = _(n), i = (e) => {
2572
+ var n = an(), r = _(n), i = w(r), a = w(i);
2573
+ h((e, n, o) => {
2574
+ D(r, "x1", S(t).xCenter), D(r, "y1", S(t).yHigh), D(r, "x2", S(t).xCenter), D(r, "y2", S(t).yLow), D(r, "stroke", S(t).color), N(r, e), D(i, "x1", S(t).x), D(i, "y1", S(t).yOpen), D(i, "x2", S(t).xCenter), D(i, "y2", S(t).yOpen), D(i, "stroke", S(t).color), N(i, n), D(a, "x1", S(t).xCenter), D(a, "y1", S(t).yClose), D(a, "x2", S(t).x + S(t).w), D(a, "y2", S(t).yClose), D(a, "stroke", S(t).color), N(a, o);
2575
+ }, [
2576
+ () => `opacity:${J(S(t).series)}`,
2577
+ () => `opacity:${J(S(t).series)}`,
2578
+ () => `opacity:${J(S(t).series)}`
2579
+ ]), A(e, n);
2580
+ }, a = (e) => {
2581
+ var n = on(), r = _(n), i = w(r);
2582
+ h((e, n) => {
2583
+ D(r, "x1", S(t).xCenter), D(r, "y1", S(t).yHigh), D(r, "x2", S(t).xCenter), D(r, "y2", S(t).yLow), D(r, "stroke", S(t).color), N(r, e), D(i, "x", S(t).x), D(i, "y", S(t).bodyY), D(i, "width", S(t).w), D(i, "height", S(t).bodyH), D(i, "fill", S(t).hollow ? "none" : S(t).color), D(i, "stroke", S(t).color), N(i, n);
2584
+ }, [() => `opacity:${J(S(t).series)}`, () => `opacity:${J(S(t).series)}`]), A(e, n);
2585
+ };
2586
+ m(r, (e) => {
2587
+ S(ja) ? e(i) : e(a, -1);
2588
+ }), A(e, n);
2589
+ });
2590
+ var Dc = w(Ec);
2591
+ P(Dc, 17, () => S(G).boxes, C, (e, t) => {
2592
+ var n = cn(), r = _(n), i = w(r), a = w(i), o = w(a), s = w(o), c = w(s);
2593
+ P(c, 17, () => S(t).outliers, C, (e, n) => {
2594
+ var r = sn();
2595
+ h((e) => {
2596
+ D(r, "cx", S(t).xCenter), D(r, "cy", S(n).y), D(r, "stroke", S(t).color), N(r, e);
2597
+ }, [() => `opacity:${J(S(t).series)}`]), A(e, r);
2598
+ }), h((e, n, c, l, u) => {
2599
+ D(r, "x1", S(t).xCenter), D(r, "y1", S(t).yMax), D(r, "x2", S(t).xCenter), D(r, "y2", S(t).yMin), D(r, "stroke", S(t).color), N(r, e), D(i, "x1", S(t).x + S(t).w * .25), D(i, "y1", S(t).yMax), D(i, "x2", S(t).x + S(t).w * .75), D(i, "y2", S(t).yMax), D(i, "stroke", S(t).color), N(i, n), D(a, "x1", S(t).x + S(t).w * .25), D(a, "y1", S(t).yMin), D(a, "x2", S(t).x + S(t).w * .75), D(a, "y2", S(t).yMin), D(a, "stroke", S(t).color), N(a, c), D(o, "x", S(t).x), D(o, "y", S(t).boxY), D(o, "width", S(t).w), D(o, "height", S(t).boxH), D(o, "fill", S(t).color), D(o, "stroke", S(t).color), N(o, l), D(s, "x1", S(t).x), D(s, "y1", S(t).yMedian), D(s, "x2", S(t).x + S(t).w), D(s, "y2", S(t).yMedian), D(s, "stroke", S(t).color), N(s, u);
2600
+ }, [
2601
+ () => `opacity:${J(S(t).series)}`,
2602
+ () => `opacity:${J(S(t).series)}`,
2603
+ () => `opacity:${J(S(t).series)}`,
2604
+ () => `opacity:${J(S(t).series)}`,
2605
+ () => `opacity:${J(S(t).series)}`
2606
+ ]), A(e, n);
2607
+ });
2608
+ var Oc = w(Dc);
2609
+ P(Oc, 17, () => S(G).errorBars, C, (e, t) => {
2610
+ var n = ln(), r = _(n), i = w(r), a = w(i);
2611
+ h((e, n, o) => {
2612
+ D(r, "x1", S(t).xCenter), D(r, "y1", S(t).yHi), D(r, "x2", S(t).xCenter), D(r, "y2", S(t).yLo), D(r, "stroke", S(t).color), N(r, e), D(i, "x1", S(t).xCenter - S(t).cap), D(i, "y1", S(t).yHi), D(i, "x2", S(t).xCenter + S(t).cap), D(i, "y2", S(t).yHi), D(i, "stroke", S(t).color), N(i, n), D(a, "x1", S(t).xCenter - S(t).cap), D(a, "y1", S(t).yLo), D(a, "x2", S(t).xCenter + S(t).cap), D(a, "y2", S(t).yLo), D(a, "stroke", S(t).color), N(a, o);
2613
+ }, [
2614
+ () => `opacity:${J(S(t).series)}`,
2615
+ () => `opacity:${J(S(t).series)}`,
2616
+ () => `opacity:${J(S(t).series)}`
2617
+ ]), A(e, n);
2618
+ });
2619
+ var kc = w(Oc);
2620
+ P(kc, 17, () => S(G).scatterPoints, C, (e, t, n) => {
2621
+ var r = un();
2622
+ let i;
2623
+ h((e, n, a, o) => {
2624
+ i = F(r, 0, "sv-grid-chart-scatter svelte-kvdein", null, i, e), D(r, "cx", S(t).cx), D(r, "cy", S(t).cy), D(r, "r", S(t).r), D(r, "fill", S(t).color), D(r, "stroke", S(t).color), N(r, n), D(r, "role", S(Y) || f.onSelect ? "button" : "img"), D(r, "tabindex", a), D(r, "aria-label", o);
2625
+ }, [
2626
+ () => ({ "is-selected": Ro(S(t).label || S(t).series, S(t).series, n) }),
2627
+ () => `opacity:${J(S(t).series) * zo(S(t).label || S(t).series, S(t).series, n)}`,
2628
+ () => Is(".sv-grid-chart-scatter", n),
2629
+ () => `${S(t).label || S(t).series}: ${V(S(t).x)}, ${V(S(t).y)}`
2630
+ ]), g("mousemove", r, (e) => Cs(e.clientX, e.clientY, S(t))), v("mouseleave", r, Q), g("click", r, function(...e) {
2631
+ (S(Y) || f.onSelect ? (e) => {
2632
+ e.stopPropagation(), Ms(S(t).label || S(t).series, S(t).series, S(t).y, n, e);
2633
+ } : void 0)?.apply(this, e);
2634
+ }), v("focus", r, (e) => {
2635
+ Ls(".sv-grid-chart-scatter", n);
2636
+ let r = zs(e.currentTarget);
2637
+ Cs(r.x, r.y, S(t));
2638
+ }), v("blur", r, Q), g("keydown", r, (e) => Rs(e, ".sv-grid-chart-scatter", n, S(Y) || f.onSelect ? () => Ms(S(t).label || S(t).series, S(t).series, S(t).y, n, e) : null)), A(e, r);
2639
+ }), O(bc);
2640
+ var Ac = w(bc);
2641
+ P(Ac, 17, () => S(G).referenceLines, C, (e, t) => {
2642
+ var n = pn(), r = _(n), i = w(r), a = (e) => {
2643
+ let n = E(() => Math.max(28, S(t).label.length * 6.4 + 10));
2644
+ var r = dn(), i = M(r), a = w(i), o = M(a, !0);
2645
+ O(a), O(r), h(() => {
2646
+ D(i, "x", S(G).plot.x + S(G).plot.w - S(n)), D(i, "y", S(t).y - 8), D(i, "width", S(n)), D(i, "fill", S(t).color), D(a, "x", S(G).plot.x + S(G).plot.w - S(n) / 2), D(a, "y", S(t).y + 3.5), b(o, S(t).label);
2647
+ }), A(e, r);
2648
+ }, o = (e) => {
2649
+ var n = fn(), r = M(n, !0);
2650
+ O(n), h(() => {
2651
+ D(n, "x", S(G).plot.x + S(G).plot.w - 3), D(n, "y", S(t).y - 3), D(n, "fill", S(t).color), b(r, S(t).label);
2652
+ }), A(e, n);
2653
+ };
2654
+ m(i, (e) => {
2655
+ S(t).pill ? e(a) : e(o, -1);
2656
+ }), h(() => {
2657
+ D(r, "x1", S(G).plot.x), D(r, "y1", S(t).y), D(r, "x2", S(G).plot.x + S(G).plot.w), D(r, "y2", S(t).y), D(r, "stroke", S(t).color), D(r, "stroke-dasharray", S(t).dashed ? "5 4" : void 0);
2658
+ }), A(e, n);
2659
+ });
2660
+ var jc = w(Ac);
2661
+ P(jc, 17, () => S(G).referenceLinesV, C, (e, t) => {
2662
+ var n = mn(), r = _(n), i = w(r), a = M(i, !0);
2663
+ O(i), h(() => {
2664
+ D(r, "x1", S(t).x), D(r, "y1", S(G).plot.y), D(r, "x2", S(t).x), D(r, "y2", S(G).plot.y + S(G).plot.h), D(r, "stroke", S(t).color), D(r, "stroke-dasharray", S(t).dashed ? "5 4" : void 0), D(i, "x", S(t).x + 3), D(i, "y", S(G).plot.y + 9), D(i, "fill", S(t).color), b(a, S(t).label);
2665
+ }), A(e, n);
2666
+ });
2667
+ var Mc = w(jc);
2668
+ let i;
2669
+ P(Mc, 23, () => S(G).overlays, (e, t) => e.label + t, (e, t) => {
2670
+ var n = gn(), r = _(n), i = (e) => {
2671
+ var n = hn();
2672
+ h(() => {
2673
+ D(n, "d", S(t).bandPath), D(n, "fill", S(t).color), D(n, "stroke", S(t).color);
2674
+ }), A(e, n);
2675
+ };
2676
+ m(r, (e) => {
2677
+ S(t).bandPath && e(i);
2678
+ });
2679
+ var a = w(r);
2680
+ h(() => {
2681
+ D(a, "d", S(t).path), D(a, "stroke", S(t).color);
2682
+ }), A(e, n);
2683
+ }), O(Mc);
2684
+ var Nc = w(Mc);
2685
+ P(Nc, 17, () => S(Do), C, (e, t) => {
2686
+ var n = vn(), r = _(n), i = (e) => {
2687
+ var n = _n();
2688
+ h((e) => {
2689
+ D(n, "x1", S(t).leader.x1), D(n, "y1", S(t).leader.y1), D(n, "x2", S(t).leader.x2), D(n, "y2", S(t).leader.y2), N(n, e);
2690
+ }, [() => `opacity:${J(S(t).series)}`]), A(e, n);
2691
+ };
2692
+ m(r, (e) => {
2693
+ S(t).leader && e(i);
2694
+ });
2695
+ var a = w(r);
2696
+ let o;
2697
+ var s = M(a, !0);
2698
+ O(a), h((e) => {
2699
+ o = F(a, 0, "sv-grid-chart-datalabel svelte-kvdein", null, o, { "on-bar": S(t).onBar }), D(a, "x", S(t).x), D(a, "y", S(t).y), D(a, "text-anchor", S(t).anchor), D(a, "transform", S(t).angle ? `rotate(${S(t).angle} ${S(t).x} ${S(t).y})` : void 0), N(a, e), b(s, S(t).text);
2700
+ }, [() => `opacity:${J(S(t).series)}`]), A(e, n);
2701
+ });
2702
+ var Pc = w(Nc);
2703
+ P(Pc, 17, () => S(G).seriesLabels, (e) => e.series, (e, t) => {
2704
+ var n = yn(), r = M(n, !0);
2705
+ O(n), h((e) => {
2706
+ D(n, "x", S(t).x), D(n, "y", S(t).y + 3.5), D(n, "fill", S(t).color), N(n, e), b(r, S(t).text);
2707
+ }, [() => `opacity:${J(S(t).series)}`]), A(e, n);
2708
+ });
2709
+ var Fc = w(Pc), Ic = (e) => {
2710
+ var t = p(), n = _(t);
2711
+ se(n, () => f.overlay, () => S(fo)), A(e, t);
2712
+ };
2713
+ m(Fc, (e) => {
2714
+ f.overlay && e(Ic);
2715
+ });
2716
+ var Lc = w(Fc);
2717
+ P(Lc, 19, () => S(G).annotations, (e, t) => e.label + t, (e, t, n) => {
2718
+ let r = E(() => S(t).placement === "left" ? -8 : S(t).placement === "right" ? 8 : 0), i = E(() => S(t).placement === "bottom" ? 14 : S(t).placement === "top" ? -8 : 0), a = E(() => S(t).placement === "left" ? "end" : S(t).placement === "right" ? "start" : "middle"), o = E(() => S(xi) && !!f.onAnnotationRemove), s = E(() => Math.max(14, S(t).label.length * 6.2 + 8));
2719
+ var c = wn();
2720
+ let l;
2721
+ var u = M(c), d = (e) => {
2722
+ var n = bn(), r = _(n), i = w(r), a = w(i), o = M(a, !0);
2723
+ O(a), h(() => {
2724
+ D(r, "x1", S(t).x), D(r, "y1", S(t).y), D(r, "x2", S(t).x), D(r, "y2", S(t).y - 24), D(r, "stroke", S(t).color), D(i, "x", S(t).x), D(i, "y", S(t).y - 24), D(i, "width", S(s)), D(i, "fill", S(t).color), D(a, "x", S(t).x + S(s) / 2), D(a, "y", S(t).y - 14.5), b(o, S(t).label);
2725
+ }), A(e, n);
2726
+ }, ee = (e) => {
2727
+ var n = xn(), o = _(n), s = w(o), c = M(s, !0);
2728
+ O(s);
2729
+ var l = w(s), u = M(l, !0);
2730
+ O(l), h((e) => {
2731
+ D(o, "d", `M${S(t).x},${S(t).y} c-7,-9 -8,-13 -8,-16 a8,8 0 1,1 16,0 c0,3 -1,7 -8,16 z`), D(o, "fill", S(t).color), D(s, "x", S(t).x), D(s, "y", S(t).y - 12.5), b(c, e), D(l, "x", S(t).x + S(r)), D(l, "y", S(t).y + S(i)), D(l, "text-anchor", S(a)), D(l, "fill", S(t).color), b(u, S(t).label);
2732
+ }, [() => S(t).label.slice(0, 1)]), A(e, n);
2733
+ }, te = (e) => {
2734
+ var n = Sn(), o = _(n), s = w(o), c = M(s, !0);
2735
+ O(s), h(() => {
2736
+ D(o, "x", S(t).x - 4.5), D(o, "y", S(t).y - 4.5), D(o, "fill", S(t).color), D(s, "x", S(t).x + S(r)), D(s, "y", S(t).y + S(i)), D(s, "text-anchor", S(a)), D(s, "fill", S(t).color), b(c, S(t).label);
2737
+ }), A(e, n);
2738
+ }, ne = (e) => {
2739
+ var n = Cn(), s = _(n), c = w(s), l = M(c, !0);
2740
+ O(c), h(() => {
2741
+ D(s, "cx", S(t).x), D(s, "cy", S(t).y), D(s, "r", S(o) ? 6 : 4), D(s, "fill", S(t).color), D(c, "x", S(t).x + S(r)), D(c, "y", S(t).y + S(i)), D(c, "text-anchor", S(a)), D(c, "fill", S(t).color), b(l, S(t).label);
2742
+ }), A(e, n);
2743
+ };
2744
+ m(u, (e) => {
2745
+ S(t).shape === "flag" ? e(d) : S(t).shape === "pin" ? e(ee, 1) : S(t).shape === "square" ? e(te, 2) : e(ne, -1);
2746
+ }), O(c), h((e) => {
2747
+ l = F(c, 0, "sv-grid-chart-annotation-marker svelte-kvdein", null, l, {
2748
+ "is-removable": S(o),
2749
+ "has-text": !!S(t).text
2750
+ }), D(c, "role", S(o) ? "button" : S(t).text ? "img" : void 0), D(c, "tabindex", S(o) || S(t).text ? 0 : void 0), D(c, "aria-label", e);
2751
+ }, [() => S(o) ? et(S(z).removeNote, { label: S(t).label }) : S(t).text ? `${S(t).label}: ${S(t).text}` : void 0]), g("click", c, (e) => {
2752
+ !S(xi) || !f.onAnnotationRemove || (e.stopPropagation(), f.onAnnotationRemove(S(n)));
2753
+ }), g("keydown", c, (e) => {
2754
+ !S(xi) || !f.onAnnotationRemove || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), f.onAnnotationRemove(S(n)));
2755
+ }), v("mouseenter", c, (e) => {
2756
+ S(t).text && Z(e.clientX, e.clientY, S(t).label, [{ value: S(t).text }]);
2757
+ }), v("mouseleave", c, () => {
2758
+ S(t).text && T(ls, null);
2759
+ }), v("focus", c, () => {
2760
+ if (!S(t).text || !S(Xi)) return;
2761
+ let e = S(Xi).getBoundingClientRect();
2762
+ Z(e.left + S(t).x * e.width / S(G).width, e.top + S(t).y * e.height / S(G).height, S(t).label, [{ value: S(t).text }]);
2763
+ }), v("blur", c, () => {
2764
+ S(t).text && T(ls, null);
2765
+ }), A(e, c);
2766
+ });
2767
+ var Rc = w(Lc), zc = (e) => {
2768
+ var t = Ln(), n = M(t);
2769
+ P(n, 17, () => S(G).drawings, (e) => e.id, (e, t) => {
2770
+ let n = E(() => S(t).points[0]), r = E(() => S(t).points[1]), i = E(() => S(da) === S(t).id);
2771
+ var a = Nn();
2772
+ let o;
2773
+ var s = M(a), c = (e) => {
2774
+ let i = E(() => Math.atan2(S(r).y - S(n).y, S(r).x - S(n).x));
2775
+ var a = En(), o = _(a), s = w(o), c = w(s), l = (e) => {
2776
+ var n = Tn();
2777
+ h((e) => {
2778
+ D(n, "d", e), D(n, "fill", S(t).color);
2779
+ }, [() => `M${S(r).x},${S(r).y} L${S(r).x - 10 * Math.cos(S(i) - .45)},${S(r).y - 10 * Math.sin(S(i) - .45)} L${S(r).x - 10 * Math.cos(S(i) + .45)},${S(r).y - 10 * Math.sin(S(i) + .45)} Z`]), A(e, n);
2780
+ };
2781
+ m(c, (e) => {
2782
+ S(t).kind === "arrow" && e(l);
2783
+ }), h(() => {
2784
+ D(o, "x1", S(n).x), D(o, "y1", S(n).y), D(o, "x2", S(r).x), D(o, "y2", S(r).y), D(s, "x1", S(n).x), D(s, "y1", S(n).y), D(s, "x2", S(r).x), D(s, "y2", S(r).y), D(s, "stroke", S(t).color);
2785
+ }), A(e, a);
2786
+ }, l = (e) => {
2787
+ var i = Dn();
2788
+ h((e, n, r, a) => {
2789
+ D(i, "x", e), D(i, "y", n), D(i, "width", r), D(i, "height", a), D(i, "fill", S(t).color), D(i, "stroke", S(t).color);
2790
+ }, [
2791
+ () => Math.min(S(n).x, S(r).x),
2792
+ () => Math.min(S(n).y, S(r).y),
2793
+ () => Math.abs(S(r).x - S(n).x),
2794
+ () => Math.abs(S(r).y - S(n).y)
2795
+ ]), A(e, i);
2796
+ }, u = (e) => {
2797
+ var r = On(), i = _(r), a = w(i), o = w(a), s = M(o, !0);
2798
+ O(o), h(() => {
2799
+ D(i, "x1", S(n).x), D(i, "y1", S(n).y), D(i, "x2", S(G).plot.x + S(G).plot.w), D(i, "y2", S(n).y), D(a, "x1", S(n).x), D(a, "y1", S(n).y), D(a, "x2", S(G).plot.x + S(G).plot.w), D(a, "y2", S(n).y), D(a, "stroke", S(t).color), D(o, "x", S(G).plot.x + S(G).plot.w - 3), D(o, "y", S(n).y - 3), D(o, "fill", S(t).color), b(s, S(t).label);
2800
+ }), A(e, r);
2801
+ }, d = (e) => {
2802
+ let i = E(() => Math.min(S(n).x, S(r).x)), a = E(() => Math.max(S(n).x, S(r).x));
2803
+ var o = An(), s = _(o);
2804
+ P(s, 17, () => S(t).levels, (e) => e.ratio, (e, n) => {
2805
+ var r = kn(), o = _(r), s = w(o), c = M(s, !0);
2806
+ O(s), h(() => {
2807
+ D(o, "x1", S(i)), D(o, "y1", S(n).y), D(o, "x2", S(a)), D(o, "y2", S(n).y), D(o, "stroke", S(t).color), D(o, "stroke-dasharray", S(n).ratio === 0 || S(n).ratio === 1 ? void 0 : "3 3"), D(s, "x", S(i) + 3), D(s, "y", S(n).y - 2), D(s, "fill", S(t).color), b(c, S(n).label);
2808
+ }), A(e, r);
2809
+ });
2810
+ var c = w(s);
2811
+ h((e, t) => {
2812
+ D(c, "x", S(i)), D(c, "y", e), D(c, "width", S(a) - S(i)), D(c, "height", t);
2813
+ }, [() => Math.min(S(n).y, S(r).y), () => Math.abs(S(r).y - S(n).y)]), A(e, o);
2814
+ }, ee = (e) => {
2815
+ var r = jn(), i = M(r, !0);
2816
+ O(r), h(() => {
2817
+ D(r, "x", S(n).x), D(r, "y", S(n).y), D(r, "fill", S(t).color), b(i, S(t).text ?? "");
2818
+ }), A(e, r);
2819
+ };
2820
+ m(s, (e) => {
2821
+ (S(t).kind === "trend" || S(t).kind === "arrow") && S(r) ? e(c) : S(t).kind === "rect" && S(r) ? e(l, 1) : S(t).kind === "hray" ? e(u, 2) : S(t).kind === "fib" && S(r) && S(t).levels ? e(d, 3) : S(t).kind === "text" && e(ee, 4);
2822
+ });
2823
+ var te = w(s), ne = (e) => {
2824
+ var n = p(), r = _(n);
2825
+ P(r, 17, () => S(t).points, C, (e, n, r) => {
2826
+ var i = Mn();
2827
+ h(() => {
2828
+ D(i, "cx", S(n).x), D(i, "cy", S(n).y), D(i, "stroke", S(t).color);
2829
+ }), g("pointerdown", i, (e) => {
2830
+ e.stopPropagation(), e.preventDefault(), T(ha, {
2831
+ id: S(t).id,
2832
+ index: r
2833
+ }, !0), S(Xi)?.setPointerCapture?.(e.pointerId);
2834
+ }), A(e, i);
2835
+ }), A(e, n);
2836
+ };
2837
+ m(te, (e) => {
2838
+ S(i) && Je() && e(ne);
2839
+ }), O(a), h((e) => {
2840
+ o = F(a, 0, `sv-grid-chart-drawing is-${S(t).kind}`, "svelte-kvdein", o, { "is-selected": S(i) }), D(a, "role", Je() ? "button" : void 0), D(a, "tabindex", Je() ? 0 : void 0), D(a, "aria-label", e);
2841
+ }, [() => Je() ? `${et(S(z).drawing, { tool: S(sa)[S(t).kind] })}${S(t).text ? `: ${S(t).text}` : ""}` : void 0]), g("click", a, (e) => {
2842
+ Je() && !S(la) && (e.stopPropagation(), T(da, S(i) ? null : S(t).id, !0));
2843
+ }), g("keydown", a, (e) => {
2844
+ Je() && Ta(e, S(t).id);
2845
+ }), A(e, a);
2846
+ });
2847
+ var r = w(n), i = (e) => {
2848
+ var t = In(), n = _(t), r = w(n), i = (e) => {
2849
+ var t = Pn();
2850
+ h((e, n, r, i) => {
2851
+ D(t, "x", e), D(t, "y", n), D(t, "width", r), D(t, "height", i);
2852
+ }, [
2853
+ () => Math.min(S(H).px, S(ua).x),
2854
+ () => Math.min(S(H).py, S(ua).y),
2855
+ () => Math.abs(S(ua).x - S(H).px),
2856
+ () => Math.abs(S(ua).y - S(H).py)
2857
+ ]), A(e, t);
2858
+ }, a = (e) => {
2859
+ var t = Fn();
2860
+ h(() => {
2861
+ D(t, "x1", S(H).px), D(t, "y1", S(H).py), D(t, "x2", S(ua).x), D(t, "y2", S(ua).y);
2862
+ }), A(e, t);
2863
+ };
2864
+ m(r, (e) => {
2865
+ S(la) === "rect" ? e(i) : e(a, -1);
2866
+ }), h(() => {
2867
+ D(n, "cx", S(H).px), D(n, "cy", S(H).py);
2868
+ }), A(e, t);
2869
+ };
2870
+ m(r, (e) => {
2871
+ S(H) && S(ua) && e(i);
2872
+ }), O(t), h(() => D(t, "clip-path", `url(#${Ai}-plot)`)), A(e, t);
2873
+ };
2874
+ m(Rc, (e) => {
2875
+ (S(G).drawings.length || S(H)) && e(zc);
2876
+ });
2877
+ var Bc = w(Rc), Vc = (e) => {
2878
+ var t = p(), n = _(t), r = (e) => {
2879
+ let t = E(() => S(G).plot.y + S(wo) * S(ds) + S(wo) / 2);
2880
+ var n = Rn();
2881
+ h(() => {
2882
+ D(n, "x1", S(G).plot.x), D(n, "y1", S(t)), D(n, "x2", S(G).plot.x + S(G).plot.w), D(n, "y2", S(t));
2883
+ }), A(e, n);
2884
+ }, i = (e) => {
2885
+ let t = E(() => S(G).lines[0]?.points[S(ds)]), n = E(() => S(t) && Number.isFinite(S(t).x) ? S(t).x : S(G).plot.x + S(wo) * S(ds) + S(wo) / 2);
2886
+ var r = Vn(), i = _(r), a = w(i), o = (e) => {
2887
+ let t = E(() => as(S(ls)?.title ?? S(W).categories[S(ds)] ?? "", 16)), r = E(() => Math.max(24, S(t).length * 6.2 + 10));
2888
+ var i = Bn(), a = _(i), o = M(a), s = w(o), c = M(s, !0);
2889
+ O(s), O(a);
2890
+ var l = w(a), u = (e) => {
2891
+ let t = E(() => hs(S(uo).yInvert(S(ms)))), n = E(() => Math.max(24, S(t).length * 6.2 + 10));
2892
+ var r = zn(), i = M(r), a = w(i), o = M(a, !0);
2893
+ O(a), O(r), h((e, r) => {
2894
+ D(i, "x", e), D(i, "y", S(ms) - 7.5), D(i, "width", S(n)), D(a, "x", r), D(a, "y", S(ms) + 3.5), b(o, S(t));
2895
+ }, [() => Math.max(0, S(G).plot.x - S(n) - 2), () => Math.max(S(n) / 2, S(G).plot.x - 2 - S(n) / 2)]), A(e, r);
2896
+ };
2897
+ m(l, (e) => {
2898
+ S(ms) != null && S(uo) && S(G).axes && e(u);
2899
+ }), h((e, n) => {
2900
+ D(o, "x", e), D(o, "y", S(G).plot.y + S(G).plot.h + 2), D(o, "width", S(r)), D(s, "x", n), D(s, "y", S(G).plot.y + S(G).plot.h + 13), b(c, S(t));
2901
+ }, [() => Math.max(0, Math.min(S(G).width - S(r), S(n) - S(r) / 2)), () => Math.max(S(r) / 2, Math.min(S(G).width - S(r) / 2, S(n)))]), A(e, i);
2902
+ };
2903
+ m(a, (e) => {
2904
+ Ue() && e(o);
2905
+ }), h(() => {
2906
+ D(i, "x1", S(n)), D(i, "y1", S(G).plot.y), D(i, "x2", S(n)), D(i, "y2", S(G).plot.y + S(G).plot.h);
2907
+ }), A(e, r);
2908
+ };
2909
+ m(n, (e) => {
2910
+ S(q) ? e(r) : e(i, -1);
2911
+ }), A(e, t);
2912
+ };
2913
+ m(Bc, (e) => {
2914
+ S(K) && S(ds) !== null && e(Vc);
2915
+ });
2916
+ var Hc = w(Bc), Uc = (e) => {
2917
+ var t = Jn(), n = _(t);
2918
+ P(n, 17, () => S(G).heatmapRowTicks, (e) => e.value, (e, t, n, r) => {
2919
+ var i = Hn(), a = M(i, !0);
2920
+ O(i), h((e) => {
2921
+ D(i, "x", S(G).plot.x - 8), D(i, "y", S(t).y + 3), b(a, e);
2922
+ }, [() => as(S(t).label, 22)]), A(e, i);
2923
+ });
2924
+ var r = w(n);
2925
+ P(r, 19, () => S(G).heatmapColTicks, (e, t) => e.label + t, (e, t, n, r) => {
2926
+ var i = Un(), a = M(i, !0);
2927
+ O(i), h((e) => {
2928
+ D(i, "x", S(t).x), D(i, "y", S(G).plot.y + S(G).plot.h + 14), b(a, e);
2929
+ }, [() => as(S(t).label, 14)]), A(e, i);
2930
+ });
2931
+ var i = w(r);
2932
+ P(i, 17, () => S(G).heatmapCells, C, (e, t, n) => {
2933
+ var r = Gn(), i = _(r), a = w(i), o = (e) => {
2934
+ var n = Wn(), r = M(n, !0);
2935
+ O(n), h((e) => {
2936
+ D(n, "x", S(t).x + S(t).w / 2), D(n, "y", S(t).y + S(t).h / 2 + 3), D(n, "fill", S(t).textColor), b(r, e);
2937
+ }, [() => V(S(t).value)]), A(e, n);
2938
+ };
2939
+ m(a, (e) => {
2940
+ S(_i).show && S(t).w > 22 && S(t).h > 14 && e(o);
2941
+ }), h((e, n) => {
2942
+ D(i, "x", S(t).x), D(i, "y", S(t).y), D(i, "width", S(t).w), D(i, "height", S(t).h), D(i, "fill", S(t).color), D(i, "role", f.onSelect || S(Y) ? "button" : "img"), D(i, "tabindex", e), D(i, "aria-label", n);
2943
+ }, [() => Is(".sv-grid-chart-heatcell", n), () => `${S(t).rowLabel} ${S(t).colLabel}: ${V(S(t).value)}`]), g("mousemove", i, (e) => ws(e.clientX, e.clientY, S(t))), v("mouseleave", i, Q), v("focus", i, (e) => {
2944
+ Ls(".sv-grid-chart-heatcell", n);
2945
+ let r = zs(e.currentTarget);
2946
+ ws(r.x, r.y, S(t));
2947
+ }), v("blur", i, Q), g("click", i, () => Ms(S(t).colLabel, S(t).rowLabel, S(t).value)), g("keydown", i, (e) => Rs(e, ".sv-grid-chart-heatcell", n, f.onSelect || S(Y) ? () => Ms(S(t).colLabel, S(t).rowLabel, S(t).value) : null, { cols: S(G).heatmapColTicks.length })), A(e, r);
2948
+ });
2949
+ var a = w(i), o = (e) => {
2950
+ let t = E(() => S(G).plot.x + S(G).plot.w + 14), n = E(() => S(G).plot.h - 20), r = E(() => S(G).heatmapLegend);
2951
+ var i = qn(), a = _(i), o = M(a);
2952
+ P(o, 21, () => S(r), C, (e, t, n) => {
2953
+ var i = Kn();
2954
+ h(() => {
2955
+ D(i, "offset", `${n / (S(r).length - 1) * 100}%`), D(i, "stop-color", S(t).color);
2956
+ }), A(e, i);
2957
+ }), O(o), O(a);
2958
+ var s = w(a), c = w(s), l = M(c, !0);
2959
+ O(c);
2960
+ var u = w(c), d = M(u, !0);
2961
+ O(u), h(() => {
2962
+ D(o, "id", `${Ai}-heatscale`), D(s, "x", S(t)), D(s, "y", S(G).plot.y + 10), D(s, "height", S(n)), D(s, "fill", `url(#${Ai}-heatscale)`), D(c, "x", S(t) + 14), D(c, "y", S(G).plot.y + 14), b(l, S(r)[S(r).length - 1].label), D(u, "x", S(t) + 14), D(u, "y", S(G).plot.y + 10 + S(n)), b(d, S(r)[0].label);
2963
+ }), A(e, i);
2964
+ };
2965
+ m(a, (e) => {
2966
+ S(G).heatmapLegend.length && e(o);
2967
+ }), A(e, t);
2968
+ };
2969
+ m(Hc, (e) => {
2970
+ S(_o) && e(Uc);
2971
+ });
2972
+ var Wc = w(Hc), Gc = (e) => {
2973
+ var t = p(), n = _(t);
2974
+ P(n, 17, () => S(G).funnelSegments, C, (e, t, n) => {
2975
+ var r = Xn(), i = _(r), a = w(i), o = (e) => {
2976
+ var n = Yn(), r = _(n), i = M(r, !0);
2977
+ O(r);
2978
+ var a = w(r), o = M(a);
2979
+ O(a), h((e, n, s) => {
2980
+ D(r, "x", S(t).cx), D(r, "y", S(t).cy - 3), D(r, "fill", S(t).textColor), b(i, e), D(a, "x", S(t).cx), D(a, "y", S(t).cy + 11), D(a, "fill", S(t).textColor), b(o, `${n ?? ""} · ${s ?? ""}%`);
2981
+ }, [
2982
+ () => as(S(t).label, 24),
2983
+ () => V(S(t).value),
2984
+ () => (S(t).conversion * 100).toFixed(0)
2985
+ ]), A(e, n);
2986
+ }, s = E(() => S(G).plot.h / Math.max(1, S(G).funnelSegments.length) >= 26);
2987
+ m(a, (e) => {
2988
+ S(s) && e(o);
2989
+ }), h((e, n) => {
2990
+ D(i, "d", S(t).path), D(i, "fill", S(t).color), D(i, "role", f.onSelect || S(Y) ? "button" : "img"), D(i, "tabindex", e), D(i, "aria-label", n);
2991
+ }, [() => Is(".sv-grid-chart-funnel-seg", n), () => `${S(t).label}: ${V(S(t).value)}`]), g("mousemove", i, (e) => Ts(e.clientX, e.clientY, S(t))), v("mouseleave", i, Q), v("focus", i, (e) => {
2992
+ Ls(".sv-grid-chart-funnel-seg", n);
2993
+ let r = zs(e.currentTarget);
2994
+ Ts(r.x, r.y, S(t));
2995
+ }), v("blur", i, Q), g("click", i, () => Ms(S(t).label, S(t).label, S(t).value, n)), g("keydown", i, (e) => Rs(e, ".sv-grid-chart-funnel-seg", n, f.onSelect || S(Y) ? () => Ms(S(t).label, S(t).label, S(t).value, n) : null)), A(e, r);
2996
+ }), A(e, t);
2997
+ };
2998
+ m(Wc, (e) => {
2999
+ S(vo) && e(Gc);
3000
+ });
3001
+ var Kc = w(Wc), qc = (e) => {
3002
+ let t = E(() => S(G).radarCenter);
3003
+ var n = tr(), r = _(n);
3004
+ P(r, 17, () => S(G).radarRings, C, (e, n, r) => {
3005
+ let i = E(() => S(t).r * ((r + 1) / S(G).radarRings.length));
3006
+ var a = Zn();
3007
+ h(() => {
3008
+ D(a, "cx", S(t).cx), D(a, "cy", S(t).cy), D(a, "r", S(i));
3009
+ }), A(e, a);
3010
+ });
3011
+ var i = w(r);
3012
+ P(i, 17, () => S(G).radarAxes, C, (e, n) => {
3013
+ let r = E(() => S(n).x - S(t).cx), i = E(() => S(n).y - S(t).cy), a = E(() => S(t).cx + S(r) * 1.08), o = E(() => S(t).cy + S(i) * 1.08);
3014
+ var s = Qn(), c = _(s), l = w(c), u = M(l, !0);
3015
+ O(l), h((e) => {
3016
+ D(c, "x1", S(t).cx), D(c, "y1", S(t).cy), D(c, "x2", S(n).x), D(c, "y2", S(n).y), D(l, "x", S(a)), D(l, "y", S(o) + 3), D(l, "text-anchor", e), b(u, S(n).label);
3017
+ }, [() => Math.abs(S(r)) < 1 ? "middle" : S(r) > 0 ? "start" : "end"]), A(e, s);
3018
+ });
3019
+ var a = w(i);
3020
+ P(a, 17, () => S(G).radarSeries, C, (e, t, n) => {
3021
+ var r = er(), i = _(r), a = w(i);
3022
+ P(a, 17, () => S(t).points, C, (e, r, i) => {
3023
+ let a = E(() => n * S(t).points.length + i);
3024
+ var o = $n();
3025
+ h((e, n) => {
3026
+ D(o, "cx", S(r).x), D(o, "cy", S(r).y), D(o, "fill", S(t).color), D(o, "tabindex", e), D(o, "aria-label", n);
3027
+ }, [() => Is(".sv-grid-chart-radar-dot", S(a)), () => `${S(t).label} ${S(r).axis}: ${V(S(r).value)}`]), g("mousemove", o, (e) => As(e.clientX, e.clientY, S(t).label, S(r).axis, S(r).value, S(t).color)), v("mouseleave", o, Q), v("focus", o, (e) => {
3028
+ Ls(".sv-grid-chart-radar-dot", S(a));
3029
+ let n = zs(e.currentTarget);
3030
+ As(n.x, n.y, S(t).label, S(r).axis, S(r).value, S(t).color);
3031
+ }), v("blur", o, Q), g("keydown", o, (e) => Rs(e, ".sv-grid-chart-radar-dot", S(a))), A(e, o);
3032
+ }), h((e) => {
3033
+ D(i, "d", S(t).path), D(i, "fill", S(t).color), D(i, "stroke", S(t).color), N(i, e);
3034
+ }, [() => `opacity:${J(S(t).label)}`]), A(e, r);
3035
+ }), A(e, n);
3036
+ };
3037
+ m(Kc, (e) => {
3038
+ S(yo) && S(G).radarCenter && e(qc);
3039
+ });
3040
+ var Jc = w(Kc), Yc = (e) => {
3041
+ var t = sr(), n = _(t);
3042
+ P(n, 17, () => S(G).calendarMonthTicks, C, (e, t, n, r) => {
3043
+ var i = nr(), a = M(i, !0);
3044
+ O(i), h(() => {
3045
+ D(i, "x", S(t).x), D(i, "y", S(G).plot.y - 8), b(a, S(t).label);
3046
+ }), A(e, i);
3047
+ });
3048
+ var r = w(n);
3049
+ P(r, 16, () => [
3050
+ "Mon",
3051
+ "Wed",
3052
+ "Fri"
3053
+ ], C, (e, t, n) => {
3054
+ let r = E(() => [
3055
+ 1,
3056
+ 3,
3057
+ 5
3058
+ ][n]), i = E(() => S(G).calendarCells[S(r)]);
3059
+ var a = p(), o = _(a), s = (e) => {
3060
+ var n = rr(), r = M(n, !0);
3061
+ O(n), h(() => {
3062
+ D(n, "x", S(G).plot.x - 6), D(n, "y", S(i).y + S(i).size / 2 + 3), b(r, t);
3063
+ }), A(e, n);
3064
+ };
3065
+ m(o, (e) => {
3066
+ S(i) && e(s);
3067
+ }), A(e, a);
3068
+ });
3069
+ var i = w(r);
3070
+ P(i, 17, () => S(G).calendarCells, C, (e, t, n) => {
3071
+ var r = ir();
3072
+ let i;
3073
+ h((e, n) => {
3074
+ i = F(r, 0, "sv-grid-chart-calendar-cell svelte-kvdein", null, i, { "is-blank": !S(t).defined }), D(r, "x", S(t).x + 1), D(r, "y", S(t).y + 1), D(r, "width", S(t).size - 2), D(r, "height", S(t).size - 2), D(r, "fill", S(t).defined ? S(t).color : "transparent"), D(r, "tabindex", e), D(r, "aria-label", n);
3075
+ }, [() => Is(".sv-grid-chart-calendar-cell", n), () => `${vs(S(t).date)}: ${S(t).defined ? V(S(t).value) : S(z).noValue}`]), g("mousemove", r, (e) => S(t).defined && Z(e.clientX, e.clientY, vs(S(t).date), [{
3076
+ color: S(t).color,
3077
+ value: V(S(t).value)
3078
+ }])), v("mouseleave", r, Q), v("focus", r, (e) => {
3079
+ if (Ls(".sv-grid-chart-calendar-cell", n), S(t).defined) {
3080
+ let n = zs(e.currentTarget);
3081
+ Z(n.x, n.y, vs(S(t).date), [{
3082
+ color: S(t).color,
3083
+ value: V(S(t).value)
3084
+ }]);
3085
+ }
3086
+ }), v("blur", r, Q), g("keydown", r, (e) => Rs(e, ".sv-grid-chart-calendar-cell", n, null, {
3087
+ cols: 7,
3088
+ colMajor: !0
3089
+ })), A(e, r);
3090
+ });
3091
+ var a = w(i), o = (e) => {
3092
+ let t = E(() => S(G).plot.x + S(G).plot.w + 12), n = E(() => S(G).plot.y + 4);
3093
+ var r = or(), i = _(r), a = w(i);
3094
+ P(a, 17, () => S(G).calendarLegend, C, (e, r, i) => {
3095
+ var a = ar(), o = _(a), s = w(o), c = M(s, !0);
3096
+ O(s), h(() => {
3097
+ D(o, "x", S(t)), D(o, "y", S(n) + 6 + i * 13), D(o, "fill", S(r).color), D(s, "x", S(t) + 14), D(s, "y", S(n) + 14 + i * 13), b(c, S(r).label);
3098
+ }), A(e, a);
3099
+ });
3100
+ var o = w(a);
3101
+ h(() => {
3102
+ D(i, "x", S(t)), D(i, "y", S(n)), D(o, "x", S(t)), D(o, "y", S(n) + 12 + S(G).calendarLegend.length * 13);
3103
+ }), A(e, r);
3104
+ };
3105
+ m(a, (e) => {
3106
+ S(G).calendarLegend.length && e(o);
3107
+ }), A(e, t);
3108
+ };
3109
+ m(Jc, (e) => {
3110
+ S(bo) && e(Yc);
3111
+ });
3112
+ var Xc = w(Jc), Zc = (e) => {
3113
+ let t = E(() => S(G).gauge);
3114
+ var n = dr(), r = _(n);
3115
+ P(r, 17, () => S(t).ticks, C, (e, t) => {
3116
+ var n = cr();
3117
+ let r;
3118
+ h(() => {
3119
+ r = F(n, 0, "sv-grid-chart-gauge-tick svelte-kvdein", null, r, { "is-major": S(t).major }), D(n, "x1", S(t).x1), D(n, "y1", S(t).y1), D(n, "x2", S(t).x2), D(n, "y2", S(t).y2);
3120
+ }), A(e, n);
3121
+ });
3122
+ var i = w(r), a = w(i);
3123
+ P(a, 17, () => S(t).rangePaths, C, (e, t) => {
3124
+ var n = lr();
3125
+ h(() => {
3126
+ D(n, "d", S(t).path), D(n, "stroke", S(t).color);
3127
+ }), A(e, n);
3128
+ });
3129
+ var o = w(a), s = w(o), c = (e) => {
3130
+ var n = ur();
3131
+ h(() => {
3132
+ D(n, "x1", S(t).target.x1), D(n, "y1", S(t).target.y1), D(n, "x2", S(t).target.x2), D(n, "y2", S(t).target.y2);
3133
+ }), A(e, n);
3134
+ };
3135
+ m(s, (e) => {
3136
+ S(t).target && e(c);
3137
+ });
3138
+ var l = w(s), u = w(l), d = w(u), ee = w(d), te = M(ee, !0);
3139
+ O(ee);
3140
+ var ne = w(ee), re = M(ne, !0);
3141
+ O(ne);
3142
+ var ie = w(ne), f = M(ie);
3143
+ O(ie), h((e, n, r, a) => {
3144
+ D(i, "d", S(t).trackPath), D(o, "d", S(t).valuePath), D(o, "stroke", S(t).valueColor ?? "var(--sg-accent, #2563eb)"), D(l, "d", S(t).needle.path), D(u, "cx", S(t).cx), D(u, "cy", S(t).cy), D(u, "r", S(t).needle.hubR), D(d, "cx", S(t).cx), D(d, "cy", S(t).cy), D(ee, "x", S(t).minLabel.x), D(ee, "y", S(t).minLabel.y), b(te, e), D(ne, "x", S(t).maxLabel.x), D(ne, "y", S(t).maxLabel.y), b(re, n), D(ie, "x", S(t).cx), D(ie, "y", S(t).cy + 38), b(f, `${r ?? ""}${a ?? ""}`);
3145
+ }, [
3146
+ () => V(S(t).min),
3147
+ () => V(S(t).max),
3148
+ () => V(S(t).value),
3149
+ () => S(t).unit ? /^[%°′″]/.test(S(t).unit) ? S(t).unit : ` ${S(t).unit}` : ""
3150
+ ]), A(e, n);
3151
+ };
3152
+ m(Xc, (e) => {
3153
+ S(xo) && S(G).gauge && e(Zc);
3154
+ });
3155
+ var Qc = w(Xc), $c = (e) => {
3156
+ var t = p(), n = _(t);
3157
+ P(n, 17, () => S(G).treemapCells, C, (e, t, n) => {
3158
+ var r = mr(), i = _(r), o = w(i), s = (e) => {
3159
+ var n = fr(), r = M(n, !0);
3160
+ O(n), h((e) => {
3161
+ D(n, "x", S(t).x + 4), D(n, "y", S(t).y + 12), D(n, "fill", S(t).textColor), b(r, e);
3162
+ }, [() => as(S(t).name, Math.max(3, Math.floor(S(t).w / 7)))]), A(e, n);
3163
+ };
3164
+ m(o, (e) => {
3165
+ S(t).w > 36 && S(t).h > 18 && e(s);
3166
+ });
3167
+ var c = w(o), l = (e) => {
3168
+ var n = pr(), r = M(n, !0);
3169
+ O(n), h((e) => {
3170
+ D(n, "x", S(t).x + 4), D(n, "y", S(t).y + 24), D(n, "fill", S(t).textColor), b(r, e);
3171
+ }, [() => V(S(t).value)]), A(e, n);
3172
+ };
3173
+ m(c, (e) => {
3174
+ S(t).w > 60 && S(t).h > 30 && e(l);
3175
+ }), h((e, n) => {
3176
+ D(i, "x", S(t).x), D(i, "y", S(t).y), D(i, "width", S(t).w), D(i, "height", S(t).h), D(i, "fill", S(t).color), D(i, "role", f.onSelect || S(Y) || S(Wa) ? "button" : "img"), D(i, "tabindex", e), D(i, "aria-label", n);
3177
+ }, [() => Is(".sv-grid-chart-treemap-cell", n), () => `${S(t).name}: ${V(S(t).value)}`]), g("mousemove", i, (e) => Z(e.clientX, e.clientY, S(t).name, [{
3178
+ color: S(t).color,
3179
+ value: V(S(t).value)
3180
+ }])), v("mouseleave", i, Q), v("focus", i, (e) => {
3181
+ Ls(".sv-grid-chart-treemap-cell", n);
3182
+ let r = zs(e.currentTarget);
3183
+ Z(r.x, r.y, S(t).name, [{
3184
+ color: S(t).color,
3185
+ value: V(S(t).value)
3186
+ }]);
3187
+ }), v("blur", i, Q), g("click", i, (e) => {
3188
+ S(Wa) && Za([...Ie(), ...a(S(Ga), S(t).name) ?? []]) || Ms(S(t).name, "", S(t).value, void 0, e);
3189
+ }), g("keydown", i, (e) => Rs(e, ".sv-grid-chart-treemap-cell", n, () => {
3190
+ S(Wa) && Za([...Ie(), ...a(S(Ga), S(t).name) ?? []]) || (f.onSelect || S(Y)) && Ms(S(t).name, "", S(t).value, void 0, e);
3191
+ })), A(e, r);
3192
+ }), A(e, t);
3193
+ };
3194
+ m(Qc, (e) => {
3195
+ S(So) && e($c);
3196
+ });
3197
+ var el = w(Qc), tl = (e) => {
3198
+ var t = _r(), n = _(t);
3199
+ P(n, 17, () => S(G).sankeyLinks, C, (e, t, n) => {
3200
+ var r = hr();
3201
+ h((e, n) => {
3202
+ D(r, "d", S(t).path), D(r, "stroke", S(t).color), D(r, "stroke-width", S(t).width), D(r, "tabindex", e), D(r, "aria-label", n);
3203
+ }, [() => Is(".sv-grid-chart-sankey-link", n), () => `${S(t).source} → ${S(t).target}: ${V(S(t).value)}`]), g("mousemove", r, (e) => Z(e.clientX, e.clientY, `${S(t).source} → ${S(t).target}`, [{
3204
+ color: S(t).color,
3205
+ value: V(S(t).value)
3206
+ }])), v("mouseleave", r, Q), v("focus", r, (e) => {
3207
+ Ls(".sv-grid-chart-sankey-link", n);
3208
+ let r = zs(e.currentTarget);
3209
+ Z(r.x, r.y, `${S(t).source} → ${S(t).target}`, [{
3210
+ color: S(t).color,
3211
+ value: V(S(t).value)
3212
+ }]);
3213
+ }), v("blur", r, Q), g("keydown", r, (e) => Rs(e, ".sv-grid-chart-sankey-link", n)), A(e, r);
3214
+ });
3215
+ var r = w(n);
3216
+ P(r, 17, () => S(G).sankeyNodes, C, (e, t, n) => {
3217
+ var r = gr(), i = _(r), a = w(i), o = M(a, !0);
3218
+ O(a), h((e, n) => {
3219
+ D(i, "x", S(t).x), D(i, "y", S(t).y), D(i, "width", S(t).w), D(i, "height", S(t).h), D(i, "fill", S(t).color), D(i, "tabindex", e), D(i, "aria-label", n), D(a, "x", S(t).column === 0 ? S(t).x + S(t).w + 4 : S(t).x - 4), D(a, "y", S(t).y + S(t).h / 2 + 3), D(a, "text-anchor", S(t).column === 0 ? "start" : "end"), b(o, S(t).label);
3220
+ }, [() => Is(".sv-grid-chart-sankey-node", n), () => et(S(z).sankeyNode, {
3221
+ label: S(t).label,
3222
+ in: V(S(t).totalIn),
3223
+ out: V(S(t).totalOut)
3224
+ })]), g("mousemove", i, (e) => Z(e.clientX, e.clientY, S(t).label, [{
3225
+ label: "in",
3226
+ value: V(S(t).totalIn)
3227
+ }, {
3228
+ label: "out",
3229
+ value: V(S(t).totalOut)
3230
+ }])), v("mouseleave", i, Q), v("focus", i, (e) => {
3231
+ Ls(".sv-grid-chart-sankey-node", n);
3232
+ let r = zs(e.currentTarget);
3233
+ Z(r.x, r.y, S(t).label, [{
3234
+ label: "in",
3235
+ value: V(S(t).totalIn)
3236
+ }, {
3237
+ label: "out",
3238
+ value: V(S(t).totalOut)
3239
+ }]);
3240
+ }), v("blur", i, Q), g("keydown", i, (e) => Rs(e, ".sv-grid-chart-sankey-node", n)), A(e, r);
3241
+ }), A(e, t);
3242
+ };
3243
+ m(el, (e) => {
3244
+ S(Co) && e(tl);
3245
+ });
3246
+ var nl = w(el), rl = (e) => {
3247
+ var t = Tr(), n = _(t), r = (e) => {
3248
+ var t = p(), n = _(t);
3249
+ P(n, 17, () => S(G).polarRings, C, (e, t) => {
3250
+ var n = vr();
3251
+ h(() => {
3252
+ D(n, "cx", S(G).radarCenter.cx), D(n, "cy", S(G).radarCenter.cy), D(n, "r", S(t));
3253
+ }), A(e, n);
3254
+ }), A(e, t);
3255
+ };
3256
+ m(n, (e) => {
3257
+ S(G).radarCenter && S(G).polarRings.length && e(r);
3258
+ });
3259
+ var i = w(n);
3260
+ P(i, 17, () => S(G).polarAxes, C, (e, t) => {
3261
+ var n = yr(), r = M(n, !0);
3262
+ O(n), h((e) => {
3263
+ D(n, "x", S(t).x), D(n, "y", S(t).y + 3), D(n, "text-anchor", S(t).x < (S(G).radarCenter?.cx ?? 0) - 2 ? "end" : S(t).x > (S(G).radarCenter?.cx ?? 0) + 2 ? "start" : "middle"), b(r, e);
3264
+ }, [() => as(S(t).label, 14)]), A(e, n);
3265
+ });
3266
+ var a = w(i);
3267
+ P(a, 17, () => S(G).arcs, C, (e, t) => {
3268
+ var n = p(), r = _(n), i = (e) => {
3269
+ var n = br();
3270
+ h(() => D(n, "d", S(t).trackPath)), A(e, n);
3271
+ };
3272
+ m(r, (e) => {
3273
+ S(t).trackPath && e(i);
3274
+ }), A(e, n);
3275
+ });
3276
+ var o = w(a);
3277
+ P(o, 17, () => S(G).chordRibbons, C, (e, t) => {
3278
+ var n = xr();
3279
+ h((e) => {
3280
+ D(n, "d", S(t).path), D(n, "fill", S(t).color), D(n, "stroke", S(t).color), N(n, e);
3281
+ }, [() => `opacity:${J(S(t).source) === 1 && J(S(t).target) === 1 ? 1 : .18}`]), g("mousemove", n, (e) => Ds(e.clientX, e.clientY, S(t))), v("mouseleave", n, Q), A(e, n);
3282
+ });
3283
+ var s = w(o);
3284
+ P(s, 17, () => S(G).arcs, C, (e, t, n) => {
3285
+ var r = Sr();
3286
+ let i;
3287
+ h((e, n, a, o) => {
3288
+ i = F(r, 0, "sv-grid-chart-arc svelte-kvdein", null, i, e), D(r, "d", S(t).path), D(r, "fill", S(t).color), N(r, n), D(r, "role", f.onSelect || S(Y) || S(Wa) && S(t).nodePath ? "button" : "img"), D(r, "tabindex", a), D(r, "aria-label", o);
3289
+ }, [
3290
+ () => ({
3291
+ "is-selected": Ro(S(t).label, S(t).series),
3292
+ "is-drillable": S(Wa) && !!S(t).nodePath && !!l(S(Ua), S(t).nodePath)?.children?.length
3293
+ }),
3294
+ () => `opacity:${J(S(ho) || S(B).type === "sunburst" || S(B).type === "chord" ? S(t).label : S(t).series)}`,
3295
+ () => Is(".sv-grid-chart-arc", n),
3296
+ () => `${S(t).nodePath ? S(t).nodePath.join(" / ") : S(t).label}${S(t).series ? ` ${S(t).series}` : ""}: ${V(S(t).value)}`
3297
+ ]), g("mousemove", r, (e) => Es(e.clientX, e.clientY, S(t))), v("mouseleave", r, Q), v("focus", r, (e) => {
3298
+ Ls(".sv-grid-chart-arc", n);
3299
+ let r = zs(e.currentTarget);
3300
+ Es(r.x, r.y, S(t));
3301
+ }), v("blur", r, Q), g("click", r, (e) => {
3302
+ S(t).nodePath && Za(S(t).nodePath) || Ms(S(t).label, S(t).series, S(t).value, void 0, e);
3303
+ }), g("keydown", r, (e) => Rs(e, ".sv-grid-chart-arc", n, () => {
3304
+ S(t).nodePath && Za(S(t).nodePath) || (f.onSelect || S(Y)) && Ms(S(t).label, S(t).series, S(t).value, void 0, e);
3305
+ })), A(e, r);
3306
+ });
3307
+ var c = w(s);
3308
+ P(c, 17, () => S(G).arcs, C, (e, t) => {
3309
+ var n = p(), r = _(n), i = (e) => {
3310
+ var n = p(), r = _(n), i = (e) => {
3311
+ var n = Cr(), r = M(n, !0);
3312
+ O(n), h((e) => {
3313
+ D(n, "x", S(t).lx), D(n, "y", S(t).ly + 3), D(n, "text-anchor", S(t).lx < S(t).cx - 2 ? "end" : S(t).lx > S(t).cx + 2 ? "start" : "middle"), b(r, e);
3314
+ }, [() => as(S(t).label, 14)]), A(e, n);
3315
+ };
3316
+ m(r, (e) => {
3317
+ S(t).a1 - S(t).a0 > .12 && S(B).xAxis?.labels !== !1 && e(i);
3318
+ }), A(e, n);
3319
+ }, a = (e) => {
3320
+ var n = wr(), r = M(n, !0);
3321
+ O(n), h((e) => {
3322
+ D(n, "x", S(t).lx), D(n, "y", S(t).ly), D(n, "fill", S(t).textColor), b(r, e);
3323
+ }, [() => as(S(_i).show && S(B).type !== "sunburst" ? V(S(t).value) : S(t).label, 12)]), A(e, n);
3324
+ };
3325
+ m(r, (e) => {
3326
+ S(B).type === "chord" ? e(i) : (S(t).a1 - S(t).a0) * (S(t).r0 + S(t).r1) / 2 > 34 && S(t).r1 - S(t).r0 > 12 && (S(B).type === "sunburst" || S(_i).show) && e(a, 1);
3327
+ }), A(e, n);
3328
+ }), A(e, t);
3329
+ };
3330
+ m(nl, (e) => {
3331
+ S(po) && e(rl);
3332
+ });
3333
+ var il = w(nl), al = (e) => {
3334
+ var t = p(), n = _(t);
3335
+ P(n, 17, () => S(G).bullets, C, (e, t) => {
3336
+ var n = Or(), r = M(n);
3337
+ P(r, 17, () => S(t).ranges, C, (e, n) => {
3338
+ var r = Er();
3339
+ h(() => {
3340
+ D(r, "x", S(n).x), D(r, "y", S(t).y), D(r, "width", S(n).w), D(r, "height", S(t).h), D(r, "fill", S(n).color);
3341
+ }), A(e, r);
3342
+ });
3343
+ var i = w(r), a = w(i), o = (e) => {
3344
+ var n = Dr();
3345
+ h(() => {
3346
+ D(n, "x1", S(t).targetX), D(n, "y1", S(t).y + S(t).h * .15), D(n, "x2", S(t).targetX), D(n, "y2", S(t).y + S(t).h * .85);
3347
+ }), A(e, n);
3348
+ };
3349
+ m(a, (e) => {
3350
+ S(t).targetX != null && e(o);
3351
+ }), O(n), h(() => {
3352
+ D(i, "x", S(t).x), D(i, "y", S(t).y + S(t).h * .3), D(i, "width", S(t).measureW), D(i, "height", S(t).h * .4), D(i, "fill", S(t).color);
3353
+ }), g("mousemove", n, (e) => Os(e.clientX, e.clientY, S(t))), v("mouseleave", n, Q), A(e, n);
3354
+ }), A(e, t);
3355
+ };
3356
+ m(il, (e) => {
3357
+ S(mo) && e(al);
3358
+ });
3359
+ var ol = w(il);
3360
+ P(ol, 17, () => S(G).slices, C, (e, t, n) => {
3361
+ var r = jr(), i = _(r);
3362
+ let a;
3363
+ var o = w(i), s = (e) => {
3364
+ var n = kr(), r = _(n), i = w(r), a = M(i, !0);
3365
+ O(i), h((e) => {
3366
+ D(r, "points", `${S(t).callout.x1},${S(t).callout.y1} ${S(t).callout.x2},${S(t).callout.y2} ${S(t).callout.x3},${S(t).callout.y2}`), D(r, "stroke", S(t).color), D(i, "x", S(t).callout.tx), D(i, "y", S(t).callout.ty + 3.5), D(i, "text-anchor", S(t).callout.anchor), b(a, e);
3367
+ }, [() => S(_i).formatter ? S(_i).formatter(S(t).value, {
3368
+ category: S(t).label,
3369
+ series: S(t).label
3370
+ }) : `${as(S(t).label, Math.min(18, S(t).callout.maxChars))} ${S(t).percent.toFixed(0)}%`]), A(e, n);
3371
+ }, c = (e) => {
3372
+ var n = Ar(), r = M(n);
3373
+ O(n), h((e) => {
3374
+ D(n, "x", S(t).cx), D(n, "y", S(t).cy), b(r, `${e ?? ""}%`);
3375
+ }, [() => S(t).percent.toFixed(0)]), A(e, n);
3376
+ };
3377
+ m(o, (e) => {
3378
+ S(t).callout ? e(s) : S(_i).show && S(_i).placement !== "outside" && S(t).percent >= 6 && e(c, 1);
3379
+ }), h((e, n, r, o, s) => {
3380
+ a = F(i, 0, "sv-grid-chart-slice svelte-kvdein", null, a, e), D(i, "d", S(t).path), D(i, "fill", S(t).color), N(i, n), D(i, "role", r), D(i, "tabindex", o), D(i, "aria-label", s);
3381
+ }, [
3382
+ () => ({
3383
+ "is-selected": Ro(S(t).label, S(t).label),
3384
+ "is-drillable": Ya(S(t).label)
3385
+ }),
3386
+ () => `opacity:${zo(S(t).label, S(t).label)}`,
3387
+ () => f.onSelect || S(Y) || Ya(S(t).label) ? "button" : "img",
3388
+ () => Is(".sv-grid-chart-slice", n),
3389
+ () => `${S(t).label}: ${V(S(t).value)}, ${S(t).percent.toFixed(1)}%${Ya(S(t).label) ? S(z).drillIn : ""}`
3390
+ ]), g("mousemove", i, (e) => Ss(e.clientX, e.clientY, S(t).label, S(t).value, S(t).percent)), v("mouseleave", i, Q), v("focus", i, (e) => {
3391
+ Ls(".sv-grid-chart-slice", n);
3392
+ let r = zs(e.currentTarget);
3393
+ Ss(r.x, r.y, S(t).label, S(t).value, S(t).percent);
3394
+ }), v("blur", i, Q), g("click", i, (e) => {
3395
+ Ya(S(t).label) && Za([...Ie(), S(t).label]) || Ms(S(t).label, S(t).label, S(t).value, n, e);
3396
+ }), g("keydown", i, (e) => {
3397
+ qs(e, n) || Rs(e, ".sv-grid-chart-slice", n, () => {
3398
+ Ya(S(t).label) && Za([...Ie(), S(t).label]) || (f.onSelect || S(Y)) && Ms(S(t).label, S(t).label, S(t).value, n, e);
3399
+ });
3400
+ }), A(e, r);
3401
+ });
3402
+ var sl = w(ol), cl = (e) => {
3403
+ var t = Mr(), n = _(t), r = M(n, !0);
3404
+ O(n);
3405
+ var i = w(n), a = M(i, !0);
3406
+ O(i), h((e) => {
3407
+ D(n, "x", S(G).donut.cx), D(n, "y", S(G).donut.cy - 4), b(r, e), D(i, "x", S(G).donut.cx), D(i, "y", S(G).donut.cy + 11), b(a, S(z).total);
3408
+ }, [() => V(S(G).donut.total)]), A(e, t);
3409
+ };
3410
+ m(sl, (e) => {
3411
+ S(G).donut && e(cl);
3412
+ });
3413
+ var ll = w(sl), ul = (e) => {
3414
+ var t = p(), n = _(t), r = (e) => {
3415
+ var t = Nr();
3416
+ h((e) => {
3417
+ D(t, "x", S(G).plot.x), D(t, "y", S(G).plot.y), D(t, "width", S(G).plot.w), D(t, "height", S(G).plot.h), D(t, "role", f.onSelect ? "button" : "img"), D(t, "tabindex", y() ? 0 : void 0), D(t, "data-cat-index", S(jo)), D(t, "aria-label", e);
3418
+ }, [() => et(S(z).densePoints, {
3419
+ count: S(Eo),
3420
+ from: S(W).categories[0] ?? "",
3421
+ to: S(W).categories[S(W).categories.length - 1] ?? ""
3422
+ })]), g("mousemove", t, (e) => {
3423
+ let t = Ao(e.clientX, e.currentTarget);
3424
+ t != null && (T(jo, t, !0), bs(e.clientX, e.clientY, t));
3425
+ }), v("mouseleave", t, Q), v("focus", t, (e) => xs(e.currentTarget, S(jo))), v("blur", t, Q), g("click", t, (e) => js(e, S(jo))), g("keydown", t, Mo), A(e, t);
3426
+ }, i = (e) => {
3427
+ var t = p(), n = _(t);
3428
+ P(n, 19, () => S(W).categories, (e, t) => e + t, (e, t, n) => {
3429
+ let r = E(() => S(G).lines[0]?.points), i = E(() => S(r)?.[S(n)]?.x), a = E(() => !S(q) && S(r) && S(r).length === S(W).categories.length && Number.isFinite(S(i))), o = E(() => S(a) && S(n) > 0 ? S(r)[S(n) - 1].x : null), s = E(() => S(a) && S(n) < S(r).length - 1 ? S(r)[S(n) + 1].x : null), c = E(() => S(a) ? S(o) == null ? S(G).plot.x : (S(o) + S(i)) / 2 : S(G).plot.x + S(wo) * S(n)), l = E(() => S(a) ? S(s) == null ? S(G).plot.x + S(G).plot.w : (S(i) + S(s)) / 2 : S(G).plot.x + S(wo) * (S(n) + 1));
3430
+ var u = Pr();
3431
+ h((e, t) => {
3432
+ D(u, "x", S(q) ? S(G).plot.x : S(c)), D(u, "y", S(q) ? S(G).plot.y + S(wo) * S(n) : S(G).plot.y), D(u, "width", e), D(u, "height", S(q) ? S(wo) : S(G).plot.h), D(u, "role", f.onSelect ? "button" : "img"), D(u, "tabindex", y() ? S(n) === 0 ? 0 : -1 : void 0), D(u, "data-cat-index", S(n)), D(u, "aria-label", t);
3433
+ }, [() => S(q) ? S(G).plot.w : Math.max(0, S(l) - S(c)), () => `${S(t)}: ${ps(S(n)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), g("mousemove", u, (e) => bs(e.clientX, e.clientY, S(n), e.currentTarget)), v("mouseleave", u, Q), v("focus", u, (e) => xs(e.currentTarget, S(n))), v("blur", u, Q), g("click", u, (e) => js(e, S(n))), g("keydown", u, (e) => Ps(e, S(n))), A(e, u);
3434
+ }), A(e, t);
3435
+ };
3436
+ m(n, (e) => {
3437
+ S(To) ? e(r) : e(i, -1);
3438
+ }), A(e, t);
3439
+ };
3440
+ m(ll, (e) => {
3441
+ S(K) && !S(go) && e(ul);
3442
+ });
3443
+ var dl = w(ll), fl = (e) => {
3444
+ var t = Fr();
3445
+ h(() => {
3446
+ D(t, "x", S($i).x), D(t, "y", S($i).y), D(t, "width", S($i).w), D(t, "height", S($i).h);
3447
+ }), A(e, t);
3448
+ };
3449
+ m(dl, (e) => {
3450
+ S($i) && e(fl);
3451
+ }), O($), pe($, (e) => T(Xi, e), () => S(Xi));
3452
+ var pl = w($, 2), ml = (e) => {
3453
+ let t = E(() => S(U).plot.x + S(La).t0 * S(U).plot.w), n = E(() => (S(La).t1 - S(La).t0) * S(U).plot.w);
3454
+ var r = zr(), i = M(r);
3455
+ D(i, "aria-valuemin", 0);
3456
+ var a = M(i);
3457
+ P(a, 17, () => S(U).lines, C, (e, t) => {
3458
+ var n = Lr(), r = _(n), i = (e) => {
3459
+ var n = Ir();
3460
+ h(() => {
3461
+ D(n, "d", S(t).areaPath), D(n, "fill", S(t).color);
3462
+ }), A(e, n);
3463
+ };
3464
+ m(r, (e) => {
3465
+ S(t).areaPath && e(i);
3466
+ });
3467
+ var a = w(r);
3468
+ h(() => {
3469
+ D(a, "d", S(t).path), D(a, "stroke", S(t).color);
3470
+ }), A(e, n);
3471
+ });
3472
+ var o = w(a);
3473
+ P(o, 17, () => S(U).bars, C, (e, t) => {
3474
+ var n = Rr();
3475
+ h(() => {
3476
+ D(n, "x", S(t).x), D(n, "y", S(t).y), D(n, "width", S(t).w), D(n, "height", S(t).h), D(n, "fill", S(t).color);
3477
+ }), A(e, n);
3478
+ });
3479
+ var s = w(o), c = w(s), l = w(c), u = w(l), d = w(u);
3480
+ O(i), O(r), h((e, r) => {
3481
+ D(i, "viewBox", `0 0 ${S(U).width} ${S(U).height}`), D(i, "aria-label", S(z).rangeBrush), D(i, "aria-valuemax", e), D(i, "aria-valuenow", I()?.i0 ?? 0), D(i, "aria-valuetext", r), D(s, "x", S(U).plot.x), D(s, "y", S(U).plot.y), D(s, "width", S(t) - S(U).plot.x), D(s, "height", S(U).plot.h), D(c, "x", S(t) + S(n)), D(c, "y", S(U).plot.y), D(c, "width", S(U).plot.x + S(U).plot.w - (S(t) + S(n))), D(c, "height", S(U).plot.h), D(l, "x", S(t)), D(l, "y", S(U).plot.y), D(l, "width", S(n)), D(l, "height", S(U).plot.h), D(u, "x", S(t) - 4), D(u, "y", S(U).plot.y), D(u, "height", S(U).plot.h), D(d, "x", S(t) + S(n) - 4), D(d, "y", S(U).plot.y), D(d, "height", S(U).plot.h);
3482
+ }, [() => Math.max(0, S(B).categories.length - 1), () => et(S(z).brushRange, {
3483
+ from: S(B).categories[I()?.i0 ?? 0] ?? "",
3484
+ to: S(B).categories[I()?.i1 ?? S(B).categories.length - 1] ?? ""
3485
+ })]), g("pointermove", i, Va), g("keydown", i, Vs), g("pointerdown", l, (e) => Ba(e, "move")), g("pointerup", l, Ha), v("pointercancel", l, Ha), g("pointerdown", u, (e) => Ba(e, "left")), g("pointerup", u, Ha), v("pointercancel", u, Ha), g("pointerdown", d, (e) => Ba(e, "right")), g("pointerup", d, Ha), v("pointercancel", d, Ha), ge(r, "clientHeight", (e) => T(pi, e)), A(e, r);
3486
+ };
3487
+ m(pl, (e) => {
3488
+ S(Fa) && S(U) && e(ml);
3489
+ });
3490
+ var hl = w(pl, 2), gl = (e) => {
3491
+ var t = Br(), n = M(t, !0);
3492
+ O(t), h(() => b(n, S(z).noData)), A(e, t);
3493
+ };
3494
+ m(hl, (e) => {
3495
+ S(Zo) && e(gl);
3496
+ });
3497
+ var _l = w(hl, 2), vl = (e) => {
3498
+ var t = p(), n = _(t);
3499
+ oe(n, () => S(Ws), (e, t) => {
3500
+ t(e, {
3501
+ get items() {
3502
+ return S(Js);
3503
+ },
3504
+ get x() {
3505
+ return S(Us).x;
3506
+ },
3507
+ get y() {
3508
+ return S(Us).y;
3509
+ },
3510
+ onClose: () => T(Us, null)
3511
+ });
3512
+ }), A(e, t);
3513
+ };
3514
+ m(_l, (e) => {
3515
+ S(Us) && S(Ws) && e(vl);
3516
+ });
3517
+ var yl = w(_l, 2), bl = (e) => {
3518
+ var t = Vr();
3519
+ me(t), de(() => ve(t, () => S(pa), (e) => T(pa, e))), be(t, (e) => ka?.(e)), h(() => {
3520
+ D(t, "placeholder", S(z).noteText), D(t, "aria-label", S(z).noteText), N(t, `left:${S(fa).left}px; top:${S(fa).top}px;`);
3521
+ }), g("keydown", t, (e) => {
3522
+ e.key === "Enter" ? (e.preventDefault(), ma()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), T(fa, null), T(pa, ""));
3523
+ }), v("blur", t, ma), A(e, t);
3524
+ };
3525
+ m(yl, (e) => {
3526
+ S(fa) && e(bl);
3527
+ });
3528
+ var xl = w(yl, 2), Sl = (e) => {
3529
+ var t = Kr();
3530
+ let n;
3531
+ var r = M(t), i = (e) => {
3532
+ var t = p(), n = _(t);
3533
+ se(n, () => f.tooltip, () => S(ls).ctx), A(e, t);
3534
+ }, a = (e) => {
3535
+ var t = Gr(), n = _(t), r = M(n, !0);
3536
+ O(n);
3537
+ var i = w(n, 2);
3538
+ P(i, 17, () => S(ls).rows, C, (e, t) => {
3539
+ var n = Wr(), r = M(n), i = (e) => {
3540
+ var n = Hr();
3541
+ h(() => N(n, `background:${S(t).color}`)), A(e, n);
3542
+ };
3543
+ m(r, (e) => {
3544
+ S(t).color && e(i);
3545
+ });
3546
+ var a = w(r, 2), o = (e) => {
3547
+ var n = Ur(), r = M(n, !0);
3548
+ O(n), h(() => b(r, S(t).label)), A(e, n);
3549
+ };
3550
+ m(a, (e) => {
3551
+ S(t).label && e(o);
3552
+ });
3553
+ var s = w(a, 2), c = M(s, !0);
3554
+ O(s), O(n), h(() => b(c, S(t).value)), A(e, n);
3555
+ }), h(() => b(r, S(ls).title)), A(e, t);
3556
+ };
3557
+ m(r, (e) => {
3558
+ f.tooltip ? e(i) : e(a, -1);
3559
+ }), O(t), h(() => {
3560
+ n = F(t, 1, "sv-grid-chart-tooltip svelte-kvdein", null, n, {
3561
+ "is-below": S(ls).below,
3562
+ "is-custom": !!f.tooltip,
3563
+ "is-fixed": S(ls).fixed,
3564
+ "is-right": Se() === "top-right" || Se() === "bottom-right",
3565
+ "is-bottom": Se() === "bottom-left" || Se() === "bottom-right",
3566
+ "is-pinned": !!S(us)
3567
+ }), N(t, `left:${S(ls).left}px; top:${S(ls).top}px;`);
3568
+ }), A(e, t);
3569
+ };
3570
+ m(xl, (e) => {
3571
+ S(ls) && e(Sl);
3572
+ });
3573
+ var Cl = w(xl, 2), wl = (e) => {
3574
+ var t = Xr();
3575
+ let n;
3576
+ var r = M(t);
3577
+ P(r, 19, () => S(Xo), (e) => e.label, (e, t, n) => {
3578
+ var r = Jr();
3579
+ let i;
3580
+ var a = M(r), o = (e) => {
3581
+ var r = p(), i = _(r);
3582
+ se(i, () => f.legendItem, () => ({
3583
+ label: S(t).label,
3584
+ color: S(t).color,
3585
+ off: S(t).off,
3586
+ index: S(n)
3587
+ })), A(e, r);
3588
+ }, s = (e) => {
3589
+ var n = qr(), r = _(n), i = w(r);
3590
+ h(() => {
3591
+ N(r, `background:${S(t).off ? "transparent" : S(t).color}; border-color:${S(t).color}`), b(i, ` ${S(t).label ?? ""}`);
3592
+ }), A(e, n);
3593
+ };
3594
+ m(a, (e) => {
3595
+ f.legendItem ? e(o) : e(s, -1);
3596
+ }), O(r), h(() => {
3597
+ i = F(r, 1, "sv-grid-chart-legend-item svelte-kvdein", null, i, {
3598
+ "is-off": S(t).off,
3599
+ "is-isolated": S(Ei) === S(t).label
3600
+ }), r.disabled = !y() || !S(qo), D(r, "aria-pressed", S(qo) ? !S(t).off : void 0), D(r, "title", y() ? `${S(t).off ? S(z).showSeries : S(z).hideSeries} ${S(t).label} \u00b7 ${S(z).isolateHint}` : S(t).label);
3601
+ }), g("click", r, () => $o(S(t).label)), g("dblclick", r, () => es(S(t).label)), v("pointerenter", r, () => y() && T(Oi, S(t).label, !0)), v("pointerleave", r, () => T(Oi, null)), A(e, r);
3602
+ });
3603
+ var i = w(r, 2), a = (e) => {
3604
+ var t = Yr(), n = M(t, !0);
3605
+ O(t), h((e) => b(n, e), [() => S(Jo) ? S(z).showLess : et(S(z).showMore, { n: S(Ho).length - 10 })]), g("click", t, () => T(Jo, !S(Jo))), A(e, t);
3606
+ };
3607
+ m(i, (e) => {
3608
+ S(Yo) && e(a);
3609
+ }), O(t), h(() => n = F(t, 1, "sv-grid-chart-legend svelte-kvdein", null, n, { "is-vertical": S(li) })), ge(t, "clientWidth", (e) => T(di, e)), ge(t, "clientHeight", (e) => T(fi, e)), A(e, t);
3610
+ };
3611
+ m(Cl, (e) => {
3612
+ S(ci) && S(Ho).length && e(wl);
3613
+ });
3614
+ var Tl = w(Cl, 2), El = (e) => {
3615
+ var t = Zr(), n = M(t, !0);
3616
+ O(t), h(() => b(n, S(Vo))), A(e, t);
3617
+ };
3618
+ m(Tl, (e) => {
3619
+ ze() && e(El);
3620
+ });
3621
+ var Dl = w(Tl, 2), Ol = M(Dl), kl = M(Ol), Al = M(kl, !0), jl = w(Al), Ml = (e) => {
3622
+ var t = le();
3623
+ h((e) => b(t, e), [() => et(S(z).dataTableCapped, {
3624
+ shown: Oo,
3625
+ total: S(ns).rows.length
3626
+ })]), A(e, t);
3627
+ };
3628
+ m(jl, (e) => {
3629
+ S(rs) && e(Ml);
3630
+ });
3631
+ var Nl = w(jl), Pl = (e) => {
3632
+ var t = le();
3633
+ h(() => b(t, `. ${S(Ye) ?? ""}`)), A(e, t);
3634
+ };
3635
+ m(Nl, (e) => {
3636
+ Be() && S(Ye) && e(Pl);
3637
+ }), O(kl);
3638
+ var Fl = w(kl), Il = M(Fl);
3639
+ P(Il, 20, () => S(ns).cols, (e) => e, (e, t) => {
3640
+ var n = Qr(), r = M(n, !0);
3641
+ O(n), h(() => b(r, t)), A(e, n);
3642
+ }), O(Il), O(Fl);
3643
+ var Ll = w(Fl);
3644
+ P(Ll, 21, () => S(is), C, (e, t) => {
3645
+ var n = ei();
3646
+ P(n, 21, () => S(t), C, (e, t) => {
3647
+ var n = $r(), r = M(n, !0);
3648
+ O(n), h(() => b(r, S(t))), A(e, n);
3649
+ }), O(n), A(e, n);
3650
+ }), O(Ll), O(Ol), O(Dl), O(rc), pe(rc, (e) => T(ss, e), () => S(ss)), h((e, a, o) => {
3651
+ t = F($, 0, "sv-grid-chart-svg svelte-kvdein", null, t, {
3652
+ "is-interactive": y(),
3653
+ "is-clickable": !!f.onSelect || !!f.onDrill,
3654
+ "is-zoomable": !!S(vi)?.drag && S(K) && !S(xi) && !S(yi),
3655
+ "is-pannable": !!S(vi)?.pan && S(K) && S(Ii) && S(yi),
3656
+ "is-annotating": S(xi),
3657
+ "is-dragging": !!S(Zi),
3658
+ "is-drawing": !!S(la)
3659
+ }), D($, "viewBox", `0 0 ${S(G).width} ${S(G).height}`), D($, "role", y() ? "group" : "img"), D($, "aria-label", a), D($, "aria-description", Be() && S(Ye) ? S(Ye) : void 0), D($, "aria-describedby", `${Ai}-table`), n = N($, "", n, { height: Ke() ? `${S(gi) ?? S(B).height ?? 300}px` : null }), r = F(bc, 0, "sv-grid-chart-marks svelte-kvdein", null, r, {
3660
+ "is-enter-grow": S(ao) === "grow",
3661
+ "is-enter-none": S(ao) === "none"
3662
+ }), D(bc, "clip-path", S(K) ? `url(#${Ai}-plot)` : void 0), i = F(Mc, 0, "sv-grid-chart-marks svelte-kvdein", null, i, {
3663
+ "is-enter-grow": S(ao) === "grow",
3664
+ "is-enter-none": S(ao) === "none"
3665
+ }), D(Mc, "clip-path", S(K) ? `url(#${Ai}-plot)` : void 0), D(Ol, "id", `${Ai}-table`), b(Al, o);
3666
+ }, [
3667
+ () => ee(S(B).style) || void 0,
3668
+ () => et(S(z).chartLabel, { type: S(B).type }),
3669
+ () => et(S(z).dataTable, { type: S(B).type })
3670
+ ]), g("pointerdown", $, na), g("pointermove", $, (e) => {
3671
+ ra(e), Ca(e);
3672
+ }), g("pointerup", $, (e) => {
3673
+ ia(e), T(ha, null);
3674
+ }), v("pointercancel", $, (e) => {
3675
+ ia(e), T(ha, null);
3676
+ }), g("click", $, Sa), g("keydown", $, Ea), v("wheel", $, Gi), g("contextmenu", $, Gs), g("dblclick", $, aa), ge(rc, "clientWidth", (e) => T(ni, e)), ge(rc, "clientHeight", (e) => T(ri, e));
3677
+ }
3678
+ return h((e, t, n) => {
3679
+ ic = F(rc, 1, "sv-grid-chart svelte-kvdein", null, ic, {
3680
+ "is-autosize": Ke(),
3681
+ "is-legend-top": S(ci) === "top",
3682
+ "is-legend-left": S(ci) === "left",
3683
+ "is-legend-right": S(ci) === "right"
3684
+ }), N(rc, e);
3685
+ }, [
3686
+ () => ee(S(B).style) || void 0,
3687
+ () => et(S(z).chartLabel, { type: S(B).type }),
3688
+ () => et(S(z).dataTable, { type: S(B).type })
3689
+ ]), A(ne, rc), ye(nc);
3690
+ }
3691
+ ce([
3692
+ "click",
3693
+ "pointerdown",
3694
+ "pointermove",
3695
+ "pointerup",
3696
+ "keydown",
3697
+ "contextmenu",
3698
+ "dblclick",
3699
+ "mousemove"
3700
+ ]);
3701
+ //#endregion
3702
+ export { Ze as a, We as i, Xe as n, Je as o, qe as r, Ke as s, ni as t };