@slotted/react 0.1.0-beta.31 → 0.1.0-beta.33

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.
@@ -11,12 +11,12 @@ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
11
  import { collapseState as se } from "@slotted/core/overflow";
12
12
  import { chartMessages as ce } from "@slotted/core/i18n";
13
13
  import { getLiveAnnouncer as le } from "@slotted/core/live-announcer";
14
- import { FULL_ZOOM as _, TOOLTIP_DOCK_WIDTH as ue, cachedChartTheme as de, categoryIndex as fe, chartKeyAction as pe, chartTable as me, chartToCsv as he, createChartModel as ge, createLatestAnnouncer as _e, defaultTrigger as ve, describeChart as ye, describePoint as be, describeZoom as xe, firstPoint as Se, isDrawn as Ce, isFullZoom as we, observeChartTheme as Te, placeLayer as Ee, placeTooltip as De, readChartTheme as Oe, sameTheme as ke, seriesOf as v, toggleHidden as Ae, tooltipContext as je, trackModality as Me } from "@slotted/core/chart";
15
- import { mountChartEngine as Ne, preloadChartEngine as Pe } from "@slotted/core/chart-echarts";
14
+ import { FULL_ZOOM as _, TOOLTIP_DOCK_WIDTH as ue, cachedChartTheme as de, categoryIndex as fe, chartKeyAction as pe, chartTable as me, chartToCsv as he, createChartModel as ge, createLatestAnnouncer as _e, defaultTrigger as ve, describeChart as ye, describePoint as be, describeZoom as xe, firstPoint as Se, isDrawn as Ce, isFullZoom as we, observeChartTheme as Te, placeLayer as Ee, placeTooltip as De, pointText as Oe, readChartTheme as ke, sameTheme as Ae, seriesOf as v, toggleHidden as je, tooltipContext as Me, trackModality as Ne } from "@slotted/core/chart";
15
+ import { mountChartEngine as Pe, preloadChartEngine as Fe } from "@slotted/core/chart-echarts";
16
16
  //#region src/chart/chart-defaults.tsx
17
- var Fe = l({});
17
+ var y = l({});
18
18
  function Ie() {
19
- return ne(Fe);
19
+ return ne(y);
20
20
  }
21
21
  function Le({ children: e, ...t }) {
22
22
  let n = Ie(), r = { ...n };
@@ -24,7 +24,7 @@ function Le({ children: e, ...t }) {
24
24
  return r.tooltip = {
25
25
  ...n.tooltip,
26
26
  ...t.tooltip
27
- }, /* @__PURE__ */ h(Fe.Provider, {
27
+ }, /* @__PURE__ */ h(y.Provider, {
28
28
  value: r,
29
29
  children: e
30
30
  });
@@ -32,18 +32,18 @@ function Le({ children: e, ...t }) {
32
32
  //#endregion
33
33
  //#region src/chart/chart.tsx
34
34
  var Re = Object.freeze([]), ze = (e, t) => e === t || e !== null && t !== null && e.series === t.series && e.key === t.key, Be = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Ve = (e, t) => e.start === t.start && e.end === t.end, He = (e) => typeof e == "object" && !!e && Object.getPrototypeOf(e) === Object.prototype;
35
- function y(e, t) {
35
+ function b(e, t) {
36
36
  if (Object.is(e, t)) return !0;
37
- if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) => y(e, t[n]));
37
+ if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) => b(e, t[n]));
38
38
  if (!He(e) || !He(t)) return !1;
39
39
  let n = Object.keys(e);
40
- return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) && y(e[n], t[n]));
40
+ return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) && b(e[n], t[n]));
41
41
  }
42
42
  function Ue(e) {
43
43
  let t = f(e);
44
- return y(t.current, e) || (t.current = e), t.current;
44
+ return b(t.current, e) || (t.current = e), t.current;
45
45
  }
46
- function b(e, t, n, r) {
46
+ function x(e, t, n, r) {
47
47
  let [i, a] = p(t), o = e === void 0 ? i : e, s = f({
48
48
  controlled: e,
49
49
  value: o,
@@ -130,11 +130,11 @@ function Ye(e, t = !0) {
130
130
  }
131
131
  };
132
132
  }
133
- function x() {
133
+ function S() {
134
134
  let e = f(null), t = f(null);
135
135
  return d(() => {
136
136
  if (!e.current) return;
137
- let n = Me(e.current);
137
+ let n = Ne(e.current);
138
138
  return t.current = n, () => n.destroy();
139
139
  }, []), [e, () => t.current?.read() ?? "programmatic"];
140
140
  }
@@ -179,7 +179,7 @@ function Ze({ context: e, model: t, totalLabel: n, indicator: r }) {
179
179
  e.total ? /* @__PURE__ */ g("div", {
180
180
  "data-part": "tooltip-total",
181
181
  "data-part-tooltip-total": "",
182
- children: [/* @__PURE__ */ h("span", { children: n }), /* @__PURE__ */ h("span", {
182
+ children: [/* @__PURE__ */ h("span", { children: n ?? e.total.label }), /* @__PURE__ */ h("span", {
183
183
  "data-part": "tooltip-value",
184
184
  "data-part-tooltip-value": "",
185
185
  children: e.total.formatted
@@ -187,45 +187,45 @@ function Ze({ context: e, model: t, totalLabel: n, indicator: r }) {
187
187
  }) : null
188
188
  ] });
189
189
  }
190
- function S(c) {
191
- let { data: l, series: ne, x: Ee, y: Me, orientation: Pe, stackMode: Fe, annotations: Le, recordKey: He, locale: y, title: x, description: S, help: w, actions: rt, messages: it, size: at, variant: ot, palette: st, toolbar: ct, grid: lt, texture: ut, renderer: dt, sampling: ft, animate: pt, legend: mt, legendInteractive: ht, legendValues: gt, legendOverflow: _t, trigger: vt, tooltip: yt, zoomable: T, selectable: bt, loading: xt, error: St, onRetry: Ct, hidden: wt, defaultHidden: Tt, onHiddenChange: Et, activePoint: Dt, defaultActivePoint: Ot, onActivePointChange: kt, selection: At, defaultSelection: jt, onSelectionChange: Mt, zoom: Nt, defaultZoom: Pt, onZoomChange: Ft, tableOpen: It, defaultTableOpen: Lt, onTableOpenChange: Rt, fullscreen: zt, defaultFullscreen: Bt, onFullscreenChange: Vt, renderTooltip: Ht, renderLegendItem: Ut, renderCenter: Wt, renderEmpty: Gt, renderError: Kt, render: qt, extendOption: Jt, handleRef: Yt, ref: Xt, ...Zt } = c, E = Ie(), D = re(), O = t(ce, it), Qt = e(), k = {
192
- size: at ?? E.size ?? "md",
193
- variant: ot ?? E.variant ?? "plain",
194
- palette: st ?? E.palette ?? "categorical",
195
- toolbar: ct ?? E.toolbar ?? "visible",
196
- renderer: dt ?? E.renderer ?? "auto",
197
- grid: lt ?? E.grid,
198
- legendOverflow: _t ?? E.legendOverflow ?? "collapse",
199
- animate: pt ?? E.animate ?? !0,
190
+ function C(c) {
191
+ let { data: l, series: ne, x: Ee, y: Ne, orientation: Fe, stackMode: y, annotations: Le, recordKey: He, locale: b, title: S, description: C, help: w, actions: it, messages: at, size: ot, variant: st, palette: ct, toolbar: lt, grid: ut, texture: dt, renderer: ft, sampling: pt, animate: mt, legend: ht, legendInteractive: gt, legendValues: _t, legendOverflow: vt, trigger: yt, tooltip: bt, zoomable: xt, selectable: St, loading: Ct, error: wt, onRetry: Tt, hidden: Et, defaultHidden: Dt, onHiddenChange: Ot, activePoint: kt, defaultActivePoint: At, onActivePointChange: jt, selection: Mt, defaultSelection: Nt, onSelectionChange: Pt, zoom: Ft, defaultZoom: It, onZoomChange: Lt, tableOpen: Rt, defaultTableOpen: zt, onTableOpenChange: Bt, fullscreen: Vt, defaultFullscreen: Ht, onFullscreenChange: Ut, renderTooltip: Wt, renderLegendItem: Gt, renderCenter: Kt, renderEmpty: qt, renderError: Jt, render: Yt, extendOption: Xt, handleRef: Zt, ref: Qt, ...$t } = c, T = Ie(), E = re(), D = t(ce, at), en = e(), O = {
192
+ size: ot ?? T.size ?? "md",
193
+ variant: st ?? T.variant ?? "plain",
194
+ palette: ct ?? T.palette ?? "categorical",
195
+ toolbar: lt ?? T.toolbar ?? "visible",
196
+ renderer: ft ?? T.renderer ?? "auto",
197
+ grid: ut ?? T.grid,
198
+ legendOverflow: vt ?? T.legendOverflow ?? "collapse",
199
+ animate: mt ?? T.animate ?? !0,
200
200
  tooltip: {
201
- ...E.tooltip,
202
- ...yt
201
+ ...T.tooltip,
202
+ ...bt
203
203
  }
204
- }, [$t, en] = b(wt, Tt ?? Re, Et, Be), [A, j] = b(Dt, Ot ?? null, kt, ze), [M, tn] = b(At, jt ?? null, Mt, ze), [N, P] = b(Nt, Pt ?? _, Ft, Ve), [F, nn] = b(It, Lt ?? !1, Rt, Object.is), [I, rn] = b(zt, Bt ?? !1, Vt, Object.is), an = Ue(ne), on = Ue(Ee), sn = Ue(Me), cn = Ue(Le), L = oe(() => ({
204
+ }, [tn, nn] = x(Et, Dt ?? Re, Ot, Be), [k, A] = x(kt, At ?? null, jt, ze), [j, rn] = x(Mt, Nt ?? null, Pt, ze), [M, N] = x(Ft, It ?? _, Lt, Ve), [P, an] = x(Rt, zt ?? !1, Bt, Object.is), [F, on] = x(Vt, Ht ?? !1, Ut, Object.is), sn = Ue(ne), cn = Ue(Ee), ln = Ue(Ne), un = Ue(Le), I = oe(() => ({
205
205
  data: l,
206
- series: an,
207
- x: on,
208
- y: sn,
209
- orientation: Pe,
210
- stackMode: Fe,
211
- annotations: cn,
206
+ series: sn,
207
+ x: cn,
208
+ y: ln,
209
+ orientation: Fe,
210
+ stackMode: y,
211
+ annotations: un,
212
212
  recordKey: He,
213
- locale: y ?? Qt
213
+ locale: b ?? en
214
214
  }), [
215
215
  l,
216
- an,
217
- on,
218
216
  sn,
219
- Pe,
220
- Fe,
221
217
  cn,
222
- He,
218
+ ln,
219
+ Fe,
223
220
  y,
224
- Qt
225
- ]), ln = oe(() => {
221
+ un,
222
+ He,
223
+ b,
224
+ en
225
+ ]), dn = oe(() => {
226
226
  try {
227
227
  return {
228
- model: ge(L, { hidden: $t }),
228
+ model: ge(I, { hidden: tn }),
229
229
  failure: null
230
230
  };
231
231
  } catch (e) {
@@ -234,11 +234,11 @@ function S(c) {
234
234
  failure: e
235
235
  };
236
236
  }
237
- }, [L, $t]), R = ln.model, [un, dn] = p(null), z = !!St || ln.failure !== null || un !== null, B = !!xt, V = !(!R || B || z || R.empty), H = !(!R || B || z || R.empty === "no-data"), U = R ? vt ?? ve(R) : "none", W = f(null), G = f(null), fn = f(null), pn = f(null), mn = f(null), K = f(null), [hn, gn] = p(null), [q, _n] = p(We), vn = oe(() => _e((e) => le().announce(e)), []), yn = (e) => le().announce(e);
237
+ }, [I, tn]), L = dn.model, [fn, pn] = p(null), R = !!wt || dn.failure !== null || fn !== null, z = !!Ct, B = !(!L || z || R || L.empty), V = !(!L || z || R || L.empty === "no-data"), H = L ? yt ?? ve(L) : "none", U = f(null), W = f(null), mn = f(null), hn = f(null), gn = f(null), G = f(null), [_n, vn] = p(null), [K, yn] = p(We), bn = oe(() => _e((e) => le().announce(e)), []), xn = (e) => le().announce(e);
238
238
  d(() => {
239
- let e = G.current;
239
+ let e = W.current;
240
240
  if (!e) return;
241
- let t = e.ownerDocument.defaultView, n = (e) => gn((t) => ke(t, e) ? t : e), r = () => n(Oe(e)), i = de(e), a = 0;
241
+ let t = e.ownerDocument.defaultView, n = (e) => vn((t) => Ae(t, e) ? t : e), r = () => n(ke(e)), i = de(e), a = 0;
242
242
  i ? n(i) : t && (a = t.requestAnimationFrame(() => {
243
243
  a = 0, r();
244
244
  }));
@@ -247,68 +247,68 @@ function S(c) {
247
247
  o(), a && t?.cancelAnimationFrame(a);
248
248
  };
249
249
  }, [
250
- k.palette,
251
- k.variant,
252
- I
250
+ O.palette,
251
+ O.variant,
252
+ F
253
253
  ]);
254
- let J = f({
254
+ let q = f({
255
255
  onPointer: () => {},
256
256
  onPress: () => {},
257
257
  onZoom: () => {},
258
258
  onRender: () => {}
259
259
  });
260
260
  d(() => {
261
- let e = fn.current;
261
+ let e = mn.current;
262
262
  if (!e) return;
263
- let t = Ne(e, {
264
- onPointer: (e, t) => J.current.onPointer(e, t),
265
- onPress: (e, t) => J.current.onPress(e, t),
266
- onZoom: (e, t) => J.current.onZoom(e, t),
267
- onRender: () => J.current.onRender(),
268
- onError: (e) => dn(e)
263
+ let t = Pe(e, {
264
+ onPointer: (e, t) => q.current.onPointer(e, t),
265
+ onPress: (e, t) => q.current.onPress(e, t),
266
+ onZoom: (e, t) => q.current.onZoom(e, t),
267
+ onRender: () => q.current.onRender(),
268
+ onError: (e) => pn(e)
269
269
  });
270
- return K.current = t, () => {
271
- t.dispose(), K.current = null;
270
+ return G.current = t, () => {
271
+ t.dispose(), G.current = null;
272
272
  };
273
273
  }, []), d(() => {
274
- K.current && hn && R && V && K.current.update({
275
- model: R,
276
- theme: hn,
277
- selection: M,
278
- zoom: N,
279
- zoomable: !!T,
280
- grid: k.grid,
281
- texture: !!ut,
282
- renderer: k.renderer,
283
- sampling: ft,
284
- trigger: U,
285
- animate: k.animate,
286
- extendOption: Jt
274
+ G.current && _n && L && B && G.current.update({
275
+ model: L,
276
+ theme: _n,
277
+ selection: j,
278
+ zoom: M,
279
+ zoomable: !!xt,
280
+ grid: O.grid,
281
+ texture: !!dt,
282
+ renderer: O.renderer,
283
+ sampling: pt,
284
+ trigger: H,
285
+ animate: O.animate,
286
+ extendOption: Xt
287
287
  });
288
288
  }, [
289
- R,
290
- hn,
291
- V,
289
+ L,
290
+ _n,
291
+ B,
292
+ j,
292
293
  M,
293
- N,
294
- T,
295
- k.grid,
296
- ut,
297
- k.renderer,
298
- ft,
299
- U,
300
- k.animate,
301
- Jt
294
+ xt,
295
+ O.grid,
296
+ dt,
297
+ O.renderer,
298
+ pt,
299
+ H,
300
+ O.animate,
301
+ Xt
302
302
  ]);
303
- let bn = () => {
304
- let e = K.current, t = G.current;
305
- if (!e || !t || !R || !V || F) {
306
- _n(We);
303
+ let Sn = () => {
304
+ let e = G.current, t = W.current;
305
+ if (!e || !t || !L || !B || P) {
306
+ yn(We);
307
307
  return;
308
308
  }
309
309
  let n = [];
310
- if (M && Ce(R, M) && R.shape === "cartesian") {
311
- let t = v(R, M.series), r = e.locate(M);
310
+ if (j && Ce(L, j) && L.shape === "cartesian") {
311
+ let t = v(L, j.series), r = e.locate(j);
312
312
  t && t.kind !== "bar" && r && n.push({
313
313
  key: `selected-${t.id}`,
314
314
  color: t.color,
@@ -317,10 +317,10 @@ function S(c) {
317
317
  current: !1
318
318
  });
319
319
  }
320
- R.shape === "pie" && e.emphasize(A && Ce(R, A) ? A.key : null);
321
- let r = A && Ce(R, A) ? e.locate(A) : null;
322
- if (!A || !r) {
323
- _n({
320
+ L.shape === "pie" && e.emphasize(k && Ce(L, k) ? k.key : null);
321
+ let r = k && Ce(L, k) ? e.locate(k) : null;
322
+ if (!k || !r) {
323
+ yn({
324
324
  crosshair: null,
325
325
  markers: n,
326
326
  tooltip: null,
@@ -328,32 +328,33 @@ function S(c) {
328
328
  });
329
329
  return;
330
330
  }
331
- let i = R.series.some((e) => e.visible && e.kind === "bar"), a = R.shape === "cartesian" && U === "axis" ? {
331
+ let i = L.series.some((e) => e.visible && e.kind === "bar"), a = L.shape === "cartesian" && H === "axis" ? {
332
332
  ...r,
333
- isBand: i && R.xType === "category"
333
+ isBand: i && L.xType === "category"
334
334
  } : null;
335
- if (R.shape === "cartesian") {
336
- let t = fe(R, A.key), r = U === "axis" ? R.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [v(R, A.series)].filter((e) => !!(e && e.kind !== "bar"));
335
+ if (L.shape === "cartesian") {
336
+ let t = fe(L, k.key), r = H === "axis" ? L.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [v(L, k.series)].filter((e) => !!(e && e.kind !== "bar"));
337
337
  for (let t of r) {
338
338
  let r = e.locate({
339
339
  series: t.id,
340
- key: A.key
340
+ key: k.key
341
341
  });
342
342
  r && n.push({
343
343
  key: t.id,
344
344
  color: t.color,
345
345
  at: r,
346
346
  selected: !1,
347
- current: t.id === A.series
347
+ current: t.id === k.series
348
348
  });
349
349
  }
350
350
  }
351
- let o = U === "none" ? null : je(R, A, {
352
- trigger: U,
353
- sort: k.tooltip.sort,
354
- total: k.tooltip.total
351
+ let o = H === "none" ? null : Me(L, k, {
352
+ trigger: H,
353
+ sort: O.tooltip.sort,
354
+ total: O.tooltip.total,
355
+ totalLabel: D("total")
355
356
  });
356
- _n({
357
+ yn({
357
358
  crosshair: a,
358
359
  markers: n,
359
360
  tooltip: o,
@@ -361,26 +362,26 @@ function S(c) {
361
362
  });
362
363
  };
363
364
  ae(() => {
364
- bn();
365
+ Sn();
365
366
  }, [
366
- A,
367
- M,
368
- R,
369
- V,
370
- F,
371
- U
367
+ k,
368
+ j,
369
+ L,
370
+ B,
371
+ P,
372
+ H
372
373
  ]);
373
- let xn = f(!1);
374
+ let J = f(!1);
374
375
  ae(() => {
375
- let e = pn.current, t = G.current;
376
+ let e = hn.current, t = W.current;
376
377
  if (!e || !t) return;
377
- if (!q.tooltip || !A) {
378
- xn.current = !1;
378
+ if (!K.tooltip || !k) {
379
+ J.current = !1;
379
380
  return;
380
381
  }
381
- let n = K.current?.locate(A);
382
+ let n = G.current?.locate(k);
382
383
  if (!n) return;
383
- xn.current || (e.style.transition = "none");
384
+ J.current || (e.style.transition = "none");
384
385
  let r = De({
385
386
  anchor: {
386
387
  x: n.x,
@@ -394,105 +395,105 @@ function S(c) {
394
395
  width: t.clientWidth,
395
396
  height: t.clientHeight
396
397
  },
397
- dir: W.current && getComputedStyle(W.current).direction === "rtl" ? "rtl" : "ltr"
398
+ dir: U.current && getComputedStyle(U.current).direction === "rtl" ? "rtl" : "ltr"
398
399
  });
399
- e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`), xn.current || requestAnimationFrame(() => e.style.transition = ""), xn.current = !0;
400
- }, [q, A]), J.current = {
400
+ e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`), J.current || requestAnimationFrame(() => e.style.transition = ""), J.current = !0;
401
+ }, [K, k]), q.current = {
401
402
  onPointer: (e, t) => {
402
- e ? j(e, "pointer", t) : document.activeElement !== G.current && j(null, "pointer", t);
403
+ e ? A(e, "pointer", t) : document.activeElement !== W.current && A(null, "pointer", t);
403
404
  },
404
405
  onPress: (e, t) => {
405
- bt && e && tn(ze(M, e) ? null : e, "pointer", t);
406
+ St && e && rn(ze(j, e) ? null : e, "pointer", t);
406
407
  },
407
- onZoom: (e, t) => P(e, "pointer", t),
408
- onRender: () => bn()
408
+ onZoom: (e, t) => N(e, "pointer", t),
409
+ onRender: () => Sn()
409
410
  };
410
- let Sn = (e) => {
411
- if (!R || !V || F) return;
412
- let t = pe(R, {
413
- active: A,
414
- selection: M,
415
- zoom: N,
416
- zoomable: !!T,
417
- selectable: !!bt
411
+ let Cn = (e) => {
412
+ if (!L || !B || P) return;
413
+ let t = pe(L, {
414
+ active: k,
415
+ selection: j,
416
+ zoom: M,
417
+ zoomable: !!xt,
418
+ selectable: !!St
418
419
  }, e.key);
419
420
  if (t !== null) {
420
421
  e.preventDefault();
421
- for (let n of t) n.type === "active" ? (j(n.point, n.reason, e.nativeEvent), n.point ? vn.say(be(R, n.point, M, O)) : vn.cancel()) : n.type === "select" ? (tn(n.point, "keyboard", e.nativeEvent), n.point && vn.say(be(R, n.point, n.point, O))) : (P(n.zoom, n.reason, e.nativeEvent), yn(xe(R, n.zoom, O)));
422
+ for (let n of t) n.type === "active" ? (A(n.point, n.reason, e.nativeEvent), n.point ? bn.say(be(L, n.point, j, D)) : bn.cancel()) : n.type === "select" ? (rn(n.point, "keyboard", e.nativeEvent), n.point && bn.say(be(L, n.point, n.point, D))) : (N(n.zoom, n.reason, e.nativeEvent), xn(xe(L, n.zoom, D)));
422
423
  }
423
- }, Cn = te((e) => e === null ? void 0 : s(e).destroy, []), wn = (e) => {
424
- if (!R || !V || F || A || !Ge(e.currentTarget)) return;
425
- let t = Se(R);
426
- t && (j(t, "keyboard", e.nativeEvent), vn.say(be(R, t, M, O)));
427
- }, Tn = (e, t) => {
428
- let n = !I;
429
- rn(n, e, t);
430
- let r = W.current;
431
- r && (n && zt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
424
+ }, wn = te((e) => e === null ? void 0 : s(e).destroy, []), Tn = (e) => {
425
+ if (!L || !B || P || k || !Ge(e.currentTarget)) return;
426
+ let t = Se(L);
427
+ t && (A(t, "keyboard", e.nativeEvent), bn.say(be(L, t, j, D)));
428
+ }, En = (e, t) => {
429
+ let n = !F;
430
+ on(n, e, t);
431
+ let r = U.current;
432
+ r && (n && Vt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
432
433
  };
433
434
  d(() => {
434
- let e = W.current;
435
+ let e = U.current;
435
436
  if (!e) return;
436
437
  let t = !1, n = () => {
437
- document.fullscreenElement === e ? t = !0 : t && (t = !1, En.current(!1, "escape"));
438
+ document.fullscreenElement === e ? t = !0 : t && (t = !1, Dn.current(!1, "escape"));
438
439
  };
439
440
  return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
440
441
  }, []);
441
- let En = f(rn);
442
- En.current = rn, d(() => {
443
- let e = W.current;
444
- !I && e && document.fullscreenElement === e && document.exitFullscreen().catch(() => {});
445
- }, [I]);
446
- let Dn = (e) => {
447
- Zt.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && I && (e.preventDefault(), Tn("escape", e.nativeEvent));
448
- }, [Y, On] = p([]), kn = f(/* @__PURE__ */ new Map()), [An, jn] = p(null), Mn = ht ?? !0, X = R?.legend ?? [], Nn = () => {
449
- let e = mn.current;
450
- if (!e || !R) return;
451
- if (k.legendOverflow === "wrap") {
452
- On((e) => e.length ? [] : e);
442
+ let Dn = f(on);
443
+ Dn.current = on, d(() => {
444
+ let e = U.current;
445
+ !F && e && document.fullscreenElement === e && document.exitFullscreen().catch(() => {});
446
+ }, [F]);
447
+ let On = (e) => {
448
+ $t.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && F && (e.preventDefault(), En("escape", e.nativeEvent));
449
+ }, [Y, kn] = p([]), An = f(/* @__PURE__ */ new Map()), [jn, Mn] = p(null), Nn = gt ?? !0, X = L?.legend ?? [], Pn = () => {
450
+ let e = gn.current;
451
+ if (!e || !L) return;
452
+ if (O.legendOverflow === "wrap") {
453
+ kn((e) => e.length ? [] : e);
453
454
  return;
454
455
  }
455
456
  let t = [...e.querySelectorAll(":scope > [data-part=\"legend-item\"]")];
456
- for (let e of t) e.hidden || kn.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
457
+ for (let e of t) e.hidden || An.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
457
458
  let n = Number.parseFloat(getComputedStyle(e).columnGap) || 0, r = e.querySelector(":scope > [data-part=\"legend-more\"]"), i = r && !r.hidden ? r.getBoundingClientRect().width : 40, a = se({
458
459
  units: X.map((e) => ({
459
- size: kn.current.get(e.key) ?? 0,
460
+ size: An.current.get(e.key) ?? 0,
460
461
  collapsible: !0
461
462
  })),
462
463
  available: e.clientWidth,
463
464
  gap: n,
464
465
  triggerSize: i
465
466
  });
466
- On((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
467
+ kn((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
467
468
  };
468
469
  ae(() => {
469
- Nn();
470
+ Pn();
470
471
  }, [
471
472
  X,
472
- k.legendOverflow,
473
- gt,
474
- A
473
+ O.legendOverflow,
474
+ _t,
475
+ k
475
476
  ]), d(() => {
476
- let e = mn.current;
477
+ let e = gn.current;
477
478
  if (!e || typeof ResizeObserver > "u") return;
478
- let t = new ResizeObserver(() => Pn.current());
479
+ let t = new ResizeObserver(() => Fn.current());
479
480
  return t.observe(e), () => t.disconnect();
480
481
  }, []);
481
- let Pn = f(Nn);
482
- Pn.current = Nn;
483
- let Fn = (e, t, n, r) => {
484
- let i = X.map((e) => e.key), a = Ae(i, $t, e.key, t);
485
- jn(e.key), en(a, n, r), yn(O(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
486
- }, Z = A && R && Ce(R, A) ? A.key : null, In = (e) => {
487
- if (!R) return "";
488
- let t = R.shape === "pie" ? R.series[0] : v(R, e.key);
482
+ let Fn = f(Pn);
483
+ Fn.current = Pn;
484
+ let In = (e, t, n, r) => {
485
+ let i = X.map((e) => e.key), a = je(i, tn, e.key, t);
486
+ Mn(e.key), nn(a, n, r), xn(D(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
487
+ }, Z = k && L && Ce(L, k) ? k.key : null, Ln = (e) => {
488
+ if (!L) return "";
489
+ let t = L.shape === "pie" ? L.series[0] : v(L, e.key);
489
490
  if (!t) return "";
490
- let n = R.shape === "pie" ? fe(R, e.key) : Z ? fe(R, Z) : Ke(t.values), r = n >= 0 ? t.values[n] : null;
491
- return r == null ? "" : t.format(r);
492
- }, Ln = Ye("start"), Rn = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), zn = An && Rn.includes(An) ? An : Rn[0] ?? null, Bn = (e, t, n) => {
493
- let r = R?.shape === "pie" ? R.series[0] : R ? v(R, e.key) : void 0, i = R?.shape === "pie" ? e.key === Z : A?.series === e.key && Z !== null, o = !n && Y.includes(t), s = /* @__PURE__ */ g(m, { children: [
491
+ let n = L.shape === "pie" ? fe(L, e.key) : Z ? fe(L, Z) : Ke(t.values);
492
+ return n >= 0 ? Oe(t, n) : "";
493
+ }, Rn = Ye("start"), zn = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), Bn = jn && zn.includes(jn) ? jn : zn[0] ?? null, Vn = (e, t, n) => {
494
+ let r = L?.shape === "pie" ? L.series[0] : L ? v(L, e.key) : void 0, i = L?.shape === "pie" ? e.key === Z : k?.series === e.key && Z !== null, o = !n && Y.includes(t), s = /* @__PURE__ */ g(m, { children: [
494
495
  /* @__PURE__ */ h("span", {
495
- "data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" ? "bar" : e.kind,
496
+ "data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" || e.kind === "range" ? "bar" : e.kind,
496
497
  "data-part": "legend-marker",
497
498
  "data-part-legend-marker": "",
498
499
  ...r && r.stroke !== "solid" ? { "data-stroke": r.stroke } : {}
@@ -503,10 +504,10 @@ function S(c) {
503
504
  title: e.label,
504
505
  children: e.label
505
506
  }),
506
- gt ? /* @__PURE__ */ h("span", {
507
+ _t ? /* @__PURE__ */ h("span", {
507
508
  "data-part": "legend-value",
508
509
  "data-part-legend-value": "",
509
- children: In(e)
510
+ children: Ln(e)
510
511
  }) : null
511
512
  ] }), c = {
512
513
  "data-part": "legend-item",
@@ -515,149 +516,149 @@ function S(c) {
515
516
  ...qe(e.color),
516
517
  ...i ? { "data-current": "" } : {},
517
518
  hidden: o,
518
- onPointerEnter: () => e.visible && K.current?.emphasize(e.key),
519
- onPointerLeave: () => K.current?.emphasize(null)
520
- }, l = Mn ? /* @__PURE__ */ u(Qe, {
519
+ onPointerEnter: () => e.visible && G.current?.emphasize(e.key),
520
+ onPointerLeave: () => G.current?.emphasize(null)
521
+ }, l = Nn ? /* @__PURE__ */ u(Qe, {
521
522
  ...c,
522
523
  entry: e,
523
- focused: n || zn === e.key,
524
+ focused: n || Bn === e.key,
524
525
  key: `${n ? "layer" : "row"}-${e.key}`,
525
- onActivate: (t, n, r) => Fn(e, t, n, r),
526
+ onActivate: (t, n, r) => In(e, t, n, r),
526
527
  onFocusEntry: () => {
527
- n || jn(e.key), e.visible && K.current?.emphasize(e.key);
528
+ n || Mn(e.key), e.visible && G.current?.emphasize(e.key);
528
529
  },
529
- onBlurEntry: () => K.current?.emphasize(null)
530
+ onBlurEntry: () => G.current?.emphasize(null)
530
531
  }, s) : /* @__PURE__ */ u("span", {
531
532
  ...c,
532
533
  key: `${n ? "layer" : "row"}-${e.key}`,
533
534
  role: "listitem"
534
535
  }, s);
535
- return Ut ? /* @__PURE__ */ h(ee, { children: Ut(e, c, l) }, `${n ? "layer" : "row"}-${e.key}`) : l;
536
- }, Vn = (e) => {
536
+ return Gt ? /* @__PURE__ */ h(ee, { children: Gt(e, c, l) }, `${n ? "layer" : "row"}-${e.key}`) : l;
537
+ }, Hn = (e) => {
537
538
  let t = e.target;
538
539
  if (t.closest("[data-part=\"menu\"]")) return;
539
540
  let n = [...e.currentTarget.querySelectorAll(":scope > button:not([hidden])")], r = n.indexOf(t);
540
541
  if (r === -1) return;
541
- let i = W.current ? getComputedStyle(W.current).direction === "rtl" : !1, a = e.key === "ArrowRight" ? i ? -1 : 1 : e.key === "ArrowLeft" ? i ? 1 : -1 : 0, o;
542
- a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(), jn(o.dataset.key ?? "__more"), o.focus());
543
- }, Q = Ye("end"), Hn = Ye("start", !1), Un = (e, t) => {
542
+ let i = U.current ? getComputedStyle(U.current).direction === "rtl" : !1, a = e.key === "ArrowRight" ? i ? -1 : 1 : e.key === "ArrowLeft" ? i ? 1 : -1 : 0, o;
543
+ a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(), Mn(o.dataset.key ?? "__more"), o.focus());
544
+ }, Q = Ye("end"), Un = Ye("start", !1), Wn = (e, t) => {
544
545
  let n = document.createElement("a");
545
546
  n.href = t, n.download = e, document.body.append(n), n.click(), n.remove();
546
- }, Wn = typeof x == "string" ? x : "chart";
547
- ie(Yt, () => ({
548
- focus: () => G.current?.focus(),
549
- resetZoom: () => P(_, "programmatic"),
550
- toDataURL: () => K.current?.toDataURL() ?? null,
551
- toCsv: () => R ? he(R, O) : ""
547
+ }, Gn = typeof S == "string" ? S : "chart";
548
+ ie(Zt, () => ({
549
+ focus: () => W.current?.focus(),
550
+ resetZoom: () => N(_, "programmatic"),
551
+ toDataURL: () => G.current?.toDataURL() ?? null,
552
+ toCsv: () => L ? he(L, D) : ""
552
553
  }), [
553
- R,
554
- O,
555
- P
554
+ L,
555
+ D,
556
+ N
556
557
  ]);
557
- let Gn = B ? O("loading") : z ? O("error") : R ? ye(R, O) : "", Kn = `${D}-title`, qn = `${D}-description`, Jn = `${D}-summary`, Yn = L.series.some((e) => e.kind === "pie") ? "pie" : L.series.every((e) => e.kind === "line" || e.kind === "area") ? "line" : "bar", $ = F && H && R ? me(R, O) : null, Xn = () => {
558
- dn(null), Ct?.();
559
- }, Zn = x !== void 0 || S !== void 0 || rt !== void 0 || k.toolbar !== "none" ? /* @__PURE__ */ g("figcaption", {
558
+ let Kn = z ? D("loading") : R ? D("error") : L ? ye(L, D) : "", qn = `${E}-title`, Jn = `${E}-description`, Yn = `${E}-summary`, Xn = I.series.some((e) => e.kind === "pie") ? "pie" : I.series.every((e) => e.kind === "line" || e.kind === "area" || e.kind === "range") ? "line" : "bar", $ = P && V && L ? me(L, D) : null, Zn = () => {
559
+ pn(null), Tt?.();
560
+ }, Qn = S !== void 0 || C !== void 0 || it !== void 0 || O.toolbar !== "none" ? /* @__PURE__ */ g("figcaption", {
560
561
  "data-part": "header",
561
562
  "data-part-header": "",
562
563
  children: [
563
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", { children: [x === void 0 ? null : /* @__PURE__ */ h("span", {
564
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", { children: [S === void 0 ? null : /* @__PURE__ */ h("span", {
564
565
  "data-part": "title",
565
566
  "data-part-title": "",
566
- id: Kn,
567
- children: x
567
+ id: qn,
568
+ children: S
568
569
  }), w === void 0 ? null : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
569
- ...o(Hn.controlProps, "part", "help"),
570
- "aria-controls": `${D}-help`,
571
- "aria-label": O("help"),
570
+ ...o(Un.controlProps, "part", "help"),
571
+ "aria-controls": `${E}-help`,
572
+ "aria-label": D("help"),
572
573
  type: "button",
573
574
  children: /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: "circle-info" }) })
574
575
  }), /* @__PURE__ */ h("div", {
575
- ...o(Hn.layerProps, "part", "help-content"),
576
- id: `${D}-help`,
576
+ ...o(Un.layerProps, "part", "help-content"),
577
+ id: `${E}-help`,
577
578
  role: "note",
578
579
  children: w
579
- })] })] }), S === void 0 ? null : /* @__PURE__ */ h("span", {
580
+ })] })] }), C === void 0 ? null : /* @__PURE__ */ h("span", {
580
581
  "data-part": "description",
581
582
  "data-part-description": "",
582
- id: qn,
583
- children: S
583
+ id: Jn,
584
+ children: C
584
585
  })] }),
585
- rt === void 0 ? null : /* @__PURE__ */ h("div", {
586
+ it === void 0 ? null : /* @__PURE__ */ h("div", {
586
587
  "data-part": "actions",
587
588
  "data-part-actions": "",
588
- children: rt
589
+ children: it
589
590
  }),
590
- k.toolbar === "none" ? null : /* @__PURE__ */ g("div", {
591
- "aria-hidden": !H || void 0,
592
- "aria-label": H ? O("toolbar") : void 0,
591
+ O.toolbar === "none" ? null : /* @__PURE__ */ g("div", {
592
+ "aria-hidden": !V || void 0,
593
+ "aria-label": V ? D("toolbar") : void 0,
593
594
  "data-part": "toolbar",
594
595
  "data-part-toolbar": "",
595
- "data-waiting": H ? void 0 : "",
596
- inert: !H,
597
- role: H ? "toolbar" : void 0,
596
+ "data-waiting": V ? void 0 : "",
597
+ inert: !V,
598
+ role: V ? "toolbar" : void 0,
598
599
  children: [
599
- R && T && !we(N) && R.shape === "cartesian" ? /* @__PURE__ */ h($e, {
600
- label: O("resetZoom"),
600
+ L && xt && !we(M) && L.shape === "cartesian" ? /* @__PURE__ */ h($e, {
601
+ label: D("resetZoom"),
601
602
  onPress: (e, t) => {
602
- P(_, "clear", t), yn(xe(R, _, O)), G.current?.focus();
603
+ N(_, "clear", t), xn(xe(L, _, D)), W.current?.focus();
603
604
  },
604
605
  glyph: "rotate-ccw",
605
606
  part: "zoom-reset"
606
607
  }) : null,
607
608
  /* @__PURE__ */ h($e, {
608
- label: O("tableView"),
609
- onPress: (e, t) => nn(!F, e, t),
609
+ label: D("tableView"),
610
+ onPress: (e, t) => an(!P, e, t),
610
611
  glyph: "file-spreadsheet",
611
612
  part: "view-toggle",
612
- pressed: F
613
+ pressed: P
613
614
  }),
614
615
  /* @__PURE__ */ h($e, {
615
- label: O(I ? "exitFullscreen" : "fullscreen"),
616
- glyph: I ? "minimize" : "maximize",
617
- onPress: (e, t) => Tn(e, t),
616
+ label: D(F ? "exitFullscreen" : "fullscreen"),
617
+ glyph: F ? "minimize" : "maximize",
618
+ onPress: (e, t) => En(e, t),
618
619
  part: "fullscreen-toggle"
619
620
  }),
620
621
  /* @__PURE__ */ h("button", {
621
622
  ...o(Q.controlProps, "part", "menu-trigger"),
622
623
  "aria-haspopup": "menu",
623
- "aria-label": O("more"),
624
- title: O("more"),
624
+ "aria-label": D("more"),
625
+ title: D("more"),
625
626
  type: "button",
626
627
  children: /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: "ellipsis" }) })
627
628
  }),
628
629
  /* @__PURE__ */ g("div", {
629
630
  ...o(Q.layerProps, "part", "menu"),
630
- "aria-label": O("more"),
631
+ "aria-label": D("more"),
631
632
  role: "menu",
632
633
  children: [
633
- /* @__PURE__ */ h(C, {
634
+ /* @__PURE__ */ h(et, {
634
635
  action: "view",
635
- label: O("tableView"),
636
+ label: D("tableView"),
636
637
  onPress: (e, t) => {
637
- Q.close(), nn(!F, e, t);
638
+ Q.close(), an(!P, e, t);
638
639
  }
639
640
  }),
640
- /* @__PURE__ */ h(C, {
641
+ /* @__PURE__ */ h(et, {
641
642
  action: "fullscreen",
642
- label: O(I ? "exitFullscreen" : "fullscreen"),
643
+ label: D(F ? "exitFullscreen" : "fullscreen"),
643
644
  onPress: (e, t) => {
644
- Q.close(), Tn(e, t);
645
+ Q.close(), En(e, t);
645
646
  }
646
647
  }),
647
- /* @__PURE__ */ h(C, {
648
+ /* @__PURE__ */ h(et, {
648
649
  action: "csv",
649
- label: O("downloadCsv"),
650
+ label: D("downloadCsv"),
650
651
  onPress: () => {
651
- Q.close(), R && Un(`${Wn}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(he(R, O))}`);
652
+ Q.close(), L && Wn(`${Gn}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(he(L, D))}`);
652
653
  }
653
654
  }),
654
- /* @__PURE__ */ h(C, {
655
+ /* @__PURE__ */ h(et, {
655
656
  action: "image",
656
- label: O("downloadImage"),
657
+ label: D("downloadImage"),
657
658
  onPress: () => {
658
659
  Q.close();
659
- let e = K.current?.toDataURL();
660
- e && Un(`${Wn}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
660
+ let e = G.current?.toDataURL();
661
+ e && Wn(`${Gn}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
661
662
  }
662
663
  })
663
664
  ]
@@ -665,94 +666,94 @@ function S(c) {
665
666
  ]
666
667
  })
667
668
  ]
668
- }) : null, Qn = mt === !1 ? null : /* @__PURE__ */ h("div", {
669
- "aria-label": B && (!R || R.shape === "pie") ? void 0 : O("legend"),
669
+ }) : null, $n = ht === !1 ? null : /* @__PURE__ */ h("div", {
670
+ "aria-label": z && (!L || L.shape === "pie") ? void 0 : D("legend"),
670
671
  "data-part": "legend",
671
672
  "data-part-legend": "",
672
- onKeyDown: Vn,
673
- ref: mn,
674
- role: B && (!R || R.shape === "pie") ? void 0 : Mn ? "toolbar" : "list",
675
- children: B && (!R || R.shape === "pie") ? /* @__PURE__ */ g(m, { children: [
676
- /* @__PURE__ */ h(et, {}),
677
- /* @__PURE__ */ h(et, {}),
678
- /* @__PURE__ */ h(et, {})
673
+ onKeyDown: Hn,
674
+ ref: gn,
675
+ role: z && (!L || L.shape === "pie") ? void 0 : Nn ? "toolbar" : "list",
676
+ children: z && (!L || L.shape === "pie") ? /* @__PURE__ */ g(m, { children: [
677
+ /* @__PURE__ */ h(tt, {}),
678
+ /* @__PURE__ */ h(tt, {}),
679
+ /* @__PURE__ */ h(tt, {})
679
680
  ] }) : /* @__PURE__ */ g(m, { children: [
680
- X.map((e, t) => Bn(e, t, !1)),
681
+ X.map((e, t) => Vn(e, t, !1)),
681
682
  /* @__PURE__ */ h("button", {
682
- ...o(Ln.controlProps, "part", "legend-more"),
683
+ ...o(Rn.controlProps, "part", "legend-more"),
683
684
  "aria-haspopup": "true",
684
- "aria-label": O("legendMore", { series: new Intl.ListFormat(y ?? Qt, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
685
+ "aria-label": D("legendMore", { series: new Intl.ListFormat(b ?? en, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
685
686
  hidden: Y.length === 0,
686
- tabIndex: zn === null ? 0 : -1,
687
+ tabIndex: Bn === null ? 0 : -1,
687
688
  type: "button",
688
- children: O("moreSeries", { count: Y.length })
689
+ children: D("moreSeries", { count: Y.length })
689
690
  }),
690
691
  /* @__PURE__ */ h("div", {
691
- ...o(Ln.layerProps, "part", "menu"),
692
- "aria-label": O("legend"),
692
+ ...o(Rn.layerProps, "part", "menu"),
693
+ "aria-label": D("legend"),
693
694
  role: "group",
694
695
  children: Y.map((e) => {
695
696
  let t = X[e];
696
- return t ? Bn(t, e, !0) : null;
697
+ return t ? Vn(t, e, !0) : null;
697
698
  })
698
699
  })
699
700
  ] })
700
- }), $n = i({
701
- ...Zt,
701
+ }), er = i({
702
+ ...$t,
702
703
  "data-ui": "chart",
703
704
  "data-part": "root",
704
- "data-size": k.size,
705
- "data-variant": k.variant,
706
- "data-palette": k.palette,
707
- "data-toolbar": k.toolbar,
708
- "data-legend-overflow": k.legendOverflow,
709
- ...B ? { "data-loading": "" } : {},
710
- ...I ? { "data-fullscreen": "" } : {},
711
- onKeyDown: Dn,
705
+ "data-size": O.size,
706
+ "data-variant": O.variant,
707
+ "data-palette": O.palette,
708
+ "data-toolbar": O.toolbar,
709
+ "data-legend-overflow": O.legendOverflow,
710
+ ...z ? { "data-loading": "" } : {},
711
+ ...F ? { "data-fullscreen": "" } : {},
712
+ onKeyDown: On,
712
713
  ref: (e) => {
713
- W.current = e, Xe(Xt, e);
714
+ U.current = e, Xe(Qt, e);
714
715
  },
715
716
  children: /* @__PURE__ */ g(m, { children: [
716
- Zn,
717
717
  Qn,
718
+ $n,
718
719
  /* @__PURE__ */ g("div", {
719
- "aria-busy": B || void 0,
720
- "aria-describedby": S === void 0 ? Jn : `${qn} ${Jn}`,
721
- "aria-label": x === void 0 ? Zt["aria-label"] ?? O("roledescription") : void 0,
722
- "aria-labelledby": x === void 0 ? void 0 : Kn,
723
- "aria-roledescription": O("roledescription"),
720
+ "aria-busy": z || void 0,
721
+ "aria-describedby": C === void 0 ? Yn : `${Jn} ${Yn}`,
722
+ "aria-label": S === void 0 ? $t["aria-label"] ?? D("roledescription") : void 0,
723
+ "aria-labelledby": S === void 0 ? void 0 : qn,
724
+ "aria-roledescription": D("roledescription"),
724
725
  "data-part": "plot",
725
726
  "data-part-plot": "",
726
- onBlur: (e) => j(null, "blur", e.nativeEvent),
727
- onFocus: wn,
728
- onKeyDown: Sn,
729
- ref: G,
727
+ onBlur: (e) => A(null, "blur", e.nativeEvent),
728
+ onFocus: Tn,
729
+ onKeyDown: Cn,
730
+ ref: W,
730
731
  role: "group",
731
732
  tabIndex: 0,
732
733
  children: [
733
734
  /* @__PURE__ */ h("div", {
734
735
  "data-part": "crosshair",
735
736
  "data-part-crosshair": "",
736
- hidden: !q.crosshair,
737
- ...q.crosshair?.isBand ? { "data-band": "" } : {},
738
- "data-orientation": R?.orientation ?? "vertical",
739
- style: q.crosshair ? Je({
740
- "--slotted-chart-x": q.crosshair.x,
741
- "--slotted-chart-y": q.crosshair.y,
742
- "--slotted-chart-band-start": q.crosshair.band.start,
743
- "--slotted-chart-band-size": q.crosshair.band.size,
744
- "--slotted-chart-frame-start": q.crosshair.frame.start,
745
- "--slotted-chart-frame-size": q.crosshair.frame.size
737
+ hidden: !K.crosshair,
738
+ ...K.crosshair?.isBand ? { "data-band": "" } : {},
739
+ "data-orientation": L?.orientation ?? "vertical",
740
+ style: K.crosshair ? Je({
741
+ "--slotted-chart-x": K.crosshair.x,
742
+ "--slotted-chart-y": K.crosshair.y,
743
+ "--slotted-chart-band-start": K.crosshair.band.start,
744
+ "--slotted-chart-band-size": K.crosshair.band.size,
745
+ "--slotted-chart-frame-start": K.crosshair.frame.start,
746
+ "--slotted-chart-frame-size": K.crosshair.frame.size
746
747
  }) : void 0
747
748
  }),
748
749
  /* @__PURE__ */ h("div", {
749
750
  "aria-hidden": "true",
750
751
  "data-part": "canvas",
751
752
  "data-part-canvas": "",
752
- hidden: !V,
753
- ref: fn
753
+ hidden: !B,
754
+ ref: mn
754
755
  }),
755
- q.markers.map((e) => /* @__PURE__ */ h("div", {
756
+ K.markers.map((e) => /* @__PURE__ */ h("div", {
756
757
  "aria-hidden": "true",
757
758
  "data-part": "marker",
758
759
  "data-part-marker": "",
@@ -768,49 +769,48 @@ function S(c) {
768
769
  "aria-hidden": "true",
769
770
  "data-part": "tooltip",
770
771
  "data-part-tooltip": "",
771
- ref: pn,
772
- ...q.tooltip ? { "data-open": "" } : {},
773
- ...q.docked ? { "data-docked": "" } : {},
774
- children: q.tooltip && R ? Ht?.(q.tooltip, R) ?? /* @__PURE__ */ h(Ze, {
775
- context: q.tooltip,
776
- indicator: k.tooltip.indicator,
777
- model: R,
778
- totalLabel: O("total")
772
+ ref: hn,
773
+ ...K.tooltip ? { "data-open": "" } : {},
774
+ ...K.docked ? { "data-docked": "" } : {},
775
+ children: K.tooltip && L ? Wt?.(K.tooltip, L) ?? /* @__PURE__ */ h(Ze, {
776
+ context: K.tooltip,
777
+ indicator: O.tooltip.indicator,
778
+ model: L
779
779
  }) : null
780
780
  }),
781
- V && R?.shape === "pie" && (R.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ h("div", {
781
+ B && L?.shape === "pie" && (L.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ h("div", {
782
782
  "aria-hidden": "true",
783
783
  "data-part": "center",
784
784
  "data-part-center": "",
785
- children: Wt?.(R) ?? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
785
+ children: Kt?.(L) ?? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
786
786
  "data-part": "center-value",
787
787
  "data-part-center-value": "",
788
- children: R.series[0].format(R.total)
788
+ children: L.series[0].format(L.total)
789
789
  }), /* @__PURE__ */ h("span", {
790
790
  "data-part": "center-label",
791
791
  "data-part-center-label": "",
792
- children: O("total")
792
+ children: D("total")
793
793
  })] })
794
794
  }) : null,
795
795
  $ ? /* @__PURE__ */ h("div", {
796
- "aria-labelledby": x === void 0 ? void 0 : Kn,
796
+ "aria-labelledby": S === void 0 ? void 0 : qn,
797
797
  "data-part": "table-region",
798
798
  "data-part-table-region": "",
799
- ref: Cn,
799
+ ref: wn,
800
800
  role: "region",
801
801
  tabIndex: 0,
802
802
  children: /* @__PURE__ */ g("table", {
803
803
  "data-part": "table",
804
804
  "data-part-table": "",
805
805
  children: [
806
- /* @__PURE__ */ h("caption", { children: $.omitted ? typeof x == "string" ? O("truncatedCaption", {
807
- title: x,
806
+ /* @__PURE__ */ h("caption", { children: $.omitted ? typeof S == "string" ? D("truncatedCaption", {
807
+ title: S,
808
808
  shown: $.rows.length,
809
809
  count: $.rows.length + $.omitted
810
- }) : O("truncated", {
810
+ }) : D("truncated", {
811
811
  shown: $.rows.length,
812
812
  count: $.rows.length + $.omitted
813
- }) : typeof x == "string" ? x : null }),
813
+ }) : typeof S == "string" ? S : null }),
814
814
  /* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", { children: $.columns.map((e, t) => /* @__PURE__ */ u("th", {
815
815
  ...t > 0 ? { "data-numeric": "" } : {},
816
816
  key: e.key,
@@ -829,41 +829,41 @@ function S(c) {
829
829
  ]
830
830
  })
831
831
  }) : null,
832
- B ? /* @__PURE__ */ h(tt, { kind: Yn }) : null,
833
- !B && z ? /* @__PURE__ */ h("div", {
832
+ z ? /* @__PURE__ */ h(nt, { kind: Xn }) : null,
833
+ !z && R ? /* @__PURE__ */ h("div", {
834
834
  "data-part": "error",
835
835
  "data-part-error": "",
836
- children: Kt?.() ?? /* @__PURE__ */ h(nt, {
837
- action: Ct || un ? O("retry") : void 0,
838
- onAction: Xn,
836
+ children: Jt?.() ?? /* @__PURE__ */ h(rt, {
837
+ action: Tt || fn ? D("retry") : void 0,
838
+ onAction: Zn,
839
839
  status: "error",
840
- text: O("error")
840
+ text: D("error")
841
841
  })
842
842
  }) : null,
843
- !B && !z && R?.empty ? /* @__PURE__ */ h("div", {
843
+ !z && !R && L?.empty ? /* @__PURE__ */ h("div", {
844
844
  "data-part": "empty",
845
845
  "data-part-empty": "",
846
- children: Gt?.(R.empty) ?? /* @__PURE__ */ h(nt, {
847
- action: R.empty === "all-hidden" ? O("showAll") : void 0,
848
- onAction: (e) => en(Re, "pointer", e),
849
- status: R.empty === "all-hidden" ? "no-results" : "empty",
850
- text: R.empty === "all-hidden" ? O("allHidden") : O("noData")
846
+ children: qt?.(L.empty) ?? /* @__PURE__ */ h(rt, {
847
+ action: L.empty === "all-hidden" ? D("showAll") : void 0,
848
+ onAction: (e) => nn(Re, "pointer", e),
849
+ status: L.empty === "all-hidden" ? "no-results" : "empty",
850
+ text: L.empty === "all-hidden" ? D("allHidden") : D("noData")
851
851
  })
852
852
  }) : null,
853
853
  /* @__PURE__ */ h("p", {
854
854
  "data-part": "summary",
855
855
  "data-part-summary": "",
856
- id: Jn,
857
- children: Gn
856
+ id: Yn,
857
+ children: Kn
858
858
  })
859
859
  ]
860
860
  })
861
861
  ] })
862
862
  });
863
- return qt ? qt($n) : /* @__PURE__ */ h("figure", { ...$n });
863
+ return Yt ? Yt(er) : /* @__PURE__ */ h("figure", { ...er });
864
864
  }
865
865
  function Qe({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i, onBlurEntry: a, ...o }) {
866
- let [s, c] = x();
866
+ let [s, c] = S();
867
867
  return /* @__PURE__ */ h("button", {
868
868
  ...o,
869
869
  "aria-pressed": t.visible,
@@ -881,7 +881,7 @@ function Qe({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i,
881
881
  });
882
882
  }
883
883
  function $e({ glyph: e, label: t, onPress: i, part: o, pressed: s }) {
884
- let [c, ee] = x();
884
+ let [c, ee] = S();
885
885
  return /* @__PURE__ */ h("button", {
886
886
  "aria-label": t,
887
887
  ...s === void 0 ? {} : {
@@ -897,8 +897,8 @@ function $e({ glyph: e, label: t, onPress: i, part: o, pressed: s }) {
897
897
  children: /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: e }) })
898
898
  });
899
899
  }
900
- function C({ action: e, label: t, onPress: n }) {
901
- let [r, i] = x();
900
+ function et({ action: e, label: t, onPress: n }) {
901
+ let [r, i] = S();
902
902
  return /* @__PURE__ */ h("button", {
903
903
  "data-action": e,
904
904
  "data-part": "menu-item",
@@ -923,10 +923,10 @@ function w({ shape: e = "block" }) {
923
923
  "data-ui-skeleton": ""
924
924
  });
925
925
  }
926
- function et() {
926
+ function tt() {
927
927
  return /* @__PURE__ */ h(w, {});
928
928
  }
929
- function tt({ kind: e }) {
929
+ function nt({ kind: e }) {
930
930
  let t = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ h(w, {}, t));
931
931
  return /* @__PURE__ */ h("div", {
932
932
  "aria-hidden": "true",
@@ -957,7 +957,7 @@ function tt({ kind: e }) {
957
957
  })
958
958
  });
959
959
  }
960
- function nt({ action: e, onAction: t, status: n, text: r }) {
960
+ function rt({ action: e, onAction: t, status: n, text: r }) {
961
961
  return /* @__PURE__ */ g("section", {
962
962
  "data-align": "center",
963
963
  "data-live": "polite",
@@ -1007,4 +1007,4 @@ function nt({ action: e, onAction: t, status: n, text: r }) {
1007
1007
  });
1008
1008
  }
1009
1009
  //#endregion
1010
- export { Ie as a, Le as i, S as n, Ze as r, Pe as t };
1010
+ export { Ie as a, Le as i, C as n, Ze as r, Fe as t };