@synnaxlabs/pluto 0.44.3 → 0.44.5

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 (153) hide show
  1. package/dist/Animated-BDoJWl9g.cjs +1 -0
  2. package/dist/{Animated-BHxq6Pmm.js → Animated-fI-NFaha.js} +2 -2
  3. package/dist/{symbols-aLnytgtc.js → Editable-C1g_CFYk.js} +5898 -5888
  4. package/dist/{symbols-DWZqHjhU.cjs → Editable-DUtJOqJ5.cjs} +41 -41
  5. package/dist/{LinePlot-BJ10hKs7.cjs → LinePlot-6cl8_hmn.cjs} +5 -5
  6. package/dist/{LinePlot-VIcFjuPQ.js → LinePlot-Ck0rhtFk.js} +712 -728
  7. package/dist/{Toggle-C--I90ch.js → Toggle-DEJ8Uvun.js} +1 -1
  8. package/dist/Toggle-DUKDeqpe.cjs +1 -0
  9. package/dist/{Video-DdsVXhnt.js → Video-B6tujjr8.js} +1 -1
  10. package/dist/{Video-BbRLzkdH.cjs → Video-BjRd9sFv.cjs} +1 -1
  11. package/dist/button.cjs +1 -1
  12. package/dist/button.js +1 -1
  13. package/dist/color.cjs +1 -1
  14. package/dist/color.js +1 -1
  15. package/dist/css-DI0uCCGq.cjs +8 -0
  16. package/dist/{css-BKrX40Df.js → css-DvIPI3Qm.js} +1383 -1252
  17. package/dist/css.cjs +1 -1
  18. package/dist/css.js +2 -2
  19. package/dist/dialog.cjs +1 -1
  20. package/dist/dialog.js +1 -1
  21. package/dist/eraser-B03ej59l.cjs +63 -0
  22. package/dist/{eraser-DtXU7kOS.js → eraser-CnRJY__h.js} +4999 -4687
  23. package/dist/ether.cjs +1 -1
  24. package/dist/ether.js +6 -6
  25. package/dist/{external-BT0nByPv.js → external-B3dPSZUg.js} +7 -8
  26. package/dist/external-BEd3F7zY.cjs +1 -0
  27. package/dist/external-BS9S-b49.cjs +1 -0
  28. package/dist/external-BVDQNHbo.cjs +1 -0
  29. package/dist/external-BenP6Hcm.cjs +1 -0
  30. package/dist/external-Blrrgnzw.cjs +1 -0
  31. package/dist/{external-tHxdTvxn.js → external-BzV_PGNe.js} +2 -2
  32. package/dist/{external-ONwuyKzG.js → external-C2iqWGd2.js} +22 -22
  33. package/dist/external-CAAPXpVr.cjs +1 -0
  34. package/dist/{external-n4gJTJfw.js → external-CKhbbig_.js} +15 -15
  35. package/dist/external-CNF5TNBY.cjs +1 -0
  36. package/dist/{external-Bt-WjDvD.js → external-D16M7vHB.js} +9 -9
  37. package/dist/{external-dkXc0y5z.js → external-D6hAP7eJ.js} +7 -7
  38. package/dist/external-D98a3YQJ.cjs +1 -0
  39. package/dist/external-DKh0JhWO.cjs +1 -0
  40. package/dist/external-DNO3FJLl.cjs +1 -0
  41. package/dist/{external-yddEc8os.cjs → external-DOEaBrpz.cjs} +2 -2
  42. package/dist/external-DRuZ24L7.js +78 -0
  43. package/dist/{external-CEMgElRx.js → external-Daage1AI.js} +10 -10
  44. package/dist/{external-BApQK7XP.js → external-Db9iKa8k.js} +3 -3
  45. package/dist/{external-BmfZaFKB.js → external-Dfr7xymv.js} +3 -3
  46. package/dist/external-DwRvB5ZT.cjs +1 -0
  47. package/dist/{external-NUi5IwGn.js → external-GR-20z_c.js} +14 -14
  48. package/dist/external-I_-aclFy.cjs +1 -0
  49. package/dist/{external-Dgui980d.js → external-R9a28aP6.js} +24 -24
  50. package/dist/{external-Dwfn2jsF.js → external-dew29Q0v.js} +9 -9
  51. package/dist/flex.cjs +1 -1
  52. package/dist/flex.js +1 -1
  53. package/dist/{fontString-D2-HUuI_.js → fontString-CW0wLG5g.js} +2 -2
  54. package/dist/{fontString-BWGnZU-8.cjs → fontString-aK--tYMM.cjs} +1 -1
  55. package/dist/header.cjs +1 -1
  56. package/dist/header.js +1 -1
  57. package/dist/index.cjs +7 -7
  58. package/dist/index.js +6084 -5944
  59. package/dist/input.cjs +1 -1
  60. package/dist/input.js +1 -1
  61. package/dist/list.cjs +1 -1
  62. package/dist/list.js +1 -1
  63. package/dist/menu.cjs +1 -1
  64. package/dist/menu.js +1 -1
  65. package/dist/pluto.css +1 -1
  66. package/dist/src/channel/queries.d.ts.map +1 -1
  67. package/dist/src/flux/form.d.ts +39 -10
  68. package/dist/src/flux/form.d.ts.map +1 -1
  69. package/dist/src/flux/retrieve.d.ts +4 -2
  70. package/dist/src/flux/retrieve.d.ts.map +1 -1
  71. package/dist/src/flux/update.d.ts +13 -0
  72. package/dist/src/flux/update.d.ts.map +1 -1
  73. package/dist/src/form/Context.d.ts +6 -2
  74. package/dist/src/form/Context.d.ts.map +1 -1
  75. package/dist/src/form/state.d.ts +1 -0
  76. package/dist/src/form/state.d.ts.map +1 -1
  77. package/dist/src/form/use.d.ts.map +1 -1
  78. package/dist/src/hardware/device/queries.d.ts.map +1 -1
  79. package/dist/src/hardware/rack/queries.d.ts.map +1 -1
  80. package/dist/src/hardware/task/queries.d.ts +22 -1
  81. package/dist/src/hardware/task/queries.d.ts.map +1 -1
  82. package/dist/src/icon/registry.d.ts +1 -0
  83. package/dist/src/icon/registry.d.ts.map +1 -1
  84. package/dist/src/label/queries.d.ts.map +1 -1
  85. package/dist/src/mosaic/Mosaic.d.ts +1 -1
  86. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  87. package/dist/src/ontology/queries.d.ts.map +1 -1
  88. package/dist/src/ranger/queries.d.ts +3 -3
  89. package/dist/src/ranger/queries.d.ts.map +1 -1
  90. package/dist/src/select/Button.d.ts +3 -2
  91. package/dist/src/select/Button.d.ts.map +1 -1
  92. package/dist/src/select/use.d.ts +7 -4
  93. package/dist/src/select/use.d.ts.map +1 -1
  94. package/dist/src/showcase/TextShowcase.d.ts.map +1 -1
  95. package/dist/src/status/Summary.d.ts.map +1 -1
  96. package/dist/src/synnax/Provider.d.ts.map +1 -1
  97. package/dist/src/synnax/aether/provider.d.ts +6 -6
  98. package/dist/src/telem/aether/remote.d.ts +4 -4
  99. package/dist/src/telem/aether/transformers.d.ts +0 -2
  100. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  101. package/dist/src/telem/aether/transformers.spec.d.ts +2 -0
  102. package/dist/src/telem/aether/transformers.spec.d.ts.map +1 -0
  103. package/dist/src/text/external.d.ts +0 -1
  104. package/dist/src/text/external.d.ts.map +1 -1
  105. package/dist/src/triggers/Text.d.ts.map +1 -1
  106. package/dist/src/triggers/triggers.d.ts +3 -0
  107. package/dist/src/triggers/triggers.d.ts.map +1 -1
  108. package/dist/src/viewport/SelectMode.d.ts +10 -2
  109. package/dist/src/viewport/SelectMode.d.ts.map +1 -1
  110. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  111. package/dist/src/vis/legend/Simple.d.ts.map +1 -1
  112. package/dist/src/vis/line/aether/line.d.ts +0 -1
  113. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  114. package/dist/src/vis/lineplot/Legend.d.ts.map +1 -1
  115. package/dist/src/vis/lineplot/aether/XAxis.d.ts +2 -2
  116. package/dist/src/vis/lineplot/aether/YAxis.d.ts +2 -2
  117. package/dist/src/vis/lineplot/aether/axis.d.ts +2 -2
  118. package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
  119. package/dist/tabs.cjs +1 -1
  120. package/dist/tabs.js +1 -1
  121. package/dist/text.cjs +1 -1
  122. package/dist/text.js +2 -2
  123. package/dist/theming.cjs +1 -1
  124. package/dist/theming.js +2 -2
  125. package/dist/tree.cjs +1 -1
  126. package/dist/tree.js +1 -1
  127. package/dist/triggers.cjs +1 -1
  128. package/dist/triggers.js +1 -1
  129. package/dist/{units-ny6lkoIv.js → units-Dh7MflIZ.js} +3 -3
  130. package/dist/units-WWUmv-rf.cjs +1 -0
  131. package/dist/video.cjs +1 -1
  132. package/dist/video.js +1 -1
  133. package/package.json +6 -6
  134. package/dist/Animated-DEXELMDa.cjs +0 -1
  135. package/dist/Toggle-CCsw0kkq.cjs +0 -1
  136. package/dist/css-TyQvZIXQ.cjs +0 -8
  137. package/dist/eraser-Bxknv-HS.cjs +0 -63
  138. package/dist/external-BBXhtVjD.cjs +0 -1
  139. package/dist/external-BOmNpcyI.js +0 -75
  140. package/dist/external-BPF50O_x.cjs +0 -1
  141. package/dist/external-BUAnicLg.cjs +0 -1
  142. package/dist/external-BaRBYE0N.cjs +0 -1
  143. package/dist/external-BsyCwXWB.cjs +0 -1
  144. package/dist/external-COBt6FnN.cjs +0 -1
  145. package/dist/external-CZSk2V5E.cjs +0 -1
  146. package/dist/external-Cw5iYImi.cjs +0 -1
  147. package/dist/external-EMhi5ISu.cjs +0 -1
  148. package/dist/external-Jee63xkv.cjs +0 -1
  149. package/dist/external-TAYJZFme.cjs +0 -1
  150. package/dist/external-bvOijYCw.cjs +0 -1
  151. package/dist/src/text/symbols.d.ts +0 -3
  152. package/dist/src/text/symbols.d.ts.map +0 -1
  153. package/dist/units-XE06scfL.cjs +0 -1
@@ -1,7 +1,7 @@
1
- import { e as N, i as y, W as C, V as U, w as G, f as S, O as la, _ as Xe, r as $, Y as ca, E as ua, I as Ge, m as Jn, a as Q, $ as Tr, h as Er, j as Cr, k as ha, l as Mt, o as se, K as f, g as re, H as p, d as Rs, R as kr, p as sn, c as Pr, S as da, y as fa } from "./css-BKrX40Df.js";
1
+ import { r as N, c as y, d as C, W as U, e as G, i as S, O as la, w as Xe, f as $, J as ca, I as ua, v as mt, h as Jn, b as Q, k as Tr, j as Er, o as Cr, l as ha, m as Mt, p as se, K as f, g as re, H as p, _ as Rs, R as kr, q as sn, a as Pr, S as da, s as fa } from "./css-DvIPI3Qm.js";
2
2
  import we, { z as h } from "zod";
3
- import { z as Ke, M as Dt, Y as Ot, A as Ee, N as rn, g as an, B as Rr, D as pa, E as ae, F as on, H as Mr, I as ma, J as kn, K as ga, Q as ue, T as gt, U as F, V as ya, j as V, u as fe, W as va, X as Dr, G as ba, d as Ms, Z as ot, $ as es, a0 as ts, a1 as wa, a2 as Or, l as _r, a3 as xa, a4 as Sa } from "./eraser-DtXU7kOS.js";
4
- import { f as at } from "./fontString-D2-HUuI_.js";
3
+ import { z as Ge, X as Dt, A as Ot, B as Ee, N as rn, g as an, D as Rr, T as pa, E as ae, F as on, H as Mr, I as ma, J as kn, U as ga, K as ue, M as gt, Q as q, V as ya, j as V, u as fe, W as va, Y as Dr, G as ba, d as Ms, Z as at, $ as es, a0 as ts, a1 as wa, a2 as Or, l as Lr, a3 as xa, a4 as Sa } from "./eraser-CnRJY__h.js";
4
+ import { f as it } from "./fontString-CW0wLG5g.js";
5
5
  import "react";
6
6
  class Ta {
7
7
  handlers;
@@ -70,7 +70,7 @@ class Rn extends ye {
70
70
  set() {
71
71
  }
72
72
  }
73
- const Lr = {
73
+ const _r = {
74
74
  type: Rn.TYPE,
75
75
  props: {},
76
76
  variant: "sink",
@@ -112,7 +112,7 @@ const Ar = {
112
112
  variant: "source",
113
113
  valueType: "string"
114
114
  };
115
- class _n extends ye {
115
+ class Ln extends ye {
116
116
  static TYPE = "noop-status-source";
117
117
  value() {
118
118
  return {
@@ -124,19 +124,19 @@ class _n extends ye {
124
124
  }
125
125
  }
126
126
  const os = {
127
- type: _n.TYPE,
127
+ type: Ln.TYPE,
128
128
  props: {},
129
129
  variant: "source",
130
130
  valueType: "status"
131
131
  };
132
- class Ln extends ye {
132
+ class _n extends ye {
133
133
  static TYPE = "noop-color-source";
134
134
  value() {
135
135
  return y.ZERO;
136
136
  }
137
137
  }
138
138
  const cn = {
139
- type: Ln.TYPE,
139
+ type: _n.TYPE,
140
140
  props: {},
141
141
  variant: "source",
142
142
  valueType: "color"
@@ -157,8 +157,8 @@ const Nr = {
157
157
  [Rn.TYPE]: Rn,
158
158
  [Mn.TYPE]: Mn,
159
159
  [Dn.TYPE]: Dn,
160
- [_n.TYPE]: _n,
161
160
  [Ln.TYPE]: Ln,
161
+ [_n.TYPE]: _n,
162
162
  [On.TYPE]: On,
163
163
  [Yn.TYPE]: Yn
164
164
  };
@@ -179,13 +179,13 @@ const Pa = h.instanceof(ArrayBuffer), yt = h.object({
179
179
  variant: h.literal("source-transformer")
180
180
  }), Zr = yt.extend({
181
181
  variant: h.literal("sink-transformer")
182
- }), _t = ve.extend({ valueType: h.literal("series") }), ls = ve.extend({
182
+ }), Lt = ve.extend({ valueType: h.literal("series") }), ls = ve.extend({
183
183
  valueType: h.literal("boolean")
184
184
  }), hn = un.extend({ valueType: h.literal("boolean") }), Ra = Zr.extend({
185
185
  valueType: h.literal("boolean")
186
186
  }), Ma = Br.extend({
187
187
  valueType: h.literal("boolean")
188
- }), Ur = ve.extend({ valueType: h.literal("number") }), $r = un.extend({ valueType: h.literal("number") }), cs = ve.extend({ valueType: h.literal("color") }), us = ve.extend({ valueType: h.literal("status") }), Fr = ve.extend({ valueType: h.literal("string") });
188
+ }), Ur = ve.extend({ valueType: h.literal("number") }), $r = un.extend({ valueType: h.literal("number") }), cs = ve.extend({ valueType: h.literal("color") }), us = ve.extend({ valueType: h.literal("status") }), qr = ve.extend({ valueType: h.literal("string") });
189
189
  let dn = class extends ns.BaseObserver {
190
190
  props_ = void 0;
191
191
  uProps_ = void 0;
@@ -197,7 +197,7 @@ let dn = class extends ns.BaseObserver {
197
197
  const e = this.schema.safeParse(this.uProps_);
198
198
  if (e.success) this.props_ = e.data;
199
199
  else
200
- throw new Ke(
200
+ throw new Ge(
201
201
  `[BaseTelem] - expected props to be valid, but found the following errors:
202
202
  ${e.error.message}`
203
203
  );
@@ -215,7 +215,7 @@ class Ce extends X {
215
215
  source_ = void 0;
216
216
  get source() {
217
217
  if (this.source_ == null)
218
- throw new Ke(
218
+ throw new Ge(
219
219
  "[UnarySourceTransformer] - expected source to exist, but none was found."
220
220
  );
221
221
  return this.source_;
@@ -235,7 +235,7 @@ class Ce extends X {
235
235
  return !0;
236
236
  }
237
237
  }
238
- class qr extends X {
238
+ class Fr extends X {
239
239
  sources = {};
240
240
  value() {
241
241
  const e = Object.fromEntries(
@@ -252,7 +252,7 @@ class jr extends dn {
252
252
  get sink() {
253
253
  const [e] = Object.values(this.sinks);
254
254
  if (e == null)
255
- throw new Ke(
255
+ throw new Ge(
256
256
  "[UnarySinkTransformer] - expected sink to exist, but none was found."
257
257
  );
258
258
  return e;
@@ -280,8 +280,8 @@ class ds {
280
280
  }
281
281
  create(e) {
282
282
  switch (e.type) {
283
- case Lt.TYPE:
284
- return new Lt(e.props, this.factory);
283
+ case _t.TYPE:
284
+ return new _t(e.props, this.factory);
285
285
  case Yt.TYPE:
286
286
  return new Yt(e.props, this.factory);
287
287
  default:
@@ -289,14 +289,14 @@ class ds {
289
289
  }
290
290
  }
291
291
  }
292
- class Lt extends X {
292
+ class _t extends X {
293
293
  static TYPE = "source-pipeline";
294
294
  schema = Hr;
295
295
  sources = {};
296
296
  get outlet() {
297
297
  const { outlet: e } = this.props, t = this.sources[e];
298
298
  if (t == null)
299
- throw new Ke(
299
+ throw new Ge(
300
300
  `[SourcePipeline] - expected source to exist at outlet '${e}', but none was found.`
301
301
  );
302
302
  return t;
@@ -325,7 +325,7 @@ class Lt extends X {
325
325
  const Da = (n, e) => ({
326
326
  variant: "source",
327
327
  props: e,
328
- type: Lt.TYPE,
328
+ type: _t.TYPE,
329
329
  valueType: n
330
330
  }), zr = h.object({
331
331
  connections: h.array(hs),
@@ -339,7 +339,7 @@ class Yt extends fn {
339
339
  get inlet() {
340
340
  const { inlet: e } = this.props, t = this.sinks[e];
341
341
  if (t == null)
342
- throw new Ke(
342
+ throw new Ge(
343
343
  `[SinkPipeline] - expected source to exist at inlet '${e}', but none was found.`
344
344
  );
345
345
  return t;
@@ -430,7 +430,7 @@ const Vr = async (n, e, t) => {
430
430
  if (s.virtual)
431
431
  throw new Ot("cannot use virtual channels as a data source");
432
432
  return { key: s.index, dataType: $.TIMESTAMP, virtual: !1, isCalculated: r };
433
- }, _a = h.object({
433
+ }, La = h.object({
434
434
  timeRange: G.z,
435
435
  channel: h.number().or(h.string()),
436
436
  useIndexOfChannel: h.boolean().optional().default(!1)
@@ -438,7 +438,7 @@ const Vr = async (n, e, t) => {
438
438
  class Nt extends X {
439
439
  static TYPE = "series-source";
440
440
  client;
441
- schema = _a;
441
+ schema = La;
442
442
  data = new U();
443
443
  valid = !1;
444
444
  channel = null;
@@ -474,7 +474,7 @@ class Nt extends X {
474
474
  }
475
475
  }
476
476
  }
477
- const La = h.object({
477
+ const _a = h.object({
478
478
  channel: h.number().or(h.string()),
479
479
  useIndexOfChannel: h.boolean().optional().default(!1),
480
480
  timeSpan: S.z,
@@ -489,7 +489,7 @@ class It extends X {
489
489
  channel = null;
490
490
  stopStreaming;
491
491
  valid = !1;
492
- schema = La;
492
+ schema = _a;
493
493
  constructor(e, t, s, r = () => N.now()) {
494
494
  super(t), this.client = e, this.now = r, this.onStatusChange = s?.onStatusChange;
495
495
  }
@@ -596,7 +596,7 @@ class An extends X {
596
596
  static TYPE = "static-series";
597
597
  constructor(e) {
598
598
  super(e), this.data = this.props.data.map(
599
- (t, s) => new Ge({
599
+ (t, s) => new mt({
600
600
  data: t,
601
601
  dataType: $.FLOAT32,
602
602
  timeRange: G.ZERO,
@@ -623,7 +623,7 @@ class Bt extends X {
623
623
  data;
624
624
  constructor(e) {
625
625
  super(e), this.position = this.props.startPosition, this.start(this.props.rate), this.data = this.props.data.map(
626
- (t, s) => new Ge({
626
+ (t, s) => new mt({
627
627
  data: t,
628
628
  dataType: $.FLOAT32,
629
629
  timeRange: G.ZERO,
@@ -695,7 +695,7 @@ const Ba = (n) => ({
695
695
  props: n,
696
696
  variant: "source",
697
697
  valueType: "string"
698
- }), Fa = (n) => ({
698
+ }), qa = (n) => ({
699
699
  type: $t.TYPE,
700
700
  props: n,
701
701
  variant: "source",
@@ -713,19 +713,19 @@ class ti {
713
713
  return new Ue(e.props);
714
714
  case $e.TYPE:
715
715
  return new $e(e.props);
716
- case Fe.TYPE:
717
- return new Fe(e.props);
718
- case Ft.TYPE:
719
- return new Ft(e.props);
720
716
  case qe.TYPE:
721
717
  return new qe(e.props);
718
+ case qt.TYPE:
719
+ return new qt(e.props);
720
+ case Fe.TYPE:
721
+ return new Fe(e.props);
722
722
  case je.TYPE:
723
723
  return new je(e.props);
724
724
  }
725
725
  return null;
726
726
  }
727
727
  }
728
- const qa = h.object({
728
+ const Fa = h.object({
729
729
  truthy: h.number().optional().default(1),
730
730
  falsy: h.number().optional().default(0)
731
731
  }), ja = (n) => ({
@@ -736,7 +736,7 @@ const qa = h.object({
736
736
  });
737
737
  class Be extends jr {
738
738
  static TYPE = "boolean-numeric-converter-sink";
739
- static propsZ = qa;
739
+ static propsZ = Fa;
740
740
  schema = Be.propsZ;
741
741
  transform(...e) {
742
742
  return e.map((t) => t ? this.props.truthy : this.props.falsy);
@@ -762,7 +762,7 @@ class Ze extends Ce {
762
762
  }
763
763
  }
764
764
  const si = h.object({});
765
- class Ue extends qr {
765
+ class Ue extends Fr {
766
766
  static TYPE = "mean";
767
767
  static propsZ = si;
768
768
  schema = Ue.propsZ;
@@ -797,10 +797,10 @@ const Wa = (n) => ({
797
797
  suffix: h.string().optional().default(""),
798
798
  notation: Jn.notationZ.optional().default("standard")
799
799
  });
800
- class Fe extends Ce {
800
+ class qe extends Ce {
801
801
  static TYPE = "stringify-number";
802
802
  static propsZ = ii;
803
- schema = Fe.propsZ;
803
+ schema = qe.propsZ;
804
804
  transform(e) {
805
805
  const { precision: t, prefix: s, suffix: r, notation: i } = this.props;
806
806
  return `${s}${Jn.stringifyNumber(e, t, i)}${r}`;
@@ -808,13 +808,13 @@ class Fe extends Ce {
808
808
  }
809
809
  const Va = (n) => ({
810
810
  props: n,
811
- type: Fe.TYPE,
811
+ type: qe.TYPE,
812
812
  variant: "source",
813
813
  valueType: "string"
814
814
  }), ai = h.object({
815
815
  windowSize: h.number().optional().default(5)
816
816
  });
817
- class Ft extends Ce {
817
+ class qt extends Ce {
818
818
  static TYPE = "rolling-average";
819
819
  static propsZ = si;
820
820
  schema = ai;
@@ -828,23 +828,23 @@ class Ft extends Ce {
828
828
  }
829
829
  const Xa = (n) => ({
830
830
  props: n,
831
- type: Ft.TYPE,
831
+ type: qt.TYPE,
832
832
  variant: "source",
833
833
  valueType: "number"
834
834
  }), oi = h.object({
835
835
  gradient: y.gradientZ
836
836
  });
837
- class qe extends Ce {
837
+ class Fe extends Ce {
838
838
  static TYPE = "color-gradient";
839
839
  static propsZ = oi;
840
- schema = qe.propsZ;
840
+ schema = Fe.propsZ;
841
841
  transform(e) {
842
842
  return y.fromGradient(this.props.gradient, e);
843
843
  }
844
844
  }
845
845
  const Ga = (n) => ({
846
846
  props: n,
847
- type: qe.TYPE,
847
+ type: Fe.TYPE,
848
848
  variant: "source",
849
849
  valueType: "color"
850
850
  }), li = h.object({
@@ -864,12 +864,12 @@ const Ka = (n) => ({
864
864
  type: je.TYPE,
865
865
  variant: "source",
866
866
  valueType: "number"
867
- }), ps = h.enum(["average", "minmax", "decimate"]), Qa = h.object({
867
+ }), ps = h.enum(["average", "decimate"]), Qa = h.object({
868
868
  mode: ps,
869
869
  windowSize: h.number().optional().default(5)
870
870
  }), Ja = (n) => ({
871
871
  props: n,
872
- type: lt.TYPE,
872
+ type: ot.TYPE,
873
873
  variant: "source",
874
874
  valueType: "number"
875
875
  }), ci = (n, e, t) => {
@@ -888,34 +888,17 @@ const Ka = (n) => ({
888
888
  l !== void 0 && typeof l == "number" && (a += l, o++);
889
889
  }
890
890
  o > 0 && e.write(
891
- new Ge({
891
+ new mt({
892
892
  data: [a / o],
893
893
  dataType: n.dataType
894
894
  })
895
895
  );
896
896
  }
897
- }, to = (n, e, t) => {
898
- const s = e.length / 2 * t;
899
- for (let r = s; r < n.length; r += t) {
900
- const i = Math.min(r + t, n.length);
901
- let a = 1 / 0, o = -1 / 0, c = !1;
902
- for (let l = r; l < i; l++) {
903
- const u = n.at(l);
904
- u !== void 0 && typeof u == "number" && (a = Math.min(a, u), o = Math.max(o, u), c = !0);
905
- }
906
- c && e.write(
907
- new Ge({
908
- data: [a, o],
909
- dataType: n.dataType
910
- })
911
- );
912
- }
913
- }, no = {
897
+ }, to = {
914
898
  decimate: ci,
915
- average: eo,
916
- minmax: to
899
+ average: eo
917
900
  };
918
- class lt {
901
+ class ot {
919
902
  static TYPE = "series-downsampler";
920
903
  _downsample = null;
921
904
  cache = new U();
@@ -924,7 +907,7 @@ class lt {
924
907
  this.props = e;
925
908
  }
926
909
  downsample(e) {
927
- return this._downsample == null && (e.series[0].sampleOffset !== 0 ? this._downsample = ci : this._downsample = no[this.props.mode]), this._downsample;
910
+ return this._downsample == null && (e.series[0].sampleOffset !== 0 ? this._downsample = ci : this._downsample = to[this.props.mode]), this._downsample;
928
911
  }
929
912
  transform(e) {
930
913
  if (this.props.mode === "decimate" || this.props.windowSize <= 1) return e;
@@ -934,12 +917,13 @@ class lt {
934
917
  return e.series.forEach((t, s) => {
935
918
  let r = this.cache.series.at(s);
936
919
  if (r == null) {
937
- const i = this.props.mode === "minmax" ? Math.ceil(t.capacity / this.props.windowSize) * 2 : Math.ceil(t.capacity / this.props.windowSize);
938
- r = Ge.alloc({
920
+ const i = Math.ceil(t.capacity / this.props.windowSize);
921
+ r = mt.alloc({
939
922
  key: t.key + Tr.create(),
940
923
  dataType: t.dataType,
941
924
  capacity: i,
942
925
  alignment: t.alignment,
926
+ alignmentMultiple: BigInt(this.props.windowSize),
943
927
  sampleOffset: t.sampleOffset,
944
928
  timeRange: t.timeRange
945
929
  }), this.cache.push(r);
@@ -951,9 +935,9 @@ class lt {
951
935
  }), this.cache;
952
936
  }
953
937
  }
954
- const so = (n) => ({
938
+ const no = (n) => ({
955
939
  props: n,
956
- type: lt.TYPE,
940
+ type: ot.TYPE,
957
941
  variant: "source",
958
942
  valueType: "series"
959
943
  });
@@ -1054,7 +1038,7 @@ const ee = (n, e, t, s) => {
1054
1038
  t.cleanup?.();
1055
1039
  }
1056
1040
  return new Os(r.create(e, s), r, e);
1057
- }, ro = h.object({
1041
+ }, so = h.object({
1058
1042
  props: pa.nullable(),
1059
1043
  state: Rr.connectivity.connectionStateZ.nullable()
1060
1044
  }), gi = {
@@ -1062,7 +1046,7 @@ const ee = (n, e, t, s) => {
1062
1046
  };
1063
1047
  let Nn = class yi extends ae {
1064
1048
  static TYPE = "synnax.Provider";
1065
- static stateZ = ro;
1049
+ static stateZ = so;
1066
1050
  schema = yi.stateZ;
1067
1051
  afterUpdate(e) {
1068
1052
  if (e.wasSetPreviously(gs) || yn(e, gi), this.state.props == null) {
@@ -1072,22 +1056,22 @@ let Nn = class yi extends ae {
1072
1056
  this.prevState.props != null && rn.equal(this.state.props, this.prevState.props) && this.internal.client != null || (this.internal.client = new Rr(this.state.props), yn(e, this.internal));
1073
1057
  }
1074
1058
  };
1075
- const gs = "pluto-client-context", yn = (n, e) => n.set(gs, e), Qe = (n) => n.get(gs)?.client ?? null, io = {
1059
+ const gs = "pluto-client-context", yn = (n, e) => n.set(gs, e), Ke = (n) => n.get(gs)?.client ?? null, ro = {
1076
1060
  [Nn.TYPE]: Nn
1077
- }, Uh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1061
+ }, Zh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1078
1062
  __proto__: null,
1079
1063
  Provider: Nn,
1080
- REGISTRY: io,
1064
+ REGISTRY: ro,
1081
1065
  ZERO_CONTEXT_VALUE: gi,
1082
- use: Qe
1083
- }, Symbol.toStringTag, { value: "Module" })), vi = (n, e) => n.dataType.isVariable || n.dataType.equals($.UINT8) ? n : (e == null && n.dataType.equals($.TIMESTAMP) && (e = BigInt(n.data[0])), n.convert($.FLOAT32, e)), ao = (n) => n.isVariable || n.equals($.UINT8) ? n : $.FLOAT32, bi = () => ({
1066
+ use: Ke
1067
+ }, Symbol.toStringTag, { value: "Module" })), vi = (n, e) => n.dataType.isVariable || n.dataType.equals($.UINT8) ? n : (e == null && n.dataType.equals($.TIMESTAMP) && (e = BigInt(n.data[0])), n.convert($.FLOAT32, e)), io = (n) => n.isVariable || n.equals($.UINT8) ? n : $.FLOAT32, bi = () => ({
1084
1068
  purgedSeries: 0,
1085
1069
  purgedBytes: Er.bytes(0)
1086
1070
  }), wi = {
1087
1071
  instrumentation: on.NOOP,
1088
1072
  staleEntryThreshold: S.seconds(20)
1089
1073
  };
1090
- class oo {
1074
+ class ao {
1091
1075
  data = [];
1092
1076
  props;
1093
1077
  constructor(e) {
@@ -1167,8 +1151,8 @@ class oo {
1167
1151
  })), new Error("Invalid state");
1168
1152
  }
1169
1153
  }
1170
- const lo = 100, co = 1e6, uo = 1e4, ho = 100, fo = 40;
1171
- class po {
1154
+ const oo = 100, lo = 1e6, co = 1e4, uo = 100, ho = 40;
1155
+ class fo {
1172
1156
  props;
1173
1157
  counter = 0;
1174
1158
  /** Current buffer */
@@ -1213,9 +1197,9 @@ class po {
1213
1197
  allocate(e, t, s) {
1214
1198
  this.counter++;
1215
1199
  const r = this.props.dataType.isVariable, i = this.props.dataType.equals($.TIMESTAMP);
1216
- return Ge.alloc({
1217
- capacity: r ? e * fo : e,
1218
- dataType: ao(this.props.dataType),
1200
+ return mt.alloc({
1201
+ capacity: r ? e * ho : e,
1202
+ dataType: io(this.props.dataType),
1219
1203
  timeRange: s.range(N.MAX),
1220
1204
  sampleOffset: i ? s.valueOf() : 0,
1221
1205
  glBufferUsage: "dynamic",
@@ -1252,9 +1236,9 @@ class po {
1252
1236
  nextBufferSize() {
1253
1237
  const { dynamicBufferSize: e } = this.props;
1254
1238
  if (typeof e == "number") return e;
1255
- if (this.totalWrites < ho) return uo;
1239
+ if (this.totalWrites < uo) return co;
1256
1240
  const t = Cr.roundToNearestMagnitude(this.avgRate * e.seconds);
1257
- return Math.round(Math.max(Math.min(t, co), lo));
1241
+ return Math.round(Math.max(Math.min(t, lo), oo));
1258
1242
  }
1259
1243
  /**
1260
1244
  * Closes the cache and releases all resources associated with it. After close()
@@ -1264,14 +1248,14 @@ class po {
1264
1248
  this.curr = null;
1265
1249
  }
1266
1250
  }
1267
- class mo {
1251
+ class po {
1268
1252
  channel;
1269
1253
  closed = !1;
1270
1254
  ins;
1271
1255
  static;
1272
1256
  dynamic;
1273
1257
  constructor(e) {
1274
- this.channel = e.channel, this.ins = e.instrumentation ?? on.NOOP, this.static = new oo(e), this.dynamic = new po({
1258
+ this.channel = e.channel, this.ins = e.instrumentation ?? on.NOOP, this.static = new ao(e), this.dynamic = new fo({
1275
1259
  dynamicBufferSize: e.dynamicBufferSize,
1276
1260
  dataType: this.channel.dataType
1277
1261
  });
@@ -1308,14 +1292,14 @@ class mo {
1308
1292
  this.closed = !0, this.dynamic.close(), this.static.close();
1309
1293
  }
1310
1294
  }
1311
- const go = Mr.seconds(60);
1312
- class yo {
1295
+ const mo = Mr.seconds(60);
1296
+ class go {
1313
1297
  props;
1314
1298
  cache = /* @__PURE__ */ new Map();
1315
1299
  gcInterval;
1316
1300
  constructor(e) {
1317
1301
  this.props = {
1318
- dynamicBufferSize: go,
1302
+ dynamicBufferSize: mo,
1319
1303
  gcInterval: Mr.seconds(30),
1320
1304
  ...wi,
1321
1305
  ...e
@@ -1332,7 +1316,7 @@ class yo {
1332
1316
  if (i.length === 0) return;
1333
1317
  (await s.retrieve(i)).forEach((o) => {
1334
1318
  if (this.cache.has(o.key)) return;
1335
- const c = new mo({
1319
+ const c = new po({
1336
1320
  channel: o,
1337
1321
  dynamicBufferSize: r,
1338
1322
  instrumentation: t.child(`cache-${o.name}-${o.key}`)
@@ -1378,7 +1362,7 @@ class yo {
1378
1362
  clearInterval(this.gcInterval), this.cache.forEach((e) => e.close()), this.cache.clear();
1379
1363
  }
1380
1364
  }
1381
- class vo {
1365
+ class yo {
1382
1366
  /** Parsed and validated arguments passed to the constructor. */
1383
1367
  args;
1384
1368
  /**
@@ -1447,8 +1431,8 @@ class vo {
1447
1431
  });
1448
1432
  }
1449
1433
  }
1450
- const bo = new Error("request for lock canceled");
1451
- var wo = function(n, e, t, s) {
1434
+ const vo = new Error("request for lock canceled");
1435
+ var bo = function(n, e, t, s) {
1452
1436
  function r(i) {
1453
1437
  return i instanceof t ? i : new t(function(a) {
1454
1438
  a(i);
@@ -1475,8 +1459,8 @@ var wo = function(n, e, t, s) {
1475
1459
  l((s = s.apply(n, e || [])).next());
1476
1460
  });
1477
1461
  };
1478
- class xo {
1479
- constructor(e, t = bo) {
1462
+ class wo {
1463
+ constructor(e, t = vo) {
1480
1464
  this._value = e, this._cancelError = t, this._queue = [], this._weightedWaiters = [];
1481
1465
  }
1482
1466
  acquire(e = 1, t = 0) {
@@ -1488,7 +1472,7 @@ class xo {
1488
1472
  });
1489
1473
  }
1490
1474
  runExclusive(e) {
1491
- return wo(this, arguments, void 0, function* (t, s = 1, r = 0) {
1475
+ return bo(this, arguments, void 0, function* (t, s = 1, r = 0) {
1492
1476
  const [i, a] = yield this.acquire(s, r);
1493
1477
  try {
1494
1478
  return yield t(i);
@@ -1501,7 +1485,7 @@ class xo {
1501
1485
  if (e <= 0)
1502
1486
  throw new Error(`invalid weight ${e}: must be positive`);
1503
1487
  return this._couldLockImmediately(e, t) ? Promise.resolve() : new Promise((s) => {
1504
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), So(this._weightedWaiters[e - 1], { resolve: s, priority: t });
1488
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), xo(this._weightedWaiters[e - 1], { resolve: s, priority: t });
1505
1489
  });
1506
1490
  }
1507
1491
  isLocked() {
@@ -1556,7 +1540,7 @@ class xo {
1556
1540
  return (this._queue.length === 0 || this._queue[0].priority < t) && e <= this._value;
1557
1541
  }
1558
1542
  }
1559
- function So(n, e) {
1543
+ function xo(n, e) {
1560
1544
  const t = xi(n, (s) => e.priority <= s.priority);
1561
1545
  n.splice(t + 1, 0, e);
1562
1546
  }
@@ -1566,7 +1550,7 @@ function xi(n, e) {
1566
1550
  return t;
1567
1551
  return -1;
1568
1552
  }
1569
- var To = function(n, e, t, s) {
1553
+ var So = function(n, e, t, s) {
1570
1554
  function r(i) {
1571
1555
  return i instanceof t ? i : new t(function(a) {
1572
1556
  a(i);
@@ -1593,12 +1577,12 @@ var To = function(n, e, t, s) {
1593
1577
  l((s = s.apply(n, e || [])).next());
1594
1578
  });
1595
1579
  };
1596
- class Eo {
1580
+ class To {
1597
1581
  constructor(e) {
1598
- this._semaphore = new xo(1, e);
1582
+ this._semaphore = new wo(1, e);
1599
1583
  }
1600
1584
  acquire() {
1601
- return To(this, arguments, void 0, function* (e = 0) {
1585
+ return So(this, arguments, void 0, function* (e = 0) {
1602
1586
  const [, t] = yield this._semaphore.acquire(1, e);
1603
1587
  return t;
1604
1588
  });
@@ -1619,9 +1603,9 @@ class Eo {
1619
1603
  return this._semaphore.cancel();
1620
1604
  }
1621
1605
  }
1622
- class Co {
1606
+ class Eo {
1623
1607
  props;
1624
- mu = new Eo();
1608
+ mu = new To();
1625
1609
  listeners = /* @__PURE__ */ new Map();
1626
1610
  streamerRunLoop = null;
1627
1611
  streamer = null;
@@ -1704,7 +1688,7 @@ class Co {
1704
1688
  this.closed = !0;
1705
1689
  }
1706
1690
  }
1707
- class ko {
1691
+ class Co {
1708
1692
  /** Implements ChannelClient. */
1709
1693
  async retrieveChannel() {
1710
1694
  throw new Ot("NoopClient does not support retrieving channels");
@@ -1722,21 +1706,21 @@ class ko {
1722
1706
  async close() {
1723
1707
  }
1724
1708
  }
1725
- class Po {
1709
+ class ko {
1726
1710
  ins;
1727
1711
  cache;
1728
1712
  reader;
1729
1713
  streamer;
1730
1714
  channelRetriever;
1731
1715
  constructor({ instrumentation: e, core: t }) {
1732
- this.ins = e, this.channelRetriever = t.channels.createDebouncedBatchRetriever(10), this.cache = new yo({
1716
+ this.ins = e, this.channelRetriever = t.channels.createDebouncedBatchRetriever(10), this.cache = new go({
1733
1717
  channelRetriever: this.channelRetriever,
1734
1718
  instrumentation: this.ins.child("cache")
1735
- }), this.reader = new vo({
1719
+ }), this.reader = new yo({
1736
1720
  cache: this.cache,
1737
1721
  readRemote: t.read.bind(t),
1738
1722
  instrumentation: this.ins.child("reader")
1739
- }), this.streamer = new Co({
1723
+ }), this.streamer = new Eo({
1740
1724
  cache: this.cache,
1741
1725
  openStreamer: async (s) => kn.HardenedStreamer.open(t.openStreamer.bind(t), s),
1742
1726
  instrumentation: this.ins.child("streamer")
@@ -1761,35 +1745,35 @@ class Po {
1761
1745
  }
1762
1746
  }
1763
1747
  const Si = h.object({});
1764
- class ct extends ae {
1748
+ class lt extends ae {
1765
1749
  static TYPE = "telem.Provider";
1766
1750
  static stateZ = Si;
1767
- schema = ct.stateZ;
1751
+ schema = lt.stateZ;
1768
1752
  prevCore = null;
1769
1753
  client = null;
1770
1754
  afterUpdate(e) {
1771
- const { internal: t } = this, s = Qe(e), r = ue(e);
1755
+ const { internal: t } = this, s = Ke(e), r = ue(e);
1772
1756
  if (t.instrumentation = gt(e, "telem").child("provider"), !(s !== this.prevCore || !e.wasSetPreviously(vt))) return;
1773
1757
  this.prevCore = s, this.client != null && r(async () => {
1774
1758
  if (this.client == null) throw new Error("no client to close");
1775
1759
  await this.client.close();
1776
- }, "failed to close client"), this.client = s == null ? new ko() : new Po({ core: s, instrumentation: t.instrumentation });
1760
+ }, "failed to close client"), this.client = s == null ? new Co() : new ko({ core: s, instrumentation: t.instrumentation });
1777
1761
  const a = ui(this.client), o = new hi(a);
1778
1762
  fi(e, o);
1779
1763
  }
1780
1764
  }
1781
- const Ro = {
1782
- [ct.TYPE]: ct
1783
- }, $h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1765
+ const Po = {
1766
+ [lt.TYPE]: lt
1767
+ }, Uh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1784
1768
  __proto__: null,
1785
1769
  AbstractSink: fn,
1786
1770
  AbstractSource: X,
1787
1771
  Base: dn,
1788
- BaseProvider: ct,
1772
+ BaseProvider: lt,
1789
1773
  BooleanStatus: $e,
1790
1774
  CONTEXT_KEY: vt,
1791
1775
  ChannelData: Nt,
1792
- ColorGradient: qe,
1776
+ ColorGradient: Fe,
1793
1777
  CompoundTelemFactory: ms,
1794
1778
  Context: hi,
1795
1779
  FixedColorSource: $t,
@@ -1797,21 +1781,21 @@ const Ro = {
1797
1781
  FixedString: Ut,
1798
1782
  IterativeSeries: Bt,
1799
1783
  Mean: Ue,
1800
- MultiSourceTransformer: qr,
1784
+ MultiSourceTransformer: Fr,
1801
1785
  NoopFactory: Ir,
1802
1786
  PipelineFactory: ds,
1803
- REGISTRY: Ro,
1787
+ REGISTRY: Po,
1804
1788
  RemoteFactory: Xr,
1805
- RollingAverage: Ft,
1789
+ RollingAverage: qt,
1806
1790
  ScaleNumber: je,
1807
- SeriesDownsampler: lt,
1791
+ SeriesDownsampler: ot,
1808
1792
  SetPoint: Be,
1809
1793
  SinkPipeline: Yt,
1810
- SourcePipeline: Lt,
1794
+ SourcePipeline: _t,
1811
1795
  StaticFactory: Gr,
1812
1796
  StreamChannelData: It,
1813
1797
  StreamChannelValue: At,
1814
- StringifyNumber: Fe,
1798
+ StringifyNumber: qe,
1815
1799
  TransformerFactory: ti,
1816
1800
  UnarySinkTransformer: jr,
1817
1801
  UnarySourceTransformer: Ce,
@@ -1832,7 +1816,7 @@ const Ro = {
1832
1816
  downsampleModeProps: Qa,
1833
1817
  downsampleModeZ: ps,
1834
1818
  fixedArray: Ba,
1835
- fixedColor: Fa,
1819
+ fixedColor: qa,
1836
1820
  fixedColorSourcePropsZ: ei,
1837
1821
  fixedNumber: Ua,
1838
1822
  fixedNumberPropsZ: Qr,
@@ -1845,7 +1829,7 @@ const Ro = {
1845
1829
  noopBooleanSinkSpec: ln,
1846
1830
  noopBooleanSourceSpec: as,
1847
1831
  noopColorSourceSpec: cn,
1848
- noopNumericSinkSpec: Lr,
1832
+ noopNumericSinkSpec: _r,
1849
1833
  noopNumericSourceSpec: Yr,
1850
1834
  noopSeriesSourceSpec: Nr,
1851
1835
  noopStatusSourceSpec: os,
@@ -1857,8 +1841,8 @@ const Ro = {
1857
1841
  rollingAverageProps: ai,
1858
1842
  scaleNumber: Ka,
1859
1843
  scaleNumberProps: li,
1860
- seriesDownsampler: so,
1861
- seriesSourceSpecZ: _t,
1844
+ seriesDownsampler: no,
1845
+ seriesSourceSpecZ: Lt,
1862
1846
  setContext: fi,
1863
1847
  setpoint: ja,
1864
1848
  sinkPipeline: Oa,
@@ -1874,7 +1858,7 @@ const Ro = {
1874
1858
  streamChannelData: Na,
1875
1859
  streamChannelValue: Ia,
1876
1860
  streamChannelValuePropsZ: Wr,
1877
- stringSourceSpecZ: Fr,
1861
+ stringSourceSpecZ: qr,
1878
1862
  stringifyNumber: Va,
1879
1863
  stringifyNumberProps: ii,
1880
1864
  useChildContext: pi,
@@ -1883,16 +1867,16 @@ const Ro = {
1883
1867
  useSource: ee,
1884
1868
  withinBounds: Ha,
1885
1869
  withinBoundsProps: ni
1886
- }, Symbol.toStringTag, { value: "Module" })), Mo = we.object({
1870
+ }, Symbol.toStringTag, { value: "Module" })), Ro = we.object({
1887
1871
  request: we.string(),
1888
1872
  bounds: we.record(we.string(), C.bounds)
1889
- }), Do = we.object({
1873
+ }), Mo = we.object({
1890
1874
  request: we.string(),
1891
- response: Mo
1875
+ response: Ro
1892
1876
  });
1893
- class In extends F {
1877
+ class In extends q {
1894
1878
  static TYPE = "Bounds";
1895
- schema = Do;
1879
+ schema = Mo;
1896
1880
  afterUpdate(e) {
1897
1881
  this.state.request !== this.prevState.request && this.setState((t) => ({
1898
1882
  ...t,
@@ -1913,10 +1897,10 @@ const Ti = h.object({
1913
1897
  loc: se.outer
1914
1898
  });
1915
1899
  h.record(h.string(), Ti);
1916
- const Le = (n, e) => Object.values(e).filter(({ loc: t }) => t === n).sort((t, s) => s.order - t.order), Oo = (n, e, t) => {
1900
+ const _e = (n, e) => Object.values(e).filter(({ loc: t }) => t === n).sort((t, s) => s.order - t.order), Do = (n, e, t) => {
1917
1901
  const s = e[n];
1918
1902
  if (s == null) return f.ZERO;
1919
- const r = se.construct(s.loc), i = Le(r, e), a = se.construct(re.swap(se.direction(r))), o = Le(a, e), c = i.findIndex(({ key: d }) => d === n), l = i.slice(0, c).reduce((d, { size: m }) => d + m, 0), u = o.reduce((d, { size: m }) => d + m, 0);
1903
+ const r = se.construct(s.loc), i = _e(r, e), a = se.construct(re.swap(se.direction(r))), o = _e(a, e), c = i.findIndex(({ key: d }) => d === n), l = i.slice(0, c).reduce((d, { size: m }) => d + m, 0), u = o.reduce((d, { size: m }) => d + m, 0);
1920
1904
  switch (r) {
1921
1905
  case "left":
1922
1906
  return f.translate(p.topLeft(t), [l, u]);
@@ -1930,8 +1914,8 @@ const Le = (n, e) => Object.values(e).filter(({ loc: t }) => t === n).sort((t, s
1930
1914
  -l - s.size
1931
1915
  ]);
1932
1916
  }
1933
- }, _o = (n, e) => {
1934
- const t = Le("left", n), s = Le("right", n), r = Le("top", n), i = Le("bottom", n), a = t.reduce((u, { size: d }) => u + d, 0), o = s.reduce((u, { size: d }) => u + d, 0), c = r.reduce((u, { size: d }) => u + d, 0), l = i.reduce((u, { size: d }) => u + d, 0);
1917
+ }, Oo = (n, e) => {
1918
+ const t = _e("left", n), s = _e("right", n), r = _e("top", n), i = _e("bottom", n), a = t.reduce((u, { size: d }) => u + d, 0), o = s.reduce((u, { size: d }) => u + d, 0), c = r.reduce((u, { size: d }) => u + d, 0), l = i.reduce((u, { size: d }) => u + d, 0);
1935
1919
  return p.construct(
1936
1920
  f.translate(p.topLeft(e), { x: a, y: c }),
1937
1921
  p.width(e) - a - o,
@@ -1946,7 +1930,7 @@ function Lo(n, e) {
1946
1930
  }
1947
1931
  function ys(n) {
1948
1932
  let e, t, s;
1949
- n.length !== 2 ? (e = Rt, t = (o, c) => Rt(n(o), c), s = (o, c) => n(o) - c) : (e = n === Rt || n === Lo ? n : Yo, t = n, s = n);
1933
+ n.length !== 2 ? (e = Rt, t = (o, c) => Rt(n(o), c), s = (o, c) => n(o) - c) : (e = n === Rt || n === Lo ? n : _o, t = n, s = n);
1950
1934
  function r(o, c, l = 0, u = o.length) {
1951
1935
  if (l < u) {
1952
1936
  if (e(c, c) !== 0) return u;
@@ -1973,24 +1957,24 @@ function ys(n) {
1973
1957
  }
1974
1958
  return { left: r, center: a, right: i };
1975
1959
  }
1976
- function Yo() {
1960
+ function _o() {
1977
1961
  return 0;
1978
1962
  }
1979
- function Ao(n) {
1963
+ function Yo(n) {
1980
1964
  return n === null ? NaN : +n;
1981
1965
  }
1982
- const No = ys(Rt), Io = No.right;
1983
- ys(Ao).center;
1984
- const Bo = Math.sqrt(50), Zo = Math.sqrt(10), Uo = Math.sqrt(2);
1985
- function qt(n, e, t) {
1986
- const s = (e - n) / Math.max(0, t), r = Math.floor(Math.log10(s)), i = s / Math.pow(10, r), a = i >= Bo ? 10 : i >= Zo ? 5 : i >= Uo ? 2 : 1;
1966
+ const Ao = ys(Rt), No = Ao.right;
1967
+ ys(Yo).center;
1968
+ const Io = Math.sqrt(50), Bo = Math.sqrt(10), Zo = Math.sqrt(2);
1969
+ function Ft(n, e, t) {
1970
+ const s = (e - n) / Math.max(0, t), r = Math.floor(Math.log10(s)), i = s / Math.pow(10, r), a = i >= Io ? 10 : i >= Bo ? 5 : i >= Zo ? 2 : 1;
1987
1971
  let o, c, l;
1988
- return r < 0 ? (l = Math.pow(10, -r) / a, o = Math.round(n * l), c = Math.round(e * l), o / l < n && ++o, c / l > e && --c, l = -l) : (l = Math.pow(10, r) * a, o = Math.round(n / l), c = Math.round(e / l), o * l < n && ++o, c * l > e && --c), c < o && 0.5 <= t && t < 2 ? qt(n, e, t * 2) : [o, c, l];
1972
+ return r < 0 ? (l = Math.pow(10, -r) / a, o = Math.round(n * l), c = Math.round(e * l), o / l < n && ++o, c / l > e && --c, l = -l) : (l = Math.pow(10, r) * a, o = Math.round(n / l), c = Math.round(e / l), o * l < n && ++o, c * l > e && --c), c < o && 0.5 <= t && t < 2 ? Ft(n, e, t * 2) : [o, c, l];
1989
1973
  }
1990
- function $o(n, e, t) {
1974
+ function Uo(n, e, t) {
1991
1975
  if (e = +e, n = +n, t = +t, !(t > 0)) return [];
1992
1976
  if (n === e) return [n];
1993
- const s = e < n, [r, i, a] = s ? qt(e, n, t) : qt(n, e, t);
1977
+ const s = e < n, [r, i, a] = s ? Ft(e, n, t) : Ft(n, e, t);
1994
1978
  if (!(i >= r)) return [];
1995
1979
  const o = i - r + 1, c = new Array(o);
1996
1980
  if (s)
@@ -2001,7 +1985,7 @@ function $o(n, e, t) {
2001
1985
  return c;
2002
1986
  }
2003
1987
  function Bn(n, e, t) {
2004
- return e = +e, n = +n, t = +t, qt(n, e, t)[2];
1988
+ return e = +e, n = +n, t = +t, Ft(n, e, t)[2];
2005
1989
  }
2006
1990
  function Zn(n, e, t) {
2007
1991
  e = +e, n = +n, t = +t;
@@ -2031,7 +2015,7 @@ function Ci(n, e) {
2031
2015
  }
2032
2016
  function wt() {
2033
2017
  }
2034
- var ut = 0.7, jt = 1 / ut, Ne = "\\s*([+-]?\\d+)\\s*", ht = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", ie = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Fo = /^#([0-9a-f]{3,8})$/, qo = new RegExp(`^rgb\\(${Ne},${Ne},${Ne}\\)$`), jo = new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`), Ho = new RegExp(`^rgba\\(${Ne},${Ne},${Ne},${ht}\\)$`), zo = new RegExp(`^rgba\\(${ie},${ie},${ie},${ht}\\)$`), Wo = new RegExp(`^hsl\\(${ht},${ie},${ie}\\)$`), Vo = new RegExp(`^hsla\\(${ht},${ie},${ie},${ht}\\)$`), _s = {
2018
+ var ct = 0.7, jt = 1 / ct, Ne = "\\s*([+-]?\\d+)\\s*", ut = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", ie = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", $o = /^#([0-9a-f]{3,8})$/, qo = new RegExp(`^rgb\\(${Ne},${Ne},${Ne}\\)$`), Fo = new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`), jo = new RegExp(`^rgba\\(${Ne},${Ne},${Ne},${ut}\\)$`), Ho = new RegExp(`^rgba\\(${ie},${ie},${ie},${ut}\\)$`), zo = new RegExp(`^hsl\\(${ut},${ie},${ie}\\)$`), Wo = new RegExp(`^hsla\\(${ut},${ie},${ie},${ut}\\)$`), Ls = {
2035
2019
  aliceblue: 15792383,
2036
2020
  antiquewhite: 16444375,
2037
2021
  aqua: 65535,
@@ -2181,36 +2165,36 @@ var ut = 0.7, jt = 1 / ut, Ne = "\\s*([+-]?\\d+)\\s*", ht = "\\s*([+-]?(?:\\d*\\
2181
2165
  yellow: 16776960,
2182
2166
  yellowgreen: 10145074
2183
2167
  };
2184
- vs(wt, dt, {
2168
+ vs(wt, ht, {
2185
2169
  copy(n) {
2186
2170
  return Object.assign(new this.constructor(), this, n);
2187
2171
  },
2188
2172
  displayable() {
2189
2173
  return this.rgb().displayable();
2190
2174
  },
2191
- hex: Ls,
2175
+ hex: _s,
2192
2176
  // Deprecated! Use color.formatHex.
2193
- formatHex: Ls,
2194
- formatHex8: Xo,
2195
- formatHsl: Go,
2177
+ formatHex: _s,
2178
+ formatHex8: Vo,
2179
+ formatHsl: Xo,
2196
2180
  formatRgb: Ys,
2197
2181
  toString: Ys
2198
2182
  });
2199
- function Ls() {
2183
+ function _s() {
2200
2184
  return this.rgb().formatHex();
2201
2185
  }
2202
- function Xo() {
2186
+ function Vo() {
2203
2187
  return this.rgb().formatHex8();
2204
2188
  }
2205
- function Go() {
2189
+ function Xo() {
2206
2190
  return ki(this).formatHsl();
2207
2191
  }
2208
2192
  function Ys() {
2209
2193
  return this.rgb().formatRgb();
2210
2194
  }
2211
- function dt(n) {
2195
+ function ht(n) {
2212
2196
  var e, t;
2213
- return n = (n + "").trim().toLowerCase(), (e = Fo.exec(n)) ? (t = e[1].length, e = parseInt(e[1], 16), t === 6 ? As(e) : t === 3 ? new H(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : t === 8 ? Et(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : t === 4 ? Et(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = qo.exec(n)) ? new H(e[1], e[2], e[3], 1) : (e = jo.exec(n)) ? new H(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = Ho.exec(n)) ? Et(e[1], e[2], e[3], e[4]) : (e = zo.exec(n)) ? Et(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Wo.exec(n)) ? Bs(e[1], e[2] / 100, e[3] / 100, 1) : (e = Vo.exec(n)) ? Bs(e[1], e[2] / 100, e[3] / 100, e[4]) : _s.hasOwnProperty(n) ? As(_s[n]) : n === "transparent" ? new H(NaN, NaN, NaN, 0) : null;
2197
+ return n = (n + "").trim().toLowerCase(), (e = $o.exec(n)) ? (t = e[1].length, e = parseInt(e[1], 16), t === 6 ? As(e) : t === 3 ? new H(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : t === 8 ? Et(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : t === 4 ? Et(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = qo.exec(n)) ? new H(e[1], e[2], e[3], 1) : (e = Fo.exec(n)) ? new H(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = jo.exec(n)) ? Et(e[1], e[2], e[3], e[4]) : (e = Ho.exec(n)) ? Et(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = zo.exec(n)) ? Bs(e[1], e[2] / 100, e[3] / 100, 1) : (e = Wo.exec(n)) ? Bs(e[1], e[2] / 100, e[3] / 100, e[4]) : Ls.hasOwnProperty(n) ? As(Ls[n]) : n === "transparent" ? new H(NaN, NaN, NaN, 0) : null;
2214
2198
  }
2215
2199
  function As(n) {
2216
2200
  return new H(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
@@ -2218,11 +2202,11 @@ function As(n) {
2218
2202
  function Et(n, e, t, s) {
2219
2203
  return s <= 0 && (n = e = t = NaN), new H(n, e, t, s);
2220
2204
  }
2221
- function Ko(n) {
2222
- return n instanceof wt || (n = dt(n)), n ? (n = n.rgb(), new H(n.r, n.g, n.b, n.opacity)) : new H();
2205
+ function Go(n) {
2206
+ return n instanceof wt || (n = ht(n)), n ? (n = n.rgb(), new H(n.r, n.g, n.b, n.opacity)) : new H();
2223
2207
  }
2224
2208
  function Un(n, e, t, s) {
2225
- return arguments.length === 1 ? Ko(n) : new H(n, e, t, s ?? 1);
2209
+ return arguments.length === 1 ? Go(n) : new H(n, e, t, s ?? 1);
2226
2210
  }
2227
2211
  function H(n, e, t, s) {
2228
2212
  this.r = +n, this.g = +e, this.b = +t, this.opacity = +s;
@@ -2232,7 +2216,7 @@ vs(H, Un, Ci(wt, {
2232
2216
  return n = n == null ? jt : Math.pow(jt, n), new H(this.r * n, this.g * n, this.b * n, this.opacity);
2233
2217
  },
2234
2218
  darker(n) {
2235
- return n = n == null ? ut : Math.pow(ut, n), new H(this.r * n, this.g * n, this.b * n, this.opacity);
2219
+ return n = n == null ? ct : Math.pow(ct, n), new H(this.r * n, this.g * n, this.b * n, this.opacity);
2236
2220
  },
2237
2221
  rgb() {
2238
2222
  return this;
@@ -2246,14 +2230,14 @@ vs(H, Un, Ci(wt, {
2246
2230
  hex: Ns,
2247
2231
  // Deprecated! Use color.formatHex.
2248
2232
  formatHex: Ns,
2249
- formatHex8: Qo,
2233
+ formatHex8: Ko,
2250
2234
  formatRgb: Is,
2251
2235
  toString: Is
2252
2236
  }));
2253
2237
  function Ns() {
2254
2238
  return `#${xe(this.r)}${xe(this.g)}${xe(this.b)}`;
2255
2239
  }
2256
- function Qo() {
2240
+ function Ko() {
2257
2241
  return `#${xe(this.r)}${xe(this.g)}${xe(this.b)}${xe((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2258
2242
  }
2259
2243
  function Is() {
@@ -2274,24 +2258,24 @@ function Bs(n, e, t, s) {
2274
2258
  }
2275
2259
  function ki(n) {
2276
2260
  if (n instanceof ne) return new ne(n.h, n.s, n.l, n.opacity);
2277
- if (n instanceof wt || (n = dt(n)), !n) return new ne();
2261
+ if (n instanceof wt || (n = ht(n)), !n) return new ne();
2278
2262
  if (n instanceof ne) return n;
2279
2263
  n = n.rgb();
2280
2264
  var e = n.r / 255, t = n.g / 255, s = n.b / 255, r = Math.min(e, t, s), i = Math.max(e, t, s), a = NaN, o = i - r, c = (i + r) / 2;
2281
2265
  return o ? (e === i ? a = (t - s) / o + (t < s) * 6 : t === i ? a = (s - e) / o + 2 : a = (e - t) / o + 4, o /= c < 0.5 ? i + r : 2 - i - r, a *= 60) : o = c > 0 && c < 1 ? 0 : a, new ne(a, o, c, n.opacity);
2282
2266
  }
2283
- function Jo(n, e, t, s) {
2267
+ function Qo(n, e, t, s) {
2284
2268
  return arguments.length === 1 ? ki(n) : new ne(n, e, t, s ?? 1);
2285
2269
  }
2286
2270
  function ne(n, e, t, s) {
2287
2271
  this.h = +n, this.s = +e, this.l = +t, this.opacity = +s;
2288
2272
  }
2289
- vs(ne, Jo, Ci(wt, {
2273
+ vs(ne, Qo, Ci(wt, {
2290
2274
  brighter(n) {
2291
2275
  return n = n == null ? jt : Math.pow(jt, n), new ne(this.h, this.s, this.l * n, this.opacity);
2292
2276
  },
2293
2277
  darker(n) {
2294
- return n = n == null ? ut : Math.pow(ut, n), new ne(this.h, this.s, this.l * n, this.opacity);
2278
+ return n = n == null ? ct : Math.pow(ct, n), new ne(this.h, this.s, this.l * n, this.opacity);
2295
2279
  },
2296
2280
  rgb() {
2297
2281
  var n = this.h % 360 + (this.h < 0) * 360, e = isNaN(n) || isNaN(this.s) ? 0 : this.s, t = this.l, s = t + (t < 0.5 ? t : 1 - t) * e, r = 2 * t - s;
@@ -2323,27 +2307,27 @@ function vn(n, e, t) {
2323
2307
  return (n < 60 ? e + (t - e) * n / 60 : n < 180 ? t : n < 240 ? e + (t - e) * (240 - n) / 60 : e) * 255;
2324
2308
  }
2325
2309
  const bs = (n) => () => n;
2326
- function el(n, e) {
2310
+ function Jo(n, e) {
2327
2311
  return function(t) {
2328
2312
  return n + t * e;
2329
2313
  };
2330
2314
  }
2331
- function tl(n, e, t) {
2315
+ function el(n, e, t) {
2332
2316
  return n = Math.pow(n, t), e = Math.pow(e, t) - n, t = 1 / t, function(s) {
2333
2317
  return Math.pow(n + s * e, t);
2334
2318
  };
2335
2319
  }
2336
- function nl(n) {
2320
+ function tl(n) {
2337
2321
  return (n = +n) == 1 ? Pi : function(e, t) {
2338
- return t - e ? tl(e, t, n) : bs(isNaN(e) ? t : e);
2322
+ return t - e ? el(e, t, n) : bs(isNaN(e) ? t : e);
2339
2323
  };
2340
2324
  }
2341
2325
  function Pi(n, e) {
2342
2326
  var t = e - n;
2343
- return t ? el(n, t) : bs(isNaN(n) ? e : n);
2327
+ return t ? Jo(n, t) : bs(isNaN(n) ? e : n);
2344
2328
  }
2345
2329
  const Us = function n(e) {
2346
- var t = nl(e);
2330
+ var t = tl(e);
2347
2331
  function s(r, i) {
2348
2332
  var a = t((r = Un(r)).r, (i = Un(i)).r), o = t(r.g, i.g), c = t(r.b, i.b), l = Pi(r.opacity, i.opacity);
2349
2333
  return function(u) {
@@ -2352,7 +2336,7 @@ const Us = function n(e) {
2352
2336
  }
2353
2337
  return s.gamma = n, s;
2354
2338
  }(1);
2355
- function sl(n, e) {
2339
+ function nl(n, e) {
2356
2340
  e || (e = []);
2357
2341
  var t = n ? Math.min(e.length, n.length) : 0, s = e.slice(), r;
2358
2342
  return function(i) {
@@ -2360,10 +2344,10 @@ function sl(n, e) {
2360
2344
  return s;
2361
2345
  };
2362
2346
  }
2363
- function rl(n) {
2347
+ function sl(n) {
2364
2348
  return ArrayBuffer.isView(n) && !(n instanceof DataView);
2365
2349
  }
2366
- function il(n, e) {
2350
+ function rl(n, e) {
2367
2351
  var t = e ? e.length : 0, s = n ? Math.min(t, n.length) : 0, r = new Array(s), i = new Array(t), a;
2368
2352
  for (a = 0; a < s; ++a) r[a] = ws(n[a], e[a]);
2369
2353
  for (; a < t; ++a) i[a] = e[a];
@@ -2372,7 +2356,7 @@ function il(n, e) {
2372
2356
  return i;
2373
2357
  };
2374
2358
  }
2375
- function al(n, e) {
2359
+ function il(n, e) {
2376
2360
  var t = /* @__PURE__ */ new Date();
2377
2361
  return n = +n, e = +e, function(s) {
2378
2362
  return t.setTime(n * (1 - s) + e * s), t;
@@ -2383,7 +2367,7 @@ function zt(n, e) {
2383
2367
  return n * (1 - t) + e * t;
2384
2368
  };
2385
2369
  }
2386
- function ol(n, e) {
2370
+ function al(n, e) {
2387
2371
  var t = {}, s = {}, r;
2388
2372
  (n === null || typeof n != "object") && (n = {}), (e === null || typeof e != "object") && (e = {});
2389
2373
  for (r in e)
@@ -2394,80 +2378,80 @@ function ol(n, e) {
2394
2378
  };
2395
2379
  }
2396
2380
  var $n = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, bn = new RegExp($n.source, "g");
2397
- function ll(n) {
2381
+ function ol(n) {
2398
2382
  return function() {
2399
2383
  return n;
2400
2384
  };
2401
2385
  }
2402
- function cl(n) {
2386
+ function ll(n) {
2403
2387
  return function(e) {
2404
2388
  return n(e) + "";
2405
2389
  };
2406
2390
  }
2407
- function ul(n, e) {
2391
+ function cl(n, e) {
2408
2392
  var t = $n.lastIndex = bn.lastIndex = 0, s, r, i, a = -1, o = [], c = [];
2409
2393
  for (n = n + "", e = e + ""; (s = $n.exec(n)) && (r = bn.exec(e)); )
2410
2394
  (i = r.index) > t && (i = e.slice(t, i), o[a] ? o[a] += i : o[++a] = i), (s = s[0]) === (r = r[0]) ? o[a] ? o[a] += r : o[++a] = r : (o[++a] = null, c.push({ i: a, x: zt(s, r) })), t = bn.lastIndex;
2411
- return t < e.length && (i = e.slice(t), o[a] ? o[a] += i : o[++a] = i), o.length < 2 ? c[0] ? cl(c[0].x) : ll(e) : (e = c.length, function(l) {
2395
+ return t < e.length && (i = e.slice(t), o[a] ? o[a] += i : o[++a] = i), o.length < 2 ? c[0] ? ll(c[0].x) : ol(e) : (e = c.length, function(l) {
2412
2396
  for (var u = 0, d; u < e; ++u) o[(d = c[u]).i] = d.x(l);
2413
2397
  return o.join("");
2414
2398
  });
2415
2399
  }
2416
2400
  function ws(n, e) {
2417
2401
  var t = typeof e, s;
2418
- return e == null || t === "boolean" ? bs(e) : (t === "number" ? zt : t === "string" ? (s = dt(e)) ? (e = s, Us) : ul : e instanceof dt ? Us : e instanceof Date ? al : rl(e) ? sl : Array.isArray(e) ? il : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? ol : zt)(n, e);
2402
+ return e == null || t === "boolean" ? bs(e) : (t === "number" ? zt : t === "string" ? (s = ht(e)) ? (e = s, Us) : cl : e instanceof ht ? Us : e instanceof Date ? il : sl(e) ? nl : Array.isArray(e) ? rl : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? al : zt)(n, e);
2419
2403
  }
2420
- function hl(n, e) {
2404
+ function ul(n, e) {
2421
2405
  return n = +n, e = +e, function(t) {
2422
2406
  return Math.round(n * (1 - t) + e * t);
2423
2407
  };
2424
2408
  }
2425
- function dl(n) {
2409
+ function hl(n) {
2426
2410
  return function() {
2427
2411
  return n;
2428
2412
  };
2429
2413
  }
2430
- function fl(n) {
2414
+ function dl(n) {
2431
2415
  return +n;
2432
2416
  }
2433
2417
  var $s = [0, 1];
2434
2418
  function Ye(n) {
2435
2419
  return n;
2436
2420
  }
2437
- function Fn(n, e) {
2421
+ function qn(n, e) {
2438
2422
  return (e -= n = +n) ? function(t) {
2439
2423
  return (t - n) / e;
2440
- } : dl(isNaN(e) ? NaN : 0.5);
2424
+ } : hl(isNaN(e) ? NaN : 0.5);
2441
2425
  }
2442
- function pl(n, e) {
2426
+ function fl(n, e) {
2443
2427
  var t;
2444
2428
  return n > e && (t = n, n = e, e = t), function(s) {
2445
2429
  return Math.max(n, Math.min(e, s));
2446
2430
  };
2447
2431
  }
2448
- function ml(n, e, t) {
2432
+ function pl(n, e, t) {
2449
2433
  var s = n[0], r = n[1], i = e[0], a = e[1];
2450
- return r < s ? (s = Fn(r, s), i = t(a, i)) : (s = Fn(s, r), i = t(i, a)), function(o) {
2434
+ return r < s ? (s = qn(r, s), i = t(a, i)) : (s = qn(s, r), i = t(i, a)), function(o) {
2451
2435
  return i(s(o));
2452
2436
  };
2453
2437
  }
2454
- function gl(n, e, t) {
2438
+ function ml(n, e, t) {
2455
2439
  var s = Math.min(n.length, e.length) - 1, r = new Array(s), i = new Array(s), a = -1;
2456
2440
  for (n[s] < n[0] && (n = n.slice().reverse(), e = e.slice().reverse()); ++a < s; )
2457
- r[a] = Fn(n[a], n[a + 1]), i[a] = t(e[a], e[a + 1]);
2441
+ r[a] = qn(n[a], n[a + 1]), i[a] = t(e[a], e[a + 1]);
2458
2442
  return function(o) {
2459
- var c = Io(n, o, 1, s) - 1;
2443
+ var c = No(n, o, 1, s) - 1;
2460
2444
  return i[c](r[c](o));
2461
2445
  };
2462
2446
  }
2463
2447
  function Ri(n, e) {
2464
2448
  return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
2465
2449
  }
2466
- function yl() {
2450
+ function gl() {
2467
2451
  var n = $s, e = $s, t = ws, s, r, i, a = Ye, o, c, l;
2468
2452
  function u() {
2469
2453
  var m = Math.min(n.length, e.length);
2470
- return a !== Ye && (a = pl(n[0], n[m - 1])), o = m > 2 ? gl : ml, c = l = null, d;
2454
+ return a !== Ye && (a = fl(n[0], n[m - 1])), o = m > 2 ? ml : pl, c = l = null, d;
2471
2455
  }
2472
2456
  function d(m) {
2473
2457
  return m == null || isNaN(m = +m) ? i : (c || (c = o(n.map(s), e, t)))(s(a(m)));
@@ -2475,11 +2459,11 @@ function yl() {
2475
2459
  return d.invert = function(m) {
2476
2460
  return a(r((l || (l = o(e, n.map(s), zt)))(m)));
2477
2461
  }, d.domain = function(m) {
2478
- return arguments.length ? (n = Array.from(m, fl), u()) : n.slice();
2462
+ return arguments.length ? (n = Array.from(m, dl), u()) : n.slice();
2479
2463
  }, d.range = function(m) {
2480
2464
  return arguments.length ? (e = Array.from(m), u()) : e.slice();
2481
2465
  }, d.rangeRound = function(m) {
2482
- return e = Array.from(m), t = hl, u();
2466
+ return e = Array.from(m), t = ul, u();
2483
2467
  }, d.clamp = function(m) {
2484
2468
  return arguments.length ? (a = m ? !0 : Ye, u()) : a !== Ye;
2485
2469
  }, d.interpolate = function(m) {
@@ -2491,9 +2475,9 @@ function yl() {
2491
2475
  };
2492
2476
  }
2493
2477
  function Mi() {
2494
- return yl()(Ye, Ye);
2478
+ return gl()(Ye, Ye);
2495
2479
  }
2496
- function vl(n) {
2480
+ function yl(n) {
2497
2481
  return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
2498
2482
  }
2499
2483
  function Wt(n, e) {
@@ -2507,23 +2491,23 @@ function Wt(n, e) {
2507
2491
  function He(n) {
2508
2492
  return n = Wt(Math.abs(n)), n ? n[1] : NaN;
2509
2493
  }
2510
- function bl(n, e) {
2494
+ function vl(n, e) {
2511
2495
  return function(t, s) {
2512
2496
  for (var r = t.length, i = [], a = 0, o = n[0], c = 0; r > 0 && o > 0 && (c + o + 1 > s && (o = Math.max(1, s - c)), i.push(t.substring(r -= o, r + o)), !((c += o + 1) > s)); )
2513
2497
  o = n[a = (a + 1) % n.length];
2514
2498
  return i.reverse().join(e);
2515
2499
  };
2516
2500
  }
2517
- function wl(n) {
2501
+ function bl(n) {
2518
2502
  return function(e) {
2519
2503
  return e.replace(/[0-9]/g, function(t) {
2520
2504
  return n[+t];
2521
2505
  });
2522
2506
  };
2523
2507
  }
2524
- var xl = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
2508
+ var wl = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
2525
2509
  function Vt(n) {
2526
- if (!(e = xl.exec(n))) throw new Error("invalid format: " + n);
2510
+ if (!(e = wl.exec(n))) throw new Error("invalid format: " + n);
2527
2511
  var e;
2528
2512
  return new xs({
2529
2513
  fill: e[1],
@@ -2545,7 +2529,7 @@ function xs(n) {
2545
2529
  xs.prototype.toString = function() {
2546
2530
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
2547
2531
  };
2548
- function Sl(n) {
2532
+ function xl(n) {
2549
2533
  e: for (var e = n.length, t = 1, s = -1, r; t < e; ++t)
2550
2534
  switch (n[t]) {
2551
2535
  case ".":
@@ -2562,30 +2546,30 @@ function Sl(n) {
2562
2546
  return s > 0 ? n.slice(0, s) + n.slice(r + 1) : n;
2563
2547
  }
2564
2548
  var Di;
2565
- function Tl(n, e) {
2549
+ function Sl(n, e) {
2566
2550
  var t = Wt(n, e);
2567
2551
  if (!t) return n + "";
2568
2552
  var s = t[0], r = t[1], i = r - (Di = Math.max(-8, Math.min(8, Math.floor(r / 3))) * 3) + 1, a = s.length;
2569
2553
  return i === a ? s : i > a ? s + new Array(i - a + 1).join("0") : i > 0 ? s.slice(0, i) + "." + s.slice(i) : "0." + new Array(1 - i).join("0") + Wt(n, Math.max(0, e + i - 1))[0];
2570
2554
  }
2571
- function Fs(n, e) {
2555
+ function qs(n, e) {
2572
2556
  var t = Wt(n, e);
2573
2557
  if (!t) return n + "";
2574
2558
  var s = t[0], r = t[1];
2575
2559
  return r < 0 ? "0." + new Array(-r).join("0") + s : s.length > r + 1 ? s.slice(0, r + 1) + "." + s.slice(r + 1) : s + new Array(r - s.length + 2).join("0");
2576
2560
  }
2577
- const qs = {
2561
+ const Fs = {
2578
2562
  "%": (n, e) => (n * 100).toFixed(e),
2579
2563
  b: (n) => Math.round(n).toString(2),
2580
2564
  c: (n) => n + "",
2581
- d: vl,
2565
+ d: yl,
2582
2566
  e: (n, e) => n.toExponential(e),
2583
2567
  f: (n, e) => n.toFixed(e),
2584
2568
  g: (n, e) => n.toPrecision(e),
2585
2569
  o: (n) => Math.round(n).toString(8),
2586
- p: (n, e) => Fs(n * 100, e),
2587
- r: Fs,
2588
- s: Tl,
2570
+ p: (n, e) => qs(n * 100, e),
2571
+ r: qs,
2572
+ s: Sl,
2589
2573
  X: (n) => Math.round(n).toString(16).toUpperCase(),
2590
2574
  x: (n) => Math.round(n).toString(16)
2591
2575
  };
@@ -2593,43 +2577,43 @@ function js(n) {
2593
2577
  return n;
2594
2578
  }
2595
2579
  var Hs = Array.prototype.map, zs = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
2596
- function El(n) {
2597
- var e = n.grouping === void 0 || n.thousands === void 0 ? js : bl(Hs.call(n.grouping, Number), n.thousands + ""), t = n.currency === void 0 ? "" : n.currency[0] + "", s = n.currency === void 0 ? "" : n.currency[1] + "", r = n.decimal === void 0 ? "." : n.decimal + "", i = n.numerals === void 0 ? js : wl(Hs.call(n.numerals, String)), a = n.percent === void 0 ? "%" : n.percent + "", o = n.minus === void 0 ? "−" : n.minus + "", c = n.nan === void 0 ? "NaN" : n.nan + "";
2580
+ function Tl(n) {
2581
+ var e = n.grouping === void 0 || n.thousands === void 0 ? js : vl(Hs.call(n.grouping, Number), n.thousands + ""), t = n.currency === void 0 ? "" : n.currency[0] + "", s = n.currency === void 0 ? "" : n.currency[1] + "", r = n.decimal === void 0 ? "." : n.decimal + "", i = n.numerals === void 0 ? js : bl(Hs.call(n.numerals, String)), a = n.percent === void 0 ? "%" : n.percent + "", o = n.minus === void 0 ? "−" : n.minus + "", c = n.nan === void 0 ? "NaN" : n.nan + "";
2598
2582
  function l(d) {
2599
2583
  d = Vt(d);
2600
- var m = d.fill, v = d.align, T = d.sign, w = d.symbol, x = d.zero, R = d.width, _ = d.comma, M = d.precision, Y = d.trim, I = d.type;
2601
- I === "n" ? (_ = !0, I = "g") : qs[I] || (M === void 0 && (M = 12), Y = !0, I = "g"), (x || m === "0" && v === "=") && (x = !0, m = "0", v = "=");
2602
- var E = w === "$" ? t : w === "#" && /[boxX]/.test(I) ? "0" + I.toLowerCase() : "", A = w === "$" ? s : /[%p]/.test(I) ? a : "", pe = qs[I], tt = /[defgprs%]/.test(I);
2584
+ var m = d.fill, v = d.align, T = d.sign, w = d.symbol, x = d.zero, R = d.width, L = d.comma, M = d.precision, Y = d.trim, I = d.type;
2585
+ I === "n" ? (L = !0, I = "g") : Fs[I] || (M === void 0 && (M = 12), Y = !0, I = "g"), (x || m === "0" && v === "=") && (x = !0, m = "0", v = "=");
2586
+ var E = w === "$" ? t : w === "#" && /[boxX]/.test(I) ? "0" + I.toLowerCase() : "", A = w === "$" ? s : /[%p]/.test(I) ? a : "", pe = Fs[I], et = /[defgprs%]/.test(I);
2603
2587
  M = M === void 0 ? 6 : /[gprs]/.test(I) ? Math.max(1, Math.min(21, M)) : Math.max(0, Math.min(20, M));
2604
2588
  function Re(P) {
2605
- var oe = E, q = A, me, Tt, Me;
2589
+ var oe = E, F = A, me, Tt, Me;
2606
2590
  if (I === "c")
2607
- q = pe(P) + q, P = "";
2591
+ F = pe(P) + F, P = "";
2608
2592
  else {
2609
2593
  P = +P;
2610
2594
  var De = P < 0 || 1 / P < 0;
2611
- if (P = isNaN(P) ? c : pe(Math.abs(P), M), Y && (P = Sl(P)), De && +P == 0 && T !== "+" && (De = !1), oe = (De ? T === "(" ? T : o : T === "-" || T === "(" ? "" : T) + oe, q = (I === "s" ? zs[8 + Di / 3] : "") + q + (De && T === "(" ? ")" : ""), tt) {
2595
+ if (P = isNaN(P) ? c : pe(Math.abs(P), M), Y && (P = xl(P)), De && +P == 0 && T !== "+" && (De = !1), oe = (De ? T === "(" ? T : o : T === "-" || T === "(" ? "" : T) + oe, F = (I === "s" ? zs[8 + Di / 3] : "") + F + (De && T === "(" ? ")" : ""), et) {
2612
2596
  for (me = -1, Tt = P.length; ++me < Tt; )
2613
2597
  if (Me = P.charCodeAt(me), 48 > Me || Me > 57) {
2614
- q = (Me === 46 ? r + P.slice(me + 1) : P.slice(me)) + q, P = P.slice(0, me);
2598
+ F = (Me === 46 ? r + P.slice(me + 1) : P.slice(me)) + F, P = P.slice(0, me);
2615
2599
  break;
2616
2600
  }
2617
2601
  }
2618
2602
  }
2619
- _ && !x && (P = e(P, 1 / 0));
2620
- var Oe = oe.length + P.length + q.length, te = Oe < R ? new Array(R - Oe + 1).join(m) : "";
2621
- switch (_ && x && (P = e(te + P, te.length ? R - q.length : 1 / 0), te = ""), v) {
2603
+ L && !x && (P = e(P, 1 / 0));
2604
+ var Oe = oe.length + P.length + F.length, te = Oe < R ? new Array(R - Oe + 1).join(m) : "";
2605
+ switch (L && x && (P = e(te + P, te.length ? R - F.length : 1 / 0), te = ""), v) {
2622
2606
  case "<":
2623
- P = oe + P + q + te;
2607
+ P = oe + P + F + te;
2624
2608
  break;
2625
2609
  case "=":
2626
- P = oe + te + P + q;
2610
+ P = oe + te + P + F;
2627
2611
  break;
2628
2612
  case "^":
2629
- P = te.slice(0, Oe = te.length >> 1) + oe + P + q + te.slice(Oe);
2613
+ P = te.slice(0, Oe = te.length >> 1) + oe + P + F + te.slice(Oe);
2630
2614
  break;
2631
2615
  default:
2632
- P = te + oe + P + q;
2616
+ P = te + oe + P + F;
2633
2617
  break;
2634
2618
  }
2635
2619
  return i(P);
@@ -2649,55 +2633,55 @@ function El(n) {
2649
2633
  formatPrefix: u
2650
2634
  };
2651
2635
  }
2652
- var kt, Oi, _i;
2653
- Cl({
2636
+ var kt, Oi, Li;
2637
+ El({
2654
2638
  thousands: ",",
2655
2639
  grouping: [3],
2656
2640
  currency: ["$", ""]
2657
2641
  });
2658
- function Cl(n) {
2659
- return kt = El(n), Oi = kt.format, _i = kt.formatPrefix, kt;
2642
+ function El(n) {
2643
+ return kt = Tl(n), Oi = kt.format, Li = kt.formatPrefix, kt;
2660
2644
  }
2661
- function kl(n) {
2645
+ function Cl(n) {
2662
2646
  return Math.max(0, -He(Math.abs(n)));
2663
2647
  }
2664
- function Pl(n, e) {
2648
+ function kl(n, e) {
2665
2649
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(He(e) / 3))) * 3 - He(Math.abs(n)));
2666
2650
  }
2667
- function Rl(n, e) {
2651
+ function Pl(n, e) {
2668
2652
  return n = Math.abs(n), e = Math.abs(e) - n, Math.max(0, He(e) - He(n)) + 1;
2669
2653
  }
2670
- function Ml(n, e, t, s) {
2654
+ function Rl(n, e, t, s) {
2671
2655
  var r = Zn(n, e, t), i;
2672
2656
  switch (s = Vt(s ?? ",f"), s.type) {
2673
2657
  case "s": {
2674
2658
  var a = Math.max(Math.abs(n), Math.abs(e));
2675
- return s.precision == null && !isNaN(i = Pl(r, a)) && (s.precision = i), _i(s, a);
2659
+ return s.precision == null && !isNaN(i = kl(r, a)) && (s.precision = i), Li(s, a);
2676
2660
  }
2677
2661
  case "":
2678
2662
  case "e":
2679
2663
  case "g":
2680
2664
  case "p":
2681
2665
  case "r": {
2682
- s.precision == null && !isNaN(i = Rl(r, Math.max(Math.abs(n), Math.abs(e)))) && (s.precision = i - (s.type === "e"));
2666
+ s.precision == null && !isNaN(i = Pl(r, Math.max(Math.abs(n), Math.abs(e)))) && (s.precision = i - (s.type === "e"));
2683
2667
  break;
2684
2668
  }
2685
2669
  case "f":
2686
2670
  case "%": {
2687
- s.precision == null && !isNaN(i = kl(r)) && (s.precision = i - (s.type === "%") * 2);
2671
+ s.precision == null && !isNaN(i = Cl(r)) && (s.precision = i - (s.type === "%") * 2);
2688
2672
  break;
2689
2673
  }
2690
2674
  }
2691
2675
  return Oi(s);
2692
2676
  }
2693
- function Dl(n) {
2677
+ function Ml(n) {
2694
2678
  var e = n.domain;
2695
2679
  return n.ticks = function(t) {
2696
2680
  var s = e();
2697
- return $o(s[0], s[s.length - 1], t ?? 10);
2681
+ return Uo(s[0], s[s.length - 1], t ?? 10);
2698
2682
  }, n.tickFormat = function(t, s) {
2699
2683
  var r = e();
2700
- return Ml(r[0], r[r.length - 1], t ?? 10, s);
2684
+ return Rl(r[0], r[r.length - 1], t ?? 10, s);
2701
2685
  }, n.nice = function(t) {
2702
2686
  t == null && (t = 10);
2703
2687
  var s = e(), r = 0, i = s.length - 1, a = s[r], o = s[i], c, l, u = 10;
@@ -2715,13 +2699,13 @@ function Dl(n) {
2715
2699
  return n;
2716
2700
  }, n;
2717
2701
  }
2718
- function Li() {
2702
+ function _i() {
2719
2703
  var n = Mi();
2720
2704
  return n.copy = function() {
2721
- return Ri(n, Li());
2722
- }, Ei.apply(n, arguments), Dl(n);
2705
+ return Ri(n, _i());
2706
+ }, Ei.apply(n, arguments), Ml(n);
2723
2707
  }
2724
- function Ol(n, e) {
2708
+ function Dl(n, e) {
2725
2709
  n = n.slice();
2726
2710
  var t = 0, s = n.length - 1, r = n[t], i = n[s], a;
2727
2711
  return i < r && (a = t, t = s, s = a, a = r, r = i, i = a), n[t] = e.floor(r), n[s] = e.ceil(i), n;
@@ -2776,12 +2760,12 @@ const Ts = B((n) => {
2776
2760
  n.setTime(+n + e * K);
2777
2761
  }, (n, e) => (e - n) / K, (n) => n.getMinutes());
2778
2762
  Ts.range;
2779
- const _l = B((n) => {
2763
+ const Ol = B((n) => {
2780
2764
  n.setUTCSeconds(0, 0);
2781
2765
  }, (n, e) => {
2782
2766
  n.setTime(+n + e * K);
2783
2767
  }, (n, e) => (e - n) / K, (n) => n.getUTCMinutes());
2784
- _l.range;
2768
+ Ol.range;
2785
2769
  const Es = B((n) => {
2786
2770
  n.setTime(n - n.getMilliseconds() - n.getSeconds() * le - n.getMinutes() * K);
2787
2771
  }, (n, e) => {
@@ -2807,12 +2791,12 @@ const Cs = B((n) => {
2807
2791
  n.setUTCDate(n.getUTCDate() + e);
2808
2792
  }, (n, e) => (e - n) / he, (n) => n.getUTCDate() - 1);
2809
2793
  Cs.range;
2810
- const Yl = B((n) => {
2794
+ const _l = B((n) => {
2811
2795
  n.setUTCHours(0, 0, 0, 0);
2812
2796
  }, (n, e) => {
2813
2797
  n.setUTCDate(n.getUTCDate() + e);
2814
2798
  }, (n, e) => (e - n) / he, (n) => Math.floor(n / he));
2815
- Yl.range;
2799
+ _l.range;
2816
2800
  function ke(n) {
2817
2801
  return B((e) => {
2818
2802
  e.setDate(e.getDate() - (e.getDay() + 7 - n) % 7), e.setHours(0, 0, 0, 0);
@@ -2820,14 +2804,14 @@ function ke(n) {
2820
2804
  e.setDate(e.getDate() + t * 7);
2821
2805
  }, (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * K) / Ss);
2822
2806
  }
2823
- const mn = ke(0), Gt = ke(1), Al = ke(2), Nl = ke(3), ze = ke(4), Il = ke(5), Bl = ke(6);
2807
+ const mn = ke(0), Gt = ke(1), Yl = ke(2), Al = ke(3), ze = ke(4), Nl = ke(5), Il = ke(6);
2824
2808
  mn.range;
2825
2809
  Gt.range;
2810
+ Yl.range;
2826
2811
  Al.range;
2827
- Nl.range;
2828
2812
  ze.range;
2813
+ Nl.range;
2829
2814
  Il.range;
2830
- Bl.range;
2831
2815
  function Pe(n) {
2832
2816
  return B((e) => {
2833
2817
  e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - n) % 7), e.setUTCHours(0, 0, 0, 0);
@@ -2835,14 +2819,14 @@ function Pe(n) {
2835
2819
  e.setUTCDate(e.getUTCDate() + t * 7);
2836
2820
  }, (e, t) => (t - e) / Ss);
2837
2821
  }
2838
- const Yi = Pe(0), Kt = Pe(1), Zl = Pe(2), Ul = Pe(3), We = Pe(4), $l = Pe(5), Fl = Pe(6);
2822
+ const Yi = Pe(0), Kt = Pe(1), Bl = Pe(2), Zl = Pe(3), We = Pe(4), Ul = Pe(5), $l = Pe(6);
2839
2823
  Yi.range;
2840
2824
  Kt.range;
2825
+ Bl.range;
2841
2826
  Zl.range;
2842
- Ul.range;
2843
2827
  We.range;
2828
+ Ul.range;
2844
2829
  $l.range;
2845
- Fl.range;
2846
2830
  const ks = B((n) => {
2847
2831
  n.setDate(1), n.setHours(0, 0, 0, 0);
2848
2832
  }, (n, e) => {
@@ -2877,7 +2861,7 @@ Te.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : B((e) => {
2877
2861
  e.setUTCFullYear(e.getUTCFullYear() + t * n);
2878
2862
  });
2879
2863
  Te.range;
2880
- function jl(n, e, t, s, r, i) {
2864
+ function Fl(n, e, t, s, r, i) {
2881
2865
  const a = [
2882
2866
  [Ae, 1, le],
2883
2867
  [Ae, 5, 5 * le],
@@ -2913,7 +2897,7 @@ function jl(n, e, t, s, r, i) {
2913
2897
  }
2914
2898
  return [o, c];
2915
2899
  }
2916
- const [Hl, zl] = jl(de, ks, mn, xt, Es, Ts);
2900
+ const [jl, Hl] = Fl(de, ks, mn, xt, Es, Ts);
2917
2901
  function Tn(n) {
2918
2902
  if (0 <= n.y && n.y < 100) {
2919
2903
  var e = new Date(-1, n.m, n.d, n.H, n.M, n.S, n.L);
@@ -2928,11 +2912,11 @@ function En(n) {
2928
2912
  }
2929
2913
  return new Date(Date.UTC(n.y, n.m, n.d, n.H, n.M, n.S, n.L));
2930
2914
  }
2931
- function nt(n, e, t) {
2915
+ function tt(n, e, t) {
2932
2916
  return { y: n, m: e, d: t, H: 0, M: 0, S: 0, L: 0 };
2933
2917
  }
2934
- function Wl(n) {
2935
- var e = n.dateTime, t = n.date, s = n.time, r = n.periods, i = n.days, a = n.shortDays, o = n.months, c = n.shortMonths, l = st(r), u = rt(r), d = st(i), m = rt(i), v = st(a), T = rt(a), w = st(o), x = rt(o), R = st(c), _ = rt(c), M = {
2918
+ function zl(n) {
2919
+ var e = n.dateTime, t = n.date, s = n.time, r = n.periods, i = n.days, a = n.shortDays, o = n.months, c = n.shortMonths, l = nt(r), u = st(r), d = nt(i), m = st(i), v = nt(a), T = st(a), w = nt(o), x = st(o), R = nt(c), L = st(c), M = {
2936
2920
  a: De,
2937
2921
  A: Oe,
2938
2922
  b: te,
@@ -2940,30 +2924,30 @@ function Wl(n) {
2940
2924
  c: null,
2941
2925
  d: Js,
2942
2926
  e: Js,
2943
- f: gc,
2944
- g: kc,
2945
- G: Rc,
2946
- H: fc,
2947
- I: pc,
2948
- j: mc,
2927
+ f: mc,
2928
+ g: Cc,
2929
+ G: Pc,
2930
+ H: dc,
2931
+ I: fc,
2932
+ j: pc,
2949
2933
  L: Ai,
2950
- m: yc,
2951
- M: vc,
2934
+ m: gc,
2935
+ M: yc,
2952
2936
  p: ea,
2953
2937
  q: ta,
2954
2938
  Q: nr,
2955
2939
  s: sr,
2956
- S: bc,
2957
- u: wc,
2958
- U: xc,
2959
- V: Sc,
2960
- w: Tc,
2961
- W: Ec,
2940
+ S: vc,
2941
+ u: bc,
2942
+ U: wc,
2943
+ V: xc,
2944
+ w: Sc,
2945
+ W: Tc,
2962
2946
  x: null,
2963
2947
  X: null,
2964
- y: Cc,
2965
- Y: Pc,
2966
- Z: Mc,
2948
+ y: Ec,
2949
+ Y: kc,
2950
+ Z: Rc,
2967
2951
  "%": tr
2968
2952
  }, Y = {
2969
2953
  a: na,
@@ -2975,87 +2959,87 @@ function Wl(n) {
2975
2959
  e: er,
2976
2960
  f: Lc,
2977
2961
  g: qc,
2978
- G: Hc,
2979
- H: Dc,
2980
- I: Oc,
2981
- j: _c,
2962
+ G: jc,
2963
+ H: Mc,
2964
+ I: Dc,
2965
+ j: Oc,
2982
2966
  L: Ii,
2983
- m: Yc,
2984
- M: Ac,
2967
+ m: _c,
2968
+ M: Yc,
2985
2969
  p: aa,
2986
2970
  q: oa,
2987
2971
  Q: nr,
2988
2972
  s: sr,
2989
- S: Nc,
2990
- u: Ic,
2991
- U: Bc,
2992
- V: Zc,
2993
- w: Uc,
2994
- W: $c,
2973
+ S: Ac,
2974
+ u: Nc,
2975
+ U: Ic,
2976
+ V: Bc,
2977
+ w: Zc,
2978
+ W: Uc,
2995
2979
  x: null,
2996
2980
  X: null,
2997
- y: Fc,
2998
- Y: jc,
2999
- Z: zc,
2981
+ y: $c,
2982
+ Y: Fc,
2983
+ Z: Hc,
3000
2984
  "%": tr
3001
2985
  }, I = {
3002
2986
  a: Re,
3003
2987
  A: P,
3004
2988
  b: oe,
3005
- B: q,
2989
+ B: F,
3006
2990
  c: me,
3007
2991
  d: Ks,
3008
2992
  e: Ks,
3009
- f: cc,
2993
+ f: lc,
3010
2994
  g: Gs,
3011
2995
  G: Xs,
3012
2996
  H: Qs,
3013
2997
  I: Qs,
3014
- j: ic,
3015
- L: lc,
3016
- m: rc,
3017
- M: ac,
3018
- p: tt,
3019
- q: sc,
3020
- Q: hc,
3021
- s: dc,
3022
- S: oc,
3023
- u: Ql,
3024
- U: Jl,
3025
- V: ec,
3026
- w: Kl,
3027
- W: tc,
2998
+ j: rc,
2999
+ L: oc,
3000
+ m: sc,
3001
+ M: ic,
3002
+ p: et,
3003
+ q: nc,
3004
+ Q: uc,
3005
+ s: hc,
3006
+ S: ac,
3007
+ u: Kl,
3008
+ U: Ql,
3009
+ V: Jl,
3010
+ w: Gl,
3011
+ W: ec,
3028
3012
  x: Tt,
3029
3013
  X: Me,
3030
3014
  y: Gs,
3031
3015
  Y: Xs,
3032
- Z: nc,
3033
- "%": uc
3016
+ Z: tc,
3017
+ "%": cc
3034
3018
  };
3035
3019
  M.x = E(t, M), M.X = E(s, M), M.c = E(e, M), Y.x = E(t, Y), Y.X = E(s, Y), Y.c = E(e, Y);
3036
3020
  function E(b, k) {
3037
3021
  return function(D) {
3038
- var g = [], j = -1, L = 0, z = b.length, W, be, Ps;
3022
+ var g = [], j = -1, _ = 0, z = b.length, W, be, Ps;
3039
3023
  for (D instanceof Date || (D = /* @__PURE__ */ new Date(+D)); ++j < z; )
3040
- b.charCodeAt(j) === 37 && (g.push(b.slice(L, j)), (be = Vs[W = b.charAt(++j)]) != null ? W = b.charAt(++j) : be = W === "e" ? " " : "0", (Ps = k[W]) && (W = Ps(D, be)), g.push(W), L = j + 1);
3041
- return g.push(b.slice(L, j)), g.join("");
3024
+ b.charCodeAt(j) === 37 && (g.push(b.slice(_, j)), (be = Vs[W = b.charAt(++j)]) != null ? W = b.charAt(++j) : be = W === "e" ? " " : "0", (Ps = k[W]) && (W = Ps(D, be)), g.push(W), _ = j + 1);
3025
+ return g.push(b.slice(_, j)), g.join("");
3042
3026
  };
3043
3027
  }
3044
3028
  function A(b, k) {
3045
3029
  return function(D) {
3046
- var g = nt(1900, void 0, 1), j = pe(g, b, D += "", 0), L, z;
3030
+ var g = tt(1900, void 0, 1), j = pe(g, b, D += "", 0), _, z;
3047
3031
  if (j != D.length) return null;
3048
3032
  if ("Q" in g) return new Date(g.Q);
3049
3033
  if ("s" in g) return new Date(g.s * 1e3 + ("L" in g ? g.L : 0));
3050
3034
  if (k && !("Z" in g) && (g.Z = 0), "p" in g && (g.H = g.H % 12 + g.p * 12), g.m === void 0 && (g.m = "q" in g ? g.q : 0), "V" in g) {
3051
3035
  if (g.V < 1 || g.V > 53) return null;
3052
- "w" in g || (g.w = 1), "Z" in g ? (L = En(nt(g.y, 0, 1)), z = L.getUTCDay(), L = z > 4 || z === 0 ? Kt.ceil(L) : Kt(L), L = Cs.offset(L, (g.V - 1) * 7), g.y = L.getUTCFullYear(), g.m = L.getUTCMonth(), g.d = L.getUTCDate() + (g.w + 6) % 7) : (L = Tn(nt(g.y, 0, 1)), z = L.getDay(), L = z > 4 || z === 0 ? Gt.ceil(L) : Gt(L), L = xt.offset(L, (g.V - 1) * 7), g.y = L.getFullYear(), g.m = L.getMonth(), g.d = L.getDate() + (g.w + 6) % 7);
3053
- } else ("W" in g || "U" in g) && ("w" in g || (g.w = "u" in g ? g.u % 7 : "W" in g ? 1 : 0), z = "Z" in g ? En(nt(g.y, 0, 1)).getUTCDay() : Tn(nt(g.y, 0, 1)).getDay(), g.m = 0, g.d = "W" in g ? (g.w + 6) % 7 + g.W * 7 - (z + 5) % 7 : g.w + g.U * 7 - (z + 6) % 7);
3036
+ "w" in g || (g.w = 1), "Z" in g ? (_ = En(tt(g.y, 0, 1)), z = _.getUTCDay(), _ = z > 4 || z === 0 ? Kt.ceil(_) : Kt(_), _ = Cs.offset(_, (g.V - 1) * 7), g.y = _.getUTCFullYear(), g.m = _.getUTCMonth(), g.d = _.getUTCDate() + (g.w + 6) % 7) : (_ = Tn(tt(g.y, 0, 1)), z = _.getDay(), _ = z > 4 || z === 0 ? Gt.ceil(_) : Gt(_), _ = xt.offset(_, (g.V - 1) * 7), g.y = _.getFullYear(), g.m = _.getMonth(), g.d = _.getDate() + (g.w + 6) % 7);
3037
+ } else ("W" in g || "U" in g) && ("w" in g || (g.w = "u" in g ? g.u % 7 : "W" in g ? 1 : 0), z = "Z" in g ? En(tt(g.y, 0, 1)).getUTCDay() : Tn(tt(g.y, 0, 1)).getDay(), g.m = 0, g.d = "W" in g ? (g.w + 6) % 7 + g.W * 7 - (z + 5) % 7 : g.w + g.U * 7 - (z + 6) % 7);
3054
3038
  return "Z" in g ? (g.H += g.Z / 100 | 0, g.M += g.Z % 100, En(g)) : Tn(g);
3055
3039
  };
3056
3040
  }
3057
3041
  function pe(b, k, D, g) {
3058
- for (var j = 0, L = k.length, z = D.length, W, be; j < L; ) {
3042
+ for (var j = 0, _ = k.length, z = D.length, W, be; j < _; ) {
3059
3043
  if (g >= z) return -1;
3060
3044
  if (W = k.charCodeAt(j++), W === 37) {
3061
3045
  if (W = k.charAt(j++), be = I[W in Vs ? k.charAt(j++) : W], !be || (g = be(b, D, g)) < 0) return -1;
@@ -3064,7 +3048,7 @@ function Wl(n) {
3064
3048
  }
3065
3049
  return g;
3066
3050
  }
3067
- function tt(b, k, D) {
3051
+ function et(b, k, D) {
3068
3052
  var g = l.exec(k.slice(D));
3069
3053
  return g ? (b.p = u.get(g[0].toLowerCase()), D + g[0].length) : -1;
3070
3054
  }
@@ -3078,9 +3062,9 @@ function Wl(n) {
3078
3062
  }
3079
3063
  function oe(b, k, D) {
3080
3064
  var g = R.exec(k.slice(D));
3081
- return g ? (b.m = _.get(g[0].toLowerCase()), D + g[0].length) : -1;
3065
+ return g ? (b.m = L.get(g[0].toLowerCase()), D + g[0].length) : -1;
3082
3066
  }
3083
- function q(b, k, D) {
3067
+ function F(b, k, D) {
3084
3068
  var g = w.exec(k.slice(D));
3085
3069
  return g ? (b.m = x.get(g[0].toLowerCase()), D + g[0].length) : -1;
3086
3070
  }
@@ -3156,37 +3140,37 @@ function Wl(n) {
3156
3140
  }
3157
3141
  };
3158
3142
  }
3159
- var Vs = { "-": "", _: " ", 0: "0" }, Z = /^\s*\d+/, Vl = /^%/, Xl = /[\\^$*+?|[\]().{}]/g;
3143
+ var Vs = { "-": "", _: " ", 0: "0" }, Z = /^\s*\d+/, Wl = /^%/, Vl = /[\\^$*+?|[\]().{}]/g;
3160
3144
  function O(n, e, t) {
3161
3145
  var s = n < 0 ? "-" : "", r = (s ? -n : n) + "", i = r.length;
3162
3146
  return s + (i < t ? new Array(t - i + 1).join(e) + r : r);
3163
3147
  }
3164
- function Gl(n) {
3165
- return n.replace(Xl, "\\$&");
3148
+ function Xl(n) {
3149
+ return n.replace(Vl, "\\$&");
3166
3150
  }
3167
- function st(n) {
3168
- return new RegExp("^(?:" + n.map(Gl).join("|") + ")", "i");
3151
+ function nt(n) {
3152
+ return new RegExp("^(?:" + n.map(Xl).join("|") + ")", "i");
3169
3153
  }
3170
- function rt(n) {
3154
+ function st(n) {
3171
3155
  return new Map(n.map((e, t) => [e.toLowerCase(), t]));
3172
3156
  }
3173
- function Kl(n, e, t) {
3157
+ function Gl(n, e, t) {
3174
3158
  var s = Z.exec(e.slice(t, t + 1));
3175
3159
  return s ? (n.w = +s[0], t + s[0].length) : -1;
3176
3160
  }
3177
- function Ql(n, e, t) {
3161
+ function Kl(n, e, t) {
3178
3162
  var s = Z.exec(e.slice(t, t + 1));
3179
3163
  return s ? (n.u = +s[0], t + s[0].length) : -1;
3180
3164
  }
3181
- function Jl(n, e, t) {
3165
+ function Ql(n, e, t) {
3182
3166
  var s = Z.exec(e.slice(t, t + 2));
3183
3167
  return s ? (n.U = +s[0], t + s[0].length) : -1;
3184
3168
  }
3185
- function ec(n, e, t) {
3169
+ function Jl(n, e, t) {
3186
3170
  var s = Z.exec(e.slice(t, t + 2));
3187
3171
  return s ? (n.V = +s[0], t + s[0].length) : -1;
3188
3172
  }
3189
- function tc(n, e, t) {
3173
+ function ec(n, e, t) {
3190
3174
  var s = Z.exec(e.slice(t, t + 2));
3191
3175
  return s ? (n.W = +s[0], t + s[0].length) : -1;
3192
3176
  }
@@ -3198,15 +3182,15 @@ function Gs(n, e, t) {
3198
3182
  var s = Z.exec(e.slice(t, t + 2));
3199
3183
  return s ? (n.y = +s[0] + (+s[0] > 68 ? 1900 : 2e3), t + s[0].length) : -1;
3200
3184
  }
3201
- function nc(n, e, t) {
3185
+ function tc(n, e, t) {
3202
3186
  var s = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t, t + 6));
3203
3187
  return s ? (n.Z = s[1] ? 0 : -(s[2] + (s[3] || "00")), t + s[0].length) : -1;
3204
3188
  }
3205
- function sc(n, e, t) {
3189
+ function nc(n, e, t) {
3206
3190
  var s = Z.exec(e.slice(t, t + 1));
3207
3191
  return s ? (n.q = s[0] * 3 - 3, t + s[0].length) : -1;
3208
3192
  }
3209
- function rc(n, e, t) {
3193
+ function sc(n, e, t) {
3210
3194
  var s = Z.exec(e.slice(t, t + 2));
3211
3195
  return s ? (n.m = s[0] - 1, t + s[0].length) : -1;
3212
3196
  }
@@ -3214,7 +3198,7 @@ function Ks(n, e, t) {
3214
3198
  var s = Z.exec(e.slice(t, t + 2));
3215
3199
  return s ? (n.d = +s[0], t + s[0].length) : -1;
3216
3200
  }
3217
- function ic(n, e, t) {
3201
+ function rc(n, e, t) {
3218
3202
  var s = Z.exec(e.slice(t, t + 3));
3219
3203
  return s ? (n.m = 0, n.d = +s[0], t + s[0].length) : -1;
3220
3204
  }
@@ -3222,108 +3206,108 @@ function Qs(n, e, t) {
3222
3206
  var s = Z.exec(e.slice(t, t + 2));
3223
3207
  return s ? (n.H = +s[0], t + s[0].length) : -1;
3224
3208
  }
3225
- function ac(n, e, t) {
3209
+ function ic(n, e, t) {
3226
3210
  var s = Z.exec(e.slice(t, t + 2));
3227
3211
  return s ? (n.M = +s[0], t + s[0].length) : -1;
3228
3212
  }
3229
- function oc(n, e, t) {
3213
+ function ac(n, e, t) {
3230
3214
  var s = Z.exec(e.slice(t, t + 2));
3231
3215
  return s ? (n.S = +s[0], t + s[0].length) : -1;
3232
3216
  }
3233
- function lc(n, e, t) {
3217
+ function oc(n, e, t) {
3234
3218
  var s = Z.exec(e.slice(t, t + 3));
3235
3219
  return s ? (n.L = +s[0], t + s[0].length) : -1;
3236
3220
  }
3237
- function cc(n, e, t) {
3221
+ function lc(n, e, t) {
3238
3222
  var s = Z.exec(e.slice(t, t + 6));
3239
3223
  return s ? (n.L = Math.floor(s[0] / 1e3), t + s[0].length) : -1;
3240
3224
  }
3241
- function uc(n, e, t) {
3242
- var s = Vl.exec(e.slice(t, t + 1));
3225
+ function cc(n, e, t) {
3226
+ var s = Wl.exec(e.slice(t, t + 1));
3243
3227
  return s ? t + s[0].length : -1;
3244
3228
  }
3245
- function hc(n, e, t) {
3229
+ function uc(n, e, t) {
3246
3230
  var s = Z.exec(e.slice(t));
3247
3231
  return s ? (n.Q = +s[0], t + s[0].length) : -1;
3248
3232
  }
3249
- function dc(n, e, t) {
3233
+ function hc(n, e, t) {
3250
3234
  var s = Z.exec(e.slice(t));
3251
3235
  return s ? (n.s = +s[0], t + s[0].length) : -1;
3252
3236
  }
3253
3237
  function Js(n, e) {
3254
3238
  return O(n.getDate(), e, 2);
3255
3239
  }
3256
- function fc(n, e) {
3240
+ function dc(n, e) {
3257
3241
  return O(n.getHours(), e, 2);
3258
3242
  }
3259
- function pc(n, e) {
3243
+ function fc(n, e) {
3260
3244
  return O(n.getHours() % 12 || 12, e, 2);
3261
3245
  }
3262
- function mc(n, e) {
3246
+ function pc(n, e) {
3263
3247
  return O(1 + xt.count(de(n), n), e, 3);
3264
3248
  }
3265
3249
  function Ai(n, e) {
3266
3250
  return O(n.getMilliseconds(), e, 3);
3267
3251
  }
3268
- function gc(n, e) {
3252
+ function mc(n, e) {
3269
3253
  return Ai(n, e) + "000";
3270
3254
  }
3271
- function yc(n, e) {
3255
+ function gc(n, e) {
3272
3256
  return O(n.getMonth() + 1, e, 2);
3273
3257
  }
3274
- function vc(n, e) {
3258
+ function yc(n, e) {
3275
3259
  return O(n.getMinutes(), e, 2);
3276
3260
  }
3277
- function bc(n, e) {
3261
+ function vc(n, e) {
3278
3262
  return O(n.getSeconds(), e, 2);
3279
3263
  }
3280
- function wc(n) {
3264
+ function bc(n) {
3281
3265
  var e = n.getDay();
3282
3266
  return e === 0 ? 7 : e;
3283
3267
  }
3284
- function xc(n, e) {
3268
+ function wc(n, e) {
3285
3269
  return O(mn.count(de(n) - 1, n), e, 2);
3286
3270
  }
3287
3271
  function Ni(n) {
3288
3272
  var e = n.getDay();
3289
3273
  return e >= 4 || e === 0 ? ze(n) : ze.ceil(n);
3290
3274
  }
3291
- function Sc(n, e) {
3275
+ function xc(n, e) {
3292
3276
  return n = Ni(n), O(ze.count(de(n), n) + (de(n).getDay() === 4), e, 2);
3293
3277
  }
3294
- function Tc(n) {
3278
+ function Sc(n) {
3295
3279
  return n.getDay();
3296
3280
  }
3297
- function Ec(n, e) {
3281
+ function Tc(n, e) {
3298
3282
  return O(Gt.count(de(n) - 1, n), e, 2);
3299
3283
  }
3300
- function Cc(n, e) {
3284
+ function Ec(n, e) {
3301
3285
  return O(n.getFullYear() % 100, e, 2);
3302
3286
  }
3303
- function kc(n, e) {
3287
+ function Cc(n, e) {
3304
3288
  return n = Ni(n), O(n.getFullYear() % 100, e, 2);
3305
3289
  }
3306
- function Pc(n, e) {
3290
+ function kc(n, e) {
3307
3291
  return O(n.getFullYear() % 1e4, e, 4);
3308
3292
  }
3309
- function Rc(n, e) {
3293
+ function Pc(n, e) {
3310
3294
  var t = n.getDay();
3311
3295
  return n = t >= 4 || t === 0 ? ze(n) : ze.ceil(n), O(n.getFullYear() % 1e4, e, 4);
3312
3296
  }
3313
- function Mc(n) {
3297
+ function Rc(n) {
3314
3298
  var e = n.getTimezoneOffset();
3315
3299
  return (e > 0 ? "-" : (e *= -1, "+")) + O(e / 60 | 0, "0", 2) + O(e % 60, "0", 2);
3316
3300
  }
3317
3301
  function er(n, e) {
3318
3302
  return O(n.getUTCDate(), e, 2);
3319
3303
  }
3320
- function Dc(n, e) {
3304
+ function Mc(n, e) {
3321
3305
  return O(n.getUTCHours(), e, 2);
3322
3306
  }
3323
- function Oc(n, e) {
3307
+ function Dc(n, e) {
3324
3308
  return O(n.getUTCHours() % 12 || 12, e, 2);
3325
3309
  }
3326
- function _c(n, e) {
3310
+ function Oc(n, e) {
3327
3311
  return O(1 + Cs.count(Te(n), n), e, 3);
3328
3312
  }
3329
3313
  function Ii(n, e) {
@@ -3332,49 +3316,49 @@ function Ii(n, e) {
3332
3316
  function Lc(n, e) {
3333
3317
  return Ii(n, e) + "000";
3334
3318
  }
3335
- function Yc(n, e) {
3319
+ function _c(n, e) {
3336
3320
  return O(n.getUTCMonth() + 1, e, 2);
3337
3321
  }
3338
- function Ac(n, e) {
3322
+ function Yc(n, e) {
3339
3323
  return O(n.getUTCMinutes(), e, 2);
3340
3324
  }
3341
- function Nc(n, e) {
3325
+ function Ac(n, e) {
3342
3326
  return O(n.getUTCSeconds(), e, 2);
3343
3327
  }
3344
- function Ic(n) {
3328
+ function Nc(n) {
3345
3329
  var e = n.getUTCDay();
3346
3330
  return e === 0 ? 7 : e;
3347
3331
  }
3348
- function Bc(n, e) {
3332
+ function Ic(n, e) {
3349
3333
  return O(Yi.count(Te(n) - 1, n), e, 2);
3350
3334
  }
3351
3335
  function Bi(n) {
3352
3336
  var e = n.getUTCDay();
3353
3337
  return e >= 4 || e === 0 ? We(n) : We.ceil(n);
3354
3338
  }
3355
- function Zc(n, e) {
3339
+ function Bc(n, e) {
3356
3340
  return n = Bi(n), O(We.count(Te(n), n) + (Te(n).getUTCDay() === 4), e, 2);
3357
3341
  }
3358
- function Uc(n) {
3342
+ function Zc(n) {
3359
3343
  return n.getUTCDay();
3360
3344
  }
3361
- function $c(n, e) {
3345
+ function Uc(n, e) {
3362
3346
  return O(Kt.count(Te(n) - 1, n), e, 2);
3363
3347
  }
3364
- function Fc(n, e) {
3348
+ function $c(n, e) {
3365
3349
  return O(n.getUTCFullYear() % 100, e, 2);
3366
3350
  }
3367
3351
  function qc(n, e) {
3368
3352
  return n = Bi(n), O(n.getUTCFullYear() % 100, e, 2);
3369
3353
  }
3370
- function jc(n, e) {
3354
+ function Fc(n, e) {
3371
3355
  return O(n.getUTCFullYear() % 1e4, e, 4);
3372
3356
  }
3373
- function Hc(n, e) {
3357
+ function jc(n, e) {
3374
3358
  var t = n.getUTCDay();
3375
3359
  return n = t >= 4 || t === 0 ? We(n) : We.ceil(n), O(n.getUTCFullYear() % 1e4, e, 4);
3376
3360
  }
3377
- function zc() {
3361
+ function Hc() {
3378
3362
  return "+0000";
3379
3363
  }
3380
3364
  function tr() {
@@ -3386,8 +3370,8 @@ function nr(n) {
3386
3370
  function sr(n) {
3387
3371
  return Math.floor(+n / 1e3);
3388
3372
  }
3389
- var _e, Zi;
3390
- Wc({
3373
+ var Le, Zi;
3374
+ zc({
3391
3375
  dateTime: "%x, %X",
3392
3376
  date: "%-m/%-d/%Y",
3393
3377
  time: "%-I:%M:%S %p",
@@ -3397,24 +3381,24 @@ Wc({
3397
3381
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
3398
3382
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
3399
3383
  });
3400
- function Wc(n) {
3401
- return _e = Wl(n), Zi = _e.format, _e.parse, _e.utcFormat, _e.utcParse, _e;
3384
+ function zc(n) {
3385
+ return Le = zl(n), Zi = Le.format, Le.parse, Le.utcFormat, Le.utcParse, Le;
3402
3386
  }
3403
- function Vc(n) {
3387
+ function Wc(n) {
3404
3388
  return new Date(n);
3405
3389
  }
3406
- function Xc(n) {
3390
+ function Vc(n) {
3407
3391
  return n instanceof Date ? +n : +/* @__PURE__ */ new Date(+n);
3408
3392
  }
3409
3393
  function Ui(n, e, t, s, r, i, a, o, c, l) {
3410
- var u = Mi(), d = u.invert, m = u.domain, v = l(".%L"), T = l(":%S"), w = l("%I:%M"), x = l("%I %p"), R = l("%a %d"), _ = l("%b %d"), M = l("%B"), Y = l("%Y");
3394
+ var u = Mi(), d = u.invert, m = u.domain, v = l(".%L"), T = l(":%S"), w = l("%I:%M"), x = l("%I %p"), R = l("%a %d"), L = l("%b %d"), M = l("%B"), Y = l("%Y");
3411
3395
  function I(E) {
3412
- return (c(E) < E ? v : o(E) < E ? T : a(E) < E ? w : i(E) < E ? x : s(E) < E ? r(E) < E ? R : _ : t(E) < E ? M : Y)(E);
3396
+ return (c(E) < E ? v : o(E) < E ? T : a(E) < E ? w : i(E) < E ? x : s(E) < E ? r(E) < E ? R : L : t(E) < E ? M : Y)(E);
3413
3397
  }
3414
3398
  return u.invert = function(E) {
3415
3399
  return new Date(d(E));
3416
3400
  }, u.domain = function(E) {
3417
- return arguments.length ? m(Array.from(E, Xc)) : m().map(Vc);
3401
+ return arguments.length ? m(Array.from(E, Vc)) : m().map(Wc);
3418
3402
  }, u.ticks = function(E) {
3419
3403
  var A = m();
3420
3404
  return n(A[0], A[A.length - 1], E ?? 10);
@@ -3422,13 +3406,13 @@ function Ui(n, e, t, s, r, i, a, o, c, l) {
3422
3406
  return A == null ? I : l(A);
3423
3407
  }, u.nice = function(E) {
3424
3408
  var A = m();
3425
- return (!E || typeof E.range != "function") && (E = e(A[0], A[A.length - 1], E ?? 10)), E ? m(Ol(A, E)) : u;
3409
+ return (!E || typeof E.range != "function") && (E = e(A[0], A[A.length - 1], E ?? 10)), E ? m(Dl(A, E)) : u;
3426
3410
  }, u.copy = function() {
3427
3411
  return Ri(u, Ui(n, e, t, s, r, i, a, o, c, l));
3428
3412
  }, u;
3429
3413
  }
3430
- function Gc() {
3431
- return Ei.apply(Ui(Hl, zl, de, ks, mn, xt, Es, Ts, Ae, Zi).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
3414
+ function Xc() {
3415
+ return Ei.apply(Ui(jl, Hl, de, ks, mn, xt, Es, Ts, Ae, Zi).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
3432
3416
  }
3433
3417
  const rr = [
3434
3418
  S.NANOSECOND,
@@ -3488,7 +3472,7 @@ const rr = [
3488
3472
  S.SECOND
3489
3473
  // 1s
3490
3474
  ];
3491
- class Kc {
3475
+ class Gc {
3492
3476
  _domain;
3493
3477
  _range;
3494
3478
  _span;
@@ -3557,14 +3541,14 @@ class Kc {
3557
3541
  return this._span.lessThan(S.microseconds(50)) ? `${e.remainder(S.MILLISECOND).microseconds.toString()}µs` : `${e.remainder(S.SECOND).milliseconds.toString()}ms`;
3558
3542
  }
3559
3543
  }
3560
- const Qc = () => new Kc(), $i = h.enum(["linear", "time"]), Fi = h.object({
3544
+ const Kc = () => new Gc(), $i = h.enum(["linear", "time"]), qi = h.object({
3561
3545
  tickSpacing: h.number().default(75),
3562
3546
  type: $i.optional().default("linear")
3563
3547
  }), ir = (n) => {
3564
- const e = Fi.parse(n);
3565
- return tu[e.type](e);
3548
+ const e = qi.parse(n);
3549
+ return eu[e.type](e);
3566
3550
  };
3567
- class Jc {
3551
+ class Qc {
3568
3552
  props;
3569
3553
  prevScaleSize;
3570
3554
  prevDomain;
@@ -3572,7 +3556,7 @@ class Jc {
3572
3556
  normalScale;
3573
3557
  preciseScale;
3574
3558
  constructor(e) {
3575
- this.props = e, this.normalScale = Gc(), this.preciseScale = Qc(), this.prevScaleSize = 0, this.prevDomain = new G(new N(0), new N(0)), this.currTicks = [];
3559
+ this.props = e, this.normalScale = Xc(), this.preciseScale = Kc(), this.prevScaleSize = 0, this.prevDomain = new G(new N(0), new N(0)), this.currTicks = [];
3576
3560
  }
3577
3561
  create({ decimalToDataScale: e, size: t }) {
3578
3562
  const s = new G(
@@ -3587,14 +3571,14 @@ class Jc {
3587
3571
  }
3588
3572
  if (s.span.milliseconds < 5) {
3589
3573
  this.preciseScale.domain([s.start, s.end]);
3590
- const r = qn(t, this.props.tickSpacing) / 2, i = this.preciseScale.ticks(r);
3574
+ const r = Fn(t, this.props.tickSpacing) / 2, i = this.preciseScale.ticks(r);
3591
3575
  this.currTicks = i.map((a) => ({
3592
3576
  label: this.preciseScale.formatTick(a),
3593
3577
  position: this.preciseScale.scale(a)
3594
3578
  }));
3595
3579
  } else {
3596
3580
  this.normalScale.domain([s.start.date(), s.end.date()]);
3597
- const r = this.normalScale.ticks(qn(t, this.props.tickSpacing));
3581
+ const r = this.normalScale.ticks(Fn(t, this.props.tickSpacing));
3598
3582
  this.currTicks = r.map((i) => ({
3599
3583
  label: this.normalTickLabel(i),
3600
3584
  position: this.normalScale(i)
@@ -3612,21 +3596,21 @@ class Jc {
3612
3596
  return e.getSeconds() === 0 && s === 0 && (t = `${e.getHours()}:${e.getMinutes().toString().padStart(2, "0")}`), t;
3613
3597
  }
3614
3598
  }
3615
- class eu {
3599
+ class Jc {
3616
3600
  props;
3617
3601
  prevDomain;
3618
3602
  prevScaleSize;
3619
3603
  currTicks;
3620
3604
  d3Scale;
3621
3605
  constructor(e) {
3622
- this.props = e, this.prevDomain = C.construct(0, 0), this.prevScaleSize = 0, this.currTicks = [], this.d3Scale = Li();
3606
+ this.props = e, this.prevDomain = C.construct(0, 0), this.prevScaleSize = 0, this.currTicks = [], this.d3Scale = _i();
3623
3607
  }
3624
3608
  create({ decimalToDataScale: e, size: t }) {
3625
3609
  const s = { lower: e.pos(0), upper: e.pos(1) };
3626
3610
  if (C.equals(this.prevDomain, s) && this.prevScaleSize === t)
3627
3611
  return this.currTicks;
3628
3612
  C.equals(this.prevDomain, s) || (this.d3Scale = this.d3Scale.domain([s.lower, s.upper])), this.prevScaleSize !== t && (this.d3Scale = this.d3Scale.range([0, t])), this.prevDomain = s, this.prevScaleSize = t;
3629
- const r = qn(t, this.props.tickSpacing), i = this.d3Scale.ticks(r);
3613
+ const r = Fn(t, this.props.tickSpacing), i = this.d3Scale.ticks(r);
3630
3614
  return this.currTicks = i.map((a) => ({
3631
3615
  label: this.tickLabel(a),
3632
3616
  position: this.d3Scale(a)
@@ -3636,26 +3620,26 @@ class eu {
3636
3620
  return e.toString();
3637
3621
  }
3638
3622
  }
3639
- const qn = (n, e) => {
3623
+ const Fn = (n, e) => {
3640
3624
  const t = Math.floor(n / e);
3641
3625
  return t > 0 ? t : 1;
3642
- }, tu = {
3643
- linear: (n) => new eu(n),
3644
- time: (n) => new Jc(n)
3645
- }, qi = Fi.extend({
3626
+ }, eu = {
3627
+ linear: (n) => new Jc(n),
3628
+ time: (n) => new Qc(n)
3629
+ }, Fi = qi.extend({
3646
3630
  color: y.colorZ,
3647
3631
  type: $i.optional().default("linear"),
3648
3632
  font: h.string(),
3649
3633
  showGrid: h.boolean().optional().default(!0),
3650
3634
  location: se.outer,
3651
3635
  gridColor: y.colorZ
3652
- }), J = 5, ft = 6, St = { useAtlas: !0 }, nu = {
3653
- bottom: (n, e) => new ru(n, e),
3654
- top: (n, e) => new iu(n, e),
3655
- left: (n, e) => new au(n, e),
3656
- right: (n, e) => new ou(n, e)
3657
- }, su = (n, e, t) => nu[n](e, t);
3658
- class Je {
3636
+ }), J = 5, dt = 6, St = { useAtlas: !0 }, tu = {
3637
+ bottom: (n, e) => new su(n, e),
3638
+ top: (n, e) => new ru(n, e),
3639
+ left: (n, e) => new iu(n, e),
3640
+ right: (n, e) => new au(n, e)
3641
+ }, nu = (n, e, t) => tu[n](e, t);
3642
+ class Qe {
3659
3643
  renderCtx;
3660
3644
  state;
3661
3645
  tickFactory;
@@ -3663,7 +3647,7 @@ class Je {
3663
3647
  this.renderCtx = e, this.state = t, this.tickFactory = ir(this.state);
3664
3648
  }
3665
3649
  setState(e) {
3666
- this.state = ya(qi, e), this.tickFactory = ir(e);
3650
+ this.state = ya(Fi, e), this.tickFactory = ir(e);
3667
3651
  }
3668
3652
  drawLine(e, t) {
3669
3653
  const { lower2d: s } = this.renderCtx;
@@ -3680,7 +3664,7 @@ class Je {
3680
3664
  maybeDrawGrid(e, t, s) {
3681
3665
  const { showGrid: r, gridColor: i } = this.state;
3682
3666
  if (r) {
3683
- const a = Je.START_BOUND, o = C.construct(e - 1, e + 1), { lower2d: c } = this.renderCtx;
3667
+ const a = Qe.START_BOUND, o = C.construct(e - 1, e + 1), { lower2d: c } = this.renderCtx;
3684
3668
  c.beginPath(), c.strokeStyle = y.hex(i), t.forEach((l) => {
3685
3669
  C.contains(a, l.position) || C.contains(o, l.position) || this.drawLine(...s(l));
3686
3670
  }), c.stroke();
@@ -3691,7 +3675,7 @@ class Je {
3691
3675
  this.renderCtx.lower2d.strokeStyle = t, this.renderCtx.lower2d.fillStyle = t, this.renderCtx.lower2d.font = this.state.font;
3692
3676
  }
3693
3677
  }
3694
- class ru extends Je {
3678
+ class su extends Qe {
3695
3679
  render(e) {
3696
3680
  const { lower2d: t } = this.renderCtx, { plot: s, position: r } = e, { width: i, height: a } = p.dims(s), o = this.tickFactory.create({ ...e, size: i });
3697
3681
  t.beginPath(), this.setColor(this.state.color), this.drawLine(r, f.translate(r, "x", i));
@@ -3702,7 +3686,7 @@ class ru extends Je {
3702
3686
  ), t.fillText(
3703
3687
  u.label,
3704
3688
  r.x + u.position - l.width / 2,
3705
- r.y + J + l.height + ft,
3689
+ r.y + J + l.height + dt,
3706
3690
  void 0,
3707
3691
  St
3708
3692
  );
@@ -3710,10 +3694,10 @@ class ru extends Je {
3710
3694
  return t.stroke(), this.maybeDrawGrid(i, o, (l) => [
3711
3695
  f.translate(r, "x", l.position),
3712
3696
  f.translate(r, { x: l.position, y: -a })
3713
- ]), { size: c.height + J + ft };
3697
+ ]), { size: c.height + J + dt };
3714
3698
  }
3715
3699
  }
3716
- class iu extends Je {
3700
+ class ru extends Qe {
3717
3701
  render(e) {
3718
3702
  const { lower2d: t } = this.renderCtx, { plot: s } = e, { width: r, height: i } = p.dims(s), a = f.translate(e.position, "y", e.size), o = this.tickFactory.create({ ...e, size: r });
3719
3703
  t.beginPath(), this.setColor(this.state.color), this.drawLine(a, f.translate(a, "x", r));
@@ -3724,7 +3708,7 @@ class iu extends Je {
3724
3708
  ), t.fillText(
3725
3709
  u.label,
3726
3710
  a.x + u.position - l.width / 2,
3727
- a.y - J - l.height - ft,
3711
+ a.y - J - l.height - dt,
3728
3712
  void 0,
3729
3713
  St
3730
3714
  );
@@ -3735,7 +3719,7 @@ class iu extends Je {
3735
3719
  ]), { size: c.height + J };
3736
3720
  }
3737
3721
  }
3738
- class au extends Je {
3722
+ class iu extends Qe {
3739
3723
  render(e) {
3740
3724
  const { lower2d: t } = this.renderCtx, { plot: s, position: r } = e, { height: i, width: a } = p.dims(s), o = f.translate(r, "x", e.size), c = this.tickFactory.create({ ...e, size: i });
3741
3725
  t.beginPath(), this.setColor(this.state.color), this.drawLine(o, f.translate(o, "y", i));
@@ -3757,7 +3741,7 @@ class au extends Je {
3757
3741
  ]), { size: l.width + J * 2 };
3758
3742
  }
3759
3743
  }
3760
- class ou extends Je {
3744
+ class au extends Qe {
3761
3745
  render(e) {
3762
3746
  const { lower2d: t } = this.renderCtx, { plot: s, position: r } = e, { height: i, width: a } = p.dims(s), o = this.tickFactory.create({ ...e, size: i });
3763
3747
  t.beginPath(), this.setColor(this.state.color), this.drawLine(r, f.translateY(r, i));
@@ -3767,7 +3751,7 @@ class ou extends Je {
3767
3751
  f.translate(r, { x: J, y: u.position })
3768
3752
  ), t.fillText(
3769
3753
  u.label,
3770
- r.x + J + ft,
3754
+ r.x + J + dt,
3771
3755
  r.y + u.position + l.height / 2,
3772
3756
  void 0,
3773
3757
  St
@@ -3776,10 +3760,10 @@ class ou extends Je {
3776
3760
  return t.stroke(), this.maybeDrawGrid(i, o, (l) => [
3777
3761
  f.translateY(r, l.position),
3778
3762
  f.translate(r, { x: -a, y: l.position })
3779
- ]), { size: c.width + J + ft };
3763
+ ]), { size: c.width + J + dt };
3780
3764
  }
3781
3765
  }
3782
- const gn = qi.extend({
3766
+ const gn = Fi.extend({
3783
3767
  axisKey: h.string().optional(),
3784
3768
  bounds: C.bounds.optional(),
3785
3769
  autoBounds: h.object({
@@ -3791,31 +3775,31 @@ const gn = qi.extend({
3791
3775
  size: h.number().optional().default(0),
3792
3776
  label: h.string().optional().default(""),
3793
3777
  labelSize: h.number().optional().default(0)
3794
- }).partial({ color: !0, font: !0, gridColor: !0 }), lu = 2, cu = 7, uu = (n, e) => C.contains(
3778
+ }).partial({ color: !0, font: !0, gridColor: !0 }), ou = 2, lu = 7, cu = (n, e) => C.contains(
3795
3779
  {
3796
- lower: n - cu,
3797
- upper: n + lu
3780
+ lower: n - lu,
3781
+ upper: n + ou
3798
3782
  },
3799
3783
  e
3800
- ), hu = C.DECIMAL, ar = N.now(), du = {
3784
+ ), uu = C.DECIMAL, ar = N.now(), hu = {
3801
3785
  lower: Number(ar.valueOf()),
3802
3786
  upper: Number(ar.add(S.HOUR).valueOf())
3803
- }, ji = (n) => n === "linear" ? hu : du, fu = (n, e = 0.1, t) => {
3787
+ }, ji = (n) => n === "linear" ? uu : hu, du = (n, e = 0.1, t) => {
3804
3788
  const s = C.max(n.filter(C.isFinite));
3805
3789
  if (!C.isFinite(s)) return ji(t);
3806
3790
  const { lower: r, upper: i } = s;
3807
3791
  if (i === r) return { lower: r - 1, upper: i + 1 };
3808
3792
  const a = (i - r) * e;
3809
3793
  return { lower: r - a, upper: i + a };
3810
- }, pu = 0.01, mu = 0.1;
3794
+ }, fu = 0.01, pu = 0.1;
3811
3795
  class Hi extends ae {
3812
3796
  afterUpdate(e) {
3813
3797
  const { internal: t } = this, { location: s, autoBoundUpdateInterval: r } = this.state;
3814
3798
  t.render = V.use(e);
3815
3799
  const i = fe(e), a = re.construct(s);
3816
- this.state.autoBoundPadding ??= a === "x" ? mu : pu, t.core = su(s, t.render, {
3800
+ this.state.autoBoundPadding ??= a === "x" ? pu : fu, t.core = nu(s, t.render, {
3817
3801
  color: i.colors.gray.l10,
3818
- font: at(i, { level: "small", code: !0 }),
3802
+ font: it(i, { level: "small", code: !0 }),
3819
3803
  gridColor: i.colors.gray.l1,
3820
3804
  ...this.state
3821
3805
  }), ge(e, "layout"), t.updateBounds ??= va(
@@ -3828,18 +3812,18 @@ class Hi extends ae {
3828
3812
  }
3829
3813
  renderAxis(e, t) {
3830
3814
  if (!e.canvases.includes("lower2d")) return;
3831
- const { core: s } = this.internal, { grid: r, container: i } = e, a = Oo(`${this.type}-${this.key}`, r, i), o = {
3815
+ const { core: s } = this.internal, { grid: r, container: i } = e, a = Do(`${this.type}-${this.key}`, r, i), o = {
3832
3816
  ...e,
3833
3817
  position: a,
3834
3818
  decimalToDataScale: t,
3835
3819
  size: this.state.size + this.state.labelSize
3836
3820
  }, { size: c } = s.render(o);
3837
- uu(this.state.size, c) || this.setState((l) => ({ ...l, size: c }));
3821
+ cu(this.state.size, c) || this.setState((l) => ({ ...l, size: c }));
3838
3822
  }
3839
3823
  iBounds(e, t) {
3840
3824
  if (e && this.internal.boundSnapshot != null)
3841
3825
  return [this.internal.boundSnapshot, null];
3842
- const { lower: s, upper: r } = gu(this.state.autoBounds);
3826
+ const { lower: s, upper: r } = mu(this.state.autoBounds);
3843
3827
  if (!s && !r && this.state.bounds != null)
3844
3828
  return this.internal.boundSnapshot = this.state.bounds, [this.state.bounds, null];
3845
3829
  const i = (l) => ({
@@ -3849,7 +3833,7 @@ class Hi extends ae {
3849
3833
  let a, o = null;
3850
3834
  try {
3851
3835
  const l = t();
3852
- a = fu(l, this.state.autoBoundPadding, this.state.type);
3836
+ a = du(l, this.state.autoBoundPadding, this.state.type);
3853
3837
  } catch (l) {
3854
3838
  a = ji(this.state.type), o = l;
3855
3839
  }
@@ -3864,7 +3848,7 @@ class Hi extends ae {
3864
3848
  ];
3865
3849
  }
3866
3850
  }
3867
- const gu = (n) => typeof n == "boolean" ? { lower: n, upper: n } : { lower: n?.lower ?? !0, upper: n?.upper ?? !0 }, or = `#version 300 es
3851
+ const mu = (n) => typeof n == "boolean" ? { lower: n, upper: n } : { lower: n?.lower ?? !0, upper: n?.upper ?? !0 }, or = `#version 300 es
3868
3852
  precision lowp float;
3869
3853
 
3870
3854
  uniform lowp vec4 u_color;
@@ -3873,7 +3857,7 @@ out vec4 fragColor;
3873
3857
  void main(void) {
3874
3858
  fragColor = u_color;
3875
3859
  }
3876
- `, yu = `#version 300 es
3860
+ `, gu = `#version 300 es
3877
3861
 
3878
3862
  // Copyright 2025 Synnax Labs, Inc.
3879
3863
  //
@@ -3894,7 +3878,7 @@ uniform mediump vec2 u_offset_aggregate;
3894
3878
  void main(void) {
3895
3879
  gl_Position = vec4((u_scale_aggregate * vec2(a_x, a_y) + u_offset_aggregate) + a_translate, 0.0, 1.0);
3896
3880
  }
3897
- `, vu = `#version 300 es
3881
+ `, yu = `#version 300 es
3898
3882
 
3899
3883
  // Copyright 2025 Synnax Labs, Inc.
3900
3884
  //
@@ -3915,18 +3899,18 @@ uniform mediump vec2 u_offset_aggregate;
3915
3899
  void main(void) {
3916
3900
  gl_Position = vec4((u_scale_aggregate * vec2(a_x, float(a_y)) + u_offset_aggregate) + a_translate, 0.0, 1.0);
3917
3901
  }
3918
- `, bu = h.object({
3919
- x: _t,
3920
- y: _t,
3902
+ `, vu = h.object({
3903
+ x: Lt,
3904
+ y: Lt,
3921
3905
  label: h.string().optional(),
3922
3906
  color: y.colorZ,
3923
3907
  strokeWidth: h.number().default(1),
3924
3908
  downsample: h.number().min(1).max(50).default(1),
3925
3909
  downsampleMode: ps.default("decimate"),
3926
3910
  visible: h.boolean().optional().default(!0)
3927
- }), wu = (n, e, t) => n === -1 || e === -1 || n >= t.series.length ? NaN : Number(t.series[n].at(e)), xu = S.milliseconds(2);
3911
+ }), bu = (n, e, t) => n === -1 || e === -1 || n >= t.series.length ? NaN : Number(t.series[n].at(e)), wu = S.milliseconds(2);
3928
3912
  f.NAN, f.NAN, y.ZERO, C.ZERO;
3929
- const Su = (n, e) => e.equals($.UINT8) ? n.UNSIGNED_BYTE : n.FLOAT;
3913
+ const xu = (n, e) => e.equals($.UINT8) ? n.UNSIGNED_BYTE : n.FLOAT;
3930
3914
  class lr extends ba {
3931
3915
  translationBufferCache = /* @__PURE__ */ new Map();
3932
3916
  constructor(e, t, s) {
@@ -3949,7 +3933,7 @@ class lr extends ba {
3949
3933
  bindAttrBuffer(e, t, s, r = 0, i) {
3950
3934
  const { gl: a } = this.renderCtx;
3951
3935
  a.bindBuffer(a.ARRAY_BUFFER, t);
3952
- const o = a.getAttribLocation(this.prog, `a_${e}`), c = Su(a, i), l = i.density.valueOf();
3936
+ const o = a.getAttribLocation(this.prog, `a_${e}`), c = xu(a, i), l = i.density.valueOf();
3953
3937
  i.equals($.UINT8) ? a.vertexAttribIPointer(
3954
3938
  o,
3955
3939
  1,
@@ -3973,7 +3957,7 @@ class lr extends ba {
3973
3957
  const i = t.createBuffer();
3974
3958
  if (i == null)
3975
3959
  throw new Ee("Failed to create buffer from WebGL context");
3976
- const a = Eu(this.renderCtx.aspect, e);
3960
+ const a = Tu(this.renderCtx.aspect, e);
3977
3961
  t.bindBuffer(t.ARRAY_BUFFER, i), t.bufferData(t.ARRAY_BUFFER, a, t.DYNAMIC_DRAW);
3978
3962
  const o = { glBuffer: i, jsBuffer: a };
3979
3963
  return this.translationBufferCache.set(s, o), o;
@@ -4001,7 +3985,7 @@ class Ie {
4001
3985
  // channel types.
4002
3986
  float32Program;
4003
3987
  constructor(e) {
4004
- this.uint8HybridProgram = new lr(e, vu, or), this.float32Program = new lr(e, yu, or);
3988
+ this.uint8HybridProgram = new lr(e, yu, or), this.float32Program = new lr(e, gu, or);
4005
3989
  }
4006
3990
  get gl() {
4007
3991
  return this.uint8HybridProgram.renderCtx.gl;
@@ -4019,17 +4003,17 @@ class Ie {
4019
4003
  return t;
4020
4004
  }
4021
4005
  }
4022
- class jn extends F {
4006
+ class jn extends q {
4023
4007
  static TYPE = "line";
4024
- schema = bu;
4008
+ schema = vu;
4025
4009
  afterUpdate(e) {
4026
4010
  const { internal: t } = this, s = {
4027
4011
  onStatusChange: Dr(e)
4028
4012
  };
4029
- t.xTelem = ee(e, this.state.x, t.xTelem, s), t.yTelem = ee(e, this.state.y, t.yTelem, s), t.instrumentation = gt(e, "line"), t.lineCtx = Ie.use(e), t.requestRender = is(e), t.stopListeningXTelem?.(), t.stopListeningYTelem?.(), t.stopListeningXTelem = t.xTelem.onChange(() => t.requestRender("data")), t.stopListeningYTelem = t.yTelem.onChange(() => t.requestRender("data")), t.requestRender("layout"), (t.xDownsampler?.props.mode !== this.state.downsampleMode || t.xDownsampler?.props.windowSize !== this.state.downsample) && (t.xDownsampler = new lt({
4013
+ t.xTelem = ee(e, this.state.x, t.xTelem, s), t.yTelem = ee(e, this.state.y, t.yTelem, s), t.instrumentation = gt(e, "line"), t.lineCtx = Ie.use(e), t.requestRender = is(e), t.stopListeningXTelem?.(), t.stopListeningYTelem?.(), t.stopListeningXTelem = t.xTelem.onChange(() => t.requestRender("data")), t.stopListeningYTelem = t.yTelem.onChange(() => t.requestRender("data")), t.requestRender("layout"), (t.xDownsampler?.props.mode !== this.state.downsampleMode || t.xDownsampler?.props.windowSize !== this.state.downsample) && (t.xDownsampler = new ot({
4030
4014
  mode: this.state.downsampleMode,
4031
4015
  windowSize: this.state.downsample
4032
- }), t.yDownsampler = new lt({
4016
+ }), t.yDownsampler = new ot({
4033
4017
  mode: this.state.downsampleMode,
4034
4018
  windowSize: this.state.downsample
4035
4019
  }));
@@ -4050,8 +4034,8 @@ class jn extends F {
4050
4034
  i = this.internal.xDownsampler.transform(i);
4051
4035
  let [a, o] = [-1, -1];
4052
4036
  i.series.find((x, R) => {
4053
- const _ = x.binarySearch(t), M = _ >= 0 && _ < x.length;
4054
- return M && ([a, o] = [_, R]), M;
4037
+ const L = x.binarySearch(t), M = L >= 0 && L < x.length;
4038
+ return M && ([a, o] = [L, R]), M;
4055
4039
  });
4056
4040
  const { key: c } = this, { color: l, label: u } = this.state, d = {
4057
4041
  key: c,
@@ -4063,7 +4047,7 @@ class jn extends F {
4063
4047
  };
4064
4048
  if (a === -1 || o === -1 || !this.state.visible) return d;
4065
4049
  const m = i.series[o];
4066
- d.value.x = wu(o, a, i);
4050
+ d.value.x = bu(o, a, i);
4067
4051
  let [, v] = r.value();
4068
4052
  v = this.internal.yDownsampler.transform(v);
4069
4053
  const T = v.series.find(
@@ -4081,31 +4065,31 @@ class jn extends F {
4081
4065
  const { downsample: t } = this.state, { xTelem: s, yTelem: r, lineCtx: i, xDownsampler: a, yDownsampler: o } = this.internal, { dataToDecimalScale: c, exposure: l } = e;
4082
4066
  let [[, u], [, d]] = [s.value(), r.value()];
4083
4067
  if (u = a.transform(u), d = o.transform(d), u.updateGLBuffer(i.gl), d.updateGLBuffer(i.gl), u.length === 0 || d.length === 0) return;
4084
- const m = i.getProgram(d.dataType), v = Mu(
4068
+ const m = i.getProgram(d.dataType), v = Ru(
4085
4069
  u,
4086
4070
  d,
4087
4071
  l,
4088
4072
  t,
4089
4073
  this.state.downsampleMode,
4090
- xu
4074
+ wu
4091
4075
  );
4092
4076
  this.internal.instrumentation.L.debug("render", () => ({
4093
4077
  key: this.key,
4094
4078
  downsample: t,
4095
4079
  scale: c.transform,
4096
4080
  props: e.region,
4097
- ops: Du(v)
4081
+ ops: Mu(v)
4098
4082
  }));
4099
4083
  const T = m.setAsActive(), w = m.bindState(this.state), x = m.renderCtx.scaleRegion(e.region).transform;
4100
4084
  v.forEach((R) => {
4101
- const _ = Ru(c, R).transform;
4102
- m.bindScale(_, x), m.draw(R, w, u.dataType, d.dataType);
4085
+ const L = Pu(c, R).transform;
4086
+ m.bindScale(L, x), m.draw(R, w, u.dataType, d.dataType);
4103
4087
  }), T();
4104
4088
  }
4105
4089
  }
4106
- const Tu = 5e3, Eu = (n, e) => Pu(ku(n), e).map(
4107
- (t, s) => Math.floor(s / Cu) * (1 / (Tu * n)) * t
4108
- ), Cu = 5, ku = (n) => (
4090
+ const Su = 5e3, Tu = (n, e) => ku(Cu(n), e).map(
4091
+ (t, s) => Math.floor(s / Eu) * (1 / (Su * n)) * t
4092
+ ), Eu = 5, Cu = (n) => (
4109
4093
  // prettier-ignore
4110
4094
  new Float32Array([
4111
4095
  0,
@@ -4124,19 +4108,19 @@ const Tu = 5e3, Eu = (n, e) => Pu(ku(n), e).map(
4124
4108
  0
4125
4109
  // left
4126
4110
  ])
4127
- ), Pu = (n, e) => {
4111
+ ), ku = (n, e) => {
4128
4112
  const t = new Float32Array(n.length * e);
4129
4113
  for (let s = 0; s < e; s++) t.set(n, s * n.length);
4130
4114
  return t;
4131
- }, Ru = (n, e) => n.translate(
4115
+ }, Pu = (n, e) => n.translate(
4132
4116
  n.x.dim(Number(e.x.sampleOffset)),
4133
4117
  n.y.dim(Number(e.y.sampleOffset))
4134
- ), Fh = { [jn.TYPE]: jn }, Mu = (n, e, t, s, r, i) => {
4118
+ ), $h = { [jn.TYPE]: jn }, Ru = (n, e, t, s, r, i) => {
4135
4119
  if (n.series.length === 0 || e.series.length === 0) return [];
4136
4120
  const a = [];
4137
4121
  return n.series.forEach(
4138
4122
  (o) => e.series.forEach((c) => {
4139
- if (!Ou(o, c, i)) return;
4123
+ if (!Du(o, c, i)) return;
4140
4124
  let l = 0, u = 0;
4141
4125
  o.alignment < c.alignment ? l = Number(c.alignment - o.alignment) : c.alignment < o.alignment && (u = Number(o.alignment - c.alignment));
4142
4126
  const d = Math.min(o.length - l, c.length - u);
@@ -4149,11 +4133,11 @@ const Tu = 5e3, Eu = (n, e) => Pu(ku(n), e).map(
4149
4133
  r !== "decimate" && (m = 1), a.push({ x: o, y: c, xOffset: l, yOffset: u, count: d, downsample: m });
4150
4134
  })
4151
4135
  ), a;
4152
- }, Du = (n) => n.map((e) => ({ ...e, x: e.x.digest, y: e.y.digest })), Ou = (n, e, t) => {
4136
+ }, Mu = (n) => n.map((e) => ({ ...e, x: e.x.digest, y: e.y.digest })), Du = (n, e, t) => {
4153
4137
  const s = n.timeRange.overlapsWith(e.timeRange, t), r = C.overlapsWith(n.alignmentBounds, e.alignmentBounds);
4154
4138
  return s && r;
4155
4139
  };
4156
- class et {
4140
+ class Je {
4157
4141
  canvas;
4158
4142
  theme;
4159
4143
  constructor(e, t) {
@@ -4240,7 +4224,7 @@ class et {
4240
4224
  spacing: s = 1,
4241
4225
  level: r = "p"
4242
4226
  }) {
4243
- const i = at(this.theme, { level: r }), a = e.map((l) => Ms(l, i, this.canvas)), o = this.theme.sizes.base * s, c = Math.max(...a.map((l) => l[re.dimension(t)])) + o;
4227
+ const i = it(this.theme, { level: r }), a = e.map((l) => Ms(l, i, this.canvas)), o = this.theme.sizes.base * s, c = Math.max(...a.map((l) => l[re.dimension(t)])) + o;
4244
4228
  return [
4245
4229
  {
4246
4230
  [re.dimension(re.swap(t))]: Math.max(
@@ -4249,7 +4233,7 @@ class et {
4249
4233
  [re.dimension(t)]: c * e.length - o
4250
4234
  },
4251
4235
  (l) => {
4252
- const u = at(this.theme, { level: r });
4236
+ const u = it(this.theme, { level: r });
4253
4237
  this.canvas.font = u, this.canvas.fillStyle = y.hex(this.theme.colors.text), this.canvas.textBaseline = "top", e.forEach((d, m) => {
4254
4238
  this.canvas.fillText(d, l.x, l.y + c * m);
4255
4239
  });
@@ -4300,7 +4284,7 @@ class et {
4300
4284
  align: l = "top",
4301
4285
  color: u
4302
4286
  }) {
4303
- this.canvas.font = at(this.theme, { level: s, weight: r, code: o }), u != null ? this.canvas.fillStyle = y.hex(this.resolveColor(u)) : i == null ? this.canvas.fillStyle = y.hex(this.theme.colors.text) : this.canvas.fillStyle = y.hex(this.theme.colors.gray[`l${i}`]), this.canvas.textAlign = c, this.canvas.textBaseline = l;
4287
+ this.canvas.font = it(this.theme, { level: s, weight: r, code: o }), u != null ? this.canvas.fillStyle = y.hex(this.resolveColor(u)) : i == null ? this.canvas.fillStyle = y.hex(this.theme.colors.text) : this.canvas.fillStyle = y.hex(this.theme.colors.gray[`l${i}`]), this.canvas.textAlign = c, this.canvas.textBaseline = l;
4304
4288
  let d;
4305
4289
  a != null && (d = this.canvas.scissor(p.construct(t, a, 1e3))), this.canvas.fillText(e, t.x, t.y), d?.();
4306
4290
  }
@@ -4312,15 +4296,15 @@ const zi = h.object({
4312
4296
  lineWidth: h.number().optional().default(1),
4313
4297
  lineDash: h.number().optional().default(20),
4314
4298
  color: y.colorZ
4315
- }), _u = 3;
4316
- class Qt extends F {
4299
+ }), Ou = 3;
4300
+ class Qt extends q {
4317
4301
  static TYPE = "Rule";
4318
4302
  schema = zi;
4319
4303
  lastUpdateRef = null;
4320
4304
  afterUpdate(e) {
4321
4305
  this.internal.renderCtx = V.use(e);
4322
4306
  const t = fe(e);
4323
- this.internal.draw = new et(this.internal.renderCtx.upper2d, t), ge(e, "tool");
4307
+ this.internal.draw = new Je(this.internal.renderCtx.upper2d, t), ge(e, "tool");
4324
4308
  }
4325
4309
  afterDelete(e) {
4326
4310
  ge(e, "tool");
@@ -4328,7 +4312,7 @@ class Qt extends F {
4328
4312
  updatePositions({ decimalToDataScale: e, plot: t }) {
4329
4313
  const s = this.state.dragging, r = this.prevState.dragging && !s;
4330
4314
  if ((s || r) && this.state.pixelPosition != null) {
4331
- if (this.lastUpdateRef ??= this.state.pixelPosition, Math.abs(this.state.pixelPosition - this.lastUpdateRef) < _u && !r)
4315
+ if (this.lastUpdateRef ??= this.state.pixelPosition, Math.abs(this.state.pixelPosition - this.lastUpdateRef) < Ou && !r)
4332
4316
  return this.state.pixelPosition;
4333
4317
  this.lastUpdateRef = this.state.pixelPosition;
4334
4318
  const o = e.pos(this.state.pixelPosition / p.height(t));
@@ -4372,9 +4356,9 @@ const Lu = {
4372
4356
  REGISTRY: Lu,
4373
4357
  Rule: Qt,
4374
4358
  ruleStateZ: zi
4375
- }, Symbol.toStringTag, { value: "Module" })), jh = gn.extend({
4359
+ }, Symbol.toStringTag, { value: "Module" })), Fh = gn.extend({
4376
4360
  location: se.x.optional().default("left")
4377
- }), cr = 2, Yu = (n) => p.signedWidth(n) < cr || p.signedHeight(n) < cr;
4361
+ }), cr = 2, _u = (n) => p.signedWidth(n) < cr || p.signedHeight(n) < cr;
4378
4362
  class Hn extends Hi {
4379
4363
  static TYPE = "YAxis";
4380
4364
  schema = gn;
@@ -4398,7 +4382,7 @@ class Hn extends Hi {
4398
4382
  if (this.renderAxis(e, r), this.renderLines(e, t), this.renderRules(e, r), s != null) throw s;
4399
4383
  }
4400
4384
  renderLines({ xDataToDecimalScale: e, plot: t, canvases: s, exposure: r }, i) {
4401
- if (!s.includes("gl") || Yu(t)) return;
4385
+ if (!s.includes("gl") || _u(t)) return;
4402
4386
  const a = {
4403
4387
  region: t,
4404
4388
  dataToDecimalScale: new Q.XY(e, i),
@@ -4445,17 +4429,17 @@ class Hn extends Hi {
4445
4429
  return this.childrenOfType(Qt.TYPE);
4446
4430
  }
4447
4431
  }
4448
- const Au = h.object({ start: N.z, end: N.z });
4449
- class ur extends F {
4432
+ const Yu = h.object({ start: N.z, end: N.z });
4433
+ class ur extends q {
4450
4434
  static TYPE = "range-annotation";
4451
- schema = Au;
4435
+ schema = Yu;
4452
4436
  afterUpdate(e) {
4453
- this.internal.render = V.use(e), this.internal.draw = new et(this.internal.render.upper2d, fe(e));
4437
+ this.internal.render = V.use(e), this.internal.draw = new Je(this.internal.render.upper2d, fe(e));
4454
4438
  }
4455
4439
  }
4456
- const Hh = "ranges", Nu = {
4457
- channel: ot.SET_CHANNEL_NAME,
4458
- schema: ot.payloadZ,
4440
+ const jh = "ranges", Au = {
4441
+ channel: at.SET_CHANNEL_NAME,
4442
+ schema: at.payloadZ,
4459
4443
  onChange: async ({ store: n, changed: e, client: t }) => {
4460
4444
  const s = t.ranges.sugarOne(e), r = n.ranges.get(e.key);
4461
4445
  let i;
@@ -4470,22 +4454,22 @@ const Hh = "ranges", Nu = {
4470
4454
  })
4471
4455
  );
4472
4456
  }
4473
- }, Iu = {
4474
- channel: ot.DELETE_CHANNEL_NAME,
4475
- schema: ot.keyZ,
4457
+ }, Nu = {
4458
+ channel: at.DELETE_CHANNEL_NAME,
4459
+ schema: at.keyZ,
4476
4460
  onChange: ({ store: n, changed: e }) => n.ranges.delete(e)
4477
- }, zh = {
4461
+ }, Hh = {
4478
4462
  equal: (n, e) => rn.equal(n.payload, e.payload),
4479
- listeners: [Nu, Iu]
4480
- }, Bu = h.object({
4463
+ listeners: [Au, Nu]
4464
+ }, Iu = h.object({
4481
4465
  region: p.box,
4482
4466
  clearOverScan: f.crudeZ.optional().default(0),
4483
4467
  visible: h.boolean().optional().default(!0)
4484
4468
  }), hr = ["upper2d", "lower2d"];
4485
- class pt extends ae {
4469
+ class ft extends ae {
4486
4470
  static TYPE = "Table";
4487
- static stateZ = Bu;
4488
- schema = pt.stateZ;
4471
+ static stateZ = Iu;
4472
+ schema = ft.stateZ;
4489
4473
  afterUpdate(e) {
4490
4474
  const { internal: t } = this;
4491
4475
  t.renderCtx = V.use(e), t.handleError = ue(e), rs(e, () => {
@@ -4517,27 +4501,27 @@ class pt extends ae {
4517
4501
  requestRender(e) {
4518
4502
  const { renderCtx: t } = this.internal;
4519
4503
  t.loop.set({
4520
- key: `${pt.TYPE}-${this.key}`,
4504
+ key: `${ft.TYPE}-${this.key}`,
4521
4505
  render: this.render.bind(this),
4522
4506
  priority: e,
4523
4507
  canvases: hr
4524
4508
  });
4525
4509
  }
4526
4510
  }
4527
- const Wh = {
4528
- [pt.TYPE]: pt
4529
- }, Zu = h.object({
4511
+ const zh = {
4512
+ [ft.TYPE]: ft
4513
+ }, Bu = h.object({
4530
4514
  authority: sn.authorityZ.optional(),
4531
4515
  valid: h.boolean().optional()
4532
- }).default({ authority: void 0, valid: !1 }), Uu = h.object({
4516
+ }).default({ authority: void 0, valid: !1 }), Zu = h.object({
4533
4517
  triggered: h.boolean(),
4534
- status: Xe.statusZ(Zu),
4518
+ status: Xe.statusZ(Bu),
4535
4519
  sink: hn.optional().default(ln),
4536
4520
  source: us.optional().default(os)
4537
4521
  });
4538
- class dr extends F {
4522
+ class dr extends q {
4539
4523
  static TYPE = "Chip";
4540
- schema = Uu;
4524
+ schema = Zu;
4541
4525
  afterUpdate(e) {
4542
4526
  const { internal: t } = this, { sink: s, source: r } = this.state;
4543
4527
  t.source = ee(e, r, t.source), t.sink = bt(e, s, t.sink), this.state.triggered && !this.prevState.triggered && t.sink.set(this.state.status.details?.authority !== sn.ABSOLUTE_AUTHORITY), this.updateEnabledState(), t.stopListening?.(), t.stopListening = t.source.onChange(() => this.updateEnabledState());
@@ -4552,12 +4536,12 @@ class dr extends F {
4552
4536
  render() {
4553
4537
  }
4554
4538
  }
4555
- const $u = h.object({}), fr = "control-state-provider", Fu = es.stateZ.extend({
4539
+ const Uu = h.object({}), fr = "control-state-provider", $u = es.stateZ.extend({
4556
4540
  subjectColor: y.colorZ
4557
4541
  });
4558
4542
  class Jt extends ae {
4559
4543
  static TYPE = "StateProvider";
4560
- schema = $u;
4544
+ schema = Uu;
4561
4545
  /** Tracks the colors we assign to a particular control subject. */
4562
4546
  colors = /* @__PURE__ */ new Map();
4563
4547
  /** Tracks the current control state for each channel and allows us to access it */
@@ -4580,7 +4564,7 @@ class Jt extends ae {
4580
4564
  t.instrumentation = gt(e, "control-state");
4581
4565
  const s = fe(e);
4582
4566
  t.palette = s.colors.visualization.palettes.default, t.defaultColor = s.colors.gray.l8;
4583
- const r = Qe(e);
4567
+ const r = Ke(e);
4584
4568
  if (t.client != null && r === t.client) return;
4585
4569
  t.client = r, e.set(fr, this), ue(e)(async () => {
4586
4570
  await this.maybeCloseTracker(), t.client != null && (this.internal.instrumentation.L.debug("starting state tracker"), await this.openTracker(t.client));
@@ -4634,22 +4618,22 @@ class Jt extends ae {
4634
4618
  });
4635
4619
  }
4636
4620
  }
4637
- const qu = ["acquired", "released", "overridden", "failed"], ju = h.enum(qu), Hu = h.object({
4621
+ const qu = ["acquired", "released", "overridden", "failed"], Fu = h.enum(qu), ju = h.object({
4638
4622
  name: h.string(),
4639
4623
  authority: h.number().default(0),
4640
4624
  acquireTrigger: h.number(),
4641
- status: ju.optional(),
4625
+ status: Fu.optional(),
4642
4626
  needsControlOf: Dt.keyZ.array().optional().default([])
4643
4627
  });
4644
4628
  class pr extends ae {
4645
4629
  static TYPE = "Controller";
4646
- schema = Hu;
4630
+ schema = ju;
4647
4631
  registry = /* @__PURE__ */ new Map();
4648
4632
  writer;
4649
4633
  afterUpdate(e) {
4650
4634
  const { internal: t } = this;
4651
4635
  t.instrumentation = gt(e), t.addStatus = Dr(e), t.runAsync = ue(e), (t.prevTrigger == null || Math.abs(this.state.acquireTrigger - t.prevTrigger) > 1) && (t.prevTrigger = this.state.acquireTrigger);
4652
- const s = Qe(e), r = Jt.use(e);
4636
+ const s = Ke(e), r = Jt.use(e);
4653
4637
  t.stateProv = r, t.telemCtx = pi(e, this, t.telemCtx), t.client = s, t.runAsync(async () => {
4654
4638
  t.client == null && await this.release(), this.state.acquireTrigger > t.prevTrigger ? await this.acquire() : this.state.acquireTrigger < t.prevTrigger && await this.release();
4655
4639
  }, "failed to acquire control");
@@ -4750,14 +4734,14 @@ class pr extends ae {
4750
4734
  return r != null && this.updateNeedsControlOf(), r;
4751
4735
  }
4752
4736
  }
4753
- const zu = h.object({
4737
+ const Hu = h.object({
4754
4738
  channel: h.number()
4755
4739
  });
4756
4740
  class zn extends fn {
4757
4741
  static TYPE = "controlled-numeric-telem-sink";
4758
4742
  controller;
4759
4743
  runAsync;
4760
- schema = zu;
4744
+ schema = Hu;
4761
4745
  constructor(e, t, s) {
4762
4746
  super(s), this.controller = e, this.runAsync = t;
4763
4747
  }
@@ -4776,7 +4760,7 @@ class zn extends fn {
4776
4760
  const { client: t } = this.controller.internal;
4777
4761
  if (t == null) throw new wa("No cluster connected");
4778
4762
  if (this.props.channel === 0)
4779
- throw new Ke("No command channel specified for actuator");
4763
+ throw new Ge("No command channel specified for actuator");
4780
4764
  const s = await t.channels.retrieve(this.props.channel), r = { [s.key]: e };
4781
4765
  if (s.index !== 0) {
4782
4766
  const i = await t.channels.retrieve(s.index), a = ts.now();
@@ -4789,12 +4773,12 @@ class zn extends fn {
4789
4773
  }, "Failed to command channel");
4790
4774
  }
4791
4775
  }
4792
- const Vh = (n) => ({
4776
+ const Wh = (n) => ({
4793
4777
  type: zn.TYPE,
4794
4778
  props: n,
4795
4779
  variant: "sink",
4796
4780
  valueType: "number"
4797
- }), Wu = h.object({
4781
+ }), zu = h.object({
4798
4782
  authority: h.number().default(es.ABSOLUTE_AUTHORITY),
4799
4783
  channel: h.number()
4800
4784
  });
@@ -4802,7 +4786,7 @@ class Wn extends fn {
4802
4786
  static TYPE = "acquire-channel-control";
4803
4787
  controller;
4804
4788
  runAsync;
4805
- schema = Wu;
4789
+ schema = zu;
4806
4790
  constructor(e, t, s) {
4807
4791
  super(s), this.controller = e, this.runAsync = t;
4808
4792
  }
@@ -4822,14 +4806,14 @@ class Wn extends fn {
4822
4806
  }, "failed to set channel authority");
4823
4807
  }
4824
4808
  }
4825
- const Xh = (n) => ({
4809
+ const Vh = (n) => ({
4826
4810
  type: Wn.TYPE,
4827
4811
  props: n,
4828
4812
  variant: "sink",
4829
4813
  valueType: "boolean"
4830
- }), Vu = h.object({
4814
+ }), Wu = h.object({
4831
4815
  channel: h.number()
4832
- }), Gh = h.object({
4816
+ }), Xh = h.object({
4833
4817
  valid: h.boolean(),
4834
4818
  color: y.colorZ.optional(),
4835
4819
  authority: h.number()
@@ -4840,7 +4824,7 @@ class Vn extends X {
4840
4824
  valid = !1;
4841
4825
  stopListening;
4842
4826
  controller;
4843
- schema = Vu;
4827
+ schema = Wu;
4844
4828
  constructor(e, t, s) {
4845
4829
  super(s), this.prov = t, this.controller = e;
4846
4830
  }
@@ -4886,20 +4870,20 @@ class Vn extends X {
4886
4870
  this.controller.deleteTelem(this), this.stopListening?.();
4887
4871
  }
4888
4872
  }
4889
- const Kh = (n) => ({
4873
+ const Gh = (n) => ({
4890
4874
  type: Vn.TYPE,
4891
4875
  props: n,
4892
4876
  variant: "source",
4893
4877
  valueType: "status"
4894
- }), Xu = h.object({ color: y.colorZ.optional() }).default({ color: void 0 }), Gu = h.object({
4878
+ }), Vu = h.object({ color: y.colorZ.optional() }).default({ color: void 0 }), Xu = h.object({
4895
4879
  statusSource: us.optional().default(os),
4896
4880
  colorSource: cs.optional().default(cn),
4897
- status: Xe.statusZ(Xu),
4881
+ status: Xe.statusZ(Vu),
4898
4882
  color: y.colorZ.optional()
4899
4883
  });
4900
- class mr extends F {
4884
+ class mr extends q {
4901
4885
  static TYPE = "Indicator";
4902
- schema = Gu;
4886
+ schema = Xu;
4903
4887
  stopListeningStatus;
4904
4888
  stopListeningColor;
4905
4889
  afterUpdate(e) {
@@ -4916,13 +4900,13 @@ class mr extends F {
4916
4900
  y.equals(e, this.state.color) && t.message === this.state.status.message || this.setState((s) => ({ ...s, color: e, status: t }));
4917
4901
  }
4918
4902
  }
4919
- const Ku = h.object({
4903
+ const Gu = h.object({
4920
4904
  needsControlOf: Dt.keyZ.array(),
4921
- states: Fu.array()
4905
+ states: $u.array()
4922
4906
  });
4923
- class gr extends F {
4907
+ class gr extends q {
4924
4908
  static TYPE = "Legend";
4925
- schema = Ku;
4909
+ schema = Gu;
4926
4910
  afterUpdate(e) {
4927
4911
  const { internal: t } = this;
4928
4912
  t.stateProv = Jt.use(e);
@@ -4942,33 +4926,33 @@ class gr extends F {
4942
4926
  render() {
4943
4927
  }
4944
4928
  }
4945
- const Qh = {
4929
+ const Kh = {
4946
4930
  [pr.TYPE]: pr,
4947
4931
  [Jt.TYPE]: Jt,
4948
4932
  [mr.TYPE]: mr,
4949
4933
  [dr.TYPE]: dr,
4950
4934
  [gr.TYPE]: gr
4951
- }, Qu = ["fire", "momentary", "pulse"], Ju = h.enum(Qu), eh = h.object({
4935
+ }, Ku = ["fire", "momentary", "pulse"], Qu = h.enum(Ku), Ju = h.object({
4952
4936
  trigger: h.number(),
4953
4937
  sink: hn.optional().default(ln),
4954
- mode: Ju.optional().default("fire")
4955
- }), th = 2, nh = 1;
4956
- class yr extends F {
4938
+ mode: Qu.optional().default("fire")
4939
+ }), eh = 2, th = 1;
4940
+ class yr extends q {
4957
4941
  static TYPE = "Button";
4958
- schema = eh;
4942
+ schema = Ju;
4959
4943
  afterUpdate(e) {
4960
4944
  const { sink: t, mode: s, trigger: r } = this.state, { internal: i } = this;
4961
4945
  i.prevTrigger ??= r, i.sink = bt(e, t, i.sink);
4962
4946
  const a = i.prevTrigger;
4963
4947
  i.prevTrigger = r;
4964
- const o = r === a + th;
4965
- r === a + nh ? s == "fire" ? this.internal.sink.set(!0) : s == "momentary" && this.internal.sink.set(!1) : o && (s == "momentary" ? this.internal.sink.set(!0) : s == "pulse" && this.internal.sink.set(!0, !1));
4948
+ const o = r === a + eh;
4949
+ r === a + th ? s == "fire" ? this.internal.sink.set(!0) : s == "momentary" && this.internal.sink.set(!1) : o && (s == "momentary" ? this.internal.sink.set(!0) : s == "pulse" && this.internal.sink.set(!0, !1));
4966
4950
  }
4967
4951
  afterDelete() {
4968
4952
  this.internal.sink.cleanup?.();
4969
4953
  }
4970
4954
  }
4971
- const Jh = { [yr.TYPE]: yr }, Wi = h.object({
4955
+ const Qh = { [yr.TYPE]: yr }, Wi = h.object({
4972
4956
  dpr: h.number(),
4973
4957
  region: p.box,
4974
4958
  bootstrap: h.boolean().optional().default(!1),
@@ -5010,12 +4994,12 @@ class Xn extends ae {
5010
4994
  this.renderCtx.resize(this.state.region, this.state.dpr);
5011
4995
  }
5012
4996
  }
5013
- const sh = {
4997
+ const nh = {
5014
4998
  [Xn.TYPE]: Xn
5015
- }, ed = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4999
+ }, Jh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5016
5000
  __proto__: null,
5017
5001
  Canvas: Xn,
5018
- REGISTRY: sh,
5002
+ REGISTRY: nh,
5019
5003
  canvasStateZ: Wi
5020
5004
  }, Symbol.toStringTag, { value: "Module" })), Vi = h.object({
5021
5005
  position: f.xy,
@@ -5068,20 +5052,20 @@ class Ve extends ae {
5068
5052
  });
5069
5053
  }
5070
5054
  }
5071
- const rh = {
5055
+ const sh = {
5072
5056
  [Ve.TYPE]: Ve
5073
- }, td = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5057
+ }, ed = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5074
5058
  __proto__: null,
5075
5059
  Diagram: Ve,
5076
- REGISTRY: rh,
5060
+ REGISTRY: sh,
5077
5061
  diagramStateZ: Vi
5078
- }, Symbol.toStringTag, { value: "Module" })), ih = h.object({
5062
+ }, Symbol.toStringTag, { value: "Module" })), rh = h.object({
5079
5063
  enabled: h.boolean(),
5080
5064
  source: ls.optional().default(as)
5081
5065
  });
5082
- class vr extends F {
5066
+ class vr extends q {
5083
5067
  static TYPE = "Light";
5084
- schema = ih;
5068
+ schema = rh;
5085
5069
  afterUpdate(e) {
5086
5070
  this.internal.addStatus = Or(e);
5087
5071
  const { source: t } = this.state, { internal: s } = this;
@@ -5095,7 +5079,7 @@ class vr extends F {
5095
5079
  this.internal.stopListening(), this.internal.source.cleanup?.();
5096
5080
  }
5097
5081
  }
5098
- const nd = { [vr.TYPE]: vr }, ah = f.construct(12), oh = 3, lh = 14, ch = f.construct(6), Xi = h.object({
5082
+ const td = { [vr.TYPE]: vr }, ih = f.construct(12), ah = 3, oh = 14, lh = f.construct(6), Xi = h.object({
5099
5083
  position: f.xy.or(h.null()),
5100
5084
  textColor: y.colorZ.optional().default(y.ZERO),
5101
5085
  backgroundColor: y.colorZ.optional().default(y.ZERO),
@@ -5104,12 +5088,12 @@ const nd = { [vr.TYPE]: vr }, ah = f.construct(12), oh = 3, lh = 14, ch = f.cons
5104
5088
  ruleStrokeWidth: h.number().optional().default(1),
5105
5089
  ruleStrokeDash: h.number().default(0)
5106
5090
  });
5107
- class en extends F {
5091
+ class en extends q {
5108
5092
  static TYPE = "tooltip";
5109
5093
  schema = Xi;
5110
5094
  afterUpdate(e) {
5111
5095
  const t = fe(e);
5112
- y.isZero(this.state.textColor) && (this.state.textColor = t.colors.text), y.isZero(this.state.backgroundColor) && (this.state.backgroundColor = t.colors.gray.l1), y.isZero(this.state.borderColor) && (this.state.borderColor = t.colors.border), y.isZero(this.state.ruleColor) && (this.state.ruleColor = t.colors.gray.l7), this.internal.dotColor = t.colors.text, this.internal.dotColorContrast = t.colors.textInverted, this.internal.render = V.use(e), this.internal.draw = new et(this.internal.render.upper2d, t), ge(e, "tool");
5096
+ y.isZero(this.state.textColor) && (this.state.textColor = t.colors.text), y.isZero(this.state.backgroundColor) && (this.state.backgroundColor = t.colors.gray.l1), y.isZero(this.state.borderColor) && (this.state.borderColor = t.colors.border), y.isZero(this.state.ruleColor) && (this.state.ruleColor = t.colors.gray.l7), this.internal.dotColor = t.colors.text, this.internal.dotColorContrast = t.colors.textInverted, this.internal.render = V.use(e), this.internal.draw = new Je(this.internal.render.upper2d, t), ge(e, "tool");
5113
5097
  }
5114
5098
  afterDelete(e) {
5115
5099
  ge(e, "tool");
@@ -5145,20 +5129,20 @@ class en extends F {
5145
5129
  const T = l.fString("preciseDate", "local").length;
5146
5130
  T > v && (v = T), o.list({
5147
5131
  root: m,
5148
- offset: ah,
5132
+ offset: ih,
5149
5133
  length: a.length + 1,
5150
- padding: ch,
5151
- itemHeight: lh,
5152
- spacing: oh,
5134
+ padding: lh,
5135
+ itemHeight: oh,
5136
+ spacing: ah,
5153
5137
  width: v * 7 + 48,
5154
5138
  position: this.state.position,
5155
5139
  draw: (w, x) => {
5156
- let R = "", _ = "", M = this.state.textColor;
5140
+ let R = "", L = "", M = this.state.textColor;
5157
5141
  if (w === 0)
5158
- R = "Time", _ = l.fString("preciseDate", "local");
5142
+ R = "Time", L = l.fString("preciseDate", "local");
5159
5143
  else {
5160
5144
  const Y = a[w - 1];
5161
- R = Y.label ?? "", _ = Cr.roundBySpan(Y.value.y, Y.bounds).toString(), M = Y.color;
5145
+ R = Y.label ?? "", L = Cr.roundBySpan(Y.value.y, Y.bounds).toString(), M = Y.color;
5162
5146
  }
5163
5147
  o.text({
5164
5148
  position: p.topLeft(x),
@@ -5168,7 +5152,7 @@ class en extends F {
5168
5152
  color: M
5169
5153
  }), o.text({
5170
5154
  position: f.translateY(p.topRight(x), -1),
5171
- text: _,
5155
+ text: L,
5172
5156
  level: "small",
5173
5157
  justify: "right",
5174
5158
  code: !0,
@@ -5178,34 +5162,34 @@ class en extends F {
5178
5162
  });
5179
5163
  }
5180
5164
  }
5181
- const uh = {
5165
+ const ch = {
5182
5166
  [en.TYPE]: en
5183
- }, sd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5167
+ }, nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5184
5168
  __proto__: null,
5185
- REGISTRY: uh,
5169
+ REGISTRY: ch,
5186
5170
  Tooltip: en,
5187
5171
  tooltipStateZ: Xi
5188
- }, Symbol.toStringTag, { value: "Module" })), hh = h.object({
5172
+ }, Symbol.toStringTag, { value: "Module" })), uh = h.object({
5189
5173
  region: p.box,
5190
5174
  wheelPos: h.number(),
5191
5175
  scrolling: h.boolean(),
5192
5176
  empty: h.boolean(),
5193
5177
  visible: h.boolean(),
5194
- telem: _t.optional().default(Nr),
5195
- font: _r.optional().default("p"),
5178
+ telem: Lt.optional().default(Nr),
5179
+ font: Lr.optional().default("p"),
5196
5180
  color: y.colorZ.optional().default(y.ZERO),
5197
5181
  overshoot: f.xy.optional().default({ x: 0, y: 0 })
5198
- }), dh = 0.98, it = "lower2d", fh = {
5182
+ }), hh = 0.98, rt = "lower2d", dh = {
5199
5183
  offset: 0n,
5200
5184
  offsetRef: 0n,
5201
5185
  scrollRef: 0
5202
5186
  };
5203
- class tn extends F {
5187
+ class tn extends q {
5204
5188
  static TYPE = "log";
5205
- static z = hh;
5189
+ static z = uh;
5206
5190
  schema = tn.z;
5207
5191
  values = new U([]);
5208
- scrollState = fh;
5192
+ scrollState = dh;
5209
5193
  afterUpdate(e) {
5210
5194
  const { internal: t } = this;
5211
5195
  t.render = V.use(e), t.theme = fe(e), y.isZero(this.state.color) ? this.internal.textColor = t.theme.colors.gray.l11 : t.textColor = this.state.color, t.telem = ee(e, this.state.telem, t.telem);
@@ -5236,7 +5220,7 @@ class tn extends F {
5236
5220
  }
5237
5221
  afterDelete() {
5238
5222
  const { telem: e, render: t } = this.internal;
5239
- e.cleanup?.(), t.erase(p.construct(this.state.region), f.ZERO, it);
5223
+ e.cleanup?.(), t.erase(p.construct(this.state.region), f.ZERO, rt);
5240
5224
  }
5241
5225
  requestRender() {
5242
5226
  const { render: e } = this.internal;
@@ -5244,7 +5228,7 @@ class tn extends F {
5244
5228
  key: `${this.type}-${this.key}`,
5245
5229
  render: () => this.render(),
5246
5230
  priority: "high",
5247
- canvases: [it]
5231
+ canvases: [rt]
5248
5232
  });
5249
5233
  }
5250
5234
  get lineHeight() {
@@ -5262,7 +5246,7 @@ class tn extends F {
5262
5246
  render() {
5263
5247
  const { render: e } = this.internal, t = this.state.region;
5264
5248
  if (p.areaIsZero(t)) return;
5265
- if (!this.state.visible) return () => e.erase(t, f.ZERO, it);
5249
+ if (!this.state.visible) return () => e.erase(t, f.ZERO, rt);
5266
5250
  let s;
5267
5251
  if (!this.state.scrolling)
5268
5252
  s = this.values.subIterator(
@@ -5276,14 +5260,14 @@ class tn extends F {
5276
5260
  );
5277
5261
  s = this.values.subAlignmentSpanIterator(l, this.visibleLineCount);
5278
5262
  }
5279
- const r = this.state.region, i = e[it], a = new et(i, this.internal.theme), o = e.scissor(r, f.ZERO, [it]);
5263
+ const r = this.state.region, i = e[rt], a = new Je(i, this.internal.theme), o = e.scissor(r, f.ZERO, [rt]);
5280
5264
  this.renderElements(a, s), this.renderScrollbar(a), o();
5281
5265
  const c = p.copy(this.state.region);
5282
5266
  return ({ canvases: l }) => e.erase(c, this.state.overshoot, ...l);
5283
5267
  }
5284
5268
  renderScrollbar(e) {
5285
5269
  const t = this.state.region, s = p.height(t) / this.totalHeight * p.height(t);
5286
- if (s >= p.height(t) * dh) return;
5270
+ if (s >= p.height(t) * hh) return;
5287
5271
  let r = p.bottom(t) - s;
5288
5272
  this.state.scrolling && (r -= Number(
5289
5273
  this.values.distance(
@@ -5314,7 +5298,7 @@ class tn extends F {
5314
5298
  }
5315
5299
  }
5316
5300
  }
5317
- const rd = { [tn.TYPE]: tn }, Gi = h.object({
5301
+ const sd = { [tn.TYPE]: tn }, Gi = h.object({
5318
5302
  one: f.xy.nullable(),
5319
5303
  two: f.xy.nullable(),
5320
5304
  hover: f.xy.nullable(),
@@ -5329,12 +5313,12 @@ const rd = { [tn.TYPE]: tn }, Gi = h.object({
5329
5313
  strokeWidth: h.number().optional().default(1),
5330
5314
  strokeDash: h.number().optional().default(2)
5331
5315
  });
5332
- class nn extends F {
5316
+ class nn extends q {
5333
5317
  static TYPE = "measure";
5334
5318
  schema = Gi;
5335
5319
  afterUpdate(e) {
5336
5320
  const t = V.use(e);
5337
- this.internal.theme = fe(e), this.internal.renderCtx = t, this.internal.draw = new et(t.upper2d, this.internal.theme), ge(e, "tool");
5321
+ this.internal.theme = fe(e), this.internal.renderCtx = t, this.internal.draw = new Je(t.upper2d, this.internal.theme), ge(e, "tool");
5338
5322
  }
5339
5323
  afterDelete(e) {
5340
5324
  ge(e, "layout");
@@ -5356,10 +5340,10 @@ class nn extends F {
5356
5340
  const [w, x] = [e.findByXValue(a.x), e.findByXValue(o.x)];
5357
5341
  return w.length === 0 || x.length === 0 ? null : [
5358
5342
  w.sort(
5359
- (R, _) => f.distance(a, R.value) - f.distance(a, _.value)
5343
+ (R, L) => f.distance(a, R.value) - f.distance(a, L.value)
5360
5344
  )[0],
5361
5345
  x.sort(
5362
- (R, _) => f.distance(o, R.value) - f.distance(o, _.value)
5346
+ (R, L) => f.distance(o, R.value) - f.distance(o, L.value)
5363
5347
  )[0]
5364
5348
  ];
5365
5349
  }
@@ -5449,23 +5433,23 @@ class nn extends F {
5449
5433
  }), i.circle({ fill: y.WHITE, radius: 2, position: u });
5450
5434
  }
5451
5435
  }
5452
- const ph = {
5436
+ const fh = {
5453
5437
  [nn.TYPE]: nn
5454
- }, id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5438
+ }, rd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5455
5439
  __proto__: null,
5456
5440
  Measure: nn,
5457
- REGISTRY: ph,
5441
+ REGISTRY: fh,
5458
5442
  measureStateZ: Gi
5459
- }, Symbol.toStringTag, { value: "Module" })), mh = h.object({
5443
+ }, Symbol.toStringTag, { value: "Module" })), ph = h.object({
5460
5444
  trigger: h.number(),
5461
5445
  command: h.number().optional(),
5462
5446
  value: h.number(),
5463
- sink: $r.optional().default(Lr),
5447
+ sink: $r.optional().default(_r),
5464
5448
  source: Ur.optional().default(Yr)
5465
5449
  });
5466
- class br extends F {
5450
+ class br extends q {
5467
5451
  static TYPE = "Setpoint";
5468
- schema = mh;
5452
+ schema = ph;
5469
5453
  afterUpdate(e) {
5470
5454
  const { sink: t, source: s, trigger: r, command: i } = this.state, { internal: a } = this;
5471
5455
  a.prevTrigger ??= r, (async () => {
@@ -5483,15 +5467,15 @@ class br extends F {
5483
5467
  e.stopListening(), e.source.cleanup?.(), e.sink.cleanup?.();
5484
5468
  }
5485
5469
  }
5486
- const ad = { [br.TYPE]: br }, gh = h.object({
5470
+ const id = { [br.TYPE]: br }, mh = h.object({
5487
5471
  triggered: h.boolean(),
5488
5472
  enabled: h.boolean(),
5489
5473
  sink: hn.optional().default(ln),
5490
5474
  source: ls.optional().default(as)
5491
5475
  });
5492
- class wr extends F {
5476
+ class wr extends q {
5493
5477
  static TYPE = "Toggle";
5494
- schema = gh;
5478
+ schema = mh;
5495
5479
  afterUpdate(e) {
5496
5480
  this.internal.addStatus = Or(e);
5497
5481
  const { sink: t, source: s, triggered: r, enabled: i } = this.state, { triggered: a } = this.prevState, { internal: o } = this;
@@ -5505,11 +5489,11 @@ class wr extends F {
5505
5489
  this.internal.stopListening(), this.internal.source.cleanup?.(), this.internal.sink.cleanup?.();
5506
5490
  }
5507
5491
  }
5508
- const od = { [wr.TYPE]: wr }, Cn = { useAtlas: !0 }, yh = h.object({
5492
+ const ad = { [wr.TYPE]: wr }, Cn = { useAtlas: !0 }, gh = h.object({
5509
5493
  box: p.box,
5510
- telem: Fr.optional().default(Ar),
5494
+ telem: qr.optional().default(Ar),
5511
5495
  backgroundTelem: cs.optional().default(cn),
5512
- level: _r.optional().default("p"),
5496
+ level: Lr.optional().default("p"),
5513
5497
  color: y.colorZ.optional().default(y.ZERO),
5514
5498
  precision: h.number().optional().default(2),
5515
5499
  minWidth: h.number().optional().default(60),
@@ -5519,14 +5503,14 @@ const od = { [wr.TYPE]: wr }, Cn = { useAtlas: !0 }, yh = h.object({
5519
5503
  useWidthForBackground: h.boolean().optional().default(!1),
5520
5504
  valueBackgroundShift: f.xy.optional().default(f.ZERO),
5521
5505
  valueBackgroundOverScan: f.xy.optional().default(f.ZERO)
5522
- }), vh = ["upper2d", "lower2d"];
5523
- class mt extends F {
5506
+ }), yh = ["upper2d", "lower2d"];
5507
+ class pt extends q {
5524
5508
  static TYPE = "value";
5525
- static z = yh;
5526
- schema = mt.z;
5509
+ static z = gh;
5510
+ schema = pt.z;
5527
5511
  afterUpdate(e) {
5528
5512
  const { internal: t } = this;
5529
- t.renderCtx = V.use(e), t.theme = fe(e), y.isZero(this.state.color) ? t.textColor = t.theme.colors.gray.l10 : t.textColor = this.state.color, t.telem = ee(e, this.state.telem, t.telem), t.stopListening?.(), t.stopListening = t.telem.onChange(() => this.requestRender()), t.fontString = at(t.theme, { level: this.state.level, code: !0 }), t.backgroundTelem = ee(
5513
+ t.renderCtx = V.use(e), t.theme = fe(e), y.isZero(this.state.color) ? t.textColor = t.theme.colors.gray.l10 : t.textColor = this.state.color, t.telem = ee(e, this.state.telem, t.telem), t.stopListening?.(), t.stopListening = t.telem.onChange(() => this.requestRender()), t.fontString = it(t.theme, { level: this.state.level, code: !0 }), t.backgroundTelem = ee(
5530
5514
  e,
5531
5515
  this.state.backgroundTelem,
5532
5516
  t.backgroundTelem
@@ -5534,7 +5518,7 @@ class mt extends F {
5534
5518
  }
5535
5519
  afterDelete() {
5536
5520
  const { internal: e } = this;
5537
- e.stopListening?.(), e.stopListeningBackground?.(), e.telem.cleanup?.(), e.backgroundTelem.cleanup?.(), e.requestRender == null ? e.renderCtx.erase(p.construct(this.state.box), f.ZERO, ...vh) : e.requestRender("layout");
5521
+ e.stopListening?.(), e.stopListeningBackground?.(), e.telem.cleanup?.(), e.backgroundTelem.cleanup?.(), e.requestRender == null ? e.renderCtx.erase(p.construct(this.state.box), f.ZERO, ...yh) : e.requestRender("layout");
5538
5522
  }
5539
5523
  requestRender() {
5540
5524
  const { requestRender: e } = this.internal;
@@ -5556,20 +5540,20 @@ class mt extends F {
5556
5540
  m.font = i;
5557
5541
  const T = this.fontHeight, w = v[0] == "-";
5558
5542
  w && (v = v.slice(1));
5559
- const { theme: x } = this.internal, R = m.textDimensions(v, Cn), _ = R.width + x.sizes.base, M = R.height;
5560
- a == null && t.erase(p.construct(this.prevState.box)), this.maybeUpdateWidth(_);
5543
+ const { theme: x } = this.internal, R = m.textDimensions(v, Cn), L = R.width + x.sizes.base, M = R.height;
5544
+ a == null && t.erase(p.construct(this.prevState.box)), this.maybeUpdateWidth(L);
5561
5545
  const Y = { ...f.ZERO };
5562
- o.x === "left" ? Y.x = 6 + T * 0.75 : o.x === "center" && (Y.x = u / 2 - _ / 2), o.y === "center" && (Y.y = d / 2 + M / 2);
5546
+ o.x === "left" ? Y.x = 6 + T * 0.75 : o.x === "center" && (Y.x = u / 2 - L / 2), o.y === "center" && (Y.y = d / 2 + M / 2);
5563
5547
  const I = f.translate(l, Y);
5564
5548
  let E = !0;
5565
5549
  if (this.state.backgroundTelem.type != cn.type) {
5566
5550
  const A = r.value();
5567
5551
  if (!y.isZero(A)) {
5568
5552
  E = !1, m.fillStyle = y.hex(A);
5569
- const tt = this.state.useWidthForBackground ? this.state.width ?? this.state.minWidth : p.width(c);
5553
+ const et = this.state.useWidthForBackground ? this.state.width ?? this.state.minWidth : p.width(c);
5570
5554
  m.fillRect(
5571
5555
  ...f.couple(f.translate(l, this.state.valueBackgroundShift)),
5572
- tt + this.state.valueBackgroundOverScan.x,
5556
+ et + this.state.valueBackgroundOverScan.x,
5573
5557
  d + this.state.valueBackgroundOverScan.y
5574
5558
  );
5575
5559
  const Re = y.pickByContrast(
@@ -5588,14 +5572,14 @@ class mt extends F {
5588
5572
  ), m.fillText(v, ...f.couple(I), void 0, Cn);
5589
5573
  }
5590
5574
  }
5591
- const bh = {
5592
- [mt.TYPE]: mt
5593
- }, ld = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5575
+ const vh = {
5576
+ [pt.TYPE]: pt
5577
+ }, od = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5594
5578
  __proto__: null,
5595
- REGISTRY: bh,
5596
- Value: mt
5579
+ REGISTRY: vh,
5580
+ Value: pt
5597
5581
  }, Symbol.toStringTag, { value: "Module" }));
5598
- class wh {
5582
+ class bh {
5599
5583
  entries = /* @__PURE__ */ new Map();
5600
5584
  setListeners = /* @__PURE__ */ new Map();
5601
5585
  deleteListeners = /* @__PURE__ */ new Map();
@@ -5680,20 +5664,20 @@ class wh {
5680
5664
  };
5681
5665
  }
5682
5666
  }
5683
- const xh = (n, e) => Object.fromEntries(
5667
+ const wh = (n, e) => Object.fromEntries(
5684
5668
  Object.entries(n).map(([t, { equal: s }]) => [
5685
5669
  t,
5686
- new wh(e, s)
5670
+ new bh(e, s)
5687
5671
  ])
5688
5672
  ), xr = (n, e) => Object.fromEntries(
5689
5673
  Object.entries(n).map(([t]) => [
5690
5674
  t,
5691
5675
  n[t].scope(e)
5692
5676
  ])
5693
- ), Sh = (n, e) => {
5677
+ ), xh = (n, e) => {
5694
5678
  const t = n.includes("delete"), s = e.includes("delete");
5695
5679
  return t && !s ? -1 : !t && s ? 1 : 0;
5696
- }, Th = async ({
5680
+ }, Sh = async ({
5697
5681
  openStreamer: n,
5698
5682
  storeConfig: e,
5699
5683
  handleError: t,
@@ -5711,16 +5695,16 @@ const xh = (n, e) => Object.fromEntries(
5711
5695
  );
5712
5696
  const c = await kn.HardenedStreamer.open(n, a), l = new kn.ObservableStreamer(c), u = (d) => {
5713
5697
  const m = [...d.uniqueNames];
5714
- m.sort(Sh), t(
5698
+ m.sort(xh), t(
5715
5699
  async () => {
5716
5700
  for (const v of m) {
5717
5701
  const T = d.get(v), w = o[v];
5718
5702
  if (w != null)
5719
5703
  for (const { onChange: x, schema: R } of w)
5720
5704
  await t(async () => {
5721
- let _;
5722
- T.dataType.equals($.JSON) ? _ = T.parseJSON(R) : _ = Array.from(T).map((M) => R.parse(M));
5723
- for (const M of _)
5705
+ let L;
5706
+ T.dataType.equals($.JSON) ? L = T.parseJSON(R) : L = Array.from(T).map((M) => R.parse(M));
5707
+ for (const M of L)
5724
5708
  await t(
5725
5709
  () => x({ changed: M, client: s, store: r }),
5726
5710
  `Failed to handle streamer change for ${v}`,
@@ -5734,7 +5718,7 @@ const xh = (n, e) => Object.fromEntries(
5734
5718
  };
5735
5719
  return l.onChange(u), l.close.bind(l);
5736
5720
  };
5737
- class Eh {
5721
+ class Th {
5738
5722
  store;
5739
5723
  streamCloser = null;
5740
5724
  client;
@@ -5745,7 +5729,7 @@ class Eh {
5745
5729
  handleError: r,
5746
5730
  handleAsyncError: i
5747
5731
  }) {
5748
- this.store = xh(s, r), this.client = e, e != null && (t ??= e?.openStreamer.bind(e), this.streamCloser = Th({
5732
+ this.store = wh(s, r), this.client = e, e != null && (t ??= e?.openStreamer.bind(e), this.streamCloser = Sh({
5749
5733
  client: e,
5750
5734
  storeConfig: s,
5751
5735
  handleError: i,
@@ -5764,11 +5748,11 @@ class Eh {
5764
5748
  await (await this.streamCloser)();
5765
5749
  }
5766
5750
  }
5767
- const Ch = we.object({}), Gn = "flux-context", Ki = "flux.Provider", kh = (n, e) => n.get(Gn).scopedStore(e), Ph = (n) => {
5751
+ const Eh = we.object({}), Gn = "flux-context", Ki = "flux.Provider", Ch = (n, e) => n.get(Gn).scopedStore(e), kh = (n) => {
5768
5752
  const e = (t, s) => {
5769
5753
  if ("client" in n) return n.client;
5770
- const r = Qe(t);
5771
- return s != null && s?.client?.key === r?.key ? s : new Eh({
5754
+ const r = Ke(t);
5755
+ return s != null && s?.client?.key === r?.key ? s : new Th({
5772
5756
  client: r,
5773
5757
  storeConfig: n.storeConfig,
5774
5758
  handleError: ue(t),
@@ -5777,31 +5761,31 @@ const Ch = we.object({}), Gn = "flux-context", Ki = "flux.Provider", kh = (n, e)
5777
5761
  };
5778
5762
  return class Qi extends ae {
5779
5763
  static TYPE = Ki;
5780
- static stateZ = Ch;
5764
+ static stateZ = Eh;
5781
5765
  schema = Qi.stateZ;
5782
5766
  afterUpdate(s) {
5783
5767
  const { internal: r } = this;
5784
5768
  r.store = e(s, r.store), s.wasSetPreviously(Gn) || s.set(Gn, r.store);
5785
5769
  }
5786
5770
  };
5787
- }, cd = (n) => ({ [Ki]: Ph(n) }), Rh = ot.payloadZ.extend({
5771
+ }, ld = (n) => ({ [Ki]: kh(n) }), Ph = at.payloadZ.extend({
5788
5772
  viewport: C.bounds
5789
- }), Mh = h.object({
5773
+ }), Rh = h.object({
5790
5774
  cursor: f.xy.or(h.null()),
5791
- hovered: Rh.or(h.null()),
5775
+ hovered: Ph.or(h.null()),
5792
5776
  count: h.number()
5793
5777
  });
5794
- class Kn extends F {
5778
+ class Kn extends q {
5795
5779
  static TYPE = "range-provider";
5796
- schema = Mh;
5780
+ schema = Rh;
5797
5781
  fetchedInitial = G.ZERO;
5798
5782
  afterUpdate(e) {
5799
5783
  const { internal: t } = this;
5800
- t.render = V.use(e), t.draw = new et(t.render.upper2d, fe(e)), t.requestRender = is(e), t.runAsync = ue(e), t.ranges ??= /* @__PURE__ */ new Map();
5801
- const s = Qe(e);
5784
+ t.render = V.use(e), t.draw = new Je(t.render.upper2d, fe(e)), t.requestRender = is(e), t.runAsync = ue(e), t.ranges ??= /* @__PURE__ */ new Map();
5785
+ const s = Ke(e);
5802
5786
  if (t.requestRender("tool"), s == null) return;
5803
5787
  t.client = s;
5804
- const r = kh(e, this.key);
5788
+ const r = Ch(e, this.key);
5805
5789
  t.removeListener?.();
5806
5790
  const i = r.ranges.onSet((o) => {
5807
5791
  t.client != null && (y.isCrude(o.color) && t.ranges.set(o.key, t.client.ranges.sugarOne(o)), this.setState((c) => ({ ...c, count: t.ranges.size })), t.requestRender("tool"));
@@ -5859,13 +5843,13 @@ class Kn extends F {
5859
5843
  backgroundColor: y.setAlpha(T, 0.2),
5860
5844
  bordered: !1
5861
5845
  });
5862
- const _ = p.construct(
5846
+ const L = p.construct(
5863
5847
  { x: w + 1, y: p.top(s) - 34 },
5864
5848
  { x: x - 1, y: p.top(s) - 12 }
5865
5849
  );
5866
5850
  a.container({
5867
- region: _,
5868
- backgroundColor: p.width(_) < 20 ? y.setAlpha(T, 0.4) : (M) => R ? M.colors.gray.l2 : M.colors.gray.l0,
5851
+ region: L,
5852
+ backgroundColor: p.width(L) < 20 ? y.setAlpha(T, 0.4) : (M) => R ? M.colors.gray.l2 : M.colors.gray.l0,
5869
5853
  bordered: !0,
5870
5854
  borderWidth: 1,
5871
5855
  borderRadius: 2,
@@ -5881,10 +5865,10 @@ class Kn extends F {
5881
5865
  }), d(), u != null ? this.setState((m) => ({ ...m, hovered: u })) : this.state.hovered && this.setState((m) => ({ ...m, hovered: null }));
5882
5866
  }
5883
5867
  }
5884
- const ud = {
5868
+ const cd = {
5885
5869
  [ur.TYPE]: ur,
5886
5870
  [Kn.TYPE]: Kn
5887
- }, hd = gn;
5871
+ }, ud = gn;
5888
5872
  class Qn extends Hi {
5889
5873
  static TYPE = "XAxis";
5890
5874
  schema = gn;
@@ -5946,20 +5930,20 @@ class Qn extends Hi {
5946
5930
  return this.yAxes.map((e) => e.xBounds());
5947
5931
  }
5948
5932
  }
5949
- const Dh = h.object({
5933
+ const Mh = h.object({
5950
5934
  container: p.box,
5951
5935
  viewport: p.box,
5952
5936
  hold: h.boolean().optional().default(!1),
5953
5937
  grid: h.record(h.string(), Ti),
5954
5938
  visible: h.boolean().optional().default(!0),
5955
5939
  clearOverScan: f.crudeZ.optional().default(f.ZERO)
5956
- }), Oh = (n, e) => {
5940
+ }), Dh = (n, e) => {
5957
5941
  const t = p.width(n) * Math.sqrt(p.height(n)), s = p.width(e) * Math.sqrt(p.height(e));
5958
5942
  return t / s;
5959
- }, _h = ["upper2d", "lower2d", "gl"], Lh = ["upper2d"];
5943
+ }, Oh = ["upper2d", "lower2d", "gl"], Lh = ["upper2d"];
5960
5944
  class Sr extends ae {
5961
5945
  static TYPE = "LinePlot";
5962
- schema = Dh;
5946
+ schema = Mh;
5963
5947
  afterUpdate(e) {
5964
5948
  this.internal.instrumentation = gt(e, "lineplot"), this.internal.handleError = ue(e), this.internal.renderCtx = V.use(e), rs(e, (t) => {
5965
5949
  this.state.visible && this.requestRender("low", t);
@@ -5997,7 +5981,7 @@ class Sr extends ae {
5997
5981
  return this.childrenOfType(In.TYPE);
5998
5982
  }
5999
5983
  get exposure() {
6000
- return Oh(this.state.viewport, this.state.container);
5984
+ return Dh(this.state.viewport, this.state.container);
6001
5985
  }
6002
5986
  renderAxes(e, t) {
6003
5987
  const s = { ...this.state, plot: e, canvases: t, exposure: this.exposure };
@@ -6032,7 +6016,7 @@ class Sr extends ae {
6032
6016
  this.measures.forEach((s) => s.render(t));
6033
6017
  }
6034
6018
  calculatePlot() {
6035
- return _o(this.state.grid, this.state.container);
6019
+ return Oo(this.state.grid, this.state.container);
6036
6020
  }
6037
6021
  render(e) {
6038
6022
  const { instrumentation: t, renderCtx: s, handleError: r } = this.internal;
@@ -6073,7 +6057,7 @@ class Sr extends ae {
6073
6057
  }
6074
6058
  requestRender(e, t) {
6075
6059
  const { renderCtx: s } = this.internal;
6076
- let r = _h;
6060
+ let r = Oh;
6077
6061
  t === "tool" && (r = Lh), s.loop.set({
6078
6062
  key: `${this.type}-${this.key}`,
6079
6063
  render: () => this.render(r),
@@ -6082,7 +6066,7 @@ class Sr extends ae {
6082
6066
  });
6083
6067
  }
6084
6068
  }
6085
- const dd = {
6069
+ const hd = {
6086
6070
  [Sr.TYPE]: Sr,
6087
6071
  [Qn.TYPE]: Qn,
6088
6072
  [Hn.TYPE]: Hn,
@@ -6090,63 +6074,63 @@ const dd = {
6090
6074
  };
6091
6075
  export {
6092
6076
  dr as $,
6093
- id as A,
6077
+ rd as A,
6094
6078
  qh as B,
6095
- ld as C,
6096
- td as D,
6079
+ od as C,
6080
+ ed as D,
6097
6081
  In as E,
6098
- Hh as F,
6099
- Do as G,
6100
- Dh as H,
6101
- hd as I,
6102
- jh as J,
6082
+ jh as F,
6083
+ Mo as G,
6084
+ Mh as H,
6085
+ ud as I,
6086
+ Fh as J,
6103
6087
  zt as K,
6104
6088
  Sr as L,
6105
- Je as M,
6106
- ru as N,
6107
- ou as O,
6108
- qi as P,
6109
- su as Q,
6110
- Wh as R,
6111
- zh as S,
6112
- iu as T,
6089
+ Qe as M,
6090
+ su as N,
6091
+ au as O,
6092
+ Fi as P,
6093
+ nu as Q,
6094
+ zh as R,
6095
+ Hh as S,
6096
+ ru as T,
6113
6097
  ir as U,
6114
- Fi as V,
6098
+ qi as V,
6115
6099
  $i as W,
6116
6100
  Qn as X,
6117
6101
  Hn as Y,
6118
6102
  Wn as Z,
6119
6103
  Vn as _,
6120
6104
  is as a,
6121
- Fr as a$,
6105
+ qr as a$,
6122
6106
  pr as a0,
6123
6107
  mr as a1,
6124
6108
  gr as a2,
6125
6109
  qu as a3,
6126
6110
  zn as a4,
6127
6111
  Jt as a5,
6128
- Xh as a6,
6129
- Wu as a7,
6130
- Kh as a8,
6131
- Gh as a9,
6112
+ Vh as a6,
6113
+ zu as a7,
6114
+ Gh as a8,
6115
+ Xh as a9,
6132
6116
  Gi as aA,
6133
6117
  nn as aB,
6134
6118
  zi as aC,
6135
6119
  Qt as aD,
6136
6120
  Aa as aE,
6137
6121
  Na as aF,
6138
- gi as aG,
6139
- Nn as aH,
6140
- Ki as aI,
6141
- Ch as aJ,
6122
+ ns as aG,
6123
+ gi as aH,
6124
+ Nn as aI,
6125
+ Ki as aJ,
6142
6126
  Eh as aK,
6143
- ns as aL,
6144
- wh as aM,
6145
- xh as aN,
6127
+ Th as aL,
6128
+ bh as aM,
6129
+ wh as aN,
6146
6130
  xr as aO,
6147
- ct as aP,
6131
+ lt as aP,
6148
6132
  Si as aQ,
6149
- pt as aR,
6133
+ ft as aR,
6150
6134
  Hr as aS,
6151
6135
  Wr as aT,
6152
6136
  ii as aU,
@@ -6155,82 +6139,82 @@ export {
6155
6139
  Da as aX,
6156
6140
  Xa as aY,
6157
6141
  Va as aZ,
6158
- mt as a_,
6159
- Vu as aa,
6160
- Uu as ab,
6161
- Zu as ac,
6162
- Hu as ad,
6163
- Gu as ae,
6164
- Xu as af,
6165
- Ku as ag,
6166
- Vh as ah,
6167
- zu as ai,
6168
- $u as aj,
6169
- ju as ak,
6170
- Fu as al,
6142
+ pt as a_,
6143
+ Wu as aa,
6144
+ Zu as ab,
6145
+ Bu as ac,
6146
+ ju as ad,
6147
+ Xu as ae,
6148
+ Vu as af,
6149
+ Gu as ag,
6150
+ Wh as ah,
6151
+ Hu as ai,
6152
+ Uu as aj,
6153
+ Fu as ak,
6154
+ $u as al,
6171
6155
  Wi as am,
6172
6156
  Xn as an,
6173
- Le as ao,
6174
- gu as ap,
6175
- uu as aq,
6157
+ _e as ao,
6158
+ mu as ap,
6159
+ cu as aq,
6176
6160
  gn as ar,
6177
- bu as as,
6161
+ vu as as,
6178
6162
  jn as at,
6179
6163
  Xi as au,
6180
6164
  en as av,
6181
- Au as aw,
6165
+ Yu as aw,
6182
6166
  ur as ax,
6183
- Mh as ay,
6167
+ Rh as ay,
6184
6168
  Kn as az,
6185
- rd as b,
6169
+ sd as b,
6186
6170
  Ga as b0,
6187
6171
  Ka as b1,
6188
6172
  Us as b2,
6189
- ul as b3,
6190
- dt as b4,
6173
+ cl as b3,
6174
+ ht as b4,
6191
6175
  ws as b5,
6192
6176
  Vi as b6,
6193
6177
  Ve as b7,
6194
- hh as b8,
6178
+ uh as b8,
6195
6179
  tn as b9,
6196
6180
  yr as ba,
6197
- eh as bb,
6198
- nh as bc,
6199
- th as bd,
6200
- Qu as be,
6181
+ Ju as bb,
6182
+ th as bc,
6183
+ eh as bd,
6184
+ Ku as be,
6201
6185
  zr as bf,
6202
6186
  ni as bg,
6203
6187
  Ha as bh,
6204
6188
  Oa as bi,
6205
6189
  ja as bj,
6206
- ih as bk,
6190
+ rh as bk,
6207
6191
  vr as bl,
6208
- mh as bm,
6192
+ ph as bm,
6209
6193
  br as bn,
6210
- gh as bo,
6194
+ mh as bo,
6211
6195
  wr as bp,
6212
6196
  rs as c,
6213
- bh as d,
6214
- uh as e,
6215
- od as f,
6216
- Ro as g,
6217
- io as h,
6218
- ad as i,
6197
+ vh as d,
6198
+ ch as e,
6199
+ ad as f,
6200
+ Po as g,
6201
+ ro as h,
6202
+ id as i,
6219
6203
  Lu as j,
6220
- ud as k,
6221
- ph as l,
6222
- dd as m,
6223
- Fh as n,
6224
- nd as o,
6225
- rh as p,
6226
- Qh as q,
6204
+ cd as k,
6205
+ fh as l,
6206
+ hd as m,
6207
+ $h as n,
6208
+ td as o,
6209
+ sh as p,
6210
+ Kh as q,
6227
6211
  ge as r,
6228
- sh as s,
6229
- Jh as t,
6212
+ nh as s,
6213
+ Qh as t,
6230
6214
  Ca as u,
6231
- cd as v,
6232
- Uh as w,
6233
- $h as x,
6234
- ed as y,
6235
- sd as z
6215
+ ld as v,
6216
+ Zh as w,
6217
+ Uh as x,
6218
+ Jh as y,
6219
+ nd as z
6236
6220
  };