@incursa/ui-kit 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,10 @@ function dispatchComponentEvent(host, type, detail = {}, options = {}) {
93
93
  });
94
94
  return host.dispatchEvent(event);
95
95
  }
96
+ function createUniqueId(prefix = "inc-wc") {
97
+ const random = Math.random().toString(36).slice(2, 8);
98
+ return `${prefix}-${random}`;
99
+ }
96
100
  function getIncWebComponentsNamespace() {
97
101
  if (typeof globalThis === "undefined") {
98
102
  return null;
@@ -2491,8 +2495,8 @@ function formatRemaining(totalSeconds) {
2491
2495
  return `${totalSeconds}s`;
2492
2496
  }
2493
2497
  const minutes = Math.floor(totalSeconds / 60);
2494
- const seconds = totalSeconds % 60;
2495
- return `${minutes}m ${seconds}s`;
2498
+ const seconds2 = totalSeconds % 60;
2499
+ return `${minutes}m ${seconds2}s`;
2496
2500
  }
2497
2501
  var IncStatePanel = class extends HostElement3 {
2498
2502
  static observedAttributes = ["tone", "variant", "title", "body", "status", "icon", "open"];
@@ -2961,13 +2965,13 @@ var IncAutoRefresh = class extends HostElement3 {
2961
2965
  }
2962
2966
  this.#renderCountdown(fallbackSeconds);
2963
2967
  }
2964
- #renderCountdown(seconds) {
2968
+ #renderCountdown(seconds2) {
2965
2969
  const label = this.getAttribute("label") || "Refresh in";
2966
2970
  if (this.#parts.label) {
2967
2971
  this.#parts.label.textContent = label;
2968
2972
  }
2969
2973
  if (this.#parts.value) {
2970
- this.#parts.value.textContent = formatRemaining(seconds);
2974
+ this.#parts.value.textContent = formatRemaining(seconds2);
2971
2975
  }
2972
2976
  this.classList.remove("is-paused");
2973
2977
  this.classList.remove("is-loading");
@@ -2980,13 +2984,13 @@ var IncAutoRefresh = class extends HostElement3 {
2980
2984
  }
2981
2985
  this.#updateToggle();
2982
2986
  }
2983
- #renderPaused(seconds) {
2987
+ #renderPaused(seconds2) {
2984
2988
  const label = this.getAttribute("paused-label") || "Paused at";
2985
2989
  if (this.#parts.label) {
2986
2990
  this.#parts.label.textContent = label;
2987
2991
  }
2988
2992
  if (this.#parts.value) {
2989
- this.#parts.value.textContent = formatRemaining(seconds);
2993
+ this.#parts.value.textContent = formatRemaining(seconds2);
2990
2994
  }
2991
2995
  this.classList.add("is-paused");
2992
2996
  this.classList.remove("is-loading");
@@ -4389,6 +4393,3014 @@ if (typeof globalThis !== "undefined") {
4389
4393
  });
4390
4394
  }
4391
4395
 
4396
+ // node_modules/d3-array/src/ascending.js
4397
+ function ascending(a, b) {
4398
+ return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
4399
+ }
4400
+
4401
+ // node_modules/d3-array/src/descending.js
4402
+ function descending(a, b) {
4403
+ return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
4404
+ }
4405
+
4406
+ // node_modules/d3-array/src/bisector.js
4407
+ function bisector(f) {
4408
+ let compare1, compare2, delta;
4409
+ if (f.length !== 2) {
4410
+ compare1 = ascending;
4411
+ compare2 = (d, x2) => ascending(f(d), x2);
4412
+ delta = (d, x2) => f(d) - x2;
4413
+ } else {
4414
+ compare1 = f === ascending || f === descending ? f : zero;
4415
+ compare2 = f;
4416
+ delta = f;
4417
+ }
4418
+ function left(a, x2, lo = 0, hi = a.length) {
4419
+ if (lo < hi) {
4420
+ if (compare1(x2, x2) !== 0) return hi;
4421
+ do {
4422
+ const mid = lo + hi >>> 1;
4423
+ if (compare2(a[mid], x2) < 0) lo = mid + 1;
4424
+ else hi = mid;
4425
+ } while (lo < hi);
4426
+ }
4427
+ return lo;
4428
+ }
4429
+ function right(a, x2, lo = 0, hi = a.length) {
4430
+ if (lo < hi) {
4431
+ if (compare1(x2, x2) !== 0) return hi;
4432
+ do {
4433
+ const mid = lo + hi >>> 1;
4434
+ if (compare2(a[mid], x2) <= 0) lo = mid + 1;
4435
+ else hi = mid;
4436
+ } while (lo < hi);
4437
+ }
4438
+ return lo;
4439
+ }
4440
+ function center(a, x2, lo = 0, hi = a.length) {
4441
+ const i = left(a, x2, lo, hi - 1);
4442
+ return i > lo && delta(a[i - 1], x2) > -delta(a[i], x2) ? i - 1 : i;
4443
+ }
4444
+ return { left, center, right };
4445
+ }
4446
+ function zero() {
4447
+ return 0;
4448
+ }
4449
+
4450
+ // node_modules/d3-array/src/number.js
4451
+ function number(x2) {
4452
+ return x2 === null ? NaN : +x2;
4453
+ }
4454
+
4455
+ // node_modules/d3-array/src/bisect.js
4456
+ var ascendingBisect = bisector(ascending);
4457
+ var bisectRight = ascendingBisect.right;
4458
+ var bisectLeft = ascendingBisect.left;
4459
+ var bisectCenter = bisector(number).center;
4460
+ var bisect_default = bisectRight;
4461
+
4462
+ // node_modules/d3-array/src/extent.js
4463
+ function extent(values, valueof) {
4464
+ let min;
4465
+ let max;
4466
+ if (valueof === void 0) {
4467
+ for (const value of values) {
4468
+ if (value != null) {
4469
+ if (min === void 0) {
4470
+ if (value >= value) min = max = value;
4471
+ } else {
4472
+ if (min > value) min = value;
4473
+ if (max < value) max = value;
4474
+ }
4475
+ }
4476
+ }
4477
+ } else {
4478
+ let index = -1;
4479
+ for (let value of values) {
4480
+ if ((value = valueof(value, ++index, values)) != null) {
4481
+ if (min === void 0) {
4482
+ if (value >= value) min = max = value;
4483
+ } else {
4484
+ if (min > value) min = value;
4485
+ if (max < value) max = value;
4486
+ }
4487
+ }
4488
+ }
4489
+ }
4490
+ return [min, max];
4491
+ }
4492
+
4493
+ // node_modules/d3-array/src/ticks.js
4494
+ var e10 = Math.sqrt(50);
4495
+ var e5 = Math.sqrt(10);
4496
+ var e2 = Math.sqrt(2);
4497
+ function tickSpec(start, stop, count) {
4498
+ const step = (stop - start) / Math.max(0, count), power = Math.floor(Math.log10(step)), error = step / Math.pow(10, power), factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
4499
+ let i1, i2, inc;
4500
+ if (power < 0) {
4501
+ inc = Math.pow(10, -power) / factor;
4502
+ i1 = Math.round(start * inc);
4503
+ i2 = Math.round(stop * inc);
4504
+ if (i1 / inc < start) ++i1;
4505
+ if (i2 / inc > stop) --i2;
4506
+ inc = -inc;
4507
+ } else {
4508
+ inc = Math.pow(10, power) * factor;
4509
+ i1 = Math.round(start / inc);
4510
+ i2 = Math.round(stop / inc);
4511
+ if (i1 * inc < start) ++i1;
4512
+ if (i2 * inc > stop) --i2;
4513
+ }
4514
+ if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
4515
+ return [i1, i2, inc];
4516
+ }
4517
+ function ticks(start, stop, count) {
4518
+ stop = +stop, start = +start, count = +count;
4519
+ if (!(count > 0)) return [];
4520
+ if (start === stop) return [start];
4521
+ const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
4522
+ if (!(i2 >= i1)) return [];
4523
+ const n = i2 - i1 + 1, ticks2 = new Array(n);
4524
+ if (reverse) {
4525
+ if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) / -inc;
4526
+ else for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) * inc;
4527
+ } else {
4528
+ if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) / -inc;
4529
+ else for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) * inc;
4530
+ }
4531
+ return ticks2;
4532
+ }
4533
+ function tickIncrement(start, stop, count) {
4534
+ stop = +stop, start = +start, count = +count;
4535
+ return tickSpec(start, stop, count)[2];
4536
+ }
4537
+ function tickStep(start, stop, count) {
4538
+ stop = +stop, start = +start, count = +count;
4539
+ const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
4540
+ return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
4541
+ }
4542
+
4543
+ // node_modules/d3-scale/src/init.js
4544
+ function initRange(domain, range) {
4545
+ switch (arguments.length) {
4546
+ case 0:
4547
+ break;
4548
+ case 1:
4549
+ this.range(domain);
4550
+ break;
4551
+ default:
4552
+ this.range(range).domain(domain);
4553
+ break;
4554
+ }
4555
+ return this;
4556
+ }
4557
+
4558
+ // node_modules/d3-color/src/define.js
4559
+ function define_default(constructor, factory, prototype) {
4560
+ constructor.prototype = factory.prototype = prototype;
4561
+ prototype.constructor = constructor;
4562
+ }
4563
+ function extend(parent, definition) {
4564
+ var prototype = Object.create(parent.prototype);
4565
+ for (var key in definition) prototype[key] = definition[key];
4566
+ return prototype;
4567
+ }
4568
+
4569
+ // node_modules/d3-color/src/color.js
4570
+ function Color() {
4571
+ }
4572
+ var darker = 0.7;
4573
+ var brighter = 1 / darker;
4574
+ var reI = "\\s*([+-]?\\d+)\\s*";
4575
+ var reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*";
4576
+ var reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
4577
+ var reHex = /^#([0-9a-f]{3,8})$/;
4578
+ var reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`);
4579
+ var reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`);
4580
+ var reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`);
4581
+ var reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`);
4582
+ var reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`);
4583
+ var reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
4584
+ var named = {
4585
+ aliceblue: 15792383,
4586
+ antiquewhite: 16444375,
4587
+ aqua: 65535,
4588
+ aquamarine: 8388564,
4589
+ azure: 15794175,
4590
+ beige: 16119260,
4591
+ bisque: 16770244,
4592
+ black: 0,
4593
+ blanchedalmond: 16772045,
4594
+ blue: 255,
4595
+ blueviolet: 9055202,
4596
+ brown: 10824234,
4597
+ burlywood: 14596231,
4598
+ cadetblue: 6266528,
4599
+ chartreuse: 8388352,
4600
+ chocolate: 13789470,
4601
+ coral: 16744272,
4602
+ cornflowerblue: 6591981,
4603
+ cornsilk: 16775388,
4604
+ crimson: 14423100,
4605
+ cyan: 65535,
4606
+ darkblue: 139,
4607
+ darkcyan: 35723,
4608
+ darkgoldenrod: 12092939,
4609
+ darkgray: 11119017,
4610
+ darkgreen: 25600,
4611
+ darkgrey: 11119017,
4612
+ darkkhaki: 12433259,
4613
+ darkmagenta: 9109643,
4614
+ darkolivegreen: 5597999,
4615
+ darkorange: 16747520,
4616
+ darkorchid: 10040012,
4617
+ darkred: 9109504,
4618
+ darksalmon: 15308410,
4619
+ darkseagreen: 9419919,
4620
+ darkslateblue: 4734347,
4621
+ darkslategray: 3100495,
4622
+ darkslategrey: 3100495,
4623
+ darkturquoise: 52945,
4624
+ darkviolet: 9699539,
4625
+ deeppink: 16716947,
4626
+ deepskyblue: 49151,
4627
+ dimgray: 6908265,
4628
+ dimgrey: 6908265,
4629
+ dodgerblue: 2003199,
4630
+ firebrick: 11674146,
4631
+ floralwhite: 16775920,
4632
+ forestgreen: 2263842,
4633
+ fuchsia: 16711935,
4634
+ gainsboro: 14474460,
4635
+ ghostwhite: 16316671,
4636
+ gold: 16766720,
4637
+ goldenrod: 14329120,
4638
+ gray: 8421504,
4639
+ green: 32768,
4640
+ greenyellow: 11403055,
4641
+ grey: 8421504,
4642
+ honeydew: 15794160,
4643
+ hotpink: 16738740,
4644
+ indianred: 13458524,
4645
+ indigo: 4915330,
4646
+ ivory: 16777200,
4647
+ khaki: 15787660,
4648
+ lavender: 15132410,
4649
+ lavenderblush: 16773365,
4650
+ lawngreen: 8190976,
4651
+ lemonchiffon: 16775885,
4652
+ lightblue: 11393254,
4653
+ lightcoral: 15761536,
4654
+ lightcyan: 14745599,
4655
+ lightgoldenrodyellow: 16448210,
4656
+ lightgray: 13882323,
4657
+ lightgreen: 9498256,
4658
+ lightgrey: 13882323,
4659
+ lightpink: 16758465,
4660
+ lightsalmon: 16752762,
4661
+ lightseagreen: 2142890,
4662
+ lightskyblue: 8900346,
4663
+ lightslategray: 7833753,
4664
+ lightslategrey: 7833753,
4665
+ lightsteelblue: 11584734,
4666
+ lightyellow: 16777184,
4667
+ lime: 65280,
4668
+ limegreen: 3329330,
4669
+ linen: 16445670,
4670
+ magenta: 16711935,
4671
+ maroon: 8388608,
4672
+ mediumaquamarine: 6737322,
4673
+ mediumblue: 205,
4674
+ mediumorchid: 12211667,
4675
+ mediumpurple: 9662683,
4676
+ mediumseagreen: 3978097,
4677
+ mediumslateblue: 8087790,
4678
+ mediumspringgreen: 64154,
4679
+ mediumturquoise: 4772300,
4680
+ mediumvioletred: 13047173,
4681
+ midnightblue: 1644912,
4682
+ mintcream: 16121850,
4683
+ mistyrose: 16770273,
4684
+ moccasin: 16770229,
4685
+ navajowhite: 16768685,
4686
+ navy: 128,
4687
+ oldlace: 16643558,
4688
+ olive: 8421376,
4689
+ olivedrab: 7048739,
4690
+ orange: 16753920,
4691
+ orangered: 16729344,
4692
+ orchid: 14315734,
4693
+ palegoldenrod: 15657130,
4694
+ palegreen: 10025880,
4695
+ paleturquoise: 11529966,
4696
+ palevioletred: 14381203,
4697
+ papayawhip: 16773077,
4698
+ peachpuff: 16767673,
4699
+ peru: 13468991,
4700
+ pink: 16761035,
4701
+ plum: 14524637,
4702
+ powderblue: 11591910,
4703
+ purple: 8388736,
4704
+ rebeccapurple: 6697881,
4705
+ red: 16711680,
4706
+ rosybrown: 12357519,
4707
+ royalblue: 4286945,
4708
+ saddlebrown: 9127187,
4709
+ salmon: 16416882,
4710
+ sandybrown: 16032864,
4711
+ seagreen: 3050327,
4712
+ seashell: 16774638,
4713
+ sienna: 10506797,
4714
+ silver: 12632256,
4715
+ skyblue: 8900331,
4716
+ slateblue: 6970061,
4717
+ slategray: 7372944,
4718
+ slategrey: 7372944,
4719
+ snow: 16775930,
4720
+ springgreen: 65407,
4721
+ steelblue: 4620980,
4722
+ tan: 13808780,
4723
+ teal: 32896,
4724
+ thistle: 14204888,
4725
+ tomato: 16737095,
4726
+ turquoise: 4251856,
4727
+ violet: 15631086,
4728
+ wheat: 16113331,
4729
+ white: 16777215,
4730
+ whitesmoke: 16119285,
4731
+ yellow: 16776960,
4732
+ yellowgreen: 10145074
4733
+ };
4734
+ define_default(Color, color, {
4735
+ copy(channels) {
4736
+ return Object.assign(new this.constructor(), this, channels);
4737
+ },
4738
+ displayable() {
4739
+ return this.rgb().displayable();
4740
+ },
4741
+ hex: color_formatHex,
4742
+ // Deprecated! Use color.formatHex.
4743
+ formatHex: color_formatHex,
4744
+ formatHex8: color_formatHex8,
4745
+ formatHsl: color_formatHsl,
4746
+ formatRgb: color_formatRgb,
4747
+ toString: color_formatRgb
4748
+ });
4749
+ function color_formatHex() {
4750
+ return this.rgb().formatHex();
4751
+ }
4752
+ function color_formatHex8() {
4753
+ return this.rgb().formatHex8();
4754
+ }
4755
+ function color_formatHsl() {
4756
+ return hslConvert(this).formatHsl();
4757
+ }
4758
+ function color_formatRgb() {
4759
+ return this.rgb().formatRgb();
4760
+ }
4761
+ function color(format2) {
4762
+ var m, l;
4763
+ format2 = (format2 + "").trim().toLowerCase();
4764
+ return (m = reHex.exec(format2)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format2)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format2)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format2)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format2)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
4765
+ }
4766
+ function rgbn(n) {
4767
+ return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
4768
+ }
4769
+ function rgba(r, g, b, a) {
4770
+ if (a <= 0) r = g = b = NaN;
4771
+ return new Rgb(r, g, b, a);
4772
+ }
4773
+ function rgbConvert(o) {
4774
+ if (!(o instanceof Color)) o = color(o);
4775
+ if (!o) return new Rgb();
4776
+ o = o.rgb();
4777
+ return new Rgb(o.r, o.g, o.b, o.opacity);
4778
+ }
4779
+ function rgb(r, g, b, opacity) {
4780
+ return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
4781
+ }
4782
+ function Rgb(r, g, b, opacity) {
4783
+ this.r = +r;
4784
+ this.g = +g;
4785
+ this.b = +b;
4786
+ this.opacity = +opacity;
4787
+ }
4788
+ define_default(Rgb, rgb, extend(Color, {
4789
+ brighter(k) {
4790
+ k = k == null ? brighter : Math.pow(brighter, k);
4791
+ return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
4792
+ },
4793
+ darker(k) {
4794
+ k = k == null ? darker : Math.pow(darker, k);
4795
+ return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
4796
+ },
4797
+ rgb() {
4798
+ return this;
4799
+ },
4800
+ clamp() {
4801
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
4802
+ },
4803
+ displayable() {
4804
+ return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1);
4805
+ },
4806
+ hex: rgb_formatHex,
4807
+ // Deprecated! Use color.formatHex.
4808
+ formatHex: rgb_formatHex,
4809
+ formatHex8: rgb_formatHex8,
4810
+ formatRgb: rgb_formatRgb,
4811
+ toString: rgb_formatRgb
4812
+ }));
4813
+ function rgb_formatHex() {
4814
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
4815
+ }
4816
+ function rgb_formatHex8() {
4817
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
4818
+ }
4819
+ function rgb_formatRgb() {
4820
+ const a = clampa(this.opacity);
4821
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
4822
+ }
4823
+ function clampa(opacity) {
4824
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
4825
+ }
4826
+ function clampi(value) {
4827
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
4828
+ }
4829
+ function hex(value) {
4830
+ value = clampi(value);
4831
+ return (value < 16 ? "0" : "") + value.toString(16);
4832
+ }
4833
+ function hsla(h, s, l, a) {
4834
+ if (a <= 0) h = s = l = NaN;
4835
+ else if (l <= 0 || l >= 1) h = s = NaN;
4836
+ else if (s <= 0) h = NaN;
4837
+ return new Hsl(h, s, l, a);
4838
+ }
4839
+ function hslConvert(o) {
4840
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
4841
+ if (!(o instanceof Color)) o = color(o);
4842
+ if (!o) return new Hsl();
4843
+ if (o instanceof Hsl) return o;
4844
+ o = o.rgb();
4845
+ var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2;
4846
+ if (s) {
4847
+ if (r === max) h = (g - b) / s + (g < b) * 6;
4848
+ else if (g === max) h = (b - r) / s + 2;
4849
+ else h = (r - g) / s + 4;
4850
+ s /= l < 0.5 ? max + min : 2 - max - min;
4851
+ h *= 60;
4852
+ } else {
4853
+ s = l > 0 && l < 1 ? 0 : h;
4854
+ }
4855
+ return new Hsl(h, s, l, o.opacity);
4856
+ }
4857
+ function hsl(h, s, l, opacity) {
4858
+ return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
4859
+ }
4860
+ function Hsl(h, s, l, opacity) {
4861
+ this.h = +h;
4862
+ this.s = +s;
4863
+ this.l = +l;
4864
+ this.opacity = +opacity;
4865
+ }
4866
+ define_default(Hsl, hsl, extend(Color, {
4867
+ brighter(k) {
4868
+ k = k == null ? brighter : Math.pow(brighter, k);
4869
+ return new Hsl(this.h, this.s, this.l * k, this.opacity);
4870
+ },
4871
+ darker(k) {
4872
+ k = k == null ? darker : Math.pow(darker, k);
4873
+ return new Hsl(this.h, this.s, this.l * k, this.opacity);
4874
+ },
4875
+ rgb() {
4876
+ var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
4877
+ return new Rgb(
4878
+ hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
4879
+ hsl2rgb(h, m1, m2),
4880
+ hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
4881
+ this.opacity
4882
+ );
4883
+ },
4884
+ clamp() {
4885
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
4886
+ },
4887
+ displayable() {
4888
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1);
4889
+ },
4890
+ formatHsl() {
4891
+ const a = clampa(this.opacity);
4892
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
4893
+ }
4894
+ }));
4895
+ function clamph(value) {
4896
+ value = (value || 0) % 360;
4897
+ return value < 0 ? value + 360 : value;
4898
+ }
4899
+ function clampt(value) {
4900
+ return Math.max(0, Math.min(1, value || 0));
4901
+ }
4902
+ function hsl2rgb(h, m1, m2) {
4903
+ return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
4904
+ }
4905
+
4906
+ // node_modules/d3-interpolate/src/basis.js
4907
+ function basis(t12, v0, v1, v2, v3) {
4908
+ var t2 = t12 * t12, t3 = t2 * t12;
4909
+ return ((1 - 3 * t12 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t12 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;
4910
+ }
4911
+ function basis_default(values) {
4912
+ var n = values.length - 1;
4913
+ return function(t) {
4914
+ var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), v1 = values[i], v2 = values[i + 1], v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
4915
+ return basis((t - i / n) * n, v0, v1, v2, v3);
4916
+ };
4917
+ }
4918
+
4919
+ // node_modules/d3-interpolate/src/basisClosed.js
4920
+ function basisClosed_default(values) {
4921
+ var n = values.length;
4922
+ return function(t) {
4923
+ var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), v0 = values[(i + n - 1) % n], v1 = values[i % n], v2 = values[(i + 1) % n], v3 = values[(i + 2) % n];
4924
+ return basis((t - i / n) * n, v0, v1, v2, v3);
4925
+ };
4926
+ }
4927
+
4928
+ // node_modules/d3-interpolate/src/constant.js
4929
+ var constant_default = (x2) => () => x2;
4930
+
4931
+ // node_modules/d3-interpolate/src/color.js
4932
+ function linear(a, d) {
4933
+ return function(t) {
4934
+ return a + t * d;
4935
+ };
4936
+ }
4937
+ function exponential(a, b, y2) {
4938
+ return a = Math.pow(a, y2), b = Math.pow(b, y2) - a, y2 = 1 / y2, function(t) {
4939
+ return Math.pow(a + t * b, y2);
4940
+ };
4941
+ }
4942
+ function gamma(y2) {
4943
+ return (y2 = +y2) === 1 ? nogamma : function(a, b) {
4944
+ return b - a ? exponential(a, b, y2) : constant_default(isNaN(a) ? b : a);
4945
+ };
4946
+ }
4947
+ function nogamma(a, b) {
4948
+ var d = b - a;
4949
+ return d ? linear(a, d) : constant_default(isNaN(a) ? b : a);
4950
+ }
4951
+
4952
+ // node_modules/d3-interpolate/src/rgb.js
4953
+ var rgb_default = (function rgbGamma(y2) {
4954
+ var color2 = gamma(y2);
4955
+ function rgb2(start, end) {
4956
+ var r = color2((start = rgb(start)).r, (end = rgb(end)).r), g = color2(start.g, end.g), b = color2(start.b, end.b), opacity = nogamma(start.opacity, end.opacity);
4957
+ return function(t) {
4958
+ start.r = r(t);
4959
+ start.g = g(t);
4960
+ start.b = b(t);
4961
+ start.opacity = opacity(t);
4962
+ return start + "";
4963
+ };
4964
+ }
4965
+ rgb2.gamma = rgbGamma;
4966
+ return rgb2;
4967
+ })(1);
4968
+ function rgbSpline(spline) {
4969
+ return function(colors) {
4970
+ var n = colors.length, r = new Array(n), g = new Array(n), b = new Array(n), i, color2;
4971
+ for (i = 0; i < n; ++i) {
4972
+ color2 = rgb(colors[i]);
4973
+ r[i] = color2.r || 0;
4974
+ g[i] = color2.g || 0;
4975
+ b[i] = color2.b || 0;
4976
+ }
4977
+ r = spline(r);
4978
+ g = spline(g);
4979
+ b = spline(b);
4980
+ color2.opacity = 1;
4981
+ return function(t) {
4982
+ color2.r = r(t);
4983
+ color2.g = g(t);
4984
+ color2.b = b(t);
4985
+ return color2 + "";
4986
+ };
4987
+ };
4988
+ }
4989
+ var rgbBasis = rgbSpline(basis_default);
4990
+ var rgbBasisClosed = rgbSpline(basisClosed_default);
4991
+
4992
+ // node_modules/d3-interpolate/src/numberArray.js
4993
+ function numberArray_default(a, b) {
4994
+ if (!b) b = [];
4995
+ var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;
4996
+ return function(t) {
4997
+ for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
4998
+ return c;
4999
+ };
5000
+ }
5001
+ function isNumberArray(x2) {
5002
+ return ArrayBuffer.isView(x2) && !(x2 instanceof DataView);
5003
+ }
5004
+
5005
+ // node_modules/d3-interpolate/src/array.js
5006
+ function genericArray(a, b) {
5007
+ var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x2 = new Array(na), c = new Array(nb), i;
5008
+ for (i = 0; i < na; ++i) x2[i] = value_default(a[i], b[i]);
5009
+ for (; i < nb; ++i) c[i] = b[i];
5010
+ return function(t) {
5011
+ for (i = 0; i < na; ++i) c[i] = x2[i](t);
5012
+ return c;
5013
+ };
5014
+ }
5015
+
5016
+ // node_modules/d3-interpolate/src/date.js
5017
+ function date_default(a, b) {
5018
+ var d = /* @__PURE__ */ new Date();
5019
+ return a = +a, b = +b, function(t) {
5020
+ return d.setTime(a * (1 - t) + b * t), d;
5021
+ };
5022
+ }
5023
+
5024
+ // node_modules/d3-interpolate/src/number.js
5025
+ function number_default(a, b) {
5026
+ return a = +a, b = +b, function(t) {
5027
+ return a * (1 - t) + b * t;
5028
+ };
5029
+ }
5030
+
5031
+ // node_modules/d3-interpolate/src/object.js
5032
+ function object_default(a, b) {
5033
+ var i = {}, c = {}, k;
5034
+ if (a === null || typeof a !== "object") a = {};
5035
+ if (b === null || typeof b !== "object") b = {};
5036
+ for (k in b) {
5037
+ if (k in a) {
5038
+ i[k] = value_default(a[k], b[k]);
5039
+ } else {
5040
+ c[k] = b[k];
5041
+ }
5042
+ }
5043
+ return function(t) {
5044
+ for (k in i) c[k] = i[k](t);
5045
+ return c;
5046
+ };
5047
+ }
5048
+
5049
+ // node_modules/d3-interpolate/src/string.js
5050
+ var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
5051
+ var reB = new RegExp(reA.source, "g");
5052
+ function zero2(b) {
5053
+ return function() {
5054
+ return b;
5055
+ };
5056
+ }
5057
+ function one(b) {
5058
+ return function(t) {
5059
+ return b(t) + "";
5060
+ };
5061
+ }
5062
+ function string_default(a, b) {
5063
+ var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
5064
+ a = a + "", b = b + "";
5065
+ while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
5066
+ if ((bs = bm.index) > bi) {
5067
+ bs = b.slice(bi, bs);
5068
+ if (s[i]) s[i] += bs;
5069
+ else s[++i] = bs;
5070
+ }
5071
+ if ((am = am[0]) === (bm = bm[0])) {
5072
+ if (s[i]) s[i] += bm;
5073
+ else s[++i] = bm;
5074
+ } else {
5075
+ s[++i] = null;
5076
+ q.push({ i, x: number_default(am, bm) });
5077
+ }
5078
+ bi = reB.lastIndex;
5079
+ }
5080
+ if (bi < b.length) {
5081
+ bs = b.slice(bi);
5082
+ if (s[i]) s[i] += bs;
5083
+ else s[++i] = bs;
5084
+ }
5085
+ return s.length < 2 ? q[0] ? one(q[0].x) : zero2(b) : (b = q.length, function(t) {
5086
+ for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
5087
+ return s.join("");
5088
+ });
5089
+ }
5090
+
5091
+ // node_modules/d3-interpolate/src/value.js
5092
+ function value_default(a, b) {
5093
+ var t = typeof b, c;
5094
+ return b == null || t === "boolean" ? constant_default(b) : (t === "number" ? number_default : t === "string" ? (c = color(b)) ? (b = c, rgb_default) : string_default : b instanceof color ? rgb_default : b instanceof Date ? date_default : isNumberArray(b) ? numberArray_default : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object_default : number_default)(a, b);
5095
+ }
5096
+
5097
+ // node_modules/d3-interpolate/src/round.js
5098
+ function round_default(a, b) {
5099
+ return a = +a, b = +b, function(t) {
5100
+ return Math.round(a * (1 - t) + b * t);
5101
+ };
5102
+ }
5103
+
5104
+ // node_modules/d3-scale/src/constant.js
5105
+ function constants(x2) {
5106
+ return function() {
5107
+ return x2;
5108
+ };
5109
+ }
5110
+
5111
+ // node_modules/d3-scale/src/number.js
5112
+ function number2(x2) {
5113
+ return +x2;
5114
+ }
5115
+
5116
+ // node_modules/d3-scale/src/continuous.js
5117
+ var unit = [0, 1];
5118
+ function identity(x2) {
5119
+ return x2;
5120
+ }
5121
+ function normalize(a, b) {
5122
+ return (b -= a = +a) ? function(x2) {
5123
+ return (x2 - a) / b;
5124
+ } : constants(isNaN(b) ? NaN : 0.5);
5125
+ }
5126
+ function clamper(a, b) {
5127
+ var t;
5128
+ if (a > b) t = a, a = b, b = t;
5129
+ return function(x2) {
5130
+ return Math.max(a, Math.min(b, x2));
5131
+ };
5132
+ }
5133
+ function bimap(domain, range, interpolate) {
5134
+ var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
5135
+ if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
5136
+ else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
5137
+ return function(x2) {
5138
+ return r0(d0(x2));
5139
+ };
5140
+ }
5141
+ function polymap(domain, range, interpolate) {
5142
+ var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1;
5143
+ if (domain[j] < domain[0]) {
5144
+ domain = domain.slice().reverse();
5145
+ range = range.slice().reverse();
5146
+ }
5147
+ while (++i < j) {
5148
+ d[i] = normalize(domain[i], domain[i + 1]);
5149
+ r[i] = interpolate(range[i], range[i + 1]);
5150
+ }
5151
+ return function(x2) {
5152
+ var i2 = bisect_default(domain, x2, 1, j) - 1;
5153
+ return r[i2](d[i2](x2));
5154
+ };
5155
+ }
5156
+ function copy(source, target) {
5157
+ return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
5158
+ }
5159
+ function transformer() {
5160
+ var domain = unit, range = unit, interpolate = value_default, transform, untransform, unknown, clamp2 = identity, piecewise, output, input;
5161
+ function rescale() {
5162
+ var n = Math.min(domain.length, range.length);
5163
+ if (clamp2 !== identity) clamp2 = clamper(domain[0], domain[n - 1]);
5164
+ piecewise = n > 2 ? polymap : bimap;
5165
+ output = input = null;
5166
+ return scale;
5167
+ }
5168
+ function scale(x2) {
5169
+ return x2 == null || isNaN(x2 = +x2) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp2(x2)));
5170
+ }
5171
+ scale.invert = function(y2) {
5172
+ return clamp2(untransform((input || (input = piecewise(range, domain.map(transform), number_default)))(y2)));
5173
+ };
5174
+ scale.domain = function(_) {
5175
+ return arguments.length ? (domain = Array.from(_, number2), rescale()) : domain.slice();
5176
+ };
5177
+ scale.range = function(_) {
5178
+ return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
5179
+ };
5180
+ scale.rangeRound = function(_) {
5181
+ return range = Array.from(_), interpolate = round_default, rescale();
5182
+ };
5183
+ scale.clamp = function(_) {
5184
+ return arguments.length ? (clamp2 = _ ? true : identity, rescale()) : clamp2 !== identity;
5185
+ };
5186
+ scale.interpolate = function(_) {
5187
+ return arguments.length ? (interpolate = _, rescale()) : interpolate;
5188
+ };
5189
+ scale.unknown = function(_) {
5190
+ return arguments.length ? (unknown = _, scale) : unknown;
5191
+ };
5192
+ return function(t, u) {
5193
+ transform = t, untransform = u;
5194
+ return rescale();
5195
+ };
5196
+ }
5197
+ function continuous() {
5198
+ return transformer()(identity, identity);
5199
+ }
5200
+
5201
+ // node_modules/d3-format/src/formatDecimal.js
5202
+ function formatDecimal_default(x2) {
5203
+ return Math.abs(x2 = Math.round(x2)) >= 1e21 ? x2.toLocaleString("en").replace(/,/g, "") : x2.toString(10);
5204
+ }
5205
+ function formatDecimalParts(x2, p) {
5206
+ if (!isFinite(x2) || x2 === 0) return null;
5207
+ var i = (x2 = p ? x2.toExponential(p - 1) : x2.toExponential()).indexOf("e"), coefficient = x2.slice(0, i);
5208
+ return [
5209
+ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
5210
+ +x2.slice(i + 1)
5211
+ ];
5212
+ }
5213
+
5214
+ // node_modules/d3-format/src/exponent.js
5215
+ function exponent_default(x2) {
5216
+ return x2 = formatDecimalParts(Math.abs(x2)), x2 ? x2[1] : NaN;
5217
+ }
5218
+
5219
+ // node_modules/d3-format/src/formatGroup.js
5220
+ function formatGroup_default(grouping, thousands) {
5221
+ return function(value, width) {
5222
+ var i = value.length, t = [], j = 0, g = grouping[0], length = 0;
5223
+ while (i > 0 && g > 0) {
5224
+ if (length + g + 1 > width) g = Math.max(1, width - length);
5225
+ t.push(value.substring(i -= g, i + g));
5226
+ if ((length += g + 1) > width) break;
5227
+ g = grouping[j = (j + 1) % grouping.length];
5228
+ }
5229
+ return t.reverse().join(thousands);
5230
+ };
5231
+ }
5232
+
5233
+ // node_modules/d3-format/src/formatNumerals.js
5234
+ function formatNumerals_default(numerals) {
5235
+ return function(value) {
5236
+ return value.replace(/[0-9]/g, function(i) {
5237
+ return numerals[+i];
5238
+ });
5239
+ };
5240
+ }
5241
+
5242
+ // node_modules/d3-format/src/formatSpecifier.js
5243
+ var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
5244
+ function formatSpecifier(specifier) {
5245
+ if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
5246
+ var match;
5247
+ return new FormatSpecifier({
5248
+ fill: match[1],
5249
+ align: match[2],
5250
+ sign: match[3],
5251
+ symbol: match[4],
5252
+ zero: match[5],
5253
+ width: match[6],
5254
+ comma: match[7],
5255
+ precision: match[8] && match[8].slice(1),
5256
+ trim: match[9],
5257
+ type: match[10]
5258
+ });
5259
+ }
5260
+ formatSpecifier.prototype = FormatSpecifier.prototype;
5261
+ function FormatSpecifier(specifier) {
5262
+ this.fill = specifier.fill === void 0 ? " " : specifier.fill + "";
5263
+ this.align = specifier.align === void 0 ? ">" : specifier.align + "";
5264
+ this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "";
5265
+ this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "";
5266
+ this.zero = !!specifier.zero;
5267
+ this.width = specifier.width === void 0 ? void 0 : +specifier.width;
5268
+ this.comma = !!specifier.comma;
5269
+ this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision;
5270
+ this.trim = !!specifier.trim;
5271
+ this.type = specifier.type === void 0 ? "" : specifier.type + "";
5272
+ }
5273
+ FormatSpecifier.prototype.toString = function() {
5274
+ 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;
5275
+ };
5276
+
5277
+ // node_modules/d3-format/src/formatTrim.js
5278
+ function formatTrim_default(s) {
5279
+ out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
5280
+ switch (s[i]) {
5281
+ case ".":
5282
+ i0 = i1 = i;
5283
+ break;
5284
+ case "0":
5285
+ if (i0 === 0) i0 = i;
5286
+ i1 = i;
5287
+ break;
5288
+ default:
5289
+ if (!+s[i]) break out;
5290
+ if (i0 > 0) i0 = 0;
5291
+ break;
5292
+ }
5293
+ }
5294
+ return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
5295
+ }
5296
+
5297
+ // node_modules/d3-format/src/formatPrefixAuto.js
5298
+ var prefixExponent;
5299
+ function formatPrefixAuto_default(x2, p) {
5300
+ var d = formatDecimalParts(x2, p);
5301
+ if (!d) return prefixExponent = void 0, x2.toPrecision(p);
5302
+ var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length;
5303
+ return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x2, Math.max(0, p + i - 1))[0];
5304
+ }
5305
+
5306
+ // node_modules/d3-format/src/formatRounded.js
5307
+ function formatRounded_default(x2, p) {
5308
+ var d = formatDecimalParts(x2, p);
5309
+ if (!d) return x2 + "";
5310
+ var coefficient = d[0], exponent = d[1];
5311
+ return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
5312
+ }
5313
+
5314
+ // node_modules/d3-format/src/formatTypes.js
5315
+ var formatTypes_default = {
5316
+ "%": (x2, p) => (x2 * 100).toFixed(p),
5317
+ "b": (x2) => Math.round(x2).toString(2),
5318
+ "c": (x2) => x2 + "",
5319
+ "d": formatDecimal_default,
5320
+ "e": (x2, p) => x2.toExponential(p),
5321
+ "f": (x2, p) => x2.toFixed(p),
5322
+ "g": (x2, p) => x2.toPrecision(p),
5323
+ "o": (x2) => Math.round(x2).toString(8),
5324
+ "p": (x2, p) => formatRounded_default(x2 * 100, p),
5325
+ "r": formatRounded_default,
5326
+ "s": formatPrefixAuto_default,
5327
+ "X": (x2) => Math.round(x2).toString(16).toUpperCase(),
5328
+ "x": (x2) => Math.round(x2).toString(16)
5329
+ };
5330
+
5331
+ // node_modules/d3-format/src/identity.js
5332
+ function identity_default(x2) {
5333
+ return x2;
5334
+ }
5335
+
5336
+ // node_modules/d3-format/src/locale.js
5337
+ var map = Array.prototype.map;
5338
+ var prefixes = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
5339
+ function locale_default(locale3) {
5340
+ var group = locale3.grouping === void 0 || locale3.thousands === void 0 ? identity_default : formatGroup_default(map.call(locale3.grouping, Number), locale3.thousands + ""), currencyPrefix = locale3.currency === void 0 ? "" : locale3.currency[0] + "", currencySuffix = locale3.currency === void 0 ? "" : locale3.currency[1] + "", decimal = locale3.decimal === void 0 ? "." : locale3.decimal + "", numerals = locale3.numerals === void 0 ? identity_default : formatNumerals_default(map.call(locale3.numerals, String)), percent = locale3.percent === void 0 ? "%" : locale3.percent + "", minus = locale3.minus === void 0 ? "\u2212" : locale3.minus + "", nan = locale3.nan === void 0 ? "NaN" : locale3.nan + "";
5341
+ function newFormat(specifier, options) {
5342
+ specifier = formatSpecifier(specifier);
5343
+ var fill = specifier.fill, align = specifier.align, sign2 = specifier.sign, symbol = specifier.symbol, zero3 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
5344
+ if (type === "n") comma = true, type = "g";
5345
+ else if (!formatTypes_default[type]) precision === void 0 && (precision = 12), trim = true, type = "g";
5346
+ if (zero3 || fill === "0" && align === "=") zero3 = true, fill = "0", align = "=";
5347
+ var prefix = (options && options.prefix !== void 0 ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""), suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== void 0 ? options.suffix : "");
5348
+ var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
5349
+ precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
5350
+ function format2(value) {
5351
+ var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
5352
+ if (type === "c") {
5353
+ valueSuffix = formatType(value) + valueSuffix;
5354
+ value = "";
5355
+ } else {
5356
+ value = +value;
5357
+ var valueNegative = value < 0 || 1 / value < 0;
5358
+ value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
5359
+ if (trim) value = formatTrim_default(value);
5360
+ if (valueNegative && +value === 0 && sign2 !== "+") valueNegative = false;
5361
+ valuePrefix = (valueNegative ? sign2 === "(" ? sign2 : minus : sign2 === "-" || sign2 === "(" ? "" : sign2) + valuePrefix;
5362
+ valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== void 0 ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign2 === "(" ? ")" : "");
5363
+ if (maybeSuffix) {
5364
+ i = -1, n = value.length;
5365
+ while (++i < n) {
5366
+ if (c = value.charCodeAt(i), 48 > c || c > 57) {
5367
+ valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
5368
+ value = value.slice(0, i);
5369
+ break;
5370
+ }
5371
+ }
5372
+ }
5373
+ }
5374
+ if (comma && !zero3) value = group(value, Infinity);
5375
+ var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
5376
+ if (comma && zero3) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
5377
+ switch (align) {
5378
+ case "<":
5379
+ value = valuePrefix + value + valueSuffix + padding;
5380
+ break;
5381
+ case "=":
5382
+ value = valuePrefix + padding + value + valueSuffix;
5383
+ break;
5384
+ case "^":
5385
+ value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
5386
+ break;
5387
+ default:
5388
+ value = padding + valuePrefix + value + valueSuffix;
5389
+ break;
5390
+ }
5391
+ return numerals(value);
5392
+ }
5393
+ format2.toString = function() {
5394
+ return specifier + "";
5395
+ };
5396
+ return format2;
5397
+ }
5398
+ function formatPrefix2(specifier, value) {
5399
+ var e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k = Math.pow(10, -e), f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), { suffix: prefixes[8 + e / 3] });
5400
+ return function(value2) {
5401
+ return f(k * value2);
5402
+ };
5403
+ }
5404
+ return {
5405
+ format: newFormat,
5406
+ formatPrefix: formatPrefix2
5407
+ };
5408
+ }
5409
+
5410
+ // node_modules/d3-format/src/defaultLocale.js
5411
+ var locale;
5412
+ var format;
5413
+ var formatPrefix;
5414
+ defaultLocale({
5415
+ thousands: ",",
5416
+ grouping: [3],
5417
+ currency: ["$", ""]
5418
+ });
5419
+ function defaultLocale(definition) {
5420
+ locale = locale_default(definition);
5421
+ format = locale.format;
5422
+ formatPrefix = locale.formatPrefix;
5423
+ return locale;
5424
+ }
5425
+
5426
+ // node_modules/d3-format/src/precisionFixed.js
5427
+ function precisionFixed_default(step) {
5428
+ return Math.max(0, -exponent_default(Math.abs(step)));
5429
+ }
5430
+
5431
+ // node_modules/d3-format/src/precisionPrefix.js
5432
+ function precisionPrefix_default(step, value) {
5433
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step)));
5434
+ }
5435
+
5436
+ // node_modules/d3-format/src/precisionRound.js
5437
+ function precisionRound_default(step, max) {
5438
+ step = Math.abs(step), max = Math.abs(max) - step;
5439
+ return Math.max(0, exponent_default(max) - exponent_default(step)) + 1;
5440
+ }
5441
+
5442
+ // node_modules/d3-scale/src/tickFormat.js
5443
+ function tickFormat(start, stop, count, specifier) {
5444
+ var step = tickStep(start, stop, count), precision;
5445
+ specifier = formatSpecifier(specifier == null ? ",f" : specifier);
5446
+ switch (specifier.type) {
5447
+ case "s": {
5448
+ var value = Math.max(Math.abs(start), Math.abs(stop));
5449
+ if (specifier.precision == null && !isNaN(precision = precisionPrefix_default(step, value))) specifier.precision = precision;
5450
+ return formatPrefix(specifier, value);
5451
+ }
5452
+ case "":
5453
+ case "e":
5454
+ case "g":
5455
+ case "p":
5456
+ case "r": {
5457
+ if (specifier.precision == null && !isNaN(precision = precisionRound_default(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
5458
+ break;
5459
+ }
5460
+ case "f":
5461
+ case "%": {
5462
+ if (specifier.precision == null && !isNaN(precision = precisionFixed_default(step))) specifier.precision = precision - (specifier.type === "%") * 2;
5463
+ break;
5464
+ }
5465
+ }
5466
+ return format(specifier);
5467
+ }
5468
+
5469
+ // node_modules/d3-scale/src/linear.js
5470
+ function linearish(scale) {
5471
+ var domain = scale.domain;
5472
+ scale.ticks = function(count) {
5473
+ var d = domain();
5474
+ return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
5475
+ };
5476
+ scale.tickFormat = function(count, specifier) {
5477
+ var d = domain();
5478
+ return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
5479
+ };
5480
+ scale.nice = function(count) {
5481
+ if (count == null) count = 10;
5482
+ var d = domain();
5483
+ var i0 = 0;
5484
+ var i1 = d.length - 1;
5485
+ var start = d[i0];
5486
+ var stop = d[i1];
5487
+ var prestep;
5488
+ var step;
5489
+ var maxIter = 10;
5490
+ if (stop < start) {
5491
+ step = start, start = stop, stop = step;
5492
+ step = i0, i0 = i1, i1 = step;
5493
+ }
5494
+ while (maxIter-- > 0) {
5495
+ step = tickIncrement(start, stop, count);
5496
+ if (step === prestep) {
5497
+ d[i0] = start;
5498
+ d[i1] = stop;
5499
+ return domain(d);
5500
+ } else if (step > 0) {
5501
+ start = Math.floor(start / step) * step;
5502
+ stop = Math.ceil(stop / step) * step;
5503
+ } else if (step < 0) {
5504
+ start = Math.ceil(start * step) / step;
5505
+ stop = Math.floor(stop * step) / step;
5506
+ } else {
5507
+ break;
5508
+ }
5509
+ prestep = step;
5510
+ }
5511
+ return scale;
5512
+ };
5513
+ return scale;
5514
+ }
5515
+ function linear2() {
5516
+ var scale = continuous();
5517
+ scale.copy = function() {
5518
+ return copy(scale, linear2());
5519
+ };
5520
+ initRange.apply(scale, arguments);
5521
+ return linearish(scale);
5522
+ }
5523
+
5524
+ // node_modules/d3-scale/src/nice.js
5525
+ function nice(domain, interval) {
5526
+ domain = domain.slice();
5527
+ var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], t;
5528
+ if (x1 < x0) {
5529
+ t = i0, i0 = i1, i1 = t;
5530
+ t = x0, x0 = x1, x1 = t;
5531
+ }
5532
+ domain[i0] = interval.floor(x0);
5533
+ domain[i1] = interval.ceil(x1);
5534
+ return domain;
5535
+ }
5536
+
5537
+ // node_modules/d3-time/src/interval.js
5538
+ var t0 = /* @__PURE__ */ new Date();
5539
+ var t1 = /* @__PURE__ */ new Date();
5540
+ function timeInterval(floori, offseti, count, field) {
5541
+ function interval(date2) {
5542
+ return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2;
5543
+ }
5544
+ interval.floor = (date2) => {
5545
+ return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2;
5546
+ };
5547
+ interval.ceil = (date2) => {
5548
+ return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2;
5549
+ };
5550
+ interval.round = (date2) => {
5551
+ const d0 = interval(date2), d1 = interval.ceil(date2);
5552
+ return date2 - d0 < d1 - date2 ? d0 : d1;
5553
+ };
5554
+ interval.offset = (date2, step) => {
5555
+ return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
5556
+ };
5557
+ interval.range = (start, stop, step) => {
5558
+ const range = [];
5559
+ start = interval.ceil(start);
5560
+ step = step == null ? 1 : Math.floor(step);
5561
+ if (!(start < stop) || !(step > 0)) return range;
5562
+ let previous;
5563
+ do
5564
+ range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
5565
+ while (previous < start && start < stop);
5566
+ return range;
5567
+ };
5568
+ interval.filter = (test) => {
5569
+ return timeInterval((date2) => {
5570
+ if (date2 >= date2) while (floori(date2), !test(date2)) date2.setTime(date2 - 1);
5571
+ }, (date2, step) => {
5572
+ if (date2 >= date2) {
5573
+ if (step < 0) while (++step <= 0) {
5574
+ while (offseti(date2, -1), !test(date2)) {
5575
+ }
5576
+ }
5577
+ else while (--step >= 0) {
5578
+ while (offseti(date2, 1), !test(date2)) {
5579
+ }
5580
+ }
5581
+ }
5582
+ });
5583
+ };
5584
+ if (count) {
5585
+ interval.count = (start, end) => {
5586
+ t0.setTime(+start), t1.setTime(+end);
5587
+ floori(t0), floori(t1);
5588
+ return Math.floor(count(t0, t1));
5589
+ };
5590
+ interval.every = (step) => {
5591
+ step = Math.floor(step);
5592
+ return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? (d) => field(d) % step === 0 : (d) => interval.count(0, d) % step === 0);
5593
+ };
5594
+ }
5595
+ return interval;
5596
+ }
5597
+
5598
+ // node_modules/d3-time/src/millisecond.js
5599
+ var millisecond = timeInterval(() => {
5600
+ }, (date2, step) => {
5601
+ date2.setTime(+date2 + step);
5602
+ }, (start, end) => {
5603
+ return end - start;
5604
+ });
5605
+ millisecond.every = (k) => {
5606
+ k = Math.floor(k);
5607
+ if (!isFinite(k) || !(k > 0)) return null;
5608
+ if (!(k > 1)) return millisecond;
5609
+ return timeInterval((date2) => {
5610
+ date2.setTime(Math.floor(date2 / k) * k);
5611
+ }, (date2, step) => {
5612
+ date2.setTime(+date2 + step * k);
5613
+ }, (start, end) => {
5614
+ return (end - start) / k;
5615
+ });
5616
+ };
5617
+ var milliseconds = millisecond.range;
5618
+
5619
+ // node_modules/d3-time/src/duration.js
5620
+ var durationSecond = 1e3;
5621
+ var durationMinute = durationSecond * 60;
5622
+ var durationHour = durationMinute * 60;
5623
+ var durationDay = durationHour * 24;
5624
+ var durationWeek = durationDay * 7;
5625
+ var durationMonth = durationDay * 30;
5626
+ var durationYear = durationDay * 365;
5627
+
5628
+ // node_modules/d3-time/src/second.js
5629
+ var second = timeInterval((date2) => {
5630
+ date2.setTime(date2 - date2.getMilliseconds());
5631
+ }, (date2, step) => {
5632
+ date2.setTime(+date2 + step * durationSecond);
5633
+ }, (start, end) => {
5634
+ return (end - start) / durationSecond;
5635
+ }, (date2) => {
5636
+ return date2.getUTCSeconds();
5637
+ });
5638
+ var seconds = second.range;
5639
+
5640
+ // node_modules/d3-time/src/minute.js
5641
+ var timeMinute = timeInterval((date2) => {
5642
+ date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond);
5643
+ }, (date2, step) => {
5644
+ date2.setTime(+date2 + step * durationMinute);
5645
+ }, (start, end) => {
5646
+ return (end - start) / durationMinute;
5647
+ }, (date2) => {
5648
+ return date2.getMinutes();
5649
+ });
5650
+ var timeMinutes = timeMinute.range;
5651
+ var utcMinute = timeInterval((date2) => {
5652
+ date2.setUTCSeconds(0, 0);
5653
+ }, (date2, step) => {
5654
+ date2.setTime(+date2 + step * durationMinute);
5655
+ }, (start, end) => {
5656
+ return (end - start) / durationMinute;
5657
+ }, (date2) => {
5658
+ return date2.getUTCMinutes();
5659
+ });
5660
+ var utcMinutes = utcMinute.range;
5661
+
5662
+ // node_modules/d3-time/src/hour.js
5663
+ var timeHour = timeInterval((date2) => {
5664
+ date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond - date2.getMinutes() * durationMinute);
5665
+ }, (date2, step) => {
5666
+ date2.setTime(+date2 + step * durationHour);
5667
+ }, (start, end) => {
5668
+ return (end - start) / durationHour;
5669
+ }, (date2) => {
5670
+ return date2.getHours();
5671
+ });
5672
+ var timeHours = timeHour.range;
5673
+ var utcHour = timeInterval((date2) => {
5674
+ date2.setUTCMinutes(0, 0, 0);
5675
+ }, (date2, step) => {
5676
+ date2.setTime(+date2 + step * durationHour);
5677
+ }, (start, end) => {
5678
+ return (end - start) / durationHour;
5679
+ }, (date2) => {
5680
+ return date2.getUTCHours();
5681
+ });
5682
+ var utcHours = utcHour.range;
5683
+
5684
+ // node_modules/d3-time/src/day.js
5685
+ var timeDay = timeInterval(
5686
+ (date2) => date2.setHours(0, 0, 0, 0),
5687
+ (date2, step) => date2.setDate(date2.getDate() + step),
5688
+ (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,
5689
+ (date2) => date2.getDate() - 1
5690
+ );
5691
+ var timeDays = timeDay.range;
5692
+ var utcDay = timeInterval((date2) => {
5693
+ date2.setUTCHours(0, 0, 0, 0);
5694
+ }, (date2, step) => {
5695
+ date2.setUTCDate(date2.getUTCDate() + step);
5696
+ }, (start, end) => {
5697
+ return (end - start) / durationDay;
5698
+ }, (date2) => {
5699
+ return date2.getUTCDate() - 1;
5700
+ });
5701
+ var utcDays = utcDay.range;
5702
+ var unixDay = timeInterval((date2) => {
5703
+ date2.setUTCHours(0, 0, 0, 0);
5704
+ }, (date2, step) => {
5705
+ date2.setUTCDate(date2.getUTCDate() + step);
5706
+ }, (start, end) => {
5707
+ return (end - start) / durationDay;
5708
+ }, (date2) => {
5709
+ return Math.floor(date2 / durationDay);
5710
+ });
5711
+ var unixDays = unixDay.range;
5712
+
5713
+ // node_modules/d3-time/src/week.js
5714
+ function timeWeekday(i) {
5715
+ return timeInterval((date2) => {
5716
+ date2.setDate(date2.getDate() - (date2.getDay() + 7 - i) % 7);
5717
+ date2.setHours(0, 0, 0, 0);
5718
+ }, (date2, step) => {
5719
+ date2.setDate(date2.getDate() + step * 7);
5720
+ }, (start, end) => {
5721
+ return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
5722
+ });
5723
+ }
5724
+ var timeSunday = timeWeekday(0);
5725
+ var timeMonday = timeWeekday(1);
5726
+ var timeTuesday = timeWeekday(2);
5727
+ var timeWednesday = timeWeekday(3);
5728
+ var timeThursday = timeWeekday(4);
5729
+ var timeFriday = timeWeekday(5);
5730
+ var timeSaturday = timeWeekday(6);
5731
+ var timeSundays = timeSunday.range;
5732
+ var timeMondays = timeMonday.range;
5733
+ var timeTuesdays = timeTuesday.range;
5734
+ var timeWednesdays = timeWednesday.range;
5735
+ var timeThursdays = timeThursday.range;
5736
+ var timeFridays = timeFriday.range;
5737
+ var timeSaturdays = timeSaturday.range;
5738
+ function utcWeekday(i) {
5739
+ return timeInterval((date2) => {
5740
+ date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i) % 7);
5741
+ date2.setUTCHours(0, 0, 0, 0);
5742
+ }, (date2, step) => {
5743
+ date2.setUTCDate(date2.getUTCDate() + step * 7);
5744
+ }, (start, end) => {
5745
+ return (end - start) / durationWeek;
5746
+ });
5747
+ }
5748
+ var utcSunday = utcWeekday(0);
5749
+ var utcMonday = utcWeekday(1);
5750
+ var utcTuesday = utcWeekday(2);
5751
+ var utcWednesday = utcWeekday(3);
5752
+ var utcThursday = utcWeekday(4);
5753
+ var utcFriday = utcWeekday(5);
5754
+ var utcSaturday = utcWeekday(6);
5755
+ var utcSundays = utcSunday.range;
5756
+ var utcMondays = utcMonday.range;
5757
+ var utcTuesdays = utcTuesday.range;
5758
+ var utcWednesdays = utcWednesday.range;
5759
+ var utcThursdays = utcThursday.range;
5760
+ var utcFridays = utcFriday.range;
5761
+ var utcSaturdays = utcSaturday.range;
5762
+
5763
+ // node_modules/d3-time/src/month.js
5764
+ var timeMonth = timeInterval((date2) => {
5765
+ date2.setDate(1);
5766
+ date2.setHours(0, 0, 0, 0);
5767
+ }, (date2, step) => {
5768
+ date2.setMonth(date2.getMonth() + step);
5769
+ }, (start, end) => {
5770
+ return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
5771
+ }, (date2) => {
5772
+ return date2.getMonth();
5773
+ });
5774
+ var timeMonths = timeMonth.range;
5775
+ var utcMonth = timeInterval((date2) => {
5776
+ date2.setUTCDate(1);
5777
+ date2.setUTCHours(0, 0, 0, 0);
5778
+ }, (date2, step) => {
5779
+ date2.setUTCMonth(date2.getUTCMonth() + step);
5780
+ }, (start, end) => {
5781
+ return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
5782
+ }, (date2) => {
5783
+ return date2.getUTCMonth();
5784
+ });
5785
+ var utcMonths = utcMonth.range;
5786
+
5787
+ // node_modules/d3-time/src/year.js
5788
+ var timeYear = timeInterval((date2) => {
5789
+ date2.setMonth(0, 1);
5790
+ date2.setHours(0, 0, 0, 0);
5791
+ }, (date2, step) => {
5792
+ date2.setFullYear(date2.getFullYear() + step);
5793
+ }, (start, end) => {
5794
+ return end.getFullYear() - start.getFullYear();
5795
+ }, (date2) => {
5796
+ return date2.getFullYear();
5797
+ });
5798
+ timeYear.every = (k) => {
5799
+ return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date2) => {
5800
+ date2.setFullYear(Math.floor(date2.getFullYear() / k) * k);
5801
+ date2.setMonth(0, 1);
5802
+ date2.setHours(0, 0, 0, 0);
5803
+ }, (date2, step) => {
5804
+ date2.setFullYear(date2.getFullYear() + step * k);
5805
+ });
5806
+ };
5807
+ var timeYears = timeYear.range;
5808
+ var utcYear = timeInterval((date2) => {
5809
+ date2.setUTCMonth(0, 1);
5810
+ date2.setUTCHours(0, 0, 0, 0);
5811
+ }, (date2, step) => {
5812
+ date2.setUTCFullYear(date2.getUTCFullYear() + step);
5813
+ }, (start, end) => {
5814
+ return end.getUTCFullYear() - start.getUTCFullYear();
5815
+ }, (date2) => {
5816
+ return date2.getUTCFullYear();
5817
+ });
5818
+ utcYear.every = (k) => {
5819
+ return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date2) => {
5820
+ date2.setUTCFullYear(Math.floor(date2.getUTCFullYear() / k) * k);
5821
+ date2.setUTCMonth(0, 1);
5822
+ date2.setUTCHours(0, 0, 0, 0);
5823
+ }, (date2, step) => {
5824
+ date2.setUTCFullYear(date2.getUTCFullYear() + step * k);
5825
+ });
5826
+ };
5827
+ var utcYears = utcYear.range;
5828
+
5829
+ // node_modules/d3-time/src/ticks.js
5830
+ function ticker(year, month, week, day, hour, minute) {
5831
+ const tickIntervals = [
5832
+ [second, 1, durationSecond],
5833
+ [second, 5, 5 * durationSecond],
5834
+ [second, 15, 15 * durationSecond],
5835
+ [second, 30, 30 * durationSecond],
5836
+ [minute, 1, durationMinute],
5837
+ [minute, 5, 5 * durationMinute],
5838
+ [minute, 15, 15 * durationMinute],
5839
+ [minute, 30, 30 * durationMinute],
5840
+ [hour, 1, durationHour],
5841
+ [hour, 3, 3 * durationHour],
5842
+ [hour, 6, 6 * durationHour],
5843
+ [hour, 12, 12 * durationHour],
5844
+ [day, 1, durationDay],
5845
+ [day, 2, 2 * durationDay],
5846
+ [week, 1, durationWeek],
5847
+ [month, 1, durationMonth],
5848
+ [month, 3, 3 * durationMonth],
5849
+ [year, 1, durationYear]
5850
+ ];
5851
+ function ticks2(start, stop, count) {
5852
+ const reverse = stop < start;
5853
+ if (reverse) [start, stop] = [stop, start];
5854
+ const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count);
5855
+ const ticks3 = interval ? interval.range(start, +stop + 1) : [];
5856
+ return reverse ? ticks3.reverse() : ticks3;
5857
+ }
5858
+ function tickInterval(start, stop, count) {
5859
+ const target = Math.abs(stop - start) / count;
5860
+ const i = bisector(([, , step2]) => step2).right(tickIntervals, target);
5861
+ if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));
5862
+ if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));
5863
+ const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
5864
+ return t.every(step);
5865
+ }
5866
+ return [ticks2, tickInterval];
5867
+ }
5868
+ var [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);
5869
+ var [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);
5870
+
5871
+ // node_modules/d3-time-format/src/locale.js
5872
+ function localDate(d) {
5873
+ if (0 <= d.y && d.y < 100) {
5874
+ var date2 = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
5875
+ date2.setFullYear(d.y);
5876
+ return date2;
5877
+ }
5878
+ return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
5879
+ }
5880
+ function utcDate(d) {
5881
+ if (0 <= d.y && d.y < 100) {
5882
+ var date2 = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
5883
+ date2.setUTCFullYear(d.y);
5884
+ return date2;
5885
+ }
5886
+ return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
5887
+ }
5888
+ function newDate(y2, m, d) {
5889
+ return { y: y2, m, d, H: 0, M: 0, S: 0, L: 0 };
5890
+ }
5891
+ function formatLocale(locale3) {
5892
+ var locale_dateTime = locale3.dateTime, locale_date = locale3.date, locale_time = locale3.time, locale_periods = locale3.periods, locale_weekdays = locale3.days, locale_shortWeekdays = locale3.shortDays, locale_months = locale3.months, locale_shortMonths = locale3.shortMonths;
5893
+ var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths);
5894
+ var formats = {
5895
+ "a": formatShortWeekday,
5896
+ "A": formatWeekday,
5897
+ "b": formatShortMonth,
5898
+ "B": formatMonth,
5899
+ "c": null,
5900
+ "d": formatDayOfMonth,
5901
+ "e": formatDayOfMonth,
5902
+ "f": formatMicroseconds,
5903
+ "g": formatYearISO,
5904
+ "G": formatFullYearISO,
5905
+ "H": formatHour24,
5906
+ "I": formatHour12,
5907
+ "j": formatDayOfYear,
5908
+ "L": formatMilliseconds,
5909
+ "m": formatMonthNumber,
5910
+ "M": formatMinutes,
5911
+ "p": formatPeriod,
5912
+ "q": formatQuarter,
5913
+ "Q": formatUnixTimestamp,
5914
+ "s": formatUnixTimestampSeconds,
5915
+ "S": formatSeconds,
5916
+ "u": formatWeekdayNumberMonday,
5917
+ "U": formatWeekNumberSunday,
5918
+ "V": formatWeekNumberISO,
5919
+ "w": formatWeekdayNumberSunday,
5920
+ "W": formatWeekNumberMonday,
5921
+ "x": null,
5922
+ "X": null,
5923
+ "y": formatYear,
5924
+ "Y": formatFullYear,
5925
+ "Z": formatZone,
5926
+ "%": formatLiteralPercent
5927
+ };
5928
+ var utcFormats = {
5929
+ "a": formatUTCShortWeekday,
5930
+ "A": formatUTCWeekday,
5931
+ "b": formatUTCShortMonth,
5932
+ "B": formatUTCMonth,
5933
+ "c": null,
5934
+ "d": formatUTCDayOfMonth,
5935
+ "e": formatUTCDayOfMonth,
5936
+ "f": formatUTCMicroseconds,
5937
+ "g": formatUTCYearISO,
5938
+ "G": formatUTCFullYearISO,
5939
+ "H": formatUTCHour24,
5940
+ "I": formatUTCHour12,
5941
+ "j": formatUTCDayOfYear,
5942
+ "L": formatUTCMilliseconds,
5943
+ "m": formatUTCMonthNumber,
5944
+ "M": formatUTCMinutes,
5945
+ "p": formatUTCPeriod,
5946
+ "q": formatUTCQuarter,
5947
+ "Q": formatUnixTimestamp,
5948
+ "s": formatUnixTimestampSeconds,
5949
+ "S": formatUTCSeconds,
5950
+ "u": formatUTCWeekdayNumberMonday,
5951
+ "U": formatUTCWeekNumberSunday,
5952
+ "V": formatUTCWeekNumberISO,
5953
+ "w": formatUTCWeekdayNumberSunday,
5954
+ "W": formatUTCWeekNumberMonday,
5955
+ "x": null,
5956
+ "X": null,
5957
+ "y": formatUTCYear,
5958
+ "Y": formatUTCFullYear,
5959
+ "Z": formatUTCZone,
5960
+ "%": formatLiteralPercent
5961
+ };
5962
+ var parses = {
5963
+ "a": parseShortWeekday,
5964
+ "A": parseWeekday,
5965
+ "b": parseShortMonth,
5966
+ "B": parseMonth,
5967
+ "c": parseLocaleDateTime,
5968
+ "d": parseDayOfMonth,
5969
+ "e": parseDayOfMonth,
5970
+ "f": parseMicroseconds,
5971
+ "g": parseYear,
5972
+ "G": parseFullYear,
5973
+ "H": parseHour24,
5974
+ "I": parseHour24,
5975
+ "j": parseDayOfYear,
5976
+ "L": parseMilliseconds,
5977
+ "m": parseMonthNumber,
5978
+ "M": parseMinutes,
5979
+ "p": parsePeriod,
5980
+ "q": parseQuarter,
5981
+ "Q": parseUnixTimestamp,
5982
+ "s": parseUnixTimestampSeconds,
5983
+ "S": parseSeconds,
5984
+ "u": parseWeekdayNumberMonday,
5985
+ "U": parseWeekNumberSunday,
5986
+ "V": parseWeekNumberISO,
5987
+ "w": parseWeekdayNumberSunday,
5988
+ "W": parseWeekNumberMonday,
5989
+ "x": parseLocaleDate,
5990
+ "X": parseLocaleTime,
5991
+ "y": parseYear,
5992
+ "Y": parseFullYear,
5993
+ "Z": parseZone,
5994
+ "%": parseLiteralPercent
5995
+ };
5996
+ formats.x = newFormat(locale_date, formats);
5997
+ formats.X = newFormat(locale_time, formats);
5998
+ formats.c = newFormat(locale_dateTime, formats);
5999
+ utcFormats.x = newFormat(locale_date, utcFormats);
6000
+ utcFormats.X = newFormat(locale_time, utcFormats);
6001
+ utcFormats.c = newFormat(locale_dateTime, utcFormats);
6002
+ function newFormat(specifier, formats2) {
6003
+ return function(date2) {
6004
+ var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format2;
6005
+ if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
6006
+ while (++i < n) {
6007
+ if (specifier.charCodeAt(i) === 37) {
6008
+ string.push(specifier.slice(j, i));
6009
+ if ((pad2 = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
6010
+ else pad2 = c === "e" ? " " : "0";
6011
+ if (format2 = formats2[c]) c = format2(date2, pad2);
6012
+ string.push(c);
6013
+ j = i + 1;
6014
+ }
6015
+ }
6016
+ string.push(specifier.slice(j, i));
6017
+ return string.join("");
6018
+ };
6019
+ }
6020
+ function newParse(specifier, Z) {
6021
+ return function(string) {
6022
+ var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day;
6023
+ if (i != string.length) return null;
6024
+ if ("Q" in d) return new Date(d.Q);
6025
+ if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
6026
+ if (Z && !("Z" in d)) d.Z = 0;
6027
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
6028
+ if (d.m === void 0) d.m = "q" in d ? d.q : 0;
6029
+ if ("V" in d) {
6030
+ if (d.V < 1 || d.V > 53) return null;
6031
+ if (!("w" in d)) d.w = 1;
6032
+ if ("Z" in d) {
6033
+ week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
6034
+ week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
6035
+ week = utcDay.offset(week, (d.V - 1) * 7);
6036
+ d.y = week.getUTCFullYear();
6037
+ d.m = week.getUTCMonth();
6038
+ d.d = week.getUTCDate() + (d.w + 6) % 7;
6039
+ } else {
6040
+ week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
6041
+ week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);
6042
+ week = timeDay.offset(week, (d.V - 1) * 7);
6043
+ d.y = week.getFullYear();
6044
+ d.m = week.getMonth();
6045
+ d.d = week.getDate() + (d.w + 6) % 7;
6046
+ }
6047
+ } else if ("W" in d || "U" in d) {
6048
+ if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
6049
+ day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
6050
+ d.m = 0;
6051
+ d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
6052
+ }
6053
+ if ("Z" in d) {
6054
+ d.H += d.Z / 100 | 0;
6055
+ d.M += d.Z % 100;
6056
+ return utcDate(d);
6057
+ }
6058
+ return localDate(d);
6059
+ };
6060
+ }
6061
+ function parseSpecifier(d, specifier, string, j) {
6062
+ var i = 0, n = specifier.length, m = string.length, c, parse;
6063
+ while (i < n) {
6064
+ if (j >= m) return -1;
6065
+ c = specifier.charCodeAt(i++);
6066
+ if (c === 37) {
6067
+ c = specifier.charAt(i++);
6068
+ parse = parses[c in pads ? specifier.charAt(i++) : c];
6069
+ if (!parse || (j = parse(d, string, j)) < 0) return -1;
6070
+ } else if (c != string.charCodeAt(j++)) {
6071
+ return -1;
6072
+ }
6073
+ }
6074
+ return j;
6075
+ }
6076
+ function parsePeriod(d, string, i) {
6077
+ var n = periodRe.exec(string.slice(i));
6078
+ return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
6079
+ }
6080
+ function parseShortWeekday(d, string, i) {
6081
+ var n = shortWeekdayRe.exec(string.slice(i));
6082
+ return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
6083
+ }
6084
+ function parseWeekday(d, string, i) {
6085
+ var n = weekdayRe.exec(string.slice(i));
6086
+ return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
6087
+ }
6088
+ function parseShortMonth(d, string, i) {
6089
+ var n = shortMonthRe.exec(string.slice(i));
6090
+ return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
6091
+ }
6092
+ function parseMonth(d, string, i) {
6093
+ var n = monthRe.exec(string.slice(i));
6094
+ return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
6095
+ }
6096
+ function parseLocaleDateTime(d, string, i) {
6097
+ return parseSpecifier(d, locale_dateTime, string, i);
6098
+ }
6099
+ function parseLocaleDate(d, string, i) {
6100
+ return parseSpecifier(d, locale_date, string, i);
6101
+ }
6102
+ function parseLocaleTime(d, string, i) {
6103
+ return parseSpecifier(d, locale_time, string, i);
6104
+ }
6105
+ function formatShortWeekday(d) {
6106
+ return locale_shortWeekdays[d.getDay()];
6107
+ }
6108
+ function formatWeekday(d) {
6109
+ return locale_weekdays[d.getDay()];
6110
+ }
6111
+ function formatShortMonth(d) {
6112
+ return locale_shortMonths[d.getMonth()];
6113
+ }
6114
+ function formatMonth(d) {
6115
+ return locale_months[d.getMonth()];
6116
+ }
6117
+ function formatPeriod(d) {
6118
+ return locale_periods[+(d.getHours() >= 12)];
6119
+ }
6120
+ function formatQuarter(d) {
6121
+ return 1 + ~~(d.getMonth() / 3);
6122
+ }
6123
+ function formatUTCShortWeekday(d) {
6124
+ return locale_shortWeekdays[d.getUTCDay()];
6125
+ }
6126
+ function formatUTCWeekday(d) {
6127
+ return locale_weekdays[d.getUTCDay()];
6128
+ }
6129
+ function formatUTCShortMonth(d) {
6130
+ return locale_shortMonths[d.getUTCMonth()];
6131
+ }
6132
+ function formatUTCMonth(d) {
6133
+ return locale_months[d.getUTCMonth()];
6134
+ }
6135
+ function formatUTCPeriod(d) {
6136
+ return locale_periods[+(d.getUTCHours() >= 12)];
6137
+ }
6138
+ function formatUTCQuarter(d) {
6139
+ return 1 + ~~(d.getUTCMonth() / 3);
6140
+ }
6141
+ return {
6142
+ format: function(specifier) {
6143
+ var f = newFormat(specifier += "", formats);
6144
+ f.toString = function() {
6145
+ return specifier;
6146
+ };
6147
+ return f;
6148
+ },
6149
+ parse: function(specifier) {
6150
+ var p = newParse(specifier += "", false);
6151
+ p.toString = function() {
6152
+ return specifier;
6153
+ };
6154
+ return p;
6155
+ },
6156
+ utcFormat: function(specifier) {
6157
+ var f = newFormat(specifier += "", utcFormats);
6158
+ f.toString = function() {
6159
+ return specifier;
6160
+ };
6161
+ return f;
6162
+ },
6163
+ utcParse: function(specifier) {
6164
+ var p = newParse(specifier += "", true);
6165
+ p.toString = function() {
6166
+ return specifier;
6167
+ };
6168
+ return p;
6169
+ }
6170
+ };
6171
+ }
6172
+ var pads = { "-": "", "_": " ", "0": "0" };
6173
+ var numberRe = /^\s*\d+/;
6174
+ var percentRe = /^%/;
6175
+ var requoteRe = /[\\^$*+?|[\]().{}]/g;
6176
+ function pad(value, fill, width) {
6177
+ var sign2 = value < 0 ? "-" : "", string = (sign2 ? -value : value) + "", length = string.length;
6178
+ return sign2 + (length < width ? new Array(width - length + 1).join(fill) + string : string);
6179
+ }
6180
+ function requote(s) {
6181
+ return s.replace(requoteRe, "\\$&");
6182
+ }
6183
+ function formatRe(names) {
6184
+ return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
6185
+ }
6186
+ function formatLookup(names) {
6187
+ return new Map(names.map((name, i) => [name.toLowerCase(), i]));
6188
+ }
6189
+ function parseWeekdayNumberSunday(d, string, i) {
6190
+ var n = numberRe.exec(string.slice(i, i + 1));
6191
+ return n ? (d.w = +n[0], i + n[0].length) : -1;
6192
+ }
6193
+ function parseWeekdayNumberMonday(d, string, i) {
6194
+ var n = numberRe.exec(string.slice(i, i + 1));
6195
+ return n ? (d.u = +n[0], i + n[0].length) : -1;
6196
+ }
6197
+ function parseWeekNumberSunday(d, string, i) {
6198
+ var n = numberRe.exec(string.slice(i, i + 2));
6199
+ return n ? (d.U = +n[0], i + n[0].length) : -1;
6200
+ }
6201
+ function parseWeekNumberISO(d, string, i) {
6202
+ var n = numberRe.exec(string.slice(i, i + 2));
6203
+ return n ? (d.V = +n[0], i + n[0].length) : -1;
6204
+ }
6205
+ function parseWeekNumberMonday(d, string, i) {
6206
+ var n = numberRe.exec(string.slice(i, i + 2));
6207
+ return n ? (d.W = +n[0], i + n[0].length) : -1;
6208
+ }
6209
+ function parseFullYear(d, string, i) {
6210
+ var n = numberRe.exec(string.slice(i, i + 4));
6211
+ return n ? (d.y = +n[0], i + n[0].length) : -1;
6212
+ }
6213
+ function parseYear(d, string, i) {
6214
+ var n = numberRe.exec(string.slice(i, i + 2));
6215
+ return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
6216
+ }
6217
+ function parseZone(d, string, i) {
6218
+ var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
6219
+ return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
6220
+ }
6221
+ function parseQuarter(d, string, i) {
6222
+ var n = numberRe.exec(string.slice(i, i + 1));
6223
+ return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
6224
+ }
6225
+ function parseMonthNumber(d, string, i) {
6226
+ var n = numberRe.exec(string.slice(i, i + 2));
6227
+ return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
6228
+ }
6229
+ function parseDayOfMonth(d, string, i) {
6230
+ var n = numberRe.exec(string.slice(i, i + 2));
6231
+ return n ? (d.d = +n[0], i + n[0].length) : -1;
6232
+ }
6233
+ function parseDayOfYear(d, string, i) {
6234
+ var n = numberRe.exec(string.slice(i, i + 3));
6235
+ return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
6236
+ }
6237
+ function parseHour24(d, string, i) {
6238
+ var n = numberRe.exec(string.slice(i, i + 2));
6239
+ return n ? (d.H = +n[0], i + n[0].length) : -1;
6240
+ }
6241
+ function parseMinutes(d, string, i) {
6242
+ var n = numberRe.exec(string.slice(i, i + 2));
6243
+ return n ? (d.M = +n[0], i + n[0].length) : -1;
6244
+ }
6245
+ function parseSeconds(d, string, i) {
6246
+ var n = numberRe.exec(string.slice(i, i + 2));
6247
+ return n ? (d.S = +n[0], i + n[0].length) : -1;
6248
+ }
6249
+ function parseMilliseconds(d, string, i) {
6250
+ var n = numberRe.exec(string.slice(i, i + 3));
6251
+ return n ? (d.L = +n[0], i + n[0].length) : -1;
6252
+ }
6253
+ function parseMicroseconds(d, string, i) {
6254
+ var n = numberRe.exec(string.slice(i, i + 6));
6255
+ return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
6256
+ }
6257
+ function parseLiteralPercent(d, string, i) {
6258
+ var n = percentRe.exec(string.slice(i, i + 1));
6259
+ return n ? i + n[0].length : -1;
6260
+ }
6261
+ function parseUnixTimestamp(d, string, i) {
6262
+ var n = numberRe.exec(string.slice(i));
6263
+ return n ? (d.Q = +n[0], i + n[0].length) : -1;
6264
+ }
6265
+ function parseUnixTimestampSeconds(d, string, i) {
6266
+ var n = numberRe.exec(string.slice(i));
6267
+ return n ? (d.s = +n[0], i + n[0].length) : -1;
6268
+ }
6269
+ function formatDayOfMonth(d, p) {
6270
+ return pad(d.getDate(), p, 2);
6271
+ }
6272
+ function formatHour24(d, p) {
6273
+ return pad(d.getHours(), p, 2);
6274
+ }
6275
+ function formatHour12(d, p) {
6276
+ return pad(d.getHours() % 12 || 12, p, 2);
6277
+ }
6278
+ function formatDayOfYear(d, p) {
6279
+ return pad(1 + timeDay.count(timeYear(d), d), p, 3);
6280
+ }
6281
+ function formatMilliseconds(d, p) {
6282
+ return pad(d.getMilliseconds(), p, 3);
6283
+ }
6284
+ function formatMicroseconds(d, p) {
6285
+ return formatMilliseconds(d, p) + "000";
6286
+ }
6287
+ function formatMonthNumber(d, p) {
6288
+ return pad(d.getMonth() + 1, p, 2);
6289
+ }
6290
+ function formatMinutes(d, p) {
6291
+ return pad(d.getMinutes(), p, 2);
6292
+ }
6293
+ function formatSeconds(d, p) {
6294
+ return pad(d.getSeconds(), p, 2);
6295
+ }
6296
+ function formatWeekdayNumberMonday(d) {
6297
+ var day = d.getDay();
6298
+ return day === 0 ? 7 : day;
6299
+ }
6300
+ function formatWeekNumberSunday(d, p) {
6301
+ return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);
6302
+ }
6303
+ function dISO(d) {
6304
+ var day = d.getDay();
6305
+ return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);
6306
+ }
6307
+ function formatWeekNumberISO(d, p) {
6308
+ d = dISO(d);
6309
+ return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);
6310
+ }
6311
+ function formatWeekdayNumberSunday(d) {
6312
+ return d.getDay();
6313
+ }
6314
+ function formatWeekNumberMonday(d, p) {
6315
+ return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);
6316
+ }
6317
+ function formatYear(d, p) {
6318
+ return pad(d.getFullYear() % 100, p, 2);
6319
+ }
6320
+ function formatYearISO(d, p) {
6321
+ d = dISO(d);
6322
+ return pad(d.getFullYear() % 100, p, 2);
6323
+ }
6324
+ function formatFullYear(d, p) {
6325
+ return pad(d.getFullYear() % 1e4, p, 4);
6326
+ }
6327
+ function formatFullYearISO(d, p) {
6328
+ var day = d.getDay();
6329
+ d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);
6330
+ return pad(d.getFullYear() % 1e4, p, 4);
6331
+ }
6332
+ function formatZone(d) {
6333
+ var z = d.getTimezoneOffset();
6334
+ return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2);
6335
+ }
6336
+ function formatUTCDayOfMonth(d, p) {
6337
+ return pad(d.getUTCDate(), p, 2);
6338
+ }
6339
+ function formatUTCHour24(d, p) {
6340
+ return pad(d.getUTCHours(), p, 2);
6341
+ }
6342
+ function formatUTCHour12(d, p) {
6343
+ return pad(d.getUTCHours() % 12 || 12, p, 2);
6344
+ }
6345
+ function formatUTCDayOfYear(d, p) {
6346
+ return pad(1 + utcDay.count(utcYear(d), d), p, 3);
6347
+ }
6348
+ function formatUTCMilliseconds(d, p) {
6349
+ return pad(d.getUTCMilliseconds(), p, 3);
6350
+ }
6351
+ function formatUTCMicroseconds(d, p) {
6352
+ return formatUTCMilliseconds(d, p) + "000";
6353
+ }
6354
+ function formatUTCMonthNumber(d, p) {
6355
+ return pad(d.getUTCMonth() + 1, p, 2);
6356
+ }
6357
+ function formatUTCMinutes(d, p) {
6358
+ return pad(d.getUTCMinutes(), p, 2);
6359
+ }
6360
+ function formatUTCSeconds(d, p) {
6361
+ return pad(d.getUTCSeconds(), p, 2);
6362
+ }
6363
+ function formatUTCWeekdayNumberMonday(d) {
6364
+ var dow = d.getUTCDay();
6365
+ return dow === 0 ? 7 : dow;
6366
+ }
6367
+ function formatUTCWeekNumberSunday(d, p) {
6368
+ return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
6369
+ }
6370
+ function UTCdISO(d) {
6371
+ var day = d.getUTCDay();
6372
+ return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
6373
+ }
6374
+ function formatUTCWeekNumberISO(d, p) {
6375
+ d = UTCdISO(d);
6376
+ return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
6377
+ }
6378
+ function formatUTCWeekdayNumberSunday(d) {
6379
+ return d.getUTCDay();
6380
+ }
6381
+ function formatUTCWeekNumberMonday(d, p) {
6382
+ return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
6383
+ }
6384
+ function formatUTCYear(d, p) {
6385
+ return pad(d.getUTCFullYear() % 100, p, 2);
6386
+ }
6387
+ function formatUTCYearISO(d, p) {
6388
+ d = UTCdISO(d);
6389
+ return pad(d.getUTCFullYear() % 100, p, 2);
6390
+ }
6391
+ function formatUTCFullYear(d, p) {
6392
+ return pad(d.getUTCFullYear() % 1e4, p, 4);
6393
+ }
6394
+ function formatUTCFullYearISO(d, p) {
6395
+ var day = d.getUTCDay();
6396
+ d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
6397
+ return pad(d.getUTCFullYear() % 1e4, p, 4);
6398
+ }
6399
+ function formatUTCZone() {
6400
+ return "+0000";
6401
+ }
6402
+ function formatLiteralPercent() {
6403
+ return "%";
6404
+ }
6405
+ function formatUnixTimestamp(d) {
6406
+ return +d;
6407
+ }
6408
+ function formatUnixTimestampSeconds(d) {
6409
+ return Math.floor(+d / 1e3);
6410
+ }
6411
+
6412
+ // node_modules/d3-time-format/src/defaultLocale.js
6413
+ var locale2;
6414
+ var timeFormat;
6415
+ var timeParse;
6416
+ var utcFormat;
6417
+ var utcParse;
6418
+ defaultLocale2({
6419
+ dateTime: "%x, %X",
6420
+ date: "%-m/%-d/%Y",
6421
+ time: "%-I:%M:%S %p",
6422
+ periods: ["AM", "PM"],
6423
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
6424
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
6425
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
6426
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
6427
+ });
6428
+ function defaultLocale2(definition) {
6429
+ locale2 = formatLocale(definition);
6430
+ timeFormat = locale2.format;
6431
+ timeParse = locale2.parse;
6432
+ utcFormat = locale2.utcFormat;
6433
+ utcParse = locale2.utcParse;
6434
+ return locale2;
6435
+ }
6436
+
6437
+ // node_modules/d3-scale/src/time.js
6438
+ function date(t) {
6439
+ return new Date(t);
6440
+ }
6441
+ function number3(t) {
6442
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
6443
+ }
6444
+ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2) {
6445
+ var scale = continuous(), invert = scale.invert, domain = scale.domain;
6446
+ var formatMillisecond = format2(".%L"), formatSecond = format2(":%S"), formatMinute = format2("%I:%M"), formatHour = format2("%I %p"), formatDay = format2("%a %d"), formatWeek = format2("%b %d"), formatMonth = format2("%B"), formatYear2 = format2("%Y");
6447
+ function tickFormat2(date2) {
6448
+ return (second2(date2) < date2 ? formatMillisecond : minute(date2) < date2 ? formatSecond : hour(date2) < date2 ? formatMinute : day(date2) < date2 ? formatHour : month(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year(date2) < date2 ? formatMonth : formatYear2)(date2);
6449
+ }
6450
+ scale.invert = function(y2) {
6451
+ return new Date(invert(y2));
6452
+ };
6453
+ scale.domain = function(_) {
6454
+ return arguments.length ? domain(Array.from(_, number3)) : domain().map(date);
6455
+ };
6456
+ scale.ticks = function(interval) {
6457
+ var d = domain();
6458
+ return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval);
6459
+ };
6460
+ scale.tickFormat = function(count, specifier) {
6461
+ return specifier == null ? tickFormat2 : format2(specifier);
6462
+ };
6463
+ scale.nice = function(interval) {
6464
+ var d = domain();
6465
+ if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
6466
+ return interval ? domain(nice(d, interval)) : scale;
6467
+ };
6468
+ scale.copy = function() {
6469
+ return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2));
6470
+ };
6471
+ return scale;
6472
+ }
6473
+ function time() {
6474
+ return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute, second, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
6475
+ }
6476
+
6477
+ // node_modules/d3-shape/src/constant.js
6478
+ function constant_default2(x2) {
6479
+ return function constant() {
6480
+ return x2;
6481
+ };
6482
+ }
6483
+
6484
+ // node_modules/d3-path/src/path.js
6485
+ var pi = Math.PI;
6486
+ var tau = 2 * pi;
6487
+ var epsilon = 1e-6;
6488
+ var tauEpsilon = tau - epsilon;
6489
+ function append(strings) {
6490
+ this._ += strings[0];
6491
+ for (let i = 1, n = strings.length; i < n; ++i) {
6492
+ this._ += arguments[i] + strings[i];
6493
+ }
6494
+ }
6495
+ function appendRound(digits) {
6496
+ let d = Math.floor(digits);
6497
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
6498
+ if (d > 15) return append;
6499
+ const k = 10 ** d;
6500
+ return function(strings) {
6501
+ this._ += strings[0];
6502
+ for (let i = 1, n = strings.length; i < n; ++i) {
6503
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
6504
+ }
6505
+ };
6506
+ }
6507
+ var Path = class {
6508
+ constructor(digits) {
6509
+ this._x0 = this._y0 = // start of current subpath
6510
+ this._x1 = this._y1 = null;
6511
+ this._ = "";
6512
+ this._append = digits == null ? append : appendRound(digits);
6513
+ }
6514
+ moveTo(x2, y2) {
6515
+ this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}`;
6516
+ }
6517
+ closePath() {
6518
+ if (this._x1 !== null) {
6519
+ this._x1 = this._x0, this._y1 = this._y0;
6520
+ this._append`Z`;
6521
+ }
6522
+ }
6523
+ lineTo(x2, y2) {
6524
+ this._append`L${this._x1 = +x2},${this._y1 = +y2}`;
6525
+ }
6526
+ quadraticCurveTo(x1, y1, x2, y2) {
6527
+ this._append`Q${+x1},${+y1},${this._x1 = +x2},${this._y1 = +y2}`;
6528
+ }
6529
+ bezierCurveTo(x1, y1, x2, y2, x3, y3) {
6530
+ this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x3},${this._y1 = +y3}`;
6531
+ }
6532
+ arcTo(x1, y1, x2, y2, r) {
6533
+ x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
6534
+ if (r < 0) throw new Error(`negative radius: ${r}`);
6535
+ let x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
6536
+ if (this._x1 === null) {
6537
+ this._append`M${this._x1 = x1},${this._y1 = y1}`;
6538
+ } else if (!(l01_2 > epsilon)) ;
6539
+ else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
6540
+ this._append`L${this._x1 = x1},${this._y1 = y1}`;
6541
+ } else {
6542
+ let x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
6543
+ if (Math.abs(t01 - 1) > epsilon) {
6544
+ this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
6545
+ }
6546
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
6547
+ }
6548
+ }
6549
+ arc(x2, y2, r, a0, a1, ccw) {
6550
+ x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw;
6551
+ if (r < 0) throw new Error(`negative radius: ${r}`);
6552
+ let dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
6553
+ if (this._x1 === null) {
6554
+ this._append`M${x0},${y0}`;
6555
+ } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
6556
+ this._append`L${x0},${y0}`;
6557
+ }
6558
+ if (!r) return;
6559
+ if (da < 0) da = da % tau + tau;
6560
+ if (da > tauEpsilon) {
6561
+ this._append`A${r},${r},0,1,${cw},${x2 - dx},${y2 - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
6562
+ } else if (da > epsilon) {
6563
+ this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x2 + r * Math.cos(a1)},${this._y1 = y2 + r * Math.sin(a1)}`;
6564
+ }
6565
+ }
6566
+ rect(x2, y2, w, h) {
6567
+ this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}h${w = +w}v${+h}h${-w}Z`;
6568
+ }
6569
+ toString() {
6570
+ return this._;
6571
+ }
6572
+ };
6573
+ function path() {
6574
+ return new Path();
6575
+ }
6576
+ path.prototype = Path.prototype;
6577
+
6578
+ // node_modules/d3-shape/src/path.js
6579
+ function withPath(shape) {
6580
+ let digits = 3;
6581
+ shape.digits = function(_) {
6582
+ if (!arguments.length) return digits;
6583
+ if (_ == null) {
6584
+ digits = null;
6585
+ } else {
6586
+ const d = Math.floor(_);
6587
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
6588
+ digits = d;
6589
+ }
6590
+ return shape;
6591
+ };
6592
+ return () => new Path(digits);
6593
+ }
6594
+
6595
+ // node_modules/d3-shape/src/array.js
6596
+ var slice = Array.prototype.slice;
6597
+ function array_default(x2) {
6598
+ return typeof x2 === "object" && "length" in x2 ? x2 : Array.from(x2);
6599
+ }
6600
+
6601
+ // node_modules/d3-shape/src/curve/linear.js
6602
+ function Linear(context) {
6603
+ this._context = context;
6604
+ }
6605
+ Linear.prototype = {
6606
+ areaStart: function() {
6607
+ this._line = 0;
6608
+ },
6609
+ areaEnd: function() {
6610
+ this._line = NaN;
6611
+ },
6612
+ lineStart: function() {
6613
+ this._point = 0;
6614
+ },
6615
+ lineEnd: function() {
6616
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
6617
+ this._line = 1 - this._line;
6618
+ },
6619
+ point: function(x2, y2) {
6620
+ x2 = +x2, y2 = +y2;
6621
+ switch (this._point) {
6622
+ case 0:
6623
+ this._point = 1;
6624
+ this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2);
6625
+ break;
6626
+ case 1:
6627
+ this._point = 2;
6628
+ // falls through
6629
+ default:
6630
+ this._context.lineTo(x2, y2);
6631
+ break;
6632
+ }
6633
+ }
6634
+ };
6635
+ function linear_default(context) {
6636
+ return new Linear(context);
6637
+ }
6638
+
6639
+ // node_modules/d3-shape/src/point.js
6640
+ function x(p) {
6641
+ return p[0];
6642
+ }
6643
+ function y(p) {
6644
+ return p[1];
6645
+ }
6646
+
6647
+ // node_modules/d3-shape/src/line.js
6648
+ function line_default(x2, y2) {
6649
+ var defined = constant_default2(true), context = null, curve = linear_default, output = null, path2 = withPath(line);
6650
+ x2 = typeof x2 === "function" ? x2 : x2 === void 0 ? x : constant_default2(x2);
6651
+ y2 = typeof y2 === "function" ? y2 : y2 === void 0 ? y : constant_default2(y2);
6652
+ function line(data) {
6653
+ var i, n = (data = array_default(data)).length, d, defined0 = false, buffer;
6654
+ if (context == null) output = curve(buffer = path2());
6655
+ for (i = 0; i <= n; ++i) {
6656
+ if (!(i < n && defined(d = data[i], i, data)) === defined0) {
6657
+ if (defined0 = !defined0) output.lineStart();
6658
+ else output.lineEnd();
6659
+ }
6660
+ if (defined0) output.point(+x2(d, i, data), +y2(d, i, data));
6661
+ }
6662
+ if (buffer) return output = null, buffer + "" || null;
6663
+ }
6664
+ line.x = function(_) {
6665
+ return arguments.length ? (x2 = typeof _ === "function" ? _ : constant_default2(+_), line) : x2;
6666
+ };
6667
+ line.y = function(_) {
6668
+ return arguments.length ? (y2 = typeof _ === "function" ? _ : constant_default2(+_), line) : y2;
6669
+ };
6670
+ line.defined = function(_) {
6671
+ return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default2(!!_), line) : defined;
6672
+ };
6673
+ line.curve = function(_) {
6674
+ return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
6675
+ };
6676
+ line.context = function(_) {
6677
+ return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
6678
+ };
6679
+ return line;
6680
+ }
6681
+
6682
+ // node_modules/d3-shape/src/area.js
6683
+ function area_default(x0, y0, y1) {
6684
+ var x1 = null, defined = constant_default2(true), context = null, curve = linear_default, output = null, path2 = withPath(area);
6685
+ x0 = typeof x0 === "function" ? x0 : x0 === void 0 ? x : constant_default2(+x0);
6686
+ y0 = typeof y0 === "function" ? y0 : y0 === void 0 ? constant_default2(0) : constant_default2(+y0);
6687
+ y1 = typeof y1 === "function" ? y1 : y1 === void 0 ? y : constant_default2(+y1);
6688
+ function area(data) {
6689
+ var i, j, k, n = (data = array_default(data)).length, d, defined0 = false, buffer, x0z = new Array(n), y0z = new Array(n);
6690
+ if (context == null) output = curve(buffer = path2());
6691
+ for (i = 0; i <= n; ++i) {
6692
+ if (!(i < n && defined(d = data[i], i, data)) === defined0) {
6693
+ if (defined0 = !defined0) {
6694
+ j = i;
6695
+ output.areaStart();
6696
+ output.lineStart();
6697
+ } else {
6698
+ output.lineEnd();
6699
+ output.lineStart();
6700
+ for (k = i - 1; k >= j; --k) {
6701
+ output.point(x0z[k], y0z[k]);
6702
+ }
6703
+ output.lineEnd();
6704
+ output.areaEnd();
6705
+ }
6706
+ }
6707
+ if (defined0) {
6708
+ x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
6709
+ output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
6710
+ }
6711
+ }
6712
+ if (buffer) return output = null, buffer + "" || null;
6713
+ }
6714
+ function arealine() {
6715
+ return line_default().defined(defined).curve(curve).context(context);
6716
+ }
6717
+ area.x = function(_) {
6718
+ return arguments.length ? (x0 = typeof _ === "function" ? _ : constant_default2(+_), x1 = null, area) : x0;
6719
+ };
6720
+ area.x0 = function(_) {
6721
+ return arguments.length ? (x0 = typeof _ === "function" ? _ : constant_default2(+_), area) : x0;
6722
+ };
6723
+ area.x1 = function(_) {
6724
+ return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant_default2(+_), area) : x1;
6725
+ };
6726
+ area.y = function(_) {
6727
+ return arguments.length ? (y0 = typeof _ === "function" ? _ : constant_default2(+_), y1 = null, area) : y0;
6728
+ };
6729
+ area.y0 = function(_) {
6730
+ return arguments.length ? (y0 = typeof _ === "function" ? _ : constant_default2(+_), area) : y0;
6731
+ };
6732
+ area.y1 = function(_) {
6733
+ return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant_default2(+_), area) : y1;
6734
+ };
6735
+ area.lineX0 = area.lineY0 = function() {
6736
+ return arealine().x(x0).y(y0);
6737
+ };
6738
+ area.lineY1 = function() {
6739
+ return arealine().x(x0).y(y1);
6740
+ };
6741
+ area.lineX1 = function() {
6742
+ return arealine().x(x1).y(y0);
6743
+ };
6744
+ area.defined = function(_) {
6745
+ return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default2(!!_), area) : defined;
6746
+ };
6747
+ area.curve = function(_) {
6748
+ return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
6749
+ };
6750
+ area.context = function(_) {
6751
+ return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
6752
+ };
6753
+ return area;
6754
+ }
6755
+
6756
+ // node_modules/d3-shape/src/curve/monotone.js
6757
+ function sign(x2) {
6758
+ return x2 < 0 ? -1 : 1;
6759
+ }
6760
+ function slope3(that, x2, y2) {
6761
+ var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1);
6762
+ return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
6763
+ }
6764
+ function slope2(that, t) {
6765
+ var h = that._x1 - that._x0;
6766
+ return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
6767
+ }
6768
+ function point(that, t02, t12) {
6769
+ var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3;
6770
+ that._context.bezierCurveTo(x0 + dx, y0 + dx * t02, x1 - dx, y1 - dx * t12, x1, y1);
6771
+ }
6772
+ function MonotoneX(context) {
6773
+ this._context = context;
6774
+ }
6775
+ MonotoneX.prototype = {
6776
+ areaStart: function() {
6777
+ this._line = 0;
6778
+ },
6779
+ areaEnd: function() {
6780
+ this._line = NaN;
6781
+ },
6782
+ lineStart: function() {
6783
+ this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
6784
+ this._point = 0;
6785
+ },
6786
+ lineEnd: function() {
6787
+ switch (this._point) {
6788
+ case 2:
6789
+ this._context.lineTo(this._x1, this._y1);
6790
+ break;
6791
+ case 3:
6792
+ point(this, this._t0, slope2(this, this._t0));
6793
+ break;
6794
+ }
6795
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
6796
+ this._line = 1 - this._line;
6797
+ },
6798
+ point: function(x2, y2) {
6799
+ var t12 = NaN;
6800
+ x2 = +x2, y2 = +y2;
6801
+ if (x2 === this._x1 && y2 === this._y1) return;
6802
+ switch (this._point) {
6803
+ case 0:
6804
+ this._point = 1;
6805
+ this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2);
6806
+ break;
6807
+ case 1:
6808
+ this._point = 2;
6809
+ break;
6810
+ case 2:
6811
+ this._point = 3;
6812
+ point(this, slope2(this, t12 = slope3(this, x2, y2)), t12);
6813
+ break;
6814
+ default:
6815
+ point(this, this._t0, t12 = slope3(this, x2, y2));
6816
+ break;
6817
+ }
6818
+ this._x0 = this._x1, this._x1 = x2;
6819
+ this._y0 = this._y1, this._y1 = y2;
6820
+ this._t0 = t12;
6821
+ }
6822
+ };
6823
+ function MonotoneY(context) {
6824
+ this._context = new ReflectContext(context);
6825
+ }
6826
+ (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x2, y2) {
6827
+ MonotoneX.prototype.point.call(this, y2, x2);
6828
+ };
6829
+ function ReflectContext(context) {
6830
+ this._context = context;
6831
+ }
6832
+ ReflectContext.prototype = {
6833
+ moveTo: function(x2, y2) {
6834
+ this._context.moveTo(y2, x2);
6835
+ },
6836
+ closePath: function() {
6837
+ this._context.closePath();
6838
+ },
6839
+ lineTo: function(x2, y2) {
6840
+ this._context.lineTo(y2, x2);
6841
+ },
6842
+ bezierCurveTo: function(x1, y1, x2, y2, x3, y3) {
6843
+ this._context.bezierCurveTo(y1, x1, y2, x2, y3, x3);
6844
+ }
6845
+ };
6846
+ function monotoneX(context) {
6847
+ return new MonotoneX(context);
6848
+ }
6849
+
6850
+ // node_modules/d3-shape/src/curve/step.js
6851
+ function Step(context, t) {
6852
+ this._context = context;
6853
+ this._t = t;
6854
+ }
6855
+ Step.prototype = {
6856
+ areaStart: function() {
6857
+ this._line = 0;
6858
+ },
6859
+ areaEnd: function() {
6860
+ this._line = NaN;
6861
+ },
6862
+ lineStart: function() {
6863
+ this._x = this._y = NaN;
6864
+ this._point = 0;
6865
+ },
6866
+ lineEnd: function() {
6867
+ if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
6868
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
6869
+ if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
6870
+ },
6871
+ point: function(x2, y2) {
6872
+ x2 = +x2, y2 = +y2;
6873
+ switch (this._point) {
6874
+ case 0:
6875
+ this._point = 1;
6876
+ this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2);
6877
+ break;
6878
+ case 1:
6879
+ this._point = 2;
6880
+ // falls through
6881
+ default: {
6882
+ if (this._t <= 0) {
6883
+ this._context.lineTo(this._x, y2);
6884
+ this._context.lineTo(x2, y2);
6885
+ } else {
6886
+ var x1 = this._x * (1 - this._t) + x2 * this._t;
6887
+ this._context.lineTo(x1, this._y);
6888
+ this._context.lineTo(x1, y2);
6889
+ }
6890
+ break;
6891
+ }
6892
+ }
6893
+ this._x = x2, this._y = y2;
6894
+ }
6895
+ };
6896
+ function stepAfter(context) {
6897
+ return new Step(context, 1);
6898
+ }
6899
+
6900
+ // src/web-components/components/visualizations.js
6901
+ var SVG_NS = "http://www.w3.org/2000/svg";
6902
+ var DEFAULT_WIDTH = 120;
6903
+ var DEFAULT_HEIGHT = 32;
6904
+ var DEFAULT_PADDING = 3;
6905
+ var VALID_VARIANTS = /* @__PURE__ */ new Set(["line", "area", "bar"]);
6906
+ var VALID_TONES = /* @__PURE__ */ new Set(["default", "positive", "negative", "muted", "accent"]);
6907
+ var VALID_CURVES = /* @__PURE__ */ new Set(["linear", "monotone", "step"]);
6908
+ var CURVES = {
6909
+ linear: linear_default,
6910
+ monotone: monotoneX,
6911
+ step: stepAfter
6912
+ };
6913
+ function toFiniteNumber(value) {
6914
+ if (value === null || value === void 0 || value === "") {
6915
+ return null;
6916
+ }
6917
+ const parsed = Number(value);
6918
+ return Number.isFinite(parsed) ? parsed : null;
6919
+ }
6920
+ function normalizeToken3(value, allowedValues, fallback) {
6921
+ const normalized = String(value ?? "").trim().toLowerCase();
6922
+ return allowedValues.has(normalized) ? normalized : fallback;
6923
+ }
6924
+ function parseXValue(value, index) {
6925
+ if (value instanceof Date && Number.isFinite(value.getTime())) {
6926
+ return value;
6927
+ }
6928
+ if (typeof value === "number" && Number.isFinite(value)) {
6929
+ return value;
6930
+ }
6931
+ if (typeof value === "string" && value.trim()) {
6932
+ const numeric = Number(value);
6933
+ if (Number.isFinite(numeric)) {
6934
+ return numeric;
6935
+ }
6936
+ const date2 = new Date(value);
6937
+ if (Number.isFinite(date2.getTime())) {
6938
+ return date2;
6939
+ }
6940
+ }
6941
+ return index;
6942
+ }
6943
+ function normalizeInputPoint(item, index) {
6944
+ if (typeof item === "number") {
6945
+ return { x: index, y: Number.isFinite(item) ? item : null };
6946
+ }
6947
+ if (item instanceof Date) {
6948
+ return { x: index, y: null };
6949
+ }
6950
+ if (item && typeof item === "object") {
6951
+ return {
6952
+ x: item.x ?? index,
6953
+ y: toFiniteNumber(item.y)
6954
+ };
6955
+ }
6956
+ const numeric = toFiniteNumber(item);
6957
+ return { x: index, y: numeric };
6958
+ }
6959
+ function parseSparklinePoints(input) {
6960
+ if (Array.isArray(input)) {
6961
+ return input.map(normalizeInputPoint);
6962
+ }
6963
+ if (input === null || input === void 0) {
6964
+ return [];
6965
+ }
6966
+ if (typeof input === "string") {
6967
+ const text = input.trim();
6968
+ if (!text) {
6969
+ return [];
6970
+ }
6971
+ if (text.startsWith("[")) {
6972
+ try {
6973
+ const parsed = JSON.parse(text);
6974
+ return parseSparklinePoints(parsed);
6975
+ } catch {
6976
+ return [];
6977
+ }
6978
+ }
6979
+ return text.split(/[\s,;]+/u).filter(Boolean).map((part, index) => ({ x: index, y: toFiniteNumber(part) }));
6980
+ }
6981
+ return [];
6982
+ }
6983
+ function normalizeSparklineExtent(points, options = {}) {
6984
+ const normalizedPoints = parseSparklinePoints(points);
6985
+ const referenceValue = toFiniteNumber(options.referenceValue);
6986
+ const prepared = normalizedPoints.map((point2, index) => ({
6987
+ x: point2.x,
6988
+ xValue: parseXValue(point2.x, index),
6989
+ y: toFiniteNumber(point2.y),
6990
+ index
6991
+ }));
6992
+ const validPoints = prepared.filter((point2) => point2.y !== null);
6993
+ const yValues = validPoints.map((point2) => point2.y);
6994
+ if (referenceValue !== null) {
6995
+ yValues.push(referenceValue);
6996
+ }
6997
+ if (!validPoints.length) {
6998
+ return {
6999
+ empty: true,
7000
+ points: prepared,
7001
+ validPoints,
7002
+ xDomain: [0, 1],
7003
+ yDomain: [0, 1],
7004
+ xMode: "index",
7005
+ referenceValue
7006
+ };
7007
+ }
7008
+ let yDomain = extent(yValues);
7009
+ if (!Number.isFinite(yDomain[0]) || !Number.isFinite(yDomain[1])) {
7010
+ yDomain = [0, 1];
7011
+ }
7012
+ if (Object.is(yDomain[0], yDomain[1])) {
7013
+ const value = yDomain[0];
7014
+ const padding = value === 0 ? 1 : Math.max(Math.abs(value) * 0.08, 1);
7015
+ yDomain = [value - padding, value + padding];
7016
+ }
7017
+ const allDates = prepared.every((point2) => point2.xValue instanceof Date);
7018
+ const allNumbers = prepared.every((point2) => typeof point2.xValue === "number" && Number.isFinite(point2.xValue));
7019
+ const xMode = allDates ? "time" : allNumbers ? "number" : "index";
7020
+ const xValues = prepared.map((point2) => xMode === "index" ? point2.index : point2.xValue);
7021
+ let xDomain = extent(xValues);
7022
+ if (xMode === "time") {
7023
+ const left = xDomain[0] instanceof Date ? xDomain[0].getTime() : NaN;
7024
+ const right = xDomain[1] instanceof Date ? xDomain[1].getTime() : NaN;
7025
+ if (!Number.isFinite(left) || !Number.isFinite(right)) {
7026
+ xDomain = [/* @__PURE__ */ new Date(0), /* @__PURE__ */ new Date(1)];
7027
+ } else if (left === right) {
7028
+ xDomain = [new Date(left - 1), new Date(right + 1)];
7029
+ }
7030
+ } else {
7031
+ if (!Number.isFinite(xDomain[0]) || !Number.isFinite(xDomain[1])) {
7032
+ xDomain = [0, Math.max(prepared.length - 1, 1)];
7033
+ } else if (Object.is(xDomain[0], xDomain[1])) {
7034
+ xDomain = [xDomain[0] - 1, xDomain[1] + 1];
7035
+ }
7036
+ }
7037
+ return {
7038
+ empty: false,
7039
+ points: prepared,
7040
+ validPoints,
7041
+ xDomain,
7042
+ yDomain,
7043
+ xMode,
7044
+ referenceValue
7045
+ };
7046
+ }
7047
+ function clamp(value, min, max) {
7048
+ return Math.max(min, Math.min(max, value));
7049
+ }
7050
+ function round(value) {
7051
+ return Number.isFinite(value) ? Number(value.toFixed(3)) : 0;
7052
+ }
7053
+ function createScales(extentInfo, width, height, padding) {
7054
+ const xRange = [padding, Math.max(width - padding, padding)];
7055
+ const yRange = [Math.max(height - padding, padding), padding];
7056
+ const xScale = extentInfo.xMode === "time" ? time(extentInfo.xDomain, xRange) : linear2(extentInfo.xDomain, xRange);
7057
+ const yScale = linear2(extentInfo.yDomain, yRange);
7058
+ return { xScale, yScale };
7059
+ }
7060
+ function getX(point2, extentInfo) {
7061
+ return extentInfo.xMode === "index" ? point2.index : point2.xValue;
7062
+ }
7063
+ function singlePointPath(point2, extentInfo, xScale, yScale, width) {
7064
+ const center = round(xScale(getX(point2, extentInfo)));
7065
+ const y2 = round(yScale(point2.y));
7066
+ const half = Math.min(4, Math.max(1, width / 20));
7067
+ const left = round(clamp(center - half, 0, width));
7068
+ const right = round(clamp(center + half, 0, width));
7069
+ return `M${left},${y2}L${right},${y2}`;
7070
+ }
7071
+ function buildSparklinePath(points, options = {}) {
7072
+ const width = Math.max(toFiniteNumber(options.width) ?? DEFAULT_WIDTH, 1);
7073
+ const height = Math.max(toFiniteNumber(options.height) ?? DEFAULT_HEIGHT, 1);
7074
+ const padding = Math.max(toFiniteNumber(options.padding) ?? DEFAULT_PADDING, 0);
7075
+ const variant = normalizeToken3(options.variant, VALID_VARIANTS, "line");
7076
+ const curve = normalizeToken3(options.curve, VALID_CURVES, "linear");
7077
+ const extentInfo = normalizeSparklineExtent(points, options);
7078
+ if (extentInfo.empty) {
7079
+ return {
7080
+ empty: true,
7081
+ width,
7082
+ height,
7083
+ padding,
7084
+ variant,
7085
+ curve,
7086
+ linePath: "",
7087
+ areaPath: "",
7088
+ bars: [],
7089
+ marker: null,
7090
+ minPoint: null,
7091
+ maxPoint: null,
7092
+ referenceY: null,
7093
+ extent: extentInfo
7094
+ };
7095
+ }
7096
+ const { xScale, yScale } = createScales(extentInfo, width, height, padding);
7097
+ const curveFactory = CURVES[curve] || linear_default;
7098
+ const lineGenerator = line_default().defined((point2) => point2.y !== null).x((point2) => round(xScale(getX(point2, extentInfo)))).y((point2) => round(yScale(point2.y))).curve(curveFactory);
7099
+ const validPoints = extentInfo.validPoints;
7100
+ const linePath = validPoints.length === 1 ? singlePointPath(validPoints[0], extentInfo, xScale, yScale, width) : lineGenerator(extentInfo.points) || "";
7101
+ const baseline = clamp(0, extentInfo.yDomain[0], extentInfo.yDomain[1]);
7102
+ const areaGenerator = area_default().defined((point2) => point2.y !== null).x((point2) => round(xScale(getX(point2, extentInfo)))).y0(round(yScale(baseline))).y1((point2) => round(yScale(point2.y))).curve(curveFactory);
7103
+ const areaPath = validPoints.length > 1 ? areaGenerator(extentInfo.points) || "" : "";
7104
+ const barWidth = Math.max(1, Math.min(8, (width - padding * 2) / Math.max(extentInfo.points.length, 1) * 0.58));
7105
+ const baselineY = round(yScale(baseline));
7106
+ const bars = validPoints.map((point2) => {
7107
+ const x2 = round(xScale(getX(point2, extentInfo)) - barWidth / 2);
7108
+ const y2 = round(yScale(point2.y));
7109
+ return {
7110
+ x: x2,
7111
+ y: Math.min(y2, baselineY),
7112
+ width: round(barWidth),
7113
+ height: Math.max(1, round(Math.abs(baselineY - y2)))
7114
+ };
7115
+ });
7116
+ const lastPoint = validPoints[validPoints.length - 1] || null;
7117
+ const marker = lastPoint ? {
7118
+ x: round(xScale(getX(lastPoint, extentInfo))),
7119
+ y: round(yScale(lastPoint.y)),
7120
+ value: lastPoint.y
7121
+ } : null;
7122
+ const minPoint = validPoints.reduce((candidate, point2) => point2.y < candidate.y ? point2 : candidate, validPoints[0]);
7123
+ const maxPoint = validPoints.reduce((candidate, point2) => point2.y > candidate.y ? point2 : candidate, validPoints[0]);
7124
+ const mapMarker = (point2) => point2 ? {
7125
+ x: round(xScale(getX(point2, extentInfo))),
7126
+ y: round(yScale(point2.y)),
7127
+ value: point2.y
7128
+ } : null;
7129
+ return {
7130
+ empty: false,
7131
+ width,
7132
+ height,
7133
+ padding,
7134
+ variant,
7135
+ curve,
7136
+ linePath,
7137
+ areaPath,
7138
+ bars,
7139
+ marker,
7140
+ minPoint: mapMarker(minPoint),
7141
+ maxPoint: mapMarker(maxPoint),
7142
+ referenceY: extentInfo.referenceValue === null ? null : round(yScale(extentInfo.referenceValue)),
7143
+ extent: extentInfo
7144
+ };
7145
+ }
7146
+ function svgElement(name) {
7147
+ return document.createElementNS(SVG_NS, name);
7148
+ }
7149
+ function hasInvalidPathData(value) {
7150
+ return /(?:NaN|Infinity|-Infinity)/u.test(String(value ?? ""));
7151
+ }
7152
+ var IncSparklineElement = class extends HTMLElement {
7153
+ static observedAttributes = [
7154
+ "aria-label",
7155
+ "curve",
7156
+ "empty-label",
7157
+ "height",
7158
+ "points",
7159
+ "reference-value",
7160
+ "show-last-marker",
7161
+ "show-min-max",
7162
+ "tone",
7163
+ "values",
7164
+ "variant",
7165
+ "width"
7166
+ ];
7167
+ #hasPropertyPoints = false;
7168
+ #propertyPoints = [];
7169
+ #titleId = createUniqueId("inc-sparkline-title");
7170
+ #descId = createUniqueId("inc-sparkline-desc");
7171
+ connectedCallback() {
7172
+ this.#render();
7173
+ }
7174
+ attributeChangedCallback() {
7175
+ if (this.isConnected) {
7176
+ this.#render();
7177
+ }
7178
+ }
7179
+ get points() {
7180
+ if (this.#hasPropertyPoints) {
7181
+ return parseSparklinePoints(this.#propertyPoints);
7182
+ }
7183
+ if (this.hasAttribute("points")) {
7184
+ return parseSparklinePoints(this.getAttribute("points"));
7185
+ }
7186
+ return parseSparklinePoints(this.getAttribute("values"));
7187
+ }
7188
+ set points(value) {
7189
+ if (value === null || value === void 0) {
7190
+ this.#hasPropertyPoints = false;
7191
+ this.#propertyPoints = [];
7192
+ } else {
7193
+ this.#hasPropertyPoints = true;
7194
+ this.#propertyPoints = value;
7195
+ }
7196
+ if (this.isConnected) {
7197
+ this.#render();
7198
+ }
7199
+ }
7200
+ get values() {
7201
+ return this.getAttribute("values") || "";
7202
+ }
7203
+ set values(value) {
7204
+ if (value === null || value === void 0 || value === "") {
7205
+ this.removeAttribute("values");
7206
+ return;
7207
+ }
7208
+ this.setAttribute("values", String(value));
7209
+ }
7210
+ get width() {
7211
+ return Math.max(toFiniteNumber(this.getAttribute("width")) ?? DEFAULT_WIDTH, 1);
7212
+ }
7213
+ set width(value) {
7214
+ if (value === null || value === void 0 || value === "") {
7215
+ this.removeAttribute("width");
7216
+ return;
7217
+ }
7218
+ this.setAttribute("width", String(value));
7219
+ }
7220
+ get height() {
7221
+ return Math.max(toFiniteNumber(this.getAttribute("height")) ?? DEFAULT_HEIGHT, 1);
7222
+ }
7223
+ set height(value) {
7224
+ if (value === null || value === void 0 || value === "") {
7225
+ this.removeAttribute("height");
7226
+ return;
7227
+ }
7228
+ this.setAttribute("height", String(value));
7229
+ }
7230
+ #render() {
7231
+ const width = this.width;
7232
+ const height = this.height;
7233
+ const variant = normalizeToken3(this.getAttribute("variant"), VALID_VARIANTS, "line");
7234
+ const tone = normalizeToken3(this.getAttribute("tone"), VALID_TONES, "default");
7235
+ const curve = normalizeToken3(this.getAttribute("curve"), VALID_CURVES, "linear");
7236
+ const referenceValue = toFiniteNumber(this.getAttribute("reference-value"));
7237
+ const label = this.getAttribute("aria-label") || "Sparkline trend";
7238
+ const emptyLabel = this.getAttribute("empty-label") ?? "No data";
7239
+ const model = buildSparklinePath(this.points, {
7240
+ curve,
7241
+ height,
7242
+ referenceValue,
7243
+ variant,
7244
+ width
7245
+ });
7246
+ this.classList.add("inc-sparkline");
7247
+ [...this.classList].filter((token) => token.startsWith("inc-sparkline--")).forEach((token) => this.classList.remove(token));
7248
+ this.classList.add(`inc-sparkline--${variant}`, `inc-sparkline--tone-${tone}`);
7249
+ this.style.setProperty("--inc-sparkline-width", `${width}px`);
7250
+ this.style.setProperty("--inc-sparkline-height", `${height}px`);
7251
+ const svg = svgElement("svg");
7252
+ svg.classList.add("inc-sparkline__svg");
7253
+ svg.setAttribute("part", "svg");
7254
+ svg.setAttribute("width", String(width));
7255
+ svg.setAttribute("height", String(height));
7256
+ svg.setAttribute("viewBox", `0 0 ${width} ${height}`);
7257
+ svg.setAttribute("role", "img");
7258
+ svg.setAttribute("aria-labelledby", `${this.#titleId} ${this.#descId}`);
7259
+ svg.setAttribute("focusable", "false");
7260
+ const title = svgElement("title");
7261
+ title.id = this.#titleId;
7262
+ title.textContent = label;
7263
+ const desc = svgElement("desc");
7264
+ desc.id = this.#descId;
7265
+ desc.textContent = model.empty ? emptyLabel || "No sparkline data available." : this.#buildDescription(model);
7266
+ svg.append(title, desc);
7267
+ if (model.empty || hasInvalidPathData(model.linePath) || hasInvalidPathData(model.areaPath)) {
7268
+ this.#renderEmpty(svg, width, height, emptyLabel);
7269
+ this.replaceChildren(svg);
7270
+ return;
7271
+ }
7272
+ if (model.referenceY !== null) {
7273
+ const reference = svgElement("line");
7274
+ reference.classList.add("inc-sparkline__reference");
7275
+ reference.setAttribute("part", "reference");
7276
+ reference.setAttribute("x1", String(model.padding));
7277
+ reference.setAttribute("x2", String(width - model.padding));
7278
+ reference.setAttribute("y1", String(model.referenceY));
7279
+ reference.setAttribute("y2", String(model.referenceY));
7280
+ reference.setAttribute("vector-effect", "non-scaling-stroke");
7281
+ svg.append(reference);
7282
+ }
7283
+ if (variant === "bar") {
7284
+ model.bars.forEach((bar) => {
7285
+ const rect = svgElement("rect");
7286
+ rect.classList.add("inc-sparkline__bar");
7287
+ rect.setAttribute("part", "bar");
7288
+ rect.setAttribute("x", String(bar.x));
7289
+ rect.setAttribute("y", String(bar.y));
7290
+ rect.setAttribute("width", String(bar.width));
7291
+ rect.setAttribute("height", String(bar.height));
7292
+ svg.append(rect);
7293
+ });
7294
+ } else {
7295
+ if (variant === "area" && model.areaPath) {
7296
+ const area = svgElement("path");
7297
+ area.classList.add("inc-sparkline__area");
7298
+ area.setAttribute("part", "area");
7299
+ area.setAttribute("d", model.areaPath);
7300
+ area.setAttribute("vector-effect", "non-scaling-stroke");
7301
+ svg.append(area);
7302
+ }
7303
+ const line = svgElement("path");
7304
+ line.classList.add("inc-sparkline__line");
7305
+ line.setAttribute("part", "line");
7306
+ line.setAttribute("d", model.linePath);
7307
+ line.setAttribute("vector-effect", "non-scaling-stroke");
7308
+ svg.append(line);
7309
+ }
7310
+ if (this.hasAttribute("show-min-max")) {
7311
+ this.#appendMarker(svg, model.minPoint, "min");
7312
+ if (model.maxPoint?.x !== model.minPoint?.x || model.maxPoint?.y !== model.minPoint?.y) {
7313
+ this.#appendMarker(svg, model.maxPoint, "max");
7314
+ }
7315
+ }
7316
+ if (this.hasAttribute("show-last-marker")) {
7317
+ this.#appendMarker(svg, model.marker, "last");
7318
+ }
7319
+ this.replaceChildren(svg);
7320
+ }
7321
+ #renderEmpty(svg, width, height, emptyLabel) {
7322
+ const line = svgElement("line");
7323
+ line.classList.add("inc-sparkline__empty-line");
7324
+ line.setAttribute("part", "line");
7325
+ line.setAttribute("x1", "3");
7326
+ line.setAttribute("x2", String(Math.max(width - 3, 3)));
7327
+ line.setAttribute("y1", String(round(height / 2)));
7328
+ line.setAttribute("y2", String(round(height / 2)));
7329
+ line.setAttribute("vector-effect", "non-scaling-stroke");
7330
+ svg.append(line);
7331
+ if (emptyLabel) {
7332
+ const text = svgElement("text");
7333
+ text.classList.add("inc-sparkline__empty");
7334
+ text.setAttribute("part", "empty");
7335
+ text.setAttribute("x", String(round(width / 2)));
7336
+ text.setAttribute("y", String(round(height / 2 + 3)));
7337
+ text.setAttribute("text-anchor", "middle");
7338
+ text.textContent = emptyLabel;
7339
+ svg.append(text);
7340
+ }
7341
+ }
7342
+ #appendMarker(svg, point2, modifier) {
7343
+ if (!point2 || !Number.isFinite(point2.x) || !Number.isFinite(point2.y)) {
7344
+ return;
7345
+ }
7346
+ const marker = svgElement("circle");
7347
+ marker.classList.add("inc-sparkline__marker", `inc-sparkline__marker--${modifier}`);
7348
+ marker.setAttribute("part", "marker");
7349
+ marker.setAttribute("cx", String(point2.x));
7350
+ marker.setAttribute("cy", String(point2.y));
7351
+ marker.setAttribute("r", modifier === "last" ? "2.4" : "1.8");
7352
+ marker.setAttribute("vector-effect", "non-scaling-stroke");
7353
+ svg.append(marker);
7354
+ }
7355
+ #buildDescription(model) {
7356
+ const values = model.extent.validPoints.map((point2) => point2.y);
7357
+ const min = Math.min(...values);
7358
+ const max = Math.max(...values);
7359
+ const latest = model.marker?.value;
7360
+ const parts = [`${values.length} data ${values.length === 1 ? "point" : "points"}.`];
7361
+ if (Number.isFinite(latest)) {
7362
+ parts.push(`Latest value ${latest}.`);
7363
+ }
7364
+ if (Number.isFinite(min) && Number.isFinite(max)) {
7365
+ parts.push(`Range ${min} to ${max}.`);
7366
+ }
7367
+ if (model.extent.referenceValue !== null) {
7368
+ parts.push(`Reference value ${model.extent.referenceValue}.`);
7369
+ }
7370
+ return parts.join(" ");
7371
+ }
7372
+ };
7373
+ var visualizationDefinitions = [
7374
+ ["inc-sparkline", IncSparklineElement]
7375
+ ];
7376
+ var visualizationComponents = {
7377
+ IncSparklineElement
7378
+ };
7379
+ function defineVisualizationComponents(registry = globalThis.customElements) {
7380
+ if (!registry || typeof registry.define !== "function" || typeof registry.get !== "function") {
7381
+ return [];
7382
+ }
7383
+ const defined = [];
7384
+ for (const [tagName, ctor] of visualizationDefinitions) {
7385
+ if (!registry.get(tagName)) {
7386
+ registry.define(tagName, ctor);
7387
+ defined.push(tagName);
7388
+ }
7389
+ }
7390
+ return defined;
7391
+ }
7392
+ if (typeof globalThis !== "undefined") {
7393
+ const namespace2 = globalThis.IncWebComponents || (globalThis.IncWebComponents = {});
7394
+ namespace2.visualizations = Object.assign({}, namespace2.visualizations, {
7395
+ buildSparklinePath,
7396
+ defineVisualizationComponents,
7397
+ normalizeSparklineExtent,
7398
+ parseSparklinePoints,
7399
+ visualizationDefinitions,
7400
+ components: visualizationComponents
7401
+ });
7402
+ }
7403
+
4392
7404
  // src/web-components/components/overlays.js
4393
7405
  var INTERNAL_NODE = /* @__PURE__ */ Symbol("inc-internal-overlay-node");
4394
7406
  var HostElement6 = typeof HTMLElement === "undefined" ? class {
@@ -4926,6 +7938,7 @@ function getComponentEntries() {
4926
7938
  addEntries(entryMap, namespace.feedback?.feedbackDefinitions);
4927
7939
  addEntries(entryMap, namespace.actions?.actionDefinitions);
4928
7940
  addEntries(entryMap, namespace.collections?.collectionDefinitions);
7941
+ addEntries(entryMap, namespace.visualizations?.visualizationDefinitions);
4929
7942
  addEntry(entryMap, "inc-disclosure", namespace.overlays?.IncDisclosureElement);
4930
7943
  addEntry(entryMap, "inc-dialog", namespace.overlays?.IncDialogElement);
4931
7944
  addEntry(entryMap, "inc-drawer", namespace.overlays?.IncDrawerElement);
@@ -4953,7 +7966,10 @@ namespace.registerIncWebComponents = registerIncWebComponents;
4953
7966
  syncNamespace();
4954
7967
  defineAll2();
4955
7968
  export {
7969
+ buildSparklinePath,
4956
7970
  defineAll2 as defineAll,
7971
+ normalizeSparklineExtent,
7972
+ parseSparklinePoints,
4957
7973
  registerIncWebComponents
4958
7974
  };
4959
7975
  /*! Bundled license information: