qidian-vue-ui 1.1.10 → 1.1.12

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.
@@ -12769,11 +12769,14 @@ const QdConfigProvider = defineComponent({
12769
12769
  },
12770
12770
  { immediate: true }
12771
12771
  );
12772
+ watch(mergedGlobalConfig.value, (newConfig) => {
12773
+ window.__QIDIAN_GLOBAL_CONFIG__ = newConfig;
12774
+ }, { immediate: true });
12772
12775
  watchEffect(async () => {
12773
12776
  const localeMap = {
12774
12777
  "zh-CN": () => Promise.resolve().then(() => zhCN$1),
12775
- "zh-TW": () => import("./zh-TW-8RAM5Jet.mjs"),
12776
- "en-US": () => import("./en-US-f7wG5rQz.mjs")
12778
+ "zh-TW": () => import("./zh-TW-B2lJp2te.mjs"),
12779
+ "en-US": () => import("./en-US-Ip9wI-Jz.mjs")
12777
12780
  };
12778
12781
  const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
12779
12782
  const [err, res] = await to(
@@ -14375,52 +14378,294 @@ const auth = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
14375
14378
  hasRoleAnd,
14376
14379
  hasRoleOr
14377
14380
  }, Symbol.toStringTag, { value: "Module" }));
14378
- const hasPermiDirective = {
14379
- mounted(el, binding) {
14380
- checkPermission(el, binding);
14381
- },
14382
- updated(el, binding) {
14383
- checkPermission(el, binding);
14384
- }
14385
- };
14386
- function checkPermission(el, binding) {
14387
- const { value } = binding;
14388
- if (!value) return;
14389
- if (value instanceof Array) {
14390
- const hasPermissions = hasPermiOr(value, false);
14391
- if (hasPermissions) return;
14392
- el.parentNode?.removeChild(el);
14393
- return;
14394
- }
14381
+ function getDefaultExportFromCjs(x) {
14382
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
14395
14383
  }
14396
- const hasPermi = {
14397
- install(app) {
14398
- app.directive("hasPermi", hasPermiDirective);
14399
- }
14400
- };
14401
- const hasRoleDirective = {
14402
- mounted(el, binding) {
14403
- checkRole(el, binding);
14404
- },
14405
- updated(el, binding) {
14406
- checkRole(el, binding);
14407
- }
14408
- };
14409
- function checkRole(el, binding) {
14410
- const { value } = binding;
14411
- if (!value) return;
14412
- if (value instanceof Array) {
14413
- const hasRole2 = hasRoleOr(value, false);
14414
- if (hasRole2) return;
14415
- el.parentNode?.removeChild(el);
14416
- return;
14417
- }
14384
+ var dayjs_min$2 = { exports: {} };
14385
+ var dayjs_min = dayjs_min$2.exports;
14386
+ var hasRequiredDayjs_min;
14387
+ function requireDayjs_min() {
14388
+ if (hasRequiredDayjs_min) return dayjs_min$2.exports;
14389
+ hasRequiredDayjs_min = 1;
14390
+ (function(module2, exports2) {
14391
+ !(function(t, e) {
14392
+ module2.exports = e();
14393
+ })(dayjs_min, (function() {
14394
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h2 = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
14395
+ var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
14396
+ return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
14397
+ } }, m = function(t2, e2, n2) {
14398
+ var r2 = String(t2);
14399
+ return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
14400
+ }, v = { s: m, z: function(t2) {
14401
+ var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
14402
+ return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
14403
+ }, m: function t2(e2, n2) {
14404
+ if (e2.date() < n2.date()) return -t2(n2, e2);
14405
+ var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
14406
+ return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
14407
+ }, a: function(t2) {
14408
+ return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
14409
+ }, p: function(t2) {
14410
+ return { M: c, y: h2, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
14411
+ }, u: function(t2) {
14412
+ return void 0 === t2;
14413
+ } }, g = "en", D = {};
14414
+ D[g] = M;
14415
+ var p = "$isDayjsObject", S = function(t2) {
14416
+ return t2 instanceof _ || !(!t2 || !t2[p]);
14417
+ }, w = function t2(e2, n2, r2) {
14418
+ var i2;
14419
+ if (!e2) return g;
14420
+ if ("string" == typeof e2) {
14421
+ var s2 = e2.toLowerCase();
14422
+ D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
14423
+ var u2 = e2.split("-");
14424
+ if (!i2 && u2.length > 1) return t2(u2[0]);
14425
+ } else {
14426
+ var a2 = e2.name;
14427
+ D[a2] = e2, i2 = a2;
14428
+ }
14429
+ return !r2 && i2 && (g = i2), i2 || !r2 && g;
14430
+ }, O = function(t2, e2) {
14431
+ if (S(t2)) return t2.clone();
14432
+ var n2 = "object" == typeof e2 ? e2 : {};
14433
+ return n2.date = t2, n2.args = arguments, new _(n2);
14434
+ }, b = v;
14435
+ b.l = w, b.i = S, b.w = function(t2, e2) {
14436
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
14437
+ };
14438
+ var _ = (function() {
14439
+ function M2(t2) {
14440
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
14441
+ }
14442
+ var m2 = M2.prototype;
14443
+ return m2.parse = function(t2) {
14444
+ this.$d = (function(t3) {
14445
+ var e2 = t3.date, n2 = t3.utc;
14446
+ if (null === e2) return /* @__PURE__ */ new Date(NaN);
14447
+ if (b.u(e2)) return /* @__PURE__ */ new Date();
14448
+ if (e2 instanceof Date) return new Date(e2);
14449
+ if ("string" == typeof e2 && !/Z$/i.test(e2)) {
14450
+ var r2 = e2.match($);
14451
+ if (r2) {
14452
+ var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
14453
+ return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
14454
+ }
14455
+ }
14456
+ return new Date(e2);
14457
+ })(t2), this.init();
14458
+ }, m2.init = function() {
14459
+ var t2 = this.$d;
14460
+ this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
14461
+ }, m2.$utils = function() {
14462
+ return b;
14463
+ }, m2.isValid = function() {
14464
+ return !(this.$d.toString() === l);
14465
+ }, m2.isSame = function(t2, e2) {
14466
+ var n2 = O(t2);
14467
+ return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
14468
+ }, m2.isAfter = function(t2, e2) {
14469
+ return O(t2) < this.startOf(e2);
14470
+ }, m2.isBefore = function(t2, e2) {
14471
+ return this.endOf(e2) < O(t2);
14472
+ }, m2.$g = function(t2, e2, n2) {
14473
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
14474
+ }, m2.unix = function() {
14475
+ return Math.floor(this.valueOf() / 1e3);
14476
+ }, m2.valueOf = function() {
14477
+ return this.$d.getTime();
14478
+ }, m2.startOf = function(t2, e2) {
14479
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
14480
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
14481
+ return r2 ? i2 : i2.endOf(a);
14482
+ }, $2 = function(t3, e3) {
14483
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
14484
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
14485
+ switch (f2) {
14486
+ case h2:
14487
+ return r2 ? l2(1, 0) : l2(31, 11);
14488
+ case c:
14489
+ return r2 ? l2(1, M3) : l2(0, M3 + 1);
14490
+ case o:
14491
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
14492
+ return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
14493
+ case a:
14494
+ case d:
14495
+ return $2(v2 + "Hours", 0);
14496
+ case u:
14497
+ return $2(v2 + "Minutes", 1);
14498
+ case s:
14499
+ return $2(v2 + "Seconds", 2);
14500
+ case i:
14501
+ return $2(v2 + "Milliseconds", 3);
14502
+ default:
14503
+ return this.clone();
14504
+ }
14505
+ }, m2.endOf = function(t2) {
14506
+ return this.startOf(t2, false);
14507
+ }, m2.$set = function(t2, e2) {
14508
+ var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h2] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
14509
+ if (o2 === c || o2 === h2) {
14510
+ var y2 = this.clone().set(d, 1);
14511
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
14512
+ } else l2 && this.$d[l2]($2);
14513
+ return this.init(), this;
14514
+ }, m2.set = function(t2, e2) {
14515
+ return this.clone().$set(t2, e2);
14516
+ }, m2.get = function(t2) {
14517
+ return this[b.p(t2)]();
14518
+ }, m2.add = function(r2, f2) {
14519
+ var d2, l2 = this;
14520
+ r2 = Number(r2);
14521
+ var $2 = b.p(f2), y2 = function(t2) {
14522
+ var e2 = O(l2);
14523
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
14524
+ };
14525
+ if ($2 === c) return this.set(c, this.$M + r2);
14526
+ if ($2 === h2) return this.set(h2, this.$y + r2);
14527
+ if ($2 === a) return y2(1);
14528
+ if ($2 === o) return y2(7);
14529
+ var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
14530
+ return b.w(m3, this);
14531
+ }, m2.subtract = function(t2, e2) {
14532
+ return this.add(-1 * t2, e2);
14533
+ }, m2.format = function(t2) {
14534
+ var e2 = this, n2 = this.$locale();
14535
+ if (!this.isValid()) return n2.invalidDate || l;
14536
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h3 = function(t3, n3, i3, s3) {
14537
+ return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
14538
+ }, d2 = function(t3) {
14539
+ return b.s(s2 % 12 || 12, t3, "0");
14540
+ }, $2 = f2 || function(t3, e3, n3) {
14541
+ var r3 = t3 < 12 ? "AM" : "PM";
14542
+ return n3 ? r3.toLowerCase() : r3;
14543
+ };
14544
+ return r2.replace(y, (function(t3, r3) {
14545
+ return r3 || (function(t4) {
14546
+ switch (t4) {
14547
+ case "YY":
14548
+ return String(e2.$y).slice(-2);
14549
+ case "YYYY":
14550
+ return b.s(e2.$y, 4, "0");
14551
+ case "M":
14552
+ return a2 + 1;
14553
+ case "MM":
14554
+ return b.s(a2 + 1, 2, "0");
14555
+ case "MMM":
14556
+ return h3(n2.monthsShort, a2, c2, 3);
14557
+ case "MMMM":
14558
+ return h3(c2, a2);
14559
+ case "D":
14560
+ return e2.$D;
14561
+ case "DD":
14562
+ return b.s(e2.$D, 2, "0");
14563
+ case "d":
14564
+ return String(e2.$W);
14565
+ case "dd":
14566
+ return h3(n2.weekdaysMin, e2.$W, o2, 2);
14567
+ case "ddd":
14568
+ return h3(n2.weekdaysShort, e2.$W, o2, 3);
14569
+ case "dddd":
14570
+ return o2[e2.$W];
14571
+ case "H":
14572
+ return String(s2);
14573
+ case "HH":
14574
+ return b.s(s2, 2, "0");
14575
+ case "h":
14576
+ return d2(1);
14577
+ case "hh":
14578
+ return d2(2);
14579
+ case "a":
14580
+ return $2(s2, u2, true);
14581
+ case "A":
14582
+ return $2(s2, u2, false);
14583
+ case "m":
14584
+ return String(u2);
14585
+ case "mm":
14586
+ return b.s(u2, 2, "0");
14587
+ case "s":
14588
+ return String(e2.$s);
14589
+ case "ss":
14590
+ return b.s(e2.$s, 2, "0");
14591
+ case "SSS":
14592
+ return b.s(e2.$ms, 3, "0");
14593
+ case "Z":
14594
+ return i2;
14595
+ }
14596
+ return null;
14597
+ })(t3) || i2.replace(":", "");
14598
+ }));
14599
+ }, m2.utcOffset = function() {
14600
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
14601
+ }, m2.diff = function(r2, d2, l2) {
14602
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
14603
+ return b.m(y2, m3);
14604
+ };
14605
+ switch (M3) {
14606
+ case h2:
14607
+ $2 = D2() / 12;
14608
+ break;
14609
+ case c:
14610
+ $2 = D2();
14611
+ break;
14612
+ case f:
14613
+ $2 = D2() / 3;
14614
+ break;
14615
+ case o:
14616
+ $2 = (g2 - v2) / 6048e5;
14617
+ break;
14618
+ case a:
14619
+ $2 = (g2 - v2) / 864e5;
14620
+ break;
14621
+ case u:
14622
+ $2 = g2 / n;
14623
+ break;
14624
+ case s:
14625
+ $2 = g2 / e;
14626
+ break;
14627
+ case i:
14628
+ $2 = g2 / t;
14629
+ break;
14630
+ default:
14631
+ $2 = g2;
14632
+ }
14633
+ return l2 ? $2 : b.a($2);
14634
+ }, m2.daysInMonth = function() {
14635
+ return this.endOf(c).$D;
14636
+ }, m2.$locale = function() {
14637
+ return D[this.$L];
14638
+ }, m2.locale = function(t2, e2) {
14639
+ if (!t2) return this.$L;
14640
+ var n2 = this.clone(), r2 = w(t2, e2, true);
14641
+ return r2 && (n2.$L = r2), n2;
14642
+ }, m2.clone = function() {
14643
+ return b.w(this.$d, this);
14644
+ }, m2.toDate = function() {
14645
+ return new Date(this.valueOf());
14646
+ }, m2.toJSON = function() {
14647
+ return this.isValid() ? this.toISOString() : null;
14648
+ }, m2.toISOString = function() {
14649
+ return this.$d.toISOString();
14650
+ }, m2.toString = function() {
14651
+ return this.$d.toUTCString();
14652
+ }, M2;
14653
+ })(), k = _.prototype;
14654
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h2], ["$D", d]].forEach((function(t2) {
14655
+ k[t2[1]] = function(e2) {
14656
+ return this.$g(e2, t2[0], t2[1]);
14657
+ };
14658
+ })), O.extend = function(t2, e2) {
14659
+ return t2.$i || (t2(e2, _, O), t2.$i = true), O;
14660
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
14661
+ return O(1e3 * t2);
14662
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
14663
+ }));
14664
+ })(dayjs_min$2);
14665
+ return dayjs_min$2.exports;
14418
14666
  }
14419
- const hasRole = {
14420
- install(app) {
14421
- app.directive("hasRole", hasRoleDirective);
14422
- }
14423
- };
14667
+ var dayjs_minExports$1 = requireDayjs_min();
14668
+ const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports$1);
14424
14669
  /**
14425
14670
  * tdesign v1.17.1
14426
14671
  * (c) 2025 tdesign
@@ -14445,7 +14690,7 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
14445
14690
  * (c) 2025 tdesign
14446
14691
  * @license MIT
14447
14692
  */
14448
- var dayjs_min$1$1 = { exports: {} };
14693
+ var dayjs_min$1 = { exports: {} };
14449
14694
  (function(module2, exports2) {
14450
14695
  !(function(t, e) {
14451
14696
  module2.exports = e();
@@ -14748,8 +14993,8 @@ var dayjs_min$1$1 = { exports: {} };
14748
14993
  return O(1e3 * t2);
14749
14994
  }, O.en = D[g], O.Ls = D, O.p = {}, O;
14750
14995
  });
14751
- })(dayjs_min$1$1);
14752
- var dayjs_minExports$1 = dayjs_min$1$1.exports;
14996
+ })(dayjs_min$1);
14997
+ var dayjs_minExports = dayjs_min$1.exports;
14753
14998
  /**
14754
14999
  * tdesign v1.17.1
14755
15000
  * (c) 2025 tdesign
@@ -14758,7 +15003,7 @@ var dayjs_minExports$1 = dayjs_min$1$1.exports;
14758
15003
  var zhCn$3 = { exports: {} };
14759
15004
  (function(module2, exports2) {
14760
15005
  !(function(e, _) {
14761
- module2.exports = _(dayjs_minExports$1);
15006
+ module2.exports = _(dayjs_minExports);
14762
15007
  })(commonjsGlobal, function(e) {
14763
15008
  function _(e2) {
14764
15009
  return e2 && "object" == _typeof(e2) && "default" in e2 ? e2 : {
@@ -15078,6 +15323,12 @@ const zhCN = {
15078
15323
  loading: {
15079
15324
  text: "加载中"
15080
15325
  },
15326
+ timeFormat: {
15327
+ seconds: "秒",
15328
+ minutes: "分钟",
15329
+ hours: "小时",
15330
+ days: "天"
15331
+ },
15081
15332
  crud: {
15082
15333
  emptyText: "暂无数据",
15083
15334
  searchText: "搜索",
@@ -15135,7 +15386,7 @@ const zhCN$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
15135
15386
  default: zhCN
15136
15387
  }, Symbol.toStringTag, { value: "Module" }));
15137
15388
  function useConfig(key, componentLocale) {
15138
- const injectGlobalConfig = getCurrentInstance?.() ? inject(PROVIDE_GLOBAL_CONFIG, void 0) : void 0;
15389
+ const injectGlobalConfig = getCurrentInstance?.() ? inject(PROVIDE_GLOBAL_CONFIG, void 0) : computed(() => window.__QIDIAN_GLOBAL_CONFIG__);
15139
15390
  const mergedGlobalConfig = computed(() => injectGlobalConfig?.value || zhCN);
15140
15391
  const globalConfig = computed(
15141
15392
  () => Object.assign(
@@ -15152,6 +15403,76 @@ function useConfig(key, componentLocale) {
15152
15403
  global: globalConfig
15153
15404
  };
15154
15405
  }
15406
+ function formatDuration(startDate, endDate) {
15407
+ const start = dayjs(startDate);
15408
+ const end = dayjs(endDate);
15409
+ const diffSeconds = end.diff(start, "second");
15410
+ const { t } = useConfig("timeFormat");
15411
+ if (diffSeconds < 60) {
15412
+ return `${diffSeconds}${t("seconds")}`;
15413
+ } else if (diffSeconds < 3600) {
15414
+ const minutes = Math.floor(diffSeconds / 60);
15415
+ const seconds = diffSeconds % 60;
15416
+ return `${minutes}${t("minutes")}${seconds}${t("seconds")}`;
15417
+ } else if (diffSeconds < 86400) {
15418
+ const hours = Math.floor(diffSeconds / 3600);
15419
+ const minutes = Math.floor(diffSeconds % 3600 / 60);
15420
+ const seconds = diffSeconds % 60;
15421
+ return `${hours}${t("hours")}${minutes}${t("minutes")}${seconds}${t("seconds")}`;
15422
+ } else {
15423
+ const days = Math.floor(diffSeconds / 86400);
15424
+ const hours = Math.floor(diffSeconds % 86400 / 3600);
15425
+ const minutes = Math.floor(diffSeconds % 3600 / 60);
15426
+ const seconds = diffSeconds % 60;
15427
+ return `${days}${t("days")}${hours}${t("hours")}${minutes}${t("minutes")}${seconds}${t("seconds")}`;
15428
+ }
15429
+ }
15430
+ const hasPermiDirective = {
15431
+ mounted(el, binding) {
15432
+ checkPermission(el, binding);
15433
+ },
15434
+ updated(el, binding) {
15435
+ checkPermission(el, binding);
15436
+ }
15437
+ };
15438
+ function checkPermission(el, binding) {
15439
+ const { value } = binding;
15440
+ if (!value) return;
15441
+ if (value instanceof Array) {
15442
+ const hasPermissions = hasPermiOr(value, false);
15443
+ if (hasPermissions) return;
15444
+ el.parentNode?.removeChild(el);
15445
+ return;
15446
+ }
15447
+ }
15448
+ const hasPermi = {
15449
+ install(app) {
15450
+ app.directive("hasPermi", hasPermiDirective);
15451
+ }
15452
+ };
15453
+ const hasRoleDirective = {
15454
+ mounted(el, binding) {
15455
+ checkRole(el, binding);
15456
+ },
15457
+ updated(el, binding) {
15458
+ checkRole(el, binding);
15459
+ }
15460
+ };
15461
+ function checkRole(el, binding) {
15462
+ const { value } = binding;
15463
+ if (!value) return;
15464
+ if (value instanceof Array) {
15465
+ const hasRole2 = hasRoleOr(value, false);
15466
+ if (hasRole2) return;
15467
+ el.parentNode?.removeChild(el);
15468
+ return;
15469
+ }
15470
+ }
15471
+ const hasRole = {
15472
+ install(app) {
15473
+ app.directive("hasRole", hasRoleDirective);
15474
+ }
15475
+ };
15155
15476
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
15156
15477
  ...{
15157
15478
  name: "QdServiceTable"
@@ -17601,294 +17922,6 @@ function defaultOnOpen(response) {
17601
17922
  throw new Error(`Expected content-type to be ${EventStreamContentType}, Actual: ${contentType}`);
17602
17923
  }
17603
17924
  }
17604
- function getDefaultExportFromCjs(x) {
17605
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
17606
- }
17607
- var dayjs_min$1 = { exports: {} };
17608
- var dayjs_min = dayjs_min$1.exports;
17609
- var hasRequiredDayjs_min;
17610
- function requireDayjs_min() {
17611
- if (hasRequiredDayjs_min) return dayjs_min$1.exports;
17612
- hasRequiredDayjs_min = 1;
17613
- (function(module2, exports2) {
17614
- !(function(t, e) {
17615
- module2.exports = e();
17616
- })(dayjs_min, (function() {
17617
- var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h2 = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
17618
- var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
17619
- return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
17620
- } }, m = function(t2, e2, n2) {
17621
- var r2 = String(t2);
17622
- return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
17623
- }, v = { s: m, z: function(t2) {
17624
- var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
17625
- return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
17626
- }, m: function t2(e2, n2) {
17627
- if (e2.date() < n2.date()) return -t2(n2, e2);
17628
- var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
17629
- return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
17630
- }, a: function(t2) {
17631
- return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
17632
- }, p: function(t2) {
17633
- return { M: c, y: h2, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
17634
- }, u: function(t2) {
17635
- return void 0 === t2;
17636
- } }, g = "en", D = {};
17637
- D[g] = M;
17638
- var p = "$isDayjsObject", S = function(t2) {
17639
- return t2 instanceof _ || !(!t2 || !t2[p]);
17640
- }, w = function t2(e2, n2, r2) {
17641
- var i2;
17642
- if (!e2) return g;
17643
- if ("string" == typeof e2) {
17644
- var s2 = e2.toLowerCase();
17645
- D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
17646
- var u2 = e2.split("-");
17647
- if (!i2 && u2.length > 1) return t2(u2[0]);
17648
- } else {
17649
- var a2 = e2.name;
17650
- D[a2] = e2, i2 = a2;
17651
- }
17652
- return !r2 && i2 && (g = i2), i2 || !r2 && g;
17653
- }, O = function(t2, e2) {
17654
- if (S(t2)) return t2.clone();
17655
- var n2 = "object" == typeof e2 ? e2 : {};
17656
- return n2.date = t2, n2.args = arguments, new _(n2);
17657
- }, b = v;
17658
- b.l = w, b.i = S, b.w = function(t2, e2) {
17659
- return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
17660
- };
17661
- var _ = (function() {
17662
- function M2(t2) {
17663
- this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
17664
- }
17665
- var m2 = M2.prototype;
17666
- return m2.parse = function(t2) {
17667
- this.$d = (function(t3) {
17668
- var e2 = t3.date, n2 = t3.utc;
17669
- if (null === e2) return /* @__PURE__ */ new Date(NaN);
17670
- if (b.u(e2)) return /* @__PURE__ */ new Date();
17671
- if (e2 instanceof Date) return new Date(e2);
17672
- if ("string" == typeof e2 && !/Z$/i.test(e2)) {
17673
- var r2 = e2.match($);
17674
- if (r2) {
17675
- var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
17676
- return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
17677
- }
17678
- }
17679
- return new Date(e2);
17680
- })(t2), this.init();
17681
- }, m2.init = function() {
17682
- var t2 = this.$d;
17683
- this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
17684
- }, m2.$utils = function() {
17685
- return b;
17686
- }, m2.isValid = function() {
17687
- return !(this.$d.toString() === l);
17688
- }, m2.isSame = function(t2, e2) {
17689
- var n2 = O(t2);
17690
- return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
17691
- }, m2.isAfter = function(t2, e2) {
17692
- return O(t2) < this.startOf(e2);
17693
- }, m2.isBefore = function(t2, e2) {
17694
- return this.endOf(e2) < O(t2);
17695
- }, m2.$g = function(t2, e2, n2) {
17696
- return b.u(t2) ? this[e2] : this.set(n2, t2);
17697
- }, m2.unix = function() {
17698
- return Math.floor(this.valueOf() / 1e3);
17699
- }, m2.valueOf = function() {
17700
- return this.$d.getTime();
17701
- }, m2.startOf = function(t2, e2) {
17702
- var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
17703
- var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
17704
- return r2 ? i2 : i2.endOf(a);
17705
- }, $2 = function(t3, e3) {
17706
- return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
17707
- }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
17708
- switch (f2) {
17709
- case h2:
17710
- return r2 ? l2(1, 0) : l2(31, 11);
17711
- case c:
17712
- return r2 ? l2(1, M3) : l2(0, M3 + 1);
17713
- case o:
17714
- var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
17715
- return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
17716
- case a:
17717
- case d:
17718
- return $2(v2 + "Hours", 0);
17719
- case u:
17720
- return $2(v2 + "Minutes", 1);
17721
- case s:
17722
- return $2(v2 + "Seconds", 2);
17723
- case i:
17724
- return $2(v2 + "Milliseconds", 3);
17725
- default:
17726
- return this.clone();
17727
- }
17728
- }, m2.endOf = function(t2) {
17729
- return this.startOf(t2, false);
17730
- }, m2.$set = function(t2, e2) {
17731
- var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h2] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
17732
- if (o2 === c || o2 === h2) {
17733
- var y2 = this.clone().set(d, 1);
17734
- y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
17735
- } else l2 && this.$d[l2]($2);
17736
- return this.init(), this;
17737
- }, m2.set = function(t2, e2) {
17738
- return this.clone().$set(t2, e2);
17739
- }, m2.get = function(t2) {
17740
- return this[b.p(t2)]();
17741
- }, m2.add = function(r2, f2) {
17742
- var d2, l2 = this;
17743
- r2 = Number(r2);
17744
- var $2 = b.p(f2), y2 = function(t2) {
17745
- var e2 = O(l2);
17746
- return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
17747
- };
17748
- if ($2 === c) return this.set(c, this.$M + r2);
17749
- if ($2 === h2) return this.set(h2, this.$y + r2);
17750
- if ($2 === a) return y2(1);
17751
- if ($2 === o) return y2(7);
17752
- var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
17753
- return b.w(m3, this);
17754
- }, m2.subtract = function(t2, e2) {
17755
- return this.add(-1 * t2, e2);
17756
- }, m2.format = function(t2) {
17757
- var e2 = this, n2 = this.$locale();
17758
- if (!this.isValid()) return n2.invalidDate || l;
17759
- var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h3 = function(t3, n3, i3, s3) {
17760
- return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
17761
- }, d2 = function(t3) {
17762
- return b.s(s2 % 12 || 12, t3, "0");
17763
- }, $2 = f2 || function(t3, e3, n3) {
17764
- var r3 = t3 < 12 ? "AM" : "PM";
17765
- return n3 ? r3.toLowerCase() : r3;
17766
- };
17767
- return r2.replace(y, (function(t3, r3) {
17768
- return r3 || (function(t4) {
17769
- switch (t4) {
17770
- case "YY":
17771
- return String(e2.$y).slice(-2);
17772
- case "YYYY":
17773
- return b.s(e2.$y, 4, "0");
17774
- case "M":
17775
- return a2 + 1;
17776
- case "MM":
17777
- return b.s(a2 + 1, 2, "0");
17778
- case "MMM":
17779
- return h3(n2.monthsShort, a2, c2, 3);
17780
- case "MMMM":
17781
- return h3(c2, a2);
17782
- case "D":
17783
- return e2.$D;
17784
- case "DD":
17785
- return b.s(e2.$D, 2, "0");
17786
- case "d":
17787
- return String(e2.$W);
17788
- case "dd":
17789
- return h3(n2.weekdaysMin, e2.$W, o2, 2);
17790
- case "ddd":
17791
- return h3(n2.weekdaysShort, e2.$W, o2, 3);
17792
- case "dddd":
17793
- return o2[e2.$W];
17794
- case "H":
17795
- return String(s2);
17796
- case "HH":
17797
- return b.s(s2, 2, "0");
17798
- case "h":
17799
- return d2(1);
17800
- case "hh":
17801
- return d2(2);
17802
- case "a":
17803
- return $2(s2, u2, true);
17804
- case "A":
17805
- return $2(s2, u2, false);
17806
- case "m":
17807
- return String(u2);
17808
- case "mm":
17809
- return b.s(u2, 2, "0");
17810
- case "s":
17811
- return String(e2.$s);
17812
- case "ss":
17813
- return b.s(e2.$s, 2, "0");
17814
- case "SSS":
17815
- return b.s(e2.$ms, 3, "0");
17816
- case "Z":
17817
- return i2;
17818
- }
17819
- return null;
17820
- })(t3) || i2.replace(":", "");
17821
- }));
17822
- }, m2.utcOffset = function() {
17823
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
17824
- }, m2.diff = function(r2, d2, l2) {
17825
- var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
17826
- return b.m(y2, m3);
17827
- };
17828
- switch (M3) {
17829
- case h2:
17830
- $2 = D2() / 12;
17831
- break;
17832
- case c:
17833
- $2 = D2();
17834
- break;
17835
- case f:
17836
- $2 = D2() / 3;
17837
- break;
17838
- case o:
17839
- $2 = (g2 - v2) / 6048e5;
17840
- break;
17841
- case a:
17842
- $2 = (g2 - v2) / 864e5;
17843
- break;
17844
- case u:
17845
- $2 = g2 / n;
17846
- break;
17847
- case s:
17848
- $2 = g2 / e;
17849
- break;
17850
- case i:
17851
- $2 = g2 / t;
17852
- break;
17853
- default:
17854
- $2 = g2;
17855
- }
17856
- return l2 ? $2 : b.a($2);
17857
- }, m2.daysInMonth = function() {
17858
- return this.endOf(c).$D;
17859
- }, m2.$locale = function() {
17860
- return D[this.$L];
17861
- }, m2.locale = function(t2, e2) {
17862
- if (!t2) return this.$L;
17863
- var n2 = this.clone(), r2 = w(t2, e2, true);
17864
- return r2 && (n2.$L = r2), n2;
17865
- }, m2.clone = function() {
17866
- return b.w(this.$d, this);
17867
- }, m2.toDate = function() {
17868
- return new Date(this.valueOf());
17869
- }, m2.toJSON = function() {
17870
- return this.isValid() ? this.toISOString() : null;
17871
- }, m2.toISOString = function() {
17872
- return this.$d.toISOString();
17873
- }, m2.toString = function() {
17874
- return this.$d.toUTCString();
17875
- }, M2;
17876
- })(), k = _.prototype;
17877
- return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h2], ["$D", d]].forEach((function(t2) {
17878
- k[t2[1]] = function(e2) {
17879
- return this.$g(e2, t2[0], t2[1]);
17880
- };
17881
- })), O.extend = function(t2, e2) {
17882
- return t2.$i || (t2(e2, _, O), t2.$i = true), O;
17883
- }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
17884
- return O(1e3 * t2);
17885
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
17886
- }));
17887
- })(dayjs_min$1);
17888
- return dayjs_min$1.exports;
17889
- }
17890
- var dayjs_minExports = requireDayjs_min();
17891
- const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
17892
17925
  const csl = useCsl("useAgentChat");
17893
17926
  function useAgentChat(options) {
17894
17927
  const { t } = useConfig("chat");
@@ -55768,11 +55801,12 @@ export {
55768
55801
  useReadonly as W,
55769
55802
  useDisabled as X,
55770
55803
  auth as Y,
55804
+ formatDuration as Z,
55771
55805
  _typeof as _,
55772
55806
  _sfc_main$k as a,
55773
55807
  QdConfigProvider as b,
55774
55808
  commonjsGlobal as c,
55775
- dayjs_minExports$1 as d,
55809
+ dayjs_minExports as d,
55776
55810
  _sfc_main$j as e,
55777
55811
  qdAsyncCompute as f,
55778
55812
  qdUseComputeValue as g,
@@ -55796,4 +55830,4 @@ export {
55796
55830
  _sfc_main$1 as y,
55797
55831
  _sfc_main$b as z
55798
55832
  };
55799
- //# sourceMappingURL=index-BA4q8-l9.mjs.map
55833
+ //# sourceMappingURL=index-BP_utvqh.mjs.map