katucharts.js 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ function ef(n, t) {
11
11
  }
12
12
  function Gr() {
13
13
  }
14
- var Rr = 0.7, $o = 1 / Rr, Di = "\\s*([+-]?\\d+)\\s*", Dr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", kn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ip = /^#([0-9a-f]{3,8})$/, Fp = new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`), Rp = new RegExp(`^rgb\\(${kn},${kn},${kn}\\)$`), Dp = new RegExp(`^rgba\\(${Di},${Di},${Di},${Dr}\\)$`), zp = new RegExp(`^rgba\\(${kn},${kn},${kn},${Dr}\\)$`), Bp = new RegExp(`^hsl\\(${Dr},${kn},${kn}\\)$`), Op = new RegExp(`^hsla\\(${Dr},${kn},${kn},${Dr}\\)$`), vl = {
14
+ var Rr = 0.7, $o = 1 / Rr, Di = "\\s*([+-]?\\d+)\\s*", Dr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Mn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ip = /^#([0-9a-f]{3,8})$/, Fp = new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`), Rp = new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`), Dp = new RegExp(`^rgba\\(${Di},${Di},${Di},${Dr}\\)$`), zp = new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${Dr}\\)$`), Bp = new RegExp(`^hsl\\(${Dr},${Mn},${Mn}\\)$`), Op = new RegExp(`^hsla\\(${Dr},${Mn},${Mn},${Dr}\\)$`), vl = {
15
15
  aliceblue: 15792383,
16
16
  antiquewhite: 16444375,
17
17
  aqua: 65535,
@@ -883,7 +883,7 @@ const cf = 20;
883
883
  function Il(n) {
884
884
  return typeof n == "object" && n !== null && !Array.isArray(n) && Object.getPrototypeOf(n) === Object.prototype;
885
885
  }
886
- function le(n, ...t) {
886
+ function ue(n, ...t) {
887
887
  return lf(n, t, 0);
888
888
  }
889
889
  function lf(n, t, e) {
@@ -1361,14 +1361,14 @@ const Wl = () => {
1361
1361
  throw new Error("not implemented");
1362
1362
  };
1363
1363
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1364
- const Se = /* @__PURE__ */ BigInt(0), pe = /* @__PURE__ */ BigInt(1), ai = /* @__PURE__ */ BigInt(2), yf = /* @__PURE__ */ BigInt(3), xf = /* @__PURE__ */ BigInt(4), bf = /* @__PURE__ */ BigInt(5), Fg = /* @__PURE__ */ BigInt(7), vf = /* @__PURE__ */ BigInt(8), Rg = /* @__PURE__ */ BigInt(9), wf = /* @__PURE__ */ BigInt(16);
1364
+ const Se = /* @__PURE__ */ BigInt(0), ge = /* @__PURE__ */ BigInt(1), ai = /* @__PURE__ */ BigInt(2), yf = /* @__PURE__ */ BigInt(3), xf = /* @__PURE__ */ BigInt(4), bf = /* @__PURE__ */ BigInt(5), Fg = /* @__PURE__ */ BigInt(7), vf = /* @__PURE__ */ BigInt(8), Rg = /* @__PURE__ */ BigInt(9), wf = /* @__PURE__ */ BigInt(16);
1365
1365
  function re(n, t) {
1366
1366
  if (t <= Se)
1367
1367
  throw new Error("mod: expected positive modulus, got " + t);
1368
1368
  const e = n % t;
1369
1369
  return e >= Se ? e : t + e;
1370
1370
  }
1371
- function xn(n, t, e) {
1371
+ function bn(n, t, e) {
1372
1372
  if (t < Se)
1373
1373
  throw new Error("pow2: expected non-negative exponent, got " + t);
1374
1374
  let i = n;
@@ -1381,12 +1381,12 @@ function Hl(n, t) {
1381
1381
  throw new Error("invert: expected non-zero number");
1382
1382
  if (t <= Se)
1383
1383
  throw new Error("invert: expected positive modulus, got " + t);
1384
- let e = re(n, t), i = t, r = Se, o = pe;
1384
+ let e = re(n, t), i = t, r = Se, o = ge;
1385
1385
  for (; e !== Se; ) {
1386
1386
  const a = i / e, l = i - e * a, c = r - o * a;
1387
1387
  i = e, e = l, r = o, o = c;
1388
1388
  }
1389
- if (i !== pe)
1389
+ if (i !== ge)
1390
1390
  throw new Error("invert: does not exist");
1391
1391
  return re(r, t);
1392
1392
  }
@@ -1396,7 +1396,7 @@ function kc(n, t, e) {
1396
1396
  throw new Error("Cannot find square root");
1397
1397
  }
1398
1398
  function kf(n, t) {
1399
- const e = n, i = (e.ORDER + pe) / xf, r = e.pow(t, i);
1399
+ const e = n, i = (e.ORDER + ge) / xf, r = e.pow(t, i);
1400
1400
  return kc(e, r, t), r;
1401
1401
  }
1402
1402
  function Dg(n, t) {
@@ -1417,7 +1417,7 @@ function zg(n) {
1417
1417
  function Mf(n) {
1418
1418
  if (n < yf)
1419
1419
  throw new Error("sqrt is not defined for small field");
1420
- let t = n - pe, e = 0;
1420
+ let t = n - ge, e = 0;
1421
1421
  for (; t % ai === Se; )
1422
1422
  t /= ai, e++;
1423
1423
  let i = ai;
@@ -1428,7 +1428,7 @@ function Mf(n) {
1428
1428
  if (e === 1)
1429
1429
  return kf;
1430
1430
  let o = r.pow(i, t);
1431
- const s = (t + pe) / ai;
1431
+ const s = (t + ge) / ai;
1432
1432
  return function(l, c) {
1433
1433
  const h = l;
1434
1434
  if (h.is0(c))
@@ -1443,7 +1443,7 @@ function Mf(n) {
1443
1443
  for (; !h.eql(g, h.ONE); )
1444
1444
  if (y++, g = h.sqr(g), y === f)
1445
1445
  throw new Error("Cannot find square root");
1446
- const m = pe << BigInt(f - y - 1), x = h.pow(u, m);
1446
+ const m = ge << BigInt(f - y - 1), x = h.pow(u, m);
1447
1447
  f = y, u = h.sqr(x), d = h.mul(d, u), p = h.mul(p, x);
1448
1448
  }
1449
1449
  return p;
@@ -1452,7 +1452,7 @@ function Mf(n) {
1452
1452
  function Bg(n) {
1453
1453
  return n % xf === yf ? kf : n % vf === bf ? Dg : n % wf === Rg ? zg(n) : Mf(n);
1454
1454
  }
1455
- const ni = (n, t) => (re(n, t) & pe) === pe, Og = [
1455
+ const ni = (n, t) => (re(n, t) & ge) === ge, Og = [
1456
1456
  "create",
1457
1457
  "isValid",
1458
1458
  "is0",
@@ -1479,7 +1479,7 @@ function Ng(n) {
1479
1479
  }, e = Og.reduce((i, r) => (i[r] = "function", i), t);
1480
1480
  if (wc(n, e), Ma(n.BYTES, "BYTES"), Ma(n.BITS, "BITS"), n.BYTES < 1 || n.BITS < 1)
1481
1481
  throw new Error("invalid field: expected BYTES/BITS > 0");
1482
- if (n.ORDER <= pe)
1482
+ if (n.ORDER <= ge)
1483
1483
  throw new Error("invalid field: expected ORDER > 1, got " + n.ORDER);
1484
1484
  return n;
1485
1485
  }
@@ -1489,11 +1489,11 @@ function Wg(n, t, e) {
1489
1489
  throw new Error("invalid exponent, negatives unsupported");
1490
1490
  if (e === Se)
1491
1491
  return i.ONE;
1492
- if (e === pe)
1492
+ if (e === ge)
1493
1493
  return t;
1494
1494
  let r = i.ONE, o = t;
1495
1495
  for (; e > Se; )
1496
- e & pe && (r = i.mul(r, o)), o = i.sqr(o), e >>= pe;
1496
+ e & ge && (r = i.mul(r, o)), o = i.sqr(o), e >>= ge;
1497
1497
  return r;
1498
1498
  }
1499
1499
  function Af(n, t, e = !1) {
@@ -1501,7 +1501,7 @@ function Af(n, t, e = !1) {
1501
1501
  return t.reduceRight((a, l, c) => i.is0(l) ? a : (r[c] = i.mul(a, r[c]), i.mul(a, l)), s), r;
1502
1502
  }
1503
1503
  function Vl(n, t) {
1504
- const e = n, i = (e.ORDER - pe) / ai, r = e.pow(t, i), o = e.eql(r, e.ONE), s = e.eql(r, e.ZERO), a = e.eql(r, e.neg(e.ONE));
1504
+ const e = n, i = (e.ORDER - ge) / ai, r = e.pow(t, i), o = e.eql(r, e.ONE), s = e.eql(r, e.ZERO), a = e.eql(r, e.neg(e.ONE));
1505
1505
  if (!o && !s && !a)
1506
1506
  throw new Error("invalid Legendre symbol result");
1507
1507
  return o ? 1 : s ? 0 : -1;
@@ -1525,10 +1525,10 @@ class Sf {
1525
1525
  xt(this, "BYTES");
1526
1526
  xt(this, "isLE");
1527
1527
  xt(this, "ZERO", Se);
1528
- xt(this, "ONE", pe);
1528
+ xt(this, "ONE", ge);
1529
1529
  xt(this, "_lengths");
1530
1530
  xt(this, "_mod");
1531
- if (t <= pe)
1531
+ if (t <= ge)
1532
1532
  throw new Error("invalid field: expected ORDER > 1, got " + t);
1533
1533
  let i;
1534
1534
  this.isLE = !1, e != null && typeof e == "object" && (typeof e.BITS == "number" && (i = e.BITS), typeof e.sqrt == "function" && Object.defineProperty(this, "sqrt", { value: e.sqrt, enumerable: !0 }), typeof e.isLE == "boolean" && (this.isLE = e.isLE), e.allowedLengths && (this._lengths = Object.freeze(e.allowedLengths.slice())), typeof e.modFromBytes == "boolean" && (this._mod = e.modFromBytes));
@@ -1553,7 +1553,7 @@ class Sf {
1553
1553
  return !this.is0(t) && this.isValid(t);
1554
1554
  }
1555
1555
  isOdd(t) {
1556
- return (t & pe) === pe;
1556
+ return (t & ge) === ge;
1557
1557
  }
1558
1558
  neg(t) {
1559
1559
  return re(-t, this.ORDER);
@@ -1790,7 +1790,7 @@ function Yg(n, t) {
1790
1790
  };
1791
1791
  }
1792
1792
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1793
- const qn = /* @__PURE__ */ BigInt(0), ce = /* @__PURE__ */ BigInt(1), Ns = /* @__PURE__ */ BigInt(2), Xg = /* @__PURE__ */ BigInt(8);
1793
+ const qn = /* @__PURE__ */ BigInt(0), he = /* @__PURE__ */ BigInt(1), Ns = /* @__PURE__ */ BigInt(2), Xg = /* @__PURE__ */ BigInt(8);
1794
1794
  function Ug(n, t, e, i) {
1795
1795
  const r = n.sqr(e), o = n.sqr(i), s = n.add(n.mul(t.a, r), o), a = n.add(n.ONE, n.mul(t.d, n.mul(r, o)));
1796
1796
  return n.eql(s, a);
@@ -1800,7 +1800,7 @@ function qg(n, t = {}) {
1800
1800
  let s = i.CURVE;
1801
1801
  const { h: a } = s;
1802
1802
  wc(e, {}, { uvRatio: "function" });
1803
- const l = Ns << BigInt(o.BYTES * 8) - ce, c = (g) => r.create(g), h = e.uvRatio === void 0 ? (g, m) => {
1803
+ const l = Ns << BigInt(o.BYTES * 8) - he, c = (g) => r.create(g), h = e.uvRatio === void 0 ? (g, m) => {
1804
1804
  try {
1805
1805
  return { isValid: !0, value: r.sqrt(r.div(g, m)) };
1806
1806
  } catch {
@@ -1810,7 +1810,7 @@ function qg(n, t = {}) {
1810
1810
  if (!Ug(r, s, s.Gx, s.Gy))
1811
1811
  throw new Error("bad curve params: generator point");
1812
1812
  function f(g, m, x = !1) {
1813
- const v = x ? ce : qn;
1813
+ const v = x ? he : qn;
1814
1814
  return Nl("coordinate " + g, m, v, l), m;
1815
1815
  }
1816
1816
  function u(g) {
@@ -1837,7 +1837,7 @@ function qg(n, t = {}) {
1837
1837
  if (m instanceof y)
1838
1838
  throw new Error("extended point not allowed");
1839
1839
  const { x, y: v } = m || {};
1840
- return f("x", x), f("y", v), new y(x, v, ce, c(x * v));
1840
+ return f("x", x), f("y", v), new y(x, v, he, c(x * v));
1841
1841
  }
1842
1842
  // Uses algo from RFC8032 5.1.3.
1843
1843
  static fromBytes(m, x = !1) {
@@ -1847,11 +1847,11 @@ function qg(n, t = {}) {
1847
1847
  M[v - 1] = C & -129;
1848
1848
  const L = zr(M), _ = x ? l : r.ORDER;
1849
1849
  Nl("point.y", L, qn, _);
1850
- const $ = c(L * L), I = c($ - ce), E = c(k * $ - b);
1850
+ const $ = c(L * L), I = c($ - he), E = c(k * $ - b);
1851
1851
  let { isValid: P, value: S } = h(I, E);
1852
1852
  if (!P)
1853
1853
  throw new Error("bad point: invalid y coordinate");
1854
- const w = (S & ce) === ce, A = (C & 128) !== 0;
1854
+ const w = (S & he) === he, A = (C & 128) !== 0;
1855
1855
  if (!x && S === qn && A)
1856
1856
  throw new Error("bad point: x=0 and x_0=1");
1857
1857
  return A !== w && (S = c(-S)), y.fromAffine({ x: S, y: L });
@@ -1925,7 +1925,7 @@ function qg(n, t = {}) {
1925
1925
  multiplyUnsafe(m) {
1926
1926
  if (!o.isValid(m))
1927
1927
  throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");
1928
- return m === qn ? y.ZERO : this.is0() || m === ce ? this : p.unsafe(this, m, (x) => Ds(y, x));
1928
+ return m === qn ? y.ZERO : this.is0() || m === he ? this : p.unsafe(this, m, (x) => Ds(y, x));
1929
1929
  }
1930
1930
  // Checks if point is of small order.
1931
1931
  // If you add something to small order point, you will have "dirty"
@@ -1948,17 +1948,17 @@ function qg(n, t = {}) {
1948
1948
  v == null && (v = C ? Xg : r.inv(M));
1949
1949
  const L = c(b * v), _ = c(k * v), $ = r.mul(M, v);
1950
1950
  if (C)
1951
- return { x: qn, y: ce };
1952
- if ($ !== ce)
1951
+ return { x: qn, y: he };
1952
+ if ($ !== he)
1953
1953
  throw new Error("invZ was invalid");
1954
1954
  return { x: L, y: _ };
1955
1955
  }
1956
1956
  clearCofactor() {
1957
- return a === ce ? this : this.multiplyUnsafe(a);
1957
+ return a === he ? this : this.multiplyUnsafe(a);
1958
1958
  }
1959
1959
  toBytes() {
1960
1960
  const { x: m, y: x } = this.toAffine(), v = r.toBytes(x);
1961
- return v[v.length - 1] |= m & ce ? 128 : 0, v;
1961
+ return v[v.length - 1] |= m & he ? 128 : 0, v;
1962
1962
  }
1963
1963
  toHex() {
1964
1964
  return pf(this.toBytes());
@@ -1968,8 +1968,8 @@ function qg(n, t = {}) {
1968
1968
  }
1969
1969
  };
1970
1970
  // base / generator point
1971
- xt(y, "BASE", new y(s.Gx, s.Gy, ce, c(s.Gx * s.Gy))), // zero / infinity / identity point
1972
- xt(y, "ZERO", new y(qn, ce, ce, qn)), // 0, 1, 1, 0
1971
+ xt(y, "BASE", new y(s.Gx, s.Gy, he, c(s.Gx * s.Gy))), // zero / infinity / identity point
1972
+ xt(y, "ZERO", new y(qn, he, he, qn)), // 0, 1, 1, 0
1973
1973
  // math field
1974
1974
  xt(y, "Fp", r), // scalar field
1975
1975
  xt(y, "Fn", o);
@@ -2154,7 +2154,7 @@ function jg(n, t, e = {}) {
2154
2154
  const { y: P } = n.fromBytes(E), S = C.publicKey, w = S === 32;
2155
2155
  if (!w && S !== 57)
2156
2156
  throw new Error("only defined for 25519 and 448");
2157
- const A = w ? a.div(ce + P, ce - P) : a.div(P - ce, P + ce);
2157
+ const A = w ? a.div(he + P, he - P) : a.div(P - he, P + he);
2158
2158
  return a.toBytes(A);
2159
2159
  },
2160
2160
  toMontgomerySecret(E) {
@@ -2185,8 +2185,8 @@ const Zg = /* @__PURE__ */ BigInt(0), Cr = /* @__PURE__ */ BigInt(1), jl = /* @_
2185
2185
  Gy: BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")
2186
2186
  };
2187
2187
  function Qg(n) {
2188
- const t = BigInt(10), e = BigInt(20), i = BigInt(40), r = BigInt(80), o = Br, a = n * n % o * n % o, l = xn(a, jl, o) * a % o, c = xn(l, Cr, o) * n % o, h = xn(c, Kg, o) * c % o, f = xn(h, t, o) * h % o, u = xn(f, e, o) * f % o, d = xn(u, i, o) * u % o, p = xn(d, r, o) * d % o, y = xn(p, r, o) * d % o, g = xn(y, t, o) * h % o;
2189
- return { pow_p_5_8: xn(g, jl, o) * n % o, b2: a };
2188
+ const t = BigInt(10), e = BigInt(20), i = BigInt(40), r = BigInt(80), o = Br, a = n * n % o * n % o, l = bn(a, jl, o) * a % o, c = bn(l, Cr, o) * n % o, h = bn(c, Kg, o) * c % o, f = bn(h, t, o) * h % o, u = bn(f, e, o) * f % o, d = bn(u, i, o) * u % o, p = bn(d, r, o) * d % o, y = bn(p, r, o) * d % o, g = bn(y, t, o) * h % o;
2189
+ return { pow_p_5_8: bn(g, jl, o) * n % o, b2: a };
2190
2190
  }
2191
2191
  function t0(n) {
2192
2192
  return n[0] &= 248, n[31] &= 127, n[31] |= 64, n;
@@ -2574,7 +2574,7 @@ function w0(n) {
2574
2574
  }
2575
2575
  let Bo = {};
2576
2576
  function nh(n) {
2577
- Bo = le(Bo, n);
2577
+ Bo = ue(Bo, n);
2578
2578
  }
2579
2579
  function k0() {
2580
2580
  return Bo;
@@ -2593,8 +2593,8 @@ const jn = class jn {
2593
2593
  * directly still wins over it.
2594
2594
  */
2595
2595
  mergeWithDefaults(t, e) {
2596
- return le(
2597
- le({}, Fs),
2596
+ return ue(
2597
+ ue({}, Fs),
2598
2598
  Bo,
2599
2599
  e ?? {},
2600
2600
  t
@@ -2603,7 +2603,7 @@ const jn = class jn {
2603
2603
  normalize(t) {
2604
2604
  var c, h, f;
2605
2605
  const e = { ...t };
2606
- e.xAxis && !Array.isArray(e.xAxis) && (e.xAxis = [e.xAxis]), e.yAxis && !Array.isArray(e.yAxis) && (e.yAxis = [e.yAxis]), e.colorAxis && !Array.isArray(e.colorAxis) && (e.colorAxis = [e.colorAxis]), (!e.xAxis || Array.isArray(e.xAxis) && e.xAxis.length === 0) && (e.xAxis = [le({}, Fs.xAxis)]), (!e.yAxis || Array.isArray(e.yAxis) && e.yAxis.length === 0) && (e.yAxis = [le({}, Fs.yAxis)]);
2606
+ e.xAxis && !Array.isArray(e.xAxis) && (e.xAxis = [e.xAxis]), e.yAxis && !Array.isArray(e.yAxis) && (e.yAxis = [e.yAxis]), e.colorAxis && !Array.isArray(e.colorAxis) && (e.colorAxis = [e.colorAxis]), (!e.xAxis || Array.isArray(e.xAxis) && e.xAxis.length === 0) && (e.xAxis = [ue({}, Fs.xAxis)]), (!e.yAxis || Array.isArray(e.yAxis) && e.yAxis.length === 0) && (e.yAxis = [ue({}, Fs.yAxis)]);
2607
2607
  for (const u of [e.xAxis, e.yAxis])
2608
2608
  if (Array.isArray(u))
2609
2609
  for (const d of u)
@@ -2693,7 +2693,7 @@ const jn = class jn {
2693
2693
  const i = Array.isArray(t) ? t : [t], r = Array.isArray(e) ? e : [e], o = Math.max(i.length, r.length), s = [];
2694
2694
  for (let a = 0; a < o; a++) {
2695
2695
  const l = i[a] ?? i[0] ?? {}, c = r[a] ?? r[0] ?? {};
2696
- s.push(le({}, l, c));
2696
+ s.push(ue({}, l, c));
2697
2697
  }
2698
2698
  return s.length === 1 && !Array.isArray(t) && !Array.isArray(e) ? s[0] : s;
2699
2699
  }
@@ -2703,7 +2703,7 @@ const jn = class jn {
2703
2703
  const o = i.series || {}, s = i[r.type] || {}, a = r._polarSubType, l = a ? i[a] || {} : {}, c = jn.mergeDataLabels(
2704
2704
  [o, l, s, r].map((h) => h.dataLabels)
2705
2705
  );
2706
- r = le({}, o, l, s, r), c !== void 0 && (r.dataLabels = c);
2706
+ r = ue({}, o, l, s, r), c !== void 0 && (r.dataLabels = c);
2707
2707
  }
2708
2708
  if (Array.isArray(r.data)) {
2709
2709
  const o = r.turboThreshold ?? 1e3;
@@ -3570,7 +3570,7 @@ class ry {
3570
3570
  return this.config;
3571
3571
  }
3572
3572
  updateConfig(t) {
3573
- this.config = le(this.config, t), this.events.emit("state:configChanged", this.config);
3573
+ this.config = ue(this.config, t), this.events.emit("state:configChanged", this.config);
3574
3574
  }
3575
3575
  getSeries() {
3576
3576
  return this.config.series;
@@ -3590,7 +3590,7 @@ class ry {
3590
3590
  }
3591
3591
  updateSeries(t, e) {
3592
3592
  const i = this.config.series[t];
3593
- i && (this.config.series[t] = le(i, e), this.events.emit("state:seriesUpdated", this.config.series[t], t));
3593
+ i && (this.config.series[t] = ue(i, e), this.events.emit("state:seriesUpdated", this.config.series[t], t));
3594
3594
  }
3595
3595
  getXAxes() {
3596
3596
  return this.config.xAxis;
@@ -3600,7 +3600,7 @@ class ry {
3600
3600
  }
3601
3601
  updateAxis(t, e, i) {
3602
3602
  const r = t ? this.config.xAxis : this.config.yAxis;
3603
- r[e] && (r[e] = le(r[e], i), this.events.emit("state:axisUpdated", { isX: t, index: e, config: r[e] }));
3603
+ r[e] && (r[e] = ue(r[e], i), this.events.emit("state:axisUpdated", { isX: t, index: e, config: r[e] }));
3604
3604
  }
3605
3605
  }
3606
3606
  class oy {
@@ -3699,7 +3699,7 @@ class cy {
3699
3699
  left: a[3] ?? 10
3700
3700
  };
3701
3701
  }
3702
- const i = e.spacing || [10, 10, 15, 10], o = ((s = t.exporting) == null ? void 0 : s.enabled) !== !1 ? 40 : i[1] ?? 10;
3702
+ const i = e.spacing || [10, 10, 15, 10], o = ((s = t.exporting) == null ? void 0 : s.enabled) !== !1 && !this.isNonCartesian(t) ? 40 : i[1] ?? 10;
3703
3703
  return {
3704
3704
  top: e.marginTop ?? e.spacingTop ?? i[0],
3705
3705
  right: e.marginRight ?? e.spacingRight ?? o,
@@ -5155,7 +5155,7 @@ function Ex(n) {
5155
5155
  }
5156
5156
  };
5157
5157
  }
5158
- var wh = { "-": "", _: " ", 0: "0" }, ue = /^\s*\d+/, Tx = /^%/, $x = /[\\^$*+?|[\]().{}]/g;
5158
+ var wh = { "-": "", _: " ", 0: "0" }, de = /^\s*\d+/, Tx = /^%/, $x = /[\\^$*+?|[\]().{}]/g;
5159
5159
  function Yt(n, t, e) {
5160
5160
  var i = n < 0 ? "-" : "", r = (i ? -n : n) + "", o = r.length;
5161
5161
  return i + (o < e ? new Array(e - o + 1).join(t) + r : r);
@@ -5170,31 +5170,31 @@ function hr(n) {
5170
5170
  return new Map(n.map((t, e) => [t.toLowerCase(), e]));
5171
5171
  }
5172
5172
  function Ix(n, t, e) {
5173
- var i = ue.exec(t.slice(e, e + 1));
5173
+ var i = de.exec(t.slice(e, e + 1));
5174
5174
  return i ? (n.w = +i[0], e + i[0].length) : -1;
5175
5175
  }
5176
5176
  function Fx(n, t, e) {
5177
- var i = ue.exec(t.slice(e, e + 1));
5177
+ var i = de.exec(t.slice(e, e + 1));
5178
5178
  return i ? (n.u = +i[0], e + i[0].length) : -1;
5179
5179
  }
5180
5180
  function Rx(n, t, e) {
5181
- var i = ue.exec(t.slice(e, e + 2));
5181
+ var i = de.exec(t.slice(e, e + 2));
5182
5182
  return i ? (n.U = +i[0], e + i[0].length) : -1;
5183
5183
  }
5184
5184
  function Dx(n, t, e) {
5185
- var i = ue.exec(t.slice(e, e + 2));
5185
+ var i = de.exec(t.slice(e, e + 2));
5186
5186
  return i ? (n.V = +i[0], e + i[0].length) : -1;
5187
5187
  }
5188
5188
  function zx(n, t, e) {
5189
- var i = ue.exec(t.slice(e, e + 2));
5189
+ var i = de.exec(t.slice(e, e + 2));
5190
5190
  return i ? (n.W = +i[0], e + i[0].length) : -1;
5191
5191
  }
5192
5192
  function kh(n, t, e) {
5193
- var i = ue.exec(t.slice(e, e + 4));
5193
+ var i = de.exec(t.slice(e, e + 4));
5194
5194
  return i ? (n.y = +i[0], e + i[0].length) : -1;
5195
5195
  }
5196
5196
  function Mh(n, t, e) {
5197
- var i = ue.exec(t.slice(e, e + 2));
5197
+ var i = de.exec(t.slice(e, e + 2));
5198
5198
  return i ? (n.y = +i[0] + (+i[0] > 68 ? 1900 : 2e3), e + i[0].length) : -1;
5199
5199
  }
5200
5200
  function Bx(n, t, e) {
@@ -5202,39 +5202,39 @@ function Bx(n, t, e) {
5202
5202
  return i ? (n.Z = i[1] ? 0 : -(i[2] + (i[3] || "00")), e + i[0].length) : -1;
5203
5203
  }
5204
5204
  function Ox(n, t, e) {
5205
- var i = ue.exec(t.slice(e, e + 1));
5205
+ var i = de.exec(t.slice(e, e + 1));
5206
5206
  return i ? (n.q = i[0] * 3 - 3, e + i[0].length) : -1;
5207
5207
  }
5208
5208
  function Nx(n, t, e) {
5209
- var i = ue.exec(t.slice(e, e + 2));
5209
+ var i = de.exec(t.slice(e, e + 2));
5210
5210
  return i ? (n.m = i[0] - 1, e + i[0].length) : -1;
5211
5211
  }
5212
5212
  function Ah(n, t, e) {
5213
- var i = ue.exec(t.slice(e, e + 2));
5213
+ var i = de.exec(t.slice(e, e + 2));
5214
5214
  return i ? (n.d = +i[0], e + i[0].length) : -1;
5215
5215
  }
5216
5216
  function Wx(n, t, e) {
5217
- var i = ue.exec(t.slice(e, e + 3));
5217
+ var i = de.exec(t.slice(e, e + 3));
5218
5218
  return i ? (n.m = 0, n.d = +i[0], e + i[0].length) : -1;
5219
5219
  }
5220
5220
  function Sh(n, t, e) {
5221
- var i = ue.exec(t.slice(e, e + 2));
5221
+ var i = de.exec(t.slice(e, e + 2));
5222
5222
  return i ? (n.H = +i[0], e + i[0].length) : -1;
5223
5223
  }
5224
5224
  function Hx(n, t, e) {
5225
- var i = ue.exec(t.slice(e, e + 2));
5225
+ var i = de.exec(t.slice(e, e + 2));
5226
5226
  return i ? (n.M = +i[0], e + i[0].length) : -1;
5227
5227
  }
5228
5228
  function Vx(n, t, e) {
5229
- var i = ue.exec(t.slice(e, e + 2));
5229
+ var i = de.exec(t.slice(e, e + 2));
5230
5230
  return i ? (n.S = +i[0], e + i[0].length) : -1;
5231
5231
  }
5232
5232
  function Gx(n, t, e) {
5233
- var i = ue.exec(t.slice(e, e + 3));
5233
+ var i = de.exec(t.slice(e, e + 3));
5234
5234
  return i ? (n.L = +i[0], e + i[0].length) : -1;
5235
5235
  }
5236
5236
  function Yx(n, t, e) {
5237
- var i = ue.exec(t.slice(e, e + 6));
5237
+ var i = de.exec(t.slice(e, e + 6));
5238
5238
  return i ? (n.L = Math.floor(i[0] / 1e3), e + i[0].length) : -1;
5239
5239
  }
5240
5240
  function Xx(n, t, e) {
@@ -5242,11 +5242,11 @@ function Xx(n, t, e) {
5242
5242
  return i ? e + i[0].length : -1;
5243
5243
  }
5244
5244
  function Ux(n, t, e) {
5245
- var i = ue.exec(t.slice(e));
5245
+ var i = de.exec(t.slice(e));
5246
5246
  return i ? (n.Q = +i[0], e + i[0].length) : -1;
5247
5247
  }
5248
5248
  function qx(n, t, e) {
5249
- var i = ue.exec(t.slice(e));
5249
+ var i = de.exec(t.slice(e));
5250
5250
  return i ? (n.s = +i[0], e + i[0].length) : -1;
5251
5251
  }
5252
5252
  function _h(n, t) {
@@ -5682,7 +5682,7 @@ function Nc(n, t) {
5682
5682
  if (e.state > ld) throw new Error("too late; already scheduled");
5683
5683
  return e;
5684
5684
  }
5685
- function Mn(n, t) {
5685
+ function An(n, t) {
5686
5686
  var e = gn(n, t);
5687
5687
  if (e.state > Mo) throw new Error("too late; already running");
5688
5688
  return e;
@@ -5747,7 +5747,7 @@ function J1(n) {
5747
5747
  function Q1(n, t) {
5748
5748
  var e, i;
5749
5749
  return function() {
5750
- var r = Mn(this, n), o = r.tween;
5750
+ var r = An(this, n), o = r.tween;
5751
5751
  if (o !== e) {
5752
5752
  i = e = o;
5753
5753
  for (var s = 0, a = i.length; s < a; ++s)
@@ -5763,7 +5763,7 @@ function tb(n, t, e) {
5763
5763
  var i, r;
5764
5764
  if (typeof e != "function") throw new Error();
5765
5765
  return function() {
5766
- var o = Mn(this, n), s = o.tween;
5766
+ var o = An(this, n), s = o.tween;
5767
5767
  if (s !== i) {
5768
5768
  r = (i = s).slice();
5769
5769
  for (var a = { name: t, value: e }, l = 0, c = r.length; l < c; ++l)
@@ -5789,7 +5789,7 @@ function eb(n, t) {
5789
5789
  function Wc(n, t, e) {
5790
5790
  var i = n._id;
5791
5791
  return n.each(function() {
5792
- var r = Mn(this, i);
5792
+ var r = An(this, i);
5793
5793
  (r.value || (r.value = {}))[t] = e.apply(this, arguments);
5794
5794
  }), function(r) {
5795
5795
  return gn(r, i).value[t];
@@ -5891,12 +5891,12 @@ function mb(n) {
5891
5891
  }
5892
5892
  function yb(n, t) {
5893
5893
  return function() {
5894
- Mn(this, n).duration = +t.apply(this, arguments);
5894
+ An(this, n).duration = +t.apply(this, arguments);
5895
5895
  };
5896
5896
  }
5897
5897
  function xb(n, t) {
5898
5898
  return t = +t, function() {
5899
- Mn(this, n).duration = t;
5899
+ An(this, n).duration = t;
5900
5900
  };
5901
5901
  }
5902
5902
  function bb(n) {
@@ -5906,7 +5906,7 @@ function bb(n) {
5906
5906
  function vb(n, t) {
5907
5907
  if (typeof t != "function") throw new Error();
5908
5908
  return function() {
5909
- Mn(this, n).ease = t;
5909
+ An(this, n).ease = t;
5910
5910
  };
5911
5911
  }
5912
5912
  function wb(n) {
@@ -5917,7 +5917,7 @@ function kb(n, t) {
5917
5917
  return function() {
5918
5918
  var e = t.apply(this, arguments);
5919
5919
  if (typeof e != "function") throw new Error();
5920
- Mn(this, n).ease = e;
5920
+ An(this, n).ease = e;
5921
5921
  };
5922
5922
  }
5923
5923
  function Mb(n) {
@@ -5947,7 +5947,7 @@ function _b(n) {
5947
5947
  });
5948
5948
  }
5949
5949
  function Cb(n, t, e) {
5950
- var i, r, o = _b(t) ? Nc : Mn;
5950
+ var i, r, o = _b(t) ? Nc : An;
5951
5951
  return function() {
5952
5952
  var s = o(this, n), a = s.on;
5953
5953
  a !== i && (r = (i = a).copy()).on(t, e), s.on = r;
@@ -6020,7 +6020,7 @@ function zb(n, t, e) {
6020
6020
  function Bb(n, t) {
6021
6021
  var e, i, r, o = "style." + t, s = "end." + o, a;
6022
6022
  return function() {
6023
- var l = Mn(this, n), c = l.on, h = l.value[o] == null ? a || (a = ud(t)) : void 0;
6023
+ var l = An(this, n), c = l.on, h = l.value[o] == null ? a || (a = ud(t)) : void 0;
6024
6024
  (c !== e || r !== h) && (i = (e = c).copy()).on(s, r = h), l.on = i;
6025
6025
  };
6026
6026
  }
@@ -6103,7 +6103,7 @@ function Zb() {
6103
6103
  --r === 0 && o();
6104
6104
  } };
6105
6105
  e.each(function() {
6106
- var c = Mn(this, i), h = c.on;
6106
+ var c = An(this, i), h = c.on;
6107
6107
  h !== n && (t = (n = h).copy(), t._.cancel.push(a), t._.interrupt.push(a), t._.end.push(l)), c.on = t;
6108
6108
  }), r === 0 && o();
6109
6109
  });
@@ -6294,7 +6294,7 @@ function pd(n, t = "#333") {
6294
6294
  return uv.test(e) ? e : t;
6295
6295
  }
6296
6296
  const fv = /<\/?[^>]+(>|$)/g, dv = /<br\s*\/?>/gi;
6297
- function he(n) {
6297
+ function fe(n) {
6298
6298
  return n.replace(dv, " ").replace(fv, "").trim();
6299
6299
  }
6300
6300
  function Zs(n, t) {
@@ -6885,7 +6885,7 @@ class Gc {
6885
6885
  x: l.x,
6886
6886
  y: l.y,
6887
6887
  percentage: l.percentage
6888
- }) : i.format ? h = he(Kt(i.format, {
6888
+ }) : i.format ? h = fe(Kt(i.format, {
6889
6889
  point: l,
6890
6890
  series: { name: s },
6891
6891
  x: l.x,
@@ -7343,7 +7343,7 @@ class Yc {
7343
7343
  index: t.config.index,
7344
7344
  legendIndex: t.config.legendIndex
7345
7345
  };
7346
- i = he(Kt(this.config.labelFormat, o));
7346
+ i = fe(Kt(this.config.labelFormat, o));
7347
7347
  } else
7348
7348
  i = t.config.name || `Series ${t.config.index + 1}`;
7349
7349
  if (this.config.valueSuffix && (i += ` ${this.config.valueSuffix}`), this.config.valueDecimals !== void 0 && this.config.valueDecimals >= 0) {
@@ -7426,7 +7426,7 @@ class Yc {
7426
7426
  const st = ot.series, wt = ot.color, Ct = ot.isLine, kt = ot.label;
7427
7427
  let _t, Vt;
7428
7428
  if (P) {
7429
- const Tt = q % S, Zt = Math.floor(q / S), ge = S * w, Ve = Math.max(0, (L - ge) / 2);
7429
+ const Tt = q % S, Zt = Math.floor(q / S), ce = S * w, Ve = Math.max(0, (L - ce) / 2);
7430
7430
  _t = o + Ve + Tt * w, Vt = C + Zt * _ + d;
7431
7431
  } else if (r === "horizontal") {
7432
7432
  const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Zt = s + l + Tt;
@@ -7439,19 +7439,19 @@ class Yc {
7439
7439
  if (Ct)
7440
7440
  Nt.append("line").attr("x1", 0).attr("x2", s).attr("y1", 6).attr("y2", 6).attr("stroke", wt).attr("stroke-width", 2), Nt.append("circle").attr("cx", s / 2).attr("cy", 6).attr("r", 3).attr("fill", wt);
7441
7441
  else if (Ot) {
7442
- const Tt = s / 2, Zt = a / 2, ge = Math.min(s, a) / 2;
7443
- Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r", ge).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${Zt} L ${Tt} ${a} L 0 ${Zt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${Tt} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Zt} L ${s} ${Zt} M ${Tt} 0 L ${Tt} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r", ge).attr("fill", wt);
7442
+ const Tt = s / 2, Zt = a / 2, ce = Math.min(s, a) / 2;
7443
+ Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r", ce).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${Zt} L ${Tt} ${a} L 0 ${Zt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${Tt} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Zt} L ${s} ${Zt} M ${Tt} 0 L ${Tt} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r", ce).attr("fill", wt);
7444
7444
  } else h ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("rx", c).attr("fill", wt) : Nt.append("circle").attr("cx", s / 2).attr("cy", a / 2).attr("r", Math.min(s, a) / 2).attr("fill", wt);
7445
7445
  const jt = Nt.append("text").attr("x", s + l).attr("y", 10).attr("fill", st.visible ? u.color || this.autoText() : ((ee = this.config.itemHiddenStyle) == null ? void 0 : ee.color) || "#cccccc").attr("font-size", v).attr("font-weight", u.fontWeight || "normal").text(kt);
7446
7446
  this.config.rtl && (jt.attr("text-anchor", "end").attr("x", -l), Nt.select("rect, circle, line").attr("transform", `translate(${-(s + l)}, 0)`)), Nt.on("click", () => {
7447
- var ge, Ve, fe;
7447
+ var ce, Ve, le;
7448
7448
  const Tt = this.config.events;
7449
7449
  if (Tt != null && Tt.itemClick && Tt.itemClick.call(st, new Event("legendItemClick")) === !1)
7450
7450
  return;
7451
7451
  st.toggleVisible(), jt.attr(
7452
7452
  "fill",
7453
- st.visible ? u.color || this.autoText() : ((ge = this.config.itemHiddenStyle) == null ? void 0 : ge.color) || "#cccccc"
7454
- ), ((fe = (Ve = st.config.events) == null ? void 0 : Ve.legendItemClick) == null ? void 0 : fe.call(st, new Event("legendItemClick"))) !== !1 && this.events.emit("legend:itemClick", st, q);
7453
+ st.visible ? u.color || this.autoText() : ((ce = this.config.itemHiddenStyle) == null ? void 0 : ce.color) || "#cccccc"
7454
+ ), ((le = (Ve = st.config.events) == null ? void 0 : Ve.legendItemClick) == null ? void 0 : le.call(st, new Event("legendItemClick"))) !== !1 && this.events.emit("legend:itemClick", st, q);
7455
7455
  }), Nt.on("mouseover", () => {
7456
7456
  var Tt;
7457
7457
  jt.attr("fill", ((Tt = this.config.itemHoverStyle) == null ? void 0 : Tt.color) || this.autoText()), this.events.emit("legend:itemHover", st);
@@ -7575,7 +7575,7 @@ class Yc {
7575
7575
  const I = m - 2 * $.radius;
7576
7576
  y.append("circle").attr("cx", g).attr("cy", m - $.radius).attr("r", $.radius).attr("fill", h).attr("stroke", l).attr("stroke-width", c), y.append("line").attr("x1", g).attr("y1", I).attr("x2", x).attr("y2", I).attr("stroke", f).attr("stroke-width", u).attr("stroke-dasharray", "2,2");
7577
7577
  let E;
7578
- (L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: $.value }) : (_ = r.labels) != null && _.format ? E = he(Kt(r.labels.format, { value: $.value })) : E = String($.value), y.append("text").attr("x", x + 4).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", p).text(E), v = Math.max(v, this.estimateTextWidth(E, a));
7578
+ (L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: $.value }) : (_ = r.labels) != null && _.format ? E = fe(Kt(r.labels.format, { value: $.value })) : E = String($.value), y.append("text").attr("x", x + 4).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", p).text(E), v = Math.max(v, this.estimateTextWidth(E, a));
7579
7579
  }
7580
7580
  return {
7581
7581
  width: 2 * s + d + v + 8,
@@ -7594,7 +7594,7 @@ class Yc {
7594
7594
  if (!(s > 0)) return { width: 0, height: 0 };
7595
7595
  const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) || Pe, d = r.connectorDistance ?? 8, p = ($) => {
7596
7596
  var I, E;
7597
- return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: $ }) : (E = r.labels) != null && E.format ? he(Kt(r.labels.format, { value: $ })) : String($);
7597
+ return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: $ }) : (E = r.labels) != null && E.format ? fe(Kt(r.labels.format, { value: $ })) : String($);
7598
7598
  }, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = ($, I, E) => y.append("circle").attr("cx", $).attr("cy", I).attr("r", E).attr("fill", f).attr("stroke", c).attr("stroke-width", h);
7599
7599
  if (this.config.layout === "horizontal") {
7600
7600
  const $ = l + 6, I = i + $ + 2 * s;
@@ -10210,7 +10210,7 @@ function Rt(n) {
10210
10210
  return n;
10211
10211
  };
10212
10212
  }
10213
- const tu = Math.abs, we = Math.atan2, ei = Math.cos, r2 = Math.max, oa = Math.min, bn = Math.sin, Fe = Math.sqrt, ke = 1e-12, Xi = Math.PI, Zo = Xi / 2, Pr = 2 * Xi;
10213
+ const tu = Math.abs, we = Math.atan2, ei = Math.cos, r2 = Math.max, oa = Math.min, vn = Math.sin, Fe = Math.sqrt, ke = 1e-12, Xi = Math.PI, Zo = Xi / 2, Pr = 2 * Xi;
10214
10214
  function o2(n) {
10215
10215
  return n > 1 ? 0 : n < -1 ? Xi : Math.acos(n);
10216
10216
  }
@@ -10329,19 +10329,19 @@ function Ae() {
10329
10329
  var h, f, u = +n.apply(this, arguments), d = +t.apply(this, arguments), p = r.apply(this, arguments) - Zo, y = o.apply(this, arguments) - Zo, g = tu(y - p), m = y > p;
10330
10330
  if (a || (a = h = l()), d < u && (f = d, d = u, u = f), !(d > ke)) a.moveTo(0, 0);
10331
10331
  else if (g > Pr - ke)
10332
- a.moveTo(d * ei(p), d * bn(p)), a.arc(0, 0, d, p, y, !m), u > ke && (a.moveTo(u * ei(y), u * bn(y)), a.arc(0, 0, u, y, p, m));
10332
+ a.moveTo(d * ei(p), d * vn(p)), a.arc(0, 0, d, p, y, !m), u > ke && (a.moveTo(u * ei(y), u * vn(y)), a.arc(0, 0, u, y, p, m));
10333
10333
  else {
10334
10334
  var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > ke && (i ? +i.apply(this, arguments) : Fe(u * u + d * d)), $ = oa(tu(d - u) / 2, +e.apply(this, arguments)), I = $, E = $, P, S;
10335
10335
  if (_ > ke) {
10336
- var w = eu(_ / u * bn(L)), A = eu(_ / d * bn(L));
10336
+ var w = eu(_ / u * vn(L)), A = eu(_ / d * vn(L));
10337
10337
  (M -= w * 2) > ke ? (w *= m ? 1 : -1, b += w, k -= w) : (M = 0, b = k = (p + y) / 2), (C -= A * 2) > ke ? (A *= m ? 1 : -1, x += A, v -= A) : (C = 0, x = v = (p + y) / 2);
10338
10338
  }
10339
- var T = d * ei(x), R = d * bn(x), F = u * ei(k), D = u * bn(k);
10339
+ var T = d * ei(x), R = d * vn(x), F = u * ei(k), D = u * vn(k);
10340
10340
  if ($ > ke) {
10341
- var z = d * ei(v), B = d * bn(v), H = u * ei(b), J = u * bn(b), X;
10341
+ var z = d * ei(v), B = d * vn(v), H = u * ei(b), J = u * vn(b), X;
10342
10342
  if (g < Xi)
10343
10343
  if (X = p2(T, R, H, J, z, B, F, D)) {
10344
- var j = T - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / bn(o2((j * U + W * G) / (Fe(j * j + W * W) * Fe(U * U + G * G))) / 2), Y = Fe(X[0] * X[0] + X[1] * X[1]);
10344
+ var j = T - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(o2((j * U + W * G) / (Fe(j * j + W * W) * Fe(U * U + G * G))) / 2), Y = Fe(X[0] * X[0] + X[1] * X[1]);
10345
10345
  I = oa($, (u - Y) / (N - 1)), E = oa($, (d - Y) / (N + 1));
10346
10346
  } else
10347
10347
  I = E = 0;
@@ -10352,7 +10352,7 @@ function Ae() {
10352
10352
  }
10353
10353
  return c.centroid = function() {
10354
10354
  var h = (+n.apply(this, arguments) + +t.apply(this, arguments)) / 2, f = (+r.apply(this, arguments) + +o.apply(this, arguments)) / 2 - Xi / 2;
10355
- return [ei(f) * h, bn(f) * h];
10355
+ return [ei(f) * h, vn(f) * h];
10356
10356
  }, c.innerRadius = function(h) {
10357
10357
  return arguments.length ? (n = typeof h == "function" ? h : Rt(+h), c) : n;
10358
10358
  }, c.outerRadius = function(h) {
@@ -11335,7 +11335,7 @@ class D2 {
11335
11335
  this.updateAxesDomains(), this.updateTooltipCategories(), this.renderAxes(), this.renderSeriesInstances(), this.renderStackLabels(), this.raiseplotLineLabels(), this.renderLegend(), this.fireEvent("render");
11336
11336
  }
11337
11337
  formatStackLabel(t, e) {
11338
- return e.formatter ? e.formatter.call({ total: t }) : e.format ? he(Kt(e.format, { total: t })) : this.options.chart.numberFormatter ? this.options.chart.numberFormatter(t) : Ms(t, 0, ".", ",");
11338
+ return e.formatter ? e.formatter.call({ total: t }) : e.format ? fe(Kt(e.format, { total: t })) : this.options.chart.numberFormatter ? this.options.chart.numberFormatter(t) : Ms(t, 0, ".", ",");
11339
11339
  }
11340
11340
  renderStackLabels() {
11341
11341
  if (this.stackLabelsGroup) {
@@ -11540,7 +11540,7 @@ class D2 {
11540
11540
  const e = this.responsiveEngine.getRules();
11541
11541
  let i = to(this.originalUserOptions);
11542
11542
  for (const o of t.matchingIndices)
11543
- i = le(i, e[o].chartOptions);
11543
+ i = ue(i, e[o].chartOptions);
11544
11544
  const r = new li();
11545
11545
  this.options = r.parse(i), this.state.updateConfig(this.options);
11546
11546
  }
@@ -11582,11 +11582,11 @@ class D2 {
11582
11582
  }
11583
11583
  update(t, e = !0) {
11584
11584
  var a;
11585
- this.isResponsiveUpdate || (this.originalUserOptions = le(
11585
+ this.isResponsiveUpdate || (this.originalUserOptions = ue(
11586
11586
  to(this.originalUserOptions),
11587
11587
  t
11588
11588
  ));
11589
- const i = new li(), r = le(this.optionsToExternal(), t);
11589
+ const i = new li(), r = ue(this.optionsToExternal(), t);
11590
11590
  (a = t.chart) != null && a.type && Array.isArray(r.series) && r.series.forEach((l, c) => {
11591
11591
  var f, u;
11592
11592
  const h = Array.isArray(t.series) ? (f = t.series[c]) == null ? void 0 : f.type : void 0;
@@ -11657,7 +11657,7 @@ class D2 {
11657
11657
  const s = this.responsiveEngine.getRules();
11658
11658
  let a = to(this.originalUserOptions);
11659
11659
  for (const l of o.matchingIndices)
11660
- a = le(a, s[l].chartOptions);
11660
+ a = ue(a, s[l].chartOptions);
11661
11661
  this.isResponsiveUpdate = !0, this.update(a, !1), this.isResponsiveUpdate = !1;
11662
11662
  }
11663
11663
  }
@@ -11690,7 +11690,7 @@ class D2 {
11690
11690
  this.setSize(r, o), this.createFixedAxisOverlay();
11691
11691
  }
11692
11692
  setTitle(t, e) {
11693
- t && (this.options.title = le(this.options.title, t), this.originalUserOptions.title = le(this.originalUserOptions.title || {}, t)), e && (this.options.subtitle = le(this.options.subtitle, e), this.originalUserOptions.subtitle = le(this.originalUserOptions.subtitle || {}, e)), this.renderTitles();
11693
+ t && (this.options.title = ue(this.options.title, t), this.originalUserOptions.title = ue(this.originalUserOptions.title || {}, t)), e && (this.options.subtitle = ue(this.options.subtitle, e), this.originalUserOptions.subtitle = ue(this.originalUserOptions.subtitle || {}, e)), this.renderTitles();
11694
11694
  }
11695
11695
  addAxis(t, e = !0, i = !0) {
11696
11696
  const r = e ? this.options.xAxis : this.options.yAxis, o = { ...t, index: r.length, isX: e };
@@ -12056,7 +12056,7 @@ class Xt {
12056
12056
  x: s.x ?? a,
12057
12057
  y: s.y,
12058
12058
  percentage: s._percentage
12059
- }) : c.format ? h = he(Kt(c.format, {
12059
+ }) : c.format ? h = fe(Kt(c.format, {
12060
12060
  point: s,
12061
12061
  series: { name: this.config.name ?? "" },
12062
12062
  x: s.x,
@@ -13348,12 +13348,12 @@ class au extends Xt {
13348
13348
  const wt = rt(this), Ct = T.indexOf(st);
13349
13349
  W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Ct, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (jt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || jt.call(st.data, q);
13350
13350
  }).on("click", function(q, st) {
13351
- var Ct, kt, _t, Vt, Nt, Ot, jt, ee, Tt, Zt, ge, Ve, fe, Sn;
13351
+ var Ct, kt, _t, Vt, Nt, Ot, jt, ee, Tt, Zt, ce, Ve, le, mn;
13352
13352
  const wt = T.indexOf(st);
13353
13353
  D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Ct = st.data.events) == null ? void 0 : Ct.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (jt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || jt.call(st.data, q), (Zt = (Tt = (ee = W.config.point) == null ? void 0 : ee.events) == null ? void 0 : Tt.select) == null || Zt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(De, ze) {
13354
13354
  const Ze = rt(this);
13355
13355
  W.selectedIndices.has(ze) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(De, ze)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
13356
- })), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (ge = st.data.events) == null ? void 0 : ge.click) == null || Ve.call(st.data, q), (Sn = (fe = W.config.events) == null ? void 0 : fe.click) == null || Sn.call(W, q);
13356
+ })), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (ce = st.data.events) == null ? void 0 : ce.click) == null || Ve.call(st.data, q), (mn = (le = W.config.events) == null ? void 0 : le.click) == null || mn.call(W, q);
13357
13357
  });
13358
13358
  for (const q of this.dataLabelConfigs())
13359
13359
  this.renderPieLabels(F, T, S, k, _ - L, q);
@@ -13382,7 +13382,7 @@ class au extends Xt {
13382
13382
  series: { name: this.config.name }
13383
13383
  }) : F = $.data.name || String($.data.y);
13384
13384
  const B = /(?:^|[\s;"'])color\s*:\s*([^;"'>]+)/i.exec(F);
13385
- B && (D = pd(B[1], w)), F = he(F), k.push({ lx: T, ly: R, text: F, midAngle: S, centroid: P, percentage: E, data: $.data, visible: !0, color: w, inlineColor: D });
13385
+ B && (D = pd(B[1], w)), F = fe(F), k.push({ lx: T, ly: R, text: F, midAngle: S, centroid: P, percentage: E, data: $.data, visible: !0, color: w, inlineColor: D });
13386
13386
  }), !x && !s.allowOverlap) {
13387
13387
  const $ = k.filter((P) => P.midAngle < Math.PI), I = k.filter((P) => P.midAngle >= Math.PI);
13388
13388
  this.distribute($, b, h, c, y), this.distribute(I, b, h, c, y);
@@ -13534,7 +13534,7 @@ class Bd extends Xt {
13534
13534
  series: { name: this.config.name },
13535
13535
  x: g.x,
13536
13536
  y: g.y
13537
- }) : P.format ? A = he(Kt(P.format, {
13537
+ }) : P.format ? A = fe(Kt(P.format, {
13538
13538
  point: g,
13539
13539
  series: { name: this.config.name }
13540
13540
  })) : A = g.name || String(g.y), this.group.append("text").attr("class", "katucharts-funnel-label").attr("x", l + (P.x ?? 0)).attr("y", M + s / 2 + (P.y ?? 0)).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-size", S).attr("fill", w).style("pointer-events", "none").text(A);
@@ -13839,7 +13839,7 @@ class yw extends Xt {
13839
13839
  series: { name: this.config.name },
13840
13840
  x: d.x,
13841
13841
  y: d.y
13842
- }) : a.format ? he(Kt(a.format, {
13842
+ }) : a.format ? fe(Kt(a.format, {
13843
13843
  point: { ...d, value: p },
13844
13844
  series: { name: this.config.name },
13845
13845
  x: d.x,
@@ -14526,10 +14526,10 @@ function lk(n, t, e) {
14526
14526
  let a = 0, l;
14527
14527
  for (; (l = s.exec(r)) !== null; ) {
14528
14528
  if (l.index > a) {
14529
- const d = he(r.slice(a, l.index));
14529
+ const d = fe(r.slice(a, l.index));
14530
14530
  d && o.push({ text: d, fontSize: t, fontWeight: e });
14531
14531
  }
14532
- const c = l[1] || "", h = c.match(/font-size\s*:\s*([^;"]+)/i), f = c.match(/font-weight\s*:\s*([^;"]+)/i), u = he(l[2]);
14532
+ const c = l[1] || "", h = c.match(/font-size\s*:\s*([^;"]+)/i), f = c.match(/font-weight\s*:\s*([^;"]+)/i), u = fe(l[2]);
14533
14533
  u && o.push({
14534
14534
  text: u,
14535
14535
  fontSize: h ? h[1].trim() : t,
@@ -14537,7 +14537,7 @@ function lk(n, t, e) {
14537
14537
  }), a = l.index + l[0].length;
14538
14538
  }
14539
14539
  if (a < r.length) {
14540
- const c = he(r.slice(a));
14540
+ const c = fe(r.slice(a));
14541
14541
  c && o.push({ text: c, fontSize: t, fontWeight: e });
14542
14542
  }
14543
14543
  return o;
@@ -15152,7 +15152,7 @@ class dk extends Xt {
15152
15152
  series: { name: this.config.name },
15153
15153
  x: (f = this.data[0]) == null ? void 0 : f.x,
15154
15154
  y: i
15155
- }) : r.format ? l = he(Kt(r.format, {
15155
+ }) : r.format ? l = fe(Kt(r.format, {
15156
15156
  point: this.data[0],
15157
15157
  series: { name: this.config.name },
15158
15158
  x: (u = this.data[0]) == null ? void 0 : u.x,
@@ -15325,7 +15325,7 @@ class pk extends Xt {
15325
15325
  series: { name: this.config.name },
15326
15326
  x: (h = this.data[0]) == null ? void 0 : h.x,
15327
15327
  y: e
15328
- }) : i.format ? a = he(Kt(i.format, {
15328
+ }) : i.format ? a = fe(Kt(i.format, {
15329
15329
  point: this.data[0],
15330
15330
  series: { name: this.config.name },
15331
15331
  x: (f = this.data[0]) == null ? void 0 : f.x,
@@ -16219,7 +16219,7 @@ var Zi = 1 / 0, es = Zi, Hr = -Zi, ns = Hr, is = {
16219
16219
  function Rk(n, t) {
16220
16220
  n < Zi && (Zi = n), n > Hr && (Hr = n), t < es && (es = t), t > ns && (ns = t);
16221
16221
  }
16222
- var sc = 0, ac = 0, Mr = 0, rs = 0, os = 0, Fi = 0, cc = 0, lc = 0, Ar = 0, tp, ep, vn, wn, nn = {
16222
+ var sc = 0, ac = 0, Mr = 0, rs = 0, os = 0, Fi = 0, cc = 0, lc = 0, Ar = 0, tp, ep, wn, kn, nn = {
16223
16223
  point: bi,
16224
16224
  lineStart: Cu,
16225
16225
  lineEnd: Pu,
@@ -16241,11 +16241,11 @@ function Cu() {
16241
16241
  nn.point = Dk;
16242
16242
  }
16243
16243
  function Dk(n, t) {
16244
- nn.point = zk, bi(vn = n, wn = t);
16244
+ nn.point = zk, bi(wn = n, kn = t);
16245
16245
  }
16246
16246
  function zk(n, t) {
16247
- var e = n - vn, i = t - wn, r = He(e * e + i * i);
16248
- rs += r * (vn + n) / 2, os += r * (wn + t) / 2, Fi += r, bi(vn = n, wn = t);
16247
+ var e = n - wn, i = t - kn, r = He(e * e + i * i);
16248
+ rs += r * (wn + n) / 2, os += r * (kn + t) / 2, Fi += r, bi(wn = n, kn = t);
16249
16249
  }
16250
16250
  function Pu() {
16251
16251
  nn.point = bi;
@@ -16257,11 +16257,11 @@ function Ok() {
16257
16257
  np(tp, ep);
16258
16258
  }
16259
16259
  function Nk(n, t) {
16260
- nn.point = np, bi(tp = vn = n, ep = wn = t);
16260
+ nn.point = np, bi(tp = wn = n, ep = kn = t);
16261
16261
  }
16262
16262
  function np(n, t) {
16263
- var e = n - vn, i = t - wn, r = He(e * e + i * i);
16264
- rs += r * (vn + n) / 2, os += r * (wn + t) / 2, Fi += r, r = wn * n - vn * t, cc += r * (vn + n), lc += r * (wn + t), Ar += r * 3, bi(vn = n, wn = t);
16263
+ var e = n - wn, i = t - kn, r = He(e * e + i * i);
16264
+ rs += r * (wn + n) / 2, os += r * (kn + t) / 2, Fi += r, r = kn * n - wn * t, cc += r * (wn + n), lc += r * (kn + t), Ar += r * 3, bi(wn = n, kn = t);
16265
16265
  }
16266
16266
  function ip(n) {
16267
16267
  this._context = n;
@@ -16564,7 +16564,7 @@ function Ru(n, t, e, i, r, o) {
16564
16564
  return [i * (h * y - f * g + u), r * (d - f * y - h * g)];
16565
16565
  }, p;
16566
16566
  }
16567
- function An(n) {
16567
+ function Sn(n) {
16568
16568
  return up(function() {
16569
16569
  return n;
16570
16570
  })();
@@ -16740,7 +16740,7 @@ pp.invert = jr(function(n) {
16740
16740
  return 2 * ln(n / 2);
16741
16741
  });
16742
16742
  function tM() {
16743
- return An(pp).scale(124.75).clipAngle(180 - 1e-3);
16743
+ return Sn(pp).scale(124.75).clipAngle(180 - 1e-3);
16744
16744
  }
16745
16745
  var gp = dp(function(n) {
16746
16746
  return (n = Xd(n)) && n / Pt(n);
@@ -16749,7 +16749,7 @@ gp.invert = jr(function(n) {
16749
16749
  return n;
16750
16750
  });
16751
16751
  function eM() {
16752
- return An(gp).scale(79.4188).clipAngle(180 - 1e-3);
16752
+ return Sn(gp).scale(79.4188).clipAngle(180 - 1e-3);
16753
16753
  }
16754
16754
  function Ps(n, t) {
16755
16755
  return [n, Jo(rl((te + t) / 2))];
@@ -16761,7 +16761,7 @@ function Du() {
16761
16761
  return mp(Ps).scale(961 / qe);
16762
16762
  }
16763
16763
  function mp(n) {
16764
- var t = An(n), e = t.center, i = t.scale, r = t.translate, o = t.clipExtent, s = null, a, l, c;
16764
+ var t = Sn(n), e = t.center, i = t.scale, r = t.translate, o = t.clipExtent, s = null, a, l, c;
16765
16765
  t.scale = function(f) {
16766
16766
  return arguments.length ? (i(f), h()) : i();
16767
16767
  }, t.translate = function(f) {
@@ -16801,7 +16801,7 @@ function cs(n, t) {
16801
16801
  }
16802
16802
  cs.invert = cs;
16803
16803
  function rM() {
16804
- return An(cs).scale(152.63);
16804
+ return Sn(cs).scale(152.63);
16805
16805
  }
16806
16806
  function oM(n, t) {
16807
16807
  var e = Dt(n), i = n === t ? Pt(n) : (e - Dt(t)) / (t - n), r = e / i + n;
@@ -16835,7 +16835,7 @@ yp.invert = function(n, t) {
16835
16835
  ];
16836
16836
  };
16837
16837
  function zu() {
16838
- return An(yp).scale(177.158);
16838
+ return Sn(yp).scale(177.158);
16839
16839
  }
16840
16840
  function xp(n, t) {
16841
16841
  var e = Dt(t), i = Dt(n) * e;
@@ -16843,7 +16843,7 @@ function xp(n, t) {
16843
16843
  }
16844
16844
  xp.invert = jr(Qi);
16845
16845
  function cM() {
16846
- return An(xp).scale(144.049).clipAngle(60);
16846
+ return Sn(xp).scale(144.049).clipAngle(60);
16847
16847
  }
16848
16848
  function bp(n, t) {
16849
16849
  var e = t * t, i = e * e;
@@ -16864,14 +16864,14 @@ bp.invert = function(n, t) {
16864
16864
  ];
16865
16865
  };
16866
16866
  function fc() {
16867
- return An(bp).scale(175.295);
16867
+ return Sn(bp).scale(175.295);
16868
16868
  }
16869
16869
  function vp(n, t) {
16870
16870
  return [Dt(t) * Pt(n), Pt(t)];
16871
16871
  }
16872
16872
  vp.invert = jr(ln);
16873
16873
  function Bu() {
16874
- return An(vp).scale(249.5).clipAngle(90 + At);
16874
+ return Sn(vp).scale(249.5).clipAngle(90 + At);
16875
16875
  }
16876
16876
  function wp(n, t) {
16877
16877
  var e = Dt(t), i = 1 + Dt(n) * e;
@@ -16881,7 +16881,7 @@ wp.invert = jr(function(n) {
16881
16881
  return 2 * Qi(n);
16882
16882
  });
16883
16883
  function lM() {
16884
- return An(wp).scale(250).clipAngle(142);
16884
+ return Sn(wp).scale(250).clipAngle(142);
16885
16885
  }
16886
16886
  function kp(n, t) {
16887
16887
  return [Jo(rl((te + t) / 2)), -n];
@@ -16976,7 +16976,7 @@ function gM(n, t) {
16976
16976
  }
16977
16977
  const Mp = (n, t) => [n, 1.25 * Math.log(Math.tan(Math.PI / 4 + 0.4 * t))];
16978
16978
  Mp.invert = (n, t) => [n, 2.5 * Math.atan(Math.exp(0.8 * t)) - 0.625 * Math.PI];
16979
- const mM = () => An(Mp).scale(108.318), yM = {
16979
+ const mM = () => Sn(Mp).scale(108.318), yM = {
16980
16980
  naturalEarth: fc,
16981
16981
  naturalEarth1: fc,
16982
16982
  mercator: Du,
@@ -17158,7 +17158,7 @@ class vM extends Xt {
17158
17158
  series: { name: this.config.name },
17159
17159
  x: (g = u.properties) == null ? void 0 : g.name,
17160
17160
  y: (p == null ? void 0 : p.y) ?? (p == null ? void 0 : p.value)
17161
- }) : r.format ? he(Kt(r.format, {
17161
+ }) : r.format ? fe(Kt(r.format, {
17162
17162
  point: p || { name: (m = u.properties) == null ? void 0 : m.name },
17163
17163
  series: { name: this.config.name },
17164
17164
  x: (x = u.properties) == null ? void 0 : x.name,
@@ -17352,7 +17352,7 @@ class wM extends Xt {
17352
17352
  x: t.id ?? t.name,
17353
17353
  y: t.y ?? t.value
17354
17354
  };
17355
- return i != null && i.formatter ? i.formatter.call(r) : i != null && i.format ? he(Kt(i.format, r)) : t.id || t.name || "";
17355
+ return i != null && i.formatter ? i.formatter.call(r) : i != null && i.format ? fe(Kt(i.format, r)) : t.id || t.name || "";
17356
17356
  }
17357
17357
  getDataExtents() {
17358
17358
  return { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
@@ -18229,7 +18229,7 @@ class LM extends Xt {
18229
18229
  series: { name: this.config.name },
18230
18230
  x: c.x,
18231
18231
  y: c.y
18232
- }) : r.format ? p = he(Kt(r.format, {
18232
+ }) : r.format ? p = fe(Kt(r.format, {
18233
18233
  point: c,
18234
18234
  series: { name: this.config.name },
18235
18235
  x: c.x,
@@ -18737,11 +18737,11 @@ class iA extends Xt {
18737
18737
  const Lt = Math.floor(tt / S) - 1;
18738
18738
  return Lt < lt ? "" : Lt >= V.length ? V : V.slice(0, Lt) + "…";
18739
18739
  }, R = r.nodeAlignment === "left" ? DM : Ap, D = h ? 5 : c ? 8 : l ? 10 : 14, z = typeof f == "number" ? f : 20, B = (V, tt, lt, St) => {
18740
- const Lt = Math.max(tt + St + 20, t.width - lt), Te = NM().nodeId((de) => de.id).nodeAlign(R).nodeWidth(St).nodePadding(V).extent([[tt, 0], [Lt, t.height]]), ye = Te({ nodes: [...s], links: [...a] });
18741
- for (const de of ye.nodes)
18742
- if (de.x0 < tt) {
18743
- const mn = de.x1 - de.x0;
18744
- de.x0 = tt, de.x1 = tt + mn;
18740
+ const Lt = Math.max(tt + St + 20, t.width - lt), Te = NM().nodeId((pe) => pe.id).nodeAlign(R).nodeWidth(St).nodePadding(V).extent([[tt, 0], [Lt, t.height]]), ye = Te({ nodes: [...s], links: [...a] });
18741
+ for (const pe of ye.nodes)
18742
+ if (pe.x0 < tt) {
18743
+ const yn = pe.x1 - pe.x0;
18744
+ pe.x0 = tt, pe.x1 = tt + yn;
18745
18745
  }
18746
18746
  return { gen: Te, graph: ye };
18747
18747
  };
@@ -18793,42 +18793,42 @@ class iA extends Xt {
18793
18793
  const tt = X(V.source);
18794
18794
  Vt.has(tt) || Vt.set(tt, []), Vt.get(tt).push(V);
18795
18795
  }
18796
- const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), jt = Ot, ee = jt, Tt = Nt * ee + Ot + jt, Zt = r.centerNodes === !0, ge = r.spreadFactor ?? 1;
18797
- (Zt || ge !== 1) && this.centerAndSpreadNodes(q, ot, t.height, ge, Ct);
18796
+ const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), jt = Ot, ee = jt, Tt = Nt * ee + Ot + jt, Zt = r.centerNodes === !0, ce = r.spreadFactor ?? 1;
18797
+ (Zt || ce !== 1) && this.centerAndSpreadNodes(q, ot, t.height, ce, Ct);
18798
18798
  const Ve = /* @__PURE__ */ new Map();
18799
18799
  for (const V of M)
18800
18800
  V.level !== void 0 && Ve.set(V.level, V);
18801
- const fe = (V) => {
18801
+ const le = (V) => {
18802
18802
  const tt = V.source ? X(V.source) : void 0, lt = tt !== void 0 ? Ve.get(tt) : void 0;
18803
18803
  return (lt == null ? void 0 : lt.linkOpacity) ?? m;
18804
- }, Sn = JM(), Vn = (V) => {
18805
- if (!c) return Sn(V);
18804
+ }, mn = JM(), Vn = (V) => {
18805
+ if (!c) return mn(V);
18806
18806
  const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, Te = lt - tt;
18807
18807
  if (!Number.isFinite(Te) || !Number.isFinite(St) || !Number.isFinite(Lt))
18808
- return Sn(V);
18808
+ return mn(V);
18809
18809
  if (Te <= 14)
18810
18810
  return `M${tt},${St}L${lt},${Lt}`;
18811
18811
  if (Te < 28) {
18812
18812
  const ye = Math.max(2, Te * 0.35);
18813
18813
  return `M${tt},${St}C${tt + ye},${St} ${lt - ye},${Lt} ${lt},${Lt}`;
18814
18814
  }
18815
- return Sn(V);
18815
+ return mn(V);
18816
18816
  }, De = c, Ze = De ? (V) => {
18817
18817
  const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, Te = lt - tt, ye = Math.max(v, V.width) / 2;
18818
18818
  if (!Number.isFinite(Te) || !Number.isFinite(St) || !Number.isFinite(Lt))
18819
18819
  return Vn(V);
18820
- const de = St - ye, mn = St + ye, rr = Lt - ye, Gn = Lt + ye, Cn = Math.max(1, Te * 0.42);
18820
+ const pe = St - ye, yn = St + ye, rr = Lt - ye, Gn = Lt + ye, Cn = Math.max(1, Te * 0.42);
18821
18821
  return Te <= 2 ? [
18822
- `M${tt},${de}`,
18822
+ `M${tt},${pe}`,
18823
18823
  `L${lt},${rr}`,
18824
18824
  `L${lt},${Gn}`,
18825
- `L${tt},${mn}`,
18825
+ `L${tt},${yn}`,
18826
18826
  "Z"
18827
18827
  ].join("") : [
18828
- `M${tt},${de}`,
18829
- `C${tt + Cn},${de} ${lt - Cn},${rr} ${lt},${rr}`,
18828
+ `M${tt},${pe}`,
18829
+ `C${tt + Cn},${pe} ${lt - Cn},${rr} ${lt},${rr}`,
18830
18830
  `L${lt},${Gn}`,
18831
- `C${lt - Cn},${Gn} ${tt + Cn},${mn} ${tt},${mn}`,
18831
+ `C${lt - Cn},${Gn} ${tt + Cn},${yn} ${tt},${yn}`,
18832
18832
  "Z"
18833
18833
  ].join("");
18834
18834
  } : Vn, Ge = De ? "fill-opacity" : "stroke-opacity", Ye = r.linkColorMode ?? "from", tr = (V) => V.source.color || e[q.nodes.indexOf(V.source) % e.length] || "#aaa", er = (V) => V.target.color || e[q.nodes.indexOf(V.target) % e.length] || "#aaa", nr = this.group.append("defs"), et = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
@@ -18846,17 +18846,17 @@ class iA extends Xt {
18846
18846
  ]).join("stop").attr("offset", (St) => St.offset).attr("stop-color", (St) => St.color), rt(this).attr(De ? "fill" : "stroke", `url(#${lt})`);
18847
18847
  }) : Ye === "to" ? yt.attr(De ? "fill" : "stroke", (V) => er(V)) : yt.attr(De ? "fill" : "stroke", (V) => tr(V)), i && !h ? l ? yt.attr(Ge, 0).each(function(V) {
18848
18848
  const tt = X(V.source), St = (Vt.get(tt) || []).indexOf(V), Lt = tt * ee + Ot - 60 + Math.min(St * 12, 60);
18849
- rt(this).transition("enter").duration(jt).delay(Lt).ease(pt).attr(Ge, fe(V));
18850
- }) : yt.attr(Ge, (V) => fe(V)).each(function(V) {
18851
- var mn;
18852
- const tt = this, lt = ((mn = tt.getTotalLength) == null ? void 0 : mn.call(tt)) || 0;
18849
+ rt(this).transition("enter").duration(jt).delay(Lt).ease(pt).attr(Ge, le(V));
18850
+ }) : yt.attr(Ge, (V) => le(V)).each(function(V) {
18851
+ var yn;
18852
+ const tt = this, lt = ((yn = tt.getTotalLength) == null ? void 0 : yn.call(tt)) || 0;
18853
18853
  if (lt === 0) return;
18854
- const St = X(V.source), Te = (Vt.get(St) || []).indexOf(V), de = St * ee + Ot - 60 + Math.min(Te * 12, 60);
18855
- rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(jt).delay(de).ease(pt).attr("stroke-dashoffset", 0).on("end", function() {
18854
+ const St = X(V.source), Te = (Vt.get(St) || []).indexOf(V), pe = St * ee + Ot - 60 + Math.min(Te * 12, 60);
18855
+ rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(jt).delay(pe).ease(pt).attr("stroke-dashoffset", 0).on("end", function() {
18856
18856
  rt(this).attr("stroke-dasharray", null).attr("stroke-dashoffset", null);
18857
18857
  });
18858
- }) : yt.attr(Ge, (V) => fe(V));
18859
- const Ut = (V, tt, lt) => {
18858
+ }) : yt.attr(Ge, (V) => le(V));
18859
+ const qt = (V, tt, lt) => {
18860
18860
  const St = {
18861
18861
  name: `${lt.source.name} → ${lt.target.name}`,
18862
18862
  from: lt.source.name,
@@ -18893,14 +18893,14 @@ class iA extends Xt {
18893
18893
  event: tt
18894
18894
  });
18895
18895
  }, Bt = (V, tt) => {
18896
- const lt = fe(tt);
18897
- yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : fe(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ft), Ut("mouseover", V, tt);
18898
- }, qt = (V, tt) => {
18899
- yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => fe(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Ut("mouseout", V, tt);
18896
+ const lt = le(tt);
18897
+ yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : le(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ft), qt("mouseover", V, tt);
18898
+ }, Ut = (V, tt) => {
18899
+ yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => le(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), qt("mouseout", V, tt);
18900
18900
  }, Jt = (V, tt) => {
18901
- Ut("click", V, tt);
18901
+ qt("click", V, tt);
18902
18902
  };
18903
- yt.on("mouseover", Bt).on("mouseout", qt).on("click", Jt);
18903
+ yt.on("mouseover", Bt).on("mouseout", Ut).on("click", Jt);
18904
18904
  const Ht = vt.selectAll(".katucharts-sankey-node").data(q.nodes).join("rect").attr("class", "katucharts-sankey-node").attr("x", (V) => V.x0).attr("y", (V) => V.y0).attr("width", (V) => V.x1 - V.x0).attr("height", (V) => Math.max(1, V.y1 - V.y0)).attr("fill", (V, tt) => {
18905
18905
  if (V.color) return V.color;
18906
18906
  const lt = Ve.get(X(V));
@@ -18917,7 +18917,7 @@ class iA extends Xt {
18917
18917
  Lt.source === tt ? lt.add(Lt.target) : Lt.target === tt && lt.add(Lt.source);
18918
18918
  Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Ft), yt.transition("highlight").duration(K).ease(Z).attr(
18919
18919
  Ge,
18920
- (Lt) => Lt.source === tt || Lt.target === tt ? Math.min(fe(Lt) + 0.3, 1) : fe(Lt) * 0.375
18920
+ (Lt) => Lt.source === tt || Lt.target === tt ? Math.min(le(Lt) + 0.3, 1) : le(Lt) * 0.375
18921
18921
  );
18922
18922
  const St = { name: tt.name || tt.id, y: tt.value, sum: tt.value };
18923
18923
  this.context.events.emit("point:mouseover", {
@@ -18929,7 +18929,7 @@ class iA extends Xt {
18929
18929
  plotY: (tt.y0 + tt.y1) / 2
18930
18930
  });
18931
18931
  }, Ee = (V, tt) => {
18932
- Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => fe(lt)), this.context.events.emit("point:mouseout", {
18932
+ Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => le(lt)), this.context.events.emit("point:mouseout", {
18933
18933
  point: { name: tt.name || tt.id, y: tt.value, sum: tt.value },
18934
18934
  index: q.nodes.indexOf(tt),
18935
18935
  series: this,
@@ -18943,18 +18943,18 @@ class iA extends Xt {
18943
18943
  event: V
18944
18944
  });
18945
18945
  };
18946
- if (Ht.on("mouseover", Ke).on("mouseout", Ee).on("click", Be), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", qt).on("click", Jt), L) {
18947
- const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, Te = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, ye = (ut) => Y && Lt(ut) || Te(ut), de = /* @__PURE__ */ new Map();
18946
+ if (Ht.on("mouseover", Ke).on("mouseout", Ee).on("click", Be), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", Ut).on("click", Jt), L) {
18947
+ const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, Te = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, ye = (ut) => Y && Lt(ut) || Te(ut), pe = /* @__PURE__ */ new Map();
18948
18948
  for (const ut of q.nodes) {
18949
18949
  const Et = ut.y1 - ut.y0;
18950
18950
  if (!ye(ut) && Et < tt) {
18951
- de.set(ut, "");
18951
+ pe.set(ut, "");
18952
18952
  continue;
18953
18953
  }
18954
- de.set(ut, w(ut));
18954
+ pe.set(ut, w(ut));
18955
18955
  }
18956
- const mn = (ut) => ye(ut) ? Lt(ut) ? "end" : "start" : "middle", rr = (ut) => ye(ut) ? Lt(ut) ? ut.x0 - 4 + (C.x ?? 0) : ut.x1 + 4 + (C.x ?? 0) : (ut.x0 + ut.x1) / 2 + (C.x ?? 0);
18957
- Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", rr).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", mn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (ir = C.style) != null && ir.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", Ee).on("click", Be).text((ut) => de.get(ut) ?? "");
18956
+ const yn = (ut) => ye(ut) ? Lt(ut) ? "end" : "start" : "middle", rr = (ut) => ye(ut) ? Lt(ut) ? ut.x0 - 4 + (C.x ?? 0) : ut.x1 + 4 + (C.x ?? 0) : (ut.x0 + ut.x1) / 2 + (C.x ?? 0);
18957
+ Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", rr).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (ir = C.style) != null && ir.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", Ee).on("click", Be).text((ut) => pe.get(ut) ?? "");
18958
18958
  const Gn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
18959
18959
  for (const ut of q.nodes) {
18960
18960
  const Et = X(ut);
@@ -18964,7 +18964,7 @@ class iA extends Xt {
18964
18964
  const Et = this;
18965
18965
  let ne = Et.textContent;
18966
18966
  if (!ne) return;
18967
- const yn = A(ne);
18967
+ const xn = A(ne);
18968
18968
  if (ye(ut)) {
18969
18969
  const yl = X(ut), xl = I * 0.75;
18970
18970
  let sr;
@@ -18979,18 +18979,18 @@ class iA extends Xt {
18979
18979
  Et.textContent = "";
18980
18980
  return;
18981
18981
  }
18982
- yn > sr && (ne = T(ne, sr, 1), Et.textContent = ne);
18982
+ xn > sr && (ne = T(ne, sr, 1), Et.textContent = ne);
18983
18983
  return;
18984
18984
  }
18985
- const ti = (ut.x0 + ut.x1) / 2, Yn = ti - yn / 2, Ai = ti + yn / 2;
18985
+ const ti = (ut.x0 + ut.x1) / 2, Yn = ti - xn / 2, Ai = ti + xn / 2;
18986
18986
  if (Ai <= t.width && Yn >= 0) return;
18987
18987
  const or = X(ut), Ep = Gn.get(or + 1) ?? t.width, Tp = Cn.get(or - 1) ?? 0, Es = Ep - ut.x1 - 4, Ts = ut.x0 - Tp - 4;
18988
18988
  if (Yn < 0 && Es > I * 1.5) {
18989
- Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), yn > Es && (Et.textContent = T(ne, Es));
18989
+ Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Es && (Et.textContent = T(ne, Es));
18990
18990
  return;
18991
18991
  }
18992
18992
  if (Ai > t.width && Ts > I * 1.5) {
18993
- Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), yn > Ts && (Et.textContent = T(ne, Ts));
18993
+ Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > Ts && (Et.textContent = T(ne, Ts));
18994
18994
  return;
18995
18995
  }
18996
18996
  const ml = 2 * Math.min(ti, t.width - ti) - 4;
@@ -19022,20 +19022,20 @@ class iA extends Xt {
19022
19022
  };
19023
19023
  }
19024
19024
  if (ne.width === 0 && ne.height === 0) continue;
19025
- const yn = {
19025
+ const xn = {
19026
19026
  left: ne.x,
19027
19027
  right: ne.x + ne.width,
19028
19028
  top: ne.y,
19029
19029
  bottom: ne.y + ne.height
19030
19030
  };
19031
- if (pl.some((Yn) => Pp(Yn, yn)) && C.overflow !== "allow") {
19031
+ if (pl.some((Yn) => Pp(Yn, xn)) && C.overflow !== "allow") {
19032
19032
  Et.textContent = "";
19033
19033
  continue;
19034
19034
  }
19035
- pl.push(yn);
19035
+ pl.push(xn);
19036
19036
  }
19037
19037
  i && !h && Q.attr("opacity", 0).each(function(ut) {
19038
- const Et = X(ut), yn = (_t.get(Et) || []).indexOf(ut), ti = Et * ee + Ot - 80 + Math.min(yn * 20, 80);
19038
+ const Et = X(ut), xn = (_t.get(Et) || []).indexOf(ut), ti = Et * ee + Ot - 80 + Math.min(xn * 20, 80);
19039
19039
  rt(this).transition("enter").duration(Ot).delay(ti).ease(pt).attr("opacity", 1);
19040
19040
  });
19041
19041
  }
@@ -19793,14 +19793,14 @@ class NA extends Xt {
19793
19793
  const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), T = BA().padAngle(w).sortSubgroups(null)(I);
19794
19794
  this.normalizeChordWidths(T), this.sortChordEndpoints(T);
19795
19795
  const R = Ae().innerRadius($).outerRadius(_).cornerRadius(3), F = Ae().innerRadius($).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
19796
- const nt = $, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), Ut = nt * Math.cos(mt), Bt = nt * Math.sin(mt), qt = nt * Math.cos(gt), Jt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19796
+ const nt = $, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Jt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19797
19797
  let Ee = Math.abs(mt - vt);
19798
19798
  Ee > Math.PI && (Ee = 2 * Math.PI - Ee);
19799
19799
  const Be = Ee / Math.PI, me = nt * Math.max(D, (1 - Be) * (1 - Be) * (1 - Be));
19800
19800
  let Je = Math.abs(ht - gt);
19801
19801
  Je > Math.PI && (Je = 2 * Math.PI - Je);
19802
19802
  const hn = Je / Math.PI, _n = nt * Math.max(D, (1 - hn) * (1 - hn) * (1 - hn));
19803
- return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${me * Math.cos(vt)},${me * Math.sin(vt)},${me * Math.cos(mt)},${me * Math.sin(mt)},${Ut},${Bt}A${nt},${nt},0,${Ke},1,${qt},${Jt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${$t}Z`;
19803
+ return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${me * Math.cos(vt)},${me * Math.sin(vt)},${me * Math.cos(mt)},${me * Math.sin(mt)},${qt},${Bt}A${nt},${nt},0,${Ke},1,${Ut},${Jt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${$t}Z`;
19804
19804
  }, B = this.group.append("g").attr("transform", `translate(${x},${v})`), H = (et) => P[et] || e[et % e.length], J = r.linkColorMode ?? "from", X = B.append("defs");
19805
19805
  let j = null;
19806
19806
  J === "gradient" && (j = X);
@@ -19830,13 +19830,13 @@ class NA extends Xt {
19830
19830
  if (gt === Q) return;
19831
19831
  const $t = z(vt), Ft = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, yt = G(Ft, Q, mt, "tgt");
19832
19832
  ht.append("path").attr("d", $t).attr("fill", `url(#${yt})`).attr("stroke", "none").style("pointer-events", "none");
19833
- const Ut = (vt.source.startAngle + vt.source.endAngle) / 2 + p - Math.PI / 2, Bt = G(Ut, gt, mt, "src");
19833
+ const qt = (vt.source.startAngle + vt.source.endAngle) / 2 + p - Math.PI / 2, Bt = G(qt, gt, mt, "src");
19834
19834
  ht.append("path").attr("d", $t).attr("fill", `url(#${Bt})`).attr("stroke", "none").style("pointer-events", "none");
19835
19835
  }), i) {
19836
19836
  ht.attr("opacity", 0);
19837
19837
  const vt = B.append("defs"), mt = Math.round(s * 0.62);
19838
19838
  Y.each(function(Q, $t) {
19839
- const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, Ut = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, qt = Q.target.startAngle + p - Math.PI / 2, Jt = Q.target.endAngle + p - Math.PI / 2, Ht = (Ut + Bt) / 2, Ke = (qt + Jt) / 2, Ee = $ * Math.cos(Ht), Be = $ * Math.sin(Ht), me = $ * Math.cos(Ke), Je = $ * Math.sin(Ke), hn = Math.atan2(Je - Be, me - Ee) * 180 / Math.PI, _n = Math.sqrt((me - Ee) ** 2 + (Je - Be) ** 2) + _ * 2, ir = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = ir.append("rect").attr("transform", `translate(${Ee},${Be}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19839
+ const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2, Jt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Jt) / 2, Ee = $ * Math.cos(Ht), Be = $ * Math.sin(Ht), me = $ * Math.cos(Ke), Je = $ * Math.sin(Ke), hn = Math.atan2(Je - Be, me - Ee) * 180 / Math.PI, _n = Math.sqrt((me - Ee) ** 2 + (Je - Be) ** 2) + _ * 2, ir = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = ir.append("rect").attr("transform", `translate(${Ee},${Be}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19840
19840
  tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Ft).ease(pt).attr("width", _n).on("end", function() {
19841
19841
  tt.attr("clip-path", null), ir.remove();
19842
19842
  });
@@ -19854,7 +19854,7 @@ class NA extends Xt {
19854
19854
  Y.attr("fill-opacity", d);
19855
19855
  const et = B.append("defs"), nt = Math.round(s * 0.62);
19856
19856
  Y.each(function(ht, vt) {
19857
- const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, Ut = (Q + $t) / 2, Bt = (Ft + yt) / 2, qt = $ * Math.cos(Ut), Jt = $ * Math.sin(Ut), Ht = $ * Math.cos(Bt), Ke = $ * Math.sin(Bt), Ee = Math.atan2(Ke - Jt, Ht - qt) * 180 / Math.PI, Be = Math.sqrt((Ht - qt) ** 2 + (Ke - Jt) ** 2) + _ * 2, me = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = me.append("rect").attr("transform", `translate(${qt},${Jt}) rotate(${Ee})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19857
+ const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + $t) / 2, Bt = (Ft + yt) / 2, Ut = $ * Math.cos(qt), Jt = $ * Math.sin(qt), Ht = $ * Math.cos(Bt), Ke = $ * Math.sin(Bt), Ee = Math.atan2(Ke - Jt, Ht - Ut) * 180 / Math.PI, Be = Math.sqrt((Ht - Ut) ** 2 + (Ke - Jt) ** 2) + _ * 2, me = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = me.append("rect").attr("transform", `translate(${Ut},${Jt}) rotate(${Ee})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19858
19858
  hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width", Be).on("end", function() {
19859
19859
  hn.attr("clip-path", null), me.remove();
19860
19860
  });
@@ -19922,15 +19922,15 @@ class NA extends Xt {
19922
19922
  );
19923
19923
  if (gt.length === 0) return null;
19924
19924
  const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, $t = (Bt) => {
19925
- const qt = Q(Bt), Jt = ot(qt.startAngle + p), Ht = ot(qt.endAngle + p);
19925
+ const Ut = Q(Bt), Jt = ot(Ut.startAngle + p), Ht = ot(Ut.endAngle + p);
19926
19926
  return Jt <= Ht ? mt >= Jt && mt <= Ht : mt >= Jt || mt <= Ht;
19927
19927
  }, Ft = gt.find($t);
19928
19928
  if (Ft) return Ft;
19929
- let yt = gt[0], Ut = 1 / 0;
19929
+ let yt = gt[0], qt = 1 / 0;
19930
19930
  for (const Bt of gt) {
19931
- const qt = Q(Bt), Jt = ot((qt.startAngle + qt.endAngle) / 2 + p);
19931
+ const Ut = Q(Bt), Jt = ot((Ut.startAngle + Ut.endAngle) / 2 + p);
19932
19932
  let Ht = Math.abs(mt - Jt);
19933
- Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht < Ut && (Ut = Ht, yt = Bt);
19933
+ Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht < qt && (qt = Ht, yt = Bt);
19934
19934
  }
19935
19935
  return yt;
19936
19936
  }, st = (et) => {
@@ -19982,16 +19982,16 @@ class NA extends Xt {
19982
19982
  event: et
19983
19983
  });
19984
19984
  }), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data(T).join("path").attr("class", "katucharts-chord-hitarea").attr("d", (et) => z(et)).attr("fill", "#ffffff").attr("fill-opacity", 0).attr("stroke", "#ffffff").attr("stroke-opacity", 0).attr("stroke-width", 12).attr("stroke-linejoin", "round").style("cursor", "pointer").style("pointer-events", "all").on("mouseover", it).on("mouseout", ft).on("click", dt);
19985
- const _t = this.config.dataLabels || {}, Vt = _t.color || ((er = _t.style) == null ? void 0 : er.color) || Pe, Nt = ((nr = _t.style) == null ? void 0 : nr.fontSize) || Mt, Ot = Me(Nt), jt = 22, ee = _ + jt, Tt = Math.max(Ot * 1.6, 17), Zt = "…", ge = tn(Zt, Ot, "bold"), Ve = (et, nt) => {
19986
- if (!et || nt <= ge) return "";
19985
+ const _t = this.config.dataLabels || {}, Vt = _t.color || ((er = _t.style) == null ? void 0 : er.color) || Pe, Nt = ((nr = _t.style) == null ? void 0 : nr.fontSize) || Mt, Ot = Me(Nt), jt = 22, ee = _ + jt, Tt = Math.max(Ot * 1.6, 17), Zt = "…", ce = tn(Zt, Ot, "bold"), Ve = (et, nt) => {
19986
+ if (!et || nt <= ce) return "";
19987
19987
  if (tn(et, Ot, "bold") <= nt) return et;
19988
19988
  let ht = "";
19989
19989
  for (const vt of et) {
19990
- if (tn(ht + vt, Ot, "bold") + ge > nt) break;
19990
+ if (tn(ht + vt, Ot, "bold") + ce > nt) break;
19991
19991
  ht += vt;
19992
19992
  }
19993
19993
  return ht = ht.trimEnd(), (ht || et[0]) + Zt;
19994
- }, fe = t.width - x, Sn = x, Vn = v, De = t.height - v, ze = at.map((et) => {
19994
+ }, le = t.width - x, mn = x, Vn = v, De = t.height - v, ze = at.map((et) => {
19995
19995
  const nt = (et.startAngle + et.endAngle) / 2, ht = Math.sin(nt) >= 0;
19996
19996
  return {
19997
19997
  index: et.index,
@@ -20026,7 +20026,7 @@ class NA extends Xt {
20026
20026
  Ft.text(null);
20027
20027
  const yt = vt(E[gt.index] || "", gt.span);
20028
20028
  if (!yt) return;
20029
- const Ut = (gt.mid % et + et) % et, Bt = Ut > Math.PI / 2 && Ut < Math.PI * 3 / 2, qt = gt.span / 2, [Jt, Ht] = ht(Bt ? gt.mid + qt : gt.mid - qt), [Ke, Ee] = ht(Bt ? gt.mid - qt : gt.mid + qt), Be = Bt ? 0 : 1, me = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
20029
+ const qt = (gt.mid % et + et) % et, Bt = qt > Math.PI / 2 && qt < Math.PI * 3 / 2, Ut = gt.span / 2, [Jt, Ht] = ht(Bt ? gt.mid + Ut : gt.mid - Ut), [Ke, Ee] = ht(Bt ? gt.mid - Ut : gt.mid + Ut), Be = Bt ? 0 : 1, me = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
20030
20030
  mt.append("path").attr("id", me).attr("fill", "none").attr("d", `M${Jt},${Ht}A${nt},${nt},0,0,${Be},${Ke},${Ee}`), Ft.append("textPath").attr("href", `#${me}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
20031
20031
  }), i) {
20032
20032
  Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 1);
@@ -20040,24 +20040,24 @@ class NA extends Xt {
20040
20040
  const Q = Math.max(1, Math.min(10, Math.floor(et / (Tt * 1.2))));
20041
20041
  for (const $t of [!0, !1]) {
20042
20042
  const Ft = ze.filter((yt) => yt.visible && yt.isRight === $t);
20043
- Ft.length > Q && (Ft.sort((yt, Ut) => Ut.rank - yt.rank), Ft.slice(Q).forEach((yt) => {
20043
+ Ft.length > Q && (Ft.sort((yt, qt) => qt.rank - yt.rank), Ft.slice(Q).forEach((yt) => {
20044
20044
  yt.visible = !1;
20045
20045
  }));
20046
20046
  }
20047
20047
  }
20048
20048
  this.distributeChordLabels(ze.filter((Q) => Q.visible && Q.isRight), Tt, Vn, De), this.distributeChordLabels(ze.filter((Q) => Q.visible && !Q.isRight), Tt, Vn, De);
20049
20049
  const nt = Math.max(Ot * 1.4, 16), ht = (Q) => {
20050
- const $t = Q.filter((Bt) => Bt.visible).sort((Bt, qt) => Bt.ly - qt.ly), Ft = $t.length * Tt / et;
20050
+ const $t = Q.filter((Bt) => Bt.visible).sort((Bt, Ut) => Bt.ly - Ut.ly), Ft = $t.length * Tt / et;
20051
20051
  let yt = 1;
20052
20052
  $t.length >= 8 && Ft > 0.5 && (yt = 2), $t.length >= 14 && Ft > 0.75 && (yt = 3);
20053
- const Ut = Math.max(1, yt * 2 - 2);
20054
- $t.forEach((Bt, qt) => {
20053
+ const qt = Math.max(1, yt * 2 - 2);
20054
+ $t.forEach((Bt, Ut) => {
20055
20055
  if (yt <= 1) {
20056
20056
  Bt.col = 0;
20057
20057
  return;
20058
20058
  }
20059
- const Jt = qt % Ut;
20060
- Bt.col = Jt < yt ? Jt : Ut - Jt;
20059
+ const Jt = Ut % qt;
20060
+ Bt.col = Jt < yt ? Jt : qt - Jt;
20061
20061
  });
20062
20062
  };
20063
20063
  if (o === "medium")
@@ -20066,14 +20066,16 @@ class NA extends Xt {
20066
20066
  ht(ze.filter((Q) => Q.isRight)), ht(ze.filter((Q) => !Q.isRight));
20067
20067
  for (const Q of ze) {
20068
20068
  if (!Q.visible) continue;
20069
- const $t = (Q.col || 0) * nt, Ft = ee + $t, yt = Math.max(-Ft, Math.min(Ft, Q.ly)), Ut = Math.sqrt(Math.max(0, Ft * Ft - yt * yt)), Bt = _ * 0.4 + $t;
20070
- Q.lx = Q.isRight ? Math.max(Ut, Bt) : -Math.max(Ut, Bt);
20069
+ const $t = (Q.col || 0) * nt, Ft = ee + $t, yt = Math.max(-Ft, Math.min(Ft, Q.ly)), qt = Math.sqrt(Math.max(0, Ft * Ft - yt * yt)), Bt = _ * 0.4 + $t;
20070
+ Q.lx = Q.isRight ? Math.max(qt, Bt) : -Math.max(qt, Bt);
20071
+ const Ut = (Q.isRight ? le : mn) - ce - 4;
20072
+ Q.lx = Q.isRight ? Math.min(Q.lx, Ut) : Math.max(Q.lx, -Ut);
20071
20073
  }
20072
- const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => (Q.isRight ? fe - vt(Q) : vt(Q) + Sn) - 6, gt = Ge.selectAll(".katucharts-chord-connector").data(ze.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
20074
+ const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => Math.max(0, (Q.isRight ? le - vt(Q) : vt(Q) + mn) - 6), gt = Ge.selectAll(".katucharts-chord-connector").data(ze.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
20073
20075
  const $t = _ + jt * 0.55, Ft = $t * Math.sin(Q.mid), yt = -$t * Math.cos(Q.mid);
20074
20076
  return `M${Q.ax},${Q.ay}L${Ft},${yt}L${Q.lx},${Q.ly}`;
20075
20077
  });
20076
- if (Ye = Ge.selectAll(".katucharts-chord-label").data(ze).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
20078
+ if (Ye = Ge.selectAll(".katucharts-chord-label").data(ze).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible && mt(Q) >= ce ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
20077
20079
  gt.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 0.8), Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", (yt) => Ze(yt) ? 1 : 0);
20078
20080
  const Q = Math.round(s * 0.62), $t = T.length, Ft = f + $t * a + Q;
20079
20081
  this.emitAfterAnimate(Ft + 100);
@@ -20461,7 +20463,7 @@ const VA = {
20461
20463
  dateFormat: Ha,
20462
20464
  numberFormat: Ms,
20463
20465
  templateFormat: Kt,
20464
- stripHtmlTags: he,
20466
+ stripHtmlTags: fe,
20465
20467
  color(n) {
20466
20468
  return ba(n);
20467
20469
  },