@svgrid/grid-wc 2.2.1 → 2.5.0

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.
@@ -1,6 +1,6 @@
1
- import { A as e, B as t, C as n, D as r, F as i, G as a, I as o, K as s, L as c, N as l, O as u, P as d, Q as f, T as p, V as m, X as h, Y as g, _ as ee, a as te, d as _, et as v, f as y, g as b, h as x, j as S, n as ne, nt as C, o as w, q as T, rt as E, s as D, tt as re, u as O, v as k, x as A } from "./client-DOa609yZ.js";
2
- import { t as ie } from "./SvGridChart-EY7OOxv6.js";
3
- //#region ../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/transition/index.js
1
+ import { $ as e, E as t, F as n, H as r, I as i, J as a, K as o, L as s, M as c, O as l, P as u, R as d, S as f, V as p, X as m, Z as h, _ as g, a as ee, d as _, f as v, g as y, it as b, j as x, k as S, n as C, nt as te, o as w, p as T, q as ne, rt as E, s as D, tt as re, v as O, w as k, y as A } from "./client-DoXxrq8q.js";
2
+ import { t as ie } from "./SvGridChart-BztTavvw.js";
3
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/transition/index.js
4
4
  function j(e) {
5
5
  let t = e - 1;
6
6
  return t * t * t + 1;
@@ -21,7 +21,7 @@ function N(e, { delay: t = 0, duration: n = 400, easing: r = j, x: i = 0, y: a =
21
21
  };
22
22
  }
23
23
  //#endregion
24
- //#region ../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/easing/index.js
24
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/easing/index.js
25
25
  function P(e) {
26
26
  let t = e - 1;
27
27
  return t * t * t + 1;
@@ -123,41 +123,41 @@ function ce(e, t = "chart.csv") {
123
123
  }
124
124
  //#endregion
125
125
  //#region ../grid/dist/SvGridChartPanel.svelte
126
- var le = e("<div role=\"separator\" aria-label=\"Resize chart panel\"></div>"), ue = e("<button type=\"button\" class=\"sv-grid-chart-btn\">Clear filter</button>"), de = S("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>"), fe = S("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>"), pe = e("<div class=\"sv-grid-chart-export-menu\" role=\"menu\"><button type=\"button\" role=\"menuitem\">PNG image</button> <button type=\"button\" role=\"menuitem\">SVG vector</button> <button type=\"button\" role=\"menuitem\">CSV data</button> <button type=\"button\" role=\"menuitem\">Copy to clipboard</button></div>"), me = e("<button type=\"button\" aria-label=\"Chart with AI\" title=\"Chart with AI\"><svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12 2l1.9 4.6L18.5 8.5 13.9 10.4 12 15l-1.9-4.6L5.5 8.5l4.6-1.9L12 2zm6 11l1 2.4 2.4 1-2.4 1L18 21l-1-2.6-2.4-1 2.4-1L18 13zM6 14l.8 2 2 .8-2 .8L6 20l-.8-2.4-2-.8 2-.8L6 14z\"></path></svg> AI</button>"), he = e("<button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Add chart\" title=\"Add chart\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line></svg></button>"), ge = S("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3v3a2 2 0 0 1-2 2H3\"></path><path d=\"M21 8h-3a2 2 0 0 1-2-2V3\"></path><path d=\"M3 16h3a2 2 0 0 1 2 2v3\"></path><path d=\"M16 21v-3a2 2 0 0 1 2-2h3\"></path></svg>"), _e = S("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3H5a2 2 0 0 0-2 2v3\"></path><path d=\"M21 8V5a2 2 0 0 0-2-2h-3\"></path><path d=\"M3 16v3a2 2 0 0 0 2 2h3\"></path><path d=\"M16 21h3a2 2 0 0 0 2-2v-3\"></path></svg>"), ve = e("<button type=\"button\" class=\"sv-grid-chart-icon-btn\"><!></button> <button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Dock chart\" title=\"Dock\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg></button>", 1), ye = e("<button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Pop out chart\" title=\"Pop out\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M15 3h6v6\"></path><path d=\"M10 14 21 3\"></path><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path></svg></button>"), be = e("<div><button type=\"button\" class=\"sv-grid-chart-tab-label\" role=\"tab\"> </button> <button type=\"button\" class=\"sv-grid-chart-tab-x\" title=\"Remove\">&times;</button></div>"), xe = e("<div class=\"sv-grid-chart-tabs\" role=\"tablist\" aria-label=\"Charts\"></div>"), Se = e("<p class=\"sv-grid-chart-ai-msg is-error\"> </p>"), Ce = e("<p class=\"sv-grid-chart-ai-msg\"> </p>"), we = e("<div class=\"sv-grid-chart-ai\"><form class=\"sv-grid-chart-ai-row\"><input class=\"sv-grid-chart-ai-input\" type=\"text\" placeholder=\"Describe a chart, e.g. revenue by region stacked by product\"/> <button type=\"submit\" class=\"sv-grid-chart-btn\"> </button></form> <!></div>"), Te = e("<option> </option>"), Ee = e("<option> </option>"), De = e("<option> </option>"), Oe = e("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Split by</span> <select><option>(none)</option><!></select></label>"), ke = e("<option> </option>"), Ae = e("<option> </option>"), je = e("<option> </option>"), Me = e("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> Stacked</label>"), Ne = e("<label class=\"sv-grid-chart-toggle\" title=\"Logarithmic value axis - flattens wide-range data\"><input type=\"checkbox\"/> Log scale</label>"), Pe = e("<label class=\"sv-grid-chart-toggle\" title=\"Space points by actual date - real time ticks and proportional gaps\"><input type=\"checkbox\"/> Date axis</label>"), Fe = e("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Type</span> <select></select></label> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Group by</span> <select></select></label> <!> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Value</span> <select></select></label> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Aggregate</span> <select></select></label> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Format</span> <select></select></label> <!> <label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> Labels</label> <!> <!>", 1), Ie = e("<p class=\"sv-grid-chart-empty\"><!></p>"), Le = e("<div class=\"sv-grid-chart-float-resizer\" role=\"separator\" aria-label=\"Resize chart window\"></div>"), Re = e("<section aria-label=\"Chart\"><!> <header class=\"sv-grid-chart-panel-head\"><div><svg class=\"sv-grid-chart-title-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"20\" x2=\"12\" y2=\"10\"></line><line x1=\"18\" y1=\"20\" x2=\"18\" y2=\"4\"></line><line x1=\"6\" y1=\"20\" x2=\"6\" y2=\"16\"></line></svg> <span class=\"sv-grid-chart-title\">Chart</span> <div class=\"sv-grid-chart-actions\"><!> <div class=\"sv-grid-chart-export\"><button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Export chart\" title=\"Export\"><!></button> <!></div> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-close\" aria-label=\"Close chart\">&times;</button></div></div> <!> <!> <div class=\"sv-grid-chart-controls\"><!></div></header> <div class=\"sv-grid-chart-panel-body\"><!></div> <!></section>");
127
- function V(e, d) {
128
- re(d, !0);
129
- let S = ne(d, "ctrl", 7), j = f(() => S().chartingConfig), M = f(() => S().chartCfg), F = f(() => S().chartIsCustom), I = f(() => c(j)?.position ?? "bottom"), L = f(() => c(j)?.crossFilter !== !1), R = f(() => S().chartSpec), z = f(() => S().chartableColumns), B = f(() => S().chartSize ?? (c(I) === "right" ? c(j)?.width ?? 340 : c(j)?.height ?? 260)), V = f(() => S().chartFloating), H = f(() => S().chartMaximized), U = f(() => S().chartFloatRect), ze = h(null);
126
+ var le = x("<div role=\"separator\" aria-label=\"Resize chart panel\"></div>"), ue = x("<button type=\"button\" class=\"sv-grid-chart-btn\">Clear filter</button>"), de = c("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>"), fe = c("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>"), pe = x("<div class=\"sv-grid-chart-export-menu\" role=\"menu\"><button type=\"button\" role=\"menuitem\">PNG image</button> <button type=\"button\" role=\"menuitem\">SVG vector</button> <button type=\"button\" role=\"menuitem\">CSV data</button> <button type=\"button\" role=\"menuitem\">Copy to clipboard</button></div>"), me = x("<button type=\"button\" aria-label=\"Chart with AI\" title=\"Chart with AI\"><svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12 2l1.9 4.6L18.5 8.5 13.9 10.4 12 15l-1.9-4.6L5.5 8.5l4.6-1.9L12 2zm6 11l1 2.4 2.4 1-2.4 1L18 21l-1-2.6-2.4-1 2.4-1L18 13zM6 14l.8 2 2 .8-2 .8L6 20l-.8-2.4-2-.8 2-.8L6 14z\"></path></svg> AI</button>"), he = x("<button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Add chart\" title=\"Add chart\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line></svg></button>"), ge = c("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3v3a2 2 0 0 1-2 2H3\"></path><path d=\"M21 8h-3a2 2 0 0 1-2-2V3\"></path><path d=\"M3 16h3a2 2 0 0 1 2 2v3\"></path><path d=\"M16 21v-3a2 2 0 0 1 2-2h3\"></path></svg>"), _e = c("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3H5a2 2 0 0 0-2 2v3\"></path><path d=\"M21 8V5a2 2 0 0 0-2-2h-3\"></path><path d=\"M3 16v3a2 2 0 0 0 2 2h3\"></path><path d=\"M16 21h3a2 2 0 0 0 2-2v-3\"></path></svg>"), ve = x("<button type=\"button\" class=\"sv-grid-chart-icon-btn\"><!></button> <button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Dock chart\" title=\"Dock\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg></button>", 1), ye = x("<button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Pop out chart\" title=\"Pop out\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M15 3h6v6\"></path><path d=\"M10 14 21 3\"></path><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path></svg></button>"), be = x("<div><button type=\"button\" class=\"sv-grid-chart-tab-label\" role=\"tab\"> </button> <button type=\"button\" class=\"sv-grid-chart-tab-x\" title=\"Remove\">&times;</button></div>"), xe = x("<div class=\"sv-grid-chart-tabs\" role=\"tablist\" aria-label=\"Charts\"></div>"), Se = x("<p class=\"sv-grid-chart-ai-msg is-error\"> </p>"), Ce = x("<p class=\"sv-grid-chart-ai-msg\"> </p>"), we = x("<div class=\"sv-grid-chart-ai\"><form class=\"sv-grid-chart-ai-row\"><input class=\"sv-grid-chart-ai-input\" type=\"text\" placeholder=\"Describe a chart, e.g. revenue by region stacked by product\"/> <button type=\"submit\" class=\"sv-grid-chart-btn\"> </button></form> <!></div>"), Te = x("<option> </option>"), Ee = x("<option> </option>"), De = x("<option> </option>"), Oe = x("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Split by</span> <select><option>(none)</option><!></select></label>"), ke = x("<option> </option>"), Ae = x("<option> </option>"), je = x("<option> </option>"), Me = x("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> Stacked</label>"), Ne = x("<label class=\"sv-grid-chart-toggle\" title=\"Logarithmic value axis - flattens wide-range data\"><input type=\"checkbox\"/> Log scale</label>"), Pe = x("<label class=\"sv-grid-chart-toggle\" title=\"Space points by actual date - real time ticks and proportional gaps\"><input type=\"checkbox\"/> Date axis</label>"), Fe = x("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Type</span> <select></select></label> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Group by</span> <select></select></label> <!> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Value</span> <select></select></label> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Aggregate</span> <select></select></label> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\">Format</span> <select></select></label> <!> <label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> Labels</label> <!> <!>", 1), Ie = x("<p class=\"sv-grid-chart-empty\"><!></p>"), Le = x("<div class=\"sv-grid-chart-float-resizer\" role=\"separator\" aria-label=\"Resize chart window\"></div>"), Re = x("<section aria-label=\"Chart\"><!> <header class=\"sv-grid-chart-panel-head\"><div><svg class=\"sv-grid-chart-title-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"20\" x2=\"12\" y2=\"10\"></line><line x1=\"18\" y1=\"20\" x2=\"18\" y2=\"4\"></line><line x1=\"6\" y1=\"20\" x2=\"6\" y2=\"16\"></line></svg> <span class=\"sv-grid-chart-title\">Chart</span> <div class=\"sv-grid-chart-actions\"><!> <div class=\"sv-grid-chart-export\"><button type=\"button\" class=\"sv-grid-chart-icon-btn\" aria-label=\"Export chart\" title=\"Export\"><!></button> <!></div> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-close\" aria-label=\"Close chart\">&times;</button></div></div> <!> <!> <div class=\"sv-grid-chart-controls\"><!></div></header> <div class=\"sv-grid-chart-panel-body\"><!></div> <!></section>");
127
+ function V(n, c) {
128
+ te(c, !0);
129
+ let x = C(c, "ctrl", 7), j = e(() => x().chartingConfig), M = e(() => x().chartCfg), F = e(() => x().chartIsCustom), I = e(() => d(j)?.position ?? "bottom"), L = e(() => d(j)?.crossFilter !== !1), R = e(() => x().chartSpec), z = e(() => x().chartableColumns), B = e(() => x().chartSize ?? (d(I) === "right" ? d(j)?.width ?? 340 : d(j)?.height ?? 260)), V = e(() => x().chartFloating), H = e(() => x().chartMaximized), U = e(() => x().chartFloatRect), ze = h(null);
130
130
  function Be() {
131
- let e = c(ze)?.offsetParent;
131
+ let e = d(ze)?.offsetParent;
132
132
  return {
133
133
  w: e?.clientWidth ?? 800,
134
134
  h: e?.clientHeight ?? 520
135
135
  };
136
136
  }
137
137
  function Ve() {
138
- if (!S().chartFloatRect) {
138
+ if (!x().chartFloatRect) {
139
139
  let { w: e, h: t } = Be(), n = Math.min(600, Math.max(360, e - 80)), r = Math.min(430, Math.max(260, t - 90));
140
- S().chartFloatRect = {
140
+ x().chartFloatRect = {
141
141
  x: Math.round((e - n) / 2),
142
142
  y: Math.round((t - r) / 2),
143
143
  w: n,
144
144
  h: r
145
145
  };
146
146
  }
147
- S().chartFloating = !0;
147
+ x().chartFloating = !0;
148
148
  }
149
149
  function He() {
150
- S().chartFloating = !1, S().chartMaximized = !1;
150
+ x().chartFloating = !1, x().chartMaximized = !1;
151
151
  }
152
- let Ue = () => S().chartMaximized = !S().chartMaximized;
152
+ let Ue = () => x().chartMaximized = !x().chartMaximized;
153
153
  function We(e) {
154
- if (!c(V) || c(H) || e.target?.closest("button")) return;
155
- let t = S().chartFloatRect;
154
+ if (!d(V) || d(H) || e.target?.closest("button")) return;
155
+ let t = x().chartFloatRect;
156
156
  if (!t) return;
157
157
  e.preventDefault();
158
158
  let n = e.clientX, r = e.clientY, { w: i, h: a } = Be(), o = (e) => {
159
159
  let o = Math.max(0, Math.min(i - t.w, t.x + e.clientX - n)), s = Math.max(0, Math.min(a - t.h, t.y + e.clientY - r));
160
- S().chartFloatRect = {
160
+ x().chartFloatRect = {
161
161
  x: o,
162
162
  y: s,
163
163
  w: t.w,
@@ -169,13 +169,13 @@ function V(e, d) {
169
169
  window.addEventListener("pointermove", o), window.addEventListener("pointerup", s);
170
170
  }
171
171
  function Ge(e) {
172
- let t = S().chartFloatRect;
172
+ let t = x().chartFloatRect;
173
173
  if (!t) return;
174
174
  e.preventDefault(), e.stopPropagation();
175
175
  let n = e.clientX, r = e.clientY;
176
176
  e.target.setPointerCapture?.(e.pointerId);
177
177
  let i = (e) => {
178
- S().chartFloatRect = {
178
+ x().chartFloatRect = {
179
179
  x: t.x,
180
180
  y: t.y,
181
181
  w: Math.max(300, t.w + e.clientX - n),
@@ -186,7 +186,7 @@ function V(e, d) {
186
186
  };
187
187
  window.addEventListener("pointermove", i), window.addEventListener("pointerup", a);
188
188
  }
189
- let Ke = f(() => c(V) ? c(H) ? "left:12px; top:12px; right:12px; bottom:12px; width:auto; height:auto;" : c(U) ? `left:${c(U).x}px; top:${c(U).y}px; width:${c(U).w}px; height:${c(U).h}px;` : "" : c(I) === "right" ? `width:${c(B)}px` : `height:${c(B)}px`), qe = h(0), Je = h(0), Ye = f(() => c(R) ? c(R).type === "pie" ? c(R).categories.length : c(R).series.length : 0), Xe = f(() => (c(Ye) > 1 ? 36 : 0) + (c(M)?.export === !0 ? 30 : 0)), Ze = f(() => c(qe) > 24 ? c(qe) - 8 : void 0), Qe = f(() => c(Je) > 24 ? Math.max(120, c(Je) - 8 - c(Xe)) : void 0), $e = [
189
+ let Ke = e(() => d(V) ? d(H) ? "left:12px; top:12px; right:12px; bottom:12px; width:auto; height:auto;" : d(U) ? `left:${d(U).x}px; top:${d(U).y}px; width:${d(U).w}px; height:${d(U).h}px;` : "" : d(I) === "right" ? `width:${d(B)}px` : `height:${d(B)}px`), qe = h(0), Je = h(0), Ye = e(() => d(R) ? d(R).type === "pie" ? d(R).categories.length : d(R).series.length : 0), Xe = e(() => (d(Ye) > 1 ? 36 : 0) + (d(M)?.export === !0 ? 30 : 0)), Ze = e(() => d(qe) > 24 ? d(qe) - 8 : void 0), Qe = e(() => d(Je) > 24 ? Math.max(120, d(Je) - 8 - d(Xe)) : void 0), $e = [
190
190
  {
191
191
  value: "bar",
192
192
  label: "Bar"
@@ -231,343 +231,351 @@ function V(e, d) {
231
231
  }
232
232
  ];
233
233
  function nt(e) {
234
- c(L) && e.category != null && S().applyChartCrossFilter(String(e.category));
234
+ d(L) && e.category != null && x().applyChartCrossFilter(String(e.category));
235
235
  }
236
- let rt = h(null), W = h(!1), it = h(!1), at = () => c(rt)?.querySelector("svg") ?? null, ot = f(() => !!(c(R) && c(R).categories?.length && c(R).series?.length));
236
+ let rt = h(null), W = h(!1), it = h(!1), at = () => d(rt)?.querySelector("svg") ?? null, ot = e(() => !!(d(R) && d(R).categories?.length && d(R).series?.length));
237
237
  function st() {
238
238
  let e = at();
239
- e && se(e, "chart.png"), g(W, !1);
239
+ e && se(e, "chart.png"), m(W, !1);
240
240
  }
241
241
  function ct() {
242
242
  let e = at();
243
- e && ae(e, "chart.svg"), g(W, !1);
243
+ e && ae(e, "chart.svg"), m(W, !1);
244
244
  }
245
245
  function lt() {
246
- c(R) && ce(c(R), "chart.csv"), g(W, !1);
246
+ d(R) && ce(d(R), "chart.csv"), m(W, !1);
247
247
  }
248
248
  async function ut() {
249
249
  let e = at();
250
- if (g(W, !1), !(!e || typeof ClipboardItem > "u" || !navigator.clipboard?.write)) try {
250
+ if (m(W, !1), !(!e || typeof ClipboardItem > "u" || !navigator.clipboard?.write)) try {
251
251
  let t = await oe(e);
252
- await navigator.clipboard.write([new ClipboardItem({ "image/png": t })]), g(it, !0), setTimeout(() => g(it, !1), 1400);
252
+ await navigator.clipboard.write([new ClipboardItem({ "image/png": t })]), m(it, !0), setTimeout(() => m(it, !1), 1400);
253
253
  } catch {}
254
254
  }
255
- m(() => {
256
- if (!c(W)) return;
255
+ r(() => {
256
+ if (!d(W)) return;
257
257
  let e = (e) => {
258
- e.target?.closest(".sv-grid-chart-export") || g(W, !1);
258
+ e.target?.closest(".sv-grid-chart-export") || m(W, !1);
259
259
  };
260
260
  return window.addEventListener("pointerdown", e), () => window.removeEventListener("pointerdown", e);
261
261
  });
262
- let dt = f(() => !!S().chartAiHandler), G = h(!1), K = h(""), q = h(!1), J = h(""), Y = h("");
262
+ let dt = e(() => !!x().chartAiHandler), G = h(!1), K = h(""), q = h(!1), J = h(""), Y = h("");
263
263
  async function ft() {
264
- let e = S().chartAiHandler, t = c(K).trim();
265
- if (!(!e || !t || c(q))) {
266
- g(q, !0), g(J, ""), g(Y, "");
264
+ let e = x().chartAiHandler, t = d(K).trim();
265
+ if (!(!e || !t || d(q))) {
266
+ m(q, !0), m(J, ""), m(Y, "");
267
267
  try {
268
268
  let n = await e(t);
269
- n ? (S().applyChartConfig(n), g(Y, typeof n.rationale == "string" ? n.rationale : "", !0)) : g(J, "Couldn't build a chart from that request.");
269
+ n ? (x().applyChartConfig(n), m(Y, typeof n.rationale == "string" ? n.rationale : "", !0)) : m(J, "Couldn't build a chart from that request.");
270
270
  } catch (e) {
271
- g(J, e instanceof Error ? e.message : "Something went wrong.", !0);
271
+ m(J, e instanceof Error ? e.message : "Something went wrong.", !0);
272
272
  } finally {
273
- g(q, !1);
273
+ m(q, !1);
274
274
  }
275
275
  }
276
276
  }
277
277
  let pt = h(!1);
278
278
  function mt(e) {
279
- e.preventDefault(), g(pt, !0);
280
- let t = c(I) === "right" ? e.clientX : e.clientY, n = c(B);
279
+ e.preventDefault(), m(pt, !0);
280
+ let t = d(I) === "right" ? e.clientX : e.clientY, n = d(B);
281
281
  e.target.setPointerCapture?.(e.pointerId);
282
282
  let r = (e) => {
283
- let r = c(I) === "right" ? t - e.clientX : t - e.clientY;
284
- S().chartSize = Math.max(160, Math.min(720, n + r));
283
+ let r = d(I) === "right" ? t - e.clientX : t - e.clientY;
284
+ x().chartSize = Math.max(160, Math.min(720, n + r));
285
285
  }, i = () => {
286
- g(pt, !1), window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i);
286
+ m(pt, !1), window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i);
287
287
  };
288
288
  window.addEventListener("pointermove", r), window.addEventListener("pointerup", i);
289
289
  }
290
290
  var X = Re();
291
291
  let ht;
292
- var gt = a(X), _t = (e) => {
293
- var n = le();
294
- let r;
295
- t(() => {
296
- r = k(n, 1, "sv-grid-chart-resizer", null, r, { "is-dragging": c(pt) }), _(n, "aria-orientation", c(I) === "right" ? "vertical" : "horizontal");
297
- }), i("pointerdown", n, mt), u(e, n);
292
+ var gt = o(X), _t = (e) => {
293
+ var t = le();
294
+ let n;
295
+ p(() => {
296
+ n = A(t, 1, "sv-grid-chart-resizer", null, n, { "is-dragging": d(pt) }), v(t, "aria-orientation", d(I) === "right" ? "vertical" : "horizontal");
297
+ }), i("pointerdown", t, mt), S(e, t);
298
298
  };
299
- p(gt, (e) => {
300
- c(V) || e(_t);
299
+ t(gt, (e) => {
300
+ d(V) || e(_t);
301
301
  });
302
- var vt = T(gt, 2), Z = a(vt);
302
+ var vt = a(gt, 2), Z = o(vt);
303
303
  let yt;
304
- var bt = T(a(Z), 4), xt = a(bt), St = (e) => {
304
+ var bt = a(o(Z), 4), xt = o(bt), St = (e) => {
305
305
  var t = ue();
306
- i("click", t, () => S().clearChartCrossFilter()), u(e, t);
306
+ i("click", t, () => x().clearChartCrossFilter()), S(e, t);
307
307
  };
308
- p(xt, (e) => {
309
- c(L) && !c(F) && e(St);
308
+ t(xt, (e) => {
309
+ d(L) && !d(F) && e(St);
310
310
  });
311
- var Ct = T(xt, 2), Q = a(Ct), wt = a(Q), Tt = (e) => {
312
- u(e, de());
311
+ var Ct = a(xt, 2), Q = o(Ct), wt = o(Q), Tt = (e) => {
312
+ var t = de();
313
+ S(e, t);
313
314
  }, Et = (e) => {
314
- u(e, fe());
315
+ var t = fe();
316
+ S(e, t);
315
317
  };
316
- p(wt, (e) => {
317
- c(it) ? e(Tt) : e(Et, -1);
318
- }), E(Q);
319
- var Dt = T(Q, 2), Ot = (e) => {
320
- var n = pe(), r = a(n), o = T(r, 2), s = T(o, 2), l = T(s, 2);
321
- E(n), t(() => s.disabled = !c(ot)), i("click", r, st), i("click", o, ct), i("click", s, lt), i("click", l, ut), u(e, n);
318
+ t(wt, (e) => {
319
+ d(it) ? e(Tt) : e(Et, -1);
320
+ }), b(Q);
321
+ var Dt = a(Q, 2), Ot = (e) => {
322
+ var t = pe(), n = o(t), r = a(n, 2), s = a(r, 2), c = a(s, 2);
323
+ b(t), p(() => s.disabled = !d(ot)), i("click", n, st), i("click", r, ct), i("click", s, lt), i("click", c, ut), S(e, t);
322
324
  };
323
- p(Dt, (e) => {
324
- c(W) && e(Ot);
325
- }), E(Ct);
326
- var kt = T(Ct, 2), At = (e) => {
327
- var n = me();
328
- let r;
329
- t(() => {
330
- r = k(n, 1, "sv-grid-chart-btn sv-grid-chart-ai-btn", null, r, { "is-active": c(G) }), _(n, "aria-expanded", c(G));
331
- }), i("click", n, () => g(G, !c(G))), u(e, n);
325
+ t(Dt, (e) => {
326
+ d(W) && e(Ot);
327
+ }), b(Ct);
328
+ var kt = a(Ct, 2), At = (e) => {
329
+ var t = me();
330
+ let n;
331
+ p(() => {
332
+ n = A(t, 1, "sv-grid-chart-btn sv-grid-chart-ai-btn", null, n, { "is-active": d(G) }), v(t, "aria-expanded", d(G));
333
+ }), i("click", t, () => m(G, !d(G))), S(e, t);
332
334
  };
333
- p(kt, (e) => {
334
- c(dt) && !c(F) && e(At);
335
+ t(kt, (e) => {
336
+ d(dt) && !d(F) && e(At);
335
337
  });
336
- var jt = T(kt, 2), Mt = (e) => {
338
+ var jt = a(kt, 2), Mt = (e) => {
337
339
  var t = he();
338
- i("click", t, () => S().addChart()), u(e, t);
340
+ i("click", t, () => x().addChart()), S(e, t);
339
341
  };
340
- p(jt, (e) => {
341
- c(F) || e(Mt);
342
+ t(jt, (e) => {
343
+ d(F) || e(Mt);
342
344
  });
343
- var Nt = T(jt, 2), Pt = (e) => {
344
- var n = ve(), r = s(n), o = a(r), l = (e) => {
345
- u(e, ge());
346
- }, d = (e) => {
347
- u(e, _e());
345
+ var Nt = a(jt, 2), Pt = (e) => {
346
+ var n = ve(), r = ne(n), s = o(r), c = (e) => {
347
+ var t = ge();
348
+ S(e, t);
349
+ }, l = (e) => {
350
+ var t = _e();
351
+ S(e, t);
348
352
  };
349
- p(o, (e) => {
350
- c(H) ? e(l) : e(d, -1);
351
- }), E(r);
352
- var f = T(r, 2);
353
- t(() => {
354
- _(r, "aria-label", c(H) ? "Restore" : "Maximize"), _(r, "title", c(H) ? "Restore" : "Maximize");
355
- }), i("click", r, Ue), i("click", f, He), u(e, n);
353
+ t(s, (e) => {
354
+ d(H) ? e(c) : e(l, -1);
355
+ }), b(r);
356
+ var u = a(r, 2);
357
+ p(() => {
358
+ v(r, "aria-label", d(H) ? "Restore" : "Maximize"), v(r, "title", d(H) ? "Restore" : "Maximize");
359
+ }), i("click", r, Ue), i("click", u, He), S(e, n);
356
360
  }, Ft = (e) => {
357
361
  var t = ye();
358
- i("click", t, Ve), u(e, t);
362
+ i("click", t, Ve), S(e, t);
359
363
  };
360
- p(Nt, (e) => {
361
- c(V) ? e(Pt) : e(Ft, -1);
364
+ t(Nt, (e) => {
365
+ d(V) ? e(Pt) : e(Ft, -1);
362
366
  });
363
- var It = T(Nt, 2);
364
- E(bt), E(Z);
365
- var Lt = T(Z, 2), Rt = (e) => {
366
- var o = xe();
367
- n(o, 23, () => S().charts, (e) => e.id, (e, n, o) => {
368
- var s = be();
369
- let l;
370
- var d = a(s), f = a(d, !0);
371
- E(d);
372
- var p = T(d, 2);
373
- E(s), t(() => {
374
- l = k(s, 1, "sv-grid-chart-tab", null, l, { "is-active": c(o) === S().activeChartIndex }), _(d, "aria-selected", c(o) === S().activeChartIndex), r(f, c(n).title), _(p, "aria-label", `Remove ${c(n).title}`);
375
- }), i("click", d, () => S().activeChartIndex = c(o)), i("click", p, () => S().removeChart(c(o))), u(e, s);
376
- }), E(o), u(e, o);
367
+ var It = a(Nt, 2);
368
+ b(bt), b(Z);
369
+ var Lt = a(Z, 2), Rt = (e) => {
370
+ var t = xe();
371
+ k(t, 23, () => x().charts, (e) => e.id, (e, t, n) => {
372
+ var r = be();
373
+ let s;
374
+ var c = o(r), u = o(c, !0);
375
+ b(c);
376
+ var f = a(c, 2);
377
+ b(r), p(() => {
378
+ s = A(r, 1, "sv-grid-chart-tab", null, s, { "is-active": d(n) === x().activeChartIndex }), v(c, "aria-selected", d(n) === x().activeChartIndex), l(u, d(t).title), v(f, "aria-label", `Remove ${d(t).title}`);
379
+ }), i("click", c, () => x().activeChartIndex = d(n)), i("click", f, () => x().removeChart(d(n))), S(e, r);
380
+ }), b(t), S(e, t);
377
381
  };
378
- p(Lt, (e) => {
379
- !c(F) && S().charts.length > 1 && e(Rt);
382
+ t(Lt, (e) => {
383
+ !d(F) && x().charts.length > 1 && e(Rt);
380
384
  });
381
- var zt = T(Lt, 2), Bt = (e) => {
382
- var n = we(), i = a(n), s = a(i);
383
- O(s);
384
- var l = T(s, 2), d = a(l, !0);
385
- E(l), E(i);
386
- var f = T(i, 2), m = (e) => {
387
- var n = Se(), i = a(n, !0);
388
- E(n), t(() => r(i, c(J))), u(e, n);
389
- }, h = (e) => {
390
- var n = Ce(), i = a(n, !0);
391
- E(n), t(() => r(i, c(Y))), u(e, n);
385
+ var zt = a(Lt, 2), Bt = (e) => {
386
+ var n = we(), r = o(n), i = o(r);
387
+ _(i);
388
+ var c = a(i, 2), u = o(c, !0);
389
+ b(c), b(r);
390
+ var f = a(r, 2), h = (e) => {
391
+ var t = Se(), n = o(t, !0);
392
+ b(t), p(() => l(n, d(J))), S(e, t);
393
+ }, g = (e) => {
394
+ var t = Ce(), n = o(t, !0);
395
+ b(t), p(() => l(n, d(Y))), S(e, t);
392
396
  };
393
- p(f, (e) => {
394
- c(J) ? e(m) : c(Y) && e(h, 1);
395
- }), E(n), t((e) => {
396
- s.disabled = c(q), l.disabled = e, r(d, c(q) ? "Thinking..." : "Chart it");
397
- }, [() => c(q) || !c(K).trim()]), o("submit", i, (e) => {
397
+ t(f, (e) => {
398
+ d(J) ? e(h) : d(Y) && e(g, 1);
399
+ }), b(n), p((e) => {
400
+ i.disabled = d(q), c.disabled = e, l(u, d(q) ? "Thinking..." : "Chart it");
401
+ }, [() => d(q) || !d(K).trim()]), s("submit", r, (e) => {
398
402
  e.preventDefault(), ft();
399
- }), D(s, () => c(K), (e) => g(K, e)), u(e, n);
403
+ }), D(i, () => d(K), (e) => m(K, e)), S(e, n);
400
404
  };
401
- p(zt, (e) => {
402
- c(dt) && c(G) && !c(F) && e(Bt);
405
+ t(zt, (e) => {
406
+ d(dt) && d(G) && !d(F) && e(Bt);
403
407
  });
404
- var Vt = T(zt, 2), Ht = a(Vt), Ut = (e) => {
405
- var o = Fe(), l = s(o), d = T(a(l), 2);
406
- n(d, 21, () => $e, (e) => e.value, (e, n) => {
407
- var i = Te(), o = a(i, !0);
408
- E(i);
409
- var s = {};
410
- t(() => {
411
- r(o, c(n).label), s !== (s = c(n).value) && (i.value = (i.__value = c(n).value) ?? "");
412
- }), u(e, i);
413
- }), E(d);
414
- var f;
415
- x(d), E(l);
416
- var m = T(l, 2), h = T(a(m), 2);
417
- n(h, 21, () => c(z).dims, (e) => e.id, (e, n) => {
418
- var i = Ee(), o = a(i, !0);
419
- E(i);
420
- var s = {};
421
- t(() => {
422
- r(o, c(n).label), s !== (s = c(n).id) && (i.value = (i.__value = c(n).id) ?? "");
423
- }), u(e, i);
424
- }), E(h);
425
- var g;
426
- x(h), E(m);
427
- var ee = T(m, 2), te = (e) => {
428
- var o = Oe(), s = T(a(o), 2), l = a(s);
429
- l.value = l.__value = "", n(T(l), 17, () => c(z).dims, (e) => e.id, (e, n) => {
430
- var i = De(), o = a(i, !0);
431
- E(i);
432
- var s = {};
433
- t(() => {
434
- r(o, c(n).label), s !== (s = c(n).id) && (i.value = (i.__value = c(n).id) ?? "");
435
- }), u(e, i);
436
- }), E(s);
437
- var d;
438
- x(s), E(o), t(() => {
439
- d !== (d = S().chartSeriesId ?? "") && (s.value = (s.__value = S().chartSeriesId ?? "") ?? "", b(s, S().chartSeriesId ?? ""));
440
- }), i("change", s, (e) => S().chartSeriesId = e.currentTarget.value || null), u(e, o);
408
+ var Vt = a(zt, 2), Ht = o(Vt), Ut = (e) => {
409
+ var n = Fe(), r = ne(n), s = a(o(r), 2);
410
+ k(s, 21, () => $e, (e) => e.value, (e, t) => {
411
+ var n = Te(), r = o(n, !0);
412
+ b(n);
413
+ var i = {};
414
+ p(() => {
415
+ l(r, d(t).label), i !== (i = d(t).value) && (n.value = (n.__value = d(t).value) ?? "");
416
+ }), S(e, n);
417
+ }), b(s);
418
+ var c;
419
+ y(s), b(r);
420
+ var u = a(r, 2), f = a(o(u), 2);
421
+ k(f, 21, () => d(z).dims, (e) => e.id, (e, t) => {
422
+ var n = Ee(), r = o(n, !0);
423
+ b(n);
424
+ var i = {};
425
+ p(() => {
426
+ l(r, d(t).label), i !== (i = d(t).id) && (n.value = (n.__value = d(t).id) ?? "");
427
+ }), S(e, n);
428
+ }), b(f);
429
+ var m;
430
+ y(f), b(u);
431
+ var h = a(u, 2), ee = (e) => {
432
+ var t = Oe(), n = a(o(t), 2), r = o(n);
433
+ r.value = r.__value = "";
434
+ var s = a(r);
435
+ k(s, 17, () => d(z).dims, (e) => e.id, (e, t) => {
436
+ var n = De(), r = o(n, !0);
437
+ b(n);
438
+ var i = {};
439
+ p(() => {
440
+ l(r, d(t).label), i !== (i = d(t).id) && (n.value = (n.__value = d(t).id) ?? "");
441
+ }), S(e, n);
442
+ }), b(n);
443
+ var c;
444
+ y(n), b(t), p(() => {
445
+ c !== (c = x().chartSeriesId ?? "") && (n.value = (n.__value = x().chartSeriesId ?? "") ?? "", g(n, x().chartSeriesId ?? ""));
446
+ }), i("change", n, (e) => x().chartSeriesId = e.currentTarget.value || null), S(e, t);
441
447
  };
442
- p(ee, (e) => {
443
- c(z).dims.length > 1 && e(te);
448
+ t(h, (e) => {
449
+ d(z).dims.length > 1 && e(ee);
444
450
  });
445
- var _ = T(ee, 2), v = T(a(_), 2);
446
- n(v, 21, () => c(z).measures, (e) => e.id, (e, n) => {
447
- var i = ke(), o = a(i, !0);
448
- E(i);
449
- var s = {};
450
- t(() => {
451
- r(o, c(n).label), s !== (s = c(n).id) && (i.value = (i.__value = c(n).id) ?? "");
452
- }), u(e, i);
453
- }), E(v);
454
- var ne;
455
- x(v), E(_);
456
- var w = T(_, 2), D = T(a(w), 2);
457
- n(D, 21, () => et, (e) => e.value, (e, n) => {
458
- var i = Ae(), o = a(i, !0);
459
- E(i);
460
- var s = {};
461
- t(() => {
462
- r(o, c(n).label), s !== (s = c(n).value) && (i.value = (i.__value = c(n).value) ?? "");
463
- }), u(e, i);
464
- }), E(D);
451
+ var v = a(h, 2), C = a(o(v), 2);
452
+ k(C, 21, () => d(z).measures, (e) => e.id, (e, t) => {
453
+ var n = ke(), r = o(n, !0);
454
+ b(n);
455
+ var i = {};
456
+ p(() => {
457
+ l(r, d(t).label), i !== (i = d(t).id) && (n.value = (n.__value = d(t).id) ?? "");
458
+ }), S(e, n);
459
+ }), b(C);
460
+ var te;
461
+ y(C), b(v);
462
+ var w = a(v, 2), D = a(o(w), 2);
463
+ k(D, 21, () => et, (e) => e.value, (e, t) => {
464
+ var n = Ae(), r = o(n, !0);
465
+ b(n);
466
+ var i = {};
467
+ p(() => {
468
+ l(r, d(t).label), i !== (i = d(t).value) && (n.value = (n.__value = d(t).value) ?? "");
469
+ }), S(e, n);
470
+ }), b(D);
465
471
  var re;
466
- x(D), E(w);
467
- var k = T(w, 2), A = T(a(k), 2);
468
- n(A, 21, () => tt, (e) => e.value, (e, n) => {
469
- var i = je(), o = a(i, !0);
470
- E(i);
471
- var s = {};
472
- t(() => {
473
- r(o, c(n).label), s !== (s = c(n).value) && (i.value = (i.__value = c(n).value) ?? "");
474
- }), u(e, i);
475
- }), E(A);
472
+ y(D), b(w);
473
+ var O = a(w, 2), A = a(o(O), 2);
474
+ k(A, 21, () => tt, (e) => e.value, (e, t) => {
475
+ var n = je(), r = o(n, !0);
476
+ b(n);
477
+ var i = {};
478
+ p(() => {
479
+ l(r, d(t).label), i !== (i = d(t).value) && (n.value = (n.__value = d(t).value) ?? "");
480
+ }), S(e, n);
481
+ }), b(A);
476
482
  var ie;
477
- x(A), E(k);
478
- var j = T(k, 2), M = (e) => {
479
- var n = Me(), r = a(n);
480
- O(r), C(), E(n), t(() => y(r, S().chartStacked)), i("change", r, (e) => S().chartStacked = e.currentTarget.checked), u(e, n);
483
+ y(A), b(O);
484
+ var j = a(O, 2), M = (e) => {
485
+ var t = Me(), n = o(t);
486
+ _(n), E(), b(t), p(() => T(n, x().chartStacked)), i("change", n, (e) => x().chartStacked = e.currentTarget.checked), S(e, t);
481
487
  };
482
- p(j, (e) => {
483
- S().chartType !== "pie" && e(M);
488
+ t(j, (e) => {
489
+ x().chartType !== "pie" && e(M);
484
490
  });
485
- var N = T(j, 2), P = a(N);
486
- O(P), C(), E(N);
487
- var F = T(N, 2), I = (e) => {
488
- var n = Ne(), r = a(n);
489
- O(r), C(), E(n), t(() => y(r, S().chartLogScale)), i("change", r, (e) => S().chartLogScale = e.currentTarget.checked), u(e, n);
491
+ var N = a(j, 2), P = o(N);
492
+ _(P), E(), b(N);
493
+ var F = a(N, 2), I = (e) => {
494
+ var t = Ne(), n = o(t);
495
+ _(n), E(), b(t), p(() => T(n, x().chartLogScale)), i("change", n, (e) => x().chartLogScale = e.currentTarget.checked), S(e, t);
490
496
  };
491
- p(F, (e) => {
492
- S().chartType !== "pie" && e(I);
497
+ t(F, (e) => {
498
+ x().chartType !== "pie" && e(I);
493
499
  });
494
- var L = T(F, 2), R = (e) => {
495
- var n = Pe(), r = a(n);
496
- O(r), C(), E(n), t(() => y(r, S().chartTimeAxis)), i("change", r, (e) => S().chartTimeAxis = e.currentTarget.checked), u(e, n);
500
+ var L = a(F, 2), R = (e) => {
501
+ var t = Pe(), n = o(t);
502
+ _(n), E(), b(t), p(() => T(n, x().chartTimeAxis)), i("change", n, (e) => x().chartTimeAxis = e.currentTarget.checked), S(e, t);
497
503
  };
498
- p(L, (e) => {
499
- S().chartDimensionIsDate && S().chartType !== "pie" && e(R);
500
- }), t(() => {
501
- f !== (f = S().chartType) && (d.value = (d.__value = S().chartType) ?? "", b(d, S().chartType)), g !== (g = S().chartDimensionId ?? "") && (h.value = (h.__value = S().chartDimensionId ?? "") ?? "", b(h, S().chartDimensionId ?? "")), ne !== (ne = S().chartMeasureId ?? "") && (v.value = (v.__value = S().chartMeasureId ?? "") ?? "", b(v, S().chartMeasureId ?? "")), re !== (re = S().chartReduce) && (D.value = (D.__value = S().chartReduce) ?? "", b(D, S().chartReduce)), ie !== (ie = S().chartValueFormat) && (A.value = (A.__value = S().chartValueFormat) ?? "", b(A, S().chartValueFormat)), y(P, S().chartDataLabels);
502
- }), i("change", d, (e) => S().chartType = e.currentTarget.value), i("change", h, (e) => S().chartDimensionId = e.currentTarget.value || null), i("change", v, (e) => S().chartMeasureId = e.currentTarget.value || null), i("change", D, (e) => S().chartReduce = e.currentTarget.value), i("change", A, (e) => S().chartValueFormat = e.currentTarget.value), i("change", P, (e) => S().chartDataLabels = e.currentTarget.checked), u(e, o);
504
+ t(L, (e) => {
505
+ x().chartDimensionIsDate && x().chartType !== "pie" && e(R);
506
+ }), p(() => {
507
+ c !== (c = x().chartType) && (s.value = (s.__value = x().chartType) ?? "", g(s, x().chartType)), m !== (m = x().chartDimensionId ?? "") && (f.value = (f.__value = x().chartDimensionId ?? "") ?? "", g(f, x().chartDimensionId ?? "")), te !== (te = x().chartMeasureId ?? "") && (C.value = (C.__value = x().chartMeasureId ?? "") ?? "", g(C, x().chartMeasureId ?? "")), re !== (re = x().chartReduce) && (D.value = (D.__value = x().chartReduce) ?? "", g(D, x().chartReduce)), ie !== (ie = x().chartValueFormat) && (A.value = (A.__value = x().chartValueFormat) ?? "", g(A, x().chartValueFormat)), T(P, x().chartDataLabels);
508
+ }), i("change", s, (e) => x().chartType = e.currentTarget.value), i("change", f, (e) => x().chartDimensionId = e.currentTarget.value || null), i("change", C, (e) => x().chartMeasureId = e.currentTarget.value || null), i("change", D, (e) => x().chartReduce = e.currentTarget.value), i("change", A, (e) => x().chartValueFormat = e.currentTarget.value), i("change", P, (e) => x().chartDataLabels = e.currentTarget.checked), S(e, n);
503
509
  };
504
- p(Ht, (e) => {
505
- c(F) || e(Ut);
506
- }), E(Vt), E(vt);
507
- var $ = T(vt, 2), Wt = a($), Gt = (e) => {
510
+ t(Ht, (e) => {
511
+ d(F) || e(Ut);
512
+ }), b(Vt), b(vt);
513
+ var $ = a(vt, 2), Wt = o($), Gt = (t) => {
508
514
  {
509
- let t = f(() => c(M)?.zoom === !0), n = f(() => c(M)?.brush === !0), r = f(() => c(M)?.export === !0 ? !0 : void 0);
510
- ie(e, {
515
+ let n = e(() => d(M)?.zoom === !0), r = e(() => d(M)?.brush === !0), i = e(() => d(M)?.export === !0 || void 0);
516
+ ie(t, {
511
517
  get spec() {
512
- return c(R);
518
+ return d(R);
513
519
  },
514
520
  get width() {
515
- return c(Ze);
521
+ return d(Ze);
516
522
  },
517
523
  get height() {
518
- return c(Qe);
524
+ return d(Qe);
519
525
  },
520
526
  onSelect: nt,
521
527
  interactive: !0,
522
528
  legend: !0,
523
529
  get dataLabels() {
524
- return S().chartDataLabels;
530
+ return x().chartDataLabels;
525
531
  },
526
532
  get zoomable() {
527
- return c(t);
533
+ return d(n);
528
534
  },
529
535
  get brush() {
530
- return c(n);
536
+ return d(r);
531
537
  },
532
538
  get toolbar() {
533
- return c(r);
539
+ return d(i);
534
540
  }
535
541
  });
536
542
  }
537
543
  }, Kt = (e) => {
538
- var t = Ie(), n = a(t), r = (e) => {
539
- u(e, l("Charting needs at least one text column (to group by) and one numeric column (to measure)."));
540
- }, i = (e) => {
541
- u(e, l("No data to chart."));
544
+ var n = Ie(), r = o(n), i = (e) => {
545
+ var t = u("Charting needs at least one text column (to group by) and one numeric column (to measure).");
546
+ S(e, t);
547
+ }, a = (e) => {
548
+ var t = u("No data to chart.");
549
+ S(e, t);
542
550
  };
543
- p(n, (e) => {
544
- !c(z).dims.length || !c(z).measures.length ? e(r) : e(i, -1);
545
- }), E(t), u(e, t);
551
+ t(r, (e) => {
552
+ !d(z).dims.length || !d(z).measures.length ? e(i) : e(a, -1);
553
+ }), b(n), S(e, n);
546
554
  };
547
- p(Wt, (e) => {
548
- c(R) && (c(R).series.length || c(F)) ? e(Gt) : e(Kt, -1);
549
- }), E($), te($, (e) => g(rt, e), () => c(rt));
550
- var qt = T($, 2), Jt = (e) => {
555
+ t(Wt, (e) => {
556
+ d(R) && (d(R).series.length || d(F)) ? e(Gt) : e(Kt, -1);
557
+ }), b($), ee($, (e) => m(rt, e), () => d(rt));
558
+ var qt = a($, 2), Jt = (e) => {
551
559
  var t = Le();
552
- i("pointerdown", t, Ge), u(e, t);
560
+ i("pointerdown", t, Ge), S(e, t);
553
561
  };
554
- p(qt, (e) => {
555
- c(V) && !c(H) && e(Jt);
556
- }), E(X), te(X, (e) => g(ze, e), () => c(ze)), t(() => {
557
- ht = k(X, 1, "sv-grid-chart-panel", null, ht, {
558
- "is-right": c(I) === "right" && !c(V),
559
- "is-bottom": c(I) === "bottom" && !c(V),
560
- "is-floating": c(V),
561
- "is-maximized": c(V) && c(H)
562
- }), ee(X, c(Ke)), yt = k(Z, 1, "sv-grid-chart-drawer-title", null, yt, { "is-drag-handle": c(V) && !c(H) }), _(Q, "aria-expanded", c(W));
563
- }), i("pointerdown", Z, We), i("click", Q, () => g(W, !c(W))), i("click", It, () => S().chartPanelOpen = !1), w($, "clientWidth", (e) => g(qe, e)), w($, "clientHeight", (e) => g(Je, e)), A(3, X, () => N, () => ({
564
- x: !c(V) && c(I) === "right" ? c(B) : 0,
565
- y: !c(V) && c(I) === "bottom" ? c(B) : 0,
562
+ t(qt, (e) => {
563
+ d(V) && !d(H) && e(Jt);
564
+ }), b(X), ee(X, (e) => m(ze, e), () => d(ze)), p(() => {
565
+ ht = A(X, 1, "sv-grid-chart-panel", null, ht, {
566
+ "is-right": d(I) === "right" && !d(V),
567
+ "is-bottom": d(I) === "bottom" && !d(V),
568
+ "is-floating": d(V),
569
+ "is-maximized": d(V) && d(H)
570
+ }), O(X, d(Ke)), yt = A(Z, 1, "sv-grid-chart-drawer-title", null, yt, { "is-drag-handle": d(V) && !d(H) }), v(Q, "aria-expanded", d(W));
571
+ }), i("pointerdown", Z, We), i("click", Q, () => m(W, !d(W))), i("click", It, () => x().chartPanelOpen = !1), w($, "clientWidth", (e) => m(qe, e)), w($, "clientHeight", (e) => m(Je, e)), f(3, X, () => N, () => ({
572
+ x: !d(V) && d(I) === "right" ? d(B) : 0,
573
+ y: !d(V) && d(I) === "bottom" ? d(B) : 0,
566
574
  duration: 180,
567
575
  easing: P
568
- })), u(e, X), v();
576
+ })), S(n, X), re();
569
577
  }
570
- d([
578
+ n([
571
579
  "pointerdown",
572
580
  "click",
573
581
  "change"