@kong-ui-public/misc-widgets 0.4.17 → 0.5.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.
@@ -1,16 +1,16 @@
1
- import { defineComponent as vt, h as Kt, computed as Zt, ref as Yt, onMounted as Wt, resolveComponent as zt, openBlock as qt, createElementBlock as Qt, createVNode as Jt, unref as K, withCtx as $t, createElementVNode as at, toDisplayString as tr, createCommentVNode as rr } from "vue";
2
- var z = function(t, r) {
3
- return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
1
+ import { defineComponent as vt, h as Kt, computed as Zt, ref as Yt, onMounted as Wt, resolveComponent as zt, openBlock as qt, createElementBlock as Qt, createVNode as Jt, withCtx as $t, createElementVNode as ot, unref as at, toDisplayString as tr, createCommentVNode as rr } from "vue";
2
+ var W = function(t, r) {
3
+ return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
4
4
  e.__proto__ = n;
5
5
  } || function(e, n) {
6
6
  for (var i in n)
7
7
  Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
8
- }, z(t, r);
8
+ }, W(t, r);
9
9
  };
10
10
  function B(t, r) {
11
11
  if (typeof r != "function" && r !== null)
12
12
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
13
- z(t, r);
13
+ W(t, r);
14
14
  function e() {
15
15
  this.constructor = t;
16
16
  }
@@ -83,7 +83,7 @@ function Bt(t) {
83
83
  function Nt(t) {
84
84
  return !!(t && typeof t == "object" && t.type === w.number);
85
85
  }
86
- function q(t) {
86
+ function z(t) {
87
87
  return !!(t && typeof t == "object" && t.type === w.dateTime);
88
88
  }
89
89
  var It = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, or = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
@@ -1743,18 +1743,18 @@ function pr(t) {
1743
1743
  var i = j[n || ""] || j[e || ""] || j["".concat(e, "-001")] || j["001"];
1744
1744
  return i[0];
1745
1745
  }
1746
- var Z, gr = new RegExp("^".concat(It.source, "*")), Er = new RegExp("".concat(It.source, "*$"));
1746
+ var K, gr = new RegExp("^".concat(It.source, "*")), Er = new RegExp("".concat(It.source, "*$"));
1747
1747
  function E(t, r) {
1748
1748
  return { start: t, end: r };
1749
1749
  }
1750
1750
  var br = !!String.prototype.startsWith, yr = !!String.fromCodePoint, dr = !!Object.fromEntries, vr = !!String.prototype.codePointAt, Tr = !!String.prototype.trimStart, _r = !!String.prototype.trimEnd, Hr = !!Number.isSafeInteger, Sr = Hr ? Number.isSafeInteger : function(t) {
1751
1751
  return typeof t == "number" && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991;
1752
- }, Q = !0;
1752
+ }, q = !0;
1753
1753
  try {
1754
1754
  var Ar = Ct("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
1755
- Q = ((Z = Ar.exec("a")) === null || Z === void 0 ? void 0 : Z[0]) === "a";
1755
+ q = ((K = Ar.exec("a")) === null || K === void 0 ? void 0 : K[0]) === "a";
1756
1756
  } catch {
1757
- Q = !1;
1757
+ q = !1;
1758
1758
  }
1759
1759
  var lt = br ? (
1760
1760
  // Native
@@ -1766,7 +1766,7 @@ var lt = br ? (
1766
1766
  function(t, r, e) {
1767
1767
  return t.slice(e, e + r.length) === r;
1768
1768
  }
1769
- ), J = yr ? String.fromCodePoint : (
1769
+ ), Q = yr ? String.fromCodePoint : (
1770
1770
  // IE11
1771
1771
  function() {
1772
1772
  for (var t = [], r = 0; r < arguments.length; r++)
@@ -1828,24 +1828,24 @@ var lt = br ? (
1828
1828
  function Ct(t, r) {
1829
1829
  return new RegExp(t, r);
1830
1830
  }
1831
- var $;
1832
- if (Q) {
1831
+ var J;
1832
+ if (q) {
1833
1833
  var mt = Ct("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
1834
- $ = function(t, r) {
1834
+ J = function(t, r) {
1835
1835
  var e;
1836
1836
  mt.lastIndex = r;
1837
1837
  var n = mt.exec(t);
1838
1838
  return (e = n[1]) !== null && e !== void 0 ? e : "";
1839
1839
  };
1840
1840
  } else
1841
- $ = function(t, r) {
1841
+ J = function(t, r) {
1842
1842
  for (var e = []; ; ) {
1843
1843
  var n = Ot(t, r);
1844
1844
  if (n === void 0 || Mt(n) || Rr(n))
1845
1845
  break;
1846
1846
  e.push(n), r += n >= 65536 ? 2 : 1;
1847
1847
  }
1848
- return J.apply(void 0, e);
1848
+ return Q.apply(void 0, e);
1849
1849
  };
1850
1850
  var Ir = (
1851
1851
  /** @class */
@@ -1878,7 +1878,7 @@ var Ir = (
1878
1878
  if (n)
1879
1879
  break;
1880
1880
  return this.error(g.UNMATCHED_CLOSING_TAG, E(this.clonePosition(), this.clonePosition()));
1881
- } else if (o === 60 && !this.ignoreTag && tt(this.peek() || 0)) {
1881
+ } else if (o === 60 && !this.ignoreTag && $(this.peek() || 0)) {
1882
1882
  var a = this.parseTag(r, e);
1883
1883
  if (a.err)
1884
1884
  return a;
@@ -1911,7 +1911,7 @@ var Ir = (
1911
1911
  return o;
1912
1912
  var a = o.val, s = this.clonePosition();
1913
1913
  if (this.bumpIf("</")) {
1914
- if (this.isEOF() || !tt(this.char()))
1914
+ if (this.isEOF() || !$(this.char()))
1915
1915
  return this.error(g.INVALID_TAG, E(s, this.clonePosition()));
1916
1916
  var c = this.clonePosition(), u = this.parseTagName();
1917
1917
  return i !== u ? this.error(g.UNMATCHED_CLOSING_TAG, E(c, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
@@ -1992,12 +1992,12 @@ var Ir = (
1992
1992
  e.push(n);
1993
1993
  this.bump();
1994
1994
  }
1995
- return J.apply(void 0, e);
1995
+ return Q.apply(void 0, e);
1996
1996
  }, t.prototype.tryParseUnquoted = function(r, e) {
1997
1997
  if (this.isEOF())
1998
1998
  return null;
1999
1999
  var n = this.char();
2000
- return n === 60 || n === 123 || n === 35 && (e === "plural" || e === "selectordinal") || n === 125 && r > 0 ? null : (this.bump(), J(n));
2000
+ return n === 60 || n === 123 || n === 35 && (e === "plural" || e === "selectordinal") || n === 125 && r > 0 ? null : (this.bump(), Q(n));
2001
2001
  }, t.prototype.parseArgument = function(r, e) {
2002
2002
  var n = this.clonePosition();
2003
2003
  if (this.bump(), this.bumpSpace(), this.isEOF())
@@ -2026,7 +2026,7 @@ var Ir = (
2026
2026
  return this.error(g.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
2027
2027
  }
2028
2028
  }, t.prototype.parseIdentifierIfPossible = function() {
2029
- var r = this.clonePosition(), e = this.offset(), n = $(this.message, e), i = e + n.length;
2029
+ var r = this.clonePosition(), e = this.offset(), n = J(this.message, e), i = e + n.length;
2030
2030
  this.bumpTo(i);
2031
2031
  var o = this.clonePosition(), a = E(r, o);
2032
2032
  return { value: n, location: a };
@@ -2113,13 +2113,13 @@ var Ir = (
2113
2113
  var d = this.tryParseArgumentClose(i);
2114
2114
  if (d.err)
2115
2115
  return d;
2116
- var ot = E(i, this.clonePosition());
2116
+ var it = E(i, this.clonePosition());
2117
2117
  return s === "select" ? {
2118
2118
  val: {
2119
2119
  type: y.select,
2120
2120
  value: n,
2121
2121
  options: ft(k.val),
2122
- location: ot
2122
+ location: it
2123
2123
  },
2124
2124
  err: null
2125
2125
  } : {
@@ -2129,7 +2129,7 @@ var Ir = (
2129
2129
  options: ft(k.val),
2130
2130
  offset: O,
2131
2131
  pluralType: s === "plural" ? "cardinal" : "ordinal",
2132
- location: ot
2132
+ location: it
2133
2133
  },
2134
2134
  err: null
2135
2135
  };
@@ -2300,11 +2300,11 @@ var Ir = (
2300
2300
  }, t;
2301
2301
  }()
2302
2302
  );
2303
- function tt(t) {
2303
+ function $(t) {
2304
2304
  return t >= 97 && t <= 122 || t >= 65 && t <= 90;
2305
2305
  }
2306
2306
  function Lr(t) {
2307
- return tt(t) || t === 47;
2307
+ return $(t) || t === 47;
2308
2308
  }
2309
2309
  function Pr(t) {
2310
2310
  return t === 45 || t === 46 || t >= 48 && t <= 57 || t === 95 || t >= 97 && t <= 122 || t >= 65 && t <= 90 || t == 183 || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8255 && t <= 8256 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039;
@@ -2315,13 +2315,13 @@ function Mt(t) {
2315
2315
  function Rr(t) {
2316
2316
  return t >= 33 && t <= 35 || t === 36 || t >= 37 && t <= 39 || t === 40 || t === 41 || t === 42 || t === 43 || t === 44 || t === 45 || t >= 46 && t <= 47 || t >= 58 && t <= 59 || t >= 60 && t <= 62 || t >= 63 && t <= 64 || t === 91 || t === 92 || t === 93 || t === 94 || t === 96 || t === 123 || t === 124 || t === 125 || t === 126 || t === 161 || t >= 162 && t <= 165 || t === 166 || t === 167 || t === 169 || t === 171 || t === 172 || t === 174 || t === 176 || t === 177 || t === 182 || t === 187 || t === 191 || t === 215 || t === 247 || t >= 8208 && t <= 8213 || t >= 8214 && t <= 8215 || t === 8216 || t === 8217 || t === 8218 || t >= 8219 && t <= 8220 || t === 8221 || t === 8222 || t === 8223 || t >= 8224 && t <= 8231 || t >= 8240 && t <= 8248 || t === 8249 || t === 8250 || t >= 8251 && t <= 8254 || t >= 8257 && t <= 8259 || t === 8260 || t === 8261 || t === 8262 || t >= 8263 && t <= 8273 || t === 8274 || t === 8275 || t >= 8277 && t <= 8286 || t >= 8592 && t <= 8596 || t >= 8597 && t <= 8601 || t >= 8602 && t <= 8603 || t >= 8604 && t <= 8607 || t === 8608 || t >= 8609 && t <= 8610 || t === 8611 || t >= 8612 && t <= 8613 || t === 8614 || t >= 8615 && t <= 8621 || t === 8622 || t >= 8623 && t <= 8653 || t >= 8654 && t <= 8655 || t >= 8656 && t <= 8657 || t === 8658 || t === 8659 || t === 8660 || t >= 8661 && t <= 8691 || t >= 8692 && t <= 8959 || t >= 8960 && t <= 8967 || t === 8968 || t === 8969 || t === 8970 || t === 8971 || t >= 8972 && t <= 8991 || t >= 8992 && t <= 8993 || t >= 8994 && t <= 9e3 || t === 9001 || t === 9002 || t >= 9003 && t <= 9083 || t === 9084 || t >= 9085 && t <= 9114 || t >= 9115 && t <= 9139 || t >= 9140 && t <= 9179 || t >= 9180 && t <= 9185 || t >= 9186 && t <= 9254 || t >= 9255 && t <= 9279 || t >= 9280 && t <= 9290 || t >= 9291 && t <= 9311 || t >= 9472 && t <= 9654 || t === 9655 || t >= 9656 && t <= 9664 || t === 9665 || t >= 9666 && t <= 9719 || t >= 9720 && t <= 9727 || t >= 9728 && t <= 9838 || t === 9839 || t >= 9840 && t <= 10087 || t === 10088 || t === 10089 || t === 10090 || t === 10091 || t === 10092 || t === 10093 || t === 10094 || t === 10095 || t === 10096 || t === 10097 || t === 10098 || t === 10099 || t === 10100 || t === 10101 || t >= 10132 && t <= 10175 || t >= 10176 && t <= 10180 || t === 10181 || t === 10182 || t >= 10183 && t <= 10213 || t === 10214 || t === 10215 || t === 10216 || t === 10217 || t === 10218 || t === 10219 || t === 10220 || t === 10221 || t === 10222 || t === 10223 || t >= 10224 && t <= 10239 || t >= 10240 && t <= 10495 || t >= 10496 && t <= 10626 || t === 10627 || t === 10628 || t === 10629 || t === 10630 || t === 10631 || t === 10632 || t === 10633 || t === 10634 || t === 10635 || t === 10636 || t === 10637 || t === 10638 || t === 10639 || t === 10640 || t === 10641 || t === 10642 || t === 10643 || t === 10644 || t === 10645 || t === 10646 || t === 10647 || t === 10648 || t >= 10649 && t <= 10711 || t === 10712 || t === 10713 || t === 10714 || t === 10715 || t >= 10716 && t <= 10747 || t === 10748 || t === 10749 || t >= 10750 && t <= 11007 || t >= 11008 && t <= 11055 || t >= 11056 && t <= 11076 || t >= 11077 && t <= 11078 || t >= 11079 && t <= 11084 || t >= 11085 && t <= 11123 || t >= 11124 && t <= 11125 || t >= 11126 && t <= 11157 || t === 11158 || t >= 11159 && t <= 11263 || t >= 11776 && t <= 11777 || t === 11778 || t === 11779 || t === 11780 || t === 11781 || t >= 11782 && t <= 11784 || t === 11785 || t === 11786 || t === 11787 || t === 11788 || t === 11789 || t >= 11790 && t <= 11798 || t === 11799 || t >= 11800 && t <= 11801 || t === 11802 || t === 11803 || t === 11804 || t === 11805 || t >= 11806 && t <= 11807 || t === 11808 || t === 11809 || t === 11810 || t === 11811 || t === 11812 || t === 11813 || t === 11814 || t === 11815 || t === 11816 || t === 11817 || t >= 11818 && t <= 11822 || t === 11823 || t >= 11824 && t <= 11833 || t >= 11834 && t <= 11835 || t >= 11836 && t <= 11839 || t === 11840 || t === 11841 || t === 11842 || t >= 11843 && t <= 11855 || t >= 11856 && t <= 11857 || t === 11858 || t >= 11859 && t <= 11903 || t >= 12289 && t <= 12291 || t === 12296 || t === 12297 || t === 12298 || t === 12299 || t === 12300 || t === 12301 || t === 12302 || t === 12303 || t === 12304 || t === 12305 || t >= 12306 && t <= 12307 || t === 12308 || t === 12309 || t === 12310 || t === 12311 || t === 12312 || t === 12313 || t === 12314 || t === 12315 || t === 12316 || t === 12317 || t >= 12318 && t <= 12319 || t === 12320 || t === 12336 || t === 64830 || t === 64831 || t >= 65093 && t <= 65094;
2317
2317
  }
2318
- function rt(t) {
2318
+ function tt(t) {
2319
2319
  t.forEach(function(r) {
2320
2320
  if (delete r.location, St(r) || At(r))
2321
2321
  for (var e in r.options)
2322
- delete r.options[e].location, rt(r.options[e].value);
2322
+ delete r.options[e].location, tt(r.options[e].value);
2323
2323
  else
2324
- Tt(r) && Nt(r.style) || (_t(r) || Ht(r)) && q(r.style) ? delete r.style.location : Bt(r) && rt(r.children);
2324
+ Tt(r) && Nt(r.style) || (_t(r) || Ht(r)) && z(r.style) ? delete r.style.location : Bt(r) && tt(r.children);
2325
2325
  });
2326
2326
  }
2327
2327
  function Or(t, r) {
@@ -2331,7 +2331,7 @@ function Or(t, r) {
2331
2331
  var n = SyntaxError(g[e.err.kind]);
2332
2332
  throw n.location = e.err.location, n.originalMessage = e.err.message, n;
2333
2333
  }
2334
- return r != null && r.captureLocation || rt(e.val), e.val;
2334
+ return r != null && r.captureLocation || tt(e.val), e.val;
2335
2335
  }
2336
2336
  function N(t, r) {
2337
2337
  var e = r && r.cache ? r.cache : Ur, n = r && r.serializer ? r.serializer : Gr, i = r && r.strategy ? r.strategy : Mr;
@@ -2351,34 +2351,34 @@ function wt(t, r, e) {
2351
2351
  var n = Array.prototype.slice.call(arguments, 3), i = e(n), o = r.get(i);
2352
2352
  return typeof o > "u" && (o = t.apply(this, n), r.set(i, o)), o;
2353
2353
  }
2354
- function et(t, r, e, n, i) {
2354
+ function rt(t, r, e, n, i) {
2355
2355
  return e.bind(r, t, n, i);
2356
2356
  }
2357
2357
  function Mr(t, r) {
2358
2358
  var e = t.length === 1 ? Dt : wt;
2359
- return et(t, this, e, r.cache.create(), r.serializer);
2359
+ return rt(t, this, e, r.cache.create(), r.serializer);
2360
2360
  }
2361
2361
  function Dr(t, r) {
2362
- return et(t, this, wt, r.cache.create(), r.serializer);
2362
+ return rt(t, this, wt, r.cache.create(), r.serializer);
2363
2363
  }
2364
2364
  function wr(t, r) {
2365
- return et(t, this, Dt, r.cache.create(), r.serializer);
2365
+ return rt(t, this, Dt, r.cache.create(), r.serializer);
2366
2366
  }
2367
2367
  var Gr = function() {
2368
2368
  return JSON.stringify(arguments);
2369
2369
  };
2370
- function nt() {
2370
+ function et() {
2371
2371
  this.cache = /* @__PURE__ */ Object.create(null);
2372
2372
  }
2373
- nt.prototype.get = function(t) {
2373
+ et.prototype.get = function(t) {
2374
2374
  return this.cache[t];
2375
2375
  };
2376
- nt.prototype.set = function(t, r) {
2376
+ et.prototype.set = function(t, r) {
2377
2377
  this.cache[t] = r;
2378
2378
  };
2379
2379
  var Ur = {
2380
2380
  create: function() {
2381
- return new nt();
2381
+ return new et();
2382
2382
  }
2383
2383
  }, I = {
2384
2384
  variadic: Dr,
@@ -2475,7 +2475,7 @@ function x(t, r, e, n, i, o, a) {
2475
2475
  continue;
2476
2476
  }
2477
2477
  if (_t(h)) {
2478
- var p = typeof h.style == "string" ? n.date[h.style] : q(h.style) ? h.style.parsedOptions : void 0;
2478
+ var p = typeof h.style == "string" ? n.date[h.style] : z(h.style) ? h.style.parsedOptions : void 0;
2479
2479
  s.push({
2480
2480
  type: H.literal,
2481
2481
  value: e.getDateTimeFormat(r, p).format(f)
@@ -2483,7 +2483,7 @@ function x(t, r, e, n, i, o, a) {
2483
2483
  continue;
2484
2484
  }
2485
2485
  if (Ht(h)) {
2486
- var p = typeof h.style == "string" ? n.time[h.style] : q(h.style) ? h.style.parsedOptions : n.time.medium;
2486
+ var p = typeof h.style == "string" ? n.time[h.style] : z(h.style) ? h.style.parsedOptions : n.time.medium;
2487
2487
  s.push({
2488
2488
  type: H.literal,
2489
2489
  value: e.getDateTimeFormat(r, p).format(f)
@@ -2547,7 +2547,7 @@ function Xr(t, r) {
2547
2547
  return e[n] = xr(t[n], r[n]), e;
2548
2548
  }, m({}, t)) : t;
2549
2549
  }
2550
- function Y(t) {
2550
+ function Z(t) {
2551
2551
  return {
2552
2552
  create: function() {
2553
2553
  return {
@@ -2572,7 +2572,7 @@ function Kr(t) {
2572
2572
  e[n] = arguments[n];
2573
2573
  return new ((r = Intl.NumberFormat).bind.apply(r, P([void 0], e, !1)))();
2574
2574
  }, {
2575
- cache: Y(t.number),
2575
+ cache: Z(t.number),
2576
2576
  strategy: I.variadic
2577
2577
  }),
2578
2578
  getDateTimeFormat: N(function() {
@@ -2580,7 +2580,7 @@ function Kr(t) {
2580
2580
  e[n] = arguments[n];
2581
2581
  return new ((r = Intl.DateTimeFormat).bind.apply(r, P([void 0], e, !1)))();
2582
2582
  }, {
2583
- cache: Y(t.dateTime),
2583
+ cache: Z(t.dateTime),
2584
2584
  strategy: I.variadic
2585
2585
  }),
2586
2586
  getPluralRules: N(function() {
@@ -2588,7 +2588,7 @@ function Kr(t) {
2588
2588
  e[n] = arguments[n];
2589
2589
  return new ((r = Intl.PluralRules).bind.apply(r, P([void 0], e, !1)))();
2590
2590
  }, {
2591
- cache: Y(t.pluralRules),
2591
+ cache: Z(t.pluralRules),
2592
2592
  strategy: I.variadic
2593
2593
  })
2594
2594
  };
@@ -2760,7 +2760,7 @@ Locale: `).concat(n, `
2760
2760
  }
2761
2761
  return r;
2762
2762
  }(F)
2763
- ), W = (
2763
+ ), Y = (
2764
2764
  /** @class */
2765
2765
  function(t) {
2766
2766
  B(r, t);
@@ -2896,7 +2896,7 @@ function Jr(t) {
2896
2896
  })
2897
2897
  };
2898
2898
  }
2899
- function it(t, r, e, n) {
2899
+ function nt(t, r, e, n) {
2900
2900
  var i = t && t[r], o;
2901
2901
  if (i && (o = i[e]), o)
2902
2902
  return o;
@@ -2946,7 +2946,7 @@ var yt = function(t, r, e, n, i) {
2946
2946
  var S = r.getMessageFormat(b, c, u, i);
2947
2947
  return S.format(n);
2948
2948
  } catch (_) {
2949
- return l(new W('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), o, e, _)), typeof b == "string" ? b : v;
2949
+ return l(new Y('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), o, e, _)), typeof b == "string" ? b : v;
2950
2950
  }
2951
2951
  return v;
2952
2952
  }
@@ -2954,14 +2954,14 @@ var yt = function(t, r, e, n, i) {
2954
2954
  var S = r.getMessageFormat(T, o, a, m({ formatters: r }, i || {}));
2955
2955
  return S.format(n);
2956
2956
  } catch (_) {
2957
- l(new W('Error formatting message: "'.concat(v, '", using ').concat(b ? "default message" : "id", " as fallback."), o, e, _));
2957
+ l(new Y('Error formatting message: "'.concat(v, '", using ').concat(b ? "default message" : "id", " as fallback."), o, e, _));
2958
2958
  }
2959
2959
  if (b)
2960
2960
  try {
2961
2961
  var S = r.getMessageFormat(b, c, u, i);
2962
2962
  return S.format(n);
2963
2963
  } catch (_) {
2964
- l(new W('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), o, e, _));
2964
+ l(new Y('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), o, e, _));
2965
2965
  }
2966
2966
  return typeof T == "string" ? T : typeof b == "string" ? b : v;
2967
2967
  }, Ft = [
@@ -2988,7 +2988,7 @@ var yt = function(t, r, e, n, i) {
2988
2988
  function X(t, r, e, n) {
2989
2989
  var i = t.locale, o = t.formats, a = t.onError, s = t.timeZone;
2990
2990
  n === void 0 && (n = {});
2991
- var c = n.format, u = m(m({}, s && { timeZone: s }), c && it(o, r, c, a)), h = D(n, Ft, u);
2991
+ var c = n.format, u = m(m({}, s && { timeZone: s }), c && nt(o, r, c, a)), h = D(n, Ft, u);
2992
2992
  return r === "time" && !h.hour && !h.minute && !h.second && !h.timeStyle && !h.dateStyle && (h = m(m({}, h), { hour: "numeric", minute: "numeric" })), e(i, h);
2993
2993
  }
2994
2994
  function te(t, r) {
@@ -3121,7 +3121,7 @@ var fe = ["numeric", "style"];
3121
3121
  function me(t, r, e) {
3122
3122
  var n = t.locale, i = t.formats, o = t.onError;
3123
3123
  e === void 0 && (e = {});
3124
- var a = e.format, s = !!a && it(i, "relative", a, o) || {}, c = D(e, fe, s);
3124
+ var a = e.format, s = !!a && nt(i, "relative", a, o) || {}, c = D(e, fe, s);
3125
3125
  return r(n, c);
3126
3126
  }
3127
3127
  function pe(t, r, e, n, i) {
@@ -3162,7 +3162,7 @@ var ge = [
3162
3162
  function jt(t, r, e) {
3163
3163
  var n = t.locale, i = t.formats, o = t.onError;
3164
3164
  e === void 0 && (e = {});
3165
- var a = e.format, s = a && it(i, "number", a, o) || {}, c = D(e, ge, s);
3165
+ var a = e.format, s = a && nt(i, "number", a, o) || {}, c = D(e, ge, s);
3166
3166
  return r(n, c);
3167
3167
  }
3168
3168
  function Ee(t, r, e, n) {
@@ -3405,17 +3405,17 @@ const Le = {
3405
3405
  }), (o, a) => {
3406
3406
  const s = zt("KTooltip");
3407
3407
  return t.url && i.value ? (qt(), Qt("div", Pe, [
3408
- Jt(s, { label: K(n) }, {
3408
+ Jt(s, { label: n.value }, {
3409
3409
  default: $t(() => [
3410
- at("span", null, [
3411
- at("a", {
3412
- "aria-label": K(e).t("githubStar.ariaLabel"),
3410
+ ot("span", null, [
3411
+ ot("a", {
3412
+ "aria-label": at(e).t("githubStar.ariaLabel"),
3413
3413
  class: "github-button",
3414
3414
  "data-color-scheme": "no-preference: light; light: light; dark: light;",
3415
3415
  "data-show-count": "true",
3416
3416
  href: t.url,
3417
3417
  target: "_blank"
3418
- }, tr(K(e).t("githubStar.title")), 9, Re)
3418
+ }, tr(at(e).t("githubStar.title")), 9, Re)
3419
3419
  ])
3420
3420
  ]),
3421
3421
  _: 1
@@ -19,4 +19,4 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
19
19
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
20
20
  `,P.MISSING_INTL_API));try{return re(t,r,i).format(e,n)}catch(a){t.onError(new A("Error formatting relative time.",t.locale,a))}return String(e)}var ne=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Ft(t,r,e){var n=t.locale,i=t.formats,o=t.onError;e===void 0&&(e={});var a=e.format,s=a&&ot(i,"number",a,o)||{},c=D(e,ne,s);return r(n,c)}function ie(t,r,e,n){n===void 0&&(n={});try{return Ft(t,r,n).format(e)}catch(i){t.onError(new A("Error formatting number.",t.locale,i))}return String(e)}function oe(t,r,e,n){n===void 0&&(n={});try{return Ft(t,r,n).formatToParts(e)}catch(i){t.onError(new A("Error formatting number.",t.locale,i))}return[]}function ae(t){var r=t?t[Object.keys(t)[0]]:void 0;return typeof r=="string"}function se(t){t.onWarn&&t.defaultRichTextElements&&ae(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
21
21
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
22
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function he(t,r){var e=kr(r),n=m(m({},Fr),t),i=n.locale,o=n.defaultLocale,a=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&a?a(new Rt('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&a&&a(new Rt('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(a&&a(new Dr('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),se(n),m(m({},n),{formatters:e,formatNumber:ie.bind(null,n,e.getNumberFormat),formatNumberToParts:oe.bind(null,n,e.getNumberFormat),formatRelativeTime:ee.bind(null,n,e.getRelativeTimeFormat),formatDate:Vr.bind(null,n,e.getDateTimeFormat),formatDateToParts:Kr.bind(null,n,e.getDateTimeFormat),formatTime:xr.bind(null,n,e.getDateTimeFormat),formatDateTimeRange:Xr.bind(null,n,e.getDateTimeFormat),formatTimeToParts:Zr.bind(null,n,e.getDateTimeFormat),formatPlural:$r.bind(null,n,e.getPluralRules),formatMessage:Dt.bind(null,n,e),$t:Dt.bind(null,n,e),formatList:Qr.bind(null,n,e.getListFormat),formatListToParts:Ut.bind(null,n,e.getListFormat),formatDisplayName:Wr.bind(null,n,e.getDisplayNames)})}var ue=k;k.flatten=k,k.unflatten=Vt;function kt(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function jt(t){return t}function k(t,r){r=r||{};const e=r.delimiter||".",n=r.maxDepth,i=r.transformKey||jt,o={};function a(s,c,u){u=u||1,Object.keys(s).forEach(function(h){const l=s[h],f=r.safe&&Array.isArray(l),g=Object.prototype.toString.call(l),v=kt(l),E=g==="[object Object]"||g==="[object Array]",T=c?c+e+i(h):i(h);if(!f&&!v&&E&&Object.keys(l).length&&(!r.maxDepth||u<n))return a(l,T,u+1);o[T]=l})}return a(t),o}function Vt(t,r){r=r||{};const e=r.delimiter||".",n=r.overwrite||!1,i=r.transformKey||jt,o={};if(kt(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(u){const h=Number(u);return isNaN(h)||u.indexOf(".")!==-1||r.object?u:h}function s(u,h,l){return Object.keys(l).reduce(function(f,g){return f[u+e+g]=l[g],f},h)}function c(u){const h=Object.prototype.toString.call(u),l=h==="[object Array]",f=h==="[object Object]";if(u){if(l)return!u.length;if(f)return!Object.keys(u).length}else return!0}return t=Object.keys(t).reduce(function(u,h){const l=Object.prototype.toString.call(t[h]);return!(l==="[object Object]"||l==="[object Array]")||c(t[h])?(u[h]=t[h],u):s(h,u,k(t[h],r))},{}),Object.keys(t).forEach(function(u){const h=u.split(e).map(i);let l=a(h.shift()),f=a(h[0]),g=o;for(;f!==void 0;){if(l==="__proto__")return;const v=Object.prototype.toString.call(g[l]),E=v==="[object Object]"||v==="[object Array]";if(!n&&!E&&typeof g[l]<"u")return;(n&&!E||!n&&g[l]==null)&&(g[l]=typeof f=="number"&&!r.object?[]:{}),g=g[l],h.length>0&&(l=a(h.shift()),f=a(h[0]))}g[l]=Vt(t[u],r)}),o}const ce=Ot(),le=(t,r,e=!1)=>{const n=he({...typeof e=="boolean"?null:e,locale:t,messages:ue.flatten(r,{safe:!0})},ce),{$t:i,...o}=n,a=o,s=u=>{const h="Invalid Date";if(!u)return h;try{const l=new Date(u*1e3);return a.formatDate(l,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}catch{return h}},c={formatUnixTimeStamp:s,formatIsoDate:u=>{const h=Date.parse(u)/1e3;return s(h)},t:(u,h,l)=>a.formatMessage({id:u},h,l),te:u=>!!a.messages[u],tm:u=>a.messages[u]||[],...a,source:r};return typeof e=="boolean"&&e===!0||typeof e!="boolean"&&e.isGlobal,c},fe=(t=null)=>y.defineComponent({name:"I18nT",props:{i18n:{type:Object,default:null},keypath:{type:String,required:!0},tag:{type:String,default:"span"}},setup(r,{slots:e}){const n=i=>{if(!i)return[];const o=/(\{[^}]+\})/g;return i.split(o).filter(Boolean)};return()=>{const i=Object.keys(e).filter(s=>s!=="_"),o=(t||r.i18n).messages[r.keypath].toString();let a=n(o);return a=a.filter(s=>s!==""),a.forEach((s,c)=>{if(!s.startsWith("{")&&!s.endsWith("}"))return;const u=s.replace(/[\{\}]/g,"");u==="0"&&e.default?a[c]=e.default():i.includes(u)&&e[u]&&(a[c]=e[u]())}),y.h(r.tag,r,a)}}}),me={install(t,r){const{i18n:e}=r;t.component("I18nT",fe(e))}},pe={githubStar:{title:"Star",ariaLabel:"Star buttons/github-buttons on GitHub",tooltipLabel:"Star this repository on Github"}};function ge(){return{i18n:le("en-us",pe),i18nT:me}}const be={useI18n:ge},Ee={key:0,class:"kong-ui-public-misc-widgets-github-star","data-testid":"github-star","data-tracking-id":"github-star"},de=["aria-label","href"],ye=y.defineComponent({__name:"GithubStar",props:{url:{type:String,required:!0},tooltipText:{type:String,required:!1,default:""}},setup(t){const r=t,{i18n:e}=be.useI18n(),n=y.computed(()=>r.tooltipText||e.t("githubStar.tooltipLabel")),i=y.ref(!1);return y.onMounted(async()=>{const o=document.createElement("script");o.addEventListener("load",()=>{i.value=!0}),o.setAttribute("src","https://buttons.github.io/buttons.js"),document.head.appendChild(o)}),(o,a)=>{const s=y.resolveComponent("KTooltip");return t.url&&i.value?(y.openBlock(),y.createElementBlock("div",Ee,[y.createVNode(s,{label:y.unref(n)},{default:y.withCtx(()=>[y.createElementVNode("span",null,[y.createElementVNode("a",{"aria-label":y.unref(e).t("githubStar.ariaLabel"),class:"github-button","data-color-scheme":"no-preference: light; light: light; dark: light;","data-show-count":"true",href:t.url,target:"_blank"},y.toDisplayString(y.unref(e).t("githubStar.title")),9,de)])]),_:1},8,["label"])])):y.createCommentVNode("",!0)}}}),_e="",ve=((t,r)=>{const e=t.__vccOpts||t;for(const[n,i]of r)e[n]=i;return e})(ye,[["__scopeId","data-v-4d357ff1"]]);C.GithubStar=ve,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
22
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function he(t,r){var e=kr(r),n=m(m({},Fr),t),i=n.locale,o=n.defaultLocale,a=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&a?a(new Rt('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&a&&a(new Rt('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(a&&a(new Dr('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),se(n),m(m({},n),{formatters:e,formatNumber:ie.bind(null,n,e.getNumberFormat),formatNumberToParts:oe.bind(null,n,e.getNumberFormat),formatRelativeTime:ee.bind(null,n,e.getRelativeTimeFormat),formatDate:Vr.bind(null,n,e.getDateTimeFormat),formatDateToParts:Kr.bind(null,n,e.getDateTimeFormat),formatTime:xr.bind(null,n,e.getDateTimeFormat),formatDateTimeRange:Xr.bind(null,n,e.getDateTimeFormat),formatTimeToParts:Zr.bind(null,n,e.getDateTimeFormat),formatPlural:$r.bind(null,n,e.getPluralRules),formatMessage:Dt.bind(null,n,e),$t:Dt.bind(null,n,e),formatList:Qr.bind(null,n,e.getListFormat),formatListToParts:Ut.bind(null,n,e.getListFormat),formatDisplayName:Wr.bind(null,n,e.getDisplayNames)})}var ue=k;k.flatten=k,k.unflatten=Vt;function kt(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function jt(t){return t}function k(t,r){r=r||{};const e=r.delimiter||".",n=r.maxDepth,i=r.transformKey||jt,o={};function a(s,c,u){u=u||1,Object.keys(s).forEach(function(h){const l=s[h],f=r.safe&&Array.isArray(l),g=Object.prototype.toString.call(l),v=kt(l),E=g==="[object Object]"||g==="[object Array]",T=c?c+e+i(h):i(h);if(!f&&!v&&E&&Object.keys(l).length&&(!r.maxDepth||u<n))return a(l,T,u+1);o[T]=l})}return a(t),o}function Vt(t,r){r=r||{};const e=r.delimiter||".",n=r.overwrite||!1,i=r.transformKey||jt,o={};if(kt(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(u){const h=Number(u);return isNaN(h)||u.indexOf(".")!==-1||r.object?u:h}function s(u,h,l){return Object.keys(l).reduce(function(f,g){return f[u+e+g]=l[g],f},h)}function c(u){const h=Object.prototype.toString.call(u),l=h==="[object Array]",f=h==="[object Object]";if(u){if(l)return!u.length;if(f)return!Object.keys(u).length}else return!0}return t=Object.keys(t).reduce(function(u,h){const l=Object.prototype.toString.call(t[h]);return!(l==="[object Object]"||l==="[object Array]")||c(t[h])?(u[h]=t[h],u):s(h,u,k(t[h],r))},{}),Object.keys(t).forEach(function(u){const h=u.split(e).map(i);let l=a(h.shift()),f=a(h[0]),g=o;for(;f!==void 0;){if(l==="__proto__")return;const v=Object.prototype.toString.call(g[l]),E=v==="[object Object]"||v==="[object Array]";if(!n&&!E&&typeof g[l]<"u")return;(n&&!E||!n&&g[l]==null)&&(g[l]=typeof f=="number"&&!r.object?[]:{}),g=g[l],h.length>0&&(l=a(h.shift()),f=a(h[0]))}g[l]=Vt(t[u],r)}),o}const ce=Ot(),le=(t,r,e=!1)=>{const n=he({...typeof e=="boolean"?null:e,locale:t,messages:ue.flatten(r,{safe:!0})},ce),{$t:i,...o}=n,a=o,s=u=>{const h="Invalid Date";if(!u)return h;try{const l=new Date(u*1e3);return a.formatDate(l,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}catch{return h}},c={formatUnixTimeStamp:s,formatIsoDate:u=>{const h=Date.parse(u)/1e3;return s(h)},t:(u,h,l)=>a.formatMessage({id:u},h,l),te:u=>!!a.messages[u],tm:u=>a.messages[u]||[],...a,source:r};return typeof e=="boolean"&&e===!0||typeof e!="boolean"&&e.isGlobal,c},fe=(t=null)=>y.defineComponent({name:"I18nT",props:{i18n:{type:Object,default:null},keypath:{type:String,required:!0},tag:{type:String,default:"span"}},setup(r,{slots:e}){const n=i=>{if(!i)return[];const o=/(\{[^}]+\})/g;return i.split(o).filter(Boolean)};return()=>{const i=Object.keys(e).filter(s=>s!=="_"),o=(t||r.i18n).messages[r.keypath].toString();let a=n(o);return a=a.filter(s=>s!==""),a.forEach((s,c)=>{if(!s.startsWith("{")&&!s.endsWith("}"))return;const u=s.replace(/[\{\}]/g,"");u==="0"&&e.default?a[c]=e.default():i.includes(u)&&e[u]&&(a[c]=e[u]())}),y.h(r.tag,r,a)}}}),me={install(t,r){const{i18n:e}=r;t.component("I18nT",fe(e))}},pe={githubStar:{title:"Star",ariaLabel:"Star buttons/github-buttons on GitHub",tooltipLabel:"Star this repository on Github"}};function ge(){return{i18n:le("en-us",pe),i18nT:me}}const be={useI18n:ge},Ee={key:0,class:"kong-ui-public-misc-widgets-github-star","data-testid":"github-star","data-tracking-id":"github-star"},de=["aria-label","href"],ye=y.defineComponent({__name:"GithubStar",props:{url:{type:String,required:!0},tooltipText:{type:String,required:!1,default:""}},setup(t){const r=t,{i18n:e}=be.useI18n(),n=y.computed(()=>r.tooltipText||e.t("githubStar.tooltipLabel")),i=y.ref(!1);return y.onMounted(async()=>{const o=document.createElement("script");o.addEventListener("load",()=>{i.value=!0}),o.setAttribute("src","https://buttons.github.io/buttons.js"),document.head.appendChild(o)}),(o,a)=>{const s=y.resolveComponent("KTooltip");return t.url&&i.value?(y.openBlock(),y.createElementBlock("div",Ee,[y.createVNode(s,{label:n.value},{default:y.withCtx(()=>[y.createElementVNode("span",null,[y.createElementVNode("a",{"aria-label":y.unref(e).t("githubStar.ariaLabel"),class:"github-button","data-color-scheme":"no-preference: light; light: light; dark: light;","data-show-count":"true",href:t.url,target:"_blank"},y.toDisplayString(y.unref(e).t("githubStar.title")),9,de)])]),_:1},8,["label"])])):y.createCommentVNode("",!0)}}}),_e="",ve=((t,r)=>{const e=t.__vccOpts||t;for(const[n,i]of r)e[n]=i;return e})(ye,[["__scopeId","data-v-4d357ff1"]]);C.GithubStar=ve,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
@@ -20,6 +20,6 @@ declare const _default: import("vue").DefineComponent<{
20
20
  };
21
21
  }>>, {
22
22
  tooltipText: string;
23
- }>;
23
+ }, {}>;
24
24
  export default _default;
25
25
  //# sourceMappingURL=GithubStar.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GithubStar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/github-star/GithubStar.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsIA,wBAAkD"}
1
+ {"version":3,"file":"GithubStar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/github-star/GithubStar.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuIA,wBAAkD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/misc-widgets",
3
- "version": "0.4.17",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "main": "./dist/misc-widgets.umd.js",
6
6
  "module": "./dist/misc-widgets.es.js",
@@ -22,12 +22,12 @@
22
22
  "peerDependencies": {
23
23
  "@kong-ui-public/i18n": "^0.4.2",
24
24
  "@kong/kongponents": "^8.83.5",
25
- "vue": "^3.2.47"
25
+ "vue": "^3.3.4"
26
26
  },
27
27
  "devDependencies": {
28
- "@kong-ui-public/i18n": "^0.7.0",
28
+ "@kong-ui-public/i18n": "^0.8.0",
29
29
  "@kong/kongponents": "^8.83.5",
30
- "vue": "^3.2.47"
30
+ "vue": "^3.3.4"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",