@xto/data 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as Z, computed as B, openBlock as M, createElementBlock as b, normalizeStyle as F, normalizeClass as p, createElementVNode as A, renderSlot as G, createTextVNode as ae, toDisplayString as Q, unref as d, createVNode as ne, createCommentVNode as j, ref as _, watch as se, Fragment as q, renderList as le, withDirectives as ze, withKeys as He, vModelText as Ve, useSlots as be, withModifiers as ie, inject as ge, resolveComponent as Pe, createBlock as re, withCtx as Ie, vShow as $e, reactive as Be, provide as ve, toRef as Re, nextTick as Se, onMounted as pe, onUnmounted as me, resolveDynamicComponent as xe, Teleport as je, onBeforeUnmount as Oe } from "vue";
1
+ import { defineComponent as Z, computed as $, openBlock as M, createElementBlock as w, normalizeStyle as F, normalizeClass as p, createElementVNode as A, renderSlot as G, createTextVNode as ae, toDisplayString as U, unref as u, createVNode as ne, createCommentVNode as j, ref as _, watch as se, Fragment as q, renderList as le, withDirectives as ze, withKeys as Ve, vModelText as Pe, useSlots as be, withModifiers as ie, mergeProps as Ae, inject as ge, resolveComponent as Re, createBlock as re, withCtx as Ie, vShow as $e, reactive as Se, provide as ve, toRef as je, nextTick as Ee, onMounted as pe, onUnmounted as me, resolveDynamicComponent as xe, Teleport as Oe, onBeforeUnmount as _e } from "vue";
2
2
  import { useNamespace as J } from "@xto/core";
3
- const Ee = {
3
+ const Ne = {
4
4
  // 箭头类
5
5
  "arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
6
6
  "arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
@@ -202,9 +202,9 @@ const Ee = {
202
202
  // 上箭头
203
203
  };
204
204
  function We(s) {
205
- return s in Ee;
205
+ return s in Ne;
206
206
  }
207
- const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te = /* @__PURE__ */ Z({
207
+ const Ye = ["aria-hidden", "aria-label"], Xe = ["stroke-width"], Qe = ["d"], te = /* @__PURE__ */ Z({
208
208
  name: "XIcon",
209
209
  __name: "index",
210
210
  props: {
@@ -215,28 +215,28 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
215
215
  strokeWidth: { default: 2 }
216
216
  },
217
217
  setup(s, { expose: r }) {
218
- const n = s, e = J("icon"), o = B(() => typeof n.size == "number" ? `${n.size}px` : n.size), a = B(() => ({
218
+ const n = s, e = J("icon"), o = $(() => typeof n.size == "number" ? `${n.size}px` : n.size), a = $(() => ({
219
219
  width: o.value,
220
220
  height: o.value,
221
221
  color: n.color
222
- })), t = B(() => ({
222
+ })), t = $(() => ({
223
223
  strokeWidth: n.strokeWidth
224
- })), l = B(() => [
224
+ })), l = $(() => [
225
225
  e.b(),
226
226
  e.is("spin", n.spin)
227
- ]), c = B(() => n.name && We(n.name) ? Ee[n.name] : "");
227
+ ]), i = $(() => n.name && We(n.name) ? Ne[n.name] : "");
228
228
  return r({
229
229
  iconSize: o,
230
230
  iconStyle: a,
231
- iconPath: c
232
- }), (k, x) => (M(), b("span", {
231
+ iconPath: i
232
+ }), (z, k) => (M(), w("span", {
233
233
  class: p(l.value),
234
234
  style: F(a.value),
235
235
  "aria-hidden": !s.name,
236
236
  "aria-label": s.name,
237
237
  role: "img"
238
238
  }, [
239
- c.value ? (M(), b("svg", {
239
+ i.value ? (M(), w("svg", {
240
240
  key: 0,
241
241
  viewBox: "0 0 24 24",
242
242
  fill: "none",
@@ -247,13 +247,13 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
247
247
  style: F(t.value),
248
248
  "aria-hidden": "true"
249
249
  }, [
250
- A("path", { d: c.value }, null, 8, Xe)
251
- ], 12, Ye)) : G(k.$slots, "default", { key: 1 }, () => [
252
- ae(Q(s.name), 1)
250
+ A("path", { d: i.value }, null, 8, Qe)
251
+ ], 12, Xe)) : G(z.$slots, "default", { key: 1 }, () => [
252
+ ae(U(s.name), 1)
253
253
  ])
254
- ], 14, _e));
254
+ ], 14, Ye));
255
255
  }
256
- }), tn = /* @__PURE__ */ Z({
256
+ }), nn = /* @__PURE__ */ Z({
257
257
  name: "XTag",
258
258
  __name: "index",
259
259
  props: {
@@ -266,69 +266,69 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
266
266
  },
267
267
  emits: ["close"],
268
268
  setup(s, { emit: r }) {
269
- const n = s, e = r, o = J("tag"), a = B(() => [
269
+ const n = s, e = r, o = J("tag"), a = $(() => [
270
270
  o.b(),
271
271
  o.m(n.type || "primary"),
272
272
  n.size !== "default" ? o.m(n.size) : "",
273
273
  o.m(n.effect),
274
274
  o.is("hit", n.hit)
275
- ]), t = B(() => n.color ? {
275
+ ]), t = $(() => n.color ? {
276
276
  backgroundColor: n.effect === "dark" ? n.color : "",
277
277
  borderColor: n.color,
278
278
  color: n.effect === "dark" ? "#fff" : n.color
279
- } : {}), l = (c) => {
280
- e("close", c);
279
+ } : {}), l = (i) => {
280
+ e("close", i);
281
281
  };
282
- return (c, k) => (M(), b("span", {
282
+ return (i, z) => (M(), w("span", {
283
283
  class: p(a.value),
284
284
  style: F(t.value)
285
285
  }, [
286
- G(c.$slots, "default"),
287
- s.closable ? (M(), b("i", {
286
+ G(i.$slots, "default"),
287
+ s.closable ? (M(), w("i", {
288
288
  key: 0,
289
- class: p(d(o).e("close")),
289
+ class: p(u(o).e("close")),
290
290
  onClick: l
291
291
  }, [
292
- ne(d(te), {
292
+ ne(u(te), {
293
293
  name: "close",
294
294
  size: 10
295
295
  })
296
296
  ], 2)) : j("", !0)
297
297
  ], 6));
298
298
  }
299
- }), nn = /* @__PURE__ */ Z({
299
+ }), an = /* @__PURE__ */ Z({
300
300
  name: "XCard",
301
301
  __name: "index",
302
302
  props: {
303
303
  header: {},
304
- bodyStyle: { default: () => ({ padding: "4px" }) },
305
- shadow: { default: "always" }
304
+ bodyStyle: { default: () => ({}) },
305
+ shadow: { default: "never" }
306
306
  },
307
307
  setup(s) {
308
- const r = s, n = J("card"), e = B(() => [
308
+ const r = s, n = J("card"), e = $(() => [
309
309
  n.b(),
310
310
  n.is(`shadow-${r.shadow}`)
311
311
  ]);
312
- return (o, a) => (M(), b("div", {
312
+ return (o, a) => (M(), w("div", {
313
313
  class: p(e.value)
314
314
  }, [
315
- s.header || o.$slots.header ? (M(), b("div", {
315
+ s.header || o.$slots.header ? (M(), w("div", {
316
316
  key: 0,
317
- class: p(d(n).e("header"))
317
+ class: p(u(n).e("header"))
318
318
  }, [
319
319
  G(o.$slots, "header", {}, () => [
320
- ae(Q(s.header), 1)
320
+ ae(U(s.header), 1)
321
321
  ])
322
322
  ], 2)) : j("", !0),
323
323
  A("div", {
324
- class: p(d(n).e("body")),
324
+ class: p(u(n).e("body")),
325
325
  style: F(s.bodyStyle)
326
326
  }, [
327
327
  G(o.$slots, "default")
328
328
  ], 6)
329
329
  ], 2));
330
330
  }
331
- }), Qe = ["viewBox"], Ue = ["cx", "cy", "r", "stroke-width"], Fe = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke"], an = /* @__PURE__ */ Z({
331
+ }), Ue = ["viewBox"], Fe = ["cx", "cy", "r", "stroke-width"], Ge = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke"], ln = /* @__PURE__ */ Z({
332
332
  name: "XProgress",
333
333
  __name: "index",
334
334
  props: {
@@ -341,43 +341,50 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
341
341
  showText: { type: Boolean, default: !0 }
342
342
  },
343
343
  setup(s) {
344
- const r = s, n = J("progress"), e = B(() => Math.min(100, Math.max(0, r.percentage))), o = B(() => ({
344
+ const r = s, n = J("progress"), e = $(() => Math.min(100, Math.max(0, r.percentage))), o = $(() => {
345
+ if (typeof r.color == "function") return r.color(e.value);
346
+ if (Array.isArray(r.color)) {
347
+ const l = Math.min(r.color.length - 1, Math.floor(e.value / 100 * r.color.length));
348
+ return r.color[l] || "var(--xto-color-primary, #4F46E5)";
349
+ }
350
+ return r.color;
351
+ }), a = $(() => ({
345
352
  width: `${e.value}%`,
346
- backgroundColor: typeof r.color == "function" ? r.color(e.value) : r.color
347
- })), a = B(() => [
353
+ backgroundColor: o.value
354
+ })), t = $(() => [
348
355
  n.b(),
349
356
  n.m(r.type),
350
357
  n.is("show-text", r.showText),
351
- n.is(`status-${r.status || ""}`, r.status)
358
+ n.is(`status-${r.status || ""}`, !!r.status)
352
359
  ]);
353
- return B(() => r.status === "success" ? "100%" : r.status === "warning" ? "Warning" : r.status === "exception" ? "Exception" : `${e.value}%`), (t, l) => (M(), b("div", {
354
- class: p(a.value)
360
+ return $(() => r.status === "success" ? "100%" : r.status === "warning" ? "Warning" : r.status === "exception" ? "Exception" : `${e.value}%`), (l, i) => (M(), w("div", {
361
+ class: p(t.value)
355
362
  }, [
356
- s.type === "line" ? (M(), b("div", {
363
+ s.type === "line" ? (M(), w("div", {
357
364
  key: 0,
358
- class: p(d(n).e("line"))
365
+ class: p(u(n).e("line"))
359
366
  }, [
360
367
  A("div", {
361
- class: p(d(n).e("outer"))
368
+ class: p(u(n).e("outer"))
362
369
  }, [
363
370
  A("div", {
364
- class: p(d(n).e("inner"))
371
+ class: p(u(n).e("inner"))
365
372
  }, [
366
373
  A("div", {
367
- class: p(d(n).e("bar")),
368
- style: F(o.value)
374
+ class: p(u(n).e("bar")),
375
+ style: F(a.value)
369
376
  }, null, 6)
370
377
  ], 2)
371
378
  ], 2),
372
- s.showText ? (M(), b("div", {
379
+ s.showText ? (M(), w("div", {
373
380
  key: 0,
374
- class: p(d(n).e("text"))
375
- }, Q(e.value) + "% ", 3)) : j("", !0)
376
- ], 2)) : (M(), b("div", {
381
+ class: p(u(n).e("text"))
382
+ }, U(e.value) + "% ", 3)) : j("", !0)
383
+ ], 2)) : (M(), w("div", {
377
384
  key: 1,
378
- class: p(d(n).e("circle"))
385
+ class: p(u(n).e("circle"))
379
386
  }, [
380
- (M(), b("svg", {
387
+ (M(), w("svg", {
381
388
  viewBox: `0 0 ${s.width} ${s.width}`,
382
389
  style: F({ width: `${s.width}px`, height: `${s.width}px` })
383
390
  }, [
@@ -388,7 +395,7 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
388
395
  fill: "none",
389
396
  "stroke-width": s.strokeWidth,
390
397
  stroke: "var(--xto-fill-color, #F2F3F5)"
391
- }, null, 8, Ue),
398
+ }, null, 8, Fe),
392
399
  A("circle", {
393
400
  cx: s.width / 2,
394
401
  cy: s.width / 2,
@@ -396,19 +403,19 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
396
403
  fill: "none",
397
404
  "stroke-width": s.strokeWidth,
398
405
  "stroke-dasharray": `${e.value / 100 * Math.PI * (s.width - s.strokeWidth)} ${Math.PI * (s.width - s.strokeWidth)}`,
399
- stroke: typeof s.color == "function" ? s.color(e.value) : s.color,
406
+ stroke: o.value,
400
407
  "stroke-linecap": "round",
401
408
  style: { transform: "rotate(-90deg)", "transform-origin": "center" }
402
- }, null, 8, Fe)
403
- ], 12, Qe)),
404
- s.showText ? (M(), b("div", {
409
+ }, null, 8, Ge)
410
+ ], 12, Ue)),
411
+ s.showText ? (M(), w("div", {
405
412
  key: 0,
406
- class: p(d(n).e("circle-text"))
407
- }, Q(e.value) + "% ", 3)) : j("", !0)
413
+ class: p(u(n).e("circle-text"))
414
+ }, U(e.value) + "% ", 3)) : j("", !0)
408
415
  ], 2))
409
416
  ], 2));
410
417
  }
411
- }), Ge = ["disabled"], Ze = ["onClick"], Je = ["disabled"], qe = ["value"], et = ["value"], tt = /* @__PURE__ */ Z({
418
+ }), Ze = ["disabled"], Je = ["onClick"], qe = ["disabled"], et = ["value"], tt = ["value"], nt = /* @__PURE__ */ Z({
412
419
  name: "XPagination",
413
420
  __name: "index",
414
421
  props: {
@@ -426,45 +433,45 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
426
433
  }), se(() => n.pageSize, (E) => {
427
434
  t.value = E;
428
435
  });
429
- const l = B(() => a.value), c = B(() => t.value), k = B(() => Math.max(1, Math.ceil(n.total / c.value))), x = B(
436
+ const l = $(() => a.value), i = $(() => t.value), z = $(() => Math.max(1, Math.ceil(n.total / i.value))), k = $(
430
437
  () => n.layout.split(",").map((E) => E.trim()).filter(Boolean)
431
- ), w = (E) => x.value.includes(E), z = B(() => {
432
- const E = [], $ = k.value, K = l.value;
433
- if ($ <= 7)
434
- for (let N = 1; N <= $; N++) E.push(N);
435
- else if (K <= 4) {
436
- for (let N = 1; N <= 5; N++) E.push(N);
437
- E.push(-1), E.push($);
438
- } else if (K >= $ - 3) {
438
+ ), x = (E) => k.value.includes(E), C = $(() => {
439
+ const E = [], B = z.value, H = l.value;
440
+ if (B <= 7)
441
+ for (let K = 1; K <= B; K++) E.push(K);
442
+ else if (H <= 4) {
443
+ for (let K = 1; K <= 5; K++) E.push(K);
444
+ E.push(-1), E.push(B);
445
+ } else if (H >= B - 3) {
439
446
  E.push(1), E.push(-1);
440
- for (let N = $ - 4; N <= $; N++) E.push(N);
447
+ for (let K = B - 4; K <= B; K++) E.push(K);
441
448
  } else {
442
449
  E.push(1), E.push(-1);
443
- for (let N = K - 1; N <= K + 1; N++) E.push(N);
444
- E.push(-1), E.push($);
450
+ for (let K = H - 1; K <= H + 1; K++) E.push(K);
451
+ E.push(-1), E.push(B);
445
452
  }
446
453
  return E;
447
454
  }), S = (E) => {
448
- E < 1 || E > k.value || E === l.value || (a.value = E, e("update:currentPage", E), e("current-change", E));
449
- }, V = (E) => {
450
- E !== c.value && (t.value = E, e("update:pageSize", E), e("size-change", E), a.value = 1, e("update:currentPage", 1), e("current-change", 1));
451
- }, P = _(""), W = () => {
452
- const E = parseInt(P.value, 10);
453
- isFinite(E) && (S(Math.min(Math.max(1, E), k.value)), P.value = "");
455
+ E < 1 || E > z.value || E === l.value || (a.value = E, e("update:currentPage", E), e("current-change", E));
456
+ }, P = (E) => {
457
+ E !== i.value && (t.value = E, e("update:pageSize", E), e("size-change", E), a.value = 1, e("update:currentPage", 1), e("current-change", 1));
458
+ }, V = _(""), W = () => {
459
+ const E = parseInt(V.value, 10);
460
+ isFinite(E) && (S(Math.min(Math.max(1, E), z.value)), V.value = "");
454
461
  };
455
- return (E, $) => (M(), b("div", {
456
- class: p(d(o).b())
462
+ return (E, B) => (M(), w("div", {
463
+ class: p(u(o).b())
457
464
  }, [
458
- w("total") ? (M(), b("span", {
465
+ x("total") ? (M(), w("span", {
459
466
  key: 0,
460
- class: p(d(o).e("total"))
461
- }, "共 " + Q(s.total) + " 条", 3)) : j("", !0),
462
- w("prev") ? (M(), b("button", {
467
+ class: p(u(o).e("total"))
468
+ }, "共 " + U(s.total) + " 条", 3)) : j("", !0),
469
+ x("prev") ? (M(), w("button", {
463
470
  key: 1,
464
- class: p(d(o).e("btn")),
471
+ class: p(u(o).e("btn")),
465
472
  disabled: l.value <= 1,
466
- onClick: $[0] || ($[0] = (K) => S(l.value - 1))
467
- }, [...$[4] || ($[4] = [
473
+ onClick: B[0] || (B[0] = (H) => S(l.value - 1))
474
+ }, [...B[4] || (B[4] = [
468
475
  A("svg", {
469
476
  viewBox: "0 0 24 24",
470
477
  fill: "none",
@@ -479,23 +486,23 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
479
486
  "stroke-linejoin": "round"
480
487
  })
481
488
  ], -1)
482
- ])], 10, Ge)) : j("", !0),
483
- w("pager") ? (M(!0), b(q, { key: 2 }, le(z.value, (K) => (M(), b(q, { key: K }, [
484
- K === -1 ? (M(), b("span", {
489
+ ])], 10, Ze)) : j("", !0),
490
+ x("pager") ? (M(!0), w(q, { key: 2 }, le(C.value, (H) => (M(), w(q, { key: H }, [
491
+ H === -1 ? (M(), w("span", {
485
492
  key: 0,
486
- class: p(d(o).e("ellipsis"))
487
- }, "...", 2)) : (M(), b("button", {
493
+ class: p(u(o).e("ellipsis"))
494
+ }, "...", 2)) : (M(), w("button", {
488
495
  key: 1,
489
- class: p([d(o).e("btn"), d(o).is("active", K === l.value)]),
490
- onClick: (N) => S(K)
491
- }, Q(K), 11, Ze))
496
+ class: p([u(o).e("btn"), u(o).is("active", H === l.value)]),
497
+ onClick: (K) => S(H)
498
+ }, U(H), 11, Je))
492
499
  ], 64))), 128)) : j("", !0),
493
- w("next") ? (M(), b("button", {
500
+ x("next") ? (M(), w("button", {
494
501
  key: 3,
495
- class: p(d(o).e("btn")),
496
- disabled: l.value >= k.value,
497
- onClick: $[1] || ($[1] = (K) => S(l.value + 1))
498
- }, [...$[5] || ($[5] = [
502
+ class: p(u(o).e("btn")),
503
+ disabled: l.value >= z.value,
504
+ onClick: B[1] || (B[1] = (H) => S(l.value + 1))
505
+ }, [...B[5] || (B[5] = [
499
506
  A("svg", {
500
507
  viewBox: "0 0 24 24",
501
508
  fill: "none",
@@ -510,38 +517,38 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
510
517
  "stroke-linejoin": "round"
511
518
  })
512
519
  ], -1)
513
- ])], 10, Je)) : j("", !0),
514
- w("sizes") ? (M(), b("select", {
520
+ ])], 10, qe)) : j("", !0),
521
+ x("sizes") ? (M(), w("select", {
515
522
  key: 4,
516
- class: p(d(o).e("sizes")),
517
- value: c.value,
518
- onChange: $[2] || ($[2] = (K) => V(Number(K.target.value)))
523
+ class: p(u(o).e("sizes")),
524
+ value: i.value,
525
+ onChange: B[2] || (B[2] = (H) => P(Number(H.target.value)))
519
526
  }, [
520
- (M(!0), b(q, null, le(s.pageSizes, (K) => (M(), b("option", {
521
- key: K,
522
- value: K
523
- }, Q(K) + " 条/页", 9, et))), 128))
524
- ], 42, qe)) : j("", !0),
525
- w("jumper") ? (M(), b("span", {
527
+ (M(!0), w(q, null, le(s.pageSizes, (H) => (M(), w("option", {
528
+ key: H,
529
+ value: H
530
+ }, U(H) + " 条/页", 9, tt))), 128))
531
+ ], 42, et)) : j("", !0),
532
+ x("jumper") ? (M(), w("span", {
526
533
  key: 5,
527
- class: p(d(o).e("jumper"))
534
+ class: p(u(o).e("jumper"))
528
535
  }, [
529
- $[6] || ($[6] = ae(" 前往 ", -1)),
536
+ B[6] || (B[6] = ae(" 前往 ", -1)),
530
537
  ze(A("input", {
531
- class: p(d(o).e("jumper-input")),
538
+ class: p(u(o).e("jumper-input")),
532
539
  type: "text",
533
540
  inputmode: "numeric",
534
- "onUpdate:modelValue": $[3] || ($[3] = (K) => P.value = K),
535
- onKeyup: He(W, ["enter"]),
541
+ "onUpdate:modelValue": B[3] || (B[3] = (H) => V.value = H),
542
+ onKeyup: Ve(W, ["enter"]),
536
543
  onBlur: W
537
544
  }, null, 34), [
538
- [Ve, P.value]
545
+ [Pe, V.value]
539
546
  ]),
540
- $[7] || ($[7] = ae(" 页 ", -1))
547
+ B[7] || (B[7] = ae(" 页 ", -1))
541
548
  ], 2)) : j("", !0)
542
549
  ], 2));
543
550
  }
544
- }), nt = { key: 0 }, at = ["checked", "indeterminate"], lt = ["onClick"], ot = { class: "sort-arrow up" }, st = { class: "sort-arrow down" }, rt = ["onClick"], it = ["checked", "onChange"], ct = ["onClick"], ut = ["onClick"], dt = { key: 1 }, ht = ["colspan"], ln = /* @__PURE__ */ Z({
551
+ }), at = { key: 0 }, lt = ["checked", "indeterminate"], ot = ["onClick"], st = { class: "sort-arrow up" }, rt = { class: "sort-arrow down" }, it = ["onClick"], ct = ["checked", "onChange"], ut = ["onClick"], dt = ["onClick"], ht = { key: 1 }, ft = ["colspan"], on = /* @__PURE__ */ Z({
545
552
  name: "XDynamicTable",
546
553
  __name: "index",
547
554
  props: {
@@ -564,381 +571,382 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
564
571
  },
565
572
  emits: ["sort-change", "row-click", "row-dblclick", "selection-change", "select-all", "cell-click", "add-row", "delete-row", "update:data"],
566
573
  setup(s, { expose: r, emit: n }) {
567
- var L, i;
574
+ var L, f;
568
575
  const e = s, o = n, a = J("dynamic-table");
569
576
  be();
570
- const t = B({
577
+ const t = $({
571
578
  get: () => e.data,
572
- set: (u) => o("update:data", u)
579
+ set: (c) => o("update:data", c)
573
580
  }), l = _({
574
581
  prop: ((L = e.defaultSort) == null ? void 0 : L.prop) || "",
575
- order: ((i = e.defaultSort) == null ? void 0 : i.order) || null
576
- }), c = _([]), k = _(!1), x = _(!1), w = B(() => {
582
+ order: ((f = e.defaultSort) == null ? void 0 : f.order) || null
583
+ }), i = _([]), z = _(!1), k = _(!1), x = $(() => {
577
584
  if (!l.value.prop || !l.value.order)
578
585
  return t.value;
579
- const { prop: u, order: f } = l.value;
580
- return [...t.value].sort((m, h) => {
581
- const T = m[u], H = h[u];
582
- if (T === H) return 0;
583
- const R = T > H ? 1 : -1;
584
- return f === "ascending" ? R : -R;
586
+ const { prop: c, order: d } = l.value;
587
+ return [...t.value].sort((y, h) => {
588
+ const T = y[c], N = h[c];
589
+ if (T === N) return 0;
590
+ const R = T > N ? 1 : -1;
591
+ return d === "ascending" ? R : -R;
585
592
  });
586
- }), z = B(() => {
587
- const u = {};
588
- return e.height && (u.height = typeof e.height == "number" ? `${e.height}px` : e.height), e.maxHeight && (u.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight), u;
589
- }), S = B(() => {
590
- const u = typeof e.operationWidth == "number" ? `${e.operationWidth}px` : e.operationWidth;
591
- return { width: u, minWidth: u };
592
- }), V = B(() => [
593
+ }), C = $(() => {
594
+ const c = {};
595
+ return e.height && (c.height = typeof e.height == "number" ? `${e.height}px` : e.height), e.maxHeight && (c.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight), c;
596
+ }), S = $(() => {
597
+ const c = typeof e.operationWidth == "number" ? `${e.operationWidth}px` : e.operationWidth;
598
+ return { width: c, minWidth: c };
599
+ }), P = $(() => [
593
600
  a.b(),
594
601
  a.is("border", e.border),
595
602
  a.is("stripe", e.stripe),
596
603
  a.is("loading", e.loading)
597
- ]), P = (u) => {
598
- u.sortable && (l.value.prop === u.prop ? l.value.order === "ascending" ? l.value.order = "descending" : l.value.order === "descending" && (l.value.order = null, l.value.prop = "") : (l.value.prop = u.prop, l.value.order = "ascending"), o("sort-change", { ...l.value }));
599
- }, W = (u) => u.sortable ? l.value.prop !== u.prop ? a.is("sortable") : [
604
+ ]), V = (c) => {
605
+ c.sortable && (l.value.prop === c.prop ? l.value.order === "ascending" ? l.value.order = "descending" : l.value.order === "descending" && (l.value.order = null, l.value.prop = "") : (l.value.prop = c.prop, l.value.order = "ascending"), o("sort-change", { ...l.value }));
606
+ }, W = (c) => c.sortable ? l.value.prop !== c.prop ? a.is("sortable") : [
600
607
  a.is("sortable"),
601
608
  a.is(`sort-${l.value.order}`)
602
- ] : "", E = (u, f, m) => {
603
- const h = u[f.prop];
604
- return f.formatter ? f.formatter(u, f, h, m) : h ?? "";
605
- }, $ = (u, f, m) => {
606
- o("row-click", u, f, m);
607
- }, K = (u, f, m) => {
608
- const h = m.target;
609
- o("cell-click", u, f, h, m);
610
- }, N = () => {
611
- k.value || x.value ? (c.value = [], k.value = !1, x.value = !1) : (c.value = [...t.value], k.value = !0, x.value = !1), o("select-all", c.value), o("selection-change", c.value);
612
- }, Y = (u) => {
613
- const f = c.value.findIndex((m) => typeof e.rowKey == "function" ? e.rowKey(m) === e.rowKey(u) : e.rowKey ? m[e.rowKey] === u[e.rowKey] : m === u);
614
- f > -1 ? c.value.splice(f, 1) : c.value.push(u), k.value = c.value.length === t.value.length, x.value = c.value.length > 0 && c.value.length < t.value.length, o("selection-change", c.value);
615
- }, ee = (u) => c.value.some((f) => typeof e.rowKey == "function" ? e.rowKey(f) === e.rowKey(u) : e.rowKey ? f[e.rowKey] === u[e.rowKey] : f === u), v = (u) => {
616
- const f = {};
617
- return u.width && (f.width = typeof u.width == "number" ? `${u.width}px` : u.width), u.minWidth && (f.minWidth = typeof u.minWidth == "number" ? `${u.minWidth}px` : u.minWidth), u.align && (f.textAlign = u.align), f;
618
- }, C = (u) => {
619
- const f = u || {};
620
- e.columns.forEach((m) => {
621
- f[m.prop] === void 0 && (f[m.prop] = "");
622
- }), t.value = [...t.value, f], o("add-row", f);
623
- }, y = (u) => {
624
- const f = t.value[u];
625
- t.value = t.value.filter((m, h) => h !== u), o("delete-row", f, u);
609
+ ] : "", E = (c, d, y) => {
610
+ const h = c[d.prop];
611
+ return d.formatter ? d.formatter(c, d, h, y) : h ?? "";
612
+ }, B = (c, d, y) => {
613
+ o("row-click", c, d, y);
614
+ }, H = (c, d, y) => {
615
+ const h = y.target;
616
+ o("cell-click", c, d, h, y);
617
+ }, K = () => {
618
+ z.value || k.value ? (i.value = [], z.value = !1, k.value = !1) : (i.value = [...t.value], z.value = !0, k.value = !1), o("select-all", i.value), o("selection-change", i.value);
619
+ }, Y = (c) => {
620
+ const d = i.value.findIndex((y) => typeof e.rowKey == "function" ? e.rowKey(y) === e.rowKey(c) : e.rowKey ? y[e.rowKey] === c[e.rowKey] : y === c);
621
+ d > -1 ? i.value.splice(d, 1) : i.value.push(c), z.value = i.value.length === t.value.length, k.value = i.value.length > 0 && i.value.length < t.value.length, o("selection-change", i.value);
622
+ }, ee = (c) => i.value.some((d) => typeof e.rowKey == "function" ? e.rowKey(d) === e.rowKey(c) : e.rowKey ? d[e.rowKey] === c[e.rowKey] : d === c), v = (c) => {
623
+ const d = {};
624
+ return c.width && (d.width = typeof c.width == "number" ? `${c.width}px` : c.width), c.minWidth && (d.minWidth = typeof c.minWidth == "number" ? `${c.minWidth}px` : c.minWidth), c.align && (d.textAlign = c.align), d;
625
+ }, b = (c) => {
626
+ const d = c || {};
627
+ e.columns.forEach((y) => {
628
+ d[y.prop] === void 0 && (d[y.prop] = "");
629
+ }), t.value = [...t.value, d], o("add-row", d);
630
+ }, m = (c) => {
631
+ const d = t.value[c];
632
+ t.value = t.value.filter((y, h) => h !== c), o("delete-row", d, c);
626
633
  };
627
634
  return r({
628
635
  clearSelection: () => {
629
- c.value = [], k.value = !1, x.value = !1;
636
+ i.value = [], z.value = !1, k.value = !1;
630
637
  },
631
- getSelection: () => [...c.value],
638
+ getSelection: () => [...i.value],
632
639
  sortState: l,
633
- addRow: C,
634
- deleteRow: y,
640
+ addRow: b,
641
+ deleteRow: m,
635
642
  getData: () => [...t.value]
636
- }), (u, f) => (M(), b("div", {
637
- class: p(V.value)
643
+ }), (c, d) => (M(), w("div", {
644
+ class: p(P.value)
638
645
  }, [
639
- s.showAddButton ? (M(), b("div", {
646
+ s.showAddButton ? (M(), w("div", {
640
647
  key: 0,
641
- class: p(d(a).e("toolbar"))
648
+ class: p(u(a).e("toolbar"))
642
649
  }, [
643
- G(u.$slots, "toolbar", {}, () => [
650
+ G(c.$slots, "toolbar", {}, () => [
644
651
  A("button", {
645
- class: p(d(a).e("add-btn")),
646
- onClick: f[0] || (f[0] = (m) => C())
647
- }, [...f[2] || (f[2] = [
652
+ class: p(u(a).e("add-btn")),
653
+ onClick: d[0] || (d[0] = (y) => b())
654
+ }, [...d[2] || (d[2] = [
648
655
  A("span", { class: "add-icon" }, "+", -1),
649
656
  ae(" 新增一行 ", -1)
650
657
  ])], 2)
651
658
  ])
652
659
  ], 2)) : j("", !0),
653
- s.loading ? (M(), b("div", {
660
+ s.loading ? (M(), w("div", {
654
661
  key: 1,
655
- class: p(d(a).e("loading"))
656
- }, [...f[3] || (f[3] = [
662
+ class: p(u(a).e("loading"))
663
+ }, [...d[3] || (d[3] = [
657
664
  A("span", { class: "loading-spinner" }, null, -1),
658
665
  A("span", { class: "loading-text" }, "加载中...", -1)
659
666
  ])], 2)) : j("", !0),
660
667
  A("div", {
661
- class: p(d(a).e("wrapper")),
662
- style: F(z.value)
668
+ class: p(u(a).e("wrapper")),
669
+ style: F(C.value)
663
670
  }, [
664
671
  A("table", null, [
665
- s.showHeader ? (M(), b("thead", nt, [
672
+ s.showHeader ? (M(), w("thead", at, [
666
673
  A("tr", null, [
667
- s.rowKey ? (M(), b("th", {
674
+ s.rowKey ? (M(), w("th", {
668
675
  key: 0,
669
- class: p([d(a).e("header-cell"), d(a).e("selection-cell")])
676
+ class: p([u(a).e("header-cell"), u(a).e("selection-cell")])
670
677
  }, [
671
678
  A("input", {
672
679
  type: "checkbox",
673
- checked: k.value,
674
- indeterminate: x.value,
675
- onChange: N
676
- }, null, 40, at)
680
+ checked: z.value,
681
+ indeterminate: k.value,
682
+ onChange: K
683
+ }, null, 40, lt)
677
684
  ], 2)) : j("", !0),
678
- s.showIndex ? (M(), b("th", {
685
+ s.showIndex ? (M(), w("th", {
679
686
  key: 1,
680
- class: p(d(a).e("header-cell")),
687
+ class: p(u(a).e("header-cell")),
681
688
  style: { width: "60px" }
682
689
  }, " 序号 ", 2)) : j("", !0),
683
- (M(!0), b(q, null, le(s.columns, (m) => (M(), b("th", {
684
- key: m.prop,
685
- class: p([d(a).e("header-cell"), W(m)]),
686
- style: F(v(m)),
687
- onClick: (h) => P(m)
690
+ (M(!0), w(q, null, le(s.columns, (y) => (M(), w("th", {
691
+ key: y.prop,
692
+ class: p([u(a).e("header-cell"), W(y)]),
693
+ style: F(v(y)),
694
+ onClick: (h) => V(y)
688
695
  }, [
689
- A("span", null, Q(m.label), 1),
690
- m.sortable ? (M(), b("span", {
696
+ A("span", null, U(y.label), 1),
697
+ y.sortable ? (M(), w("span", {
691
698
  key: 0,
692
- class: p(d(a).e("sort-icon"))
699
+ class: p(u(a).e("sort-icon"))
693
700
  }, [
694
- A("span", ot, [
695
- ne(d(te), {
701
+ A("span", st, [
702
+ ne(u(te), {
696
703
  name: "sort-up",
697
704
  size: 12
698
705
  })
699
706
  ]),
700
- A("span", st, [
701
- ne(d(te), {
707
+ A("span", rt, [
708
+ ne(u(te), {
702
709
  name: "sort-down",
703
710
  size: 12
704
711
  })
705
712
  ])
706
713
  ], 2)) : j("", !0)
707
- ], 14, lt))), 128)),
708
- s.showOperation ? (M(), b("th", {
714
+ ], 14, ot))), 128)),
715
+ s.showOperation ? (M(), w("th", {
709
716
  key: 2,
710
- class: p(d(a).e("header-cell")),
717
+ class: p(u(a).e("header-cell")),
711
718
  style: F(S.value)
712
- }, Q(s.operationLabel), 7)) : j("", !0)
719
+ }, U(s.operationLabel), 7)) : j("", !0)
713
720
  ])
714
721
  ])) : j("", !0),
715
722
  A("tbody", null, [
716
- (M(!0), b(q, null, le(w.value, (m, h) => (M(), b("tr", {
717
- key: s.rowKey ? typeof s.rowKey == "function" ? s.rowKey(m) : m[s.rowKey] : h,
718
- class: p([d(a).e("row"), d(a).is("selected", ee(m))]),
719
- onClick: (T) => $(m, s.columns[0], T)
723
+ (M(!0), w(q, null, le(x.value, (y, h) => (M(), w("tr", {
724
+ key: s.rowKey ? typeof s.rowKey == "function" ? s.rowKey(y) : y[s.rowKey] : h,
725
+ class: p([u(a).e("row"), u(a).is("selected", ee(y))]),
726
+ onClick: (T) => B(y, s.columns[0], T)
720
727
  }, [
721
- s.rowKey ? (M(), b("td", {
728
+ s.rowKey ? (M(), w("td", {
722
729
  key: 0,
723
- class: p(d(a).e("cell"))
730
+ class: p(u(a).e("cell"))
724
731
  }, [
725
732
  A("input", {
726
733
  type: "checkbox",
727
- checked: ee(m),
728
- onClick: f[1] || (f[1] = ie(() => {
734
+ checked: ee(y),
735
+ onClick: d[1] || (d[1] = ie(() => {
729
736
  }, ["stop"])),
730
- onChange: (T) => Y(m)
731
- }, null, 40, it)
737
+ onChange: (T) => Y(y)
738
+ }, null, 40, ct)
732
739
  ], 2)) : j("", !0),
733
- s.showIndex ? (M(), b("td", {
740
+ s.showIndex ? (M(), w("td", {
734
741
  key: 1,
735
- class: p(d(a).e("cell"))
736
- }, Q(h + 1), 3)) : j("", !0),
737
- (M(!0), b(q, null, le(s.columns, (T) => (M(), b("td", {
742
+ class: p(u(a).e("cell"))
743
+ }, U(h + 1), 3)) : j("", !0),
744
+ (M(!0), w(q, null, le(s.columns, (T) => (M(), w("td", {
738
745
  key: T.prop,
739
- class: p(d(a).e("cell")),
746
+ class: p(u(a).e("cell")),
740
747
  style: F(v(T)),
741
- onClick: (H) => K(m, T, H)
748
+ onClick: (N) => H(y, T, N)
742
749
  }, [
743
- G(u.$slots, `column-${T.prop}`, {
744
- row: m,
745
- column: T,
746
- $index: h
747
- }, () => [
748
- ae(Q(E(m, T, h)), 1)
750
+ G(c.$slots, `column-${T.prop}`, Ae({
751
+ row: y,
752
+ column: T
753
+ }, { ref_for: !0 }, { $index: h }), () => [
754
+ ae(U(E(y, T, h)), 1)
749
755
  ])
750
- ], 14, ct))), 128)),
751
- s.showOperation ? (M(), b("td", {
756
+ ], 14, ut))), 128)),
757
+ s.showOperation ? (M(), w("td", {
752
758
  key: 2,
753
- class: p([d(a).e("cell"), d(a).e("operation-cell")])
759
+ class: p([u(a).e("cell"), u(a).e("operation-cell")])
754
760
  }, [
755
- G(u.$slots, "operation", {
756
- row: m,
757
- $index: h,
758
- deleteRow: () => y(h)
759
- }, () => [
761
+ G(c.$slots, "operation", Ae({
762
+ row: y,
763
+ deleteRow: () => m(h)
764
+ }, { ref_for: !0 }, { $index: h }), () => [
760
765
  A("button", {
761
- class: p(d(a).e("operation-btn")),
762
- onClick: ie((T) => y(h), ["stop"])
763
- }, " 删除 ", 10, ut)
766
+ class: p(u(a).e("operation-btn")),
767
+ onClick: ie((T) => m(h), ["stop"])
768
+ }, " 删除 ", 10, dt)
764
769
  ])
765
770
  ], 2)) : j("", !0)
766
- ], 10, rt))), 128))
771
+ ], 10, it))), 128))
767
772
  ]),
768
- w.value.length === 0 && !s.loading ? (M(), b("tbody", dt, [
773
+ x.value.length === 0 && !s.loading ? (M(), w("tbody", ht, [
769
774
  A("tr", null, [
770
775
  A("td", {
771
776
  colspan: s.columns.length + (s.rowKey ? 1 : 0) + (s.showIndex ? 1 : 0) + (s.showOperation ? 1 : 0),
772
- class: p(d(a).e("empty"))
777
+ class: p(u(a).e("empty"))
773
778
  }, [
774
- G(u.$slots, "empty", {}, () => [
775
- ae(Q(s.emptyText), 1)
779
+ G(c.$slots, "empty", {}, () => [
780
+ ae(U(s.emptyText), 1)
776
781
  ])
777
- ], 10, ht)
782
+ ], 10, ft)
778
783
  ])
779
784
  ])) : j("", !0)
780
785
  ])
781
786
  ], 6)
782
787
  ], 2));
783
788
  }
784
- }), ft = ["draggable"], vt = {
789
+ }), vt = ["draggable"], pt = {
785
790
  key: 0,
786
791
  class: "x-tree-node__loading-icon"
787
- }, pt = {
792
+ }, gt = {
788
793
  key: 0,
789
794
  class: "x-tree-node__expand-arrow"
790
- }, gt = {
795
+ }, mt = {
791
796
  key: 0,
792
797
  class: "x-tree-node__icon"
793
- }, mt = { class: "x-tree-node__label" }, yt = /* @__PURE__ */ Z({
798
+ }, yt = { class: "x-tree-node__label" }, Mt = /* @__PURE__ */ Z({
794
799
  name: "XTreeNode",
795
800
  __name: "tree-node",
796
801
  props: {
797
802
  node: {}
798
803
  },
799
804
  setup(s) {
800
- const r = s, n = ge("tree"), { props: e, store: o, toggleExpand: a, toggleCheck: t, handleNodeClick: l, handleNodeContextmenu: c } = n, k = _(), x = _(null), w = B(() => r.node.expanded), z = B(() => r.node.checked), S = B(() => r.node.indeterminate), V = B(() => r.node.disabled), P = B(() => r.node.loading), W = B(() => r.node.isLeaf), E = B(() => e.showCheckbox || e.checkable), $ = B(() => r.node.selected), K = B(() => ({
805
+ const r = s, n = ge("tree"), { props: e, store: o, toggleExpand: a, toggleCheck: t, handleNodeClick: l, handleNodeContextmenu: i } = n, z = _(), k = _(null), x = $(() => {
806
+ var c;
807
+ return e.highlightCurrent && ((c = n.store) == null ? void 0 : c.currentKey) === r.node.key;
808
+ }), C = $(() => r.node.expanded), S = $(() => r.node.checked), P = $(() => r.node.indeterminate), V = $(() => r.node.disabled), W = $(() => r.node.loading), E = $(() => r.node.isLeaf), B = $(() => e.showCheckbox || e.checkable), H = $(() => r.node.selected), K = $(() => ({
801
809
  paddingLeft: `${r.node.level * (e.indent || 16)}px`
802
- })), N = (i) => {
803
- l(r.node, i);
804
- }, Y = (i) => {
805
- c(r.node, i);
806
- }, ee = (i) => {
807
- i.stopPropagation(), V.value || a(r.node);
808
- }, v = (i) => {
809
- i.stopPropagation(), V.value || t(r.node);
810
- }, C = (i) => {
811
- var u;
810
+ })), Y = (c) => {
811
+ l(r.node, c);
812
+ }, ee = (c) => {
813
+ i(r.node, c);
814
+ }, v = (c) => {
815
+ c.stopPropagation(), V.value || a(r.node);
816
+ }, b = (c) => {
817
+ c.stopPropagation(), V.value || t(r.node);
818
+ }, m = (c) => {
819
+ var d;
812
820
  if (!(!e.draggable || V.value)) {
813
821
  if (e.allowDrag && !e.allowDrag(r.node)) {
814
- i.preventDefault();
822
+ c.preventDefault();
815
823
  return;
816
824
  }
817
- i.dataTransfer.effectAllowed = "move", i.dataTransfer.setData("nodeKey", String(r.node.key)), (u = n.emit) == null || u.call(n, "node-drag-start", r.node, i);
825
+ c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("nodeKey", String(r.node.key)), (d = n.emit) == null || d.call(n, "node-drag-start", r.node, c);
818
826
  }
819
- }, y = (i) => {
820
- var u;
821
- i.preventDefault(), e.draggable && (x.value = "inner", (u = n.emit) == null || u.call(n, "node-drag-enter", r.node, i));
822
- }, D = (i) => {
823
- var u;
824
- x.value = null, (u = n.emit) == null || u.call(n, "node-drag-leave", r.node, i);
825
- }, I = (i) => {
826
- var h, T;
827
- if (i.preventDefault(), !e.draggable || V.value) return;
828
- const u = (h = k.value) == null ? void 0 : h.getBoundingClientRect();
829
- if (!u) return;
830
- const f = i.clientY - u.top, m = u.height;
831
- f < m * 0.25 ? x.value = "prev" : f > m * 0.75 ? x.value = "next" : x.value = "inner", (T = n.emit) == null || T.call(n, "node-drag-over", r.node, i);
832
- }, g = (i) => {
833
- var f, m;
834
- if (i.preventDefault(), !e.draggable) return;
835
- const u = (f = i.dataTransfer) == null ? void 0 : f.getData("nodeKey");
836
- if (u) {
837
- const h = o.nodesMap.get(u);
838
- if (h && x.value) {
839
- if (e.allowDrop && !e.allowDrop(h, r.node, x.value)) {
840
- x.value = null;
827
+ }, D = (c) => {
828
+ var d;
829
+ c.preventDefault(), e.draggable && (k.value = "inner", (d = n.emit) == null || d.call(n, "node-drag-enter", r.node, c));
830
+ }, I = (c) => {
831
+ var d;
832
+ k.value = null, (d = n.emit) == null || d.call(n, "node-drag-leave", r.node, c);
833
+ }, g = (c) => {
834
+ var T, N;
835
+ if (c.preventDefault(), !e.draggable || V.value) return;
836
+ const d = (T = z.value) == null ? void 0 : T.getBoundingClientRect();
837
+ if (!d) return;
838
+ const y = c.clientY - d.top, h = d.height;
839
+ y < h * 0.25 ? k.value = "prev" : y > h * 0.75 ? k.value = "next" : k.value = "inner", (N = n.emit) == null || N.call(n, "node-drag-over", r.node, c);
840
+ }, L = (c) => {
841
+ var y, h;
842
+ if (c.preventDefault(), !e.draggable) return;
843
+ const d = (y = c.dataTransfer) == null ? void 0 : y.getData("nodeKey");
844
+ if (d) {
845
+ const T = o.nodesMap.get(d);
846
+ if (T && k.value) {
847
+ if (e.allowDrop && !e.allowDrop(T, r.node, k.value)) {
848
+ k.value = null;
841
849
  return;
842
850
  }
843
- (m = n.emit) == null || m.call(n, "node-drop", h, r.node, x.value, i);
851
+ (h = n.emit) == null || h.call(n, "node-drop", T, r.node, k.value, c);
844
852
  }
845
853
  }
846
- x.value = null;
847
- }, L = (i) => {
848
- var u;
849
- x.value = null, (u = n.emit) == null || u.call(n, "node-drag-end", r.node, i);
854
+ k.value = null;
855
+ }, f = (c) => {
856
+ var d;
857
+ k.value = null, (d = n.emit) == null || d.call(n, "node-drag-end", r.node, c);
850
858
  };
851
- return (i, u) => {
852
- var m;
853
- const f = Pe("TreeNode", !0);
854
- return ze((M(), b("div", {
859
+ return (c, d) => {
860
+ var h;
861
+ const y = Re("TreeNode", !0);
862
+ return ze((M(), w("div", {
855
863
  ref_key: "nodeRef",
856
- ref: k,
864
+ ref: z,
857
865
  class: p(["x-tree-node", {
858
- "is-expanded": w.value,
859
- "is-current": i.isCurrent,
860
- "is-selected": $.value,
866
+ "is-expanded": C.value,
867
+ "is-current": x.value,
868
+ "is-selected": H.value,
861
869
  "is-disabled": V.value,
862
- "is-drop-inner": x.value === "inner",
863
- "is-drop-prev": x.value === "prev",
864
- "is-drop-next": x.value === "next"
870
+ "is-drop-inner": k.value === "inner",
871
+ "is-drop-prev": k.value === "prev",
872
+ "is-drop-next": k.value === "next"
865
873
  }]),
866
- draggable: d(e).draggable && !V.value,
867
- onDragstart: C,
868
- onDragenter: y,
869
- onDragleave: D,
870
- onDragover: I,
871
- onDrop: g,
872
- onDragend: L
874
+ draggable: u(e).draggable && !V.value,
875
+ onDragstart: m,
876
+ onDragenter: D,
877
+ onDragleave: I,
878
+ onDragover: g,
879
+ onDrop: L,
880
+ onDragend: f
873
881
  }, [
874
882
  A("div", {
875
883
  class: "x-tree-node__content",
876
884
  style: F(K.value),
877
- onClick: N,
878
- onContextmenu: Y
885
+ onClick: Y,
886
+ onContextmenu: ee
879
887
  }, [
880
888
  A("span", {
881
889
  class: p(["x-tree-node__expand-icon", {
882
- "is-expanded": w.value,
883
- "is-leaf": W.value,
884
- "is-loading": P.value
890
+ "is-expanded": C.value,
891
+ "is-leaf": E.value,
892
+ "is-loading": W.value
885
893
  }]),
886
- onClick: ee
894
+ onClick: v
887
895
  }, [
888
- P.value ? (M(), b("span", vt)) : (M(), b(q, { key: 1 }, [
889
- W.value ? j("", !0) : (M(), b("span", pt))
896
+ W.value ? (M(), w("span", pt)) : (M(), w(q, { key: 1 }, [
897
+ E.value ? j("", !0) : (M(), w("span", gt))
890
898
  ], 64))
891
899
  ], 2),
892
- s.node.icon || d(e).icon ? (M(), b("span", gt, Q(s.node.icon || d(e).icon), 1)) : j("", !0),
893
- E.value ? (M(), b("span", {
900
+ s.node.data.icon || u(e).icon ? (M(), w("span", mt, U(s.node.data.icon || u(e).icon), 1)) : j("", !0),
901
+ B.value ? (M(), w("span", {
894
902
  key: 1,
895
903
  class: p(["x-tree-node__checkbox", {
896
- "is-checked": z.value,
897
- "is-indeterminate": S.value,
904
+ "is-checked": S.value,
905
+ "is-indeterminate": P.value,
898
906
  "is-disabled": V.value
899
907
  }]),
900
- onClick: ie(v, ["stop"])
908
+ onClick: ie(b, ["stop"])
901
909
  }, [
902
- z.value ? (M(), re(d(te), {
910
+ S.value ? (M(), re(u(te), {
903
911
  key: 0,
904
912
  name: "check",
905
913
  size: 12,
906
914
  class: "x-tree-node__checkbox-icon"
907
- })) : S.value ? (M(), re(d(te), {
915
+ })) : P.value ? (M(), re(u(te), {
908
916
  key: 1,
909
917
  name: "minus",
910
918
  size: 12,
911
919
  class: "x-tree-node__checkbox-icon"
912
920
  })) : j("", !0)
913
921
  ], 2)) : j("", !0),
914
- A("span", mt, [
915
- G(i.$slots, "default", {
922
+ A("span", yt, [
923
+ G(c.$slots, "default", {
916
924
  node: s.node,
917
925
  data: s.node.data
918
926
  }, () => [
919
- ae(Q(s.node.label), 1)
927
+ ae(U(s.node.label), 1)
920
928
  ])
921
929
  ])
922
930
  ], 36),
923
- !W.value && w.value ? (M(), b("div", {
931
+ !E.value && C.value ? (M(), w("div", {
924
932
  key: 0,
925
- class: p(["x-tree-node__children", { "x-tree-node__children--show-line": d(e).showLine }])
933
+ class: p(["x-tree-node__children", { "x-tree-node__children--show-line": u(e).showLine }])
926
934
  }, [
927
- !d(e).renderAfterExpand || w.value ? (M(!0), b(q, { key: 0 }, le(s.node.children, (h) => (M(), re(f, {
928
- key: h.key,
929
- node: h
935
+ !u(e).renderAfterExpand || C.value ? (M(!0), w(q, { key: 0 }, le(s.node.children, (T) => (M(), re(y, {
936
+ key: T.key,
937
+ node: T
930
938
  }, {
931
- default: Ie((T) => [
932
- G(i.$slots, "default", {
933
- node: T.node,
934
- data: T.data
939
+ default: Ie((N) => [
940
+ G(c.$slots, "default", {
941
+ node: N.node,
942
+ data: N.data
935
943
  })
936
944
  ]),
937
945
  _: 3
938
946
  }, 8, ["node"]))), 128)) : j("", !0)
939
947
  ], 2)) : j("", !0)
940
- ], 42, ft)), [
941
- [$e, s.node.visible && (((m = s.node.parent) == null ? void 0 : m.expanded) ?? !0)]
948
+ ], 42, vt)), [
949
+ [$e, s.node.visible && (((h = s.node.parent) == null ? void 0 : h.expanded) ?? !0)]
942
950
  ]);
943
951
  };
944
952
  }
@@ -946,11 +954,11 @@ const _e = ["aria-hidden", "aria-label"], Ye = ["stroke-width"], Xe = ["d"], te
946
954
  class he {
947
955
  constructor(r, n, e = 0, o = null) {
948
956
  this.data = r, this.store = n, this.level = e, this.parent = o, this.children = [], this.expanded = !1, this.selected = !1, this.checked = !1, this.indeterminate = !1, this.loading = !1, this.visible = !0, this.loaded = !1;
949
- const a = n.props || {}, t = a.value || "value", l = a.label || "label", c = a.disabled || "disabled", k = a.isLeaf || "isLeaf";
950
- this.key = r[t] ?? r.value ?? r.id ?? Math.random().toString(), this.label = r[l] ?? r.label ?? "", this.disabled = r[c] ?? r.disabled ?? !1, this.isLeaf = r[k] ?? r.isLeaf ?? !1;
951
- const x = a.children || "children", w = r[x] ?? r.children ?? [];
952
- w.length > 0 ? this.children = w.map(
953
- (z) => new he(z, n, e + 1, this)
957
+ const a = n.props || {}, t = a.value || "value", l = a.label || "label", i = a.disabled || "disabled", z = a.isLeaf || "isLeaf";
958
+ this.key = r[t] ?? r.value ?? r.id ?? Math.random().toString(), this.label = r[l] ?? r.label ?? "", this.disabled = r[i] ?? r.disabled ?? !1, this.isLeaf = r[z] ?? r.isLeaf ?? !1;
959
+ const k = a.children || "children", x = r[k] ?? r.children ?? [];
960
+ x.length > 0 ? this.children = x.map(
961
+ (C) => new he(C, n, e + 1, this)
954
962
  ) : this.isLeaf = !0;
955
963
  }
956
964
  /** 设置展开状态 */
@@ -1017,10 +1025,11 @@ class he {
1017
1025
  return n(this.children), r;
1018
1026
  }
1019
1027
  }
1020
- const on = /* @__PURE__ */ Z({
1028
+ const sn = /* @__PURE__ */ Z({
1021
1029
  name: "XTree",
1022
1030
  __name: "index",
1023
1031
  props: {
1032
+ filterNodeMethod: {},
1024
1033
  data: { default: () => [] },
1025
1034
  treeData: {},
1026
1035
  emptyText: { default: "暂无数据" },
@@ -1059,7 +1068,7 @@ const on = /* @__PURE__ */ Z({
1059
1068
  },
1060
1069
  emits: ["node-click", "node-contextmenu", "check-change", "check", "current-change", "node-expand", "node-collapse", "node-drag-start", "node-drag-enter", "node-drag-leave", "node-drag-over", "node-drag-end", "node-drop"],
1061
1070
  setup(s, { expose: r, emit: n }) {
1062
- const e = s, o = n, a = J("tree"), t = Be({
1071
+ const e = s, o = n, a = J("tree"), t = Se({
1063
1072
  nodesMap: /* @__PURE__ */ new Map(),
1064
1073
  rootNodes: [],
1065
1074
  expandedKeys: /* @__PURE__ */ new Set(),
@@ -1068,258 +1077,258 @@ const on = /* @__PURE__ */ Z({
1068
1077
  indeterminateKeys: /* @__PURE__ */ new Set(),
1069
1078
  currentKey: null,
1070
1079
  filterValue: ""
1071
- }), l = _(""), c = () => e.fieldNames ? {
1080
+ }), l = _(""), i = () => e.fieldNames ? {
1072
1081
  value: e.fieldNames.key || "value",
1073
1082
  label: e.fieldNames.title || e.fieldNames.key || "label",
1074
1083
  children: e.fieldNames.children || "children",
1075
1084
  disabled: e.fieldNames.disabled || "disabled",
1076
1085
  isLeaf: e.fieldNames.isLeaf || "isLeaf"
1077
- } : e.props, k = () => e.treeData || e.data || [];
1078
- t.props = c();
1079
- const x = (i) => {
1080
- if (t.nodesMap.clear(), t.rootNodes = [], t.checkedKeys.clear(), t.indeterminateKeys.clear(), !i || !i.length) return;
1081
- const u = c(), f = (m, h, T) => {
1082
- const H = new he(m, t, h, T);
1083
- t.nodesMap.set(H.key, H);
1084
- const R = (u == null ? void 0 : u.children) || "children", X = m[R] ?? m.children ?? [];
1085
- return X.length > 0 && (H.children = X.map(
1086
- (O) => f(O, h + 1, H)
1087
- ), H.isLeaf = !1), H;
1086
+ } : e.props, z = () => e.treeData || e.data || [];
1087
+ t.props = i();
1088
+ const k = (f) => {
1089
+ if (t.nodesMap.clear(), t.rootNodes = [], t.checkedKeys.clear(), t.indeterminateKeys.clear(), !f || !f.length) return;
1090
+ const c = i(), d = (y, h, T) => {
1091
+ const N = new he(y, t, h, T);
1092
+ t.nodesMap.set(N.key, N);
1093
+ const R = (c == null ? void 0 : c.children) || "children", X = y[R] ?? y.children ?? [];
1094
+ return X.length > 0 && (N.children = X.map(
1095
+ (O) => d(O, h + 1, N)
1096
+ ), N.isLeaf = !1), N;
1088
1097
  };
1089
- t.rootNodes = i.map((m) => f(m, 0, null)), w();
1090
- }, w = () => {
1091
- var i, u, f;
1092
- e.defaultExpandAll ? z() : (i = e.defaultExpandedKeys) != null && i.length && e.defaultExpandedKeys.forEach((m) => {
1093
- const h = t.nodesMap.get(m);
1094
- h && (h.expanded = !0, t.expandedKeys.add(m));
1095
- }), (u = e.defaultCheckedKeys) != null && u.length && e.defaultCheckedKeys.forEach((m) => {
1096
- const h = t.nodesMap.get(m);
1098
+ t.rootNodes = f.map((y) => d(y, 0, null)), x();
1099
+ }, x = () => {
1100
+ var f, c, d;
1101
+ e.defaultExpandAll ? C() : (f = e.defaultExpandedKeys) != null && f.length && e.defaultExpandedKeys.forEach((y) => {
1102
+ const h = t.nodesMap.get(y);
1103
+ h && (h.expanded = !0, t.expandedKeys.add(y));
1104
+ }), (c = e.defaultCheckedKeys) != null && c.length && e.defaultCheckedKeys.forEach((y) => {
1105
+ const h = t.nodesMap.get(y);
1097
1106
  h && h.setChecked(!0, !e.checkStrictly);
1098
- }), (f = e.checkedKeys) != null && f.length && e.checkedKeys.forEach((m) => {
1099
- const h = t.nodesMap.get(m);
1107
+ }), (d = e.checkedKeys) != null && d.length && e.checkedKeys.forEach((y) => {
1108
+ const h = t.nodesMap.get(y);
1100
1109
  h && h.setChecked(!0, !e.checkStrictly);
1101
1110
  });
1102
- }, z = () => {
1103
- t.nodesMap.forEach((i) => {
1104
- i.children.length > 0 && (i.expanded = !0, t.expandedKeys.add(i.key));
1111
+ }, C = () => {
1112
+ t.nodesMap.forEach((f) => {
1113
+ f.children.length > 0 && (f.expanded = !0, t.expandedKeys.add(f.key));
1105
1114
  });
1106
1115
  }, S = () => {
1107
- t.nodesMap.forEach((i) => {
1108
- i.expanded = !1;
1116
+ t.nodesMap.forEach((f) => {
1117
+ f.expanded = !1;
1109
1118
  }), t.expandedKeys.clear();
1110
- }, V = (i) => {
1111
- if (i.disabled) return;
1112
- !i.expanded ? (i.expanded = !0, t.expandedKeys.add(i.key), o("node-expand", i.data, i, null)) : (i.expanded = !1, t.expandedKeys.delete(i.key), o("node-collapse", i.data, i, null));
1113
- }, P = (i, u) => {
1114
- if (i.disabled) return;
1115
- const f = u ?? !i.checked;
1116
- i.setChecked(f, !e.checkStrictly), o("check-change", i.data, i.checked, i.indeterminate);
1117
- const m = [], h = [], T = [], H = [];
1119
+ }, P = (f) => {
1120
+ if (f.disabled) return;
1121
+ !f.expanded ? (f.expanded = !0, t.expandedKeys.add(f.key), o("node-expand", f.data, f, null)) : (f.expanded = !1, t.expandedKeys.delete(f.key), o("node-collapse", f.data, f, null));
1122
+ }, V = (f, c) => {
1123
+ if (f.disabled) return;
1124
+ const d = c ?? !f.checked;
1125
+ f.setChecked(d, !e.checkStrictly), o("check-change", f.data, f.checked, f.indeterminate);
1126
+ const y = [], h = [], T = [], N = [];
1118
1127
  t.nodesMap.forEach((R) => {
1119
- R.checked && (m.push(R.data), h.push(R.key)), R.indeterminate && (T.push(R.data), H.push(R.key));
1120
- }), o("check", i.data, {
1121
- checkedNodes: m,
1128
+ R.checked && (y.push(R.data), h.push(R.key)), R.indeterminate && (T.push(R.data), N.push(R.key));
1129
+ }), o("check", f.data, {
1130
+ checkedNodes: y,
1122
1131
  checkedKeys: h,
1123
1132
  halfCheckedNodes: T,
1124
- halfCheckedKeys: H
1133
+ halfCheckedKeys: N
1125
1134
  });
1126
- }, W = (i, u) => {
1127
- i.disabled || (o("node-click", i.data, i, null), e.expandOnClickNode && i.children.length > 0 && V(i), e.highlightCurrent && (t.currentKey = i.key, o("current-change", i.data, i)));
1128
- }, E = (i) => {
1129
- if (l.value = i, t.filterValue = i, !i) {
1130
- t.nodesMap.forEach((u) => {
1131
- u.visible = !0;
1135
+ }, W = (f, c) => {
1136
+ f.disabled || (o("node-click", f.data, f, null), e.expandOnClickNode && f.children.length > 0 && P(f), e.highlightCurrent && (t.currentKey = f.key, o("current-change", f.data, f)));
1137
+ }, E = (f) => {
1138
+ if (l.value = f, t.filterValue = f, !f) {
1139
+ t.nodesMap.forEach((c) => {
1140
+ c.visible = !0;
1132
1141
  });
1133
1142
  return;
1134
1143
  }
1135
- t.nodesMap.forEach((u) => {
1136
- const f = u.label || "";
1137
- u.visible = String(f).toLowerCase().includes(i.toLowerCase());
1138
- }), t.nodesMap.forEach((u) => {
1139
- if (u.visible && u.parent) {
1140
- let f = u.parent;
1141
- for (; f; )
1142
- f.visible = !0, f.expanded = !0, t.expandedKeys.add(f.key), f = f.parent;
1144
+ t.nodesMap.forEach((c) => {
1145
+ const d = c.label || "";
1146
+ c.visible = String(d).toLowerCase().includes(f.toLowerCase());
1147
+ }), t.nodesMap.forEach((c) => {
1148
+ if (c.visible && c.parent) {
1149
+ let d = c.parent;
1150
+ for (; d; )
1151
+ d.visible = !0, d.expanded = !0, t.expandedKeys.add(d.key), d = d.parent;
1143
1152
  }
1144
1153
  });
1145
- }, $ = (i) => t.nodesMap.get(i), K = (i) => {
1146
- t.currentKey = i;
1147
- }, N = () => {
1154
+ }, B = (f) => t.nodesMap.get(f), H = (f) => {
1155
+ t.currentKey = f;
1156
+ }, K = () => {
1148
1157
  if (t.currentKey)
1149
1158
  return t.nodesMap.get(t.currentKey);
1150
- }, Y = (i = !1) => {
1151
- const u = [];
1152
- return t.nodesMap.forEach((f) => {
1153
- f.checked && (!i || f.isLeaf) && u.push(f.data);
1154
- }), u;
1155
- }, ee = (i = !1) => {
1156
- const u = [];
1157
- return t.nodesMap.forEach((f) => {
1158
- f.checked && (!i || f.isLeaf) && u.push(f.key);
1159
- }), u;
1160
- }, v = (i) => {
1161
- t.nodesMap.forEach((u) => {
1162
- u.checked = !1, u.indeterminate = !1;
1163
- }), t.checkedKeys.clear(), t.indeterminateKeys.clear(), i.forEach((u) => {
1164
- const f = t.nodesMap.get(u);
1165
- f && f.setChecked(!0, !e.checkStrictly);
1159
+ }, Y = (f = !1) => {
1160
+ const c = [];
1161
+ return t.nodesMap.forEach((d) => {
1162
+ d.checked && (!f || d.isLeaf) && c.push(d.data);
1163
+ }), c;
1164
+ }, ee = (f = !1) => {
1165
+ const c = [];
1166
+ return t.nodesMap.forEach((d) => {
1167
+ d.checked && (!f || d.isLeaf) && c.push(d.key);
1168
+ }), c;
1169
+ }, v = (f) => {
1170
+ t.nodesMap.forEach((c) => {
1171
+ c.checked = !1, c.indeterminate = !1;
1172
+ }), t.checkedKeys.clear(), t.indeterminateKeys.clear(), f.forEach((c) => {
1173
+ const d = t.nodesMap.get(c);
1174
+ d && d.setChecked(!0, !e.checkStrictly);
1166
1175
  });
1167
- }, C = () => {
1168
- const i = [];
1169
- return t.nodesMap.forEach((u) => {
1170
- u.indeterminate && i.push(u.data);
1171
- }), i;
1172
- }, y = () => {
1173
- const i = [];
1174
- return t.nodesMap.forEach((u) => {
1175
- u.indeterminate && i.push(u.key);
1176
- }), i;
1177
- }, D = (i, u, f = !0) => {
1178
- const m = t.nodesMap.get(i);
1179
- m && m.setChecked(u, f && !e.checkStrictly);
1176
+ }, b = () => {
1177
+ const f = [];
1178
+ return t.nodesMap.forEach((c) => {
1179
+ c.indeterminate && f.push(c.data);
1180
+ }), f;
1181
+ }, m = () => {
1182
+ const f = [];
1183
+ return t.nodesMap.forEach((c) => {
1184
+ c.indeterminate && f.push(c.key);
1185
+ }), f;
1186
+ }, D = (f, c, d = !0) => {
1187
+ const y = t.nodesMap.get(f);
1188
+ y && y.setChecked(c, d && !e.checkStrictly);
1180
1189
  }, I = () => {
1181
- const i = [];
1182
- return t.nodesMap.forEach((u) => {
1183
- u.selected && i.push(u.data);
1184
- }), i;
1185
- }, g = (i) => {
1186
- t.nodesMap.forEach((u) => {
1187
- u.selected = !1;
1188
- }), t.selectedKeys.clear(), i.forEach((u) => {
1189
- const f = t.nodesMap.get(u);
1190
- f && (f.selected = !0, t.selectedKeys.add(u));
1190
+ const f = [];
1191
+ return t.nodesMap.forEach((c) => {
1192
+ c.selected && f.push(c.data);
1193
+ }), f;
1194
+ }, g = (f) => {
1195
+ t.nodesMap.forEach((c) => {
1196
+ c.selected = !1;
1197
+ }), t.selectedKeys.clear(), f.forEach((c) => {
1198
+ const d = t.nodesMap.get(c);
1199
+ d && (d.selected = !0, t.selectedKeys.add(c));
1191
1200
  });
1192
- }, L = B(() => e.showCheckbox || e.checkable);
1201
+ }, L = $(() => e.showCheckbox || e.checkable);
1193
1202
  return ve("tree", {
1194
1203
  props: e,
1195
1204
  store: t,
1196
1205
  emit: o,
1197
- toggleExpand: V,
1198
- toggleCheck: P,
1206
+ toggleExpand: P,
1207
+ toggleCheck: V,
1199
1208
  handleNodeClick: W,
1200
- filterValue: Re(l),
1209
+ filterValue: je(l),
1201
1210
  showCheckboxComputed: L
1202
1211
  }), r({
1203
1212
  filter: E,
1204
- getNode: $,
1205
- setCurrentKey: K,
1213
+ getNode: B,
1214
+ setCurrentKey: H,
1206
1215
  getCurrentKey: () => t.currentKey,
1207
- getCurrentNode: N,
1216
+ getCurrentNode: K,
1208
1217
  getCheckedNodes: Y,
1209
1218
  getCheckedKeys: ee,
1210
1219
  setCheckedKeys: v,
1211
- getHalfCheckedNodes: C,
1212
- getHalfCheckedKeys: y,
1220
+ getHalfCheckedNodes: b,
1221
+ getHalfCheckedKeys: m,
1213
1222
  setChecked: D,
1214
1223
  getSelectedNodes: I,
1215
1224
  setSelectedKeys: g,
1216
- expandAll: z,
1225
+ expandAll: C,
1217
1226
  collapseAll: S,
1218
1227
  // 额外方法
1219
- updateKeyChildren: (i, u) => {
1220
- const f = t.nodesMap.get(i);
1221
- f && (f.children.forEach((m) => {
1222
- t.nodesMap.delete(m.key);
1223
- }), f.children = u.map((m) => {
1224
- const h = new he(m, t, f.level + 1, f);
1228
+ updateKeyChildren: (f, c) => {
1229
+ const d = t.nodesMap.get(f);
1230
+ d && (d.children.forEach((y) => {
1231
+ t.nodesMap.delete(y.key);
1232
+ }), d.children = c.map((y) => {
1233
+ const h = new he(y, t, d.level + 1, d);
1225
1234
  return t.nodesMap.set(h.key, h), h;
1226
- }), f.isLeaf = f.children.length === 0);
1235
+ }), d.isLeaf = d.children.length === 0);
1227
1236
  },
1228
- remove: (i) => {
1229
- const u = t.nodesMap.get(i);
1230
- if (u) {
1231
- const f = u.parent;
1232
- if (f) {
1233
- const h = f.children.indexOf(u);
1234
- h > -1 && f.children.splice(h, 1), f.children.length === 0 && (f.isLeaf = !0);
1237
+ remove: (f) => {
1238
+ const c = t.nodesMap.get(f);
1239
+ if (c) {
1240
+ const d = c.parent;
1241
+ if (d) {
1242
+ const h = d.children.indexOf(c);
1243
+ h > -1 && d.children.splice(h, 1), d.children.length === 0 && (d.isLeaf = !0);
1235
1244
  } else {
1236
- const h = t.rootNodes.indexOf(u);
1245
+ const h = t.rootNodes.indexOf(c);
1237
1246
  h > -1 && t.rootNodes.splice(h, 1);
1238
1247
  }
1239
- const m = (h) => {
1240
- t.nodesMap.delete(h.key), h.children.forEach(m);
1248
+ const y = (h) => {
1249
+ t.nodesMap.delete(h.key), h.children.forEach(y);
1241
1250
  };
1242
- m(u);
1251
+ y(c);
1243
1252
  }
1244
1253
  },
1245
- append: (i, u) => {
1246
- if (u) {
1247
- const f = t.nodesMap.get(u);
1248
- if (f) {
1249
- const m = new he(i, t, f.level + 1, f);
1250
- t.nodesMap.set(m.key, m), f.children.push(m), f.isLeaf = !1;
1254
+ append: (f, c) => {
1255
+ if (c) {
1256
+ const d = t.nodesMap.get(c);
1257
+ if (d) {
1258
+ const y = new he(f, t, d.level + 1, d);
1259
+ t.nodesMap.set(y.key, y), d.children.push(y), d.isLeaf = !1;
1251
1260
  }
1252
1261
  } else {
1253
- const f = new he(i, t, 0, null);
1254
- t.nodesMap.set(f.key, f), t.rootNodes.push(f);
1262
+ const d = new he(f, t, 0, null);
1263
+ t.nodesMap.set(d.key, d), t.rootNodes.push(d);
1255
1264
  }
1256
1265
  },
1257
- insertBefore: (i, u) => {
1258
- var m;
1259
- const f = t.nodesMap.get(u);
1260
- if (f) {
1261
- const h = new he(i, t, f.level, f.parent);
1266
+ insertBefore: (f, c) => {
1267
+ var y;
1268
+ const d = t.nodesMap.get(c);
1269
+ if (d) {
1270
+ const h = new he(f, t, d.level, d.parent);
1262
1271
  t.nodesMap.set(h.key, h);
1263
- const T = ((m = f.parent) == null ? void 0 : m.children) || t.rootNodes, H = T.indexOf(f);
1264
- T.splice(H, 0, h);
1272
+ const T = ((y = d.parent) == null ? void 0 : y.children) || t.rootNodes, N = T.indexOf(d);
1273
+ T.splice(N, 0, h);
1265
1274
  }
1266
1275
  },
1267
- insertAfter: (i, u) => {
1268
- var m;
1269
- const f = t.nodesMap.get(u);
1270
- if (f) {
1271
- const h = new he(i, t, f.level, f.parent);
1276
+ insertAfter: (f, c) => {
1277
+ var y;
1278
+ const d = t.nodesMap.get(c);
1279
+ if (d) {
1280
+ const h = new he(f, t, d.level, d.parent);
1272
1281
  t.nodesMap.set(h.key, h);
1273
- const T = ((m = f.parent) == null ? void 0 : m.children) || t.rootNodes, H = T.indexOf(f);
1274
- T.splice(H + 1, 0, h);
1282
+ const T = ((y = d.parent) == null ? void 0 : y.children) || t.rootNodes, N = T.indexOf(d);
1283
+ T.splice(N + 1, 0, h);
1275
1284
  }
1276
1285
  }
1277
1286
  }), se(
1278
1287
  () => [e.treeData, e.data],
1279
1288
  () => {
1280
- x(k());
1289
+ k(z());
1281
1290
  },
1282
1291
  { immediate: !0, deep: !0 }
1283
1292
  ), se(
1284
1293
  () => e.checkedKeys,
1285
- (i) => {
1286
- i && v(i);
1294
+ (f) => {
1295
+ f && v(f);
1287
1296
  },
1288
1297
  { immediate: !0, deep: !0 }
1289
1298
  ), se(
1290
1299
  () => e.defaultCheckedKeys,
1291
- (i) => {
1292
- i && i.length > 0 && !e.checkedKeys && v(i);
1300
+ (f) => {
1301
+ f && f.length > 0 && !e.checkedKeys && v(f);
1293
1302
  },
1294
1303
  { immediate: !0, deep: !0 }
1295
- ), (i, u) => (M(), b("div", {
1296
- class: p([d(a).b(), d(a).m(s.size)])
1304
+ ), (f, c) => (M(), w("div", {
1305
+ class: p([u(a).b(), u(a).m(s.size)])
1297
1306
  }, [
1298
- (M(!0), b(q, null, le(t.rootNodes, (f) => (M(), re(yt, {
1299
- key: f.key,
1300
- node: f
1307
+ (M(!0), w(q, null, le(t.rootNodes, (d) => (M(), re(Mt, {
1308
+ key: d.key,
1309
+ node: d
1301
1310
  }, {
1302
- default: Ie((m) => [
1303
- G(i.$slots, "default", {
1304
- node: m.node,
1305
- data: m.data
1311
+ default: Ie((y) => [
1312
+ G(f.$slots, "default", {
1313
+ node: y.node,
1314
+ data: y.data
1306
1315
  }, () => [
1307
- ae(Q(m.node.label), 1)
1316
+ ae(U(y.node.label), 1)
1308
1317
  ])
1309
1318
  ]),
1310
1319
  _: 2
1311
1320
  }, 1032, ["node"]))), 128)),
1312
- t.rootNodes.length ? j("", !0) : (M(), b("div", {
1321
+ t.rootNodes.length ? j("", !0) : (M(), w("div", {
1313
1322
  key: 0,
1314
- class: p(d(a).e("empty"))
1323
+ class: p(u(a).e("empty"))
1315
1324
  }, [
1316
- G(i.$slots, "empty", {}, () => [
1317
- ae(Q(s.emptyText), 1)
1325
+ G(f.$slots, "empty", {}, () => [
1326
+ ae(U(s.emptyText), 1)
1318
1327
  ])
1319
1328
  ], 2))
1320
1329
  ], 2));
1321
1330
  }
1322
- }), Mt = ["src"], kt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiLz4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk5LjM5NCA0OC4xNjJsMCAyMS41MTYgMjIuNjQgMjIuNjQ0IDAtMjIuNjQ0em0tMjIuNjQgMjIuNjQ0TDc2Ljk5OCA3MC43OThsMCAyMS41MTYgMjIuMzk2IDIyLjM5NiAwLTIyLjM5NnoiIGZpbGw9IiNFRkVGRkYiLz4KICAgICAgPHBhdGggZD0iTTk5LjM5NCA0OC4xNjJsLTIyLjM5NiAyMi42MzYgMjIuMzk2IDIxLjUyIDAtNDQuMTU2eiIgZmlsbD0iI0YyRjZGQyIvPgogICAgICA8cGF0aCBkPSJNMTIxLjk3OCA2OS42NzRMOTkuMzk0IDkyLjI1OGwzLjE2OCAzLjE2OCAyMi41ODQtMjIuNTg0LTMuMTY4LTMuMTY4eiIgZmlsbD0iI0M3Q0NEQyIvPgogICAgICA8cGF0aCBkPSJNOTkuMzk0IDkyLjI1OEw3Ni44MSA2OS42NzRsMy4xNjgtMy4xNjggMjIuNTg0IDIyLjU4NC0zLjE2OCAzLjE2OHoiIGZpbGw9IiNDN0NEREMiLz4KICAgIDwvZz4KICAgIDxwYXRoIGQ9Ik0xNDcuODU3IDMxLjY3bC0zLjI5Mi0zLjI5MmEyLjUgMi41IDAgMCAwLTMuNTM2IDBsLTEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDAgMCA0Ljk1bDMuMjkzIDMuMjkyYTMuNSAzLjUgMCAwIDAgNC45NSAwbDEzLjQ2LTEzLjQ2YTIuNSAyLjUgMCAwIDAgMC0zLjUzNnoiIGZpbGw9IiNENkRCRUMiLz4KICAgIDxwYXRoIGQ9Ik0zNi4xNDMgMzEuNjdsMy4yOTItMy4yOTJhMi41IDIuNSAwIDAgMSAzLjUzNiAwbDEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDEgMCA0Ljk1bC0zLjI5MyAzLjI5MmEzLjUgMy41IDAgMCAxLTQuOTUgMEwzNi4xNDMgMzUuMmEyLjUgMi41IDAgMCAxIDAtMy41MzZ6IiBmaWxsPSIjRDZEQkVDIi8+CiAgICA8Y2lyY2xlIGZpbGw9IiNFQUVFRjQiIGN4PSI5MiIgY3k9IjgiIHI9IjgiLz4KICA8L2c+Cjwvc3ZnPg==", sn = /* @__PURE__ */ Z({
1331
+ }), kt = ["src"], wt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiLz4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk5LjM5NCA0OC4xNjJsMCAyMS41MTYgMjIuNjQgMjIuNjQ0IDAtMjIuNjQ0em0tMjIuNjQgMjIuNjQ0TDc2Ljk5OCA3MC43OThsMCAyMS41MTYgMjIuMzk2IDIyLjM5NiAwLTIyLjM5NnoiIGZpbGw9IiNFRkVGRkYiLz4KICAgICAgPHBhdGggZD0iTTk5LjM5NCA0OC4xNjJsLTIyLjM5NiAyMi42MzYgMjIuMzk2IDIxLjUyIDAtNDQuMTU2eiIgZmlsbD0iI0YyRjZGQyIvPgogICAgICA8cGF0aCBkPSJNMTIxLjk3OCA2OS42NzRMOTkuMzk0IDkyLjI1OGwzLjE2OCAzLjE2OCAyMi41ODQtMjIuNTg0LTMuMTY4LTMuMTY4eiIgZmlsbD0iI0M3Q0NEQyIvPgogICAgICA8cGF0aCBkPSJNOTkuMzk0IDkyLjI1OEw3Ni44MSA2OS42NzRsMy4xNjgtMy4xNjggMjIuNTg0IDIyLjU4NC0zLjE2OCAzLjE2OHoiIGZpbGw9IiNDN0NEREMiLz4KICAgIDwvZz4KICAgIDxwYXRoIGQ9Ik0xNDcuODU3IDMxLjY3bC0zLjI5Mi0zLjI5MmEyLjUgMi41IDAgMCAwLTMuNTM2IDBsLTEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDAgMCA0Ljk1bDMuMjkzIDMuMjkyYTMuNSAzLjUgMCAwIDAgNC45NSAwbDEzLjQ2LTEzLjQ2YTIuNSAyLjUgMCAwIDAgMC0zLjUzNnoiIGZpbGw9IiNENkRCRUMiLz4KICAgIDxwYXRoIGQ9Ik0zNi4xNDMgMzEuNjdsMy4yOTItMy4yOTJhMi41IDIuNSAwIDAgMSAzLjUzNiAwbDEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDEgMCA0Ljk1bC0zLjI5MyAzLjI5MmEzLjUgMy41IDAgMCAxLTQuOTUgMEwzNi4xNDMgMzUuMmEyLjUgMi41IDAgMCAxIDAtMy41MzZ6IiBmaWxsPSIjRDZEQkVDIi8+CiAgICA8Y2lyY2xlIGZpbGw9IiNFQUVFRjQiIGN4PSI5MiIgY3k9IjgiIHI9IjgiLz4KICA8L2c+Cjwvc3ZnPg==", rn = /* @__PURE__ */ Z({
1323
1332
  name: "XEmpty",
1324
1333
  __name: "index",
1325
1334
  props: {
@@ -1329,47 +1338,47 @@ const on = /* @__PURE__ */ Z({
1329
1338
  size: { default: "default" }
1330
1339
  },
1331
1340
  setup(s) {
1332
- const r = s, n = J("empty"), e = B(() => {
1341
+ const r = s, n = J("empty"), e = $(() => {
1333
1342
  const a = {};
1334
1343
  return r.imageSize && (a.height = `${r.imageSize}px`, a.width = `${r.imageSize}px`), a;
1335
- }), o = B(() => r.description || "暂无数据");
1336
- return (a, t) => (M(), b("div", {
1337
- class: p([d(n).b(), d(n).m(s.size)])
1344
+ }), o = $(() => r.description || "暂无数据");
1345
+ return (a, t) => (M(), w("div", {
1346
+ class: p([u(n).b(), u(n).m(s.size)])
1338
1347
  }, [
1339
1348
  A("div", {
1340
- class: p(d(n).e("image")),
1349
+ class: p(u(n).e("image")),
1341
1350
  style: F(e.value)
1342
1351
  }, [
1343
1352
  G(a.$slots, "image", {}, () => [
1344
- s.image ? (M(), b("img", {
1353
+ s.image ? (M(), w("img", {
1345
1354
  key: 0,
1346
1355
  src: s.image,
1347
1356
  style: F(e.value),
1348
1357
  draggable: "false"
1349
- }, null, 12, Mt)) : (M(), b("img", {
1358
+ }, null, 12, kt)) : (M(), w("img", {
1350
1359
  key: 1,
1351
- src: kt,
1360
+ src: wt,
1352
1361
  style: F(e.value),
1353
1362
  draggable: "false"
1354
1363
  }, null, 4))
1355
1364
  ])
1356
1365
  ], 6),
1357
1366
  A("div", {
1358
- class: p(d(n).e("description"))
1367
+ class: p(u(n).e("description"))
1359
1368
  }, [
1360
1369
  G(a.$slots, "description", {}, () => [
1361
- A("p", null, Q(o.value), 1)
1370
+ A("p", null, U(o.value), 1)
1362
1371
  ])
1363
1372
  ], 2),
1364
- a.$slots.default ? (M(), b("div", {
1373
+ a.$slots.default ? (M(), w("div", {
1365
1374
  key: 0,
1366
- class: p(d(n).e("bottom"))
1375
+ class: p(u(n).e("bottom"))
1367
1376
  }, [
1368
1377
  G(a.$slots, "default")
1369
1378
  ], 2)) : j("", !0)
1370
1379
  ], 2));
1371
1380
  }
1372
- }), rn = /* @__PURE__ */ Z({
1381
+ }), cn = /* @__PURE__ */ Z({
1373
1382
  name: "XTimeline",
1374
1383
  __name: "index",
1375
1384
  props: {
@@ -1380,18 +1389,18 @@ const on = /* @__PURE__ */ Z({
1380
1389
  ve("timeline", {
1381
1390
  props: r
1382
1391
  });
1383
- const e = B(() => [
1392
+ const e = $(() => [
1384
1393
  n.b(),
1385
1394
  n.m(r.direction)
1386
1395
  ]);
1387
- return (o, a) => (M(), b("ul", {
1396
+ return (o, a) => (M(), w("ul", {
1388
1397
  class: p(e.value),
1389
1398
  role: "timeline"
1390
1399
  }, [
1391
1400
  G(o.$slots, "default")
1392
1401
  ], 2));
1393
1402
  }
1394
- }), cn = /* @__PURE__ */ Z({
1403
+ }), un = /* @__PURE__ */ Z({
1395
1404
  name: "XTimelineItem",
1396
1405
  __name: "TimelineItem",
1397
1406
  props: {
@@ -1409,45 +1418,45 @@ const on = /* @__PURE__ */ Z({
1409
1418
  warning: "#FF7D00",
1410
1419
  danger: "#F53F3F",
1411
1420
  info: "#86909C"
1412
- }, o = B(() => {
1421
+ }, o = $(() => {
1413
1422
  const t = {};
1414
1423
  return r.color ? t.backgroundColor = r.color : r.type && e[r.type] && (t.backgroundColor = e[r.type]), t;
1415
- }), a = B(() => [
1424
+ }), a = $(() => [
1416
1425
  n.b(),
1417
1426
  n.m(r.size)
1418
1427
  ]);
1419
- return (t, l) => (M(), b("li", {
1428
+ return (t, l) => (M(), w("li", {
1420
1429
  class: p(a.value)
1421
1430
  }, [
1422
1431
  A("div", {
1423
- class: p(d(n).e("node")),
1432
+ class: p(u(n).e("node")),
1424
1433
  style: F(o.value)
1425
1434
  }, [
1426
1435
  G(t.$slots, "dot")
1427
1436
  ], 6),
1428
1437
  A("div", {
1429
- class: p(d(n).e("tail"))
1438
+ class: p(u(n).e("tail"))
1430
1439
  }, null, 2),
1431
1440
  A("div", {
1432
- class: p(d(n).e("wrapper"))
1441
+ class: p(u(n).e("wrapper"))
1433
1442
  }, [
1434
- !s.hideTimestamp && s.timestamp && s.placement === "top" ? (M(), b("div", {
1443
+ !s.hideTimestamp && s.timestamp && s.placement === "top" ? (M(), w("div", {
1435
1444
  key: 0,
1436
- class: p(d(n).e("timestamp"))
1437
- }, Q(s.timestamp), 3)) : j("", !0),
1445
+ class: p(u(n).e("timestamp"))
1446
+ }, U(s.timestamp), 3)) : j("", !0),
1438
1447
  A("div", {
1439
- class: p(d(n).e("content"))
1448
+ class: p(u(n).e("content"))
1440
1449
  }, [
1441
1450
  G(t.$slots, "default")
1442
1451
  ], 2),
1443
- !s.hideTimestamp && s.timestamp && s.placement === "bottom" ? (M(), b("div", {
1452
+ !s.hideTimestamp && s.timestamp && s.placement === "bottom" ? (M(), w("div", {
1444
1453
  key: 1,
1445
- class: p(d(n).e("timestamp"))
1446
- }, Q(s.timestamp), 3)) : j("", !0)
1454
+ class: p(u(n).e("timestamp"))
1455
+ }, U(s.timestamp), 3)) : j("", !0)
1447
1456
  ], 2)
1448
1457
  ], 2));
1449
1458
  }
1450
- }), wt = ["onMouseenter", "onClick"], un = /* @__PURE__ */ Z({
1459
+ }), xt = ["onMouseenter", "onClick"], dn = /* @__PURE__ */ Z({
1451
1460
  name: "XCarousel",
1452
1461
  __name: "index",
1453
1462
  props: {
@@ -1462,35 +1471,35 @@ const on = /* @__PURE__ */ Z({
1462
1471
  },
1463
1472
  emits: ["update:activeIndex", "change"],
1464
1473
  setup(s, { expose: r, emit: n }) {
1465
- const e = s, o = n, a = J("carousel"), t = _(e.activeIndex), l = _(0), c = _(null), k = _(!1);
1474
+ const e = s, o = n, a = J("carousel"), t = _(e.activeIndex), l = _(0), i = _(null), z = _(!1);
1466
1475
  ve("carousel", {
1467
1476
  currentIndex: t,
1468
1477
  itemCount: l
1469
1478
  });
1470
- const x = (Y) => {
1479
+ const k = (Y) => {
1471
1480
  const ee = t.value;
1472
1481
  e.loop ? t.value = (Y + l.value) % l.value : t.value = Math.max(0, Math.min(Y, l.value - 1)), o("update:activeIndex", t.value), o("change", t.value, ee);
1473
- }, w = () => {
1474
- x(t.value - 1);
1475
- }, z = () => {
1476
- x(t.value + 1);
1482
+ }, x = () => {
1483
+ k(t.value - 1);
1484
+ }, C = () => {
1485
+ k(t.value + 1);
1477
1486
  }, S = () => {
1478
- e.autoplay && l.value > 1 && (V(), c.value = setInterval(() => {
1479
- k.value || z();
1487
+ e.autoplay && l.value > 1 && (P(), i.value = setInterval(() => {
1488
+ z.value || C();
1480
1489
  }, e.interval));
1481
- }, V = () => {
1482
- c.value && (clearInterval(c.value), c.value = null);
1483
1490
  }, P = () => {
1484
- k.value = !0, e.arrow;
1491
+ i.value && (clearInterval(i.value), i.value = null);
1492
+ }, V = () => {
1493
+ z.value = !0, e.arrow;
1485
1494
  }, W = () => {
1486
- k.value = !1;
1495
+ z.value = !1;
1487
1496
  }, E = (Y) => {
1488
- e.trigger === "hover" && x(Y);
1489
- }, $ = (Y) => {
1490
- e.trigger === "click" && x(Y);
1491
- }, K = B(() => ({
1497
+ e.trigger === "hover" && k(Y);
1498
+ }, B = (Y) => {
1499
+ e.trigger === "click" && k(Y);
1500
+ }, H = $(() => ({
1492
1501
  height: typeof e.height == "number" ? `${e.height}px` : e.height
1493
- })), N = B(() => [
1502
+ })), K = $(() => [
1494
1503
  a.b(),
1495
1504
  a.m(`arrow-${e.arrow}`),
1496
1505
  a.m(`indicator-${e.indicatorPosition}`)
@@ -1500,56 +1509,56 @@ const on = /* @__PURE__ */ Z({
1500
1509
  }), se(() => e.autoplay, () => {
1501
1510
  S();
1502
1511
  }), se(l, () => {
1503
- Se(() => {
1512
+ Ee(() => {
1504
1513
  S();
1505
1514
  });
1506
1515
  }), pe(() => {
1507
1516
  S();
1508
1517
  }), me(() => {
1509
- V();
1518
+ P();
1510
1519
  }), r({
1511
- prev: w,
1512
- next: z,
1513
- setActiveItem: x
1514
- }), (Y, ee) => (M(), b("div", {
1515
- class: p(N.value),
1516
- style: F(K.value),
1517
- onMouseenter: P,
1520
+ prev: x,
1521
+ next: C,
1522
+ setActiveItem: k
1523
+ }), (Y, ee) => (M(), w("div", {
1524
+ class: p(K.value),
1525
+ style: F(H.value),
1526
+ onMouseenter: V,
1518
1527
  onMouseleave: W
1519
1528
  }, [
1520
1529
  A("div", {
1521
- class: p(d(a).e("container"))
1530
+ class: p(u(a).e("container"))
1522
1531
  }, [
1523
1532
  G(Y.$slots, "default")
1524
1533
  ], 2),
1525
- s.arrow !== "never" ? (M(), b("button", {
1534
+ s.arrow !== "never" ? (M(), w("button", {
1526
1535
  key: 0,
1527
- class: p([d(a).e("arrow"), d(a).e("arrow-left")]),
1528
- onClick: w
1536
+ class: p([u(a).e("arrow"), u(a).e("arrow-left")]),
1537
+ onClick: x
1529
1538
  }, " ‹ ", 2)) : j("", !0),
1530
- s.arrow !== "never" ? (M(), b("button", {
1539
+ s.arrow !== "never" ? (M(), w("button", {
1531
1540
  key: 1,
1532
- class: p([d(a).e("arrow"), d(a).e("arrow-right")]),
1533
- onClick: z
1541
+ class: p([u(a).e("arrow"), u(a).e("arrow-right")]),
1542
+ onClick: C
1534
1543
  }, " › ", 2)) : j("", !0),
1535
- s.indicatorPosition !== "none" ? (M(), b("ul", {
1544
+ s.indicatorPosition !== "none" ? (M(), w("ul", {
1536
1545
  key: 2,
1537
- class: p(d(a).e("indicators"))
1546
+ class: p(u(a).e("indicators"))
1538
1547
  }, [
1539
- (M(!0), b(q, null, le(l.value, (v) => (M(), b("li", {
1548
+ (M(!0), w(q, null, le(l.value, (v) => (M(), w("li", {
1540
1549
  key: v,
1541
- class: p([d(a).e("indicator"), d(a).is("active", v - 1 === t.value)]),
1542
- onMouseenter: (C) => E(v - 1),
1543
- onClick: (C) => $(v - 1)
1550
+ class: p([u(a).e("indicator"), u(a).is("active", v - 1 === t.value)]),
1551
+ onMouseenter: (b) => E(v - 1),
1552
+ onClick: (b) => B(v - 1)
1544
1553
  }, [
1545
1554
  A("button", {
1546
- class: p(d(a).e("indicator-btn"))
1555
+ class: p(u(a).e("indicator-btn"))
1547
1556
  }, null, 2)
1548
- ], 42, wt))), 128))
1557
+ ], 42, xt))), 128))
1549
1558
  ], 2)) : j("", !0)
1550
1559
  ], 38));
1551
1560
  }
1552
- }), dn = /* @__PURE__ */ Z({
1561
+ }), hn = /* @__PURE__ */ Z({
1553
1562
  name: "XCarouselItem",
1554
1563
  __name: "CarouselItem",
1555
1564
  setup(s) {
@@ -1559,17 +1568,17 @@ const on = /* @__PURE__ */ Z({
1559
1568
  }), me(() => {
1560
1569
  n && n.itemCount.value--;
1561
1570
  });
1562
- const o = B(() => n && e.value === n.currentIndex.value), a = B(() => [
1571
+ const o = $(() => n && e.value === n.currentIndex.value), a = $(() => [
1563
1572
  r.b(),
1564
1573
  r.is("active", o.value)
1565
1574
  ]);
1566
- return (t, l) => (M(), b("div", {
1575
+ return (t, l) => (M(), w("div", {
1567
1576
  class: p(a.value)
1568
1577
  }, [
1569
1578
  G(t.$slots, "default")
1570
1579
  ], 2));
1571
1580
  }
1572
- }), xt = { key: 0 }, bt = ["onClick"], Ct = { class: "sort-arrow up" }, zt = { class: "sort-arrow down" }, It = ["onClick"], At = ["onClick"], Dt = { key: 1 }, Lt = ["colspan"], Tt = { style: { display: "none" } }, hn = /* @__PURE__ */ Z({
1581
+ }), bt = { key: 0 }, Ct = ["onClick"], zt = { class: "sort-arrow up" }, It = { class: "sort-arrow down" }, At = ["onClick"], Dt = ["onClick"], Lt = { key: 1 }, Tt = ["colspan"], Bt = { style: { display: "none" } }, fn = /* @__PURE__ */ Z({
1573
1582
  name: "XTable",
1574
1583
  __name: "index",
1575
1584
  props: {
@@ -1587,98 +1596,98 @@ const on = /* @__PURE__ */ Z({
1587
1596
  },
1588
1597
  emits: ["sort-change", "row-click", "row-dblclick", "cell-click", "selection-change", "select-all", "page-change", "size-change"],
1589
1598
  setup(s, { expose: r, emit: n }) {
1590
- var f, m;
1599
+ var d, y;
1591
1600
  const e = s, o = n, a = J("table");
1592
1601
  be();
1593
- const t = Be([]);
1602
+ const t = Se([]);
1594
1603
  ve("x-table", {
1595
1604
  registerColumn: (h, T) => {
1596
1605
  t.findIndex((R) => R.config.prop === h.prop) === -1 && t.push({ config: h, slot: T });
1597
1606
  },
1598
1607
  unregisterColumn: (h) => {
1599
- const T = t.findIndex((H) => H.config.prop === h);
1608
+ const T = t.findIndex((N) => N.config.prop === h);
1600
1609
  T !== -1 && t.splice(T, 1);
1601
1610
  },
1602
1611
  updateColumnSlot: (h, T) => {
1603
- const H = t.find((R) => R.config.prop === h);
1604
- H && (H.slot = T);
1612
+ const N = t.find((R) => R.config.prop === h);
1613
+ N && (N.slot = T);
1605
1614
  },
1606
1615
  props: e
1607
1616
  });
1608
- const x = B(() => {
1609
- const h = t.map((X) => X.config), T = h.filter((X) => X.fixed === "left" || X.fixed === !0), H = h.filter((X) => !X.fixed), R = h.filter((X) => X.fixed === "right");
1610
- return [...T, ...H, ...R];
1611
- }), w = B(() => x.value.filter((h) => h.fixed === "left" || h.fixed === !0)), z = B(() => x.value.filter((h) => h.fixed === "right"));
1612
- B(() => x.value.filter((h) => !h.fixed)), B(() => w.value.reduce((h, T) => {
1613
- const H = T.width ? typeof T.width == "number" ? T.width : parseInt(T.width) : 100;
1614
- return h + H;
1615
- }, 0)), B(() => z.value.reduce((h, T) => {
1616
- const H = T.width ? typeof T.width == "number" ? T.width : parseInt(T.width) : 100;
1617
- return h + H;
1617
+ const k = $(() => {
1618
+ const h = t.map((X) => X.config), T = h.filter((X) => X.fixed === "left" || X.fixed === !0), N = h.filter((X) => !X.fixed), R = h.filter((X) => X.fixed === "right");
1619
+ return [...T, ...N, ...R];
1620
+ }), x = $(() => k.value.filter((h) => h.fixed === "left" || h.fixed === !0)), C = $(() => k.value.filter((h) => h.fixed === "right"));
1621
+ $(() => k.value.filter((h) => !h.fixed)), $(() => x.value.reduce((h, T) => {
1622
+ const N = T.width ? typeof T.width == "number" ? T.width : parseInt(T.width) : 100;
1623
+ return h + N;
1624
+ }, 0)), $(() => C.value.reduce((h, T) => {
1625
+ const N = T.width ? typeof T.width == "number" ? T.width : parseInt(T.width) : 100;
1626
+ return h + N;
1618
1627
  }, 0));
1619
- const S = B(() => {
1628
+ const S = $(() => {
1620
1629
  const h = {};
1621
1630
  return t.forEach((T) => {
1622
1631
  T.slot && (h[T.config.prop] = T.slot);
1623
1632
  }), h;
1624
- }), V = _({
1625
- prop: ((f = e.defaultSort) == null ? void 0 : f.prop) || "",
1626
- order: ((m = e.defaultSort) == null ? void 0 : m.order) || null
1627
- }), P = B(() => {
1628
- if (!V.value.prop || !V.value.order)
1633
+ }), P = _({
1634
+ prop: ((d = e.defaultSort) == null ? void 0 : d.prop) || "",
1635
+ order: ((y = e.defaultSort) == null ? void 0 : y.order) || null
1636
+ }), V = $(() => {
1637
+ if (!P.value.prop || !P.value.order)
1629
1638
  return e.data;
1630
- const { prop: h, order: T } = V.value;
1631
- return [...e.data].sort((H, R) => {
1632
- const X = H[h], O = R[h];
1639
+ const { prop: h, order: T } = P.value;
1640
+ return [...e.data].sort((N, R) => {
1641
+ const X = N[h], O = R[h];
1633
1642
  if (X === O) return 0;
1634
- const U = X > O ? 1 : -1;
1635
- return T === "ascending" ? U : -U;
1643
+ const Q = X > O ? 1 : -1;
1644
+ return T === "ascending" ? Q : -Q;
1636
1645
  });
1637
- }), W = B(() => {
1646
+ }), W = $(() => {
1638
1647
  const h = {};
1639
1648
  return e.height && (h.height = typeof e.height == "number" ? `${e.height}px` : e.height), e.maxHeight && (h.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight), h;
1640
- }), E = B(() => [
1649
+ }), E = $(() => [
1641
1650
  a.b(),
1642
1651
  a.is("border", e.border),
1643
1652
  a.is("stripe", e.stripe),
1644
1653
  a.is("loading", e.loading),
1645
- a.is("has-fixed", w.value.length > 0 || z.value.length > 0)
1646
- ]), $ = (h) => {
1647
- h.sortable && (V.value.prop === h.prop ? V.value.order === "ascending" ? V.value.order = "descending" : V.value.order === "descending" && (V.value.order = null, V.value.prop = "") : (V.value.prop = h.prop, V.value.order = "ascending"), o("sort-change", { ...V.value }));
1648
- }, K = (h) => h.sortable ? V.value.prop !== h.prop ? a.is("sortable") : [
1654
+ a.is("has-fixed", x.value.length > 0 || C.value.length > 0)
1655
+ ]), B = (h) => {
1656
+ h.sortable && (P.value.prop === h.prop ? P.value.order === "ascending" ? P.value.order = "descending" : P.value.order === "descending" && (P.value.order = null, P.value.prop = "") : (P.value.prop = h.prop, P.value.order = "ascending"), o("sort-change", { ...P.value }));
1657
+ }, H = (h) => h.sortable ? P.value.prop !== h.prop ? a.is("sortable") : [
1649
1658
  a.is("sortable"),
1650
- a.is(`sort-${V.value.order}`)
1651
- ] : "", N = (h, T, H) => {
1659
+ a.is(`sort-${P.value.order}`)
1660
+ ] : "", K = (h, T, N) => {
1652
1661
  const R = h[T.prop];
1653
- return T.formatter ? T.formatter(h, T, R, H) : R ?? "";
1662
+ return T.formatter ? T.formatter(h, T, R, N) : R ?? "";
1654
1663
  }, Y = (h, T) => {
1655
- o("row-click", h, x.value[0], T);
1656
- }, ee = (h, T, H) => {
1657
- const R = H.target;
1658
- o("cell-click", h, T, R, H);
1664
+ o("row-click", h, k.value[0], T);
1665
+ }, ee = (h, T, N) => {
1666
+ const R = N.target;
1667
+ o("cell-click", h, T, R, N);
1659
1668
  }, v = (h) => {
1660
1669
  o("page-change", h);
1661
- }, C = (h) => {
1670
+ }, b = (h) => {
1662
1671
  o("size-change", h);
1663
- }, y = (h, T, H) => {
1672
+ }, m = (h, T, N) => {
1664
1673
  const R = {};
1665
1674
  if (h.width && (R.width = typeof h.width == "number" ? `${h.width}px` : h.width), h.minWidth && (R.minWidth = typeof h.minWidth == "number" ? `${h.minWidth}px` : h.minWidth), h.align && (R.textAlign = h.align), (h.fixed === "left" || h.fixed === !0) && (R.position = "sticky", R.left = "0px", R.zIndex = "2", T !== void 0 && T > 0)) {
1666
1675
  let X = 0;
1667
1676
  for (let O = 0; O < T; O++) {
1668
- const U = w.value[O], ye = U.width ? typeof U.width == "number" ? U.width : parseInt(U.width) : 100;
1677
+ const Q = x.value[O], ye = Q.width ? typeof Q.width == "number" ? Q.width : parseInt(Q.width) : 100;
1669
1678
  X += ye;
1670
1679
  }
1671
1680
  R.left = `${X}px`;
1672
1681
  }
1673
1682
  if (h.fixed === "right" && (R.position = "sticky", R.right = "0px", R.zIndex = "2", T !== void 0)) {
1674
- const X = z.value, O = X.length - 1 - T;
1683
+ const X = C.value, O = X.length - 1 - T;
1675
1684
  if (O > 0) {
1676
- let U = 0;
1685
+ let Q = 0;
1677
1686
  for (let ye = 0; ye < O; ye++) {
1678
- const we = X[X.length - 1 - ye], Ke = we.width ? typeof we.width == "number" ? we.width : parseInt(we.width) : 100;
1679
- U += Ke;
1687
+ const we = X[X.length - 1 - ye], He = we.width ? typeof we.width == "number" ? we.width : parseInt(we.width) : 100;
1688
+ Q += He;
1680
1689
  }
1681
- R.right = `${U}px`;
1690
+ R.right = `${Q}px`;
1682
1691
  }
1683
1692
  }
1684
1693
  return R;
@@ -1692,105 +1701,105 @@ const on = /* @__PURE__ */ Z({
1692
1701
  },
1693
1702
  getSelection: () => [...I.value],
1694
1703
  toggleRowSelection: (h, T) => {
1695
- const H = g(h), R = I.value.findIndex((X) => g(X) === H);
1704
+ const N = g(h), R = I.value.findIndex((X) => g(X) === N);
1696
1705
  T === void 0 ? R > -1 ? I.value.splice(R, 1) : I.value.push(h) : T && R === -1 ? I.value.push(h) : !T && R > -1 && I.value.splice(R, 1), o("selection-change", [...I.value]);
1697
1706
  },
1698
- sortState: V,
1699
- columns: x
1700
- }), (h, T) => (M(), b("div", {
1707
+ sortState: P,
1708
+ columns: k
1709
+ }), (h, T) => (M(), w("div", {
1701
1710
  class: p(E.value)
1702
1711
  }, [
1703
- s.loading ? (M(), b("div", {
1712
+ s.loading ? (M(), w("div", {
1704
1713
  key: 0,
1705
- class: p(d(a).e("loading"))
1714
+ class: p(u(a).e("loading"))
1706
1715
  }, [...T[0] || (T[0] = [
1707
1716
  A("span", { class: "loading-spinner" }, null, -1),
1708
1717
  A("span", { class: "loading-text" }, "加载中...", -1)
1709
1718
  ])], 2)) : j("", !0),
1710
1719
  A("div", {
1711
- class: p(d(a).e("wrapper")),
1720
+ class: p(u(a).e("wrapper")),
1712
1721
  style: F(W.value)
1713
1722
  }, [
1714
1723
  A("table", null, [
1715
- s.showHeader ? (M(), b("thead", xt, [
1724
+ s.showHeader ? (M(), w("thead", bt, [
1716
1725
  A("tr", null, [
1717
- (M(!0), b(q, null, le(x.value, (H, R) => (M(), b("th", {
1718
- key: H.prop,
1719
- class: p([d(a).e("header-cell"), K(H), ...D(H)]),
1720
- style: F(y(H, H.fixed === "right" ? z.value.indexOf(H) : R)),
1721
- onClick: (X) => $(H)
1726
+ (M(!0), w(q, null, le(k.value, (N, R) => (M(), w("th", {
1727
+ key: N.prop,
1728
+ class: p([u(a).e("header-cell"), H(N), ...D(N)]),
1729
+ style: F(m(N, N.fixed === "right" ? C.value.indexOf(N) : R)),
1730
+ onClick: (X) => B(N)
1722
1731
  }, [
1723
- A("span", null, Q(H.label), 1),
1724
- H.sortable ? (M(), b("span", {
1732
+ A("span", null, U(N.label), 1),
1733
+ N.sortable ? (M(), w("span", {
1725
1734
  key: 0,
1726
- class: p(d(a).e("sort-icon"))
1735
+ class: p(u(a).e("sort-icon"))
1727
1736
  }, [
1728
- A("span", Ct, [
1729
- ne(d(te), {
1737
+ A("span", zt, [
1738
+ ne(u(te), {
1730
1739
  name: "sort-up",
1731
1740
  size: 12
1732
1741
  })
1733
1742
  ]),
1734
- A("span", zt, [
1735
- ne(d(te), {
1743
+ A("span", It, [
1744
+ ne(u(te), {
1736
1745
  name: "sort-down",
1737
1746
  size: 12
1738
1747
  })
1739
1748
  ])
1740
1749
  ], 2)) : j("", !0)
1741
- ], 14, bt))), 128))
1750
+ ], 14, Ct))), 128))
1742
1751
  ])
1743
1752
  ])) : j("", !0),
1744
1753
  A("tbody", null, [
1745
- (M(!0), b(q, null, le(P.value, (H, R) => (M(), b("tr", {
1746
- key: s.rowKey ? typeof s.rowKey == "function" ? s.rowKey(H) : H[s.rowKey] : R,
1747
- class: p([d(a).e("row")]),
1748
- onClick: (X) => Y(H, X)
1754
+ (M(!0), w(q, null, le(V.value, (N, R) => (M(), w("tr", {
1755
+ key: s.rowKey ? typeof s.rowKey == "function" ? s.rowKey(N) : N[s.rowKey] : R,
1756
+ class: p([u(a).e("row")]),
1757
+ onClick: (X) => Y(N, X)
1749
1758
  }, [
1750
- (M(!0), b(q, null, le(x.value, (X, O) => (M(), b("td", {
1759
+ (M(!0), w(q, null, le(k.value, (X, O) => (M(), w("td", {
1751
1760
  key: X.prop,
1752
- class: p([d(a).e("cell"), ...D(X)]),
1753
- style: F(y(X, X.fixed === "right" ? z.value.indexOf(X) : O)),
1754
- onClick: (U) => ee(H, X, U)
1761
+ class: p([u(a).e("cell"), ...D(X)]),
1762
+ style: F(m(X, X.fixed === "right" ? C.value.indexOf(X) : O)),
1763
+ onClick: (Q) => ee(N, X, Q)
1755
1764
  }, [
1756
- S.value[X.prop] ? (M(), re(xe(() => S.value[X.prop]({ row: H, column: X, $index: R })), { key: 0 })) : (M(), b(q, { key: 1 }, [
1757
- ae(Q(N(H, X, R)), 1)
1765
+ S.value[X.prop] ? (M(), re(xe(() => S.value[X.prop]({ row: N, column: X, $index: R })), { key: 0 })) : (M(), w(q, { key: 1 }, [
1766
+ ae(U(K(N, X, R)), 1)
1758
1767
  ], 64))
1759
- ], 14, At))), 128))
1760
- ], 10, It))), 128))
1768
+ ], 14, Dt))), 128))
1769
+ ], 10, At))), 128))
1761
1770
  ]),
1762
- P.value.length === 0 && !s.loading ? (M(), b("tbody", Dt, [
1771
+ V.value.length === 0 && !s.loading ? (M(), w("tbody", Lt, [
1763
1772
  A("tr", null, [
1764
1773
  A("td", {
1765
- colspan: x.value.length || 1,
1766
- class: p(d(a).e("empty"))
1774
+ colspan: k.value.length || 1,
1775
+ class: p(u(a).e("empty"))
1767
1776
  }, [
1768
1777
  G(h.$slots, "empty", {}, () => [
1769
- ae(Q(s.emptyText), 1)
1778
+ ae(U(s.emptyText), 1)
1770
1779
  ])
1771
- ], 10, Lt)
1780
+ ], 10, Tt)
1772
1781
  ])
1773
1782
  ])) : j("", !0)
1774
1783
  ])
1775
1784
  ], 6),
1776
- s.pagination ? (M(), b("div", {
1785
+ s.pagination ? (M(), w("div", {
1777
1786
  key: 1,
1778
- class: p(d(a).e("pagination"))
1787
+ class: p(u(a).e("pagination"))
1779
1788
  }, [
1780
- ne(tt, {
1789
+ ne(nt, {
1781
1790
  total: s.pagination.total,
1782
1791
  "current-page": s.pagination.current,
1783
1792
  "page-size": s.pagination.pageSize,
1784
1793
  onCurrentChange: v,
1785
- onSizeChange: C
1794
+ onSizeChange: b
1786
1795
  }, null, 8, ["total", "current-page", "page-size"])
1787
1796
  ], 2)) : j("", !0),
1788
- A("div", Tt, [
1797
+ A("div", Bt, [
1789
1798
  G(h.$slots, "default")
1790
1799
  ])
1791
1800
  ], 2));
1792
1801
  }
1793
- }), fn = /* @__PURE__ */ Z({
1802
+ }), $t = /* @__PURE__ */ Z({
1794
1803
  name: "XTableColumn",
1795
1804
  __name: "TableColumn",
1796
1805
  props: {
@@ -1806,7 +1815,7 @@ const on = /* @__PURE__ */ Z({
1806
1815
  setup(s) {
1807
1816
  const r = s;
1808
1817
  J("table-column");
1809
- const n = be(), e = _(`column_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`), o = ge("x-table"), a = B(() => ({
1818
+ const n = be(), e = _(`column_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`), o = ge("x-table"), a = $(() => ({
1810
1819
  prop: r.prop || e.value,
1811
1820
  label: r.label,
1812
1821
  width: r.width,
@@ -1824,7 +1833,7 @@ const on = /* @__PURE__ */ Z({
1824
1833
  o != null && o.unregisterColumn && o.unregisterColumn(r.prop || e.value);
1825
1834
  }), (t, l) => null;
1826
1835
  }
1827
- }), $t = { key: 0 }, Bt = ["onClick"], St = { class: "sort-arrow up" }, Et = { class: "sort-arrow down" }, Nt = ["onClick"], Kt = { key: 0 }, Ht = ["colspan"], Vt = { style: { display: "none" } }, vn = /* @__PURE__ */ Z({
1836
+ }), St = { key: 0 }, Et = ["onClick"], Nt = { class: "sort-arrow up" }, Kt = { class: "sort-arrow down" }, Ht = ["onClick"], Vt = { key: 0 }, Pt = ["colspan"], Rt = { style: { display: "none" } }, vn = /* @__PURE__ */ Z({
1828
1837
  name: "XTreeTable",
1829
1838
  __name: "index",
1830
1839
  props: {
@@ -1844,80 +1853,80 @@ const on = /* @__PURE__ */ Z({
1844
1853
  },
1845
1854
  emits: ["row-click", "cell-click", "expand-change", "sort-change"],
1846
1855
  setup(s, { expose: r, emit: n }) {
1847
- const e = s, o = n, a = J("tree-table"), t = _(/* @__PURE__ */ new Set()), l = _([]), c = _({});
1856
+ const e = s, o = n, a = J("tree-table"), t = _(/* @__PURE__ */ new Set()), l = _([]), i = _({});
1848
1857
  ve("x-tree-table", {
1849
1858
  registerColumn: (g, L) => {
1850
- const i = l.value.findIndex((u) => u.prop === g.prop);
1851
- i === -1 ? l.value.push(g) : l.value[i] = g, L && (c.value[g.prop] = L);
1859
+ const f = l.value.findIndex((c) => c.prop === g.prop);
1860
+ f === -1 ? l.value.push(g) : l.value[f] = g, L && (i.value[g.prop] = L);
1852
1861
  },
1853
1862
  unregisterColumn: (g) => {
1854
- const L = l.value.findIndex((i) => i.prop === g);
1855
- L > -1 && l.value.splice(L, 1), delete c.value[g];
1863
+ const L = l.value.findIndex((f) => f.prop === g);
1864
+ L > -1 && l.value.splice(L, 1), delete i.value[g];
1856
1865
  },
1857
1866
  updateColumnSlot: (g, L) => {
1858
- c.value[g] = L;
1867
+ i.value[g] = L;
1859
1868
  },
1860
1869
  props: e
1861
1870
  });
1862
- const z = (g) => typeof e.rowKey == "function" ? e.rowKey(g) : g[e.rowKey || "id"], S = (g) => {
1863
- var i;
1864
- const L = ((i = e.treeProps) == null ? void 0 : i.children) || "children";
1871
+ const C = (g) => typeof e.rowKey == "function" ? e.rowKey(g) : g[e.rowKey || "id"], S = (g) => {
1872
+ var f;
1873
+ const L = ((f = e.treeProps) == null ? void 0 : f.children) || "children";
1865
1874
  return g[L] || [];
1866
- }, V = (g) => {
1867
- var u;
1868
- if (S(g).length > 0) return !0;
1869
- const i = ((u = e.treeProps) == null ? void 0 : u.hasChildren) || "hasChildren";
1870
- return g[i] === !0;
1871
1875
  }, P = (g) => {
1872
- const L = z(g);
1876
+ var c;
1877
+ if (S(g).length > 0) return !0;
1878
+ const f = ((c = e.treeProps) == null ? void 0 : c.hasChildren) || "hasChildren";
1879
+ return g[f] === !0;
1880
+ }, V = (g) => {
1881
+ const L = C(g);
1873
1882
  return t.value.has(L);
1874
1883
  }, W = (g) => {
1875
- const L = z(g), i = !t.value.has(L);
1876
- i ? t.value.add(L) : t.value.delete(L), o("expand-change", g, i);
1884
+ const L = C(g), f = !t.value.has(L);
1885
+ f ? t.value.add(L) : t.value.delete(L), o("expand-change", g, f);
1877
1886
  }, E = () => {
1878
1887
  const g = (L) => {
1879
- L.forEach((i) => {
1880
- V(i) && (t.value.add(z(i)), g(S(i)));
1888
+ L.forEach((f) => {
1889
+ P(f) && (t.value.add(C(f)), g(S(f)));
1881
1890
  });
1882
1891
  };
1883
1892
  g(e.data);
1884
- }, $ = () => {
1893
+ }, B = () => {
1885
1894
  t.value.clear();
1886
- }, K = B(() => {
1887
- const g = [], L = (i, u = 0, f = !0) => {
1888
- i.forEach((m) => {
1889
- const h = z(m), T = t.value.has(h), H = f;
1890
- g.push({ row: m, level: u, visible: H });
1891
- const R = S(m);
1892
- R.length > 0 && T && L(R, u + 1, H);
1895
+ }, H = $(() => {
1896
+ const g = [], L = (f, c = 0, d = !0) => {
1897
+ f.forEach((y) => {
1898
+ const h = C(y), T = t.value.has(h), N = d;
1899
+ g.push({ row: y, level: c, visible: N });
1900
+ const R = S(y);
1901
+ R.length > 0 && T && L(R, c + 1, N);
1893
1902
  });
1894
1903
  };
1895
1904
  return L(e.data), g;
1896
- }), N = _({
1905
+ }), K = _({
1897
1906
  prop: "",
1898
1907
  order: null
1899
- }), Y = B(() => {
1900
- if (!N.value.prop || !N.value.order)
1901
- return K.value;
1902
- const { prop: g, order: L } = N.value;
1903
- return [...K.value].sort((i, u) => {
1904
- const f = i.row[g], m = u.row[g];
1905
- if (f === m) return 0;
1906
- const h = f > m ? 1 : -1;
1908
+ }), Y = $(() => {
1909
+ if (!K.value.prop || !K.value.order)
1910
+ return H.value;
1911
+ const { prop: g, order: L } = K.value;
1912
+ return [...H.value].sort((f, c) => {
1913
+ const d = f.row[g], y = c.row[g];
1914
+ if (d === y) return 0;
1915
+ const h = d > y ? 1 : -1;
1907
1916
  return L === "ascending" ? h : -h;
1908
1917
  });
1909
1918
  }), ee = (g) => {
1910
- g.sortable && (N.value.prop === g.prop ? N.value.order === "ascending" ? N.value.order = "descending" : N.value.order === "descending" && (N.value.order = null, N.value.prop = "") : (N.value.prop = g.prop, N.value.order = "ascending"), o("sort-change", { ...N.value }));
1911
- }, v = (g) => g.sortable ? N.value.prop !== g.prop ? a.is("sortable") : [
1919
+ g.sortable && (K.value.prop === g.prop ? K.value.order === "ascending" ? K.value.order = "descending" : K.value.order === "descending" && (K.value.order = null, K.value.prop = "") : (K.value.prop = g.prop, K.value.order = "ascending"), o("sort-change", { ...K.value }));
1920
+ }, v = (g) => g.sortable ? K.value.prop !== g.prop ? a.is("sortable") : [
1912
1921
  a.is("sortable"),
1913
- a.is(`sort-${N.value.order}`)
1914
- ] : "", C = (g, L, i) => {
1915
- const u = g[L.prop];
1916
- return L.formatter ? L.formatter(g, L, u, i) : u ?? "";
1917
- }, y = (g) => {
1922
+ a.is(`sort-${K.value.order}`)
1923
+ ] : "", b = (g, L, f) => {
1924
+ const c = g[L.prop];
1925
+ return L.formatter ? L.formatter(g, L, c, f) : c ?? "";
1926
+ }, m = (g) => {
1918
1927
  const L = {};
1919
1928
  return g.width && (L.width = typeof g.width == "number" ? `${g.width}px` : g.width), g.minWidth && (L.minWidth = typeof g.minWidth == "number" ? `${g.minWidth}px` : g.minWidth), g.align && (L.textAlign = g.align), L;
1920
- }, D = B(() => [
1929
+ }, D = $(() => [
1921
1930
  a.b(),
1922
1931
  a.is("border", e.border),
1923
1932
  a.is("stripe", e.stripe),
@@ -1936,117 +1945,117 @@ const on = /* @__PURE__ */ Z({
1936
1945
  }));
1937
1946
  }, { immediate: !0 }), r({
1938
1947
  expandAll: E,
1939
- collapseAll: $,
1948
+ collapseAll: B,
1940
1949
  toggleExpand: W,
1941
1950
  expandedKeys: t,
1942
1951
  columns: l
1943
- }), (g, L) => (M(), b("div", {
1952
+ }), (g, L) => (M(), w("div", {
1944
1953
  class: p(D.value)
1945
1954
  }, [
1946
- s.loading ? (M(), b("div", {
1955
+ s.loading ? (M(), w("div", {
1947
1956
  key: 0,
1948
- class: p(d(a).e("loading"))
1957
+ class: p(u(a).e("loading"))
1949
1958
  }, [...L[0] || (L[0] = [
1950
1959
  A("span", { class: "loading-spinner" }, null, -1),
1951
1960
  A("span", { class: "loading-text" }, "加载中...", -1)
1952
1961
  ])], 2)) : j("", !0),
1953
1962
  A("div", {
1954
- class: p(d(a).e("wrapper"))
1963
+ class: p(u(a).e("wrapper"))
1955
1964
  }, [
1956
1965
  A("table", null, [
1957
- s.showHeader ? (M(), b("thead", $t, [
1966
+ s.showHeader ? (M(), w("thead", St, [
1958
1967
  A("tr", null, [
1959
- (M(!0), b(q, null, le(l.value, (i) => (M(), b("th", {
1960
- key: i.prop,
1961
- class: p([d(a).e("header-cell"), v(i)]),
1962
- style: F(y(i)),
1963
- onClick: (u) => ee(i)
1968
+ (M(!0), w(q, null, le(l.value, (f) => (M(), w("th", {
1969
+ key: f.prop,
1970
+ class: p([u(a).e("header-cell"), v(f)]),
1971
+ style: F(m(f)),
1972
+ onClick: (c) => ee(f)
1964
1973
  }, [
1965
- A("span", null, Q(i.label), 1),
1966
- i.sortable ? (M(), b("span", {
1974
+ A("span", null, U(f.label), 1),
1975
+ f.sortable ? (M(), w("span", {
1967
1976
  key: 0,
1968
- class: p(d(a).e("sort-icon"))
1977
+ class: p(u(a).e("sort-icon"))
1969
1978
  }, [
1970
- A("span", St, [
1971
- ne(d(te), {
1979
+ A("span", Nt, [
1980
+ ne(u(te), {
1972
1981
  name: "sort-up",
1973
1982
  size: 12
1974
1983
  })
1975
1984
  ]),
1976
- A("span", Et, [
1977
- ne(d(te), {
1985
+ A("span", Kt, [
1986
+ ne(u(te), {
1978
1987
  name: "sort-down",
1979
1988
  size: 12
1980
1989
  })
1981
1990
  ])
1982
1991
  ], 2)) : j("", !0)
1983
- ], 14, Bt))), 128))
1992
+ ], 14, Et))), 128))
1984
1993
  ])
1985
1994
  ])) : j("", !0),
1986
1995
  A("tbody", null, [
1987
- (M(!0), b(q, null, le(Y.value, (i, u) => (M(), b(q, {
1988
- key: z(i.row)
1996
+ (M(!0), w(q, null, le(Y.value, (f, c) => (M(), w(q, {
1997
+ key: C(f.row)
1989
1998
  }, [
1990
- i.visible ? (M(), b("tr", {
1999
+ f.visible ? (M(), w("tr", {
1991
2000
  key: 0,
1992
- class: p([d(a).e("row"), d(a).is("level-" + i.level)])
2001
+ class: p([u(a).e("row"), u(a).is("level-" + f.level)])
1993
2002
  }, [
1994
- (M(!0), b(q, null, le(l.value, (f, m) => (M(), b("td", {
1995
- key: f.prop,
1996
- class: p(d(a).e("cell")),
1997
- style: F(y(f))
2003
+ (M(!0), w(q, null, le(l.value, (d, y) => (M(), w("td", {
2004
+ key: d.prop,
2005
+ class: p(u(a).e("cell")),
2006
+ style: F(m(d))
1998
2007
  }, [
1999
- m === 0 ? (M(), b("div", {
2008
+ y === 0 ? (M(), w("div", {
2000
2009
  key: 0,
2001
- class: p(d(a).e("cell-content"))
2010
+ class: p(u(a).e("cell-content"))
2002
2011
  }, [
2003
2012
  A("span", {
2004
- class: p(d(a).e("indent")),
2005
- style: F({ width: `${i.level * s.indent}px` })
2013
+ class: p(u(a).e("indent")),
2014
+ style: F({ width: `${f.level * s.indent}px` })
2006
2015
  }, null, 6),
2007
- V(i.row) ? (M(), b("span", {
2016
+ P(f.row) ? (M(), w("span", {
2008
2017
  key: 0,
2009
- class: p([d(a).e("expand-icon"), d(a).is("expanded", P(i.row))]),
2010
- onClick: ie((h) => W(i.row), ["stop"])
2018
+ class: p([u(a).e("expand-icon"), u(a).is("expanded", V(f.row))]),
2019
+ onClick: ie((h) => W(f.row), ["stop"])
2011
2020
  }, [
2012
- P(i.row) ? (M(), re(d(te), {
2021
+ V(f.row) ? (M(), re(u(te), {
2013
2022
  key: 0,
2014
2023
  name: "chevron-down",
2015
2024
  size: 14
2016
- })) : (M(), re(d(te), {
2025
+ })) : (M(), re(u(te), {
2017
2026
  key: 1,
2018
2027
  name: "chevron-right",
2019
2028
  size: 14
2020
2029
  }))
2021
- ], 10, Nt)) : (M(), b("span", {
2030
+ ], 10, Ht)) : (M(), w("span", {
2022
2031
  key: 1,
2023
- class: p(d(a).e("expand-placeholder"))
2032
+ class: p(u(a).e("expand-placeholder"))
2024
2033
  }, null, 2)),
2025
2034
  A("span", null, [
2026
- c.value[f.prop] ? (M(), re(xe(() => c.value[f.prop]({ row: i.row, column: f, $index: u })), { key: 0 })) : (M(), b(q, { key: 1 }, [
2027
- ae(Q(C(i.row, f, u)), 1)
2035
+ i.value[d.prop] ? (M(), re(xe(() => i.value[d.prop]({ row: f.row, column: d, $index: c })), { key: 0 })) : (M(), w(q, { key: 1 }, [
2036
+ ae(U(b(f.row, d, c)), 1)
2028
2037
  ], 64))
2029
2038
  ])
2030
- ], 2)) : c.value[f.prop] ? (M(), re(xe(() => c.value[f.prop]({ row: i.row, column: f, $index: u })), { key: 1 })) : (M(), b(q, { key: 2 }, [
2031
- ae(Q(C(i.row, f, u)), 1)
2039
+ ], 2)) : i.value[d.prop] ? (M(), re(xe(() => i.value[d.prop]({ row: f.row, column: d, $index: c })), { key: 1 })) : (M(), w(q, { key: 2 }, [
2040
+ ae(U(b(f.row, d, c)), 1)
2032
2041
  ], 64))
2033
2042
  ], 6))), 128))
2034
2043
  ], 2)) : j("", !0)
2035
2044
  ], 64))), 128)),
2036
- Y.value.length === 0 && !s.loading ? (M(), b("tr", Kt, [
2045
+ Y.value.length === 0 && !s.loading ? (M(), w("tr", Vt, [
2037
2046
  A("td", {
2038
2047
  colspan: l.value.length || 1,
2039
- class: p(d(a).e("empty"))
2048
+ class: p(u(a).e("empty"))
2040
2049
  }, [
2041
2050
  G(g.$slots, "empty", {}, () => [
2042
- ae(Q(s.emptyText), 1)
2051
+ ae(U(s.emptyText), 1)
2043
2052
  ])
2044
- ], 10, Ht)
2053
+ ], 10, Pt)
2045
2054
  ])) : j("", !0)
2046
2055
  ])
2047
2056
  ])
2048
2057
  ], 2),
2049
- A("div", Vt, [
2058
+ A("div", Rt, [
2050
2059
  G(g.$slots, "default")
2051
2060
  ])
2052
2061
  ], 2));
@@ -2067,7 +2076,7 @@ const on = /* @__PURE__ */ Z({
2067
2076
  setup(s) {
2068
2077
  const r = s;
2069
2078
  J("tree-table-column");
2070
- const n = be(), e = ge("x-tree-table"), o = B(() => ({
2079
+ const n = be(), e = ge("x-tree-table"), o = $(() => ({
2071
2080
  prop: r.prop,
2072
2081
  label: r.label,
2073
2082
  width: r.width,
@@ -2085,7 +2094,7 @@ const on = /* @__PURE__ */ Z({
2085
2094
  e != null && e.unregisterColumn && e.unregisterColumn(r.prop);
2086
2095
  }), (a, t) => null;
2087
2096
  }
2088
- }), Pt = ["src", "alt"], gn = /* @__PURE__ */ Z({
2097
+ }), jt = ["src", "alt"], gn = /* @__PURE__ */ Z({
2089
2098
  name: "XAvatar",
2090
2099
  __name: "index",
2091
2100
  props: {
@@ -2098,34 +2107,34 @@ const on = /* @__PURE__ */ Z({
2098
2107
  },
2099
2108
  emits: ["error"],
2100
2109
  setup(s, { emit: r }) {
2101
- const n = s, e = r, o = J("avatar"), a = B(() => [
2110
+ const n = s, e = r, o = J("avatar"), a = $(() => [
2102
2111
  o.b(),
2103
2112
  o.m(n.shape),
2104
2113
  typeof n.size == "string" ? o.m(n.size) : ""
2105
- ]), t = B(() => {
2106
- const c = {};
2107
- return typeof n.size == "number" && (c.width = `${n.size}px`, c.height = `${n.size}px`, c.lineHeight = `${n.size}px`), c;
2108
- }), l = (c) => {
2109
- e("error", c);
2114
+ ]), t = $(() => {
2115
+ const i = {};
2116
+ return typeof n.size == "number" && (i.width = `${n.size}px`, i.height = `${n.size}px`, i.lineHeight = `${n.size}px`), i;
2117
+ }), l = (i) => {
2118
+ e("error", i);
2110
2119
  };
2111
- return (c, k) => (M(), b("span", {
2120
+ return (i, z) => (M(), w("span", {
2112
2121
  class: p(a.value),
2113
2122
  style: F(t.value)
2114
2123
  }, [
2115
- s.src ? (M(), b("img", {
2124
+ s.src ? (M(), w("img", {
2116
2125
  key: 0,
2117
2126
  src: s.src,
2118
2127
  alt: s.alt,
2119
2128
  style: F({ objectFit: s.fit }),
2120
2129
  onError: l
2121
- }, null, 44, Pt)) : s.icon ? (M(), b("span", {
2130
+ }, null, 44, jt)) : s.icon ? (M(), w("span", {
2122
2131
  key: 1,
2123
- class: p(d(o).e("icon"))
2124
- }, Q(s.icon), 3)) : (M(), b("span", {
2132
+ class: p(u(o).e("icon"))
2133
+ }, U(s.icon), 3)) : (M(), w("span", {
2125
2134
  key: 2,
2126
- class: p(d(o).e("default"))
2135
+ class: p(u(o).e("default"))
2127
2136
  }, [
2128
- G(c.$slots, "default")
2137
+ G(i.$slots, "default")
2129
2138
  ], 2))
2130
2139
  ], 6));
2131
2140
  }
@@ -2146,22 +2155,22 @@ const on = /* @__PURE__ */ Z({
2146
2155
  const r = s, n = J("descriptions");
2147
2156
  ve("x-descriptions", {
2148
2157
  props: r,
2149
- column: B(() => r.column)
2158
+ column: $(() => r.column)
2150
2159
  });
2151
- const e = B(() => [
2160
+ const e = $(() => [
2152
2161
  n.b(),
2153
2162
  n.m(r.size),
2154
2163
  n.is("bordered", r.border)
2155
2164
  ]);
2156
- return (o, a) => (M(), b("div", {
2165
+ return (o, a) => (M(), w("div", {
2157
2166
  class: p(e.value)
2158
2167
  }, [
2159
- s.title ? (M(), b("div", {
2168
+ s.title ? (M(), w("div", {
2160
2169
  key: 0,
2161
- class: p(d(n).e("title"))
2162
- }, Q(s.title), 3)) : j("", !0),
2170
+ class: p(u(n).e("title"))
2171
+ }, U(s.title), 3)) : j("", !0),
2163
2172
  A("div", {
2164
- class: p(d(n).e("body"))
2173
+ class: p(u(n).e("body"))
2165
2174
  }, [
2166
2175
  A("table", null, [
2167
2176
  A("tbody", null, [
@@ -2171,7 +2180,7 @@ const on = /* @__PURE__ */ Z({
2171
2180
  ], 2)
2172
2181
  ], 2));
2173
2182
  }
2174
- }), Rt = ["colspan"], jt = ["colspan"], yn = /* @__PURE__ */ Z({
2183
+ }), Ot = ["colspan"], yn = /* @__PURE__ */ Z({
2175
2184
  name: "XDescriptionsItem",
2176
2185
  __name: "DescriptionsItem",
2177
2186
  props: {
@@ -2181,48 +2190,36 @@ const on = /* @__PURE__ */ Z({
2181
2190
  contentAlign: {}
2182
2191
  },
2183
2192
  setup(s) {
2184
- const r = s, n = J("descriptions-item"), e = ge("x-descriptions"), o = B(() => {
2185
- var w;
2186
- const k = {}, x = (w = e == null ? void 0 : e.props) == null ? void 0 : w.labelWidth;
2187
- return x && (k.width = typeof x == "number" ? `${x}px` : x), k;
2188
- }), a = B(() => {
2193
+ const r = s, n = J("descriptions-item"), e = ge("x-descriptions"), o = $(() => {
2189
2194
  var k;
2190
- return r.labelAlign || ((k = e == null ? void 0 : e.props) == null ? void 0 : k.labelAlign) || "right";
2191
- }), t = B(() => {
2192
- var k;
2193
- return r.contentAlign || ((k = e == null ? void 0 : e.props) == null ? void 0 : k.contentAlign) || "left";
2194
- }), l = B(() => {
2195
- var k;
2196
- return ((k = e == null ? void 0 : e.props) == null ? void 0 : k.colon) ?? !0;
2197
- }), c = B(() => {
2198
- var k;
2199
- return ((k = e == null ? void 0 : e.props) == null ? void 0 : k.border) ?? !1;
2195
+ const i = {}, z = (k = e == null ? void 0 : e.props) == null ? void 0 : k.labelWidth;
2196
+ return z && (i.width = typeof z == "number" ? `${z}px` : z), i;
2197
+ }), a = $(() => {
2198
+ var i;
2199
+ return r.labelAlign || ((i = e == null ? void 0 : e.props) == null ? void 0 : i.labelAlign) || "right";
2200
+ }), t = $(() => {
2201
+ var i;
2202
+ return r.contentAlign || ((i = e == null ? void 0 : e.props) == null ? void 0 : i.contentAlign) || "left";
2203
+ }), l = $(() => {
2204
+ var i;
2205
+ return ((i = e == null ? void 0 : e.props) == null ? void 0 : i.colon) ?? !0;
2200
2206
  });
2201
- return (k, x) => c.value ? (M(), b(q, { key: 0 }, [
2202
- A("th", {
2203
- class: p([d(n).b(), d(n).e("label"), `is-${a.value}`]),
2204
- style: F(o.value)
2205
- }, Q(s.label) + Q(l.value ? ":" : ""), 7),
2206
- A("td", {
2207
- class: p([d(n).e("content"), `is-${t.value}`]),
2208
- colspan: s.span * 2 - 1
2209
- }, [
2210
- G(k.$slots, "default")
2211
- ], 10, Rt)
2212
- ], 64)) : (M(), b("tr", {
2213
- key: 1,
2214
- class: p(d(n).b())
2207
+ return $(() => {
2208
+ var i;
2209
+ return ((i = e == null ? void 0 : e.props) == null ? void 0 : i.border) ?? !1;
2210
+ }), (i, z) => (M(), w("tr", {
2211
+ class: p(u(n).b())
2215
2212
  }, [
2216
2213
  A("th", {
2217
- class: p([d(n).e("label"), `is-${a.value}`]),
2214
+ class: p([u(n).e("label"), `is-${a.value}`]),
2218
2215
  style: F(o.value)
2219
- }, Q(s.label) + Q(l.value ? ":" : ""), 7),
2216
+ }, U(s.label) + U(l.value ? ":" : ""), 7),
2220
2217
  A("td", {
2221
- class: p([d(n).e("content"), `is-${t.value}`]),
2218
+ class: p([u(n).e("content"), `is-${t.value}`]),
2222
2219
  colspan: s.span * 2 - 1
2223
2220
  }, [
2224
- G(k.$slots, "default")
2225
- ], 10, jt)
2221
+ G(i.$slots, "default")
2222
+ ], 10, Ot)
2226
2223
  ], 2));
2227
2224
  }
2228
2225
  }), Mn = /* @__PURE__ */ Z({
@@ -2243,66 +2240,66 @@ const on = /* @__PURE__ */ Z({
2243
2240
  },
2244
2241
  emits: ["scroll"],
2245
2242
  setup(s, { expose: r, emit: n }) {
2246
- const e = s, o = n, a = J("scrollbar"), t = _(), l = _(), c = _("0"), k = _("0"), x = _(0), w = _(0), z = B(() => {
2247
- const K = {};
2248
- return e.height && (K.height = typeof e.height == "number" ? `${e.height}px` : e.height), e.maxHeight && (K.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight), K;
2243
+ const e = s, o = n, a = J("scrollbar"), t = _(), l = _(), i = _("0"), z = _("0"), k = _(0), x = _(0), C = $(() => {
2244
+ const H = {};
2245
+ return e.height && (H.height = typeof e.height == "number" ? `${e.height}px` : e.height), e.maxHeight && (H.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight), H;
2249
2246
  }), S = () => {
2250
2247
  if (!t.value) return;
2251
- const K = t.value.offsetHeight - 4, N = t.value.offsetWidth - 4, Y = t.value.scrollHeight, ee = t.value.scrollWidth, v = K / Y, C = N / ee;
2252
- k.value = v >= 1 ? "0" : `${K * v}px`, c.value = C >= 1 ? "0" : `${N * C}px`;
2253
- }, V = (K) => {
2248
+ const H = t.value.offsetHeight - 4, K = t.value.offsetWidth - 4, Y = t.value.scrollHeight, ee = t.value.scrollWidth, v = H / Y, b = K / ee;
2249
+ z.value = v >= 1 ? "0" : `${H * v}px`, i.value = b >= 1 ? "0" : `${K * b}px`;
2250
+ }, P = (H) => {
2254
2251
  if (!t.value) return;
2255
- const N = t.value.offsetHeight, Y = t.value.offsetWidth;
2256
- w.value = t.value.scrollTop * 100 / N, x.value = t.value.scrollLeft * 100 / Y, o("scroll", K);
2257
- }, P = (K) => {
2258
- var N;
2259
- (N = t.value) == null || N.scrollTo(K);
2260
- }, W = (K) => {
2261
- t.value && (t.value.scrollTop = K);
2262
- }, E = (K) => {
2263
- t.value && (t.value.scrollLeft = K);
2252
+ const K = t.value.offsetHeight, Y = t.value.offsetWidth;
2253
+ x.value = t.value.scrollTop * 100 / K, k.value = t.value.scrollLeft * 100 / Y, o("scroll", H);
2254
+ }, V = (H) => {
2255
+ var K;
2256
+ (K = t.value) == null || K.scrollTo(H);
2257
+ }, W = (H) => {
2258
+ t.value && (t.value.scrollTop = H);
2259
+ }, E = (H) => {
2260
+ t.value && (t.value.scrollLeft = H);
2264
2261
  };
2265
- let $ = null;
2262
+ let B = null;
2266
2263
  return pe(() => {
2267
- e.native || (Se(S), e.noresize || ($ = new ResizeObserver(S), l.value && $.observe(l.value), window.addEventListener("resize", S)));
2264
+ e.native || (Ee(S), e.noresize || (B = new ResizeObserver(S), l.value && B.observe(l.value), window.addEventListener("resize", S)));
2268
2265
  }), me(() => {
2269
- $ && $.disconnect(), window.removeEventListener("resize", S);
2266
+ B && B.disconnect(), window.removeEventListener("resize", S);
2270
2267
  }), r({
2271
- scrollTo: P,
2268
+ scrollTo: V,
2272
2269
  setScrollTop: W,
2273
2270
  setScrollLeft: E,
2274
2271
  update: S
2275
- }), (K, N) => (M(), b("div", {
2276
- class: p(d(a).b())
2272
+ }), (H, K) => (M(), w("div", {
2273
+ class: p(u(a).b())
2277
2274
  }, [
2278
2275
  A("div", {
2279
2276
  ref_key: "wrapRef",
2280
2277
  ref: t,
2281
- class: p([d(a).e("wrap"), s.wrapClass, { [d(a).em("wrap", "hidden-default")]: !s.native }]),
2282
- style: F([z.value, { overflow: s.native ? "auto" : "hidden" }]),
2283
- onScroll: V
2278
+ class: p([u(a).e("wrap"), s.wrapClass, { [u(a).em("wrap", "hidden-default")]: !s.native }]),
2279
+ style: F([C.value, { overflow: s.native ? "auto" : "hidden" }]),
2280
+ onScroll: P
2284
2281
  }, [
2285
2282
  (M(), re(xe(s.tag), {
2286
2283
  ref_key: "resizeRef",
2287
2284
  ref: l,
2288
- class: p([d(a).e("view"), s.viewClass]),
2285
+ class: p([u(a).e("view"), s.viewClass]),
2289
2286
  style: F(s.viewStyle)
2290
2287
  }, {
2291
2288
  default: Ie(() => [
2292
- G(K.$slots, "default")
2289
+ G(H.$slots, "default")
2293
2290
  ]),
2294
2291
  _: 3
2295
2292
  }, 8, ["class", "style"]))
2296
2293
  ], 38),
2297
- !s.native && k.value ? (M(), b("div", {
2294
+ !s.native && z.value ? (M(), w("div", {
2298
2295
  key: 0,
2299
- class: p([d(a).e("bar"), d(a).is("vertical")]),
2300
- style: F({ height: k.value, top: `${w.value}%` })
2296
+ class: p([u(a).e("bar"), u(a).is("vertical")]),
2297
+ style: F({ height: z.value, top: `${x.value}%` })
2301
2298
  }, null, 6)) : j("", !0),
2302
- !s.native && c.value ? (M(), b("div", {
2299
+ !s.native && i.value ? (M(), w("div", {
2303
2300
  key: 1,
2304
- class: p([d(a).e("bar"), d(a).is("horizontal")]),
2305
- style: F({ width: c.value, left: `${x.value}%` })
2301
+ class: p([u(a).e("bar"), u(a).is("horizontal")]),
2302
+ style: F({ width: i.value, left: `${k.value}%` })
2306
2303
  }, null, 6)) : j("", !0)
2307
2304
  ], 2));
2308
2305
  }
@@ -2322,15 +2319,15 @@ const on = /* @__PURE__ */ Z({
2322
2319
  activeNames: a,
2323
2320
  handleItemClick: (l) => {
2324
2321
  if (n.accordion) {
2325
- const c = a.value.includes(l) ? "" : l;
2326
- a.value = c ? [c] : [], e("update:modelValue", c), e("change", c);
2322
+ const i = a.value.includes(l) ? "" : l;
2323
+ a.value = i ? [i] : [], e("update:modelValue", i), e("change", i);
2327
2324
  } else {
2328
- const c = a.value.indexOf(l);
2329
- c > -1 ? a.value.splice(c, 1) : a.value.push(l), e("update:modelValue", a.value), e("change", a.value);
2325
+ const i = a.value.indexOf(l);
2326
+ i > -1 ? a.value.splice(i, 1) : a.value.push(l), e("update:modelValue", a.value), e("change", a.value);
2330
2327
  }
2331
2328
  }
2332
- }), (l, c) => (M(), b("div", {
2333
- class: p(d(o).b())
2329
+ }), (l, i) => (M(), w("div", {
2330
+ class: p(u(o).b())
2334
2331
  }, [
2335
2332
  G(l.$slots, "default")
2336
2333
  ], 2));
@@ -2344,42 +2341,42 @@ const on = /* @__PURE__ */ Z({
2344
2341
  disabled: { type: Boolean }
2345
2342
  },
2346
2343
  setup(s) {
2347
- const r = s, n = J("collapse-item"), e = ge("collapse"), { activeNames: o, handleItemClick: a } = e, t = B(() => o.value.includes(r.name)), l = () => {
2344
+ const r = s, n = J("collapse-item"), e = ge("collapse"), { activeNames: o, handleItemClick: a } = e, t = $(() => o.value.includes(r.name)), l = () => {
2348
2345
  r.disabled || a(r.name);
2349
2346
  };
2350
- return (c, k) => (M(), b("div", {
2351
- class: p([d(n).b(), d(n).is("active", t.value), d(n).is("disabled", s.disabled)])
2347
+ return (i, z) => (M(), w("div", {
2348
+ class: p([u(n).b(), u(n).is("active", t.value), u(n).is("disabled", s.disabled)])
2352
2349
  }, [
2353
2350
  A("div", {
2354
- class: p(d(n).e("header")),
2351
+ class: p(u(n).e("header")),
2355
2352
  onClick: l
2356
2353
  }, [
2357
2354
  A("span", {
2358
- class: p(d(n).e("arrow"))
2355
+ class: p(u(n).e("arrow"))
2359
2356
  }, [
2360
- ne(d(te), {
2357
+ ne(u(te), {
2361
2358
  name: "right",
2362
2359
  size: 12
2363
2360
  })
2364
2361
  ], 2),
2365
- G(c.$slots, "title", {}, () => [
2366
- ae(Q(s.title), 1)
2362
+ G(i.$slots, "title", {}, () => [
2363
+ ae(U(s.title), 1)
2367
2364
  ])
2368
2365
  ], 2),
2369
2366
  ze(A("div", {
2370
- class: p(d(n).e("content"))
2367
+ class: p(u(n).e("content"))
2371
2368
  }, [
2372
2369
  A("div", {
2373
- class: p(d(n).e("content-box"))
2370
+ class: p(u(n).e("content-box"))
2374
2371
  }, [
2375
- G(c.$slots, "default")
2372
+ G(i.$slots, "default")
2376
2373
  ], 2)
2377
2374
  ], 2), [
2378
2375
  [$e, t.value]
2379
2376
  ])
2380
2377
  ], 2));
2381
2378
  }
2382
- }), Ot = ["src", "loading"], Wt = ["src"], Ae = 0.2, De = 8, xn = /* @__PURE__ */ Z({
2379
+ }), _t = ["src", "loading"], Wt = ["src"], De = 0.2, Le = 8, xn = /* @__PURE__ */ Z({
2383
2380
  name: "XImage",
2384
2381
  __name: "index",
2385
2382
  props: {
@@ -2396,46 +2393,46 @@ const on = /* @__PURE__ */ Z({
2396
2393
  },
2397
2394
  emits: ["load", "error"],
2398
2395
  setup(s, { emit: r }) {
2399
- const n = s, e = r, o = J("image"), a = _(!0), t = _(!1), l = _(!1), c = _(0), k = _(1), x = _(0), w = _(0), z = _(0), S = _(!1), V = _({ x: 0, y: 0 }), P = _({ x: 0, y: 0 }), W = _(null), E = B(() => ({
2396
+ const n = s, e = r, o = J("image"), a = _(!0), t = _(!1), l = _(!1), i = _(0), z = _(1), k = _(0), x = _(0), C = _(0), S = _(!1), P = _({ x: 0, y: 0 }), V = _({ x: 0, y: 0 }), W = _(null), E = $(() => ({
2400
2397
  width: typeof n.width == "number" ? `${n.width}px` : n.width,
2401
2398
  height: typeof n.height == "number" ? `${n.height}px` : n.height,
2402
2399
  objectFit: n.fit
2403
- })), $ = B(() => n.previewList.length > 0 ? n.previewList : [n.src]), K = B(() => $.value[c.value]), N = B(
2404
- () => `translate(${w.value}px, ${z.value}px) scale(${k.value}) rotate(${x.value}deg)`
2400
+ })), B = $(() => n.previewList.length > 0 ? n.previewList : [n.src]), H = $(() => B.value[i.value]), K = $(
2401
+ () => `translate(${x.value}px, ${C.value}px) scale(${z.value}) rotate(${k.value}deg)`
2405
2402
  ), Y = () => {
2406
- k.value = 1, x.value = 0, w.value = 0, z.value = 0, S.value = !1;
2403
+ z.value = 1, k.value = 0, x.value = 0, C.value = 0, S.value = !1;
2407
2404
  }, ee = (O) => {
2408
2405
  a.value = !1, e("load", O);
2409
2406
  }, v = (O) => {
2410
2407
  a.value = !1, t.value = !0, e("error", O);
2411
- }, C = () => {
2412
- n.preview && (c.value = n.initialIndex, Y(), l.value = !0);
2413
- }, y = () => {
2408
+ }, b = () => {
2409
+ n.preview && (i.value = n.initialIndex, Y(), l.value = !0);
2410
+ }, m = () => {
2414
2411
  l.value = !1, Y();
2415
2412
  }, D = () => {
2416
- $.value.length <= 1 || (c.value = c.value > 0 ? c.value - 1 : $.value.length - 1);
2413
+ B.value.length <= 1 || (i.value = i.value > 0 ? i.value - 1 : B.value.length - 1);
2417
2414
  }, I = () => {
2418
- $.value.length <= 1 || (c.value = c.value < $.value.length - 1 ? c.value + 1 : 0);
2415
+ B.value.length <= 1 || (i.value = i.value < B.value.length - 1 ? i.value + 1 : 0);
2419
2416
  }, g = () => {
2420
- k.value = Math.min(De, k.value * 1.25);
2417
+ z.value = Math.min(Le, z.value * 1.25);
2421
2418
  }, L = () => {
2422
- k.value = Math.max(Ae, k.value / 1.25), k.value <= 1 && (w.value = 0, z.value = 0);
2423
- }, i = () => Y(), u = () => {
2419
+ z.value = Math.max(De, z.value / 1.25), z.value <= 1 && (x.value = 0, C.value = 0);
2420
+ }, f = () => Y(), c = () => {
2424
2421
  const O = W.value;
2425
2422
  if (!O || !O.naturalWidth) return;
2426
- const U = O.getBoundingClientRect();
2427
- U.width <= 0 || (k.value = Math.min(De, Math.max(Ae, k.value * (O.naturalWidth / U.width))));
2428
- }, f = () => {
2429
- x.value = (x.value + 90) % 360;
2430
- }, m = () => {
2423
+ const Q = O.getBoundingClientRect();
2424
+ Q.width <= 0 || (z.value = Math.min(Le, Math.max(De, z.value * (O.naturalWidth / Q.width))));
2425
+ }, d = () => {
2426
+ k.value = (k.value + 90) % 360;
2427
+ }, y = () => {
2431
2428
  const O = document.createElement("a");
2432
- O.href = K.value, O.download = "", O.target = "_blank", O.rel = "noopener", O.click();
2429
+ O.href = H.value, O.download = "", O.target = "_blank", O.rel = "noopener", O.click();
2433
2430
  }, h = (O) => {
2434
2431
  O.preventDefault(), O.deltaY < 0 ? g() : L();
2435
2432
  }, T = (O) => {
2436
- k.value <= 1 || (S.value = !0, V.value = { x: O.clientX, y: O.clientY }, P.value = { x: w.value, y: z.value });
2437
- }, H = (O) => {
2438
- S.value && (w.value = P.value.x + (O.clientX - V.value.x), z.value = P.value.y + (O.clientY - V.value.y));
2433
+ z.value <= 1 || (S.value = !0, P.value = { x: O.clientX, y: O.clientY }, V.value = { x: x.value, y: C.value });
2434
+ }, N = (O) => {
2435
+ S.value && (x.value = V.value.x + (O.clientX - P.value.x), C.value = V.value.y + (O.clientY - P.value.y));
2439
2436
  }, R = () => {
2440
2437
  S.value = !1;
2441
2438
  }, X = (O) => {
@@ -2448,7 +2445,7 @@ const on = /* @__PURE__ */ Z({
2448
2445
  I();
2449
2446
  break;
2450
2447
  case "Escape":
2451
- y();
2448
+ m();
2452
2449
  break;
2453
2450
  case "+":
2454
2451
  case "=":
@@ -2459,7 +2456,7 @@ const on = /* @__PURE__ */ Z({
2459
2456
  break;
2460
2457
  case "r":
2461
2458
  case "R":
2462
- f();
2459
+ d();
2463
2460
  break;
2464
2461
  case "0":
2465
2462
  Y();
@@ -2468,58 +2465,58 @@ const on = /* @__PURE__ */ Z({
2468
2465
  };
2469
2466
  return typeof window < "u" && window.addEventListener("keydown", X), me(() => {
2470
2467
  typeof window < "u" && window.removeEventListener("keydown", X);
2471
- }), se(c, () => Y()), (O, U) => (M(), b("div", {
2472
- class: p(d(o).b()),
2468
+ }), se(i, () => Y()), (O, Q) => (M(), w("div", {
2469
+ class: p(u(o).b()),
2473
2470
  style: F({ width: E.value.width, height: E.value.height })
2474
2471
  }, [
2475
2472
  A("img", {
2476
2473
  src: s.src,
2477
- class: p(d(o).e("inner")),
2474
+ class: p(u(o).e("inner")),
2478
2475
  style: F(E.value),
2479
2476
  loading: s.lazy ? "lazy" : "eager",
2480
2477
  onLoad: ee,
2481
2478
  onError: v,
2482
- onClick: C
2483
- }, null, 46, Ot),
2484
- a.value ? (M(), b("div", {
2479
+ onClick: b
2480
+ }, null, 46, _t),
2481
+ a.value ? (M(), w("div", {
2485
2482
  key: 0,
2486
- class: p(d(o).e("placeholder"))
2483
+ class: p(u(o).e("placeholder"))
2487
2484
  }, [
2488
2485
  G(O.$slots, "placeholder", {}, () => [
2489
- ne(d(te), {
2486
+ ne(u(te), {
2490
2487
  name: "loading",
2491
2488
  size: 24
2492
2489
  })
2493
2490
  ])
2494
2491
  ], 2)) : j("", !0),
2495
- t.value ? (M(), b("div", {
2492
+ t.value ? (M(), w("div", {
2496
2493
  key: 1,
2497
- class: p(d(o).e("error"))
2494
+ class: p(u(o).e("error"))
2498
2495
  }, [
2499
2496
  G(O.$slots, "error", {}, () => [
2500
- ne(d(te), {
2497
+ ne(u(te), {
2501
2498
  name: "image",
2502
2499
  size: 24
2503
2500
  }),
2504
- U[2] || (U[2] = A("span", null, "加载失败", -1))
2501
+ Q[2] || (Q[2] = A("span", null, "加载失败", -1))
2505
2502
  ])
2506
2503
  ], 2)) : j("", !0),
2507
- (M(), re(je, { to: "body" }, [
2508
- l.value ? (M(), b("div", {
2504
+ (M(), re(Oe, { to: "body" }, [
2505
+ l.value ? (M(), w("div", {
2509
2506
  key: 0,
2510
- class: p(d(o).e("preview")),
2511
- onClick: y
2507
+ class: p(u(o).e("preview")),
2508
+ onClick: m
2512
2509
  }, [
2513
2510
  A("div", {
2514
- class: p(d(o).e("preview-toolbar")),
2515
- onClick: U[0] || (U[0] = ie(() => {
2511
+ class: p(u(o).e("preview-toolbar")),
2512
+ onClick: Q[0] || (Q[0] = ie(() => {
2516
2513
  }, ["stop"]))
2517
2514
  }, [
2518
2515
  A("span", {
2519
- class: p(d(o).e("preview-tool")),
2516
+ class: p(u(o).e("preview-tool")),
2520
2517
  title: "放大",
2521
2518
  onClick: g
2522
- }, [...U[3] || (U[3] = [
2519
+ }, [...Q[3] || (Q[3] = [
2523
2520
  A("svg", {
2524
2521
  viewBox: "0 0 24 24",
2525
2522
  fill: "none",
@@ -2541,10 +2538,10 @@ const on = /* @__PURE__ */ Z({
2541
2538
  ], -1)
2542
2539
  ])], 2),
2543
2540
  A("span", {
2544
- class: p(d(o).e("preview-tool")),
2541
+ class: p(u(o).e("preview-tool")),
2545
2542
  title: "缩小",
2546
2543
  onClick: L
2547
- }, [...U[4] || (U[4] = [
2544
+ }, [...Q[4] || (Q[4] = [
2548
2545
  A("svg", {
2549
2546
  viewBox: "0 0 24 24",
2550
2547
  fill: "none",
@@ -2566,10 +2563,10 @@ const on = /* @__PURE__ */ Z({
2566
2563
  ], -1)
2567
2564
  ])], 2),
2568
2565
  A("span", {
2569
- class: p(d(o).e("preview-tool")),
2566
+ class: p(u(o).e("preview-tool")),
2570
2567
  title: "1:1 实际大小",
2571
- onClick: u
2572
- }, [...U[5] || (U[5] = [
2568
+ onClick: c
2569
+ }, [...Q[5] || (Q[5] = [
2573
2570
  A("svg", {
2574
2571
  viewBox: "0 0 24 24",
2575
2572
  fill: "none",
@@ -2586,10 +2583,10 @@ const on = /* @__PURE__ */ Z({
2586
2583
  ], -1)
2587
2584
  ])], 2),
2588
2585
  A("span", {
2589
- class: p(d(o).e("preview-tool")),
2586
+ class: p(u(o).e("preview-tool")),
2590
2587
  title: "适应窗口",
2591
- onClick: i
2592
- }, [...U[6] || (U[6] = [
2588
+ onClick: f
2589
+ }, [...Q[6] || (Q[6] = [
2593
2590
  A("svg", {
2594
2591
  viewBox: "0 0 24 24",
2595
2592
  fill: "none",
@@ -2606,10 +2603,10 @@ const on = /* @__PURE__ */ Z({
2606
2603
  ], -1)
2607
2604
  ])], 2),
2608
2605
  A("span", {
2609
- class: p(d(o).e("preview-tool")),
2606
+ class: p(u(o).e("preview-tool")),
2610
2607
  title: "旋转",
2611
- onClick: f
2612
- }, [...U[7] || (U[7] = [
2608
+ onClick: d
2609
+ }, [...Q[7] || (Q[7] = [
2613
2610
  A("svg", {
2614
2611
  viewBox: "0 0 24 24",
2615
2612
  fill: "none",
@@ -2626,10 +2623,10 @@ const on = /* @__PURE__ */ Z({
2626
2623
  ], -1)
2627
2624
  ])], 2),
2628
2625
  A("span", {
2629
- class: p(d(o).e("preview-tool")),
2626
+ class: p(u(o).e("preview-tool")),
2630
2627
  title: "下载",
2631
- onClick: m
2632
- }, [...U[8] || (U[8] = [
2628
+ onClick: y
2629
+ }, [...Q[8] || (Q[8] = [
2633
2630
  A("svg", {
2634
2631
  viewBox: "0 0 24 24",
2635
2632
  fill: "none",
@@ -2646,10 +2643,10 @@ const on = /* @__PURE__ */ Z({
2646
2643
  ], -1)
2647
2644
  ])], 2),
2648
2645
  A("span", {
2649
- class: p(d(o).e("preview-close")),
2646
+ class: p(u(o).e("preview-close")),
2650
2647
  title: "关闭",
2651
- onClick: ie(y, ["stop"])
2652
- }, [...U[9] || (U[9] = [
2648
+ onClick: ie(m, ["stop"])
2649
+ }, [...Q[9] || (Q[9] = [
2653
2650
  A("svg", {
2654
2651
  viewBox: "0 0 24 24",
2655
2652
  fill: "none",
@@ -2669,47 +2666,47 @@ const on = /* @__PURE__ */ Z({
2669
2666
  A("img", {
2670
2667
  ref_key: "previewImgRef",
2671
2668
  ref: W,
2672
- src: K.value,
2673
- class: p([d(o).e("preview-image"), { "is-zoomable": k.value > 1 }]),
2674
- style: F({ transform: N.value }),
2669
+ src: H.value,
2670
+ class: p([u(o).e("preview-image"), { "is-zoomable": z.value > 1 }]),
2671
+ style: F({ transform: K.value }),
2675
2672
  draggable: !1,
2676
- onClick: U[1] || (U[1] = ie(() => {
2673
+ onClick: Q[1] || (Q[1] = ie(() => {
2677
2674
  }, ["stop"])),
2678
2675
  onWheel: ie(h, ["prevent"]),
2679
2676
  onMousedown: T,
2680
- onMousemove: H,
2677
+ onMousemove: N,
2681
2678
  onMouseup: R,
2682
2679
  onMouseleave: R
2683
2680
  }, null, 46, Wt),
2684
- $.value.length > 1 ? (M(), b("span", {
2681
+ B.value.length > 1 ? (M(), w("span", {
2685
2682
  key: 0,
2686
- class: p([d(o).e("preview-arrow"), d(o).em("preview-arrow", "left")]),
2683
+ class: p([u(o).e("preview-arrow"), u(o).em("preview-arrow", "left")]),
2687
2684
  onClick: ie(D, ["stop"])
2688
2685
  }, [
2689
- ne(d(te), {
2686
+ ne(u(te), {
2690
2687
  name: "left",
2691
2688
  size: 24
2692
2689
  })
2693
2690
  ], 2)) : j("", !0),
2694
- $.value.length > 1 ? (M(), b("span", {
2691
+ B.value.length > 1 ? (M(), w("span", {
2695
2692
  key: 1,
2696
- class: p([d(o).e("preview-arrow"), d(o).em("preview-arrow", "right")]),
2693
+ class: p([u(o).e("preview-arrow"), u(o).em("preview-arrow", "right")]),
2697
2694
  onClick: ie(I, ["stop"])
2698
2695
  }, [
2699
- ne(d(te), {
2696
+ ne(u(te), {
2700
2697
  name: "right",
2701
2698
  size: 24
2702
2699
  })
2703
2700
  ], 2)) : j("", !0),
2704
- $.value.length > 1 ? (M(), b("div", {
2701
+ B.value.length > 1 ? (M(), w("div", {
2705
2702
  key: 2,
2706
- class: p(d(o).e("preview-counter"))
2707
- }, Q(c.value + 1) + " / " + Q($.value.length), 3)) : j("", !0)
2703
+ class: p(u(o).e("preview-counter"))
2704
+ }, U(i.value + 1) + " / " + U(B.value.length), 3)) : j("", !0)
2708
2705
  ], 2)) : j("", !0)
2709
2706
  ]))
2710
2707
  ], 6));
2711
2708
  }
2712
- }), _t = ["onClick"], bn = /* @__PURE__ */ Z({
2709
+ }), Yt = ["onClick"], bn = /* @__PURE__ */ Z({
2713
2710
  name: "XCalendar",
2714
2711
  __name: "index",
2715
2712
  props: {
@@ -2718,100 +2715,100 @@ const on = /* @__PURE__ */ Z({
2718
2715
  },
2719
2716
  emits: ["update:modelValue", "select", "change"],
2720
2717
  setup(s, { emit: r }) {
2721
- const n = s, e = r, o = J("calendar"), a = _(n.modelValue.getFullYear()), t = _(n.modelValue.getMonth()), l = ["日", "一", "二", "三", "四", "五", "六"], c = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], k = /* @__PURE__ */ new Date(), x = B(() => {
2722
- const $ = [], K = new Date(a.value, t.value, 1), N = new Date(a.value, t.value + 1, 0), Y = K.getDay();
2718
+ const n = s, e = r, o = J("calendar"), a = _(n.modelValue.getFullYear()), t = _(n.modelValue.getMonth()), l = ["日", "一", "二", "三", "四", "五", "六"], i = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], z = /* @__PURE__ */ new Date(), k = $(() => {
2719
+ const B = [], H = new Date(a.value, t.value, 1), K = new Date(a.value, t.value + 1, 0), Y = H.getDay();
2723
2720
  for (let v = Y - 1; v >= 0; v--) {
2724
- const C = new Date(a.value, t.value, -v);
2725
- $.push({
2726
- date: C,
2721
+ const b = new Date(a.value, t.value, -v);
2722
+ B.push({
2723
+ date: b,
2727
2724
  isCurrentMonth: !1,
2728
- isToday: w(C, k),
2729
- isSelected: w(C, n.modelValue)
2725
+ isToday: x(b, z),
2726
+ isSelected: x(b, n.modelValue)
2730
2727
  });
2731
2728
  }
2732
- for (let v = 1; v <= N.getDate(); v++) {
2733
- const C = new Date(a.value, t.value, v);
2734
- $.push({
2735
- date: C,
2729
+ for (let v = 1; v <= K.getDate(); v++) {
2730
+ const b = new Date(a.value, t.value, v);
2731
+ B.push({
2732
+ date: b,
2736
2733
  isCurrentMonth: !0,
2737
- isToday: w(C, k),
2738
- isSelected: w(C, n.modelValue)
2734
+ isToday: x(b, z),
2735
+ isSelected: x(b, n.modelValue)
2739
2736
  });
2740
2737
  }
2741
- const ee = 42 - $.length;
2738
+ const ee = 42 - B.length;
2742
2739
  for (let v = 1; v <= ee; v++) {
2743
- const C = new Date(a.value, t.value + 1, v);
2744
- $.push({
2745
- date: C,
2740
+ const b = new Date(a.value, t.value + 1, v);
2741
+ B.push({
2742
+ date: b,
2746
2743
  isCurrentMonth: !1,
2747
- isToday: w(C, k),
2748
- isSelected: w(C, n.modelValue)
2744
+ isToday: x(b, z),
2745
+ isSelected: x(b, n.modelValue)
2749
2746
  });
2750
2747
  }
2751
- return $;
2752
- }), w = ($, K) => $.getFullYear() === K.getFullYear() && $.getMonth() === K.getMonth() && $.getDate() === K.getDate(), z = ($) => {
2753
- e("update:modelValue", $.date), e("select", $.date), e("change", $.date);
2748
+ return B;
2749
+ }), x = (B, H) => B.getFullYear() === H.getFullYear() && B.getMonth() === H.getMonth() && B.getDate() === H.getDate(), C = (B) => {
2750
+ e("update:modelValue", B.date), e("select", B.date), e("change", B.date);
2754
2751
  }, S = () => {
2755
2752
  a.value--;
2756
- }, V = () => {
2757
- a.value++;
2758
2753
  }, P = () => {
2754
+ a.value++;
2755
+ }, V = () => {
2759
2756
  t.value === 0 ? (t.value = 11, a.value--) : t.value--;
2760
2757
  }, W = () => {
2761
2758
  t.value === 11 ? (t.value = 0, a.value++) : t.value++;
2762
2759
  }, E = () => {
2763
- a.value = k.getFullYear(), t.value = k.getMonth(), e("update:modelValue", k), e("select", k);
2760
+ a.value = z.getFullYear(), t.value = z.getMonth(), e("update:modelValue", z), e("select", z);
2764
2761
  };
2765
- return se(() => n.modelValue, ($) => {
2766
- a.value = $.getFullYear(), t.value = $.getMonth();
2767
- }), ($, K) => (M(), b("div", {
2768
- class: p(d(o).b())
2762
+ return se(() => n.modelValue, (B) => {
2763
+ a.value = B.getFullYear(), t.value = B.getMonth();
2764
+ }), (B, H) => (M(), w("div", {
2765
+ class: p(u(o).b())
2769
2766
  }, [
2770
2767
  A("div", {
2771
- class: p(d(o).e("header"))
2768
+ class: p(u(o).e("header"))
2772
2769
  }, [
2773
2770
  A("div", {
2774
- class: p(d(o).e("title"))
2775
- }, Q(a.value) + " 年 " + Q(c[t.value]), 3),
2771
+ class: p(u(o).e("title"))
2772
+ }, U(a.value) + " 年 " + U(i[t.value]), 3),
2776
2773
  A("div", {
2777
- class: p(d(o).e("actions"))
2774
+ class: p(u(o).e("actions"))
2778
2775
  }, [
2779
2776
  A("button", {
2780
- class: p(d(o).e("btn")),
2777
+ class: p(u(o).e("btn")),
2781
2778
  onClick: S
2782
2779
  }, [
2783
- ne(d(te), {
2780
+ ne(u(te), {
2784
2781
  name: "d-arrow-left",
2785
2782
  size: 12
2786
2783
  })
2787
2784
  ], 2),
2788
2785
  A("button", {
2789
- class: p(d(o).e("btn")),
2790
- onClick: P
2786
+ class: p(u(o).e("btn")),
2787
+ onClick: V
2791
2788
  }, [
2792
- ne(d(te), {
2789
+ ne(u(te), {
2793
2790
  name: "arrow-left",
2794
2791
  size: 12
2795
2792
  })
2796
2793
  ], 2),
2797
2794
  A("button", {
2798
- class: p(d(o).e("btn")),
2795
+ class: p(u(o).e("btn")),
2799
2796
  onClick: E
2800
2797
  }, "今天", 2),
2801
2798
  A("button", {
2802
- class: p(d(o).e("btn")),
2799
+ class: p(u(o).e("btn")),
2803
2800
  onClick: W
2804
2801
  }, [
2805
- ne(d(te), {
2802
+ ne(u(te), {
2806
2803
  name: "arrow-right",
2807
2804
  size: 12
2808
2805
  })
2809
2806
  ], 2),
2810
2807
  A("button", {
2811
- class: p(d(o).e("btn")),
2812
- onClick: V
2808
+ class: p(u(o).e("btn")),
2809
+ onClick: P
2813
2810
  }, [
2814
- ne(d(te), {
2811
+ ne(u(te), {
2815
2812
  name: "d-arrow-right",
2816
2813
  size: 12
2817
2814
  })
@@ -2819,90 +2816,90 @@ const on = /* @__PURE__ */ Z({
2819
2816
  ], 2)
2820
2817
  ], 2),
2821
2818
  A("div", {
2822
- class: p(d(o).e("weekdays"))
2819
+ class: p(u(o).e("weekdays"))
2823
2820
  }, [
2824
- (M(), b(q, null, le(l, (N) => A("div", {
2825
- key: N,
2826
- class: p(d(o).e("weekday"))
2827
- }, Q(N), 3)), 64))
2821
+ (M(), w(q, null, le(l, (K) => A("div", {
2822
+ key: K,
2823
+ class: p(u(o).e("weekday"))
2824
+ }, U(K), 3)), 64))
2828
2825
  ], 2),
2829
2826
  A("div", {
2830
- class: p(d(o).e("body"))
2827
+ class: p(u(o).e("body"))
2831
2828
  }, [
2832
- (M(!0), b(q, null, le(x.value, (N, Y) => (M(), b("div", {
2829
+ (M(!0), w(q, null, le(k.value, (K, Y) => (M(), w("div", {
2833
2830
  key: Y,
2834
2831
  class: p([
2835
- d(o).e("day"),
2836
- d(o).is("current-month", N.isCurrentMonth),
2837
- d(o).is("today", N.isToday),
2838
- d(o).is("selected", N.isSelected)
2832
+ u(o).e("day"),
2833
+ u(o).is("current-month", K.isCurrentMonth),
2834
+ u(o).is("today", K.isToday),
2835
+ u(o).is("selected", K.isSelected)
2839
2836
  ]),
2840
- onClick: (ee) => z(N)
2837
+ onClick: (ee) => C(K)
2841
2838
  }, [
2842
- G($.$slots, "default", {
2843
- date: N.date,
2844
- isCurrentMonth: N.isCurrentMonth
2839
+ G(B.$slots, "default", {
2840
+ date: K.date,
2841
+ isCurrentMonth: K.isCurrentMonth
2845
2842
  }, () => [
2846
- ae(Q(N.date.getDate()), 1)
2843
+ ae(U(K.date.getDate()), 1)
2847
2844
  ])
2848
- ], 10, _t))), 128))
2845
+ ], 10, Yt))), 128))
2849
2846
  ], 2)
2850
2847
  ], 2));
2851
2848
  }
2852
2849
  }), fe = function(s, r) {
2853
2850
  let o = s;
2854
2851
  const a = Me[r];
2855
- let t = null, l = 0, c = null;
2856
- const k = [], x = {}, w = function(v, C) {
2857
- l = o * 4 + 17, t = function(y) {
2858
- const D = new Array(y);
2859
- for (let I = 0; I < y; I += 1) {
2860
- D[I] = new Array(y);
2861
- for (let g = 0; g < y; g += 1)
2852
+ let t = null, l = 0, i = null;
2853
+ const z = [], k = {}, x = function(v, b) {
2854
+ l = o * 4 + 17, t = function(m) {
2855
+ const D = new Array(m);
2856
+ for (let I = 0; I < m; I += 1) {
2857
+ D[I] = new Array(m);
2858
+ for (let g = 0; g < m; g += 1)
2862
2859
  D[I][g] = null;
2863
2860
  }
2864
2861
  return D;
2865
- }(l), z(0, 0), z(l - 7, 0), z(0, l - 7), P(), V(), E(v, C), o >= 7 && W(v), c == null && (c = N(o, a, k)), $(c, C);
2866
- }, z = function(v, C) {
2867
- for (let y = -1; y <= 7; y += 1)
2868
- if (!(v + y <= -1 || l <= v + y))
2862
+ }(l), C(0, 0), C(l - 7, 0), C(0, l - 7), V(), P(), E(v, b), o >= 7 && W(v), i == null && (i = K(o, a, z)), B(i, b);
2863
+ }, C = function(v, b) {
2864
+ for (let m = -1; m <= 7; m += 1)
2865
+ if (!(v + m <= -1 || l <= v + m))
2869
2866
  for (let D = -1; D <= 7; D += 1)
2870
- C + D <= -1 || l <= C + D || (0 <= y && y <= 6 && (D == 0 || D == 6) || 0 <= D && D <= 6 && (y == 0 || y == 6) || 2 <= y && y <= 4 && 2 <= D && D <= 4 ? t[v + y][C + D] = !0 : t[v + y][C + D] = !1);
2867
+ b + D <= -1 || l <= b + D || (0 <= m && m <= 6 && (D == 0 || D == 6) || 0 <= D && D <= 6 && (m == 0 || m == 6) || 2 <= m && m <= 4 && 2 <= D && D <= 4 ? t[v + m][b + D] = !0 : t[v + m][b + D] = !1);
2871
2868
  }, S = function() {
2872
- let v = 0, C = 0;
2873
- for (let y = 0; y < 8; y += 1) {
2874
- w(!0, y);
2875
- const D = ue.getLostPoint(x);
2876
- (y == 0 || v > D) && (v = D, C = y);
2869
+ let v = 0, b = 0;
2870
+ for (let m = 0; m < 8; m += 1) {
2871
+ x(!0, m);
2872
+ const D = ue.getLostPoint(k);
2873
+ (m == 0 || v > D) && (v = D, b = m);
2877
2874
  }
2878
- return C;
2879
- }, V = function() {
2875
+ return b;
2876
+ }, P = function() {
2880
2877
  for (let v = 8; v < l - 8; v += 1)
2881
2878
  t[v][6] == null && (t[v][6] = v % 2 == 0);
2882
2879
  for (let v = 8; v < l - 8; v += 1)
2883
2880
  t[6][v] == null && (t[6][v] = v % 2 == 0);
2884
- }, P = function() {
2881
+ }, V = function() {
2885
2882
  const v = ue.getPatternPosition(o);
2886
- for (let C = 0; C < v.length; C += 1)
2887
- for (let y = 0; y < v.length; y += 1) {
2888
- const D = v[C], I = v[y];
2883
+ for (let b = 0; b < v.length; b += 1)
2884
+ for (let m = 0; m < v.length; m += 1) {
2885
+ const D = v[b], I = v[m];
2889
2886
  if (t[D][I] == null)
2890
2887
  for (let g = -2; g <= 2; g += 1)
2891
2888
  for (let L = -2; L <= 2; L += 1)
2892
2889
  g == -2 || g == 2 || L == -2 || L == 2 || g == 0 && L == 0 ? t[D + g][I + L] = !0 : t[D + g][I + L] = !1;
2893
2890
  }
2894
2891
  }, W = function(v) {
2895
- const C = ue.getBCHTypeNumber(o);
2896
- for (let y = 0; y < 18; y += 1) {
2897
- const D = !v && (C >> y & 1) == 1;
2898
- t[Math.floor(y / 3)][y % 3 + l - 8 - 3] = D;
2892
+ const b = ue.getBCHTypeNumber(o);
2893
+ for (let m = 0; m < 18; m += 1) {
2894
+ const D = !v && (b >> m & 1) == 1;
2895
+ t[Math.floor(m / 3)][m % 3 + l - 8 - 3] = D;
2899
2896
  }
2900
- for (let y = 0; y < 18; y += 1) {
2901
- const D = !v && (C >> y & 1) == 1;
2902
- t[y % 3 + l - 8 - 3][Math.floor(y / 3)] = D;
2897
+ for (let m = 0; m < 18; m += 1) {
2898
+ const D = !v && (b >> m & 1) == 1;
2899
+ t[m % 3 + l - 8 - 3][Math.floor(m / 3)] = D;
2903
2900
  }
2904
- }, E = function(v, C) {
2905
- const y = a << 3 | C, D = ue.getBCHTypeInfo(y);
2901
+ }, E = function(v, b) {
2902
+ const m = a << 3 | b, D = ue.getBCHTypeInfo(m);
2906
2903
  for (let I = 0; I < 15; I += 1) {
2907
2904
  const g = !v && (D >> I & 1) == 1;
2908
2905
  I < 6 ? t[I][8] = g : I < 8 ? t[I + 1][8] = g : t[l - 15 + I][8] = g;
@@ -2912,54 +2909,54 @@ const on = /* @__PURE__ */ Z({
2912
2909
  I < 8 ? t[8][l - I - 1] = g : I < 9 ? t[8][15 - I - 1 + 1] = g : t[8][15 - I - 1] = g;
2913
2910
  }
2914
2911
  t[l - 8][8] = !v;
2915
- }, $ = function(v, C) {
2916
- let y = -1, D = l - 1, I = 7, g = 0;
2917
- const L = ue.getMaskFunction(C);
2918
- for (let i = l - 1; i > 0; i -= 2)
2919
- for (i == 6 && (i -= 1); ; ) {
2920
- for (let u = 0; u < 2; u += 1)
2921
- if (t[D][i - u] == null) {
2922
- let f = !1;
2923
- g < v.length && (f = (v[g] >>> I & 1) == 1), L(D, i - u) && (f = !f), t[D][i - u] = f, I -= 1, I == -1 && (g += 1, I = 7);
2912
+ }, B = function(v, b) {
2913
+ let m = -1, D = l - 1, I = 7, g = 0;
2914
+ const L = ue.getMaskFunction(b);
2915
+ for (let f = l - 1; f > 0; f -= 2)
2916
+ for (f == 6 && (f -= 1); ; ) {
2917
+ for (let c = 0; c < 2; c += 1)
2918
+ if (t[D][f - c] == null) {
2919
+ let d = !1;
2920
+ g < v.length && (d = (v[g] >>> I & 1) == 1), L(D, f - c) && (d = !d), t[D][f - c] = d, I -= 1, I == -1 && (g += 1, I = 7);
2924
2921
  }
2925
- if (D += y, D < 0 || l <= D) {
2926
- D -= y, y = -y;
2922
+ if (D += m, D < 0 || l <= D) {
2923
+ D -= m, m = -m;
2927
2924
  break;
2928
2925
  }
2929
2926
  }
2930
- }, K = function(v, C) {
2931
- let y = 0, D = 0, I = 0;
2932
- const g = new Array(C.length), L = new Array(C.length);
2933
- for (let m = 0; m < C.length; m += 1) {
2934
- const h = C[m].dataCount, T = C[m].totalCount - h;
2935
- D = Math.max(D, h), I = Math.max(I, T), g[m] = new Array(h);
2936
- for (let O = 0; O < g[m].length; O += 1)
2937
- g[m][O] = 255 & v.getBuffer()[O + y];
2938
- y += h;
2939
- const H = ue.getErrorCorrectPolynomial(T), X = ke(g[m], H.getLength() - 1).mod(H);
2940
- L[m] = new Array(H.getLength() - 1);
2941
- for (let O = 0; O < L[m].length; O += 1) {
2942
- const U = O + X.getLength() - L[m].length;
2943
- L[m][O] = U >= 0 ? X.getAt(U) : 0;
2927
+ }, H = function(v, b) {
2928
+ let m = 0, D = 0, I = 0;
2929
+ const g = new Array(b.length), L = new Array(b.length);
2930
+ for (let y = 0; y < b.length; y += 1) {
2931
+ const h = b[y].dataCount, T = b[y].totalCount - h;
2932
+ D = Math.max(D, h), I = Math.max(I, T), g[y] = new Array(h);
2933
+ for (let O = 0; O < g[y].length; O += 1)
2934
+ g[y][O] = 255 & v.getBuffer()[O + m];
2935
+ m += h;
2936
+ const N = ue.getErrorCorrectPolynomial(T), X = ke(g[y], N.getLength() - 1).mod(N);
2937
+ L[y] = new Array(N.getLength() - 1);
2938
+ for (let O = 0; O < L[y].length; O += 1) {
2939
+ const Q = O + X.getLength() - L[y].length;
2940
+ L[y][O] = Q >= 0 ? X.getAt(Q) : 0;
2944
2941
  }
2945
2942
  }
2946
- let i = 0;
2947
- for (let m = 0; m < C.length; m += 1)
2948
- i += C[m].totalCount;
2949
- const u = new Array(i);
2950
2943
  let f = 0;
2951
- for (let m = 0; m < D; m += 1)
2952
- for (let h = 0; h < C.length; h += 1)
2953
- m < g[h].length && (u[f] = g[h][m], f += 1);
2954
- for (let m = 0; m < I; m += 1)
2955
- for (let h = 0; h < C.length; h += 1)
2956
- m < L[h].length && (u[f] = L[h][m], f += 1);
2957
- return u;
2958
- }, N = function(v, C, y) {
2959
- const D = Le.getRSBlocks(v, C), I = Te();
2960
- for (let L = 0; L < y.length; L += 1) {
2961
- const i = y[L];
2962
- I.put(i.getMode(), 4), I.put(i.getLength(), ue.getLengthInBits(i.getMode(), v)), i.write(I);
2944
+ for (let y = 0; y < b.length; y += 1)
2945
+ f += b[y].totalCount;
2946
+ const c = new Array(f);
2947
+ let d = 0;
2948
+ for (let y = 0; y < D; y += 1)
2949
+ for (let h = 0; h < b.length; h += 1)
2950
+ y < g[h].length && (c[d] = g[h][y], d += 1);
2951
+ for (let y = 0; y < I; y += 1)
2952
+ for (let h = 0; h < b.length; h += 1)
2953
+ y < L[h].length && (c[d] = L[h][y], d += 1);
2954
+ return c;
2955
+ }, K = function(v, b, m) {
2956
+ const D = Te.getRSBlocks(v, b), I = Be();
2957
+ for (let L = 0; L < m.length; L += 1) {
2958
+ const f = m[L];
2959
+ I.put(f.getMode(), 4), I.put(f.getLength(), ue.getLengthInBits(f.getMode(), v)), f.write(I);
2963
2960
  }
2964
2961
  let g = 0;
2965
2962
  for (let L = 0; L < D.length; L += 1)
@@ -2970,116 +2967,116 @@ const on = /* @__PURE__ */ Z({
2970
2967
  I.putBit(!1);
2971
2968
  for (; !(I.getLengthInBits() >= g * 8 || (I.put(236, 8), I.getLengthInBits() >= g * 8)); )
2972
2969
  I.put(17, 8);
2973
- return K(I, D);
2970
+ return H(I, D);
2974
2971
  };
2975
- x.addData = function(v, C) {
2976
- C = C || "Byte";
2977
- let y = null;
2978
- switch (C) {
2972
+ k.addData = function(v, b) {
2973
+ b = b || "Byte";
2974
+ let m = null;
2975
+ switch (b) {
2979
2976
  case "Numeric":
2980
- y = Yt(v);
2977
+ m = Xt(v);
2981
2978
  break;
2982
2979
  case "Alphanumeric":
2983
- y = Xt(v);
2980
+ m = Qt(v);
2984
2981
  break;
2985
2982
  case "Byte":
2986
- y = Qt(v);
2983
+ m = Ut(v);
2987
2984
  break;
2988
2985
  case "Kanji":
2989
- y = Ut(v);
2986
+ m = Ft(v);
2990
2987
  break;
2991
2988
  default:
2992
- throw "mode:" + C;
2989
+ throw "mode:" + b;
2993
2990
  }
2994
- k.push(y), c = null;
2995
- }, x.isDark = function(v, C) {
2996
- if (v < 0 || l <= v || C < 0 || l <= C)
2997
- throw v + "," + C;
2998
- return t[v][C];
2999
- }, x.getModuleCount = function() {
2991
+ z.push(m), i = null;
2992
+ }, k.isDark = function(v, b) {
2993
+ if (v < 0 || l <= v || b < 0 || l <= b)
2994
+ throw v + "," + b;
2995
+ return t[v][b];
2996
+ }, k.getModuleCount = function() {
3000
2997
  return l;
3001
- }, x.make = function() {
2998
+ }, k.make = function() {
3002
2999
  if (o < 1) {
3003
3000
  let v = 1;
3004
3001
  for (; v < 40; v++) {
3005
- const C = Le.getRSBlocks(v, a), y = Te();
3006
- for (let I = 0; I < k.length; I++) {
3007
- const g = k[I];
3008
- y.put(g.getMode(), 4), y.put(g.getLength(), ue.getLengthInBits(g.getMode(), v)), g.write(y);
3002
+ const b = Te.getRSBlocks(v, a), m = Be();
3003
+ for (let I = 0; I < z.length; I++) {
3004
+ const g = z[I];
3005
+ m.put(g.getMode(), 4), m.put(g.getLength(), ue.getLengthInBits(g.getMode(), v)), g.write(m);
3009
3006
  }
3010
3007
  let D = 0;
3011
- for (let I = 0; I < C.length; I++)
3012
- D += C[I].dataCount;
3013
- if (y.getLengthInBits() <= D * 8)
3008
+ for (let I = 0; I < b.length; I++)
3009
+ D += b[I].dataCount;
3010
+ if (m.getLengthInBits() <= D * 8)
3014
3011
  break;
3015
3012
  }
3016
3013
  o = v;
3017
3014
  }
3018
- w(!1, S());
3019
- }, x.createTableTag = function(v, C) {
3020
- v = v || 2, C = typeof C > "u" ? v * 4 : C;
3021
- let y = "";
3022
- y += '<table style="', y += " border-width: 0px; border-style: none;", y += " border-collapse: collapse;", y += " padding: 0px; margin: " + C + "px;", y += '">', y += "<tbody>";
3023
- for (let D = 0; D < x.getModuleCount(); D += 1) {
3024
- y += "<tr>";
3025
- for (let I = 0; I < x.getModuleCount(); I += 1)
3026
- y += '<td style="', y += " border-width: 0px; border-style: none;", y += " border-collapse: collapse;", y += " padding: 0px; margin: 0px;", y += " width: " + v + "px;", y += " height: " + v + "px;", y += " background-color: ", y += x.isDark(D, I) ? "#000000" : "#ffffff", y += ";", y += '"/>';
3027
- y += "</tr>";
3015
+ x(!1, S());
3016
+ }, k.createTableTag = function(v, b) {
3017
+ v = v || 2, b = typeof b > "u" ? v * 4 : b;
3018
+ let m = "";
3019
+ m += '<table style="', m += " border-width: 0px; border-style: none;", m += " border-collapse: collapse;", m += " padding: 0px; margin: " + b + "px;", m += '">', m += "<tbody>";
3020
+ for (let D = 0; D < k.getModuleCount(); D += 1) {
3021
+ m += "<tr>";
3022
+ for (let I = 0; I < k.getModuleCount(); I += 1)
3023
+ m += '<td style="', m += " border-width: 0px; border-style: none;", m += " border-collapse: collapse;", m += " padding: 0px; margin: 0px;", m += " width: " + v + "px;", m += " height: " + v + "px;", m += " background-color: ", m += k.isDark(D, I) ? "#000000" : "#ffffff", m += ";", m += '"/>';
3024
+ m += "</tr>";
3028
3025
  }
3029
- return y += "</tbody>", y += "</table>", y;
3030
- }, x.createSvgTag = function(v, C, y, D) {
3026
+ return m += "</tbody>", m += "</table>", m;
3027
+ }, k.createSvgTag = function(v, b, m, D) {
3031
3028
  let I = {};
3032
- typeof arguments[0] == "object" && (I = arguments[0], v = I.cellSize, C = I.margin, y = I.alt, D = I.title), v = v || 2, C = typeof C > "u" ? v * 4 : C, y = typeof y == "string" ? { text: y } : y || {}, y.text = y.text || null, y.id = y.text ? y.id || "qrcode-description" : null, D = typeof D == "string" ? { text: D } : D || {}, D.text = D.text || null, D.id = D.text ? D.id || "qrcode-title" : null;
3033
- const g = x.getModuleCount() * v + C * 2;
3034
- let L, i, u, f, m = "", h;
3035
- for (h = "l" + v + ",0 0," + v + " -" + v + ",0 0,-" + v + "z ", m += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', m += I.scalable ? "" : ' width="' + g + 'px" height="' + g + 'px"', m += ' viewBox="0 0 ' + g + " " + g + '" ', m += ' preserveAspectRatio="xMinYMin meet"', m += D.text || y.text ? ' role="img" aria-labelledby="' + Y([D.id, y.id].join(" ").trim()) + '"' : "", m += ">", m += D.text ? '<title id="' + Y(D.id) + '">' + Y(D.text) + "</title>" : "", m += y.text ? '<description id="' + Y(y.id) + '">' + Y(y.text) + "</description>" : "", m += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', m += '<path d="', u = 0; u < x.getModuleCount(); u += 1)
3036
- for (f = u * v + C, L = 0; L < x.getModuleCount(); L += 1)
3037
- x.isDark(u, L) && (i = L * v + C, m += "M" + i + "," + f + h);
3038
- return m += '" stroke="transparent" fill="black"/>', m += "</svg>", m;
3039
- }, x.createDataURL = function(v, C) {
3040
- v = v || 2, C = typeof C > "u" ? v * 4 : C;
3041
- const y = x.getModuleCount() * v + C * 2, D = C, I = y - C;
3042
- return Jt(y, y, function(g, L) {
3029
+ typeof arguments[0] == "object" && (I = arguments[0], v = I.cellSize, b = I.margin, m = I.alt, D = I.title), v = v || 2, b = typeof b > "u" ? v * 4 : b, m = typeof m == "string" ? { text: m } : m || {}, m.text = m.text || null, m.id = m.text ? m.id || "qrcode-description" : null, D = typeof D == "string" ? { text: D } : D || {}, D.text = D.text || null, D.id = D.text ? D.id || "qrcode-title" : null;
3030
+ const g = k.getModuleCount() * v + b * 2;
3031
+ let L, f, c, d, y = "", h;
3032
+ for (h = "l" + v + ",0 0," + v + " -" + v + ",0 0,-" + v + "z ", y += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', y += I.scalable ? "" : ' width="' + g + 'px" height="' + g + 'px"', y += ' viewBox="0 0 ' + g + " " + g + '" ', y += ' preserveAspectRatio="xMinYMin meet"', y += D.text || m.text ? ' role="img" aria-labelledby="' + Y([D.id, m.id].join(" ").trim()) + '"' : "", y += ">", y += D.text ? '<title id="' + Y(D.id) + '">' + Y(D.text) + "</title>" : "", y += m.text ? '<description id="' + Y(m.id) + '">' + Y(m.text) + "</description>" : "", y += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', y += '<path d="', c = 0; c < k.getModuleCount(); c += 1)
3033
+ for (d = c * v + b, L = 0; L < k.getModuleCount(); L += 1)
3034
+ k.isDark(c, L) && (f = L * v + b, y += "M" + f + "," + d + h);
3035
+ return y += '" stroke="transparent" fill="black"/>', y += "</svg>", y;
3036
+ }, k.createDataURL = function(v, b) {
3037
+ v = v || 2, b = typeof b > "u" ? v * 4 : b;
3038
+ const m = k.getModuleCount() * v + b * 2, D = b, I = m - b;
3039
+ return qt(m, m, function(g, L) {
3043
3040
  if (D <= g && g < I && D <= L && L < I) {
3044
- const i = Math.floor((g - D) / v), u = Math.floor((L - D) / v);
3045
- return x.isDark(u, i) ? 0 : 1;
3041
+ const f = Math.floor((g - D) / v), c = Math.floor((L - D) / v);
3042
+ return k.isDark(c, f) ? 0 : 1;
3046
3043
  } else
3047
3044
  return 1;
3048
3045
  });
3049
- }, x.createImgTag = function(v, C, y) {
3050
- v = v || 2, C = typeof C > "u" ? v * 4 : C;
3051
- const D = x.getModuleCount() * v + C * 2;
3046
+ }, k.createImgTag = function(v, b, m) {
3047
+ v = v || 2, b = typeof b > "u" ? v * 4 : b;
3048
+ const D = k.getModuleCount() * v + b * 2;
3052
3049
  let I = "";
3053
- return I += "<img", I += ' src="', I += x.createDataURL(v, C), I += '"', I += ' width="', I += D, I += '"', I += ' height="', I += D, I += '"', y && (I += ' alt="', I += Y(y), I += '"'), I += "/>", I;
3050
+ return I += "<img", I += ' src="', I += k.createDataURL(v, b), I += '"', I += ' width="', I += D, I += '"', I += ' height="', I += D, I += '"', m && (I += ' alt="', I += Y(m), I += '"'), I += "/>", I;
3054
3051
  };
3055
3052
  const Y = function(v) {
3056
- let C = "";
3057
- for (let y = 0; y < v.length; y += 1) {
3058
- const D = v.charAt(y);
3053
+ let b = "";
3054
+ for (let m = 0; m < v.length; m += 1) {
3055
+ const D = v.charAt(m);
3059
3056
  switch (D) {
3060
3057
  case "<":
3061
- C += "&lt;";
3058
+ b += "&lt;";
3062
3059
  break;
3063
3060
  case ">":
3064
- C += "&gt;";
3061
+ b += "&gt;";
3065
3062
  break;
3066
3063
  case "&":
3067
- C += "&amp;";
3064
+ b += "&amp;";
3068
3065
  break;
3069
3066
  case '"':
3070
- C += "&quot;";
3067
+ b += "&quot;";
3071
3068
  break;
3072
3069
  default:
3073
- C += D;
3070
+ b += D;
3074
3071
  break;
3075
3072
  }
3076
3073
  }
3077
- return C;
3074
+ return b;
3078
3075
  }, ee = function(v) {
3079
3076
  v = typeof v > "u" ? 1 * 2 : v;
3080
- const y = x.getModuleCount() * 1 + v * 2, D = v, I = y - v;
3081
- let g, L, i, u, f;
3082
- const m = {
3077
+ const m = k.getModuleCount() * 1 + v * 2, D = v, I = m - v;
3078
+ let g, L, f, c, d;
3079
+ const y = {
3083
3080
  "██": "█",
3084
3081
  "█ ": "▀",
3085
3082
  " █": "▄",
@@ -3091,37 +3088,37 @@ const on = /* @__PURE__ */ Z({
3091
3088
  " ": " "
3092
3089
  };
3093
3090
  let T = "";
3094
- for (g = 0; g < y; g += 2) {
3095
- for (i = Math.floor((g - D) / 1), u = Math.floor((g + 1 - D) / 1), L = 0; L < y; L += 1)
3096
- f = "█", D <= L && L < I && D <= g && g < I && x.isDark(i, Math.floor((L - D) / 1)) && (f = " "), D <= L && L < I && D <= g + 1 && g + 1 < I && x.isDark(u, Math.floor((L - D) / 1)) ? f += " " : f += "█", T += v < 1 && g + 1 >= I ? h[f] : m[f];
3091
+ for (g = 0; g < m; g += 2) {
3092
+ for (f = Math.floor((g - D) / 1), c = Math.floor((g + 1 - D) / 1), L = 0; L < m; L += 1)
3093
+ d = "█", D <= L && L < I && D <= g && g < I && k.isDark(f, Math.floor((L - D) / 1)) && (d = " "), D <= L && L < I && D <= g + 1 && g + 1 < I && k.isDark(c, Math.floor((L - D) / 1)) ? d += " " : d += "█", T += v < 1 && g + 1 >= I ? h[d] : y[d];
3097
3094
  T += `
3098
3095
  `;
3099
3096
  }
3100
- return y % 2 && v > 0 ? T.substring(0, T.length - y - 1) + Array(y + 1).join("▀") : T.substring(0, T.length - 1);
3097
+ return m % 2 && v > 0 ? T.substring(0, T.length - m - 1) + Array(m + 1).join("▀") : T.substring(0, T.length - 1);
3101
3098
  };
3102
- return x.createASCII = function(v, C) {
3099
+ return k.createASCII = function(v, b) {
3103
3100
  if (v = v || 1, v < 2)
3104
- return ee(C);
3105
- v -= 1, C = typeof C > "u" ? v * 2 : C;
3106
- const y = x.getModuleCount() * v + C * 2, D = C, I = y - C;
3107
- let g, L, i, u;
3108
- const f = Array(v + 1).join("██"), m = Array(v + 1).join(" ");
3101
+ return ee(b);
3102
+ v -= 1, b = typeof b > "u" ? v * 2 : b;
3103
+ const m = k.getModuleCount() * v + b * 2, D = b, I = m - b;
3104
+ let g, L, f, c;
3105
+ const d = Array(v + 1).join("██"), y = Array(v + 1).join(" ");
3109
3106
  let h = "", T = "";
3110
- for (g = 0; g < y; g += 1) {
3111
- for (i = Math.floor((g - D) / v), T = "", L = 0; L < y; L += 1)
3112
- u = 1, D <= L && L < I && D <= g && g < I && x.isDark(i, Math.floor((L - D) / v)) && (u = 0), T += u ? f : m;
3113
- for (i = 0; i < v; i += 1)
3107
+ for (g = 0; g < m; g += 1) {
3108
+ for (f = Math.floor((g - D) / v), T = "", L = 0; L < m; L += 1)
3109
+ c = 1, D <= L && L < I && D <= g && g < I && k.isDark(f, Math.floor((L - D) / v)) && (c = 0), T += c ? d : y;
3110
+ for (f = 0; f < v; f += 1)
3114
3111
  h += T + `
3115
3112
  `;
3116
3113
  }
3117
3114
  return h.substring(0, h.length - 1);
3118
- }, x.renderTo2dContext = function(v, C) {
3119
- C = C || 2;
3120
- const y = x.getModuleCount();
3121
- for (let D = 0; D < y; D++)
3122
- for (let I = 0; I < y; I++)
3123
- v.fillStyle = x.isDark(D, I) ? "black" : "white", v.fillRect(I * C, D * C, C, C);
3124
- }, x;
3115
+ }, k.renderTo2dContext = function(v, b) {
3116
+ b = b || 2;
3117
+ const m = k.getModuleCount();
3118
+ for (let D = 0; D < m; D++)
3119
+ for (let I = 0; I < m; I++)
3120
+ v.fillStyle = k.isDark(D, I) ? "black" : "white", v.fillRect(I * b, D * b, b, b);
3121
+ }, k;
3125
3122
  };
3126
3123
  fe.stringToBytes = function(s) {
3127
3124
  const r = [];
@@ -3133,18 +3130,18 @@ fe.stringToBytes = function(s) {
3133
3130
  };
3134
3131
  fe.createStringToBytes = function(s, r) {
3135
3132
  const n = function() {
3136
- const o = Gt(s), a = function() {
3137
- const c = o.read();
3138
- if (c == -1) throw "eof";
3139
- return c;
3133
+ const o = Zt(s), a = function() {
3134
+ const i = o.read();
3135
+ if (i == -1) throw "eof";
3136
+ return i;
3140
3137
  };
3141
3138
  let t = 0;
3142
3139
  const l = {};
3143
3140
  for (; ; ) {
3144
- const c = o.read();
3145
- if (c == -1) break;
3146
- const k = a(), x = a(), w = a(), z = String.fromCharCode(c << 8 | k), S = x << 8 | w;
3147
- l[z] = S, t += 1;
3141
+ const i = o.read();
3142
+ if (i == -1) break;
3143
+ const z = a(), k = a(), x = a(), C = String.fromCharCode(i << 8 | z), S = k << 8 | x;
3144
+ l[C] = S, t += 1;
3148
3145
  }
3149
3146
  if (t != r)
3150
3147
  throw t + " != " + r;
@@ -3157,8 +3154,8 @@ fe.createStringToBytes = function(s, r) {
3157
3154
  if (l < 128)
3158
3155
  a.push(l);
3159
3156
  else {
3160
- const c = n[o.charAt(t)];
3161
- typeof c == "number" ? (c & 255) == c ? a.push(c) : (a.push(c >>> 8), a.push(c & 255)) : a.push(e);
3157
+ const i = n[o.charAt(t)];
3158
+ typeof i == "number" ? (i & 255) == i ? a.push(i) : (a.push(i >>> 8), a.push(i & 255)) : a.push(e);
3162
3159
  }
3163
3160
  }
3164
3161
  return a;
@@ -3246,44 +3243,44 @@ const oe = {
3246
3243
  }, o.getMaskFunction = function(t) {
3247
3244
  switch (t) {
3248
3245
  case ce.PATTERN000:
3249
- return function(l, c) {
3250
- return (l + c) % 2 == 0;
3246
+ return function(l, i) {
3247
+ return (l + i) % 2 == 0;
3251
3248
  };
3252
3249
  case ce.PATTERN001:
3253
- return function(l, c) {
3250
+ return function(l, i) {
3254
3251
  return l % 2 == 0;
3255
3252
  };
3256
3253
  case ce.PATTERN010:
3257
- return function(l, c) {
3258
- return c % 3 == 0;
3254
+ return function(l, i) {
3255
+ return i % 3 == 0;
3259
3256
  };
3260
3257
  case ce.PATTERN011:
3261
- return function(l, c) {
3262
- return (l + c) % 3 == 0;
3258
+ return function(l, i) {
3259
+ return (l + i) % 3 == 0;
3263
3260
  };
3264
3261
  case ce.PATTERN100:
3265
- return function(l, c) {
3266
- return (Math.floor(l / 2) + Math.floor(c / 3)) % 2 == 0;
3262
+ return function(l, i) {
3263
+ return (Math.floor(l / 2) + Math.floor(i / 3)) % 2 == 0;
3267
3264
  };
3268
3265
  case ce.PATTERN101:
3269
- return function(l, c) {
3270
- return l * c % 2 + l * c % 3 == 0;
3266
+ return function(l, i) {
3267
+ return l * i % 2 + l * i % 3 == 0;
3271
3268
  };
3272
3269
  case ce.PATTERN110:
3273
- return function(l, c) {
3274
- return (l * c % 2 + l * c % 3) % 2 == 0;
3270
+ return function(l, i) {
3271
+ return (l * i % 2 + l * i % 3) % 2 == 0;
3275
3272
  };
3276
3273
  case ce.PATTERN111:
3277
- return function(l, c) {
3278
- return (l * c % 3 + (l + c) % 2) % 2 == 0;
3274
+ return function(l, i) {
3275
+ return (l * i % 3 + (l + i) % 2) % 2 == 0;
3279
3276
  };
3280
3277
  default:
3281
3278
  throw "bad maskPattern:" + t;
3282
3279
  }
3283
3280
  }, o.getErrorCorrectPolynomial = function(t) {
3284
3281
  let l = ke([1], 0);
3285
- for (let c = 0; c < t; c += 1)
3286
- l = l.multiply(ke([1, de.gexp(c)], 0));
3282
+ for (let i = 0; i < t; i += 1)
3283
+ l = l.multiply(ke([1, de.gexp(i)], 0));
3287
3284
  return l;
3288
3285
  }, o.getLengthInBits = function(t, l) {
3289
3286
  if (1 <= l && l < 10)
@@ -3329,34 +3326,34 @@ const oe = {
3329
3326
  throw "type:" + l;
3330
3327
  }, o.getLostPoint = function(t) {
3331
3328
  const l = t.getModuleCount();
3332
- let c = 0;
3333
- for (let w = 0; w < l; w += 1)
3334
- for (let z = 0; z < l; z += 1) {
3329
+ let i = 0;
3330
+ for (let x = 0; x < l; x += 1)
3331
+ for (let C = 0; C < l; C += 1) {
3335
3332
  let S = 0;
3336
- const V = t.isDark(w, z);
3337
- for (let P = -1; P <= 1; P += 1)
3338
- if (!(w + P < 0 || l <= w + P))
3333
+ const P = t.isDark(x, C);
3334
+ for (let V = -1; V <= 1; V += 1)
3335
+ if (!(x + V < 0 || l <= x + V))
3339
3336
  for (let W = -1; W <= 1; W += 1)
3340
- z + W < 0 || l <= z + W || P == 0 && W == 0 || V == t.isDark(w + P, z + W) && (S += 1);
3341
- S > 5 && (c += 3 + S - 5);
3337
+ C + W < 0 || l <= C + W || V == 0 && W == 0 || P == t.isDark(x + V, C + W) && (S += 1);
3338
+ S > 5 && (i += 3 + S - 5);
3342
3339
  }
3343
- for (let w = 0; w < l - 1; w += 1)
3344
- for (let z = 0; z < l - 1; z += 1) {
3340
+ for (let x = 0; x < l - 1; x += 1)
3341
+ for (let C = 0; C < l - 1; C += 1) {
3345
3342
  let S = 0;
3346
- t.isDark(w, z) && (S += 1), t.isDark(w + 1, z) && (S += 1), t.isDark(w, z + 1) && (S += 1), t.isDark(w + 1, z + 1) && (S += 1), (S == 0 || S == 4) && (c += 3);
3343
+ t.isDark(x, C) && (S += 1), t.isDark(x + 1, C) && (S += 1), t.isDark(x, C + 1) && (S += 1), t.isDark(x + 1, C + 1) && (S += 1), (S == 0 || S == 4) && (i += 3);
3347
3344
  }
3348
- for (let w = 0; w < l; w += 1)
3349
- for (let z = 0; z < l - 6; z += 1)
3350
- t.isDark(w, z) && !t.isDark(w, z + 1) && t.isDark(w, z + 2) && t.isDark(w, z + 3) && t.isDark(w, z + 4) && !t.isDark(w, z + 5) && t.isDark(w, z + 6) && (c += 40);
3351
- for (let w = 0; w < l; w += 1)
3352
- for (let z = 0; z < l - 6; z += 1)
3353
- t.isDark(z, w) && !t.isDark(z + 1, w) && t.isDark(z + 2, w) && t.isDark(z + 3, w) && t.isDark(z + 4, w) && !t.isDark(z + 5, w) && t.isDark(z + 6, w) && (c += 40);
3354
- let k = 0;
3355
- for (let w = 0; w < l; w += 1)
3356
- for (let z = 0; z < l; z += 1)
3357
- t.isDark(z, w) && (k += 1);
3358
- const x = Math.abs(100 * k / l / l - 50) / 5;
3359
- return c += x * 10, c;
3345
+ for (let x = 0; x < l; x += 1)
3346
+ for (let C = 0; C < l - 6; C += 1)
3347
+ t.isDark(x, C) && !t.isDark(x, C + 1) && t.isDark(x, C + 2) && t.isDark(x, C + 3) && t.isDark(x, C + 4) && !t.isDark(x, C + 5) && t.isDark(x, C + 6) && (i += 40);
3348
+ for (let x = 0; x < l; x += 1)
3349
+ for (let C = 0; C < l - 6; C += 1)
3350
+ t.isDark(C, x) && !t.isDark(C + 1, x) && t.isDark(C + 2, x) && t.isDark(C + 3, x) && t.isDark(C + 4, x) && !t.isDark(C + 5, x) && t.isDark(C + 6, x) && (i += 40);
3351
+ let z = 0;
3352
+ for (let x = 0; x < l; x += 1)
3353
+ for (let C = 0; C < l; C += 1)
3354
+ t.isDark(C, x) && (z += 1);
3355
+ const k = Math.abs(100 * z / l / l - 50) / 5;
3356
+ return i += k * 10, i;
3360
3357
  }, o;
3361
3358
  }(), de = function() {
3362
3359
  const s = new Array(256), r = new Array(256);
@@ -3410,7 +3407,7 @@ const oe = {
3410
3407
  t[l] ^= de.gexp(de.glog(o.getAt(l)) + a);
3411
3408
  return ke(t, 0).mod(o);
3412
3409
  }, e;
3413
- }, Le = function() {
3410
+ }, Te = function() {
3414
3411
  const s = [
3415
3412
  // L
3416
3413
  // M
@@ -3637,15 +3634,15 @@ const oe = {
3637
3634
  const t = e(o, a);
3638
3635
  if (typeof t > "u")
3639
3636
  throw "bad rs block @ typeNumber:" + o + "/errorCorrectionLevel:" + a;
3640
- const l = t.length / 3, c = [];
3641
- for (let k = 0; k < l; k += 1) {
3642
- const x = t[k * 3 + 0], w = t[k * 3 + 1], z = t[k * 3 + 2];
3643
- for (let S = 0; S < x; S += 1)
3644
- c.push(r(w, z));
3637
+ const l = t.length / 3, i = [];
3638
+ for (let z = 0; z < l; z += 1) {
3639
+ const k = t[z * 3 + 0], x = t[z * 3 + 1], C = t[z * 3 + 2];
3640
+ for (let S = 0; S < k; S += 1)
3641
+ i.push(r(x, C));
3645
3642
  }
3646
- return c;
3643
+ return i;
3647
3644
  }, n;
3648
- }(), Te = function() {
3645
+ }(), Be = function() {
3649
3646
  const s = [];
3650
3647
  let r = 0;
3651
3648
  const n = {};
@@ -3663,7 +3660,7 @@ const oe = {
3663
3660
  const o = Math.floor(r / 8);
3664
3661
  s.length <= o && s.push(0), e && (s[o] |= 128 >>> r % 8), r += 1;
3665
3662
  }, n;
3666
- }, Yt = function(s) {
3663
+ }, Xt = function(s) {
3667
3664
  const r = oe.MODE_NUMBER, n = s, e = {};
3668
3665
  e.getMode = function() {
3669
3666
  return r;
@@ -3671,15 +3668,15 @@ const oe = {
3671
3668
  return n.length;
3672
3669
  }, e.write = function(t) {
3673
3670
  const l = n;
3674
- let c = 0;
3675
- for (; c + 2 < l.length; )
3676
- t.put(o(l.substring(c, c + 3)), 10), c += 3;
3677
- c < l.length && (l.length - c == 1 ? t.put(o(l.substring(c, c + 1)), 4) : l.length - c == 2 && t.put(o(l.substring(c, c + 2)), 7));
3671
+ let i = 0;
3672
+ for (; i + 2 < l.length; )
3673
+ t.put(o(l.substring(i, i + 3)), 10), i += 3;
3674
+ i < l.length && (l.length - i == 1 ? t.put(o(l.substring(i, i + 1)), 4) : l.length - i == 2 && t.put(o(l.substring(i, i + 2)), 7));
3678
3675
  };
3679
3676
  const o = function(t) {
3680
3677
  let l = 0;
3681
- for (let c = 0; c < t.length; c += 1)
3682
- l = l * 10 + a(t.charAt(c));
3678
+ for (let i = 0; i < t.length; i += 1)
3679
+ l = l * 10 + a(t.charAt(i));
3683
3680
  return l;
3684
3681
  }, a = function(t) {
3685
3682
  if ("0" <= t && t <= "9")
@@ -3687,7 +3684,7 @@ const oe = {
3687
3684
  throw "illegal char :" + t;
3688
3685
  };
3689
3686
  return e;
3690
- }, Xt = function(s) {
3687
+ }, Qt = function(s) {
3691
3688
  const r = oe.MODE_ALPHA_NUM, n = s, e = {};
3692
3689
  e.getMode = function() {
3693
3690
  return r;
@@ -3732,7 +3729,7 @@ const oe = {
3732
3729
  }
3733
3730
  };
3734
3731
  return e;
3735
- }, Qt = function(s) {
3732
+ }, Ut = function(s) {
3736
3733
  const r = oe.MODE_8BIT_BYTE, n = fe.stringToBytes(s), e = {};
3737
3734
  return e.getMode = function() {
3738
3735
  return r;
@@ -3742,7 +3739,7 @@ const oe = {
3742
3739
  for (let a = 0; a < n.length; a += 1)
3743
3740
  o.put(n[a], 8);
3744
3741
  }, e;
3745
- }, Ut = function(s) {
3742
+ }, Ft = function(s) {
3746
3743
  const r = oe.MODE_KANJI, n = fe.stringToBytes;
3747
3744
  (function(a, t) {
3748
3745
  const l = n(a);
@@ -3758,19 +3755,19 @@ const oe = {
3758
3755
  const t = e;
3759
3756
  let l = 0;
3760
3757
  for (; l + 1 < t.length; ) {
3761
- let c = (255 & t[l]) << 8 | 255 & t[l + 1];
3762
- if (33088 <= c && c <= 40956)
3763
- c -= 33088;
3764
- else if (57408 <= c && c <= 60351)
3765
- c -= 49472;
3758
+ let i = (255 & t[l]) << 8 | 255 & t[l + 1];
3759
+ if (33088 <= i && i <= 40956)
3760
+ i -= 33088;
3761
+ else if (57408 <= i && i <= 60351)
3762
+ i -= 49472;
3766
3763
  else
3767
- throw "illegal char at " + (l + 1) + "/" + c;
3768
- c = (c >>> 8 & 255) * 192 + (c & 255), a.put(c, 13), l += 2;
3764
+ throw "illegal char at " + (l + 1) + "/" + i;
3765
+ i = (i >>> 8 & 255) * 192 + (i & 255), a.put(i, 13), l += 2;
3769
3766
  }
3770
3767
  if (l < t.length)
3771
3768
  throw "illegal char at " + (l + 1);
3772
3769
  }, o;
3773
- }, Ne = function() {
3770
+ }, Ke = function() {
3774
3771
  const s = [], r = {};
3775
3772
  return r.writeByte = function(n) {
3776
3773
  s.push(n & 255);
@@ -3792,7 +3789,7 @@ const oe = {
3792
3789
  e > 0 && (n += ","), n += s[e];
3793
3790
  return n += "]", n;
3794
3791
  }, r;
3795
- }, Ft = function() {
3792
+ }, Gt = function() {
3796
3793
  let s = 0, r = 0, n = 0, e = "";
3797
3794
  const o = {}, a = function(l) {
3798
3795
  e += String.fromCharCode(t(l & 63));
@@ -3817,13 +3814,13 @@ const oe = {
3817
3814
  }, o.flush = function() {
3818
3815
  if (r > 0 && (a(s << 6 - r), s = 0, r = 0), n % 3 != 0) {
3819
3816
  const l = 3 - n % 3;
3820
- for (let c = 0; c < l; c += 1)
3817
+ for (let i = 0; i < l; i += 1)
3821
3818
  e += "=";
3822
3819
  }
3823
3820
  }, o.toString = function() {
3824
3821
  return e;
3825
3822
  }, o;
3826
- }, Gt = function(s) {
3823
+ }, Zt = function(s) {
3827
3824
  const r = s;
3828
3825
  let n = 0, e = 0, o = 0;
3829
3826
  const a = {};
@@ -3834,12 +3831,12 @@ const oe = {
3834
3831
  return -1;
3835
3832
  throw "unexpected end of file./" + o;
3836
3833
  }
3837
- const c = r.charAt(n);
3838
- if (n += 1, c == "=")
3834
+ const i = r.charAt(n);
3835
+ if (n += 1, i == "=")
3839
3836
  return o = 0, -1;
3840
- if (c.match(/^\s$/))
3837
+ if (i.match(/^\s$/))
3841
3838
  continue;
3842
- e = e << 6 | t(c.charCodeAt(0)), o += 6;
3839
+ e = e << 6 | t(i.charCodeAt(0)), o += 6;
3843
3840
  }
3844
3841
  const l = e >>> o - 8 & 255;
3845
3842
  return o -= 8, l;
@@ -3858,72 +3855,72 @@ const oe = {
3858
3855
  throw "c:" + l;
3859
3856
  };
3860
3857
  return a;
3861
- }, Zt = function(s, r) {
3858
+ }, Jt = function(s, r) {
3862
3859
  const n = s, e = r, o = new Array(s * r), a = {};
3863
- a.setPixel = function(k, x, w) {
3864
- o[x * n + k] = w;
3865
- }, a.write = function(k) {
3866
- k.writeString("GIF87a"), k.writeShort(n), k.writeShort(e), k.writeByte(128), k.writeByte(0), k.writeByte(0), k.writeByte(0), k.writeByte(0), k.writeByte(0), k.writeByte(255), k.writeByte(255), k.writeByte(255), k.writeString(","), k.writeShort(0), k.writeShort(0), k.writeShort(n), k.writeShort(e), k.writeByte(0);
3867
- const x = 2, w = l(x);
3868
- k.writeByte(x);
3869
- let z = 0;
3870
- for (; w.length - z > 255; )
3871
- k.writeByte(255), k.writeBytes(w, z, 255), z += 255;
3872
- k.writeByte(w.length - z), k.writeBytes(w, z, w.length - z), k.writeByte(0), k.writeString(";");
3860
+ a.setPixel = function(z, k, x) {
3861
+ o[k * n + z] = x;
3862
+ }, a.write = function(z) {
3863
+ z.writeString("GIF87a"), z.writeShort(n), z.writeShort(e), z.writeByte(128), z.writeByte(0), z.writeByte(0), z.writeByte(0), z.writeByte(0), z.writeByte(0), z.writeByte(255), z.writeByte(255), z.writeByte(255), z.writeString(","), z.writeShort(0), z.writeShort(0), z.writeShort(n), z.writeShort(e), z.writeByte(0);
3864
+ const k = 2, x = l(k);
3865
+ z.writeByte(k);
3866
+ let C = 0;
3867
+ for (; x.length - C > 255; )
3868
+ z.writeByte(255), z.writeBytes(x, C, 255), C += 255;
3869
+ z.writeByte(x.length - C), z.writeBytes(x, C, x.length - C), z.writeByte(0), z.writeString(";");
3873
3870
  };
3874
- const t = function(k) {
3875
- const x = k;
3876
- let w = 0, z = 0;
3871
+ const t = function(z) {
3872
+ const k = z;
3873
+ let x = 0, C = 0;
3877
3874
  const S = {};
3878
- return S.write = function(V, P) {
3879
- if (V >>> P)
3875
+ return S.write = function(P, V) {
3876
+ if (P >>> V)
3880
3877
  throw "length over";
3881
- for (; w + P >= 8; )
3882
- x.writeByte(255 & (V << w | z)), P -= 8 - w, V >>>= 8 - w, z = 0, w = 0;
3883
- z = V << w | z, w = w + P;
3878
+ for (; x + V >= 8; )
3879
+ k.writeByte(255 & (P << x | C)), V -= 8 - x, P >>>= 8 - x, C = 0, x = 0;
3880
+ C = P << x | C, x = x + V;
3884
3881
  }, S.flush = function() {
3885
- w > 0 && x.writeByte(z);
3882
+ x > 0 && k.writeByte(C);
3886
3883
  }, S;
3887
- }, l = function(k) {
3888
- const x = 1 << k, w = (1 << k) + 1;
3889
- let z = k + 1;
3890
- const S = c();
3891
- for (let $ = 0; $ < x; $ += 1)
3892
- S.add(String.fromCharCode($));
3893
- S.add(String.fromCharCode(x)), S.add(String.fromCharCode(w));
3894
- const V = Ne(), P = t(V);
3895
- P.write(x, z);
3884
+ }, l = function(z) {
3885
+ const k = 1 << z, x = (1 << z) + 1;
3886
+ let C = z + 1;
3887
+ const S = i();
3888
+ for (let B = 0; B < k; B += 1)
3889
+ S.add(String.fromCharCode(B));
3890
+ S.add(String.fromCharCode(k)), S.add(String.fromCharCode(x));
3891
+ const P = Ke(), V = t(P);
3892
+ V.write(k, C);
3896
3893
  let W = 0, E = String.fromCharCode(o[W]);
3897
3894
  for (W += 1; W < o.length; ) {
3898
- const $ = String.fromCharCode(o[W]);
3899
- W += 1, S.contains(E + $) ? E = E + $ : (P.write(S.indexOf(E), z), S.size() < 4095 && (S.size() == 1 << z && (z += 1), S.add(E + $)), E = $);
3895
+ const B = String.fromCharCode(o[W]);
3896
+ W += 1, S.contains(E + B) ? E = E + B : (V.write(S.indexOf(E), C), S.size() < 4095 && (S.size() == 1 << C && (C += 1), S.add(E + B)), E = B);
3900
3897
  }
3901
- return P.write(S.indexOf(E), z), P.write(w, z), P.flush(), V.toByteArray();
3902
- }, c = function() {
3903
- const k = {};
3904
- let x = 0;
3905
- const w = {};
3906
- return w.add = function(z) {
3907
- if (w.contains(z))
3908
- throw "dup key:" + z;
3909
- k[z] = x, x += 1;
3910
- }, w.size = function() {
3911
- return x;
3912
- }, w.indexOf = function(z) {
3913
- return k[z];
3914
- }, w.contains = function(z) {
3915
- return typeof k[z] < "u";
3916
- }, w;
3898
+ return V.write(S.indexOf(E), C), V.write(x, C), V.flush(), P.toByteArray();
3899
+ }, i = function() {
3900
+ const z = {};
3901
+ let k = 0;
3902
+ const x = {};
3903
+ return x.add = function(C) {
3904
+ if (x.contains(C))
3905
+ throw "dup key:" + C;
3906
+ z[C] = k, k += 1;
3907
+ }, x.size = function() {
3908
+ return k;
3909
+ }, x.indexOf = function(C) {
3910
+ return z[C];
3911
+ }, x.contains = function(C) {
3912
+ return typeof z[C] < "u";
3913
+ }, x;
3917
3914
  };
3918
3915
  return a;
3919
- }, Jt = function(s, r, n) {
3920
- const e = Zt(s, r);
3916
+ }, qt = function(s, r, n) {
3917
+ const e = Jt(s, r);
3921
3918
  for (let l = 0; l < r; l += 1)
3922
- for (let c = 0; c < s; c += 1)
3923
- e.setPixel(c, l, n(c, l));
3924
- const o = Ne();
3919
+ for (let i = 0; i < s; i += 1)
3920
+ e.setPixel(i, l, n(i, l));
3921
+ const o = Ke();
3925
3922
  e.write(o);
3926
- const a = Ft(), t = o.toByteArray();
3923
+ const a = Gt(), t = o.toByteArray();
3927
3924
  for (let l = 0; l < t.length; l += 1)
3928
3925
  a.writeByte(t[l]);
3929
3926
  return a.flush(), "data:image/gif;base64," + a;
@@ -3943,65 +3940,65 @@ const Ce = 4, Cn = /* @__PURE__ */ Z({
3943
3940
  emits: ["ready", "error"],
3944
3941
  setup(s, { emit: r }) {
3945
3942
  const n = s, e = r, o = J("qrcode"), a = _();
3946
- fe.stringToBytes = (x) => Array.from(new TextEncoder().encode(x));
3947
- const t = (x, w) => {
3948
- const z = fe(0, w);
3949
- z.addData(x), z.make();
3950
- const S = z.getModuleCount(), V = [];
3951
- for (let P = 0; P < S; P++) {
3943
+ fe.stringToBytes = (k) => Array.from(new TextEncoder().encode(k));
3944
+ const t = (k, x) => {
3945
+ const C = fe(0, x);
3946
+ C.addData(k), C.make();
3947
+ const S = C.getModuleCount(), P = [];
3948
+ for (let V = 0; V < S; V++) {
3952
3949
  const W = [];
3953
3950
  for (let E = 0; E < S; E++)
3954
- W.push(z.isDark(P, E));
3955
- V.push(W);
3951
+ W.push(C.isDark(V, E));
3952
+ P.push(W);
3956
3953
  }
3957
- return V;
3958
- }, l = (x) => {
3954
+ return P;
3955
+ }, l = (k) => {
3959
3956
  if (!a.value) return;
3960
- const w = a.value.getContext("2d");
3961
- if (!w) return;
3962
- const z = x.length, S = n.size / (z + Ce * 2);
3963
- a.value.width = n.size, a.value.height = n.size, w.fillStyle = n.bgColor, w.fillRect(0, 0, n.size, n.size), w.fillStyle = n.fgColor;
3964
- const V = Math.ceil(S);
3965
- for (let P = 0; P < z; P++)
3966
- for (let W = 0; W < z; W++)
3967
- x[P][W] && w.fillRect(
3957
+ const x = a.value.getContext("2d");
3958
+ if (!x) return;
3959
+ const C = k.length, S = n.size / (C + Ce * 2);
3960
+ a.value.width = n.size, a.value.height = n.size, x.fillStyle = n.bgColor, x.fillRect(0, 0, n.size, n.size), x.fillStyle = n.fgColor;
3961
+ const P = Math.ceil(S);
3962
+ for (let V = 0; V < C; V++)
3963
+ for (let W = 0; W < C; W++)
3964
+ k[V][W] && x.fillRect(
3968
3965
  Math.round((W + Ce) * S),
3969
- Math.round((P + Ce) * S),
3970
- V,
3971
- V
3966
+ Math.round((V + Ce) * S),
3967
+ P,
3968
+ P
3972
3969
  );
3973
- }, c = () => {
3970
+ }, i = () => {
3974
3971
  if (!(!a.value || !n.value))
3975
3972
  try {
3976
- const x = t(n.value, n.level);
3977
- l(x), e("ready", a.value);
3978
- } catch (x) {
3979
- e("error", x);
3973
+ const k = t(n.value, n.level);
3974
+ l(k), e("ready", a.value);
3975
+ } catch (k) {
3976
+ e("error", k);
3980
3977
  }
3981
- }, k = () => {
3978
+ }, z = () => {
3982
3979
  if (!a.value) return;
3983
- const x = document.createElement("a");
3984
- x.download = "qrcode.png", x.href = a.value.toDataURL("image/png"), x.click();
3980
+ const k = document.createElement("a");
3981
+ k.download = "qrcode.png", k.href = a.value.toDataURL("image/png"), k.click();
3985
3982
  };
3986
3983
  return se(() => [n.value, n.size, n.bgColor, n.fgColor, n.level], () => {
3987
- c();
3984
+ i();
3988
3985
  }), pe(() => {
3989
- c();
3990
- }), (x, w) => (M(), b("div", {
3991
- class: p(d(o).b())
3986
+ i();
3987
+ }), (k, x) => (M(), w("div", {
3988
+ class: p(u(o).b())
3992
3989
  }, [
3993
3990
  A("canvas", {
3994
3991
  ref_key: "canvasRef",
3995
3992
  ref: a,
3996
- class: p(d(o).e("canvas"))
3993
+ class: p(u(o).e("canvas"))
3997
3994
  }, null, 2),
3998
- s.showDownload ? (M(), b("div", {
3995
+ s.showDownload ? (M(), w("div", {
3999
3996
  key: 0,
4000
- class: p(d(o).e("actions"))
3997
+ class: p(u(o).e("actions"))
4001
3998
  }, [
4002
3999
  A("button", {
4003
- class: p(d(o).e("download")),
4004
- onClick: k
4000
+ class: p(u(o).e("download")),
4001
+ onClick: z
4005
4002
  }, " 下载二维码 ", 2)
4006
4003
  ], 2)) : j("", !0)
4007
4004
  ], 2));
@@ -4018,50 +4015,50 @@ const Ce = 4, Cn = /* @__PURE__ */ Z({
4018
4015
  },
4019
4016
  emits: ["scroll"],
4020
4017
  setup(s, { expose: r, emit: n }) {
4021
- const e = s, o = n, a = J("virtual-scroll"), t = _(), l = _(0), c = B(() => typeof e.height == "number" ? `${e.height}px` : e.height), k = B(() => e.items.length * e.itemSize), x = B(() => {
4022
- const $ = typeof e.height == "number" ? e.height : parseInt(e.height) || 400;
4023
- return Math.ceil($ / e.itemSize) + e.buffer * 2;
4024
- }), w = B(() => {
4018
+ const e = s, o = n, a = J("virtual-scroll"), t = _(), l = _(0), i = $(() => typeof e.height == "number" ? `${e.height}px` : e.height), z = $(() => e.items.length * e.itemSize), k = $(() => {
4019
+ const B = typeof e.height == "number" ? e.height : parseInt(e.height) || 400;
4020
+ return Math.ceil(B / e.itemSize) + e.buffer * 2;
4021
+ }), x = $(() => {
4025
4022
  if (!e.virtual) return 0;
4026
- const $ = Math.floor(l.value / e.itemSize) - e.buffer;
4027
- return Math.max(0, $);
4028
- }), z = B(() => e.virtual ? Math.min(e.items.length, w.value + x.value) : e.items.length), S = B(() => e.virtual ? e.items.slice(w.value, z.value).map(($, K) => ({
4029
- ...$,
4030
- index: w.value + K
4031
- })) : e.items), V = B(() => w.value * e.itemSize), P = ($) => {
4032
- const K = $.target;
4033
- l.value = K.scrollTop, o("scroll", l.value);
4023
+ const B = Math.floor(l.value / e.itemSize) - e.buffer;
4024
+ return Math.max(0, B);
4025
+ }), C = $(() => e.virtual ? Math.min(e.items.length, x.value + k.value) : e.items.length), S = $(() => e.virtual ? e.items.slice(x.value, C.value).map((B, H) => ({
4026
+ ...B,
4027
+ index: x.value + H
4028
+ })) : e.items), P = $(() => x.value * e.itemSize), V = (B) => {
4029
+ const H = B.target;
4030
+ l.value = H.scrollTop, o("scroll", l.value);
4034
4031
  };
4035
4032
  return r({
4036
- scrollToIndex: ($) => {
4037
- t.value && (t.value.scrollTop = $ * e.itemSize);
4033
+ scrollToIndex: (B) => {
4034
+ t.value && (t.value.scrollTop = B * e.itemSize);
4038
4035
  },
4039
4036
  scrollToBottom: () => {
4040
- t.value && (t.value.scrollTop = k.value);
4037
+ t.value && (t.value.scrollTop = z.value);
4041
4038
  }
4042
- }), ($, K) => (M(), b("div", {
4039
+ }), (B, H) => (M(), w("div", {
4043
4040
  ref_key: "containerRef",
4044
4041
  ref: t,
4045
- class: p(d(a).b()),
4046
- style: F({ height: c.value }),
4047
- onScroll: P
4042
+ class: p(u(a).b()),
4043
+ style: F({ height: i.value }),
4044
+ onScroll: V
4048
4045
  }, [
4049
4046
  A("div", {
4050
- class: p(d(a).e("wrapper")),
4051
- style: F({ height: `${k.value}px` })
4047
+ class: p(u(a).e("wrapper")),
4048
+ style: F({ height: `${z.value}px` })
4052
4049
  }, [
4053
4050
  A("div", {
4054
- class: p(d(a).e("content")),
4055
- style: F({ transform: `translateY(${V.value}px)` })
4051
+ class: p(u(a).e("content")),
4052
+ style: F({ transform: `translateY(${P.value}px)` })
4056
4053
  }, [
4057
- (M(!0), b(q, null, le(S.value, (N, Y) => (M(), b("div", {
4058
- key: N.id ?? Y,
4059
- class: p(d(a).e("item")),
4054
+ (M(!0), w(q, null, le(S.value, (K, Y) => (M(), w("div", {
4055
+ key: K.id ?? Y,
4056
+ class: p(u(a).e("item")),
4060
4057
  style: F({ height: `${s.itemSize}px` })
4061
4058
  }, [
4062
- G($.$slots, "default", {
4063
- item: N,
4064
- index: N.index
4059
+ G(B.$slots, "default", {
4060
+ item: K,
4061
+ index: K.index
4065
4062
  })
4066
4063
  ], 6))), 128))
4067
4064
  ], 6)
@@ -4083,10 +4080,10 @@ const Ce = 4, Cn = /* @__PURE__ */ Z({
4083
4080
  setup(s, { emit: r }) {
4084
4081
  const n = s, e = r, o = J("infinite-scroll"), a = _(), t = _();
4085
4082
  let l = null;
4086
- const c = () => {
4083
+ const i = () => {
4087
4084
  l && l.disconnect(), l = new IntersectionObserver(
4088
- (k) => {
4089
- k[0].isIntersecting && !n.loading && !n.finished && e("load");
4085
+ (z) => {
4086
+ z[0].isIntersecting && !n.loading && !n.finished && e("load");
4090
4087
  },
4091
4088
  {
4092
4089
  rootMargin: `${n.distance}px`
@@ -4094,61 +4091,61 @@ const Ce = 4, Cn = /* @__PURE__ */ Z({
4094
4091
  ), t.value && l.observe(t.value);
4095
4092
  };
4096
4093
  return pe(() => {
4097
- c(), n.immediate && !n.finished && e("load");
4098
- }), Oe(() => {
4094
+ i(), n.immediate && !n.finished && e("load");
4095
+ }), _e(() => {
4099
4096
  l && l.disconnect();
4100
- }), (k, x) => (M(), b("div", {
4097
+ }), (z, k) => (M(), w("div", {
4101
4098
  ref_key: "containerRef",
4102
4099
  ref: a,
4103
- class: p(d(o).b())
4100
+ class: p(u(o).b())
4104
4101
  }, [
4105
- G(k.$slots, "default"),
4102
+ G(z.$slots, "default"),
4106
4103
  A("div", {
4107
4104
  ref_key: "observerRef",
4108
4105
  ref: t,
4109
- class: p(d(o).e("footer"))
4106
+ class: p(u(o).e("footer"))
4110
4107
  }, [
4111
- s.loading ? (M(), b("span", {
4108
+ s.loading ? (M(), w("span", {
4112
4109
  key: 0,
4113
- class: p(d(o).e("loading"))
4110
+ class: p(u(o).e("loading"))
4114
4111
  }, [
4115
- ne(d(te), {
4112
+ ne(u(te), {
4116
4113
  name: "loading",
4117
4114
  size: 16
4118
4115
  }),
4119
- A("span", null, Q(s.loadingText), 1)
4120
- ], 2)) : s.finished ? (M(), b("span", {
4116
+ A("span", null, U(s.loadingText), 1)
4117
+ ], 2)) : s.finished ? (M(), w("span", {
4121
4118
  key: 1,
4122
- class: p(d(o).e("finished"))
4123
- }, Q(s.finishedText), 3)) : j("", !0)
4119
+ class: p(u(o).e("finished"))
4120
+ }, U(s.finishedText), 3)) : j("", !0)
4124
4121
  ], 2)
4125
4122
  ], 2));
4126
4123
  }
4127
- });
4124
+ }), An = $t;
4128
4125
  export {
4129
4126
  gn as Avatar,
4130
4127
  bn as Calendar,
4131
- nn as Card,
4132
- un as Carousel,
4133
- dn as CarouselItem,
4128
+ an as Card,
4129
+ dn as Carousel,
4130
+ hn as CarouselItem,
4134
4131
  kn as Collapse,
4135
4132
  wn as CollapseItem,
4136
4133
  mn as Descriptions,
4137
4134
  yn as DescriptionsItem,
4138
- ln as DynamicTable,
4139
- sn as Empty,
4135
+ on as DynamicTable,
4136
+ rn as Empty,
4140
4137
  xn as Image,
4141
4138
  In as InfiniteScroll,
4142
- tt as Pagination,
4143
- an as Progress,
4139
+ nt as Pagination,
4140
+ ln as Progress,
4144
4141
  Cn as QRCode,
4145
4142
  Mn as Scrollbar,
4146
- hn as Table,
4147
- fn as TableColumn,
4148
- tn as Tag,
4149
- rn as Timeline,
4150
- cn as TimelineItem,
4151
- on as Tree,
4143
+ fn as Table,
4144
+ An as TableColumn,
4145
+ nn as Tag,
4146
+ cn as Timeline,
4147
+ un as TimelineItem,
4148
+ sn as Tree,
4152
4149
  he as TreeNode,
4153
4150
  vn as TreeTable,
4154
4151
  pn as TreeTableColumn,