@jboltai/tokui 0.1.6 → 0.1.7

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.
package/dist/tokui.mjs CHANGED
@@ -541,7 +541,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
541
541
  "mark",
542
542
  "sub",
543
543
  "sup"
544
- ]), d = new Set(/* @__PURE__ */ "stripe.dis.ro.req.chk.multi.disabled.readonly.required.checked.multiple.striped.auto.plain.round.closable.bordered.open.pill.dot.leaf.inline.rounded.container.copy.regenerate.like.dislike.visible.delete.controls.open.active.collapsible.toggle.search.thumb.reset.print.show-total".split(".")), f = null;
544
+ ]), d = new Set(/* @__PURE__ */ "stripe.dis.ro.req.chk.multi.disabled.readonly.required.checked.multiple.striped.auto.plain.round.closable.bordered.open.pill.dot.leaf.inline.rounded.container.copy.regenerate.like.dislike.visible.delete.controls.open.active.collapsible.toggle.search.thumb.reset.print.show-total.live".split(".")), f = null;
545
545
  function p(e) {
546
546
  f = e;
547
547
  }
@@ -941,6 +941,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
941
941
  handler: t.sub === !0 ? null : String(t.sub),
942
942
  target: null,
943
943
  trigger: !1
944
+ } : t.t === "submit" ? {
945
+ act: "submit",
946
+ formId: n,
947
+ handler: t.clk ? String(t.clk) : null,
948
+ target: null,
949
+ trigger: !1
944
950
  } : {
945
951
  act: null,
946
952
  formId: n,
@@ -1214,11 +1220,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
1214
1220
  }
1215
1221
  }
1216
1222
  mount(e, t) {
1223
+ this._mountRoot = t;
1217
1224
  let n = this.render(e);
1218
1225
  return n.nodeType === 1 && (n.style.animation = "tokuiFadeIn 0.3s ease"), t.appendChild(n), this.bindEvents(n), n._streamCloseHook && n._streamCloseHook(), n;
1219
1226
  }
1220
1227
  mountStreaming(e, t) {
1221
- return e._stream === "skeleton-pending" ? this._streamSkeletonPending(e, t) : e._stream === "skeleton-finalize" ? this._streamSkeletonFinalize(e, t) : e._streamPreview ? this._streamChartPreview(e, t) : e.type === "tr" && e._stream === "open" ? this._streamTrOpen(e, t) : e.type === "tr" && e._stream === "preview" ? this._streamTrPreview(e) : e.type === "tr" && e._stream === "finalize" ? this._streamTrFinalize(e, t) : e._stream === "open" ? this._streamOpen(e, t) : e._stream === "close" ? this._streamClose(e) : e.type === "chart" && e._previewKey !== void 0 ? this._streamChartFinalize(e, t) : this._streamChild(e, t);
1228
+ return this._mountRoot = t, e._stream === "skeleton-pending" ? this._streamSkeletonPending(e, t) : e._stream === "skeleton-finalize" ? this._streamSkeletonFinalize(e, t) : e._streamPreview ? this._streamChartPreview(e, t) : e.type === "tr" && e._stream === "open" ? this._streamTrOpen(e, t) : e.type === "tr" && e._stream === "preview" ? this._streamTrPreview(e) : e.type === "tr" && e._stream === "finalize" ? this._streamTrFinalize(e, t) : e._stream === "open" ? this._streamOpen(e, t) : e._stream === "close" ? this._streamClose(e) : e.type === "chart" && e._previewKey !== void 0 ? this._streamChartFinalize(e, t) : this._streamChild(e, t);
1222
1229
  }
1223
1230
  _streamChartPreview(e, t) {
1224
1231
  this._pendingCharts = this._pendingCharts || {};
@@ -1349,6 +1356,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
1349
1356
  for (let [n, r] of new FormData(e)) t[n] === void 0 ? t[n] = r : (Array.isArray(t[n]) || (t[n] = [t[n]]), t[n].push(r));
1350
1357
  return t;
1351
1358
  }
1359
+ _reportValidity(e) {
1360
+ return e ? typeof e.reportValidity == "function" ? e.reportValidity() : typeof e.checkValidity == "function" ? e.checkValidity() : !0 : !0;
1361
+ }
1352
1362
  _getNodeType(e) {
1353
1363
  if (e._tokuiType) return e._tokuiType;
1354
1364
  let t = e.className && e.className.match && e.className.match(/tokui-(\w+)/);
@@ -1387,6 +1397,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
1387
1397
  }
1388
1398
  var c = function(e) {
1389
1399
  if (e.preventDefault(), a) {
1400
+ if (!t._reportValidity(a)) return;
1390
1401
  let n = a.getAttribute("data-tokui-sub"), r = n ? t.eventBus.getHandler(n) : null;
1391
1402
  r && r(t._collectFormData(a), e, a);
1392
1403
  return;
@@ -1398,6 +1409,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
1398
1409
  let e = n.getAttribute("data-tokui-form");
1399
1410
  e && (i = r(n, e));
1400
1411
  }
1412
+ if (i && n.getAttribute("type") === "submit" && !t._reportValidity(i)) return;
1401
1413
  o(i ? t._collectFormData(i) : null, e, n);
1402
1414
  }
1403
1415
  };
@@ -1417,7 +1429,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
1417
1429
  let n = e.getAttribute("data-tokui-sub") || e.getAttribute("data-tokui-clk");
1418
1430
  if (n) {
1419
1431
  var r = function(r) {
1420
- r.preventDefault();
1432
+ if (r.preventDefault(), !t._reportValidity(e)) return;
1421
1433
  let i = t.eventBus.getHandler(n);
1422
1434
  i && i(t._collectFormData(e), r, e);
1423
1435
  };
@@ -1468,13 +1480,17 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
1468
1480
  });
1469
1481
  }
1470
1482
  _doSubmit(e, t) {
1471
- var n = r(e, t);
1472
- if (n) {
1473
- var i = e.getAttribute("data-tokui-sub"), a = this._collectFormData(n);
1483
+ var n = r(e, t), i = e.getAttribute("data-tokui-sub");
1484
+ if (!n) {
1474
1485
  if (i) {
1475
- var o = this.eventBus.getHandler(i);
1476
- o && o(a, null, n);
1486
+ var a = this.eventBus.getHandler(i);
1487
+ a && a(null, null, e);
1477
1488
  }
1489
+ return;
1490
+ }
1491
+ if (this._reportValidity(n) && (i ||= n.getAttribute("data-tokui-sub") || n.getAttribute("data-tokui-clk"), i)) {
1492
+ var o = this.eventBus.getHandler(i);
1493
+ o && o(this._collectFormData(n), null, n);
1478
1494
  }
1479
1495
  }
1480
1496
  _doReset(e, t) {
@@ -2015,12 +2031,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2015
2031
  }
2016
2032
  function y(i, o, s) {
2017
2033
  var c = t.srcLeft(i), l = r / (t.srcRight(o) - c), u = n - l * c;
2018
- if (a.setAttribute("transform", "matrix(" + l + " 0 0 1 " + u + " 0)"), _.s = i, _.e = o, _.sx = l, _.tx = u, E(p), s) {
2019
- t.renderLabels(p, i, o);
2020
- var d = e._tokuiBumpedFs;
2021
- if (d) for (var f = p.querySelectorAll("text"), m = 0; m < f.length; m++) f[m].setAttribute("font-size", d);
2022
- }
2023
- t.onZoom && t.onZoom(i, o, l, u);
2034
+ a.setAttribute("transform", "matrix(" + l + " 0 0 1 " + u + " 0)"), _.s = i, _.e = o, _.sx = l, _.tx = u, E(p), s && (t.renderLabels(p, i, o), ne(p, e)), t.onZoom && t.onZoom(i, o, l, u);
2024
2035
  }
2025
2036
  var x = s("g", { class: "tokui-chart-zoom" });
2026
2037
  d.appendChild(x);
@@ -2094,18 +2105,18 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2094
2105
  L.setAttribute("x", i), L.setAttribute("width", Math.max(2, a - i)), z.setAttribute("x", i - 3), B.setAttribute("x", a - 3);
2095
2106
  }
2096
2107
  G(H, U);
2097
- var ee = typeof window < "u" && typeof window.requestAnimationFrame == "function", K = !1, J = null;
2108
+ var K = typeof window < "u" && typeof window.requestAnimationFrame == "function", q = !1, J = null;
2098
2109
  function te(e, t) {
2099
- J = [e, t], !K && (K = !0, ee ? window.requestAnimationFrame(function() {
2100
- K = !1, J && y(J[0], J[1], !1);
2101
- }) : (K = !1, y(e, t, !1)));
2110
+ J = [e, t], !q && (q = !0, K ? window.requestAnimationFrame(function() {
2111
+ q = !1, J && y(J[0], J[1], !1);
2112
+ }) : (q = !1, y(e, t, !1)));
2102
2113
  }
2103
- function ne(e) {
2114
+ function Y(e) {
2104
2115
  G(H, U);
2105
- var t = q(i, H, U);
2116
+ var t = ee(i, H, U);
2106
2117
  e ? te(t.s, t.e) : (J = null, y(t.s, t.e, !0));
2107
2118
  }
2108
- function Y(t, i) {
2119
+ function re(t, i) {
2109
2120
  t.style.touchAction = "none", t.style.userSelect = "none", t.style.webkitUserDrag = "none";
2110
2121
  function a(a, o) {
2111
2122
  var s = !0, c = a;
@@ -2118,7 +2129,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2118
2129
  var a = U - H, o = (e - c) / r;
2119
2130
  H = b(H + o, 0, 1 - a), U = H + a;
2120
2131
  }
2121
- c = e, ne(!0);
2132
+ c = e, Y(!0);
2122
2133
  }
2123
2134
  }
2124
2135
  function u(t) {
@@ -2129,7 +2140,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2129
2140
  try {
2130
2141
  t.releasePointerCapture(o);
2131
2142
  } catch {}
2132
- ne(!1);
2143
+ Y(!1);
2133
2144
  }
2134
2145
  t.addEventListener("pointermove", u), t.addEventListener("pointerup", d);
2135
2146
  }
@@ -2141,7 +2152,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2141
2152
  a(D(e, n.clientX), n.pointerId);
2142
2153
  });
2143
2154
  }
2144
- return Y(z, "l"), Y(B, "r"), Y(L, "pan"), y(0, i - 1, !0), e._tokuiZoomRelayout = V, {
2155
+ return re(z, "l"), re(B, "r"), re(L, "pan"), y(0, i - 1, !0), e._tokuiZoomRelayout = V, {
2145
2156
  showTip: v,
2146
2157
  winState: _,
2147
2158
  sharedTip: g,
@@ -2245,42 +2256,42 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2245
2256
  }
2246
2257
  return e[n] === void 0 ? r : +e[n];
2247
2258
  }
2248
- var W = 38;
2249
- function G(e, t, n, r, i) {
2250
- var a = e.length, o = n || 30;
2251
- if (!a) return {
2259
+ var W = 38, G = 12;
2260
+ function K(e, t, n, r, i, a) {
2261
+ var o = e.length, s = n || 30;
2262
+ if (!o) return {
2252
2263
  rotate: !1,
2253
- padB: o,
2264
+ padB: s,
2254
2265
  interval: 1
2255
2266
  };
2256
- for (var s = r || t * a, c = 0, l = 0; l < a; l++) if (!(e[l] == null || e[l] === "")) {
2257
- var u = N(String(e[l]));
2258
- u > c && (c = u);
2267
+ for (var c = r || t * o, l = 0, u = 0; u < o; u++) if (!(e[u] == null || e[u] === "")) {
2268
+ var d = N(String(e[u]));
2269
+ d > l && (l = d);
2259
2270
  }
2260
- var d = I / L * c, f = Math.max(W, d * 1.15), p = Math.max(W * .72, d * .72), m = Math.max(1, Math.floor(s / f)), h = Math.max(1, Math.floor(s / p)), g = 1, _ = !1, v = i === void 0 ? "auto" : String(i);
2261
- if (v === "0") g = 1, _ = a > m && (a <= h || a <= 10);
2262
- else if (v === "auto") a <= m ? (g = 1, _ = !1) : a <= 10 || a <= h ? (g = 1, _ = !0) : (g = Math.ceil(a / m), _ = !1);
2271
+ var f = I / L * l, p = Math.max(W, f * 1.15), m = Math.max(W * .72, f * .72), h = Math.max(1, Math.floor(c / p)), g = Math.max(1, Math.floor(c / m)), _ = 1, v = !1, y = i === void 0 ? "auto" : String(i);
2272
+ if (y === "0") _ = 1, v = o > h && (o <= g || o <= 10);
2273
+ else if (y === "auto") o <= h ? (_ = 1, v = !1) : o <= 10 || o <= g ? (_ = 1, v = !0) : (_ = Math.ceil(o / h), v = !1);
2263
2274
  else {
2264
- var y = parseInt(v, 10);
2265
- !isNaN(y) && y > 1 ? (g = y, _ = Math.ceil(a / g) > m && Math.ceil(a / g) <= h) : (g = 1, _ = a > m);
2275
+ var b = parseInt(y, 10);
2276
+ !isNaN(b) && b > 1 ? (_ = b, v = Math.ceil(o / _) > h && Math.ceil(o / _) <= g) : (_ = 1, v = o > h);
2266
2277
  }
2267
- return _ && (o = Math.max(n || 30, 52)), {
2268
- rotate: _,
2269
- padB: o,
2270
- interval: g
2278
+ return v && (s = Math.max(n || 30, Math.ceil(G + f * Math.SQRT1_2 + 3 + (a ? G : 0)))), {
2279
+ rotate: v,
2280
+ padB: s,
2281
+ interval: _
2271
2282
  };
2272
2283
  }
2273
- var ee = 30;
2274
- function K(e, t) {
2284
+ var q = 30;
2285
+ function J(e, t) {
2275
2286
  var n = e.zoom;
2276
2287
  if (n === void 0) return !1;
2277
2288
  var r = String(n);
2278
- if (r === "" || r === "auto" || r === "on" || r === "true") return t > ee;
2289
+ if (r === "" || r === "auto" || r === "on" || r === "true") return t > q;
2279
2290
  if (r === "off" || r === "false" || r === "0") return !1;
2280
2291
  var i = parseInt(r, 10);
2281
- return isNaN(i) ? t > ee : t > i;
2292
+ return isNaN(i) ? t > q : t > i;
2282
2293
  }
2283
- function q(e, t, n) {
2294
+ function ee(e, t, n) {
2284
2295
  if (e <= 1) return {
2285
2296
  s: 0,
2286
2297
  e: Math.max(0, e - 1)
@@ -2296,7 +2307,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2296
2307
  e: i
2297
2308
  };
2298
2309
  }
2299
- function J(e, t, n, r, i, a, o) {
2310
+ function te(e, t, n, r) {
2311
+ return n ? e - t + G : e - 8 - (r ? 12 : 0);
2312
+ }
2313
+ function Y(e, t, n, r, i, a, o) {
2300
2314
  var c = (i || 40) * .9, l = typeof a == "boolean", u = o && o > 1 ? o : 1, d = t.length - 1;
2301
2315
  t.forEach(function(t, i) {
2302
2316
  if (!(t == null || t === "") && !(u > 1 && !(i === 0 || i === d || i % u === 0))) {
@@ -2311,7 +2325,11 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2311
2325
  }
2312
2326
  });
2313
2327
  }
2314
- function te(e, t, n, r, i) {
2328
+ function ne(e, t) {
2329
+ var n = t && t._tokuiBumpedFs;
2330
+ if (n > 0) for (var r = e.querySelectorAll("text"), i = 0; i < r.length; i++) r[i].setAttribute("font-size", n);
2331
+ }
2332
+ function re(e, t, n, r, i) {
2315
2333
  var a = s("text", {
2316
2334
  x: n,
2317
2335
  y: r,
@@ -2321,7 +2339,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2321
2339
  });
2322
2340
  i && a.setAttribute("transform", "rotate(-90 " + n + " " + r + ")"), a.textContent = t, e.appendChild(a);
2323
2341
  }
2324
- function ne(e, t, n, r) {
2342
+ function ie(e, t, n, r) {
2325
2343
  var i = typeof window < "u" && typeof window.requestAnimationFrame == "function", a = i && window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2326
2344
  if (!(n > 0) || !i || a) {
2327
2345
  r(t);
@@ -2335,25 +2353,25 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2335
2353
  }
2336
2354
  window.requestAnimationFrame(s);
2337
2355
  }
2338
- function Y(e) {
2356
+ function ae(e) {
2339
2357
  return e = String(e).replace("#", ""), e.length === 3 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), /^[0-9a-fA-F]{6}$/.test(e) ? [
2340
2358
  parseInt(e.slice(0, 2), 16),
2341
2359
  parseInt(e.slice(2, 4), 16),
2342
2360
  parseInt(e.slice(4, 6), 16)
2343
2361
  ] : null;
2344
2362
  }
2345
- function re(e, t, n) {
2346
- var r = Y(e), i = Y(t);
2363
+ function oe(e, t, n) {
2364
+ var r = ae(e), i = ae(t);
2347
2365
  if (!r || !i) return e;
2348
2366
  var a = Math.round(r[0] + (i[0] - r[0]) * n), o = Math.round(r[1] + (i[1] - r[1]) * n), s = Math.round(r[2] + (i[2] - r[2]) * n);
2349
2367
  return "rgb(" + a + "," + o + "," + s + ")";
2350
2368
  }
2351
- function ie(e, t) {
2369
+ function X(e, t) {
2352
2370
  if (t = b(t, 0, 1), e.length === 1) return e[0];
2353
2371
  var n = t * (e.length - 1), r = Math.min(e.length - 2, Math.floor(n));
2354
- return re(e[r], e[r + 1], n - r);
2372
+ return oe(e[r], e[r + 1], n - r);
2355
2373
  }
2356
- function ae(e, t, r, i) {
2374
+ function se(e, t, r, i) {
2357
2375
  var a = i.orient === "h" || i.orientation === "h", c = i.stack !== void 0 || i.stacked !== void 0, l = f(i.d);
2358
2376
  if (l.length || (l = [e]), l.every(function(e) {
2359
2377
  return !e.length;
@@ -2362,7 +2380,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2362
2380
  return e.length;
2363
2381
  })), d, p;
2364
2382
  a ? (d = parseInt(i.w) || 480, p = x(i, "h", u, 36, 26, 200, 1200)) : (d = x(i, "w", u, 52, 26, 360, 2400), p = S(d, parseInt(i.h) || 200, 4, 560));
2365
- var m = l.length > 1, h = !a && K(i, u), g = h ? 28 : 0, _ = p + (m ? o : 0) + g, v = 0, y = 0;
2383
+ var m = l.length > 1, h = !a && J(i, u), g = h ? 28 : 0, _ = p + (m ? o : 0) + g, v = 0, y = 0;
2366
2384
  if (c) for (var O = 0; O < u; O++) {
2367
2385
  var k = 0, A = 0;
2368
2386
  l.forEach(function(e) {
@@ -2387,43 +2405,43 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2387
2405
  }
2388
2406
  var R = [], z = [];
2389
2407
  if (a) {
2390
- var B = 70, V = i.xl ? 30 : 22, H = 14, W = i.yl ? 30 : 16, ee = d - B - W, ne = p - H - V, Y = ne / u, re = Math.max(3, c ? Y * .6 : Y * .6 / l.length);
2408
+ var B = 70, V = i.xl ? 30 : 22, H = 14, W = i.yl ? 30 : 16, G = d - B - W, q = p - H - V, ie = q / u, ae = Math.max(3, c ? ie * .6 : ie * .6 / l.length);
2391
2409
  function e(e) {
2392
- return B + ee * (e - y) / N;
2410
+ return B + G * (e - y) / N;
2393
2411
  }
2394
- for (var ie = 0; ie <= 4; ie++) {
2395
- var ae = y + N * ie / 4, X = e(ae);
2412
+ for (var oe = 0; oe <= 4; oe++) {
2413
+ var X = y + N * oe / 4, se = e(X);
2396
2414
  P.appendChild(s("line", {
2397
- x1: X,
2415
+ x1: se,
2398
2416
  y1: H,
2399
- x2: X,
2400
- y2: H + ne,
2417
+ x2: se,
2418
+ y2: H + q,
2401
2419
  stroke: "var(--tokui-chart-grid, #e8e8e8)",
2402
2420
  "stroke-width": 1
2403
2421
  })), P.appendChild(s("text", {
2404
- x: X,
2405
- y: H + ne + 10,
2422
+ x: se,
2423
+ y: H + q + 10,
2406
2424
  "text-anchor": "middle",
2407
2425
  fill: "var(--tokui-chart-text, #999)",
2408
2426
  "font-size": "9"
2409
- })).textContent = Math.round(ae);
2427
+ })).textContent = Math.round(X);
2410
2428
  }
2411
2429
  l.forEach(function(a, o) {
2412
2430
  a.forEach(function(a, u) {
2413
2431
  if (a != null) {
2414
- var d = L(o, u, a), f = e(d[0]), p = Math.max(0, e(d[1]) - f), m = H + u * Y + Y * .2 + (c ? 0 : o * re), h = s("g", { class: "tokui-chart-tip-group" });
2432
+ var d = L(o, u, a), f = e(d[0]), p = Math.max(0, e(d[1]) - f), m = H + u * ie + ie * .2 + (c ? 0 : o * ae), h = s("g", { class: "tokui-chart-tip-group" });
2415
2433
  if (h.appendChild(s("rect", {
2416
2434
  x: f,
2417
2435
  y: m,
2418
2436
  width: p,
2419
- height: re - 1,
2437
+ height: ae - 1,
2420
2438
  fill: r[o % r.length],
2421
2439
  rx: 2,
2422
2440
  class: "tokui-chart-bar"
2423
2441
  })), I.add(h, (t[u] || "") + ": " + a + (l.length > 1 ? " (" + n("chart.seriesDefault", { n: o + 1 }) + ")" : ""), f + p / 2, m), P.appendChild(h), i.vals !== void 0) {
2424
2442
  var g = s("text", {
2425
2443
  x: f + p + 3,
2426
- y: m + re / 2 + 2,
2444
+ y: m + ae / 2 + 2,
2427
2445
  "text-anchor": "start",
2428
2446
  fill: "var(--tokui-chart-text, #666)",
2429
2447
  "font-size": "8"
@@ -2434,7 +2452,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2434
2452
  });
2435
2453
  }), t.slice(0, u).forEach(function(e, t) {
2436
2454
  if (!(e == null || e === "")) {
2437
- var n = H + t * Y + Y / 2;
2455
+ var n = H + t * ie + ie / 2;
2438
2456
  P.appendChild(s("text", {
2439
2457
  x: B - 6,
2440
2458
  y: n + 3,
@@ -2443,96 +2461,96 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2443
2461
  "font-size": "9"
2444
2462
  })).textContent = e;
2445
2463
  }
2446
- }), i.xl && te(P, i.xl, B + ee / 2, H + ne + 22, !1), i.yl && te(P, i.yl, 12, H + ne / 2, !0);
2464
+ }), i.xl && re(P, i.xl, B + G / 2, H + q + 22, !1), i.yl && re(P, i.yl, 12, H + q / 2, !0);
2447
2465
  } else {
2448
- var Z = i._padL ? +i._padL : i.yl ? 46 : 40, oe = 12, se = 18, Q = d - Z - oe, ce = Q / u, le = G(t.slice(0, u), ce, i.xl ? 38 : 28, Q, i.interval), ue = le.padB, de = p - se - ue;
2466
+ var Z = i._padL ? +i._padL : i.yl ? 46 : 40, ce = 12, le = 18, Q = d - Z - ce, ue = Q / u, de = K(t.slice(0, u), ue, i.xl ? 38 : 28, Q, i.interval, !!i.xl), fe = de.padB, pe = p - le - fe;
2449
2467
  function e(e) {
2450
- return se + de * (1 - (e - y) / N);
2468
+ return le + pe * (1 - (e - y) / N);
2451
2469
  }
2452
- for (var fe = 0; fe <= 4; fe++) {
2453
- var pe = y + N * fe / 4, me = e(pe);
2470
+ for (var me = 0; me <= 4; me++) {
2471
+ var he = y + N * me / 4, ge = e(he);
2454
2472
  P.appendChild(s("line", {
2455
2473
  x1: Z,
2456
- y1: me,
2457
- x2: d - oe,
2458
- y2: me,
2474
+ y1: ge,
2475
+ x2: d - ce,
2476
+ y2: ge,
2459
2477
  stroke: "var(--tokui-chart-grid, #e8e8e8)",
2460
2478
  "stroke-width": 1
2461
2479
  })), P.appendChild(s("text", {
2462
2480
  x: Z - 4,
2463
- y: me + 4,
2481
+ y: ge + 4,
2464
2482
  "text-anchor": "end",
2465
2483
  fill: "var(--tokui-chart-text, #999)",
2466
2484
  "font-size": "9"
2467
- })).textContent = Math.round(pe);
2485
+ })).textContent = Math.round(he);
2468
2486
  }
2469
2487
  if (y < 0) {
2470
- var he = e(0);
2488
+ var _e = e(0);
2471
2489
  P.appendChild(s("line", {
2472
2490
  x1: Z,
2473
- y1: he,
2474
- x2: d - oe,
2475
- y2: he,
2491
+ y1: _e,
2492
+ x2: d - ce,
2493
+ y2: _e,
2476
2494
  stroke: "var(--tokui-chart-axis, #bbb)",
2477
2495
  "stroke-width": 1
2478
2496
  }));
2479
2497
  }
2480
- var ge = s("g", { class: "tokui-chart-plot" });
2481
- P.appendChild(ge);
2482
- var _e = h && l.length === 1 && !c, ve = null, ye = null, be = null, xe = null, Se = null, Ce = null, we = Q / u, Te = Math.max(4, we * .6), Ee = {
2498
+ var ve = s("g", { class: "tokui-chart-plot" });
2499
+ P.appendChild(ve);
2500
+ var ye = h && l.length === 1 && !c, be = null, xe = null, Se = null, Ce = null, we = null, Te = null, Ee = Q / u, De = Math.max(4, Ee * .6), Oe = {
2483
2501
  s: 0,
2484
2502
  e: u - 1,
2485
2503
  sx: 1,
2486
2504
  tx: 0
2487
2505
  };
2488
- if (_e) {
2489
- var De = "tokui-chart-clip-" + ++F, Oe = s("defs"), k = s("clipPath", { id: De });
2506
+ if (ye) {
2507
+ var ke = "tokui-chart-clip-" + ++F, Ae = s("defs"), k = s("clipPath", { id: ke });
2490
2508
  k.appendChild(s("rect", {
2491
2509
  x: Z - 1,
2492
- y: se - 1,
2510
+ y: le - 1,
2493
2511
  width: Q + 2,
2494
- height: de + 2
2495
- })), Oe.appendChild(k), P.appendChild(Oe);
2496
- var ke = s("g", { "clip-path": "url(#" + De + ")" });
2497
- ge.appendChild(ke), ye = s("g", { class: "tokui-chart-plot-bars" }), ke.appendChild(ye), ve = [];
2498
- for (var Ae = l[0], je = 0; je < u; je++) {
2499
- var Me = Ae[je], Ne = s("rect", {
2500
- x: Z + je * we + we * .2,
2501
- y: e(Me),
2502
- width: Math.max(1, Te - 1),
2503
- height: Math.max(0, Me / N * de),
2512
+ height: pe + 2
2513
+ })), Ae.appendChild(k), P.appendChild(Ae);
2514
+ var je = s("g", { "clip-path": "url(#" + ke + ")" });
2515
+ ve.appendChild(je), xe = s("g", { class: "tokui-chart-plot-bars" }), je.appendChild(xe), be = [];
2516
+ for (var Me = l[0], Ne = 0; Ne < u; Ne++) {
2517
+ var Pe = Me[Ne], Fe = s("rect", {
2518
+ x: Z + Ne * Ee + Ee * .2,
2519
+ y: e(Pe),
2520
+ width: Math.max(1, De - 1),
2521
+ height: Math.max(0, Pe / N * pe),
2504
2522
  rx: 2,
2505
2523
  fill: r[0],
2506
2524
  class: "tokui-chart-bar"
2507
2525
  });
2508
- ye.appendChild(Ne), ve.push(Ne);
2526
+ xe.appendChild(Fe), be.push(Fe);
2509
2527
  }
2510
- be = s("g", { class: "tokui-chart-plot-labels" }), ge.appendChild(be), Se = s("rect", {
2528
+ Se = s("g", { class: "tokui-chart-plot-labels" }), ve.appendChild(Se), we = s("rect", {
2511
2529
  x: 0,
2512
2530
  y: 0,
2513
2531
  width: 0,
2514
2532
  height: 0,
2515
2533
  rx: 4,
2516
2534
  fill: "rgba(0,0,0,0.78)"
2517
- }), Ce = s("text", {
2535
+ }), Te = s("text", {
2518
2536
  "text-anchor": "middle",
2519
2537
  "dominant-baseline": "central",
2520
2538
  fill: "#fff",
2521
2539
  "font-size": "10"
2522
- }), xe = s("g", { class: "tokui-chart-tip tokui-chart-tip--shared" }), xe.appendChild(Se), xe.appendChild(Ce), I.layer.appendChild(xe);
2540
+ }), Ce = s("g", { class: "tokui-chart-tip tokui-chart-tip--shared" }), Ce.appendChild(we), Ce.appendChild(Te), I.layer.appendChild(Ce);
2523
2541
  }
2524
2542
  function a(a, o, d) {
2525
2543
  var f = o - a + 1;
2526
- if (_e) {
2527
- var m = u / f, g = Z - m * (Z + a * we);
2528
- if (ye.setAttribute("transform", "matrix(" + m + " 0 0 1 " + g + " 0)"), Ee.s = a, Ee.e = o, Ee.sx = m, Ee.tx = g, E(be), d) {
2544
+ if (ye) {
2545
+ var m = u / f, g = Z - m * (Z + a * Ee);
2546
+ if (xe.setAttribute("transform", "matrix(" + m + " 0 0 1 " + g + " 0)"), Oe.s = a, Oe.e = o, Oe.sx = m, Oe.tx = g, E(Se), d) {
2529
2547
  for (var _ = Q / f, v = [], y = 0; y < f; y++) v.push(Z + y * _ + _ / 2);
2530
- J(be, t.slice(a, o + 1), v, p - 8, _, le.rotate, le.interval);
2548
+ Y(Se, t.slice(a, o + 1), v, te(p, fe, de.rotate, !!i.xl), _, de.rotate, de.interval), ne(Se, P);
2531
2549
  }
2532
2550
  return;
2533
2551
  }
2534
2552
  var b = Q / f;
2535
- E(ge), d && E(I.layer);
2553
+ E(ve), d && E(I.layer);
2536
2554
  var x = Math.max(4, c ? b * .6 : b * .6 / l.length), S = [], C = [];
2537
2555
  l.forEach(function(u, f) {
2538
2556
  for (var p = a; p <= o; p++) {
@@ -2540,7 +2558,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2540
2558
  if (m != null) {
2541
2559
  var h = c ? m >= 0 ? S[p] || 0 : C[p] || 0 : 0, g = m >= 0 ? h + m : h, _ = m >= 0 ? h : h + m;
2542
2560
  c && (m >= 0 ? S[p] = g : C[p] = _);
2543
- var v = e(g), y = Math.max(0, (g - _) / N * de), w = Z + (p - a) * b + b * .2 + (c ? 0 : f * x), T = s("g", { class: "tokui-chart-tip-group" });
2561
+ var v = e(g), y = Math.max(0, (g - _) / N * pe), w = Z + (p - a) * b + b * .2 + (c ? 0 : f * x), T = s("g", { class: "tokui-chart-tip-group" });
2544
2562
  if (T.appendChild(s("rect", {
2545
2563
  x: w,
2546
2564
  y: v,
@@ -2549,7 +2567,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2549
2567
  fill: r[f % r.length],
2550
2568
  rx: 2,
2551
2569
  class: "tokui-chart-bar"
2552
- })), d && I.add(T, (t[p] || "") + ": " + m + (l.length > 1 ? " (" + n("chart.seriesDefault", { n: f + 1 }) + ")" : ""), w + (x - 1) / 2, v), ge.appendChild(T), i.vals !== void 0) {
2570
+ })), d && I.add(T, (t[p] || "") + ": " + m + (l.length > 1 ? " (" + n("chart.seriesDefault", { n: f + 1 }) + ")" : ""), w + (x - 1) / 2, v), ve.appendChild(T), i.vals !== void 0) {
2553
2571
  var E = s("text", {
2554
2572
  x: w + (x - 1) / 2,
2555
2573
  y: v - 3,
@@ -2557,33 +2575,33 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2557
2575
  fill: "var(--tokui-chart-text, #666)",
2558
2576
  "font-size": "8"
2559
2577
  });
2560
- E.textContent = m, ge.appendChild(E);
2578
+ E.textContent = m, ve.appendChild(E);
2561
2579
  }
2562
2580
  }
2563
2581
  }
2564
2582
  });
2565
2583
  for (var w = [], D = 0; D < f; D++) w.push(Z + D * b + b / 2);
2566
- J(ge, t.slice(a, o + 1), w, p - 8, b, le.rotate, le.interval), d && h && T(ge, P);
2584
+ Y(ve, t.slice(a, o + 1), w, te(p, fe, de.rotate, !!i.xl), b, de.rotate, de.interval), ne(ve, P), d && h && T(ve, P);
2567
2585
  }
2568
- if (a(0, u - 1, !0), _e) {
2586
+ if (a(0, u - 1, !0), ye) {
2569
2587
  function n(e, t, n) {
2570
2588
  for (var r = P._tokuiBumpedFs || 10, i = r / 10, a = 0, o = 0; o < e.length; o++) a += e.charCodeAt(o) > 127 ? 10 : 5.5;
2571
2589
  var s = a * i + 16, c = 18 * i, l = t - s / 2, u = n - c - 6;
2572
- l < 2 && (l = 2), l + s > d - 2 && (l = d - s - 2), u < 2 && (u = n + 10), Se.setAttribute("x", l), Se.setAttribute("y", u), Se.setAttribute("width", s), Se.setAttribute("height", c), Ce.setAttribute("x", l + s / 2), Ce.setAttribute("y", u + c / 2 + 1), Ce.setAttribute("font-size", r), Ce.textContent = e, xe.style.opacity = "1";
2590
+ l < 2 && (l = 2), l + s > d - 2 && (l = d - s - 2), u < 2 && (u = n + 10), we.setAttribute("x", l), we.setAttribute("y", u), we.setAttribute("width", s), we.setAttribute("height", c), Te.setAttribute("x", l + s / 2), Te.setAttribute("y", u + c / 2 + 1), Te.setAttribute("font-size", r), Te.textContent = e, Ce.style.opacity = "1";
2573
2591
  }
2574
- ve.forEach(function(r, i) {
2592
+ be.forEach(function(r, i) {
2575
2593
  r.addEventListener("mouseenter", function() {
2576
2594
  var r = l[0][i];
2577
2595
  if (r != null) {
2578
- var a = Z + i * we + we * .2 + (Te - 1) / 2, o = Ee.sx * a + Ee.tx, s = e(r);
2596
+ var a = Z + i * Ee + Ee * .2 + (De - 1) / 2, o = Oe.sx * a + Oe.tx, s = e(r);
2579
2597
  n((t[i] || "") + ": " + r, o, s);
2580
2598
  }
2581
2599
  }), r.addEventListener("mouseleave", function() {
2582
- xe.style.opacity = "";
2600
+ Ce.style.opacity = "";
2583
2601
  });
2584
2602
  });
2585
2603
  }
2586
- i.xl && te(P, i.xl, Z + Q / 2, p - 8 + (le.rotate ? 26 : 12), !1), i.yl && te(P, i.yl, 12, se + de / 2, !0), h && (function() {
2604
+ i.xl && re(P, i.xl, Z + Q / 2, p - 3, !1), i.yl && re(P, i.yl, 12, le + pe / 2, !0), h && (function() {
2587
2605
  var e = s("g", { class: "tokui-chart-zoom" });
2588
2606
  P.appendChild(e);
2589
2607
  var t = p + 6, n = 16, r = n - 2;
@@ -2656,7 +2674,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2656
2674
  }
2657
2675
  function O(e) {
2658
2676
  S(_, v);
2659
- var t = q(u, _, v);
2677
+ var t = ee(u, _, v);
2660
2678
  e ? E(t.s, t.e) : (T = null, a(t.s, t.e, !0));
2661
2679
  }
2662
2680
  function k(e, t) {
@@ -2705,14 +2723,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2705
2723
  };
2706
2724
  }), d, p + 6), P.appendChild(I.layer), h || w(P), P;
2707
2725
  }
2708
- function X(e, t, r, i) {
2726
+ function Z(e, t, r, i) {
2709
2727
  var a = i.stack !== void 0 || i.stacked !== void 0, c = i.smooth !== void 0, l = f(i.d);
2710
2728
  if (l.length || (l = [e]), l.every(function(e) {
2711
2729
  return !e.length;
2712
2730
  })) return M(parseInt(i.w) || 400, parseInt(i.h) || 200);
2713
2731
  var u = Math.max.apply(null, l.map(function(e) {
2714
2732
  return e.length;
2715
- })), d = x(i, "w", u, 52, 24, 360, 2400), p = S(d, parseInt(i.h) || 200, 4, 560), m = l.length > 1, h = K(i, u), g = h ? 28 : 0, _ = p + (m ? o : 0) + g, v = l.map(function(e) {
2733
+ })), d = x(i, "w", u, 52, 24, 360, 2400), p = S(d, parseInt(i.h) || 200, 4, 560), m = l.length > 1, h = J(i, u), g = h ? 28 : 0, _ = p + (m ? o : 0) + g, v = l.map(function(e) {
2716
2734
  return e.slice();
2717
2735
  });
2718
2736
  if (a) for (var y = 1; y < v.length; y++) for (var b = 0; b < u; b++) v[y][b] = (v[y][b] || 0) + (v[y - 1][b] || 0);
@@ -2722,7 +2740,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2722
2740
  e > T && (T = e), e < E && (E = e);
2723
2741
  });
2724
2742
  }), E === Infinity && (E = 0), E > 0 && !a && (E = 0);
2725
- var D = T - E || 1, O = 12, N = 18, P = i._padL ? +i._padL : i.yl ? 46 : 40, F = d - P - O, I = u > 1 ? F / (u - 1) : F, L = G(t.slice(0, u), I, i.xl ? 38 : 28, F, i.interval), R = L.padB, z = p - N - R, B = s("svg", {
2743
+ var D = T - E || 1, O = 12, N = 18, P = i._padL ? +i._padL : i.yl ? 46 : 40, F = d - P - O, I = u > 1 ? F / (u - 1) : F, L = K(t.slice(0, u), I, i.xl ? 38 : 28, F, i.interval, !!i.xl), R = L.padB, z = p - N - R, B = s("svg", {
2726
2744
  viewBox: "0 0 " + d + " " + _,
2727
2745
  class: "tokui-chart__svg",
2728
2746
  preserveAspectRatio: "xMidYMid meet"
@@ -2734,7 +2752,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2734
2752
  return N + z * (1 - (e - E) / D);
2735
2753
  }
2736
2754
  for (var W = 0; W <= 4; W++) {
2737
- var ee = E + D * W / 4, q = U(ee);
2755
+ var G = E + D * W / 4, q = U(G);
2738
2756
  B.appendChild(s("line", {
2739
2757
  x1: P,
2740
2758
  y1: q,
@@ -2748,9 +2766,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2748
2766
  "text-anchor": "end",
2749
2767
  fill: "var(--tokui-chart-text, #999)",
2750
2768
  "font-size": "9"
2751
- })).textContent = Math.round(ee * 10) / 10;
2769
+ })).textContent = Math.round(G * 10) / 10;
2752
2770
  }
2753
- function ne(e) {
2771
+ function ee(e) {
2754
2772
  if (e.length < 2) return e.length ? "M" + e[0].x + "," + e[0].y : "";
2755
2773
  if (e.length === 2) return "M" + e[0].x + "," + e[0].y + " L" + e[1].x + "," + e[1].y;
2756
2774
  for (var t = "M" + e[0].x + "," + e[0].y, n = 0; n < e.length - 1; n++) {
@@ -2759,11 +2777,11 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2759
2777
  }
2760
2778
  return t;
2761
2779
  }
2762
- var Y = h ? s("g", { class: "tokui-chart-plot" }) : null;
2763
- Y && B.appendChild(Y);
2764
- var re = h ? s("g", { class: "tokui-chart-plot-dots" }) : null;
2765
- re && B.appendChild(re);
2766
- var ie = Y || B, ae = [];
2780
+ var ne = h ? s("g", { class: "tokui-chart-plot" }) : null;
2781
+ ne && B.appendChild(ne);
2782
+ var ie = h ? s("g", { class: "tokui-chart-plot-dots" }) : null;
2783
+ ie && B.appendChild(ie);
2784
+ var ae = ne || B, oe = [];
2767
2785
  if (v.forEach(function(e, t) {
2768
2786
  for (var n = [], o = 0; o < e.length; o++) {
2769
2787
  var u = e[o];
@@ -2784,7 +2802,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2784
2802
  p += " L" + e.x + "," + e.y;
2785
2803
  });
2786
2804
  for (var m = d.length - 1; m >= 0; m--) p += " L" + d[m].x + "," + d[m].y;
2787
- p += " Z", ie.appendChild(s("path", {
2805
+ p += " Z", ae.appendChild(s("path", {
2788
2806
  d: p,
2789
2807
  fill: r[t % r.length],
2790
2808
  opacity: "0.4"
@@ -2793,20 +2811,20 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2793
2811
  var g = U(Math.max(0, E)), _ = "M" + n[0].x + "," + g;
2794
2812
  n.forEach(function(e) {
2795
2813
  _ += " L" + e.x + "," + e.y;
2796
- }), _ += " L" + n[n.length - 1].x + "," + g + " Z", ie.appendChild(s("path", {
2814
+ }), _ += " L" + n[n.length - 1].x + "," + g + " Z", ae.appendChild(s("path", {
2797
2815
  d: _,
2798
2816
  fill: r[t % r.length],
2799
2817
  opacity: "0.15"
2800
2818
  }));
2801
2819
  }
2802
- c ? ie.appendChild(s("path", {
2803
- d: ne(n),
2820
+ c ? ae.appendChild(s("path", {
2821
+ d: ee(n),
2804
2822
  fill: "none",
2805
2823
  stroke: r[t % r.length],
2806
2824
  "stroke-width": 2,
2807
2825
  "stroke-linejoin": "round",
2808
2826
  "stroke-linecap": "round"
2809
- })) : ie.appendChild(s("polyline", {
2827
+ })) : ae.appendChild(s("polyline", {
2810
2828
  points: n.map(function(e) {
2811
2829
  return e.x + "," + e.y;
2812
2830
  }).join(" "),
@@ -2817,7 +2835,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2817
2835
  }));
2818
2836
  var y = l[t];
2819
2837
  n.forEach(function(n) {
2820
- var a = h ? re : B, o = s("circle", {
2838
+ var a = h ? ie : B, o = s("circle", {
2821
2839
  cx: n.x,
2822
2840
  cy: n.y,
2823
2841
  r: 3,
@@ -2826,12 +2844,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2826
2844
  "stroke-width": 2,
2827
2845
  class: "tokui-chart-dot"
2828
2846
  });
2829
- a.appendChild(o), h && ae.push({
2847
+ a.appendChild(o), h && oe.push({
2830
2848
  circle: o,
2831
2849
  idx: n.idx,
2832
2850
  x: n.x,
2833
2851
  si: t
2834
- }), i.vals !== void 0 && (ie.appendChild(s("text", {
2852
+ }), i.vals !== void 0 && (ae.appendChild(s("text", {
2835
2853
  x: n.x,
2836
2854
  y: n.y - 6,
2837
2855
  "text-anchor": "middle",
@@ -2842,7 +2860,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2842
2860
  }
2843
2861
  }), h) {
2844
2862
  var X = A(B, {
2845
- plotG: Y,
2863
+ plotG: ne,
2846
2864
  tipLayer: V.layer,
2847
2865
  padL: P,
2848
2866
  cw: F,
@@ -2867,17 +2885,17 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2867
2885
  valMin: E,
2868
2886
  range: D,
2869
2887
  renderLabels: function(e, n, r) {
2870
- for (var i = r - n, a = [], o = n; o <= r; o++) a.push(i > 0 ? P + (o - n) * F / i : P + F / 2);
2871
- J(e, t.slice(n, r + 1), a, p - 8, I, L.rotate, L.interval);
2888
+ for (var a = r - n, o = [], s = n; s <= r; s++) o.push(a > 0 ? P + (s - n) * F / a : P + F / 2);
2889
+ Y(e, t.slice(n, r + 1), o, te(p, R, L.rotate, !!i.xl), I, L.rotate, L.interval);
2872
2890
  },
2873
2891
  onZoom: function(e, t, n, r) {
2874
- for (var i = 0; i < ae.length; i++) {
2875
- var a = ae[i];
2892
+ for (var i = 0; i < oe.length; i++) {
2893
+ var a = oe[i];
2876
2894
  a.circle.setAttribute("cx", n * a.x + r);
2877
2895
  }
2878
2896
  }
2879
2897
  });
2880
- X.clipG.appendChild(re), k({
2898
+ X.clipG.appendChild(ie), k({
2881
2899
  svg: B,
2882
2900
  padL: P,
2883
2901
  padT: N,
@@ -2912,8 +2930,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2912
2930
  }
2913
2931
  });
2914
2932
  } else {
2915
- for (var Z = [], oe = 0; oe < u; oe++) Z.push(H(oe));
2916
- J(B, t.slice(0, u), Z, p - 8, I, L.rotate, L.interval), k({
2933
+ for (var se = [], Z = 0; Z < u; Z++) se.push(H(Z));
2934
+ Y(B, t.slice(0, u), se, te(p, R, L.rotate, !!i.xl), I, L.rotate, L.interval), k({
2917
2935
  svg: B,
2918
2936
  padL: P,
2919
2937
  padT: N,
@@ -2945,14 +2963,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2945
2963
  }
2946
2964
  });
2947
2965
  }
2948
- return i.xl && te(B, i.xl, P + F / 2, p - 8 + (L.rotate ? 26 : 12), !1), i.yl && te(B, i.yl, 12, N + z / 2, !0), m && j(B, l.map(function(e, t) {
2966
+ return i.xl && re(B, i.xl, P + F / 2, p - 3, !1), i.yl && re(B, i.yl, 12, N + z / 2, !0), m && j(B, l.map(function(e, t) {
2949
2967
  return {
2950
2968
  color: r[t % r.length],
2951
2969
  text: n("chart.seriesDefault", { n: t + 1 })
2952
2970
  };
2953
2971
  }), d, p + 6), B.appendChild(V.layer), h || w(B), B;
2954
2972
  }
2955
- function Z(e, t, n, r, i) {
2973
+ function ce(e, t, n, r, i) {
2956
2974
  var a = 10, s = 12, c = 4, l = 4;
2957
2975
  r > 0 || (r = 7);
2958
2976
  var u = 0;
@@ -2982,14 +3000,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2982
3000
  totalH: (g + _) * 2 + o
2983
3001
  };
2984
3002
  }
2985
- function oe(e, t, r, i) {
3003
+ function le(e, t, r, i) {
2986
3004
  var a = parseInt(i.w) || 280, c = parseInt(i.h) || 280;
2987
3005
  if (!e.length) return M(a, c + o);
2988
3006
  var l = e.reduce(function(e, t) {
2989
3007
  return e + t;
2990
3008
  }, 0) || 1, u = i._pieFs !== void 0 && i._pieFs !== "" ? parseFloat(i._pieFs) : 7;
2991
3009
  (!(u > 0) || !isFinite(u)) && (u = 7);
2992
- var d = Z(e, t, i, u, l), f = [], p = -Math.PI / 2;
3010
+ var d = ce(e, t, i, u, l), f = [], p = -Math.PI / 2;
2993
3011
  e.forEach(function(e, t) {
2994
3012
  var n = e / l * 2 * Math.PI;
2995
3013
  f.push({
@@ -3057,7 +3075,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3057
3075
  };
3058
3076
  }), d.W, d.H + 6, d.fs), _.appendChild(v.layer), w(_), _;
3059
3077
  }
3060
- function se(e, t, r, i) {
3078
+ function Q(e, t, r, i) {
3061
3079
  var a = parseInt(i.w) || 240, c = parseInt(i.h) || 240, l = c + o, u = a / 2, d = c / 2, p = f(i.d);
3062
3080
  if (p.length || (p = [e]), p.every(function(e) {
3063
3081
  return !e.length;
@@ -3099,7 +3117,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3099
3117
  };
3100
3118
  }), a, c + 6), g.appendChild(_.layer), w(g), g;
3101
3119
  }
3102
- function Q(e, t, r, i) {
3120
+ function ue(e, t, r, i) {
3103
3121
  var a = e.length, o = parseInt(i.w) || 480, c = parseInt(i.h) || 320;
3104
3122
  if (!a) return M(o, c);
3105
3123
  var l = 14, u = 12, d = 14, f = c - l - u, p = a ? f / a : f, m = e[0] || 0, h = v(e) || 1, g = Math.round(o * .6), _ = g - d - 6, y = d + _ / 2, b = g + 10, x = s("svg", {
@@ -3170,7 +3188,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3170
3188
  S.add(O, T + ": " + i + " (" + n("chart.conversion", { pct: w }) + ")", y, C), x.appendChild(O);
3171
3189
  }), x.appendChild(S.layer), w(x), x;
3172
3190
  }
3173
- function ce(e, t, r, i) {
3191
+ function de(e, t, r, i) {
3174
3192
  var a = parseInt(i.w) || 280, o = parseInt(i.h) || 200, c = a / 2, l = parseInt(i.range, 10);
3175
3193
  (isNaN(l) || l !== 180 && l !== 270 && l !== 360) && (l = 180);
3176
3194
  var u = l * Math.PI / 180, d = 1.5 * Math.PI, f = d - u / 2, p = d + u / 2, _ = l === 180 ? o - 34 : o / 2, v = _, y = Math.max(0, Math.sin(f)), x = l === 180 ? Math.max(40, Math.min(c - 34, _ - 24)) : Math.max(36, Math.min(c - 30, (o - 28) / (1 + y + .35))), S = parseFloat(i.min);
@@ -3245,24 +3263,24 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3245
3263
  }));
3246
3264
  var G = parseInt(i.ticks, 10);
3247
3265
  isNaN(G) && (G = 6);
3248
- var ee = {};
3266
+ var K = {};
3249
3267
  [S, T].concat(M).forEach(function(e) {
3250
- ee[Math.round(e * 100) / 100] = !0;
3268
+ K[Math.round(e * 100) / 100] = !0;
3251
3269
  });
3252
- for (var K = 0; K <= G; K++) {
3253
- var q = f + K / G * (p - f), J = K === 0 || K === G, te = L(q, x - V / 2 - 1), Y = L(q, x + V / 2 + 2);
3270
+ for (var q = 0; q <= G; q++) {
3271
+ var J = f + q / G * (p - f), ee = q === 0 || q === G, te = L(J, x - V / 2 - 1), Y = L(J, x + V / 2 + 2);
3254
3272
  H.appendChild(s("line", {
3255
3273
  x1: te[0],
3256
3274
  y1: te[1],
3257
3275
  x2: Y[0],
3258
3276
  y2: Y[1],
3259
3277
  stroke: "var(--tokui-chart-text, #bbb)",
3260
- "stroke-width": J ? 1.2 : .6,
3261
- opacity: J ? .8 : .35
3278
+ "stroke-width": ee ? 1.2 : .6,
3279
+ opacity: ee ? .8 : .35
3262
3280
  }));
3263
- var re = S + K / G * E, ie = Math.round(re * 100) / 100;
3264
- if (J || ee[ie]) {
3265
- var ae = L(q, x + V / 2 + 12), X = s("text", {
3281
+ var ne = S + q / G * E, re = Math.round(ne * 100) / 100;
3282
+ if (ee || K[re]) {
3283
+ var ae = L(J, x + V / 2 + 12), oe = s("text", {
3266
3284
  x: ae[0],
3267
3285
  y: ae[1],
3268
3286
  "text-anchor": "middle",
@@ -3270,24 +3288,24 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3270
3288
  fill: "var(--tokui-chart-text, #999)",
3271
3289
  "font-size": "8"
3272
3290
  });
3273
- X.textContent = k > 0 ? re.toFixed(k) : Math.round(re), H.appendChild(X);
3291
+ oe.textContent = k > 0 ? ne.toFixed(k) : Math.round(ne), H.appendChild(oe);
3274
3292
  }
3275
3293
  }
3276
- var Z = s("g", { class: "tokui-chart-tip-group" }), oe = s("path", {
3294
+ var X = s("g", { class: "tokui-chart-tip-group" }), se = s("path", {
3277
3295
  fill: "none",
3278
3296
  stroke: I,
3279
3297
  "stroke-width": V,
3280
3298
  "stroke-linecap": "round",
3281
3299
  class: "tokui-chart-gauge-arc"
3282
3300
  });
3283
- Z.appendChild(oe), U.add(Z, (i.l || n("gauge.currentValue")) + ": " + B(D) + O + " (" + Math.round(b((D - S) / E, 0, 1) * 100) + "%)", c, v - x), H.appendChild(Z);
3284
- var se = s("line", {
3301
+ X.appendChild(se), U.add(X, (i.l || n("gauge.currentValue")) + ": " + B(D) + O + " (" + Math.round(b((D - S) / E, 0, 1) * 100) + "%)", c, v - x), H.appendChild(X);
3302
+ var Z = s("line", {
3285
3303
  stroke: I,
3286
3304
  "stroke-width": 2.5,
3287
3305
  "stroke-linecap": "round",
3288
3306
  class: "tokui-chart-gauge-needle"
3289
3307
  });
3290
- H.appendChild(se), H.appendChild(s("circle", {
3308
+ H.appendChild(Z), H.appendChild(s("circle", {
3291
3309
  cx: c,
3292
3310
  cy: v,
3293
3311
  r: 5,
@@ -3296,9 +3314,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3296
3314
  "stroke-width": 1.5,
3297
3315
  class: "tokui-chart-gauge-hub"
3298
3316
  }));
3299
- var Q = v - x * (l === 180 ? .5 : l === 270 ? .2 : .12), ce = s("text", {
3317
+ var ce = v - x * (l === 180 ? .5 : l === 270 ? .2 : .12), le = s("text", {
3300
3318
  x: c,
3301
- y: Q,
3319
+ y: ce,
3302
3320
  "text-anchor": "middle",
3303
3321
  "dominant-baseline": "central",
3304
3322
  fill: "var(--tokui-text, #333)",
@@ -3306,24 +3324,24 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3306
3324
  "font-weight": "700",
3307
3325
  class: "tokui-chart-gauge-value tokui-chart-gauge-label"
3308
3326
  });
3309
- H.appendChild(ce);
3310
- var le = Q + 20;
3327
+ H.appendChild(le);
3328
+ var Q = ce + 20;
3311
3329
  if (i.l) {
3312
3330
  var ue = s("text", {
3313
3331
  x: c,
3314
- y: le,
3332
+ y: Q,
3315
3333
  "text-anchor": "middle",
3316
3334
  "dominant-baseline": "central",
3317
3335
  fill: "var(--tokui-chart-text, #999)",
3318
3336
  "font-size": "10",
3319
3337
  class: "tokui-chart-gauge-label"
3320
3338
  });
3321
- ue.textContent = i.l, H.appendChild(ue), le += 15;
3339
+ ue.textContent = i.l, H.appendChild(ue), Q += 15;
3322
3340
  }
3323
3341
  if (i.status && j[i.status]) {
3324
3342
  var de = s("text", {
3325
3343
  x: c,
3326
- y: le,
3344
+ y: Q,
3327
3345
  "text-anchor": "middle",
3328
3346
  "dominant-baseline": "central",
3329
3347
  fill: A[i.status],
@@ -3348,13 +3366,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3348
3366
  H.appendChild(U.layer);
3349
3367
  function pe(e) {
3350
3368
  var t = z(e);
3351
- oe.setAttribute("d", R(f, t, x));
3369
+ se.setAttribute("d", R(f, t, x));
3352
3370
  var n = L(t, x - V / 2 - 3);
3353
- se.setAttribute("x1", c), se.setAttribute("y1", v), se.setAttribute("x2", n[0]), se.setAttribute("y2", n[1]), ce.textContent = B(e) + O;
3371
+ Z.setAttribute("x1", c), Z.setAttribute("y1", v), Z.setAttribute("x2", n[0]), Z.setAttribute("y2", n[1]), le.textContent = B(e) + O;
3354
3372
  }
3355
- return w(H), ne(S, D, parseInt(i.anim, 10) || 0, pe), H;
3373
+ return w(H), ie(S, D, parseInt(i.anim, 10) || 0, pe), H;
3356
3374
  }
3357
- function le(e, t, r, i) {
3375
+ function fe(e, t, r, i) {
3358
3376
  var a = parseInt(i.w) || 240, c = parseInt(i.h) || 240, l = a / 2, u = c / 2, d = f(i.d);
3359
3377
  if (d.length || (d = [e]), d.every(function(e) {
3360
3378
  return !e.length;
@@ -3438,7 +3456,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3438
3456
  };
3439
3457
  }), a, c + 6), v.appendChild(y.layer), w(v), v;
3440
3458
  }
3441
- function ue(e, t, n, r) {
3459
+ function pe(e, t, n, r) {
3442
3460
  var i = p(r.d);
3443
3461
  if (!i.length) return M(parseInt(r.w) || 400, parseInt(r.h) || 200);
3444
3462
  for (var a = x(r, "w", i.length, 50, 22, 360, 2400), o = S(a, parseInt(r.h) || 200, 4, 560), c = o, l = 40, u = 30, d = 18, f = 10, m = a - l - f, h = o - d - u, g = r.xl || "X", _ = r.yl || "Y", b = U(r, "xmin", "_xMin", y(i.map(function(e) {
@@ -3495,10 +3513,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3495
3513
  o.textContent = e.x + "," + e.y, A.appendChild(o);
3496
3514
  }), A.appendChild(j.layer), w(A), A;
3497
3515
  }
3498
- function de(e) {
3516
+ function me(e) {
3499
3517
  return /[-/]/.test(String(e));
3500
3518
  }
3501
- function fe(e, t) {
3519
+ function he(e, t) {
3502
3520
  if (e === void 0 || e === "") return NaN;
3503
3521
  if (t === "dates") {
3504
3522
  var n = new Date(e);
@@ -3507,14 +3525,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3507
3525
  var r = parseFloat(e);
3508
3526
  return isNaN(r) ? NaN : r;
3509
3527
  }
3510
- function pe(e) {
3528
+ function ge(e) {
3511
3529
  return e ? String(e).split("|").map(function(e) {
3512
3530
  return e.split(",").map(function(e) {
3513
3531
  return e.trim();
3514
3532
  });
3515
3533
  }) : [];
3516
3534
  }
3517
- function me(e) {
3535
+ function _e(e) {
3518
3536
  return e ? String(e).split(",").map(function(e) {
3519
3537
  var t = e.trim().split("->");
3520
3538
  return [parseInt(t[0], 10), parseInt(t[1], 10)];
@@ -3522,31 +3540,31 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3522
3540
  return !isNaN(e[0]) && !isNaN(e[1]);
3523
3541
  }) : [];
3524
3542
  }
3525
- function he(e, t) {
3543
+ function ve(e, t) {
3526
3544
  return e ? String(e).split("|").map(function(e) {
3527
3545
  var n = e.split(",").map(function(e) {
3528
3546
  return e.trim();
3529
3547
  });
3530
3548
  return {
3531
3549
  name: n[0] || "",
3532
- time: fe(n[1], t),
3550
+ time: he(n[1], t),
3533
3551
  group: parseInt(n[2], 10) || 0
3534
3552
  };
3535
3553
  }) : [];
3536
3554
  }
3537
- function ge(e) {
3555
+ function ye(e) {
3538
3556
  return e ? String(e).split("|").map(function(e) {
3539
3557
  return e.trim();
3540
3558
  }).filter(function(e) {
3541
3559
  return e !== "";
3542
3560
  }) : [];
3543
3561
  }
3544
- function _e(e) {
3545
- var t = parseInt(e.w) || 1080, r = pe(e.tasks);
3562
+ function be(e) {
3563
+ var t = parseInt(e.w) || 1080, r = ge(e.tasks);
3546
3564
  if (!r.length) return { empty: !0 };
3547
- var i = e.mode === "days" || e.mode === "dates" ? e.mode : de(r[0][1]) ? "dates" : "days", a = [], s = 0;
3565
+ var i = e.mode === "days" || e.mode === "dates" ? e.mode : me(r[0][1]) ? "dates" : "days", a = [], s = 0;
3548
3566
  if (r.forEach(function(e, t) {
3549
- var r = fe(e[1], i), o = fe(e[2], i);
3567
+ var r = he(e[1], i), o = he(e[2], i);
3550
3568
  if (isNaN(r) || isNaN(o)) {
3551
3569
  s++;
3552
3570
  return;
@@ -3571,10 +3589,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3571
3589
  }))) : (c = 0, l = Math.ceil(Math.max.apply(null, a.map(function(e) {
3572
3590
  return e.end;
3573
3591
  })))), isFinite(l) || (l = 1);
3574
- var u = l - c || 1, d = he(e.ms, i).filter(function(e) {
3592
+ var u = l - c || 1, d = ve(e.ms, i).filter(function(e) {
3575
3593
  return !isNaN(e.time);
3576
- }), f = ge(e.gnames), p = {}, m = {};
3577
- me(e.deps).forEach(function(e) {
3594
+ }), f = ye(e.gnames), p = {}, m = {};
3595
+ _e(e.deps).forEach(function(e) {
3578
3596
  var t = e[0], n = e[1];
3579
3597
  t < 0 || t >= a.length || n < 0 || n >= a.length || ((m[t] = m[t] || []).push(n), (p[n] = p[n] || []).push(t));
3580
3598
  });
@@ -3619,14 +3637,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3619
3637
  }
3620
3638
  };
3621
3639
  }
3622
- function ve(e, t) {
3640
+ function xe(e, t) {
3623
3641
  if (t === "dates") {
3624
3642
  var n = new Date(e);
3625
3643
  return n.getMonth() + 1 + "/" + n.getDate();
3626
3644
  }
3627
3645
  return "D" + e;
3628
3646
  }
3629
- function ye(e) {
3647
+ function Se(e) {
3630
3648
  var t = [];
3631
3649
  if (e.mode === "days") for (var r = e.tMax <= 10 ? 1 : e.tMax <= 30 ? 5 : 10, i = 0; i <= e.tMax; i += r) t.push({
3632
3650
  label: "D" + i,
@@ -3649,9 +3667,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3649
3667
  }
3650
3668
  return t;
3651
3669
  }
3652
- function be(e, t) {
3670
+ function Ce(e, t) {
3653
3671
  var n = t.totalH - (t.hasLeg ? o : 6);
3654
- ye(t).forEach(function(r) {
3672
+ Se(t).forEach(function(r) {
3655
3673
  var i = t.scale(r.t);
3656
3674
  e.appendChild(s("line", {
3657
3675
  x1: i,
@@ -3672,10 +3690,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3672
3690
  a.textContent = r.label, e.appendChild(a);
3673
3691
  });
3674
3692
  }
3675
- function xe(e, t, n) {
3693
+ function we(e, t, n) {
3676
3694
  return e + "," + (t - n) + " " + (e + n) + "," + t + " " + e + "," + (t + n) + " " + (e - n) + "," + t;
3677
3695
  }
3678
- function Se(e, t, n, r) {
3696
+ function Te(e, t, n, r) {
3679
3697
  var i = t.ms.map(function(e) {
3680
3698
  return {
3681
3699
  m: e,
@@ -3689,12 +3707,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3689
3707
  o = l - a < 32 ? !o : !1, a = l;
3690
3708
  var u = n[c.group % n.length], d = t.msY(), f = s("g", { class: "tokui-chart-tip-group" });
3691
3709
  f.appendChild(s("polygon", {
3692
- points: xe(l, d, 6),
3710
+ points: we(l, d, 6),
3693
3711
  fill: u,
3694
3712
  stroke: "var(--tokui-chart-slice-stroke, #fff)",
3695
3713
  "stroke-width": 1,
3696
3714
  class: "tokui-chart-task-ms"
3697
- })), r.add(f, c.name + " " + ve(c.time, t.mode), l, d), e.appendChild(f);
3715
+ })), r.add(f, c.name + " " + xe(c.time, t.mode), l, d), e.appendChild(f);
3698
3716
  var p = s("text", {
3699
3717
  x: l,
3700
3718
  y: d + 11 + (o ? 9 : 0),
@@ -3705,7 +3723,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3705
3723
  p.textContent = c.name, e.appendChild(p);
3706
3724
  });
3707
3725
  }
3708
- function Ce(e, t, n, r, i) {
3726
+ function Ee(e, t, n, r, i) {
3709
3727
  var a = 8;
3710
3728
  if (n - 3 > e + a) {
3711
3729
  var o = n - 3, s = (e + o) / 2;
@@ -3714,7 +3732,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3714
3732
  var c = r - i / 2;
3715
3733
  return "M" + e + "," + t + " L" + (e + a) + "," + t + " L" + (e + a) + "," + (c - 9) + " L" + n + "," + (c - 9) + " L" + n + "," + c;
3716
3734
  }
3717
- function we(e, t) {
3735
+ function De(e, t) {
3718
3736
  var n = s("defs"), r = s("marker", {
3719
3737
  id: "gantt-arrow",
3720
3738
  markerUnits: "userSpaceOnUse",
@@ -3732,7 +3750,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3732
3750
  t.next[n].forEach(function(n) {
3733
3751
  var o = t.scale(t.tasks[n].start), c = t.rowY(n);
3734
3752
  e.appendChild(s("path", {
3735
- d: Ce(i, a, o, c, t.BAR_H),
3753
+ d: Ee(i, a, o, c, t.BAR_H),
3736
3754
  fill: "none",
3737
3755
  stroke: "var(--tokui-chart-task-dep, #bbb)",
3738
3756
  "stroke-width": "1",
@@ -3744,7 +3762,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3744
3762
  });
3745
3763
  });
3746
3764
  }
3747
- function Te(e, t) {
3765
+ function Oe(e, t) {
3748
3766
  var r = Date.now();
3749
3767
  if (!(r < t.tMin || r > t.tMax)) {
3750
3768
  var i = t.scale(r), a = t.totalH - (t.hasLeg ? o : 6);
@@ -3768,7 +3786,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3768
3786
  c.textContent = n("time.today"), e.appendChild(c);
3769
3787
  }
3770
3788
  }
3771
- function Ee(e, t) {
3789
+ function ke(e, t) {
3772
3790
  var r = s("text", {
3773
3791
  x: t.w - 6,
3774
3792
  y: 12,
@@ -3778,7 +3796,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3778
3796
  });
3779
3797
  r.textContent = n("gantt.skipped", { n: t.skipped }), e.appendChild(r);
3780
3798
  }
3781
- function De(e, t) {
3799
+ function Ae(e, t) {
3782
3800
  function n(e, t) {
3783
3801
  for (var n = {}, r = [e], i = {}; r.length;) {
3784
3802
  var a = r.shift();
@@ -3823,7 +3841,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3823
3841
  });
3824
3842
  });
3825
3843
  }
3826
- function Oe(e, t, r, i) {
3844
+ function je(e, t, r, i) {
3827
3845
  t.tasks.forEach(function(a, o) {
3828
3846
  var c = r[a.group % r.length], l = t.scale(a.start), u = t.scale(a.end), d = Math.max(2, u - l), f = t.rowY(o) - t.BAR_H / 2, p = s("g", {
3829
3847
  class: "tokui-chart-tip-group tokui-chart-task-tip-group",
@@ -3846,7 +3864,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3846
3864
  rx: 3,
3847
3865
  fill: c,
3848
3866
  class: "tokui-chart-task-prog"
3849
- })), i.add(p, a.name + " " + ve(a.start, t.mode) + "→" + ve(a.end, t.mode) + " " + n("gantt.progress") + ":" + a.progress + "%", l + d / 2, f), e.appendChild(p);
3867
+ })), i.add(p, a.name + " " + xe(a.start, t.mode) + "→" + xe(a.end, t.mode) + " " + n("gantt.progress") + ":" + a.progress + "%", l + d / 2, f), e.appendChild(p);
3850
3868
  var m = s("text", {
3851
3869
  x: t.LABEL_W - 6,
3852
3870
  y: t.rowY(o) + 3,
@@ -3858,8 +3876,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3858
3876
  m.textContent = a.name, e.appendChild(m);
3859
3877
  });
3860
3878
  }
3861
- function ke(e, t, r, i) {
3862
- var a = _e(i), c = a.w, l = s("svg", {
3879
+ function Me(e, t, r, i) {
3880
+ var a = be(i), c = a.w, l = s("svg", {
3863
3881
  viewBox: "0 0 " + c + " " + a.totalH,
3864
3882
  class: "tokui-chart__svg",
3865
3883
  preserveAspectRatio: "xMidYMid meet"
@@ -3875,7 +3893,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3875
3893
  return u.textContent = n("gantt.noTasks"), l.appendChild(u), l;
3876
3894
  }
3877
3895
  var d = C(c, a.totalH);
3878
- if (be(l, a), a.hasMs && Se(l, a, r, d), Oe(l, a, r, d), we(l, a), a.mode === "dates" && Te(l, a), a.skipped > 0 && Ee(l, a), l.appendChild(d.layer), w(l), De(l, a), a.hasLeg) {
3896
+ if (Ce(l, a), a.hasMs && Te(l, a, r, d), je(l, a, r, d), De(l, a), a.mode === "dates" && Oe(l, a), a.skipped > 0 && ke(l, a), l.appendChild(d.layer), w(l), Ae(l, a), a.hasLeg) {
3879
3897
  var f = Object.keys(a.tasks.reduce(function(e, t) {
3880
3898
  return e[t.group] = 1, e;
3881
3899
  }, {})).map(function(e) {
@@ -3892,13 +3910,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3892
3910
  }
3893
3911
  return l;
3894
3912
  }
3895
- function Ae(e, t, n, r) {
3913
+ function Ne(e, t, n, r) {
3896
3914
  var i = {};
3897
3915
  return Object.keys(r).forEach(function(e) {
3898
3916
  i[e] = r[e];
3899
- }), i.area = !0, X(e, t, n, i);
3917
+ }), i.area = !0, Z(e, t, n, i);
3900
3918
  }
3901
- function je(e, t, n, r) {
3919
+ function Pe(e, t, n, r) {
3902
3920
  var i = parseInt(r.w) || 400, a = parseInt(r.h) || 80, o = parseFloat(r.max);
3903
3921
  isNaN(o) && (o = 100);
3904
3922
  var c = parseFloat(r.min);
@@ -3941,9 +3959,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3941
3959
  var t = b((e - c) / l, 0, 1);
3942
3960
  _.setAttribute("x", 2), _.setAttribute("width", Math.max(0, (i - 4) * t)), y.textContent = (v ? v + " " : "") + Math.round(t * 100) + d;
3943
3961
  }
3944
- return ne(c, u, parseInt(r.anim, 10) || 0, x), p;
3962
+ return ie(c, u, parseInt(r.anim, 10) || 0, x), p;
3945
3963
  }
3946
- function Me(e) {
3964
+ function Fe(e) {
3947
3965
  return e ? String(e).split(";").map(function(e) {
3948
3966
  var t = e.split(",").map(function(e) {
3949
3967
  return parseFloat(e.trim()) || 0;
@@ -3955,8 +3973,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
3955
3973
  };
3956
3974
  }) : [];
3957
3975
  }
3958
- function Ne(e, t, n, r) {
3959
- var i = Me(r.d);
3976
+ function Ie(e, t, n, r) {
3977
+ var i = Fe(r.d);
3960
3978
  if (!i.length) return M(parseInt(r.w) || 400, parseInt(r.h) || 200);
3961
3979
  for (var a = x(r, "w", i.length, 50, 22, 360, 2400), o = S(a, parseInt(r.h) || 200, 4, 560), c = 40, l = 30, u = 18, d = 10, f = a - c - d, p = o - u - l, m = U(r, "xmin", "_xMin", y(i.map(function(e) {
3962
3980
  return e.x;
@@ -4008,7 +4026,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4008
4026
  })), O.add(l, (r.xl || "X") + ": " + e.x + " " + (r.yl || "Y") + ": " + e.y + " " + (r.sl || "size") + ": " + e.s, i, a), D.appendChild(l);
4009
4027
  }), D.appendChild(O.layer), w(D), D;
4010
4028
  }
4011
- function Pe(e) {
4029
+ function Le(e) {
4012
4030
  return e ? String(e).split("|").map(function(e) {
4013
4031
  return e.split(",").map(function(e) {
4014
4032
  return parseFloat(e.trim());
@@ -4017,7 +4035,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4017
4035
  });
4018
4036
  }) : [];
4019
4037
  }
4020
- function Fe(e) {
4038
+ function Re(e) {
4021
4039
  if (!e) return null;
4022
4040
  var t = String(e).split(","), n = Infinity, r = -Infinity, i = 0;
4023
4041
  return t.forEach(function(e) {
@@ -4032,8 +4050,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4032
4050
  bins: i
4033
4051
  };
4034
4052
  }
4035
- function Ie(e, t) {
4036
- var n = Fe(e.l), r = parseInt(e.bins, 10);
4053
+ function ze(e, t) {
4054
+ var n = Re(e.l), r = parseInt(e.bins, 10);
4037
4055
  isNaN(r) && (r = n ? n.bins : e._bins === void 0 ? Math.min(20, Math.max(5, Math.ceil(Math.sqrt(t.length)))) : +e._bins);
4038
4056
  var i = U(e, "min", "_lo", n ? n.lo : y(t)), a = U(e, "max", "_hi", n ? n.hi : v(t));
4039
4057
  i === a && (--i, a += 1);
@@ -4048,8 +4066,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4048
4066
  counts: s
4049
4067
  };
4050
4068
  }
4051
- function Le(e, t, n, r) {
4052
- var i = Pe(r.rows || r.d), a = parseInt(r.w) || 400, o = parseInt(r.h) || 320, c = d(r.cols), l = t, u = Math.max(c.length, i[0] ? i[0].length : 0), f = Math.max(l.length, i.length);
4069
+ function Be(e, t, n, r) {
4070
+ var i = Le(r.rows || r.d), a = parseInt(r.w) || 400, o = parseInt(r.h) || 320, c = d(r.cols), l = t, u = Math.max(c.length, i[0] ? i[0].length : 0), f = Math.max(l.length, i.length);
4053
4071
  if (!f || !u) return M(a, o);
4054
4072
  var p = l.length ? 64 : 30, m = c.length ? 36 : 16, g = 16, _ = 16, b = a - p - g, x = o - m - _, S = b / u, T = x / f, E = [];
4055
4073
  i.forEach(function(e) {
@@ -4066,7 +4084,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4066
4084
  class: "tokui-chart__svg",
4067
4085
  preserveAspectRatio: "xMidYMid meet"
4068
4086
  }), P = C(a, o), F = 0; F < f; F++) for (var I = 0; I < u; I++) {
4069
- var L = i[F] ? i[F][I] : void 0, R = L !== void 0 && !isNaN(L), z = R && D ? (L - O) / k : 0, B = R ? ie(A, z) : j, V = p + I * S, H = m + F * T, W = s("g", { class: "tokui-chart-tip-group" });
4087
+ var L = i[F] ? i[F][I] : void 0, R = L !== void 0 && !isNaN(L), z = R && D ? (L - O) / k : 0, B = R ? X(A, z) : j, V = p + I * S, H = m + F * T, W = s("g", { class: "tokui-chart-tip-group" });
4070
4088
  W.appendChild(s("rect", {
4071
4089
  x: V + 1,
4072
4090
  y: H + 1,
@@ -4096,7 +4114,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4096
4114
  })).textContent = e;
4097
4115
  }), N.appendChild(P.layer), w(N), N;
4098
4116
  }
4099
- function Re(e, t, r, i) {
4117
+ function Ve(e, t, r, i) {
4100
4118
  var a = parseInt(i.w) || 280, c = parseInt(i.h) || 280, l = c + o;
4101
4119
  if (!e.length) return M(a, l);
4102
4120
  var u = a / 2, d = c / 2, f = Math.min(u, d) - 24, p = v(e) || 1, m = s("svg", {
@@ -4129,16 +4147,16 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4129
4147
  };
4130
4148
  }), a, c + 6), m.appendChild(h.layer), w(m), m;
4131
4149
  }
4132
- function ze(e, t, n, r) {
4150
+ function He(e, t, n, r) {
4133
4151
  var i = parseInt(r.w) || 400, a = parseInt(r.h) || 200;
4134
4152
  if (!e.length) return M(i, a);
4135
- for (var o = Ie(r, e), s = [], c = 0; c < o.bins; c++) s.push((o.lo + c * o.width).toFixed(1));
4153
+ for (var o = ze(r, e), s = [], c = 0; c < o.bins; c++) s.push((o.lo + c * o.width).toFixed(1));
4136
4154
  var l = {};
4137
4155
  return Object.keys(r).forEach(function(e) {
4138
4156
  l[e] = r[e];
4139
- }), l.d = o.counts.join(","), l.l = s.join(","), l.vals = "", delete l.bins, ae(o.counts, s, n, l);
4157
+ }), l.d = o.counts.join(","), l.l = s.join(","), l.vals = "", delete l.bins, se(o.counts, s, n, l);
4140
4158
  }
4141
- function Be(e, t, r, i) {
4159
+ function Ue(e, t, r, i) {
4142
4160
  if (!e.length) return M(parseInt(i.w) || 400, parseInt(i.h) || 200);
4143
4161
  var a = x(i, "w", e.length, 56, 26, 360, 2400), o = S(a, parseInt(i.h) || 200, 4, 560), c = 0, l = [];
4144
4162
  e.forEach(function(e) {
@@ -4156,7 +4174,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4156
4174
  return e.base;
4157
4175
  }));
4158
4176
  d > 0 && (d = 0);
4159
- var f = u - d || 1, p = i._padL ? +i._padL : 44, m = 18, h = 12, g = a - p - h, _ = g / e.length, b = Math.max(4, _ * .6), T = G(t.slice(0, e.length), _, 30, g, i.interval), E = T.padB, D = o - m - E, O = r[0] || "#52c41a", k = r[1] || "#f5222d", A = s("svg", {
4177
+ var f = u - d || 1, p = i._padL ? +i._padL : 44, m = 18, h = 12, g = a - p - h, _ = g / e.length, b = Math.max(4, _ * .6), T = K(t.slice(0, e.length), _, 30, g, i.interval), E = T.padB, D = o - m - E, O = r[0] || "#52c41a", k = r[1] || "#f5222d", A = s("svg", {
4160
4178
  viewBox: "0 0 " + a + " " + o,
4161
4179
  class: "tokui-chart__svg",
4162
4180
  preserveAspectRatio: "xMidYMid meet"
@@ -4203,9 +4221,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4203
4221
  }));
4204
4222
  });
4205
4223
  for (var I = [], L = 0; L < e.length; L++) I.push(p + L * _ + _ / 2);
4206
- return J(A, t.slice(0, e.length), I, o - 8, _, T.rotate, T.interval), A.appendChild(j.layer), w(A), A;
4224
+ return Y(A, t.slice(0, e.length), I, te(o, E, T.rotate), _, T.rotate, T.interval), A.appendChild(j.layer), w(A), A;
4207
4225
  }
4208
- function Ve(e) {
4226
+ function We(e) {
4209
4227
  return e ? String(e).split(";").map(function(e) {
4210
4228
  var t = e.split(",").map(function(e) {
4211
4229
  return parseFloat(e.trim()) || 0;
@@ -4219,8 +4237,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4219
4237
  };
4220
4238
  }) : [];
4221
4239
  }
4222
- function He(e, t, r, i) {
4223
- var a = Ve(i.d);
4240
+ function Ge(e, t, r, i) {
4241
+ var a = We(i.d);
4224
4242
  if (!a.length) return M(parseInt(i.w) || 400, parseInt(i.h) || 240);
4225
4243
  var o = x(i, "w", a.length, 56, 44, 360, 2400), c = S(o, parseInt(i.h) || 240, 4, 560), l = [];
4226
4244
  a.forEach(function(e) {
@@ -4228,7 +4246,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4228
4246
  });
4229
4247
  var u = y(l), d = v(l);
4230
4248
  u === d && (--u, d += 1);
4231
- var f = d - u || 1, p = i._padL ? +i._padL : 44, m = 18, h = 12, g = o - p - h, _ = K(i, a.length), b = _ ? 28 : 0, T = g / a.length, E = Math.max(20, T * .5), D = G(t.slice(0, a.length), T, 30, g, i.interval), O = D.padB, k = c - m - O, j = s("svg", {
4249
+ var f = d - u || 1, p = i._padL ? +i._padL : 44, m = 18, h = 12, g = o - p - h, _ = J(i, a.length), b = _ ? 28 : 0, T = g / a.length, E = Math.max(20, T * .5), D = K(t.slice(0, a.length), T, 30, g, i.interval), O = D.padB, k = c - m - O, j = s("svg", {
4232
4250
  viewBox: "0 0 " + o + " " + (c + b),
4233
4251
  class: "tokui-chart__svg",
4234
4252
  preserveAspectRatio: "xMidYMid meet"
@@ -4339,7 +4357,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4339
4357
  range: f,
4340
4358
  renderLabels: function(e, n, r) {
4341
4359
  for (var i = g / (r - n + 1), a = [], o = n; o <= r; o++) a.push(p + (o - n) * i + i / 2);
4342
- J(e, t.slice(n, r + 1), a, c - 8, i, D.rotate, D.interval);
4360
+ Y(e, t.slice(n, r + 1), a, te(c, O, D.rotate), i, D.rotate, D.interval);
4343
4361
  }
4344
4362
  });
4345
4363
  z.forEach(function(e) {
@@ -4351,11 +4369,11 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4351
4369
  });
4352
4370
  } else {
4353
4371
  for (var H = [], U = 0; U < a.length; U++) H.push(p + U * T + T / 2);
4354
- J(j, t.slice(0, a.length), H, c - 8, T, D.rotate, D.interval);
4372
+ Y(j, t.slice(0, a.length), H, te(c, O, D.rotate), T, D.rotate, D.interval);
4355
4373
  }
4356
4374
  return j.appendChild(N.layer), _ || w(j), j;
4357
4375
  }
4358
- function Ue(e) {
4376
+ function Ke(e) {
4359
4377
  return e ? String(e).split(",").map(function(e) {
4360
4378
  var t = e.split(":");
4361
4379
  return {
@@ -4366,8 +4384,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4366
4384
  return e.value > 0;
4367
4385
  }) : [];
4368
4386
  }
4369
- function We(e, t, n, r) {
4370
- var i = Ue(r.d), a = parseInt(r.w) || 480, o = parseInt(r.h) || 320;
4387
+ function qe(e, t, n, r) {
4388
+ var i = Ke(r.d), a = parseInt(r.w) || 480, o = parseInt(r.h) || 320;
4371
4389
  if (!i.length) return M(a, o);
4372
4390
  i.sort(function(e, t) {
4373
4391
  return t.value - e.value;
@@ -4426,7 +4444,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4426
4444
  }
4427
4445
  return m(i, 0, 0, a, o), l.appendChild(u.layer), w(l), l;
4428
4446
  }
4429
- function Ge(e, t, n, r) {
4447
+ function Je(e, t, n, r) {
4430
4448
  var i = d(r.nodes), a = String(r.flows || "").split(",").map(function(e) {
4431
4449
  var t = e.split("->");
4432
4450
  if (t.length !== 2) return null;
@@ -4498,7 +4516,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4498
4516
  })).textContent = e;
4499
4517
  }), S.appendChild(T.layer), w(S), S;
4500
4518
  }
4501
- function Ke(e) {
4519
+ function Ye(e) {
4502
4520
  return e ? String(e).split(";").map(function(e) {
4503
4521
  var t = e.split(",").map(function(e) {
4504
4522
  return parseFloat(e.trim());
@@ -4513,8 +4531,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4513
4531
  };
4514
4532
  }).filter(Boolean) : [];
4515
4533
  }
4516
- function qe(e, t, n, r) {
4517
- var i = Ke(r.d);
4534
+ function Xe(e, t, n, r) {
4535
+ var i = Ye(r.d);
4518
4536
  if (!i.length) return M(parseInt(r.w) || 480, parseInt(r.h) || 280);
4519
4537
  var a = parseInt(r.w) || 800, o = parseInt(r.h) || 320, c, l;
4520
4538
  if (r._yMin !== void 0 && r._yMax !== void 0 && isFinite(+r._yMin)) c = +r._yMin, l = +r._yMax;
@@ -4527,7 +4545,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4527
4545
  c = d[0], l = d[1];
4528
4546
  }
4529
4547
  c === l && (--c, l += 1);
4530
- var f = l - c || 1, p = r._padL ? +r._padL : 44, m = 18, g = 12, _ = a - p - g, b = K(r, i.length), x = b ? 28 : 0, S = _ / i.length, T = Math.max(3, S * .6), E = G(t.slice(0, i.length), S, 30, _, r.interval), D = E.padB, O = o - m - D, k = h(r.c), j = k[0] || "#f5222d", N = k[1] || "#52c41a", P = s("svg", {
4548
+ var f = l - c || 1, p = r._padL ? +r._padL : 44, m = 18, g = 12, _ = a - p - g, b = J(r, i.length), x = b ? 28 : 0, S = _ / i.length, T = Math.max(3, S * .6), E = K(t.slice(0, i.length), S, 30, _, r.interval), D = E.padB, O = o - m - D, k = h(r.c), j = k[0] || "#f5222d", N = k[1] || "#52c41a", P = s("svg", {
4531
4549
  viewBox: "0 0 " + a + " " + (o + x),
4532
4550
  class: "tokui-chart__svg",
4533
4551
  preserveAspectRatio: "xMidYMid meet"
@@ -4606,7 +4624,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4606
4624
  range: f,
4607
4625
  renderLabels: function(e, n, r) {
4608
4626
  for (var i = _ / (r - n + 1), a = [], s = n; s <= r; s++) a.push(p + (s - n) * i + i / 2);
4609
- J(e, t.slice(n, r + 1), a, o - 8, i, E.rotate, E.interval);
4627
+ Y(e, t.slice(n, r + 1), a, te(o, D, E.rotate), i, E.rotate, E.interval);
4610
4628
  }
4611
4629
  });
4612
4630
  V.forEach(function(e) {
@@ -4617,16 +4635,16 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4617
4635
  });
4618
4636
  });
4619
4637
  } else {
4620
- for (var ee = [], q = 0; q < i.length; q++) ee.push(p + q * S + S / 2);
4621
- J(P, t.slice(0, i.length), ee, o - 8, S, E.rotate, E.interval);
4638
+ for (var G = [], q = 0; q < i.length; q++) G.push(p + q * S + S / 2);
4639
+ Y(P, t.slice(0, i.length), G, te(o, D, E.rotate), S, E.rotate, E.interval);
4622
4640
  }
4623
4641
  return P.appendChild(F.layer), b || w(P), P;
4624
4642
  }
4625
4643
  function $(e, t) {
4626
4644
  r[e] = t;
4627
4645
  }
4628
- function Je(e) {
4629
- $("bar", ae), $("line", X), $("pie", oe), $("donut", se), $("radar", le), $("scatter", ue), $("gantt", ke), $("funnel", Q), $("gauge", ce), $("area", Ae), $("progress", je), $("bubble", Ne), $("heatmap", Le), $("rose", Re), $("histogram", ze), $("waterfall", Be), $("boxplot", He), $("treemap", We), $("sankey", Ge), $("candlestick", qe);
4646
+ function Ze(e) {
4647
+ $("bar", se), $("line", Z), $("pie", le), $("donut", Q), $("radar", fe), $("scatter", pe), $("gantt", Me), $("funnel", ue), $("gauge", de), $("area", Ne), $("progress", Pe), $("bubble", Ie), $("heatmap", Be), $("rose", Ve), $("histogram", He), $("waterfall", Ue), $("boxplot", Ge), $("treemap", qe), $("sankey", Je), $("candlestick", Xe);
4630
4648
  function t(e, t) {
4631
4649
  var n = e._chartState;
4632
4650
  if (!(!n || !t)) {
@@ -4678,7 +4696,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4678
4696
  var s = t.t || "bar", u = c(t.d), f = d(t.l), m = _(t), h = r[s];
4679
4697
  if (h) {
4680
4698
  if (s === "candlestick") {
4681
- var g = Ke(t.d);
4699
+ var g = Ye(t.d);
4682
4700
  if (g.length) {
4683
4701
  var b = [];
4684
4702
  g.forEach(function(e) {
@@ -4696,7 +4714,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4696
4714
  e._yRange && (t._yMin = e._yRange.lo, t._yMax = e._yRange.hi);
4697
4715
  }
4698
4716
  if (s === "scatter" || s === "bubble") {
4699
- var w = s === "bubble" ? Me(t.d) : p(t.d);
4717
+ var w = s === "bubble" ? Fe(t.d) : p(t.d);
4700
4718
  if (w.length) {
4701
4719
  var T = w.map(function(e) {
4702
4720
  return e.x;
@@ -4727,7 +4745,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4727
4745
  e._xRange && (t._xMin = e._xRange.lo, t._xMax = e._xRange.hi), e._yRange && (t._yMin = e._yRange.lo, t._yMax = e._yRange.hi), e._sMax && (t._sMax = e._sMax);
4728
4746
  }
4729
4747
  if (s === "heatmap") {
4730
- var P = Pe(t.rows || t.d);
4748
+ var P = Le(t.rows || t.d);
4731
4749
  if (P.length) {
4732
4750
  var F = [];
4733
4751
  if (P.forEach(function(e) {
@@ -4745,7 +4763,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4745
4763
  e._vRange && (t._vMin = e._vRange.lo, t._vMax = e._vRange.hi);
4746
4764
  }
4747
4765
  if (s === "histogram") {
4748
- var R = c(t.d), z = Fe(t.l);
4766
+ var R = c(t.d), z = Re(t.l);
4749
4767
  if (z) e._hRange = {
4750
4768
  lo: z.lo,
4751
4769
  hi: z.hi
@@ -4759,7 +4777,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4759
4777
  });
4760
4778
  }
4761
4779
  if (e._hBins !== void 0 && (t._bins = e._hBins), e._hRange && (t._lo = e._hRange.lo, t._hi = e._hRange.hi), R.length) {
4762
- var U = v(Ie(t, R).counts) || 1;
4780
+ var U = v(ze(t, R).counts) || 1;
4763
4781
  e._yMax = e._yMax ? Math.max(e._yMax, U) : U, t._yMax = e._yMax;
4764
4782
  }
4765
4783
  }
@@ -4833,7 +4851,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4833
4851
  })) return;
4834
4852
  var l = c.data.reduce(function(e, t) {
4835
4853
  return e + t;
4836
- }, 0) || 1, u = Z(c.data, c.labels, c.attrs, 7, l), d = u.r + u.fs, f = B(a, d, u.fixedA, u.coefB, P), p = 14, m = Infinity;
4854
+ }, 0) || 1, u = ce(c.data, c.labels, c.attrs, 7, l), d = u.r + u.fs, f = B(a, d, u.fixedA, u.coefB, P), p = 14, m = Infinity;
4837
4855
  if (u.coefB > 1) {
4838
4856
  var h = a * d - 2 * p * (d + u.fixedA), g = a + 2 * p * (u.coefB - 1);
4839
4857
  m = h > 0 && g > 0 ? h / g : 7;
@@ -5095,18 +5113,19 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
5095
5113
  }), a(s), s);
5096
5114
  });
5097
5115
  }
5098
- typeof window < "u" && (window.TokUI = window.TokUI || {}, window.TokUI._internal = window.TokUI._internal || {}, window.TokUI._internal.registerChartComponents = Je, window.TokUI._internal.registerChartRenderer = $, window.TokUI._internal.bumpFsUnits = R, window.TokUI._internal.applyTipScale = z, window.TokUI._internal.axisXLayout = G, window.TokUI._internal.zoomBounds = q, window.TokUI._internal.zoomEnabled = K, window.TokUI._internal.solvePieFs = B, window.TokUI._internal.pieSizing = Z, window.TokUI._internal.MIN_CHART_PX = P, window.TokUI._internal.MAX_CHART_PX = I), t !== void 0 && t.exports && (t.exports = {
5099
- registerChartComponents: Je,
5116
+ typeof window < "u" && (window.TokUI = window.TokUI || {}, window.TokUI._internal = window.TokUI._internal || {}, window.TokUI._internal.registerChartComponents = Ze, window.TokUI._internal.registerChartRenderer = $, window.TokUI._internal.bumpFsUnits = R, window.TokUI._internal.applyTipScale = z, window.TokUI._internal.axisXLayout = K, window.TokUI._internal.zoomBounds = ee, window.TokUI._internal.zoomEnabled = J, window.TokUI._internal.solvePieFs = B, window.TokUI._internal.pieSizing = ce, window.TokUI._internal.MIN_CHART_PX = P, window.TokUI._internal.MAX_CHART_PX = I), t !== void 0 && t.exports && (t.exports = {
5117
+ registerChartComponents: Ze,
5100
5118
  registerChartRenderer: $,
5101
5119
  bumpFsUnits: R,
5102
5120
  solvePieFs: B,
5103
- pieSizing: Z,
5121
+ pieSizing: ce,
5104
5122
  MIN_CHART_PX: P,
5105
5123
  MAX_CHART_PX: I,
5106
5124
  applyTipScale: z,
5107
- axisXLayout: G,
5108
- zoomBounds: q,
5109
- zoomEnabled: K
5125
+ axisXLayout: K,
5126
+ zoomBounds: ee,
5127
+ zoomEnabled: J,
5128
+ bumpZoomTextFs: ne
5110
5129
  });
5111
5130
  })), v = /* @__PURE__ */ o(((e, t) => {
5112
5131
  var n = {
@@ -7713,11 +7732,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
7713
7732
  }
7714
7733
  e.status !== void 0 && (d.classList.remove("tokui-progress--success", "tokui-progress--error"), e.status === "success" ? d.classList.add("tokui-progress--success") : e.status === "error" && d.classList.add("tokui-progress--error"));
7715
7734
  }, d;
7716
- }), e.register("upd", (e) => {
7717
- var t = e.attrs || {}, n = t.id;
7718
- if (n && typeof document < "u") {
7719
- for (var r = document.getElementById(n); r && typeof r._update != "function";) r = r.parentElement;
7720
- r && typeof r._update == "function" && r._update(t);
7735
+ }), e.register("upd", (t) => {
7736
+ var n = t.attrs || {}, r = n.id;
7737
+ if (r && typeof document < "u") {
7738
+ var i = null, a = e._mountRoot;
7739
+ for (a && typeof a.querySelector == "function" && (i = a.querySelector("[id=\"" + String(r).replace(/"/g, "\\\"") + "\"]")), i ||= document.getElementById(r); i && typeof i._update != "function";) i = i.parentElement;
7740
+ i && typeof i._update == "function" && i._update(n);
7721
7741
  }
7722
7742
  return document.createTextNode("");
7723
7743
  }), e.register("md", (e) => {
@@ -7992,7 +8012,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
7992
8012
  var u = l > c ? c + "+" : String(l);
7993
8013
  s = t("sup", { class: "tokui-badge-box__count" }), s.textContent = u, s.style.background = o;
7994
8014
  } else (r.tx || r.label) && (s = t("sup", { class: "tokui-badge-box__text" }), s.textContent = r.tx || r.label, a === "default" ? (s.style.background = "var(--tokui-stripe, #f5f5f5)", s.style.color = "var(--tokui-text-secondary, #666)") : s.style.background = o);
7995
- return s && i.appendChild(s), i;
8015
+ return s && i.appendChild(s), i._slot = i, i._tokuiType = "badge-box", i;
7996
8016
  }), e.register("skeleton", (e) => {
7997
8017
  var n = e.attrs || {}, r = n.t || "text", i = parseInt(n.rows, 10) || 3, a = n.w || "", o = n.h || "", s = t("div", {
7998
8018
  class: ["tokui-skeleton", "tokui-skeleton--" + r].join(" "),
@@ -8886,45 +8906,51 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
8886
8906
  return S._isNotifPlaceholder = !0, S;
8887
8907
  }
8888
8908
  return f._notifDuration = c, f;
8889
- }), e.register("chat-input", (e, r) => {
8890
- var i = e.attrs || {}, a = i.ph || "", o = i.clk || "", s = i.dis !== void 0, c = parseInt(i.max) || 0, l = i.auto !== void 0, u = parseInt(i.rows) || 2, d = t("div", { class: "tokui-chat-input" }), f = t("textarea", {
8909
+ }), e.register("chat-input", (r, i) => {
8910
+ var a = r.attrs || {}, o = a.ph || "", s = a.clk || "", c = a.dis !== void 0, l = parseInt(a.max) || 0, u = a.auto !== void 0, d = parseInt(a.rows) || 2, f = t("div", { class: "tokui-chat-input" }), p = t("textarea", {
8891
8911
  class: "tokui-chat-input__textarea",
8892
- rows: String(u),
8893
- placeholder: a
8912
+ rows: String(d),
8913
+ placeholder: o
8894
8914
  });
8895
- s && (f.setAttribute("disabled", ""), f.classList.add("tokui-chat-input__textarea--disabled")), l && f.classList.add("tokui-chat-input__textarea--auto"), d.appendChild(f);
8896
- var p = t("div", { class: "tokui-chat-input__actions" });
8897
- e.children && e.children.length > 0 && r(e.children).forEach(function(e) {
8898
- e && e.nodeType && p.appendChild(e);
8915
+ c && (p.setAttribute("disabled", ""), p.classList.add("tokui-chat-input__textarea--disabled")), u && p.classList.add("tokui-chat-input__textarea--auto"), f.appendChild(p);
8916
+ var m = t("div", { class: "tokui-chat-input__actions" });
8917
+ r.children && r.children.length > 0 && i(r.children).forEach(function(e) {
8918
+ e && e.nodeType && m.appendChild(e);
8899
8919
  });
8900
- var m = t("button", {
8920
+ var h = t("button", {
8901
8921
  class: "tokui-chat-input__send",
8902
8922
  type: "button",
8903
8923
  "aria-label": n("common.send")
8904
8924
  });
8905
- if (m.innerHTML = "<svg viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"currentColor\"><path d=\"M10 3a1 1 0 0 1 .7.3l5 5a1 1 0 0 1-1.4 1.4L11 6.4V16a1 1 0 1 1-2 0V6.4l-3.3 3.3a1 1 0 0 1-1.4-1.4l5-5A1 1 0 0 1 10 3z\"/></svg>", s && (m.setAttribute("disabled", ""), m.classList.add("tokui-chat-input__send--disabled")), p.appendChild(m), d.appendChild(p), c > 0) {
8906
- var h = t("span", { class: "tokui-chat-input__counter" });
8907
- h.textContent = "0/" + c, d.appendChild(h), f.addEventListener("input", function() {
8908
- var e = (f.value || "").length;
8909
- h.textContent = e + "/" + c, e > c ? h.classList.add("tokui-chat-input__counter--over") : h.classList.remove("tokui-chat-input__counter--over");
8925
+ if (h.innerHTML = "<svg viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" fill=\"currentColor\"><path d=\"M10 3a1 1 0 0 1 .7.3l5 5a1 1 0 0 1-1.4 1.4L11 6.4V16a1 1 0 1 1-2 0V6.4l-3.3 3.3a1 1 0 0 1-1.4-1.4l5-5A1 1 0 0 1 10 3z\"/></svg>", c && (h.setAttribute("disabled", ""), h.classList.add("tokui-chat-input__send--disabled")), m.appendChild(h), f.appendChild(m), l > 0) {
8926
+ var g = t("span", { class: "tokui-chat-input__counter" });
8927
+ g.textContent = "0/" + l, f.appendChild(g), p.addEventListener("input", function() {
8928
+ var e = (p.value || "").length;
8929
+ g.textContent = e + "/" + l, e > l ? g.classList.add("tokui-chat-input__counter--over") : g.classList.remove("tokui-chat-input__counter--over");
8910
8930
  });
8911
8931
  }
8912
- l && f.addEventListener("input", function() {
8913
- f.style.height = "auto", f.style.height = f.scrollHeight + "px";
8932
+ u && p.addEventListener("input", function() {
8933
+ p.style.height = "auto", p.style.height = p.scrollHeight + "px";
8914
8934
  });
8915
- function g() {
8916
- if (!s) {
8917
- var e = f.value || "";
8918
- e.trim() && (o && (d.setAttribute("data-tokui-clk", o), d.setAttribute("data-tokui-clk-value", e)), f.value = "", c > 0 && (h.textContent = "0/" + c, h.classList.remove("tokui-chat-input__counter--over")), l && (f.style.height = "auto"));
8919
- }
8920
- }
8921
- return f.addEventListener("keydown", function(e) {
8922
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), g());
8923
- }), m.addEventListener("click", function() {
8924
- g();
8925
- }), o && d.setAttribute("data-tokui-clk", o), d._update = function(e) {
8926
- e.dis !== void 0 && (s = !!e.dis, s ? (f.setAttribute("disabled", ""), f.classList.add("tokui-chat-input__textarea--disabled"), m.setAttribute("disabled", ""), m.classList.add("tokui-chat-input__send--disabled")) : (f.removeAttribute("disabled"), f.classList.remove("tokui-chat-input__textarea--disabled"), m.removeAttribute("disabled"), m.classList.remove("tokui-chat-input__send--disabled")));
8927
- }, d._slot = f, d._tokuiType = "chat-input", d;
8935
+ function _() {
8936
+ if (!c) {
8937
+ var t = p.value || "";
8938
+ if (t.trim()) {
8939
+ if (s && (f.setAttribute("data-tokui-clk-value", t), e.eventBus)) {
8940
+ var n = e.eventBus.getHandler(s);
8941
+ n && n({ value: t }, null, f);
8942
+ }
8943
+ p.value = "", l > 0 && (g.textContent = "0/" + l, g.classList.remove("tokui-chat-input__counter--over")), u && (p.style.height = "auto");
8944
+ }
8945
+ }
8946
+ }
8947
+ return p.addEventListener("keydown", function(e) {
8948
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), _());
8949
+ }), h.addEventListener("click", function() {
8950
+ _();
8951
+ }), f._update = function(e) {
8952
+ e.dis !== void 0 && (c = !!e.dis, c ? (p.setAttribute("disabled", ""), p.classList.add("tokui-chat-input__textarea--disabled"), h.setAttribute("disabled", ""), h.classList.add("tokui-chat-input__send--disabled")) : (p.removeAttribute("disabled"), p.classList.remove("tokui-chat-input__textarea--disabled"), h.removeAttribute("disabled"), h.classList.remove("tokui-chat-input__send--disabled")));
8953
+ }, f._slot = p, f._tokuiType = "chat-input", f;
8928
8954
  }), e.register("msg-actions", (e, r) => {
8929
8955
  var i = e.attrs || {}, a = i.clk || "", o = "tokui-msg-actions";
8930
8956
  i.visible && (o += " tokui-msg-actions--visible");
@@ -10585,6 +10611,30 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10585
10611
  });
10586
10612
  }
10587
10613
  function r(e) {
10614
+ var t = String(e ?? "").trim();
10615
+ return /^\d+(\.\d+)?(px|%|em|rem|vw|vh)$/.test(t) ? t : null;
10616
+ }
10617
+ function i(e, t, n, r) {
10618
+ var i = n === "error" || n === "success" ? n : "";
10619
+ e.classList.remove(r + "--error"), e.classList.remove(r + "--success"), i && e.classList.add(r + "--" + i), i === "error" ? e.setAttribute("aria-invalid", "true") : e.removeAttribute && e.removeAttribute("aria-invalid"), t && (t.classList.remove("tokui-field__hint--error"), t.classList.remove("tokui-field__hint--success"), i && t.classList.add("tokui-field__hint--" + i));
10620
+ }
10621
+ function a(e, t, n, r) {
10622
+ if (typeof e.addEventListener != "function") return;
10623
+ var a = n.hint || "", o = n.live === "input";
10624
+ function s() {
10625
+ if (typeof e.checkValidity == "function") {
10626
+ if (!e.value && n.req === void 0) {
10627
+ i(e, t, "", r), t && (t.textContent = a);
10628
+ return;
10629
+ }
10630
+ e.checkValidity() ? (i(e, t, "success", r), t && (t.textContent = n.ok || "✓ 格式正确")) : (i(e, t, "error", r), t && (t.textContent = n.err || a));
10631
+ }
10632
+ }
10633
+ e.addEventListener("blur", s), e.addEventListener("input", function() {
10634
+ (o || e.classList.contains(r + "--error")) && s();
10635
+ });
10636
+ }
10637
+ function o(e) {
10588
10638
  if (!e || !e.attrs || !e.attrs.opt) return e;
10589
10639
  var t = n(e.attrs.opt).map(function(e) {
10590
10640
  return {
@@ -10597,9 +10647,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10597
10647
  });
10598
10648
  return Object.assign({}, e, { children: (e.children || []).concat(t) });
10599
10649
  }
10600
- function i(e) {
10601
- let { el: t, resolveButtonAction: n } = typeof l == "function" ? h() : window.TokUI._internal, i = typeof l == "function" ? S().resolveColor : window.TokUI._internal.resolveColor, a = typeof l == "function" ? v().iconSvg : window.TokUI._internal.iconSvg, o = typeof l == "function" ? u().t : window.TokUI._internal.t;
10602
- function s(e) {
10650
+ function s(e) {
10651
+ let { el: t, resolveButtonAction: n } = typeof l == "function" ? h() : window.TokUI._internal, s = typeof l == "function" ? S().resolveColor : window.TokUI._internal.resolveColor, c = typeof l == "function" ? v().iconSvg : window.TokUI._internal.iconSvg, d = typeof l == "function" ? u().t : window.TokUI._internal.t;
10652
+ function f(e) {
10603
10653
  if (!e) return null;
10604
10654
  var t = e.indexOf("|");
10605
10655
  return t === -1 ? {
@@ -10610,7 +10660,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10610
10660
  variant: e.substring(t + 1)
10611
10661
  };
10612
10662
  }
10613
- function c(e) {
10663
+ function p(e) {
10614
10664
  if (!e) return null;
10615
10665
  var t = e.indexOf("|"), n = t === -1 ? e : e.substring(0, t), r = t === -1 ? null : e.substring(t + 1), i = n.indexOf(":");
10616
10666
  return i === -1 ? {
@@ -10623,32 +10673,32 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10623
10673
  variant: r
10624
10674
  };
10625
10675
  }
10626
- function d(e) {
10676
+ function m(e) {
10627
10677
  var t = e.attrs;
10628
10678
  return !!(t.pre || t.app || t.prebtn || t.appbtn);
10629
10679
  }
10630
- function f(e, n) {
10680
+ function g(e, n) {
10631
10681
  var r = t("div", { class: "tokui-input-group" });
10632
10682
  if (e.attrs.pre) {
10633
- var i = s(e.attrs.pre), a = i.variant ? "tokui-input-pre tokui-input-pre--" + i.variant : "tokui-input-pre";
10683
+ var i = f(e.attrs.pre), a = i.variant ? "tokui-input-pre tokui-input-pre--" + i.variant : "tokui-input-pre";
10634
10684
  r.appendChild(t("span", { class: a }, i.text));
10635
10685
  }
10636
10686
  if (e.attrs.prebtn) {
10637
- var i = c(e.attrs.prebtn), a = i.variant ? "tokui-input-prebtn tokui-input-prebtn--" + i.variant : "tokui-input-prebtn", o = {
10687
+ var i = p(e.attrs.prebtn), a = i.variant ? "tokui-input-prebtn tokui-input-prebtn--" + i.variant : "tokui-input-prebtn", o = {
10638
10688
  class: a,
10639
10689
  type: "button"
10640
10690
  };
10641
10691
  i.handler && (o["data-tokui-clk"] = i.handler), r.appendChild(t("button", o, i.text));
10642
10692
  }
10643
10693
  if (r.appendChild(n), e.attrs.appbtn) {
10644
- var i = c(e.attrs.appbtn), a = i.variant ? "tokui-input-appbtn tokui-input-appbtn--" + i.variant : "tokui-input-appbtn", o = {
10694
+ var i = p(e.attrs.appbtn), a = i.variant ? "tokui-input-appbtn tokui-input-appbtn--" + i.variant : "tokui-input-appbtn", o = {
10645
10695
  class: a,
10646
10696
  type: "button"
10647
10697
  };
10648
10698
  i.handler && (o["data-tokui-clk"] = i.handler), r.appendChild(t("button", o, i.text));
10649
10699
  }
10650
10700
  if (e.attrs.app) {
10651
- var i = s(e.attrs.app), a = i.variant ? "tokui-input-app tokui-input-app--" + i.variant : "tokui-input-app";
10701
+ var i = f(e.attrs.app), a = i.variant ? "tokui-input-app tokui-input-app--" + i.variant : "tokui-input-app";
10652
10702
  r.appendChild(t("span", { class: a }, i.text));
10653
10703
  }
10654
10704
  return r;
@@ -10665,82 +10715,86 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10665
10715
  e && e.nodeType && a.appendChild(e);
10666
10716
  }), a._slot = a, a._tokuiType = "form", a;
10667
10717
  });
10668
- var p = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"11\" cy=\"11\" r=\"8\"/><line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"/></svg>";
10718
+ var _ = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"11\" cy=\"11\" r=\"8\"/><line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"/></svg>";
10669
10719
  e.register("input", (e) => {
10670
10720
  var n = e.attrs.v ? e.attrs.v.split(",").map(function(e) {
10671
10721
  return e.trim();
10672
- }) : [], r = n.indexOf("inline") !== -1, i = e.attrs.search !== void 0, a = e.attrs.search === "right", o = t("div", { class: r ? "tokui-field tokui-field--inline" : "tokui-field" });
10722
+ }) : [], r = n.indexOf("inline") !== -1, o = e.attrs.search !== void 0, s = e.attrs.search === "right", c = t("div", { class: r ? "tokui-field tokui-field--inline" : "tokui-field" });
10673
10723
  if (e.attrs.l) {
10674
- var s = { class: "tokui-label" };
10675
- e.attrs.id && (s.for = e.attrs.id), o.appendChild(t("label", s, e.attrs.l));
10724
+ var l = { class: "tokui-label" };
10725
+ e.attrs.id && (l.for = e.attrs.id), e.attrs.req !== void 0 && (l.class += " tokui-label--req"), c.appendChild(t("label", l, e.attrs.l));
10676
10726
  }
10677
- var c = {
10727
+ var u = {
10678
10728
  class: "tokui-input",
10679
10729
  type: e.attrs.t || "text"
10680
10730
  };
10681
- e.attrs.id && (c.id = e.attrs.id), e.attrs.n ? c.name = e.attrs.n : e.attrs.id && (c.name = e.attrs.id), e.attrs.ph && (c.placeholder = e.attrs.ph), e.attrs.ml && (c.maxlength = e.attrs.ml), e.attrs.min !== void 0 && (c.min = e.attrs.min), e.attrs.max !== void 0 && (c.max = e.attrs.max), e.attrs.step !== void 0 && (c.step = e.attrs.step), e.attrs.req !== void 0 && (c.required = "required"), e.attrs.dis !== void 0 && (c.disabled = "disabled"), e.attrs.ro !== void 0 && (c.readonly = "readonly"), e.attrs.req !== void 0 && (c["aria-required"] = "true"), e.attrs.val !== void 0 && (c.value = e.attrs.val);
10682
- var l = t("input", c);
10683
- e.attrs.w && (l.style.width = e.attrs.w);
10684
- var u = null;
10685
- if (i) {
10686
- u = t("div", { class: "tokui-search-input" }), a && u.classList.add("tokui-search-input--right");
10687
- var m = t("span", { class: "tokui-search-input__icon" });
10688
- m.innerHTML = p, u.appendChild(m), u.appendChild(l);
10689
- }
10690
- var h = u || l;
10691
- if (d(e)) {
10692
- var g = f(e, h);
10693
- n.indexOf("pill") !== -1 && g.classList.add("tokui-input-group--pill"), o.appendChild(g);
10694
- } else o.appendChild(h);
10695
- var _ = null;
10696
- return e.attrs.hint && (_ = t("div", { class: "tokui-field__hint" }, e.attrs.hint), n.indexOf("error") === -1 ? n.indexOf("success") !== -1 && _.classList.add("tokui-field__hint--success") : _.classList.add("tokui-field__hint--error"), o.appendChild(_)), o._update = function(e) {
10697
- e.v !== void 0 && (l.value = e.v), e.dis === !0 || e.dis === "true" ? l.disabled = !0 : (e.dis === !1 || e.dis === "false") && (l.disabled = !1), e.ph !== void 0 && (l.placeholder = e.ph), e.ro === !0 || e.ro === "true" ? l.readOnly = !0 : (e.ro === !1 || e.ro === "false") && (l.readOnly = !1), e.hint !== void 0 && _ && (_.textContent = e.hint);
10698
- }, o._variantTarget = l, o;
10731
+ e.attrs.id && (u.id = e.attrs.id), e.attrs.n ? u.name = e.attrs.n : e.attrs.id && (u.name = e.attrs.id), e.attrs.ph && (u.placeholder = e.attrs.ph), e.attrs.ml && (u.maxlength = e.attrs.ml), e.attrs.min !== void 0 && (u.min = e.attrs.min), e.attrs.max !== void 0 && (u.max = e.attrs.max), e.attrs.step !== void 0 && (u.step = e.attrs.step), e.attrs.req !== void 0 && (u.required = "required"), e.attrs.dis !== void 0 && (u.disabled = "disabled"), e.attrs.ro !== void 0 && (u.readonly = "readonly"), e.attrs.req !== void 0 && (u["aria-required"] = "true"), n.indexOf("error") !== -1 && (u["aria-invalid"] = "true"), e.attrs.pat && (u.pattern = e.attrs.pat), e.attrs.val !== void 0 && (u.value = e.attrs.val);
10732
+ var d = t("input", u);
10733
+ e.attrs.err && typeof d.addEventListener == "function" && (d.addEventListener("invalid", function() {
10734
+ typeof d.setCustomValidity == "function" && d.validity && !d.validity.customError && d.setCustomValidity(e.attrs.err);
10735
+ }), d.addEventListener("input", function() {
10736
+ typeof d.setCustomValidity == "function" && d.setCustomValidity("");
10737
+ })), e.attrs.w && (d.style.width = e.attrs.w);
10738
+ var f = null;
10739
+ if (o) {
10740
+ f = t("div", { class: "tokui-search-input" }), s && f.classList.add("tokui-search-input--right");
10741
+ var p = t("span", { class: "tokui-search-input__icon" });
10742
+ p.innerHTML = _, f.appendChild(p), f.appendChild(d);
10743
+ }
10744
+ var h = f || d;
10745
+ if (m(e)) {
10746
+ var v = g(e, h);
10747
+ n.indexOf("pill") !== -1 && v.classList.add("tokui-input-group--pill"), c.appendChild(v);
10748
+ } else c.appendChild(h);
10749
+ var y = null;
10750
+ return (e.attrs.hint || e.attrs.live !== void 0) && (y = t("div", { class: "tokui-field__hint" }, e.attrs.hint || ""), n.indexOf("error") === -1 ? n.indexOf("success") !== -1 && y.classList.add("tokui-field__hint--success") : y.classList.add("tokui-field__hint--error"), c.appendChild(y)), e.attrs.live !== void 0 && a(d, y, e.attrs, "tokui-input"), c._update = function(e) {
10751
+ e.v !== void 0 && (d.value = e.v), e.dis === !0 || e.dis === "true" ? d.disabled = !0 : (e.dis === !1 || e.dis === "false") && (d.disabled = !1), e.ph !== void 0 && (d.placeholder = e.ph), e.ro === !0 || e.ro === "true" ? d.readOnly = !0 : (e.ro === !1 || e.ro === "false") && (d.readOnly = !1), e.hint !== void 0 && y && (y.textContent = e.hint), e.status !== void 0 && i(d, y, e.status, "tokui-input");
10752
+ }, c._variantTarget = d, c;
10699
10753
  }), e.register("pwd", (e) => {
10700
10754
  var n = e.attrs.v ? e.attrs.v.split(",").map(function(e) {
10701
10755
  return e.trim();
10702
10756
  }) : [], r = t("div", { class: n.indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
10703
10757
  if (e.attrs.l) {
10704
- var i = { class: "tokui-label" };
10705
- e.attrs.id && (i.for = e.attrs.id), r.appendChild(t("label", i, e.attrs.l));
10758
+ var o = { class: "tokui-label" };
10759
+ e.attrs.id && (o.for = e.attrs.id), e.attrs.req !== void 0 && (o.class += " tokui-label--req"), r.appendChild(t("label", o, e.attrs.l));
10706
10760
  }
10707
- var a = {
10761
+ var s = {
10708
10762
  class: "tokui-input",
10709
10763
  type: "password"
10710
10764
  };
10711
- e.attrs.id && (a.id = e.attrs.id), e.attrs.n ? a.name = e.attrs.n : e.attrs.id && (a.name = e.attrs.id), e.attrs.ph && (a.placeholder = e.attrs.ph), e.attrs.ml && (a.maxlength = e.attrs.ml), e.attrs.min !== void 0 && (a.min = e.attrs.min), e.attrs.max !== void 0 && (a.max = e.attrs.max), e.attrs.req !== void 0 && (a.required = "required"), e.attrs.dis !== void 0 && (a.disabled = "disabled"), e.attrs.ro !== void 0 && (a.readonly = "readonly"), e.attrs.req !== void 0 && (a["aria-required"] = "true"), e.attrs.val !== void 0 && (a.value = e.attrs.val);
10712
- var o = t("input", a);
10713
- e.attrs.w && (o.style.width = e.attrs.w);
10714
- var s = null;
10765
+ e.attrs.id && (s.id = e.attrs.id), e.attrs.n ? s.name = e.attrs.n : e.attrs.id && (s.name = e.attrs.id), e.attrs.ph && (s.placeholder = e.attrs.ph), e.attrs.ml && (s.maxlength = e.attrs.ml), e.attrs.min !== void 0 && (s.min = e.attrs.min), e.attrs.max !== void 0 && (s.max = e.attrs.max), e.attrs.req !== void 0 && (s.required = "required"), e.attrs.dis !== void 0 && (s.disabled = "disabled"), e.attrs.ro !== void 0 && (s.readonly = "readonly"), e.attrs.req !== void 0 && (s["aria-required"] = "true"), n.indexOf("error") !== -1 && (s["aria-invalid"] = "true"), e.attrs.val !== void 0 && (s.value = e.attrs.val);
10766
+ var c = t("input", s);
10767
+ e.attrs.w && (c.style.width = e.attrs.w);
10768
+ var l = null;
10715
10769
  if (e.attrs.toggle !== void 0 && !e.attrs.dis) {
10716
- s = t("button", {
10770
+ l = t("button", {
10717
10771
  class: "tokui-pwd-toggle",
10718
10772
  type: "button",
10719
10773
  tabindex: "-1"
10720
- }), s.setAttribute("aria-label", "Toggle password visibility");
10721
- var c = "<svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>", l = "<svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94\"/><path d=\"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19\"/><line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"/><path d=\"M14.12 14.12a3 3 0 1 1-4.24-4.24\"/></svg>";
10722
- s.innerHTML = l, s.addEventListener("click", function() {
10723
- var e = o.type === "password";
10724
- o.type = e ? "text" : "password", s.innerHTML = e ? c : l, s.classList.toggle("tokui-pwd-toggle--active", e);
10774
+ }), l.setAttribute("aria-label", "Toggle password visibility");
10775
+ var u = "<svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>", d = "<svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94\"/><path d=\"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19\"/><line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"/><path d=\"M14.12 14.12a3 3 0 1 1-4.24-4.24\"/></svg>";
10776
+ l.innerHTML = d, l.addEventListener("click", function() {
10777
+ var e = c.type === "password";
10778
+ c.type = e ? "text" : "password", l.innerHTML = e ? u : d, l.classList.toggle("tokui-pwd-toggle--active", e);
10725
10779
  });
10726
10780
  }
10727
- if (d(e) || s) {
10728
- var u = f(e, o);
10729
- if (s) {
10730
- var p = o.nextSibling;
10731
- p ? u.insertBefore(s, p) : u.appendChild(s);
10732
- }
10733
- r.appendChild(u);
10734
- } else r.appendChild(o);
10735
- var m = null;
10736
- return e.attrs.hint && (m = t("div", { class: "tokui-field__hint" }, e.attrs.hint), n.indexOf("error") === -1 ? n.indexOf("success") !== -1 && m.classList.add("tokui-field__hint--success") : m.classList.add("tokui-field__hint--error"), r.appendChild(m)), r._update = function(e) {
10737
- e.v !== void 0 && (o.value = e.v), e.dis === !0 || e.dis === "true" ? o.disabled = !0 : (e.dis === !1 || e.dis === "false") && (o.disabled = !1), e.ph !== void 0 && (o.placeholder = e.ph), e.ro === !0 || e.ro === "true" ? o.readOnly = !0 : (e.ro === !1 || e.ro === "false") && (o.readOnly = !1), e.hint !== void 0 && m && (m.textContent = e.hint);
10738
- }, r._variantTarget = o, r;
10781
+ if (m(e) || l) {
10782
+ var f = g(e, c);
10783
+ if (l) {
10784
+ var p = c.nextSibling;
10785
+ p ? f.insertBefore(l, p) : f.appendChild(l);
10786
+ }
10787
+ r.appendChild(f);
10788
+ } else r.appendChild(c);
10789
+ var h = null;
10790
+ return (e.attrs.hint || e.attrs.live !== void 0) && (h = t("div", { class: "tokui-field__hint" }, e.attrs.hint || ""), n.indexOf("error") === -1 ? n.indexOf("success") !== -1 && h.classList.add("tokui-field__hint--success") : h.classList.add("tokui-field__hint--error"), r.appendChild(h)), e.attrs.live !== void 0 && a(c, h, e.attrs, "tokui-input"), r._update = function(e) {
10791
+ e.v !== void 0 && (c.value = e.v), e.dis === !0 || e.dis === "true" ? c.disabled = !0 : (e.dis === !1 || e.dis === "false") && (c.disabled = !1), e.ph !== void 0 && (c.placeholder = e.ph), e.ro === !0 || e.ro === "true" ? c.readOnly = !0 : (e.ro === !1 || e.ro === "false") && (c.readOnly = !1), e.hint !== void 0 && h && (h.textContent = e.hint), e.status !== void 0 && i(c, h, e.status, "tokui-input");
10792
+ }, r._variantTarget = c, r;
10739
10793
  }), e.register("textarea", (e, n) => {
10740
10794
  let r = t("div", { class: "tokui-field" });
10741
10795
  if (e.attrs.l) {
10742
10796
  let n = { class: "tokui-label" };
10743
- e.attrs.id && (n.for = e.attrs.id), r.appendChild(t("label", n, e.attrs.l));
10797
+ e.attrs.id && (n.for = e.attrs.id), e.attrs.req !== void 0 && (n.class += " tokui-label--req"), r.appendChild(t("label", n, e.attrs.l));
10744
10798
  }
10745
10799
  let i = e.attrs.maxlen ? parseInt(e.attrs.maxlen, 10) : 0, a = e.attrs.auto !== void 0, o = parseInt(e.attrs.rows, 10) || 4, s = e.attrs.maxrows ? parseInt(e.attrs.maxrows, 10) : 0, c = i > 0 || a ? t("div", { class: "tokui-textarea-box" }) : null;
10746
10800
  c && r.appendChild(c);
@@ -10748,7 +10802,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10748
10802
  class: "tokui-input",
10749
10803
  rows: String(o)
10750
10804
  };
10751
- e.attrs.id && (l.id = e.attrs.id), e.attrs.n ? l.name = e.attrs.n : e.attrs.id && (l.name = e.attrs.id), e.attrs.ph && (l.placeholder = e.attrs.ph), e.attrs.req !== void 0 && (l.required = "required"), e.attrs.dis !== void 0 && (l.disabled = "disabled"), e.attrs.ro !== void 0 && (l.readonly = "readonly"), e.attrs.req !== void 0 && (l["aria-required"] = "true"), i > 0 && (l.maxlength = String(i));
10805
+ e.attrs.id && (l.id = e.attrs.id), e.attrs.n ? l.name = e.attrs.n : e.attrs.id && (l.name = e.attrs.id), e.attrs.ph && (l.placeholder = e.attrs.ph), e.attrs.req !== void 0 && (l.required = "required"), e.attrs.dis !== void 0 && (l.disabled = "disabled"), e.attrs.ro !== void 0 && (l.readonly = "readonly"), e.attrs.req !== void 0 && (l["aria-required"] = "true"), /(^|,)\s*error\s*(,|$)/.test(e.attrs.v || "") && (l["aria-invalid"] = "true"), i > 0 && (l.maxlength = String(i));
10752
10806
  let u = t("textarea", l), d = e.children && e.children.length > 0 ? e.children.map((e) => e.content || "").join("") : e.content || e.attrs.tx || "";
10753
10807
  if (u.textContent = d, a) {
10754
10808
  u.classList.add("tokui-textarea--auto");
@@ -10781,52 +10835,52 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10781
10835
  e.v !== void 0 && (u.value = e.v), e.dis === !0 || e.dis === "true" ? u.disabled = !0 : (e.dis === !1 || e.dis === "false") && (u.disabled = !1), e.ro === !0 || e.ro === "true" ? u.readOnly = !0 : (e.ro === !1 || e.ro === "false") && (u.readOnly = !1);
10782
10836
  }, r._variantTarget = u, r._slot = u, r._tokuiType = "textarea", r;
10783
10837
  }), e.register("picker", (e, n) => {
10784
- let r = e.attrs.multi !== void 0, i = e.attrs.dis !== void 0, a = e.attrs.n || e.attrs.id || "picker", s = e.attrs.ph || "", c = t("div", { class: (e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : []).indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
10838
+ let r = e.attrs.multi !== void 0, i = e.attrs.dis !== void 0, a = e.attrs.n || e.attrs.id || "picker", o = e.attrs.ph || "", s = t("div", { class: (e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : []).indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
10785
10839
  if (e.attrs.l) {
10786
10840
  let n = { class: "tokui-label" };
10787
- e.attrs.id && (n.for = e.attrs.id), c.appendChild(t("label", n, e.attrs.l));
10841
+ e.attrs.id && (n.for = e.attrs.id), s.appendChild(t("label", n, e.attrs.l));
10788
10842
  }
10789
- let l = ["tokui-picker"];
10790
- r && l.push("tokui-picker--multi"), i && l.push("tokui-picker--disabled");
10791
- let u = t("div", {
10792
- class: l.join(" "),
10843
+ let c = ["tokui-picker"];
10844
+ r && c.push("tokui-picker--multi"), i && c.push("tokui-picker--disabled");
10845
+ let l = t("div", {
10846
+ class: c.join(" "),
10793
10847
  "data-tokui-picker": e.attrs.id || "",
10794
10848
  role: "listbox",
10795
10849
  "aria-expanded": "false"
10796
10850
  });
10797
- var d = "", f = "";
10851
+ var u = "", f = "";
10798
10852
  r || e.children.forEach((e) => {
10799
- e.attrs && e.attrs.chk !== void 0 && (d = e.attrs.v || "", f = e.attrs && e.attrs.tx || d);
10853
+ e.attrs && e.attrs.chk !== void 0 && (u = e.attrs.v || "", f = e.attrs && e.attrs.tx || u);
10800
10854
  });
10801
10855
  let p = t("div", { class: "tokui-picker-control" });
10802
10856
  r && e.children.forEach((e) => {
10803
- e.attrs && e.attrs.chk !== void 0 && p.appendChild(g(e, u, a));
10857
+ e.attrs && e.attrs.chk !== void 0 && p.appendChild(b(e, l, a));
10804
10858
  });
10805
- let h = {
10859
+ let m = {
10806
10860
  class: "tokui-picker-search",
10807
10861
  type: "text",
10808
10862
  autocomplete: "off"
10809
10863
  };
10810
- s && !f && (h.placeholder = s), i && (h.disabled = "disabled"), f && (h.value = f), p.appendChild(t("input", h)), p.appendChild(t("span", { class: "tokui-picker-arrow" })), u.appendChild(p);
10811
- let v = t("ul", { class: "tokui-picker-dropdown" });
10864
+ o && !f && (m.placeholder = o), i && (m.disabled = "disabled"), f && (m.value = f), p.appendChild(t("input", m)), p.appendChild(t("span", { class: "tokui-picker-arrow" })), l.appendChild(p);
10865
+ let h = t("ul", { class: "tokui-picker-dropdown" });
10812
10866
  e.children.forEach((e) => {
10813
- v.appendChild(m(e));
10867
+ h.appendChild(y(e));
10814
10868
  });
10815
- var y = t("li", { class: "tokui-picker-empty" }, o("picker.noMatch"));
10816
- return y.style.display = "none", v.appendChild(y), u.appendChild(v), r ? e.children.forEach((e) => {
10817
- e.attrs && e.attrs.chk !== void 0 && u.appendChild(t("input", {
10869
+ var g = t("li", { class: "tokui-picker-empty" }, d("picker.noMatch"));
10870
+ return g.style.display = "none", h.appendChild(g), l.appendChild(h), r ? e.children.forEach((e) => {
10871
+ e.attrs && e.attrs.chk !== void 0 && l.appendChild(t("input", {
10818
10872
  type: "hidden",
10819
10873
  name: a,
10820
10874
  value: e.attrs.v || ""
10821
10875
  }));
10822
- }) : u.appendChild(t("input", {
10876
+ }) : l.appendChild(t("input", {
10823
10877
  type: "hidden",
10824
10878
  name: a,
10825
- value: d
10826
- })), c.appendChild(u), c._variantTarget = u, c._slot = v, c._tokuiType = "picker", c._streamCloseHook = function() {
10827
- var e = v.querySelectorAll(".tokui-picker-option--selected");
10879
+ value: u
10880
+ })), s.appendChild(l), s._variantTarget = l, s._slot = h, s._tokuiType = "picker", s._streamCloseHook = function() {
10881
+ var e = h.querySelectorAll(".tokui-picker-option--selected");
10828
10882
  if (!r && e.length > 0) {
10829
- var n = e[0], o = u.querySelector(".tokui-picker-search"), s = u.querySelector("input[type=hidden]");
10883
+ var n = e[0], o = l.querySelector(".tokui-picker-search"), s = l.querySelector("input[type=hidden]");
10830
10884
  o && !o.value && (o.value = n.getAttribute("data-text")), s && !s.value && (s.value = n.getAttribute("data-value"));
10831
10885
  }
10832
10886
  r && e.length > 0 && e.forEach(function(e) {
@@ -10834,21 +10888,21 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10834
10888
  class: "tokui-picker-tag",
10835
10889
  "data-value": r
10836
10890
  }, n + " "), o = t("span", { class: "tokui-picker-tag-close" }, "×");
10837
- i.appendChild(o), p.insertBefore(i, p.querySelector(".tokui-picker-search")), u.appendChild(t("input", {
10891
+ i.appendChild(o), p.insertBefore(i, p.querySelector(".tokui-picker-search")), l.appendChild(t("input", {
10838
10892
  type: "hidden",
10839
10893
  name: a,
10840
10894
  value: r
10841
10895
  }));
10842
- }), !i && typeof document < "u" && _(u, {
10896
+ }), !i && typeof document < "u" && x(l, {
10843
10897
  multi: r,
10844
10898
  name: a
10845
10899
  });
10846
- }, c.setAttribute("data-tokui-resettable", ""), c._tokuiReset = function() {
10847
- var e = u.querySelector(".tokui-picker-search"), n = u.querySelector("input[type=hidden]"), i = v.querySelectorAll(".tokui-picker-option");
10900
+ }, s.setAttribute("data-tokui-resettable", ""), s._tokuiReset = function() {
10901
+ var e = l.querySelector(".tokui-picker-search"), n = l.querySelector("input[type=hidden]"), i = h.querySelectorAll(".tokui-picker-option");
10848
10902
  r ? (p.querySelectorAll(".tokui-picker-tag").forEach(function(e) {
10849
10903
  p.removeChild(e);
10850
- }), u.querySelectorAll("input[type=hidden][name=\"" + a + "\"]").forEach(function(e) {
10851
- u.removeChild(e);
10904
+ }), l.querySelectorAll("input[type=hidden][name=\"" + a + "\"]").forEach(function(e) {
10905
+ l.removeChild(e);
10852
10906
  }), i.forEach(function(n) {
10853
10907
  var r = n.getAttribute("data-selected-initial") === "1";
10854
10908
  if (n.classList.toggle("tokui-picker-option--selected", r), r) {
@@ -10856,19 +10910,19 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10856
10910
  class: "tokui-picker-tag",
10857
10911
  "data-value": o
10858
10912
  }, i + " ");
10859
- s.appendChild(t("span", { class: "tokui-picker-tag-close" }, "×")), p.insertBefore(s, e), u.appendChild(t("input", {
10913
+ s.appendChild(t("span", { class: "tokui-picker-tag-close" }, "×")), p.insertBefore(s, e), l.appendChild(t("input", {
10860
10914
  type: "hidden",
10861
10915
  name: a,
10862
10916
  value: o
10863
10917
  }));
10864
10918
  }
10865
- })) : (e && (e.value = f), n && (n.value = d), i.forEach(function(e) {
10866
- var t = !!d && e.getAttribute("data-value") === d;
10919
+ })) : (e && (e.value = f), n && (n.value = u), i.forEach(function(e) {
10920
+ var t = !!u && e.getAttribute("data-value") === u;
10867
10921
  e.classList.toggle("tokui-picker-option--selected", t);
10868
10922
  }));
10869
- }, c;
10923
+ }, s;
10870
10924
  });
10871
- function m(e) {
10925
+ function y(e) {
10872
10926
  let n = e.attrs && e.attrs.v || "", r = e.attrs && e.attrs.tx || n || e.content || "", i = e.attrs && e.attrs.chk !== void 0, a = t("li", {
10873
10927
  class: "tokui-picker-option",
10874
10928
  "data-value": n,
@@ -10879,14 +10933,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10879
10933
  }, r);
10880
10934
  return i && a.classList.add("tokui-picker-option--selected"), i && a.setAttribute("data-selected-initial", "1"), a;
10881
10935
  }
10882
- function g(e, n, r) {
10936
+ function b(e, n, r) {
10883
10937
  let i = e.attrs && e.attrs.tx || e.attrs && e.attrs.v || e.content || "", a = t("span", {
10884
10938
  class: "tokui-picker-tag",
10885
10939
  "data-value": e.attrs && e.attrs.v || e.content || ""
10886
10940
  }, i + " "), o = t("span", { class: "tokui-picker-tag-close" }, "×");
10887
10941
  return a.appendChild(o), a;
10888
10942
  }
10889
- function _(e, n) {
10943
+ function x(e, n) {
10890
10944
  var r = n.multi, i = n.name, a = e.querySelector(".tokui-picker-control"), o = e.querySelector(".tokui-picker-search"), s = e.querySelector(".tokui-picker-dropdown"), c = e.querySelector(".tokui-picker-empty"), l = !1, u = -1;
10891
10945
  function d() {
10892
10946
  return Array.from(s.querySelectorAll(".tokui-picker-option")).filter(function(e) {
@@ -10994,43 +11048,43 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
10994
11048
  });
10995
11049
  }
10996
11050
  e.register("select", (e, n) => {
10997
- e = r(e);
10998
- let i = e.attrs.multi !== void 0, a = t("div", { class: (e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : []).indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
11051
+ e = o(e);
11052
+ let r = e.attrs.multi !== void 0, i = e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : [], a = t("div", { class: i.indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
10999
11053
  if (e.attrs.l) {
11000
11054
  let n = { class: "tokui-label" };
11001
- e.attrs.id && !i && (n.for = e.attrs.id), a.appendChild(t("label", n, e.attrs.l));
11055
+ e.attrs.id && !r && (n.for = e.attrs.id), e.attrs.req !== void 0 && (n.class += " tokui-label--req"), a.appendChild(t("label", n, e.attrs.l));
11002
11056
  }
11003
- let o = { class: "tokui-select" };
11004
- i && (o.multiple = !0), e.attrs.id && (o.id = e.attrs.id), e.attrs.n ? o.name = e.attrs.n : e.attrs.id && (o.name = e.attrs.id), e.attrs.req !== void 0 && (o["aria-required"] = "true");
11005
- let s = t("select", o);
11057
+ let s = { class: "tokui-select" };
11058
+ r && (s.multiple = !0), e.attrs.id && (s.id = e.attrs.id), e.attrs.n ? s.name = e.attrs.n : e.attrs.id && (s.name = e.attrs.id), e.attrs.req !== void 0 && (s["aria-required"] = "true"), i.indexOf("error") !== -1 && (s["aria-invalid"] = "true");
11059
+ let c = t("select", s);
11006
11060
  if (e.attrs.ph) {
11007
11061
  let n = t("option", {
11008
11062
  value: "",
11009
11063
  disabled: "",
11010
11064
  selected: ""
11011
11065
  }, e.attrs.ph);
11012
- s.appendChild(n);
11066
+ c.appendChild(n);
11013
11067
  }
11014
11068
  return n(e.children).forEach((e) => {
11015
- e && e.nodeType && s.appendChild(e);
11016
- }), a.appendChild(s), a._update = function(e) {
11017
- e.v !== void 0 && (s.value = e.v), e.dis === !0 || e.dis === "true" ? s.disabled = !0 : (e.dis === !1 || e.dis === "false") && (s.disabled = !1);
11018
- }, a._variantTarget = s, a._slot = s, a._tokuiType = "select", a;
11069
+ e && e.nodeType && c.appendChild(e);
11070
+ }), a.appendChild(c), a._update = function(e) {
11071
+ e.v !== void 0 && (c.value = e.v), e.dis === !0 || e.dis === "true" ? c.disabled = !0 : (e.dis === !1 || e.dis === "false") && (c.disabled = !1);
11072
+ }, a._variantTarget = c, a._slot = c, a._tokuiType = "select", a;
11019
11073
  }), e.register("radio", (e, n) => {
11020
- e = r(e);
11021
- let i = e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : [], a = t("div", { class: i.indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
11022
- e.attrs.l && a.appendChild(t("div", { class: "tokui-label" }, e.attrs.l));
11023
- let o = t("div", {
11024
- class: "tokui-radio-group" + (i.indexOf("vertical") === -1 ? "" : " tokui-radio-group--vertical"),
11074
+ e = o(e);
11075
+ let r = e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : [], i = t("div", { class: r.indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
11076
+ e.attrs.l && i.appendChild(t("div", { class: "tokui-label" }, e.attrs.l));
11077
+ let a = t("div", {
11078
+ class: "tokui-radio-group" + (r.indexOf("vertical") === -1 ? "" : " tokui-radio-group--vertical"),
11025
11079
  role: "radiogroup"
11026
11080
  });
11027
- e.attrs.id && (o.id = e.attrs.id);
11081
+ e.attrs.id && (a.id = e.attrs.id);
11028
11082
  let s = e.attrs.n || e.attrs.id || "radio";
11029
- return o._radioName = s, e.children.forEach((e) => {
11030
- o.appendChild(y(e, s));
11031
- }), a.appendChild(o), a._slot = o, a._tokuiType = "radio", a;
11083
+ return a._radioName = s, e.children.forEach((e) => {
11084
+ a.appendChild(C(e, s));
11085
+ }), i.appendChild(a), i._slot = a, i._tokuiType = "radio", i;
11032
11086
  });
11033
- function y(e, n) {
11087
+ function C(e, n) {
11034
11088
  let r = t("label", { class: "tokui-radio-item" });
11035
11089
  r.setAttribute("data-tokui-tag", "opt");
11036
11090
  let i = {
@@ -11042,7 +11096,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11042
11096
  let a = e.attrs && e.attrs.tx || e.attrs && e.attrs.v || e.content || "";
11043
11097
  return r.appendChild(t("span", { class: "tokui-radio-text" }, a)), r;
11044
11098
  }
11045
- function b(e, n) {
11099
+ function w(e, n) {
11046
11100
  let r = t("label", { class: "tokui-checkbox-item" });
11047
11101
  r.setAttribute("data-tokui-tag", "opt");
11048
11102
  let i = {
@@ -11055,41 +11109,41 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11055
11109
  return r.appendChild(t("span", { class: "tokui-checkbox-text" }, a)), r;
11056
11110
  }
11057
11111
  e.register("opt", (e, n, r) => {
11058
- if (r === "radio") return y(e, "");
11059
- if (r === "checkbox") return b(e, "");
11060
- if (r === "picker") return m(e);
11112
+ if (r === "radio") return C(e, "");
11113
+ if (r === "checkbox") return w(e, "");
11114
+ if (r === "picker") return y(e);
11061
11115
  let i = e.attrs ? e.attrs.v : "", a = e.attrs && e.attrs.tx || i || e.content || "";
11062
11116
  return t("option", { value: i }, a);
11063
11117
  }), e.register("checkbox", (e, n) => {
11064
- if (e = r(e), !(e.children && e.children.length > 0 || e.attrs.multi !== void 0)) {
11118
+ if (e = o(e), !(e.children && e.children.length > 0 || e.attrs.multi !== void 0)) {
11065
11119
  let n = (e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : []).indexOf("inline") !== -1;
11066
- var i = t("label", {
11120
+ var r = t("label", {
11067
11121
  class: "tokui-checkbox" + (n ? " tokui-checkbox--inline" : ""),
11068
11122
  role: "checkbox",
11069
11123
  "aria-checked": String(e.attrs.chk !== void 0)
11070
11124
  });
11071
- let r = {
11125
+ let a = {
11072
11126
  type: "checkbox",
11073
11127
  class: "tokui-checkbox-input"
11074
11128
  };
11075
- e.attrs.id && (r.id = e.attrs.id), e.attrs.n ? r.name = e.attrs.n : e.attrs.id && (r.name = e.attrs.id), e.attrs.chk !== void 0 && (r.checked = "checked");
11076
- let o = t("input", r);
11077
- if (i.appendChild(o), i.appendChild(t("span", { class: "tokui-checkbox-text" }, e.attrs.l || "")), o.addEventListener("change", function() {
11078
- i.setAttribute("aria-checked", String(o.checked));
11129
+ e.attrs.id && (a.id = e.attrs.id), e.attrs.n ? a.name = e.attrs.n : e.attrs.id && (a.name = e.attrs.id), e.attrs.chk !== void 0 && (a.checked = "checked");
11130
+ let o = t("input", a);
11131
+ if (r.appendChild(o), r.appendChild(t("span", { class: "tokui-checkbox-text" }, e.attrs.l || "")), o.addEventListener("change", function() {
11132
+ r.setAttribute("aria-checked", String(o.checked));
11079
11133
  }), !n) {
11080
- var a = t("div", { class: "tokui-field" });
11081
- return a.appendChild(i), a;
11134
+ var i = t("div", { class: "tokui-field" });
11135
+ return i.appendChild(r), i;
11082
11136
  }
11083
- return i;
11137
+ return r;
11084
11138
  }
11085
- let o = e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : [], s = t("div", { class: o.indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
11139
+ let a = e.attrs.v ? e.attrs.v.split(",").map((e) => e.trim()) : [], s = t("div", { class: a.indexOf("inline") === -1 ? "tokui-field" : "tokui-field tokui-field--inline" });
11086
11140
  e.attrs.l && s.appendChild(t("div", { class: "tokui-label" }, e.attrs.l));
11087
11141
  let c = e.attrs.n || e.attrs.id || "checkbox", l = t("div", {
11088
- class: "tokui-checkbox-group" + (o.indexOf("vertical") === -1 ? "" : " tokui-checkbox-group--vertical"),
11142
+ class: "tokui-checkbox-group" + (a.indexOf("vertical") === -1 ? "" : " tokui-checkbox-group--vertical"),
11089
11143
  role: "group"
11090
11144
  });
11091
11145
  return l._checkboxName = c, e.attrs.id && (l.id = e.attrs.id), e.children && e.children.length && e.children.forEach(function(e) {
11092
- l.appendChild(b(e, c));
11146
+ l.appendChild(w(e, c));
11093
11147
  }), s.appendChild(l), s._slot = l, s._tokuiType = "checkbox", s;
11094
11148
  }), e.register("switch", (n) => {
11095
11149
  var r = t("label", { class: "tokui-switch" }), i = {
@@ -11119,131 +11173,131 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11119
11173
  return r.setAttribute("data-tokui-resettable", ""), r._tokuiReset = function() {
11120
11174
  o.checked = c, a.setAttribute("aria-checked", String(c));
11121
11175
  }, r;
11122
- }), e.register("slider", (e) => {
11123
- var n = parseFloat(e.attrs.min) || 0, r = parseFloat(e.attrs.max) || 100, i = parseFloat(e.attrs.step) || 1, a = parseFloat(e.attrs.v) || 0;
11124
- a < n && (a = n), a > r && (a = r);
11125
- var o = t("div", { class: "tokui-field" });
11126
- e.attrs.l && o.appendChild(t("label", {
11176
+ }), e.register("slider", (n) => {
11177
+ var r = parseFloat(n.attrs.min) || 0, i = parseFloat(n.attrs.max) || 100, a = parseFloat(n.attrs.step) || 1, o = parseFloat(n.attrs.v) || 0;
11178
+ o < r && (o = r), o > i && (o = i);
11179
+ var s = t("div", { class: "tokui-field" });
11180
+ n.attrs.l && s.appendChild(t("label", {
11127
11181
  class: "tokui-label",
11128
- for: e.attrs.id || ""
11129
- }, e.attrs.l));
11130
- var s = t("div", { class: "tokui-slider" }), c = t("div", { class: "tokui-slider__track" }), l = t("div", { class: "tokui-slider__fill" }), u = t("div", {
11182
+ for: n.attrs.id || ""
11183
+ }, n.attrs.l));
11184
+ var c = t("div", { class: "tokui-slider" }), l = t("div", { class: "tokui-slider__track" }), u = t("div", { class: "tokui-slider__fill" }), d = t("div", {
11131
11185
  class: "tokui-slider__thumb",
11132
11186
  role: "slider",
11133
- "aria-valuemin": String(n),
11134
- "aria-valuemax": String(r),
11135
- "aria-valuenow": String(a),
11136
- "aria-label": e.attrs.l || "Slider",
11187
+ "aria-valuemin": String(r),
11188
+ "aria-valuemax": String(i),
11189
+ "aria-valuenow": String(o),
11190
+ "aria-label": n.attrs.l || "Slider",
11137
11191
  tabindex: "0"
11138
- }), d = t("span", { class: "tokui-slider__value" }, String(a)), f = t("input", { type: "hidden" });
11139
- e.attrs.id && (f.id = e.attrs.id), e.attrs.n ? f.name = e.attrs.n : e.attrs.id && (f.name = e.attrs.id), f.value = a, c.appendChild(l), c.appendChild(u), s.appendChild(c), s.appendChild(d), s.appendChild(f);
11140
- var p = (a - n) / (r - n) * 100;
11141
- if (l.style.width = p + "%", u.style.left = p + "%", e.attrs.dis !== void 0) s.classList.add("tokui-slider--disabled");
11192
+ }), f = t("span", { class: "tokui-slider__value" }, String(o)), p = t("input", { type: "hidden" });
11193
+ n.attrs.id && (p.id = n.attrs.id), n.attrs.n ? p.name = n.attrs.n : n.attrs.id && (p.name = n.attrs.id), p.value = o, l.appendChild(u), l.appendChild(d), c.appendChild(l), c.appendChild(f), c.appendChild(p);
11194
+ var m = (o - r) / (i - r) * 100;
11195
+ if (u.style.width = m + "%", d.style.left = m + "%", n.attrs.dis !== void 0) c.classList.add("tokui-slider--disabled");
11142
11196
  else {
11143
- var m = function(e) {
11197
+ var h = function(e) {
11144
11198
  e.preventDefault();
11145
- var t = c.getBoundingClientRect(), o = ((e.touches ? e.touches[0].clientX : e.clientX) - t.left) / t.width;
11146
- o = Math.max(0, Math.min(1, o));
11147
- var s = n + o * (r - n), p = Math.round(s / i) * i;
11148
- p = Math.max(n, Math.min(r, p));
11149
- var m = i < 1 ? 10 ** Math.ceil(-Math.log10(i)) : 1;
11150
- p = Math.round(p * m) / m, a = p;
11151
- var h = (a - n) / (r - n) * 100;
11152
- l.style.width = h + "%", u.style.left = h + "%", d.textContent = String(a), f.value = a, u.setAttribute("aria-valuenow", String(a));
11153
- }, h = function() {
11154
- if (document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", h), document.removeEventListener("touchmove", m), document.removeEventListener("touchend", h), u.classList.remove("tokui-slider__thumb--dragging"), e.attrs.clk) {
11155
- var t = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(e.attrs.clk) : null;
11199
+ var t = l.getBoundingClientRect(), n = ((e.touches ? e.touches[0].clientX : e.clientX) - t.left) / t.width;
11200
+ n = Math.max(0, Math.min(1, n));
11201
+ var s = r + n * (i - r), c = Math.round(s / a) * a;
11202
+ c = Math.max(r, Math.min(i, c));
11203
+ var m = a < 1 ? 10 ** Math.ceil(-Math.log10(a)) : 1;
11204
+ c = Math.round(c * m) / m, o = c;
11205
+ var h = (o - r) / (i - r) * 100;
11206
+ u.style.width = h + "%", d.style.left = h + "%", f.textContent = String(o), p.value = o, d.setAttribute("aria-valuenow", String(o));
11207
+ }, g = function() {
11208
+ if (document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", g), document.removeEventListener("touchmove", h), document.removeEventListener("touchend", g), d.classList.remove("tokui-slider__thumb--dragging"), n.attrs.clk) {
11209
+ var t = e.eventBus ? e.eventBus.getHandler(n.attrs.clk) : null;
11156
11210
  t && t({
11157
- value: a,
11158
- id: e.attrs.id
11211
+ value: o,
11212
+ id: n.attrs.id
11159
11213
  });
11160
11214
  }
11161
- }, g = function(e) {
11162
- e.preventDefault(), m(e), document.addEventListener("mousemove", m), document.addEventListener("mouseup", h), document.addEventListener("touchmove", m), document.addEventListener("touchend", h), u.classList.add("tokui-slider__thumb--dragging");
11215
+ }, _ = function(e) {
11216
+ e.preventDefault(), h(e), document.addEventListener("mousemove", h), document.addEventListener("mouseup", g), document.addEventListener("touchmove", h), document.addEventListener("touchend", g), d.classList.add("tokui-slider__thumb--dragging");
11163
11217
  };
11164
- s.addEventListener("mousedown", g), s.addEventListener("touchstart", g, { passive: !1 });
11218
+ c.addEventListener("mousedown", _), c.addEventListener("touchstart", _, { passive: !1 });
11165
11219
  }
11166
- o._update = function(e) {
11220
+ s._update = function(e) {
11167
11221
  if (e.v !== void 0) {
11168
11222
  var t = parseFloat(e.v) || 0;
11169
- isNaN(n) || (t = Math.max(n, t)), isNaN(r) || (t = Math.min(r, t)), a = t;
11170
- var i = (a - n) / (r - n) * 100;
11171
- l.style.width = i + "%", u.style.left = i + "%", d.textContent = String(a), f.value = a, u.setAttribute("aria-valuenow", String(a));
11223
+ isNaN(r) || (t = Math.max(r, t)), isNaN(i) || (t = Math.min(i, t)), o = t;
11224
+ var n = (o - r) / (i - r) * 100;
11225
+ u.style.width = n + "%", d.style.left = n + "%", f.textContent = String(o), p.value = o, d.setAttribute("aria-valuenow", String(o));
11172
11226
  }
11173
- e.dis === !0 || e.dis === "true" ? s.classList.add("tokui-slider--disabled") : (e.dis === !1 || e.dis === "false") && s.classList.remove("tokui-slider--disabled");
11227
+ e.dis === !0 || e.dis === "true" ? c.classList.add("tokui-slider--disabled") : (e.dis === !1 || e.dis === "false") && c.classList.remove("tokui-slider--disabled");
11174
11228
  };
11175
- var _ = a;
11176
- return o.setAttribute("data-tokui-resettable", ""), o._tokuiReset = function() {
11177
- a = _;
11178
- var e = (a - n) / (r - n) * 100;
11179
- l.style.width = e + "%", u.style.left = e + "%", d.textContent = String(a), f.value = a, u.setAttribute("aria-valuenow", String(a));
11180
- }, s._variantTarget = s, o.appendChild(s), o;
11181
- }), e.register("rate", (e) => {
11182
- var n = parseInt(e.attrs.max) || 5, r = parseInt(e.attrs.v) || 0, i = e.attrs.tx || "★", a = "☆", s = t("div", { class: "tokui-field" });
11183
- e.attrs.l && s.appendChild(t("label", {
11229
+ var v = o;
11230
+ return s.setAttribute("data-tokui-resettable", ""), s._tokuiReset = function() {
11231
+ o = v;
11232
+ var e = (o - r) / (i - r) * 100;
11233
+ u.style.width = e + "%", d.style.left = e + "%", f.textContent = String(o), p.value = o, d.setAttribute("aria-valuenow", String(o));
11234
+ }, c._variantTarget = c, s.appendChild(c), s;
11235
+ }), e.register("rate", (n) => {
11236
+ var r = parseInt(n.attrs.max) || 5, i = parseInt(n.attrs.v) || 0, a = n.attrs.tx || "★", o = "☆", s = t("div", { class: "tokui-field" });
11237
+ n.attrs.l && s.appendChild(t("label", {
11184
11238
  class: "tokui-label",
11185
- for: e.attrs.id || ""
11186
- }, e.attrs.l));
11239
+ for: n.attrs.id || ""
11240
+ }, n.attrs.l));
11187
11241
  var c = t("div", {
11188
11242
  class: "tokui-rate",
11189
11243
  role: "radiogroup",
11190
- "aria-label": e.attrs.l || o("rate.defaultLabel"),
11244
+ "aria-label": n.attrs.l || d("rate.defaultLabel"),
11191
11245
  tabindex: "0"
11192
11246
  }), l = t("input", { type: "hidden" });
11193
- e.attrs.id && (l.id = e.attrs.id), e.attrs.n ? l.name = e.attrs.n : e.attrs.id && (l.name = e.attrs.id), l.value = r;
11194
- for (var u = [], d = 0; d < n; d++) {
11195
- var f = t("span", {
11247
+ n.attrs.id && (l.id = n.attrs.id), n.attrs.n ? l.name = n.attrs.n : n.attrs.id && (l.name = n.attrs.id), l.value = i;
11248
+ for (var u = [], f = 0; f < r; f++) {
11249
+ var p = t("span", {
11196
11250
  class: "tokui-rate__star",
11197
- "data-index": String(d + 1),
11251
+ "data-index": String(f + 1),
11198
11252
  role: "radio",
11199
- "aria-checked": String(d < r)
11253
+ "aria-checked": String(f < i)
11200
11254
  });
11201
- f.textContent = d < r ? i : a, d < r && f.classList.add("tokui-rate__star--active"), u.push(f), c.appendChild(f);
11255
+ p.textContent = f < i ? a : o, f < i && p.classList.add("tokui-rate__star--active"), u.push(p), c.appendChild(p);
11202
11256
  }
11203
- var p = t("span", { class: "tokui-rate__text" });
11204
- r > 0 && (p.textContent = r + "/" + n), c.appendChild(p), c.appendChild(l), e.attrs.ro === void 0 ? e.attrs.dis === void 0 ? (c.addEventListener("mouseover", function(e) {
11257
+ var m = t("span", { class: "tokui-rate__text" });
11258
+ i > 0 && (m.textContent = i + "/" + r), c.appendChild(m), c.appendChild(l), n.attrs.ro === void 0 ? n.attrs.dis === void 0 ? (c.addEventListener("mouseover", function(e) {
11205
11259
  var t = e.target;
11206
- if (t.classList.contains("tokui-rate__star")) for (var n = parseInt(t.getAttribute("data-index")), r = 0; r < u.length; r++) u[r].textContent = r < n ? i : a, u[r].classList.toggle("tokui-rate__star--hover", r < n);
11260
+ if (t.classList.contains("tokui-rate__star")) for (var n = parseInt(t.getAttribute("data-index")), r = 0; r < u.length; r++) u[r].textContent = r < n ? a : o, u[r].classList.toggle("tokui-rate__star--hover", r < n);
11207
11261
  }), c.addEventListener("mouseout", function() {
11208
- for (var e = 0; e < u.length; e++) u[e].textContent = e < r ? i : a, u[e].classList.remove("tokui-rate__star--hover");
11262
+ for (var e = 0; e < u.length; e++) u[e].textContent = e < i ? a : o, u[e].classList.remove("tokui-rate__star--hover");
11209
11263
  }), c.addEventListener("click", function(t) {
11210
- var o = t.target;
11211
- if (o.classList.contains("tokui-rate__star")) {
11212
- var s = parseInt(o.getAttribute("data-index"));
11213
- r = r === s ? 0 : s, l.value = r, p.textContent = r > 0 ? r + "/" + n : "";
11214
- for (var c = 0; c < u.length; c++) u[c].textContent = c < r ? i : a, u[c].classList.toggle("tokui-rate__star--active", c < r), u[c].setAttribute("aria-checked", String(c < r));
11215
- if (e.attrs.clk) {
11216
- var d = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(e.attrs.clk) : null;
11217
- d && d({
11218
- value: r,
11219
- max: n,
11220
- id: e.attrs.id
11264
+ var s = t.target;
11265
+ if (s.classList.contains("tokui-rate__star")) {
11266
+ var c = parseInt(s.getAttribute("data-index"));
11267
+ i = i === c ? 0 : c, l.value = i, m.textContent = i > 0 ? i + "/" + r : "";
11268
+ for (var d = 0; d < u.length; d++) u[d].textContent = d < i ? a : o, u[d].classList.toggle("tokui-rate__star--active", d < i), u[d].setAttribute("aria-checked", String(d < i));
11269
+ if (n.attrs.clk) {
11270
+ var f = e.eventBus ? e.eventBus.getHandler(n.attrs.clk) : null;
11271
+ f && f({
11272
+ value: i,
11273
+ max: r,
11274
+ id: n.attrs.id
11221
11275
  });
11222
11276
  }
11223
11277
  }
11224
11278
  }), c.addEventListener("keydown", function(e) {
11225
- if (e.key === "ArrowRight" || e.key === "ArrowUp") e.preventDefault(), r = Math.min(r + 1, n);
11226
- else if (e.key === "ArrowLeft" || e.key === "ArrowDown") e.preventDefault(), r = Math.max(r - 1, 0);
11279
+ if (e.key === "ArrowRight" || e.key === "ArrowUp") e.preventDefault(), i = Math.min(i + 1, r);
11280
+ else if (e.key === "ArrowLeft" || e.key === "ArrowDown") e.preventDefault(), i = Math.max(i - 1, 0);
11227
11281
  else return;
11228
- l.value = r, p.textContent = r > 0 ? r + "/" + n : "";
11229
- for (var t = 0; t < u.length; t++) u[t].textContent = t < r ? i : a, u[t].classList.toggle("tokui-rate__star--active", t < r), u[t].setAttribute("aria-checked", String(t < r));
11282
+ l.value = i, m.textContent = i > 0 ? i + "/" + r : "";
11283
+ for (var t = 0; t < u.length; t++) u[t].textContent = t < i ? a : o, u[t].classList.toggle("tokui-rate__star--active", t < i), u[t].setAttribute("aria-checked", String(t < i));
11230
11284
  })) : c.classList.add("tokui-rate--disabled") : c.classList.add("tokui-rate--readonly"), s._update = function(e) {
11231
11285
  if (e.v !== void 0) {
11232
- r = parseInt(e.v) || 0, r > n && (r = n), r < 0 && (r = 0), l.value = r, p.textContent = r > 0 ? r + "/" + n : "";
11233
- for (var t = 0; t < u.length; t++) u[t].textContent = t < r ? i : a, u[t].classList.toggle("tokui-rate__star--active", t < r), u[t].setAttribute("aria-checked", String(t < r));
11286
+ i = parseInt(e.v) || 0, i > r && (i = r), i < 0 && (i = 0), l.value = i, m.textContent = i > 0 ? i + "/" + r : "";
11287
+ for (var t = 0; t < u.length; t++) u[t].textContent = t < i ? a : o, u[t].classList.toggle("tokui-rate__star--active", t < i), u[t].setAttribute("aria-checked", String(t < i));
11234
11288
  }
11235
11289
  e.dis === !0 || e.dis === "true" ? c.classList.add("tokui-rate--disabled") : (e.dis === !1 || e.dis === "false") && c.classList.remove("tokui-rate--disabled");
11236
11290
  };
11237
- var m = r;
11291
+ var h = i;
11238
11292
  return s.setAttribute("data-tokui-resettable", ""), s._tokuiReset = function() {
11239
- r = m, l.value = r, p.textContent = r > 0 ? r + "/" + n : "";
11240
- for (var e = 0; e < u.length; e++) u[e].textContent = e < r ? i : a, u[e].classList.toggle("tokui-rate__star--active", e < r), u[e].setAttribute("aria-checked", String(e < r));
11293
+ i = h, l.value = i, m.textContent = i > 0 ? i + "/" + r : "";
11294
+ for (var e = 0; e < u.length; e++) u[e].textContent = e < i ? a : o, u[e].classList.toggle("tokui-rate__star--active", e < i), u[e].setAttribute("aria-checked", String(e < i));
11241
11295
  }, c._variantTarget = c, s.appendChild(c), s;
11242
- }), e.register("transfer", (e, n) => {
11243
- var r = t("div", { class: "tokui-field" });
11244
- e.attrs.l && r.appendChild(t("label", { class: "tokui-label" }, e.attrs.l));
11245
- var i = t("div", { class: "tokui-transfer" });
11246
- function a(e) {
11296
+ }), e.register("transfer", (n, r) => {
11297
+ var i = t("div", { class: "tokui-field" });
11298
+ n.attrs.l && i.appendChild(t("label", { class: "tokui-label" }, n.attrs.l));
11299
+ var a = t("div", { class: "tokui-transfer" });
11300
+ function o(e) {
11247
11301
  var n = t("div", {
11248
11302
  class: "tokui-transfer__panel",
11249
11303
  role: "listbox"
@@ -11259,10 +11313,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11259
11313
  var e = i.checked;
11260
11314
  n._items.forEach(function(t) {
11261
11315
  t._cb.checked = e;
11262
- }), _(n);
11316
+ }), v(n);
11263
11317
  }), n;
11264
11318
  }
11265
- function o(e, n, r) {
11319
+ function s(e, n, r) {
11266
11320
  var i = t("label", {
11267
11321
  class: "tokui-transfer__item",
11268
11322
  role: "option",
@@ -11275,79 +11329,79 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11275
11329
  });
11276
11330
  return i.appendChild(a), i.appendChild(t("span", {}, n)), i._cb = a, a.addEventListener("change", function() {
11277
11331
  var e = i.closest(".tokui-transfer__panel");
11278
- e && _(e);
11332
+ e && v(e);
11279
11333
  }), i;
11280
11334
  }
11281
- var s = e.attrs.tt || "Source", c = e.attrs.tt2 || "Target", l = a(s), u = a(c);
11282
- function d(e) {
11335
+ var c = n.attrs.tt || "Source", l = n.attrs.tt2 || "Target", u = o(c), d = o(l);
11336
+ function f(e) {
11283
11337
  return /^\d+$/.test(String(e).trim()) ? String(e).trim() + "px" : String(e).trim();
11284
11338
  }
11285
- [l, u].forEach(function(t) {
11286
- if (e.attrs.h) {
11287
- var n = d(e.attrs.h);
11288
- t.style.height = n, t.style.minHeight = n, t.style.maxHeight = n;
11289
- } else e.attrs.mh && (t.style.maxHeight = d(e.attrs.mh));
11339
+ [u, d].forEach(function(e) {
11340
+ if (n.attrs.h) {
11341
+ var t = f(n.attrs.h);
11342
+ e.style.height = t, e.style.minHeight = t, e.style.maxHeight = t;
11343
+ } else n.attrs.mh && (e.style.maxHeight = f(n.attrs.mh));
11290
11344
  });
11291
- var f = t("div", { class: "tokui-transfer__actions" }), p = t("button", {
11345
+ var p = t("div", { class: "tokui-transfer__actions" }), m = t("button", {
11292
11346
  class: "tokui-transfer__btn",
11293
11347
  type: "button"
11294
- }, "→"), m = t("button", {
11348
+ }, "→"), h = t("button", {
11295
11349
  class: "tokui-transfer__btn",
11296
11350
  type: "button"
11297
11351
  }, "←");
11298
- f.appendChild(p), f.appendChild(m);
11299
- var h = t("input", { type: "hidden" });
11300
- e.attrs.id && (h.id = e.attrs.id), e.attrs.n ? h.name = e.attrs.n : e.attrs.id && (h.name = e.attrs.id);
11301
- function g() {
11302
- h.value = u._items.map(function(e) {
11352
+ p.appendChild(m), p.appendChild(h);
11353
+ var g = t("input", { type: "hidden" });
11354
+ n.attrs.id && (g.id = n.attrs.id), n.attrs.n ? g.name = n.attrs.n : n.attrs.id && (g.name = n.attrs.id);
11355
+ function _() {
11356
+ g.value = d._items.map(function(e) {
11303
11357
  return e._cb.value;
11304
11358
  }).join(",");
11305
11359
  }
11306
- function _(e) {
11360
+ function v(e) {
11307
11361
  var t = e._items.filter(function(e) {
11308
11362
  return e._cb.checked;
11309
11363
  }).length;
11310
11364
  e._count.textContent = t + "/" + e._items.length, e._checkAll.checked = t > 0 && t === e._items.length;
11311
11365
  }
11312
- function v(t, n) {
11313
- var r = [];
11366
+ function y(t, r) {
11367
+ var i = [];
11314
11368
  if (t._items = t._items.filter(function(e) {
11315
- return e._cb.checked ? (e._cb.checked = !1, n._body.appendChild(e), n._items.push(e), r.push(e), !1) : !0;
11316
- }), _(t), _(n), g(), e.attrs.clk && r.length > 0) {
11317
- var i = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(e.attrs.clk) : null;
11318
- i && i({
11319
- values: u._items.map(function(e) {
11369
+ return e._cb.checked ? (e._cb.checked = !1, r._body.appendChild(e), r._items.push(e), i.push(e), !1) : !0;
11370
+ }), v(t), v(r), _(), n.attrs.clk && i.length > 0) {
11371
+ var a = e.eventBus ? e.eventBus.getHandler(n.attrs.clk) : null;
11372
+ a && a({
11373
+ values: d._items.map(function(e) {
11320
11374
  return e._cb.value;
11321
11375
  }),
11322
- id: e.attrs.id
11376
+ id: n.attrs.id
11323
11377
  });
11324
11378
  }
11325
11379
  }
11326
- function y(e) {
11380
+ function b(e) {
11327
11381
  (e || []).forEach(function(e) {
11328
- e.type === "opt" && b(e);
11329
- }), _(l), _(u), g();
11382
+ e.type === "opt" && x(e);
11383
+ }), v(u), v(d), _();
11330
11384
  }
11331
- function b(e) {
11332
- var t = e.attrs && e.attrs.v || "", n = e.attrs && e.attrs.tx || t, i = e.attrs && e.attrs.chk !== void 0, a = o(t, n, r._transferOptIdx++);
11333
- return a.setAttribute("data-tokui-init-side", i ? "right" : "left"), i ? (u._body.appendChild(a), u._items.push(a)) : (l._body.appendChild(a), l._items.push(a)), _(l), _(u), g(), a;
11334
- }
11335
- p.addEventListener("click", function() {
11336
- v(l, u);
11337
- }), m.addEventListener("click", function() {
11338
- v(u, l);
11339
- }), r._transferOptIdx = 0;
11340
- var x = t("div", {});
11341
- return x.style.display = "none", i.appendChild(l), i.appendChild(f), i.appendChild(u), i.appendChild(h), i.appendChild(x), e.attrs.dis !== void 0 && i.classList.add("tokui-transfer--disabled"), r._tokuiTransferAppend = function(e) {
11342
- return b(e);
11343
- }, e.children && e.children.length && y(e.children), r._streamCloseHook = function() {
11344
- x.innerHTML = "";
11345
- }, r._slot = x, r._tokuiType = "transfer", i._variantTarget = i, r.setAttribute("data-tokui-resettable", ""), r._tokuiReset = function() {
11346
- l._items.concat(u._items).forEach(function(e) {
11347
- var t = (e.getAttribute("data-tokui-init-side") || "left") === "right" ? u : l, n = u._items.indexOf(e) === -1 ? l : u;
11385
+ function x(e) {
11386
+ var t = e.attrs && e.attrs.v || "", n = e.attrs && e.attrs.tx || t, r = e.attrs && e.attrs.chk !== void 0, a = s(t, n, i._transferOptIdx++);
11387
+ return a.setAttribute("data-tokui-init-side", r ? "right" : "left"), r ? (d._body.appendChild(a), d._items.push(a)) : (u._body.appendChild(a), u._items.push(a)), v(u), v(d), _(), a;
11388
+ }
11389
+ m.addEventListener("click", function() {
11390
+ y(u, d);
11391
+ }), h.addEventListener("click", function() {
11392
+ y(d, u);
11393
+ }), i._transferOptIdx = 0;
11394
+ var S = t("div", {});
11395
+ return S.style.display = "none", a.appendChild(u), a.appendChild(p), a.appendChild(d), a.appendChild(g), a.appendChild(S), n.attrs.dis !== void 0 && a.classList.add("tokui-transfer--disabled"), i._tokuiTransferAppend = function(e) {
11396
+ return x(e);
11397
+ }, n.children && n.children.length && b(n.children), i._streamCloseHook = function() {
11398
+ S.innerHTML = "";
11399
+ }, i._slot = S, i._tokuiType = "transfer", a._variantTarget = a, i.setAttribute("data-tokui-resettable", ""), i._tokuiReset = function() {
11400
+ u._items.concat(d._items).forEach(function(e) {
11401
+ var t = (e.getAttribute("data-tokui-init-side") || "left") === "right" ? d : u, n = d._items.indexOf(e) === -1 ? u : d;
11348
11402
  n !== t && (n._items.splice(n._items.indexOf(e), 1), t._body.appendChild(e), t._items.push(e)), e._cb && (e._cb.checked = !1);
11349
- }), _(l), _(u), g();
11350
- }, r.appendChild(i), r;
11403
+ }), v(u), v(d), _();
11404
+ }, i.appendChild(a), i;
11351
11405
  }), e.register("numinput", (e) => {
11352
11406
  var n = parseFloat(e.attrs.min), r = parseFloat(e.attrs.max), i = parseFloat(e.attrs.step) || 1, a = parseFloat(e.attrs.v) || 0;
11353
11407
  isNaN(n) || (a = Math.max(n, a)), isNaN(r) || (a = Math.min(r, a));
@@ -11403,7 +11457,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11403
11457
  a = h, d.value = String(a), d.setAttribute("value", String(a)), m.value = a;
11404
11458
  }, s.appendChild(c), s._variantTarget = c, s;
11405
11459
  });
11406
- var x = new Set([
11460
+ var T = new Set([
11407
11461
  "primary",
11408
11462
  "danger",
11409
11463
  "success",
@@ -11416,39 +11470,41 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11416
11470
  "block"
11417
11471
  ]);
11418
11472
  e.register("btn", (e) => {
11419
- let r = n(e.attrs);
11420
- var o = r.act === "submit" ? "submit" : r.act === "reset" ? "reset" : "button", s = "tokui-btn";
11421
- e.attrs.t && x.has(e.attrs.t) && (s += " tokui-btn--" + e.attrs.t), r.act === "print" && (s += " tokui-btn--print");
11422
- let c = {
11423
- class: s,
11424
- type: o
11473
+ let i = n(e.attrs);
11474
+ var a = i.act === "submit" ? "submit" : i.act === "reset" ? "reset" : "button", o = "tokui-btn";
11475
+ e.attrs.t && T.has(e.attrs.t) && (o += " tokui-btn--" + e.attrs.t), i.act === "print" && (o += " tokui-btn--print");
11476
+ let l = {
11477
+ class: o,
11478
+ type: a
11425
11479
  };
11426
- r.formId && (c["data-tokui-form"] = r.formId), r.act && (c["data-tokui-act"] = r.act), r.act === "submit" && r.handler && (c["data-tokui-sub"] = r.handler), r.act === "reset" && r.handler && (c["data-tokui-handler"] = r.handler), r.act === "print" && (c["data-tokui-target"] = r.target, c["data-tokui-print-trigger"] = ""), !r.act && r.handler && (c["data-tokui-clk"] = r.handler), e.attrs.id && (c.id = e.attrs.id), e.attrs.dis !== void 0 && (c.disabled = "disabled"), Object.keys(e.attrs).forEach((t) => {
11427
- t.startsWith("data-") && (c[t] = e.attrs[t]);
11428
- });
11429
- let l = "";
11430
- e.attrs.w && (l += "width:" + e.attrs.w + ";");
11431
- let u = i(e.attrs.bg);
11432
- u && (l += "background:" + u + ";");
11433
- let d = i(e.attrs.fc);
11434
- d && (l += "color:" + d + ";"), e.attrs.radius && (l += "border-radius:" + e.attrs.radius + ";"), l && (c.style = l);
11435
- let f = e.attrs.tx || e.content || "", p = e.attrs.icon, m = e.attrs.i, h = p ? a(p, 16) : "", g = !!(p || m), _ = t("button", c);
11436
- if (_._tokuiType = "btn", !f && g) {
11437
- _.classList.add("tokui-btn--icon-only");
11438
- let t = e.attrs.l || e.attrs.tt || p || "";
11439
- t && (_.setAttribute("aria-label", t), _.setAttribute("data-tokui-tip", t));
11440
- }
11441
- if (p) {
11480
+ i.formId && (l["data-tokui-form"] = i.formId), i.act && (l["data-tokui-act"] = i.act), i.act === "submit" && i.handler && (l["data-tokui-sub"] = i.handler), i.act === "reset" && i.handler && (l["data-tokui-handler"] = i.handler), i.act === "print" && (l["data-tokui-target"] = i.target, l["data-tokui-print-trigger"] = ""), !i.act && i.handler && (l["data-tokui-clk"] = i.handler), e.attrs.id && (l.id = e.attrs.id), e.attrs.dis !== void 0 && (l.disabled = "disabled"), Object.keys(e.attrs).forEach((t) => {
11481
+ t.startsWith("data-") && (l[t] = e.attrs[t]);
11482
+ });
11483
+ let u = "", d = r(e.attrs.w);
11484
+ d && (u += "width:" + d + ";");
11485
+ let f = s(e.attrs.bg);
11486
+ f && (u += "background:" + f + ";");
11487
+ let p = s(e.attrs.fc);
11488
+ p && (u += "color:" + p + ";");
11489
+ let m = r(e.attrs.radius);
11490
+ m && (u += "border-radius:" + m + ";"), u && (l.style = u);
11491
+ let h = e.attrs.tx || e.content || "", g = e.attrs.icon, _ = e.attrs.i, v = g ? c(g, 16) : "", y = !!(g || _), b = t("button", l);
11492
+ if (b._tokuiType = "btn", !h && y) {
11493
+ b.classList.add("tokui-btn--icon-only");
11494
+ let t = e.attrs.l || e.attrs.tt || g || "";
11495
+ t && (b.setAttribute("aria-label", t), b.setAttribute("data-tokui-tip", t));
11496
+ }
11497
+ if (g) {
11442
11498
  let e = t("span", { class: "tokui-btn__icon" });
11443
- e.innerHTML = h, _.appendChild(e), _.classList.add("tokui-btn--has-icon");
11444
- } else if (m) {
11445
- let e = t("span", { class: "tokui-btn__icon tokui-btn__icon--emoji" }, m);
11446
- _.appendChild(e), _.classList.add("tokui-btn--has-icon");
11447
- }
11448
- let v = null;
11449
- return f && (v = t("span", { class: "tokui-btn__text" }, f), _.appendChild(v)), _._tokuiTextSpan = v, _._update = function(e) {
11450
- e.dis === !0 || e.dis === "true" ? _.disabled = !0 : (e.dis === !1 || e.dis === "false") && (_.disabled = !1), e.tx !== void 0 && v && (v.textContent = e.tx);
11451
- }, _;
11499
+ e.innerHTML = v, b.appendChild(e), b.classList.add("tokui-btn--has-icon");
11500
+ } else if (_) {
11501
+ let e = t("span", { class: "tokui-btn__icon tokui-btn__icon--emoji" }, _);
11502
+ b.appendChild(e), b.classList.add("tokui-btn--has-icon");
11503
+ }
11504
+ let x = null;
11505
+ return h && (x = t("span", { class: "tokui-btn__text" }, h), b.appendChild(x)), b._tokuiTextSpan = x, b._update = function(e) {
11506
+ e.dis === !0 || e.dis === "true" ? b.disabled = !0 : (e.dis === !1 || e.dis === "false") && (b.disabled = !1), e.tx !== void 0 && x && (x.textContent = e.tx);
11507
+ }, b;
11452
11508
  }), e.register("print-area", (e, n) => {
11453
11509
  let r = { class: "tokui-print-area" };
11454
11510
  e.attrs.id && (r.id = e.attrs.id);
@@ -11466,28 +11522,28 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11466
11522
  e && e.nodeType && i.appendChild(e);
11467
11523
  }), i._slot = i, i._tokuiType = "btngroup", i;
11468
11524
  }), e.register("cascader", (e, n) => {
11469
- var r = e.attrs.dis !== void 0, i = e.attrs.ph || o("select.placeholder"), a = t("div", { class: "tokui-field" });
11525
+ var r = e.attrs.dis !== void 0, i = e.attrs.ph || d("select.placeholder"), a = t("div", { class: "tokui-field" });
11470
11526
  e.attrs.l && a.appendChild(t("label", { class: "tokui-label" }, e.attrs.l)), e.attrs.id && (a.id = e.attrs.id);
11471
- var s = t("div", {
11527
+ var o = t("div", {
11472
11528
  class: "tokui-cascader" + (r ? " tokui-cascader--disabled" : ""),
11473
11529
  role: "combobox",
11474
11530
  "aria-expanded": "false"
11475
- }), c = t("div", { class: "tokui-cascader-control" }), l = t("input", {
11531
+ }), s = t("div", { class: "tokui-cascader-control" }), c = t("input", {
11476
11532
  class: "tokui-cascader-input",
11477
11533
  type: "text",
11478
11534
  readonly: "readonly",
11479
11535
  placeholder: i
11480
- }), u = t("span", { class: "tokui-cascader-arrow" });
11481
- c.appendChild(l), c.appendChild(u), s.appendChild(c);
11482
- var d = t("div", {
11536
+ }), l = t("span", { class: "tokui-cascader-arrow" });
11537
+ s.appendChild(c), s.appendChild(l), o.appendChild(s);
11538
+ var u = t("div", {
11483
11539
  class: "tokui-cascader-menus",
11484
11540
  role: "listbox"
11485
11541
  });
11486
- s.appendChild(d);
11542
+ o.appendChild(u);
11487
11543
  var f = t("input", { type: "hidden" });
11488
- e.attrs.n ? f.name = e.attrs.n : e.attrs.id && (f.name = e.attrs.id), s.appendChild(f);
11544
+ e.attrs.n ? f.name = e.attrs.n : e.attrs.id && (f.name = e.attrs.id), o.appendChild(f);
11489
11545
  var p = t("div", {});
11490
- p.style.display = "none", s.appendChild(p), a.appendChild(s);
11546
+ p.style.display = "none", o.appendChild(p), a.appendChild(o);
11491
11547
  function m(e) {
11492
11548
  var t = {}, n = [];
11493
11549
  return (e || []).forEach(function(e) {
@@ -11538,36 +11594,36 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11538
11594
  return n(e, []);
11539
11595
  }
11540
11596
  function v(e, t) {
11541
- d.innerHTML = "";
11597
+ u.innerHTML = "";
11542
11598
  for (var n = e, r = 0; r < t.length; r++) {
11543
11599
  var i = h(n);
11544
- g(i, t[r]), d.appendChild(i);
11600
+ g(i, t[r]), u.appendChild(i);
11545
11601
  for (var a = !1, o = 0; o < n.length; o++) if (n[o].v === t[r]) {
11546
11602
  n = n[o].children, a = !0;
11547
11603
  break;
11548
11604
  }
11549
11605
  if (!a) break;
11550
11606
  }
11551
- n && n.length && d.appendChild(h(n));
11607
+ n && n.length && u.appendChild(h(n));
11552
11608
  }
11553
- var y = s._cascaderState = s._cascaderState || {
11609
+ var y = o._cascaderState = o._cascaderState || {
11554
11610
  isOpen: !1,
11555
11611
  activeValues: [],
11556
11612
  tree: null
11557
11613
  };
11558
11614
  function b(e) {
11559
11615
  if (!r) {
11560
- y.isOpen = !0, y.tree = e, s.classList.add("tokui-cascader--open"), s.setAttribute("aria-expanded", "true");
11561
- var t = c.getBoundingClientRect();
11562
- d.style.left = t.left + "px", d.style.top = t.bottom + 4 + "px", d.style.minWidth = t.width + "px", v(e, y.activeValues);
11616
+ y.isOpen = !0, y.tree = e, o.classList.add("tokui-cascader--open"), o.setAttribute("aria-expanded", "true");
11617
+ var t = s.getBoundingClientRect();
11618
+ u.style.left = t.left + "px", u.style.top = t.bottom + 4 + "px", u.style.minWidth = t.width + "px", v(e, y.activeValues);
11563
11619
  }
11564
11620
  }
11565
11621
  function x() {
11566
- y.isOpen = !1, y.activeValues = [], s.classList.remove("tokui-cascader--open"), s.setAttribute("aria-expanded", "false");
11622
+ y.isOpen = !1, y.activeValues = [], o.classList.remove("tokui-cascader--open"), o.setAttribute("aria-expanded", "false");
11567
11623
  }
11568
- s._cascaderBindDone || (s._cascaderBindDone = !0, c.addEventListener("click", function(e) {
11624
+ o._cascaderBindDone || (o._cascaderBindDone = !0, s.addEventListener("click", function(e) {
11569
11625
  e.stopPropagation(), y.isOpen ? x() : y.tree && b(y.tree);
11570
- }), d.addEventListener("click", function(t) {
11626
+ }), u.addEventListener("click", function(t) {
11571
11627
  t.stopPropagation();
11572
11628
  var n = t.target.closest(".tokui-cascader-option");
11573
11629
  if (n) {
@@ -11582,14 +11638,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11582
11638
  else {
11583
11639
  var s = i.map(function(e) {
11584
11640
  return e.tx;
11585
- }).join(" / "), c = i.map(function(e) {
11641
+ }).join(" / "), l = i.map(function(e) {
11586
11642
  return e.v;
11587
11643
  }).join("/");
11588
- if (l.value = s, f.value = c, x(), e.attrs.clk) {
11644
+ if (c.value = s, f.value = l, x(), e.attrs.clk) {
11589
11645
  var u = typeof window < "u" && window.TokUI && window.TokUI._internal && window.TokUI._internal.TokUIEventBus ? window.TokUI._internal.TokUIEventBus.getHandler(e.attrs.clk) : null;
11590
11646
  u && u({
11591
11647
  id: e.attrs.id,
11592
- value: c,
11648
+ value: l,
11593
11649
  text: s,
11594
11650
  path: i
11595
11651
  });
@@ -11608,8 +11664,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11608
11664
  function C(t) {
11609
11665
  if (y.tree = t, e.attrs.v) {
11610
11666
  for (var n = String(e.attrs.v).split("/"), r = !0, i = [], a = t, o = 0; o < n.length; o++) {
11611
- for (var s = !1, c = 0; c < a.length; c++) if (a[c].v === n[o]) {
11612
- i.push(a[c].tx), a = a[c].children, s = !0;
11667
+ for (var s = !1, l = 0; l < a.length; l++) if (a[l].v === n[o]) {
11668
+ i.push(a[l].tx), a = a[l].children, s = !0;
11613
11669
  break;
11614
11670
  }
11615
11671
  if (!s) {
@@ -11617,113 +11673,113 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11617
11673
  break;
11618
11674
  }
11619
11675
  }
11620
- r && i.length === n.length && (l.value = i.join(" / "), f.value = e.attrs.v);
11676
+ r && i.length === n.length && (c.value = i.join(" / "), f.value = e.attrs.v);
11621
11677
  }
11622
- S.hidden = f.value, S.text = l.value;
11678
+ S.hidden = f.value, S.text = c.value;
11623
11679
  }
11624
11680
  return e.children && e.children.length && C(m(e.children)), a._streamCloseHook = function() {
11625
11681
  p.innerHTML = "", C(m(e.children));
11626
- }, a._slot = p, a._tokuiType = "cascader", a._variantTarget = s, a.setAttribute("data-tokui-resettable", ""), a._tokuiReset = function() {
11627
- f.value = S.hidden, l.value = S.text, y.isOpen && x();
11682
+ }, a._slot = p, a._tokuiType = "cascader", a._variantTarget = o, a.setAttribute("data-tokui-resettable", ""), a._tokuiReset = function() {
11683
+ f.value = S.hidden, c.value = S.text, y.isOpen && x();
11628
11684
  }, a;
11629
- }), e.register("upload", (e) => {
11630
- var n = e.attrs.dis !== void 0, r = e.attrs.multi !== void 0, i = parseInt(e.attrs.max) || 0, a = e.attrs.ph || o("upload.hint"), s = e.attrs.accept || "", c = t("div", { class: "tokui-field" });
11631
- e.attrs.l && c.appendChild(t("label", { class: "tokui-label" }, e.attrs.l)), e.attrs.id && (c.id = e.attrs.id);
11632
- var l = t("div", { class: "tokui-upload" + (n ? " tokui-upload--disabled" : "") }), u = t("div", {
11685
+ }), e.register("upload", (n) => {
11686
+ var r = n.attrs.dis !== void 0, i = n.attrs.multi !== void 0, a = parseInt(n.attrs.max) || 0, o = n.attrs.ph || d("upload.hint"), s = n.attrs.accept || "", c = t("div", { class: "tokui-field" });
11687
+ n.attrs.l && c.appendChild(t("label", { class: "tokui-label" }, n.attrs.l)), n.attrs.id && (c.id = n.attrs.id);
11688
+ var l = t("div", { class: "tokui-upload" + (r ? " tokui-upload--disabled" : "") }), u = t("div", {
11633
11689
  class: "tokui-upload-dropzone",
11634
11690
  role: "button",
11635
- "aria-label": a,
11691
+ "aria-label": o,
11636
11692
  tabindex: "0"
11637
- }), d = t("div", { class: "tokui-upload-icon" });
11638
- d.innerHTML = "<svg viewBox=\"0 0 48 48\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M24 32V12\"/><path d=\"M16 20l8-8 8 8\"/><path d=\"M8 36h32\"/></svg>", u.appendChild(d);
11639
- var f = t("div", { class: "tokui-upload-text" });
11640
- f.textContent = a, u.appendChild(f);
11641
- var p = t("button", {
11693
+ }), f = t("div", { class: "tokui-upload-icon" });
11694
+ f.innerHTML = "<svg viewBox=\"0 0 48 48\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M24 32V12\"/><path d=\"M16 20l8-8 8 8\"/><path d=\"M8 36h32\"/></svg>", u.appendChild(f);
11695
+ var p = t("div", { class: "tokui-upload-text" });
11696
+ p.textContent = o, u.appendChild(p);
11697
+ var m = t("button", {
11642
11698
  class: "tokui-upload-btn",
11643
11699
  type: "button"
11644
11700
  });
11645
- p.textContent = o("upload.browse"), u.appendChild(p), l.appendChild(u);
11646
- var m = {
11701
+ m.textContent = d("upload.browse"), u.appendChild(m), l.appendChild(u);
11702
+ var h = {
11647
11703
  type: "file",
11648
11704
  style: "display:none"
11649
11705
  };
11650
- s && (m.accept = s), r && (m.multiple = "multiple");
11651
- var h = t("input", m);
11652
- l.appendChild(h);
11653
- var g = t("div", { class: "tokui-upload-filelist" });
11706
+ s && (h.accept = s), i && (h.multiple = "multiple");
11707
+ var g = t("input", h);
11654
11708
  l.appendChild(g);
11655
- var _ = t("input", { type: "hidden" });
11656
- e.attrs.n ? _.name = e.attrs.n : e.attrs.id && (_.name = e.attrs.id), l.appendChild(_);
11657
- function v(e) {
11709
+ var _ = t("div", { class: "tokui-upload-filelist" });
11710
+ l.appendChild(_);
11711
+ var v = t("input", { type: "hidden" });
11712
+ n.attrs.n ? v.name = n.attrs.n : n.attrs.id && (v.name = n.attrs.id), l.appendChild(v);
11713
+ function y(e) {
11658
11714
  return e < 1024 ? e + " B" : e < 1048576 ? (e / 1024).toFixed(1) + " KB" : (e / 1048576).toFixed(1) + " MB";
11659
11715
  }
11660
- var y = [];
11661
- function b() {
11662
- g.innerHTML = "", y.forEach(function(e, n) {
11716
+ var b = [];
11717
+ function x() {
11718
+ _.innerHTML = "", b.forEach(function(e, n) {
11663
11719
  var r = t("div", { class: "tokui-upload-file" }), i = t("span", { class: "tokui-upload-file-icon" });
11664
11720
  i.textContent = "📄", r.appendChild(i);
11665
11721
  var a = t("span", { class: "tokui-upload-file-name" });
11666
11722
  a.textContent = e.name, a.title = e.name, r.appendChild(a);
11667
11723
  var o = t("span", { class: "tokui-upload-file-size" });
11668
- o.textContent = v(e.size), r.appendChild(o);
11724
+ o.textContent = y(e.size), r.appendChild(o);
11669
11725
  var s = t("span", { class: "tokui-upload-file-remove" });
11670
- s.textContent = "✕", s.setAttribute("data-idx", n), r.appendChild(s), g.appendChild(r);
11671
- }), _.value = y.map(function(e) {
11726
+ s.textContent = "✕", s.setAttribute("data-idx", n), r.appendChild(s), _.appendChild(r);
11727
+ }), v.value = b.map(function(e) {
11672
11728
  return e.name;
11673
11729
  }).join(",");
11674
11730
  }
11675
- function x(t) {
11676
- for (var n = 0; n < t.length && !(i && y.length >= i); n++) y.push({
11677
- name: t[n].name,
11678
- size: t[n].size,
11679
- type: t[n].type
11731
+ function S(t) {
11732
+ for (var r = 0; r < t.length && !(a && b.length >= a); r++) b.push({
11733
+ name: t[r].name,
11734
+ size: t[r].size,
11735
+ type: t[r].type
11680
11736
  });
11681
- if (b(), e.attrs.clk) {
11682
- var r = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(e.attrs.clk) : null;
11683
- r && r({
11684
- id: e.attrs.id,
11685
- files: y
11737
+ if (x(), n.attrs.clk) {
11738
+ var i = e.eventBus ? e.eventBus.getHandler(n.attrs.clk) : null;
11739
+ i && i({
11740
+ id: n.attrs.id,
11741
+ files: b
11686
11742
  });
11687
11743
  }
11688
11744
  }
11689
- return n || (u.addEventListener("click", function(e) {
11690
- (e.target === p || u.contains(e.target)) && h.click();
11691
- }), p.addEventListener("click", function(e) {
11692
- e.stopPropagation(), h.click();
11693
- }), h.addEventListener("change", function() {
11694
- h.files && h.files.length && (x(h.files), h.value = "");
11745
+ return r || (u.addEventListener("click", function(e) {
11746
+ (e.target === m || u.contains(e.target)) && g.click();
11747
+ }), m.addEventListener("click", function(e) {
11748
+ e.stopPropagation(), g.click();
11749
+ }), g.addEventListener("change", function() {
11750
+ g.files && g.files.length && (S(g.files), g.value = "");
11695
11751
  }), u.addEventListener("dragover", function(e) {
11696
11752
  e.preventDefault(), l.classList.add("tokui-upload--dragover");
11697
11753
  }), u.addEventListener("dragleave", function(e) {
11698
11754
  e.preventDefault(), l.classList.remove("tokui-upload--dragover");
11699
11755
  }), u.addEventListener("drop", function(e) {
11700
- e.preventDefault(), l.classList.remove("tokui-upload--dragover"), e.dataTransfer && e.dataTransfer.files.length && x(e.dataTransfer.files);
11701
- }), g.addEventListener("click", function(e) {
11756
+ e.preventDefault(), l.classList.remove("tokui-upload--dragover"), e.dataTransfer && e.dataTransfer.files.length && S(e.dataTransfer.files);
11757
+ }), _.addEventListener("click", function(e) {
11702
11758
  var t = e.target.closest(".tokui-upload-file-remove");
11703
11759
  if (t) {
11704
11760
  var n = parseInt(t.getAttribute("data-idx"));
11705
- !isNaN(n) && n >= 0 && n < y.length && (y.splice(n, 1), b());
11761
+ !isNaN(n) && n >= 0 && n < b.length && (b.splice(n, 1), x());
11706
11762
  }
11707
11763
  })), c.appendChild(l), c._variantTarget = l, c;
11708
11764
  });
11709
- function C(e) {
11765
+ function E(e) {
11710
11766
  if (!e) return null;
11711
11767
  var t = e.match(/^(\d{4})-(\d{1,2})-(\d{1,2})/);
11712
11768
  return t ? new Date(parseInt(t[1]), parseInt(t[2]) - 1, parseInt(t[3])) : null;
11713
11769
  }
11714
- function w(e) {
11770
+ function D(e) {
11715
11771
  if (!e) return null;
11716
11772
  var t = e.match(/^(\d{4})-(\d{1,2})-(\d{1,2})\s+(\d{1,2}):(\d{1,2})/);
11717
11773
  return t ? new Date(parseInt(t[1]), parseInt(t[2]) - 1, parseInt(t[3]), parseInt(t[4]), parseInt(t[5])) : null;
11718
11774
  }
11719
- function T(e, t) {
11775
+ function O(e, t) {
11720
11776
  var n = e.getFullYear(), r = e.getMonth() + 1, i = e.getDate(), a = e.getHours(), o = e.getMinutes(), s = e.getSeconds();
11721
11777
  return t.replace("YYYY", String(n)).replace("MM", r < 10 ? "0" + r : String(r)).replace("DD", i < 10 ? "0" + i : String(i)).replace("HH", a < 10 ? "0" + a : String(a)).replace("mm", o < 10 ? "0" + o : String(o)).replace("ss", s < 10 ? "0" + s : String(s));
11722
11778
  }
11723
- function E(e, t, n, r) {
11779
+ function k(e, t, n, r) {
11724
11780
  return r.replace("HH", e < 10 ? "0" + e : String(e)).replace("mm", t < 10 ? "0" + t : String(t)).replace("ss", n < 10 ? "0" + n : String(n));
11725
11781
  }
11726
- function D(e, t) {
11782
+ function A(e, t) {
11727
11783
  var n = e.querySelector(".tokui-timepicker-column-list");
11728
11784
  if (n) {
11729
11785
  var r = n.querySelectorAll(".tokui-timepicker-column-item");
@@ -11732,8 +11788,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11732
11788
  }));
11733
11789
  }
11734
11790
  }
11735
- function O(e, t) {
11736
- D(e, t);
11791
+ function j(e, t) {
11792
+ A(e, t);
11737
11793
  var n = e.querySelector(".tokui-timepicker-column-list");
11738
11794
  if (n) {
11739
11795
  var r = n.querySelectorAll(".tokui-timepicker-column-item");
@@ -11747,7 +11803,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11747
11803
  }
11748
11804
  }
11749
11805
  }
11750
- function k(e) {
11806
+ function M(e) {
11751
11807
  var t = e.querySelector(".tokui-timepicker-column-list");
11752
11808
  if (!t) return 0;
11753
11809
  var n = t.querySelectorAll(".tokui-timepicker-column-item");
@@ -11762,14 +11818,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11762
11818
  var u = n[0].offsetHeight || 32, d = Math.round((t.scrollTop + (t.clientHeight || 192) / 2) / u) - 0;
11763
11819
  return Math.max(0, Math.min(d, n.length - 1));
11764
11820
  }
11765
- function A(e, n, r) {
11821
+ function N(e, n, r) {
11766
11822
  for (var i = t("div", { class: "tokui-timepicker-column" }), a = t("div", { class: "tokui-timepicker-column-list" }), o = 0; o < n; o++) {
11767
11823
  var s = t("div", {
11768
11824
  class: "tokui-timepicker-column-item" + (o === r ? " tokui-timepicker-column-item--selected" : ""),
11769
11825
  "data-value": String(o)
11770
11826
  }, o < 10 ? "0" + o : String(o));
11771
11827
  s.addEventListener("click", function(e) {
11772
- e.stopPropagation(), O(i, parseInt(this.getAttribute("data-value"), 10));
11828
+ e.stopPropagation(), j(i, parseInt(this.getAttribute("data-value"), 10));
11773
11829
  }), a.appendChild(s);
11774
11830
  }
11775
11831
  i.appendChild(a);
@@ -11778,73 +11834,73 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11778
11834
  };
11779
11835
  return a.addEventListener("scroll", function() {
11780
11836
  c || (c = 1, l(function() {
11781
- c = 0, D(i, k(i));
11837
+ c = 0, A(i, M(i));
11782
11838
  }));
11783
11839
  }), i._label = e, i;
11784
11840
  }
11785
- function j(e) {
11786
- var t = k(e);
11787
- D(e, t);
11841
+ function P(e) {
11842
+ var t = M(e);
11843
+ A(e, t);
11788
11844
  var n = e.querySelector(".tokui-timepicker-column-list").querySelectorAll(".tokui-timepicker-column-item");
11789
11845
  return parseInt(n[t].getAttribute("data-value")) || 0;
11790
11846
  }
11791
- function M(e, t) {
11792
- O(e, t);
11847
+ function F(e, t) {
11848
+ j(e, t);
11793
11849
  }
11794
- var N = typeof window < "u" && window.TokUI && window.TokUI._internal ? window.TokUI._internal._datePickers = window.TokUI._internal._datePickers || /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set();
11795
- function P(e) {
11850
+ var I = typeof window < "u" && window.TokUI && window.TokUI._internal ? window.TokUI._internal._datePickers = window.TokUI._internal._datePickers || /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set();
11851
+ function L(e) {
11796
11852
  var t = [];
11797
- N.forEach(function(n) {
11853
+ I.forEach(function(n) {
11798
11854
  n !== e && t.push(n);
11799
11855
  }), t.forEach(function(e) {
11800
11856
  try {
11801
11857
  e();
11802
11858
  } catch {}
11803
- }), N.add(e);
11859
+ }), I.add(e);
11804
11860
  }
11805
- function F(e) {
11806
- N.delete(e);
11861
+ function R(e) {
11862
+ I.delete(e);
11807
11863
  }
11808
- function I() {
11864
+ function z() {
11809
11865
  var e = [];
11810
- N.forEach(function(t) {
11866
+ I.forEach(function(t) {
11811
11867
  e.push(t);
11812
- }), N.clear(), e.forEach(function(e) {
11868
+ }), I.clear(), e.forEach(function(e) {
11813
11869
  try {
11814
11870
  e();
11815
11871
  } catch {}
11816
11872
  });
11817
11873
  }
11818
- typeof window < "u" && !window.TokUI._internal._dateScrollBound && (window.addEventListener("scroll", I), window.TokUI._internal._dateScrollBound = !0);
11819
- function L() {
11874
+ typeof window < "u" && !window.TokUI._internal._dateScrollBound && (window.addEventListener("scroll", z), window.TokUI._internal._dateScrollBound = !0);
11875
+ function B() {
11820
11876
  return typeof window < "u" && window.innerWidth ? window.innerWidth : typeof document < "u" && document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : 1024;
11821
11877
  }
11822
- function R(e, n, r, i, a) {
11823
- var s = t("div", { class: "tokui-datepicker-header" }), c = t("button", {
11878
+ function V(e, n, r, i, a) {
11879
+ var o = t("div", { class: "tokui-datepicker-header" }), s = t("button", {
11824
11880
  class: "tokui-datepicker-nav tokui-datepicker-nav--prev",
11825
11881
  type: "button"
11826
11882
  });
11827
- c.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"15 18 9 12 15 6\"/></svg>";
11828
- var l = t("button", {
11883
+ s.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"15 18 9 12 15 6\"/></svg>";
11884
+ var c = t("button", {
11829
11885
  class: "tokui-datepicker-nav tokui-datepicker-nav--next",
11830
11886
  type: "button"
11831
11887
  });
11832
- l.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"9 18 15 12 9 6\"/></svg>";
11833
- var u = t("span", { class: "tokui-datepicker-title" }, o("datepicker.title", {
11888
+ c.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"9 18 15 12 9 6\"/></svg>";
11889
+ var l = t("span", { class: "tokui-datepicker-title" }, d("datepicker.title", {
11834
11890
  y: e,
11835
11891
  m: n + 1
11836
11892
  }));
11837
- s.appendChild(c), s.appendChild(u), s.appendChild(l), a.appendChild(s);
11838
- var d = [
11839
- o("datepicker.weekday.0"),
11840
- o("datepicker.weekday.1"),
11841
- o("datepicker.weekday.2"),
11842
- o("datepicker.weekday.3"),
11843
- o("datepicker.weekday.4"),
11844
- o("datepicker.weekday.5"),
11845
- o("datepicker.weekday.6")
11893
+ o.appendChild(s), o.appendChild(l), o.appendChild(c), a.appendChild(o);
11894
+ var u = [
11895
+ d("datepicker.weekday.0"),
11896
+ d("datepicker.weekday.1"),
11897
+ d("datepicker.weekday.2"),
11898
+ d("datepicker.weekday.3"),
11899
+ d("datepicker.weekday.4"),
11900
+ d("datepicker.weekday.5"),
11901
+ d("datepicker.weekday.6")
11846
11902
  ], f = t("div", { class: "tokui-datepicker-weekdays" });
11847
- d.forEach(function(e) {
11903
+ u.forEach(function(e) {
11848
11904
  f.appendChild(t("span", { class: "tokui-datepicker-weekday" }, e));
11849
11905
  }), a.appendChild(f);
11850
11906
  for (var p = t("div", { class: "tokui-datepicker-grid" }), m = new Date(e, n, 1).getDay(), h = new Date(e, n + 1, 0).getDate(), g = new Date(e, n, 0).getDate(), _ = i.getDate(), v = i.getFullYear() === e && i.getMonth() === n, y = m - 1; y >= 0; y--) p.appendChild(t("span", { class: "tokui-datepicker-day tokui-datepicker-day--other" }, String(g - y)));
@@ -11859,219 +11915,219 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
11859
11915
  }
11860
11916
  for (var C = 42 - m - h, w = 1; w <= C; w++) p.appendChild(t("span", { class: "tokui-datepicker-day tokui-datepicker-day--other" }, String(w)));
11861
11917
  return a.appendChild(p), {
11862
- prevBtn: c,
11863
- nextBtn: l
11918
+ prevBtn: s,
11919
+ nextBtn: c
11864
11920
  };
11865
11921
  }
11866
- e.register("datepicker", (e) => {
11867
- var n = e.attrs || {}, r = n.dis !== void 0, i = n.fmt || "YYYY-MM-DD", a = n.ph || i, o = n.v || "", s = t("div", { class: "tokui-field" });
11868
- n.l && s.appendChild(t("label", { class: "tokui-label" }, n.l));
11869
- var c = ["tokui-datepicker"];
11870
- r && c.push("tokui-datepicker--disabled");
11871
- var l = t("div", { class: c.join(" ") }), u = t("div", { class: "tokui-datepicker-control" }), d = {
11922
+ e.register("datepicker", (n) => {
11923
+ var r = n.attrs || {}, i = r.dis !== void 0, a = r.fmt || "YYYY-MM-DD", o = r.ph || a, s = r.v || "", c = t("div", { class: "tokui-field" });
11924
+ r.l && c.appendChild(t("label", { class: "tokui-label" }, r.l));
11925
+ var l = ["tokui-datepicker"];
11926
+ i && l.push("tokui-datepicker--disabled");
11927
+ var u = t("div", { class: l.join(" ") }), d = t("div", { class: "tokui-datepicker-control" }), f = {
11872
11928
  class: "tokui-datepicker-input",
11873
11929
  type: "text",
11874
11930
  readonly: "readonly",
11875
- placeholder: a
11931
+ placeholder: o
11876
11932
  };
11877
- n.id && (d.id = n.id), r && (d.disabled = "disabled"), o && (d.value = o);
11878
- var f = t("input", d);
11879
- u.appendChild(f);
11880
- var p = t("span", { class: "tokui-datepicker-icon" });
11881
- p.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>", u.appendChild(p), l.appendChild(u);
11882
- var m = t("div", { class: "tokui-datepicker-dropdown" }), h = /* @__PURE__ */ new Date(), g, _, v;
11883
- o && (v = C(o), v && (g = v.getFullYear(), _ = v.getMonth())), g || (g = h.getFullYear(), _ = h.getMonth());
11884
- var y = t("input", { type: "hidden" });
11885
- n.n ? y.name = n.n : n.id && (y.name = n.id), y.value = o, l.appendChild(y);
11886
- function b(e, t) {
11887
- m.innerHTML = "";
11888
- var n = R(e, t, v, h, m);
11933
+ r.id && (f.id = r.id), i && (f.disabled = "disabled"), s && (f.value = s);
11934
+ var p = t("input", f);
11935
+ d.appendChild(p);
11936
+ var m = t("span", { class: "tokui-datepicker-icon" });
11937
+ m.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>", d.appendChild(m), u.appendChild(d);
11938
+ var h = t("div", { class: "tokui-datepicker-dropdown" }), g = /* @__PURE__ */ new Date(), _, v, y;
11939
+ s && (y = E(s), y && (_ = y.getFullYear(), v = y.getMonth())), _ || (_ = g.getFullYear(), v = g.getMonth());
11940
+ var b = t("input", { type: "hidden" });
11941
+ r.n ? b.name = r.n : r.id && (b.name = r.id), b.value = s, u.appendChild(b);
11942
+ function x(e, t) {
11943
+ h.innerHTML = "";
11944
+ var n = V(e, t, y, g, h);
11889
11945
  n.prevBtn.addEventListener("click", function(e) {
11890
- e.stopPropagation(), _--, _ < 0 && (_ = 11, g--), b(g, _);
11946
+ e.stopPropagation(), v--, v < 0 && (v = 11, _--), x(_, v);
11891
11947
  }), n.nextBtn.addEventListener("click", function(e) {
11892
- e.stopPropagation(), _++, _ > 11 && (_ = 0, g++), b(g, _);
11948
+ e.stopPropagation(), v++, v > 11 && (v = 0, _++), x(_, v);
11893
11949
  });
11894
11950
  }
11895
- b(g, _), m.style.display = "none", l.appendChild(m);
11896
- var x = !1;
11897
- function S() {
11898
- if (!(r || x)) {
11899
- P(w), x = !0, m.style.display = "", l.classList.add("tokui-datepicker--open");
11900
- var e = u.getBoundingClientRect();
11901
- m.style.left = e.left + "px", m.style.top = e.bottom + 4 + "px", m.style.width = "auto";
11902
- var t = L();
11903
- e.left + m.offsetWidth > t - 8 && (m.style.left = Math.max(8, t - m.offsetWidth - 8) + "px");
11951
+ x(_, v), h.style.display = "none", u.appendChild(h);
11952
+ var S = !1;
11953
+ function C() {
11954
+ if (!(i || S)) {
11955
+ L(w), S = !0, h.style.display = "", u.classList.add("tokui-datepicker--open");
11956
+ var e = d.getBoundingClientRect();
11957
+ h.style.left = e.left + "px", h.style.top = e.bottom + 4 + "px", h.style.width = "auto";
11958
+ var t = B();
11959
+ e.left + h.offsetWidth > t - 8 && (h.style.left = Math.max(8, t - h.offsetWidth - 8) + "px");
11904
11960
  }
11905
11961
  }
11906
11962
  function w() {
11907
- x && (x = !1, m.style.display = "none", l.classList.remove("tokui-datepicker--open"), F(w));
11963
+ S && (S = !1, h.style.display = "none", u.classList.remove("tokui-datepicker--open"), R(w));
11908
11964
  }
11909
- return r || (u.addEventListener("click", function(e) {
11910
- e.stopPropagation(), x ? w() : S();
11911
- }), m.addEventListener("click", function(e) {
11912
- e.stopPropagation();
11913
- var t = e.target.closest(".tokui-datepicker-day");
11914
- if (!(!t || t.classList.contains("tokui-datepicker-day--other"))) {
11915
- var r = parseInt(t.getAttribute("data-day"));
11916
- v = new Date(g, _, r);
11917
- var a = T(v, i);
11918
- if (f.value = a, y.value = a, w(), b(g, _), n.clk) {
11919
- var o = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(n.clk) : null;
11920
- o && o({
11921
- value: a,
11922
- date: v,
11923
- id: n.id
11965
+ return i || (d.addEventListener("click", function(e) {
11966
+ e.stopPropagation(), S ? w() : C();
11967
+ }), h.addEventListener("click", function(t) {
11968
+ t.stopPropagation();
11969
+ var n = t.target.closest(".tokui-datepicker-day");
11970
+ if (!(!n || n.classList.contains("tokui-datepicker-day--other"))) {
11971
+ var i = parseInt(n.getAttribute("data-day"));
11972
+ y = new Date(_, v, i);
11973
+ var o = O(y, a);
11974
+ if (p.value = o, b.value = o, w(), x(_, v), r.clk) {
11975
+ var s = e.eventBus ? e.eventBus.getHandler(r.clk) : null;
11976
+ s && s({
11977
+ value: o,
11978
+ date: y,
11979
+ id: r.id
11924
11980
  });
11925
11981
  }
11926
11982
  }
11927
11983
  }), typeof document < "u" && document.addEventListener("click", function(e) {
11928
- l.contains(e.target) || w();
11929
- })), s.appendChild(l), s._variantTarget = l, s;
11930
- }), e.register("timepicker", (e) => {
11931
- var n = e.attrs || {}, r = n.dis !== void 0, i = n.fmt || "HH:mm", a = n.ph || i, s = n.v || "", c = t("div", { class: "tokui-field" });
11932
- n.l && c.appendChild(t("label", { class: "tokui-label" }, n.l));
11984
+ u.contains(e.target) || w();
11985
+ })), c.appendChild(u), c._variantTarget = u, c;
11986
+ }), e.register("timepicker", (n) => {
11987
+ var r = n.attrs || {}, i = r.dis !== void 0, a = r.fmt || "HH:mm", o = r.ph || a, s = r.v || "", c = t("div", { class: "tokui-field" });
11988
+ r.l && c.appendChild(t("label", { class: "tokui-label" }, r.l));
11933
11989
  var l = ["tokui-timepicker"];
11934
- r && l.push("tokui-timepicker--disabled");
11935
- var u = t("div", { class: l.join(" ") }), d = t("div", { class: "tokui-timepicker-control" }), f = {
11990
+ i && l.push("tokui-timepicker--disabled");
11991
+ var u = t("div", { class: l.join(" ") }), f = t("div", { class: "tokui-timepicker-control" }), p = {
11936
11992
  class: "tokui-timepicker-input",
11937
11993
  type: "text",
11938
11994
  readonly: "readonly",
11939
- placeholder: a
11995
+ placeholder: o
11940
11996
  };
11941
- n.id && (f.id = n.id), r && (f.disabled = "disabled"), s && (f.value = s);
11942
- var p = t("input", f);
11943
- d.appendChild(p);
11944
- var m = t("span", { class: "tokui-timepicker-icon" });
11945
- m.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>", d.appendChild(m), u.appendChild(d);
11946
- var h = 0, g = 0, _ = 0;
11997
+ r.id && (p.id = r.id), i && (p.disabled = "disabled"), s && (p.value = s);
11998
+ var m = t("input", p);
11999
+ f.appendChild(m);
12000
+ var h = t("span", { class: "tokui-timepicker-icon" });
12001
+ h.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>", f.appendChild(h), u.appendChild(f);
12002
+ var g = 0, _ = 0, v = 0;
11947
12003
  if (s) {
11948
- var v = s.split(":");
11949
- h = parseInt(v[0]) || 0, g = parseInt(v[1]) || 0, _ = parseInt(v[2]) || 0;
11950
- }
11951
- var y = t("div", { class: "tokui-timepicker-dropdown" }), b = i.indexOf("ss") !== -1 || i.indexOf("s") !== -1, x = t("div", { class: "tokui-timepicker-columns" }), S = A(o("duration.hour"), 24, h), C = A(o("duration.minute"), 60, g);
11952
- x.appendChild(S), x.appendChild(C);
11953
- var w = null;
11954
- b && (w = A(o("duration.second"), 60, _), x.appendChild(w)), y.appendChild(x);
11955
- var T = t("div", { class: "tokui-timepicker-footer" }), D = t("button", {
12004
+ var y = s.split(":");
12005
+ g = parseInt(y[0]) || 0, _ = parseInt(y[1]) || 0, v = parseInt(y[2]) || 0;
12006
+ }
12007
+ var b = t("div", { class: "tokui-timepicker-dropdown" }), x = a.indexOf("ss") !== -1 || a.indexOf("s") !== -1, S = t("div", { class: "tokui-timepicker-columns" }), C = N(d("duration.hour"), 24, g), w = N(d("duration.minute"), 60, _);
12008
+ S.appendChild(C), S.appendChild(w);
12009
+ var T = null;
12010
+ x && (T = N(d("duration.second"), 60, v), S.appendChild(T)), b.appendChild(S);
12011
+ var E = t("div", { class: "tokui-timepicker-footer" }), D = t("button", {
11956
12012
  class: "tokui-timepicker-confirm",
11957
12013
  type: "button"
11958
- }, o("common.ok"));
11959
- T.appendChild(D), y.appendChild(T);
12014
+ }, d("common.ok"));
12015
+ E.appendChild(D), b.appendChild(E);
11960
12016
  var O = t("input", { type: "hidden" });
11961
- n.n ? O.name = n.n : n.id && (O.name = n.id), O.value = s, u.appendChild(O), y.style.display = "none", u.appendChild(y);
11962
- var k = !1;
11963
- function N() {
11964
- if (!(r || k)) {
11965
- P(I), k = !0, y.style.display = "", u.classList.add("tokui-timepicker--open");
11966
- var e = d.getBoundingClientRect();
11967
- y.style.left = e.left + "px", y.style.top = e.bottom + 4 + "px", y.style.width = "auto";
11968
- var t = L();
11969
- e.left + y.offsetWidth > t - 8 && (y.style.left = Math.max(8, t - y.offsetWidth - 8) + "px"), M(S, h), M(C, g), b && w && M(w, _);
11970
- }
11971
- }
11972
- function I() {
11973
- k && (k = !1, y.style.display = "none", u.classList.remove("tokui-timepicker--open"), F(I));
11974
- }
11975
- return r || (d.addEventListener("click", function(e) {
11976
- e.stopPropagation(), k ? I() : N();
11977
- }), D.addEventListener("click", function(e) {
11978
- e.stopPropagation(), h = j(S), g = j(C), b && w && (_ = j(w));
11979
- var t = E(h, g, _, i);
11980
- if (p.value = t, O.value = t, I(), n.clk) {
11981
- var r = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(n.clk) : null;
11982
- r && r({
11983
- value: t,
11984
- hour: h,
11985
- minute: g,
11986
- second: _,
11987
- id: n.id
12017
+ r.n ? O.name = r.n : r.id && (O.name = r.id), O.value = s, u.appendChild(O), b.style.display = "none", u.appendChild(b);
12018
+ var A = !1;
12019
+ function j() {
12020
+ if (!(i || A)) {
12021
+ L(M), A = !0, b.style.display = "", u.classList.add("tokui-timepicker--open");
12022
+ var e = f.getBoundingClientRect();
12023
+ b.style.left = e.left + "px", b.style.top = e.bottom + 4 + "px", b.style.width = "auto";
12024
+ var t = B();
12025
+ e.left + b.offsetWidth > t - 8 && (b.style.left = Math.max(8, t - b.offsetWidth - 8) + "px"), F(C, g), F(w, _), x && T && F(T, v);
12026
+ }
12027
+ }
12028
+ function M() {
12029
+ A && (A = !1, b.style.display = "none", u.classList.remove("tokui-timepicker--open"), R(M));
12030
+ }
12031
+ return i || (f.addEventListener("click", function(e) {
12032
+ e.stopPropagation(), A ? M() : j();
12033
+ }), D.addEventListener("click", function(t) {
12034
+ t.stopPropagation(), g = P(C), _ = P(w), x && T && (v = P(T));
12035
+ var n = k(g, _, v, a);
12036
+ if (m.value = n, O.value = n, M(), r.clk) {
12037
+ var i = e.eventBus ? e.eventBus.getHandler(r.clk) : null;
12038
+ i && i({
12039
+ value: n,
12040
+ hour: g,
12041
+ minute: _,
12042
+ second: v,
12043
+ id: r.id
11988
12044
  });
11989
12045
  }
11990
12046
  }), typeof document < "u" && document.addEventListener("click", function(e) {
11991
- u.contains(e.target) || I();
12047
+ u.contains(e.target) || M();
11992
12048
  })), c.appendChild(u), c._variantTarget = u, c;
11993
- }), e.register("datetimepicker", (e) => {
11994
- var n = e.attrs || {}, r = n.dis !== void 0, i = n.fmt || "YYYY-MM-DD HH:mm", a = n.ph || i, s = n.v || "", c = t("div", { class: "tokui-field" });
11995
- n.l && c.appendChild(t("label", { class: "tokui-label" }, n.l));
12049
+ }), e.register("datetimepicker", (n) => {
12050
+ var r = n.attrs || {}, i = r.dis !== void 0, a = r.fmt || "YYYY-MM-DD HH:mm", o = r.ph || a, s = r.v || "", c = t("div", { class: "tokui-field" });
12051
+ r.l && c.appendChild(t("label", { class: "tokui-label" }, r.l));
11996
12052
  var l = ["tokui-datetimepicker"];
11997
- r && l.push("tokui-datetimepicker--disabled");
11998
- var u = t("div", { class: l.join(" ") }), d = t("div", { class: "tokui-datetimepicker-control" }), f = {
12053
+ i && l.push("tokui-datetimepicker--disabled");
12054
+ var u = t("div", { class: l.join(" ") }), f = t("div", { class: "tokui-datetimepicker-control" }), p = {
11999
12055
  class: "tokui-datetimepicker-input",
12000
12056
  type: "text",
12001
12057
  readonly: "readonly",
12002
- placeholder: a
12058
+ placeholder: o
12003
12059
  };
12004
- n.id && (f.id = n.id), r && (f.disabled = "disabled"), s && (f.value = s);
12005
- var p = t("input", f);
12006
- d.appendChild(p);
12007
- var m = t("span", { class: "tokui-datetimepicker-icon" });
12008
- m.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>", d.appendChild(m), u.appendChild(d);
12009
- var h = /* @__PURE__ */ new Date(), g, _, v, y = 0, b = 0, x = 0;
12010
- s && (v = w(s) || C(s), v && (g = v.getFullYear(), _ = v.getMonth(), y = v.getHours(), b = v.getMinutes(), x = v.getSeconds())), g || (g = h.getFullYear(), _ = h.getMonth());
12011
- var S = t("input", { type: "hidden" });
12012
- n.n ? S.name = n.n : n.id && (S.name = n.id), S.value = s, u.appendChild(S);
12013
- var E = t("div", { class: "tokui-datetimepicker-dropdown" }), D = t("div", { class: "tokui-datetimepicker-date" }), O = i.indexOf("ss") !== -1 || i.indexOf("s") !== -1, k = t("div", { class: "tokui-datetimepicker-time" }), N = t("div", { class: "tokui-timepicker-columns" }), I = A(o("duration.hour"), 24, y), z = A(o("duration.minute"), 60, b);
12014
- N.appendChild(I), N.appendChild(z);
12015
- var B = null;
12016
- O && (B = A(o("duration.second"), 60, x), N.appendChild(B)), k.appendChild(N);
12017
- function V(e, t) {
12018
- D.innerHTML = "";
12019
- var n = R(e, t, v, h, D);
12060
+ r.id && (p.id = r.id), i && (p.disabled = "disabled"), s && (p.value = s);
12061
+ var m = t("input", p);
12062
+ f.appendChild(m);
12063
+ var h = t("span", { class: "tokui-datetimepicker-icon" });
12064
+ h.innerHTML = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>", f.appendChild(h), u.appendChild(f);
12065
+ var g = /* @__PURE__ */ new Date(), _, v, y, b = 0, x = 0, S = 0;
12066
+ s && (y = D(s) || E(s), y && (_ = y.getFullYear(), v = y.getMonth(), b = y.getHours(), x = y.getMinutes(), S = y.getSeconds())), _ || (_ = g.getFullYear(), v = g.getMonth());
12067
+ var C = t("input", { type: "hidden" });
12068
+ r.n ? C.name = r.n : r.id && (C.name = r.id), C.value = s, u.appendChild(C);
12069
+ var w = t("div", { class: "tokui-datetimepicker-dropdown" }), T = t("div", { class: "tokui-datetimepicker-date" }), k = a.indexOf("ss") !== -1 || a.indexOf("s") !== -1, A = t("div", { class: "tokui-datetimepicker-time" }), j = t("div", { class: "tokui-timepicker-columns" }), M = N(d("duration.hour"), 24, b), I = N(d("duration.minute"), 60, x);
12070
+ j.appendChild(M), j.appendChild(I);
12071
+ var z = null;
12072
+ k && (z = N(d("duration.second"), 60, S), j.appendChild(z)), A.appendChild(j);
12073
+ function H(e, t) {
12074
+ T.innerHTML = "";
12075
+ var n = V(e, t, y, g, T);
12020
12076
  n.prevBtn.addEventListener("click", function(e) {
12021
- e.stopPropagation(), _--, _ < 0 && (_ = 11, g--), V(g, _);
12077
+ e.stopPropagation(), v--, v < 0 && (v = 11, _--), H(_, v);
12022
12078
  }), n.nextBtn.addEventListener("click", function(e) {
12023
- e.stopPropagation(), _++, _ > 11 && (_ = 0, g++), V(g, _);
12079
+ e.stopPropagation(), v++, v > 11 && (v = 0, _++), H(_, v);
12024
12080
  });
12025
12081
  }
12026
- var H = t("div", { class: "tokui-datetimepicker-footer" }), U = t("button", {
12082
+ var U = t("div", { class: "tokui-datetimepicker-footer" }), W = t("button", {
12027
12083
  class: "tokui-timepicker-confirm",
12028
12084
  type: "button"
12029
- }, o("common.ok"));
12030
- H.appendChild(U);
12031
- var W = t("div", { class: "tokui-datetimepicker-body" });
12032
- W.appendChild(D), W.appendChild(k), E.appendChild(W), E.appendChild(H), V(g, _), E.style.display = "none", u.appendChild(E);
12033
- var G = !1;
12034
- function ee() {
12035
- if (!(r || G)) {
12036
- P(K), G = !0, E.style.display = "", u.classList.add("tokui-datetimepicker--open");
12037
- var e = d.getBoundingClientRect();
12038
- E.style.left = e.left + "px", E.style.top = e.bottom + 4 + "px", E.style.width = "auto";
12039
- var t = E.offsetWidth, n = L();
12040
- e.left + t > n - 8 && (E.style.left = Math.max(8, n - t - 8) + "px"), M(I, y), M(z, b), O && B && M(B, x);
12041
- }
12042
- }
12043
- function K() {
12044
- G && (G = !1, E.style.display = "none", u.classList.remove("tokui-datetimepicker--open"), F(K));
12045
- }
12046
- return r || (d.addEventListener("click", function(e) {
12047
- e.stopPropagation(), G ? K() : ee();
12048
- }), D.addEventListener("click", function(e) {
12085
+ }, d("common.ok"));
12086
+ U.appendChild(W);
12087
+ var G = t("div", { class: "tokui-datetimepicker-body" });
12088
+ G.appendChild(T), G.appendChild(A), w.appendChild(G), w.appendChild(U), H(_, v), w.style.display = "none", u.appendChild(w);
12089
+ var K = !1;
12090
+ function q() {
12091
+ if (!(i || K)) {
12092
+ L(J), K = !0, w.style.display = "", u.classList.add("tokui-datetimepicker--open");
12093
+ var e = f.getBoundingClientRect();
12094
+ w.style.left = e.left + "px", w.style.top = e.bottom + 4 + "px", w.style.width = "auto";
12095
+ var t = w.offsetWidth, n = B();
12096
+ e.left + t > n - 8 && (w.style.left = Math.max(8, n - t - 8) + "px"), F(M, b), F(I, x), k && z && F(z, S);
12097
+ }
12098
+ }
12099
+ function J() {
12100
+ K && (K = !1, w.style.display = "none", u.classList.remove("tokui-datetimepicker--open"), R(J));
12101
+ }
12102
+ return i || (f.addEventListener("click", function(e) {
12103
+ e.stopPropagation(), K ? J() : q();
12104
+ }), T.addEventListener("click", function(e) {
12049
12105
  e.stopPropagation();
12050
12106
  var t = e.target.closest(".tokui-datepicker-day");
12051
12107
  if (!(!t || t.classList.contains("tokui-datepicker-day--other"))) {
12052
12108
  var n = parseInt(t.getAttribute("data-day"));
12053
- v = new Date(g, _, n), V(g, _);
12054
- }
12055
- }), U.addEventListener("click", function(e) {
12056
- e.stopPropagation(), v ||= new Date(g, _, h.getDate()), y = j(I), b = j(z), O && B && (x = j(B)), v.setHours(y, b, x);
12057
- var t = T(v, i);
12058
- if (p.value = t, S.value = t, K(), n.clk) {
12059
- var r = typeof window < "u" && window.TokUI && window.TokUI._eventBus ? window.TokUI._eventBus.getHandler(n.clk) : null;
12060
- r && r({
12061
- value: t,
12062
- date: v,
12063
- id: n.id
12109
+ y = new Date(_, v, n), H(_, v);
12110
+ }
12111
+ }), W.addEventListener("click", function(t) {
12112
+ t.stopPropagation(), y ||= new Date(_, v, g.getDate()), b = P(M), x = P(I), k && z && (S = P(z)), y.setHours(b, x, S);
12113
+ var n = O(y, a);
12114
+ if (m.value = n, C.value = n, J(), r.clk) {
12115
+ var i = e.eventBus ? e.eventBus.getHandler(r.clk) : null;
12116
+ i && i({
12117
+ value: n,
12118
+ date: y,
12119
+ id: r.id
12064
12120
  });
12065
12121
  }
12066
12122
  }), typeof document < "u" && document.addEventListener("click", function(e) {
12067
- u.contains(e.target) || K();
12123
+ u.contains(e.target) || J();
12068
12124
  })), c.appendChild(u), c._variantTarget = u, c;
12069
12125
  });
12070
12126
  }
12071
- typeof window < "u" && (window.TokUI = window.TokUI || {}, window.TokUI._internal = window.TokUI._internal || {}, window.TokUI._internal.registerFormComponents = i, window.TokUI._internal._parseOptShorthand = n, window.TokUI._internal._expandOptChildren = r), t !== void 0 && t.exports && (t.exports = {
12072
- registerFormComponents: i,
12127
+ typeof window < "u" && (window.TokUI = window.TokUI || {}, window.TokUI._internal = window.TokUI._internal || {}, window.TokUI._internal.registerFormComponents = s, window.TokUI._internal._parseOptShorthand = n, window.TokUI._internal._expandOptChildren = o), t !== void 0 && t.exports && (t.exports = {
12128
+ registerFormComponents: s,
12073
12129
  _parseOptShorthand: n,
12074
- _expandOptChildren: r
12130
+ _expandOptChildren: o
12075
12131
  });
12076
12132
  })), T = /* @__PURE__ */ o(((e, t) => {
12077
12133
  var n = typeof l == "function" ? u().t : window.TokUI && window.TokUI._internal && window.TokUI._internal.t || function(e) {