@webority/ui-elements 0.18.0 → 0.19.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.
@@ -2541,7 +2541,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2541
2541
  options: ue(e)
2542
2542
  }), this._countryCache.options;
2543
2543
  }
2544
- }, I = [
2544
+ }, fe = [
2545
2545
  "January",
2546
2546
  "February",
2547
2547
  "March",
@@ -2554,7 +2554,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2554
2554
  "October",
2555
2555
  "November",
2556
2556
  "December"
2557
- ], L = [
2557
+ ], I = [
2558
2558
  "Su",
2559
2559
  "Mo",
2560
2560
  "Tu",
@@ -2562,24 +2562,24 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2562
2562
  "Th",
2563
2563
  "Fr",
2564
2564
  "Sa"
2565
- ], R = (e) => String(e).padStart(2, "0"), z = (e, t, n) => `${e}-${R(t + 1)}-${R(n)}`, B = (e) => {
2565
+ ], pe = (e) => String(e).padStart(2, "0"), L = (e, t, n) => `${e}-${pe(t + 1)}-${pe(n)}`, R = (e) => {
2566
2566
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
2567
2567
  return t ? {
2568
2568
  y: +t[1],
2569
2569
  m: t[2] - 1,
2570
2570
  d: +t[3]
2571
2571
  } : null;
2572
- }, V = (e) => {
2573
- let t = B(e);
2574
- return t ? `${R(t.d)} ${I[t.m].slice(0, 3)} ${t.y}` : "";
2575
- }, H = (e, t) => new Date(e, t + 1, 0).getDate(), U = (e, t) => {
2572
+ }, z = (e) => {
2573
+ let t = R(e);
2574
+ return t ? `${pe(t.d)} ${fe[t.m].slice(0, 3)} ${t.y}` : "";
2575
+ }, B = (e, t) => new Date(e, t + 1, 0).getDate(), V = (e, t) => {
2576
2576
  for (; t < 0;) t += 12, --e;
2577
2577
  for (; t > 11;) t -= 12, e += 1;
2578
2578
  return {
2579
2579
  y: e,
2580
2580
  m: t
2581
2581
  };
2582
- }, fe = class extends e {
2582
+ }, me = class extends e {
2583
2583
  static formAssociated = !0;
2584
2584
  static get observedAttributes() {
2585
2585
  return [
@@ -2639,13 +2639,13 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2639
2639
  }
2640
2640
  render() {
2641
2641
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
2642
- let e = this.getAttribute("placeholder") || "Enter Date", t = B(this._value);
2642
+ let e = this.getAttribute("placeholder") || "Enter Date", t = R(this._value);
2643
2643
  t && (this._viewY = t.y, this._viewM = t.m);
2644
2644
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
2645
2645
  this.innerHTML = `
2646
2646
  <div class="datepicker">
2647
2647
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${_(i)}"` : ""}${a ? ` aria-describedby="${_(a)}"` : ""}>
2648
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? V(this._value) : _(e)}</span>
2648
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? z(this._value) : _(e)}</span>
2649
2649
  ${m("calendar-dots")}
2650
2650
  </button>
2651
2651
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
@@ -2657,11 +2657,11 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2657
2657
  _syncTrigger() {
2658
2658
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
2659
2659
  if (!t) return;
2660
- let n = B(this._value);
2661
- t.textContent = n ? V(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
2660
+ let n = R(this._value);
2661
+ t.textContent = n ? z(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
2662
2662
  }
2663
2663
  _limits() {
2664
- let e = B(this.getAttribute("min")), t = B(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
2664
+ let e = R(this.getAttribute("min")), t = R(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
2665
2665
  return {
2666
2666
  dayDisabled: (e, t, i) => {
2667
2667
  let a = new Date(e, t, i).getTime();
@@ -2669,7 +2669,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2669
2669
  },
2670
2670
  monthDisabled: (e, t) => {
2671
2671
  let i = new Date(e, t, 1).getTime();
2672
- return new Date(e, t, H(e, t)).getTime() < n || i > r;
2672
+ return new Date(e, t, B(e, t)).getTime() < n || i > r;
2673
2673
  },
2674
2674
  yearDisabled: (e) => {
2675
2675
  let t = new Date(e, 0, 1).getTime();
@@ -2682,28 +2682,28 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2682
2682
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
2683
2683
  }
2684
2684
  _daysHtml() {
2685
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = H(this._viewY, this._viewM), r = B(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
2685
+ let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = B(this._viewY, this._viewM), r = R(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
2686
2686
  y: this._viewY,
2687
2687
  m: this._viewM,
2688
2688
  d: 1
2689
2689
  }, s = (e, t, n, s) => {
2690
- let c = z(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
2690
+ let c = L(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
2691
2691
  return `<button type="button" class="${[
2692
2692
  "datepicker-day",
2693
2693
  s ? "is-outside" : "",
2694
2694
  u ? "is-today" : "",
2695
2695
  l ? "is-selected" : ""
2696
2696
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
2697
- }, c = "", l = U(this._viewY, this._viewM - 1), u = H(l.y, l.m);
2697
+ }, c = "", l = V(this._viewY, this._viewM - 1), u = B(l.y, l.m);
2698
2698
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
2699
2699
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
2700
- let d = U(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
2700
+ let d = V(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
2701
2701
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
2702
- let p = a(i.getFullYear(), i.getMonth(), i.getDate()), h = L.map((t, n) => L[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
2702
+ let p = a(i.getFullYear(), i.getMonth(), i.getDate()), h = I.map((t, n) => I[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
2703
2703
  return `
2704
2704
  <div class="datepicker-head">
2705
2705
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${m("chevron-left")}</button>
2706
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${I[this._viewM]} ${this._viewY}</button>
2706
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${fe[this._viewM]} ${this._viewY}</button>
2707
2707
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${m("chevron-right")}</button>
2708
2708
  </div>
2709
2709
  <div class="datepicker-weekdays">${h}</div>
@@ -2714,14 +2714,14 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2714
2714
  </div>`;
2715
2715
  }
2716
2716
  _monthsHtml() {
2717
- let e = B(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
2717
+ let e = R(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
2718
2718
  for (let i = 0; i < 12; i++) {
2719
2719
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
2720
2720
  "datepicker-cell",
2721
2721
  o ? "is-today" : "",
2722
2722
  a ? "is-selected" : ""
2723
2723
  ].filter(Boolean).join(" ");
2724
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${I[i].slice(0, 3)}</button>`;
2724
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${fe[i].slice(0, 3)}</button>`;
2725
2725
  }
2726
2726
  return `
2727
2727
  <div class="datepicker-head">
@@ -2732,7 +2732,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2732
2732
  <div class="datepicker-cells">${r}</div>`;
2733
2733
  }
2734
2734
  _yearsHtml() {
2735
- let e = B(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
2735
+ let e = R(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
2736
2736
  for (let a = 0; a < 12; a++) {
2737
2737
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
2738
2738
  "datepicker-cell",
@@ -2757,21 +2757,21 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2757
2757
  c(e, t, { clampHeight: !0 });
2758
2758
  }
2759
2759
  _setFocus(e, t, n, r) {
2760
- let { y: i, m: a } = U(e, t);
2760
+ let { y: i, m: a } = V(e, t);
2761
2761
  this._focus = {
2762
2762
  y: i,
2763
2763
  m: a,
2764
2764
  d: n
2765
2765
  };
2766
2766
  let o = i !== this._viewY || a !== this._viewM;
2767
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${z(i, a, n)}"]`)?.focus();
2767
+ this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${L(i, a, n)}"]`)?.focus();
2768
2768
  }
2769
2769
  _onKey(e) {
2770
2770
  if (this._mode !== "days") {
2771
2771
  e.key === "Escape" && this._close();
2772
2772
  return;
2773
2773
  }
2774
- let t = this._focus || B(this._value) || {
2774
+ let t = this._focus || R(this._value) || {
2775
2775
  y: this._viewY,
2776
2776
  m: this._viewM,
2777
2777
  d: 1
@@ -2789,17 +2789,17 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2789
2789
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
2790
2790
  case "PageUp": {
2791
2791
  e.preventDefault();
2792
- let n = U(t.y, t.m - (e.shiftKey ? 12 : 1));
2793
- return this._setFocus(n.y, n.m, Math.min(t.d, H(n.y, n.m)), "slide-prev");
2792
+ let n = V(t.y, t.m - (e.shiftKey ? 12 : 1));
2793
+ return this._setFocus(n.y, n.m, Math.min(t.d, B(n.y, n.m)), "slide-prev");
2794
2794
  }
2795
2795
  case "PageDown": {
2796
2796
  e.preventDefault();
2797
- let n = U(t.y, t.m + (e.shiftKey ? 12 : 1));
2798
- return this._setFocus(n.y, n.m, Math.min(t.d, H(n.y, n.m)), "slide-next");
2797
+ let n = V(t.y, t.m + (e.shiftKey ? 12 : 1));
2798
+ return this._setFocus(n.y, n.m, Math.min(t.d, B(n.y, n.m)), "slide-next");
2799
2799
  }
2800
2800
  case "Enter":
2801
2801
  case " ":
2802
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = z(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
2802
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = L(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
2803
2803
  return;
2804
2804
  case "Escape": return this._close();
2805
2805
  default:
@@ -2811,7 +2811,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2811
2811
  if (!e || !t) return;
2812
2812
  let r = () => !t.hidden;
2813
2813
  this._open = () => {
2814
- let r = /* @__PURE__ */ new Date(), i = B(this._value);
2814
+ let r = /* @__PURE__ */ new Date(), i = R(this._value);
2815
2815
  (i || !this._viewNavigated) && (this._viewY = r.getFullYear(), this._viewM = r.getMonth()), this._mode = "days";
2816
2816
  let a = r.getFullYear() === this._viewY && r.getMonth() === this._viewM, o = i && i.y === this._viewY && i.m === this._viewM;
2817
2817
  this._focus = o ? i : {
@@ -2826,7 +2826,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2826
2826
  let t = e.target.closest("[data-nav]");
2827
2827
  if (t) {
2828
2828
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
2829
- let e = U(this._viewY, this._viewM + Number(t.dataset.nav));
2829
+ let e = V(this._viewY, this._viewM + Number(t.dataset.nav));
2830
2830
  this._viewY = e.y, this._viewM = e.m, this._focus = {
2831
2831
  y: e.y,
2832
2832
  m: e.m,
@@ -2866,7 +2866,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2866
2866
  if (e.target.closest("[data-today]")) {
2867
2867
  let e = /* @__PURE__ */ new Date();
2868
2868
  if (this._limits().dayDisabled(e.getFullYear(), e.getMonth(), e.getDate())) return;
2869
- this.value = z(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
2869
+ this.value = L(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
2870
2870
  return;
2871
2871
  }
2872
2872
  if (e.target.closest("[data-clear]")) {
@@ -2894,7 +2894,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2894
2894
  disconnectedCallback() {
2895
2895
  this._teardown();
2896
2896
  }
2897
- }, pe = class extends e {
2897
+ }, he = class extends e {
2898
2898
  static formAssociated = !0;
2899
2899
  static get observedAttributes() {
2900
2900
  return [
@@ -2962,13 +2962,13 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2962
2962
  text: e,
2963
2963
  empty: !0
2964
2964
  } : {
2965
- text: `${V(this._start) || "Start"} – ${V(this._end) || "End"}`,
2965
+ text: `${z(this._start) || "Start"} – ${z(this._end) || "End"}`,
2966
2966
  empty: !1
2967
2967
  };
2968
2968
  }
2969
2969
  render() {
2970
2970
  this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
2971
- let e = B(this._start);
2971
+ let e = R(this._start);
2972
2972
  e && (this._viewY = e.y, this._viewM = e.m);
2973
2973
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
2974
2974
  this.innerHTML = `
@@ -3002,24 +3002,24 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3002
3002
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
3003
3003
  }
3004
3004
  _limits() {
3005
- let e = B(this.getAttribute("min")), t = B(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
3005
+ let e = R(this.getAttribute("min")), t = R(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
3006
3006
  return (e, t, i) => {
3007
3007
  let a = new Date(e, t, i).getTime();
3008
3008
  return a < n || a > r;
3009
3009
  };
3010
3010
  }
3011
3011
  _monthHtml(e, t) {
3012
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = H(e, t), a = this._limits(), o = L.map((e, t) => L[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
3013
- let i = z(e, t, n), o = a(e, t, n);
3012
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = B(e, t), a = this._limits(), o = I.map((e, t) => I[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
3013
+ let i = L(e, t, n), o = a(e, t, n);
3014
3014
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
3015
- }, c = "", l = U(e, t - 1), u = H(l.y, l.m);
3015
+ }, c = "", l = V(e, t - 1), u = B(l.y, l.m);
3016
3016
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
3017
3017
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
3018
- let d = U(e, t + 1), f = (7 - (r + i) % 7) % 7;
3018
+ let d = V(e, t + 1), f = (7 - (r + i) % 7) % 7;
3019
3019
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
3020
3020
  return `
3021
3021
  <div class="daterange-cal">
3022
- <div class="datepicker-month-label">${I[t]} ${e}</div>
3022
+ <div class="datepicker-month-label">${fe[t]} ${e}</div>
3023
3023
  <div class="datepicker-weekdays">${o}</div>
3024
3024
  <div class="datepicker-grid" role="grid">${c}</div>
3025
3025
  </div>`;
@@ -3027,7 +3027,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3027
3027
  _renderView() {
3028
3028
  let e = this.querySelector(".daterange-pop");
3029
3029
  if (!e) return;
3030
- let t = U(this._viewY, this._viewM + 1);
3030
+ let t = V(this._viewY, this._viewM + 1);
3031
3031
  e.innerHTML = `
3032
3032
  <div class="daterange-head">
3033
3033
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${m("chevron-left")}</button>
@@ -3053,7 +3053,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3053
3053
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
3054
3054
  }
3055
3055
  let i = e.querySelector("[data-range-hint]");
3056
- i && (i.textContent = this._start ? this._end ? `${V(this._start)} – ${V(this._end)}` : "Pick an end date" : "Pick a start date");
3056
+ i && (i.textContent = this._start ? this._end ? `${z(this._start)} – ${z(this._end)}` : "Pick an end date" : "Pick a start date");
3057
3057
  }
3058
3058
  _position(e, t) {
3059
3059
  c(e, t, { clampHeight: !0 });
@@ -3075,7 +3075,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3075
3075
  if (!e || !t) return;
3076
3076
  let r = () => !t.hidden;
3077
3077
  this._open = () => {
3078
- let r = B(this._start);
3078
+ let r = R(this._start);
3079
3079
  if (r) this._viewY = r.y, this._viewM = r.m;
3080
3080
  else {
3081
3081
  let e = /* @__PURE__ */ new Date();
@@ -3088,7 +3088,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3088
3088
  this._popClick = !0;
3089
3089
  let t = e.target.closest("[data-nav]");
3090
3090
  if (t) {
3091
- let e = U(this._viewY, this._viewM + Number(t.dataset.nav));
3091
+ let e = V(this._viewY, this._viewM + Number(t.dataset.nav));
3092
3092
  this._viewY = e.y, this._viewM = e.m, this._renderView();
3093
3093
  return;
3094
3094
  }
@@ -3118,7 +3118,7 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3118
3118
  disconnectedCallback() {
3119
3119
  this._teardown();
3120
3120
  }
3121
- }, me = class extends e {
3121
+ }, ge = class extends e {
3122
3122
  static get observedAttributes() {
3123
3123
  return [
3124
3124
  "static",
@@ -3139,10 +3139,10 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3139
3139
  e === "static" && this.isConnected && this._wire();
3140
3140
  }
3141
3141
  _maxScale() {
3142
- return he(this.getAttribute("max-scale"), 1.6);
3142
+ return _e(this.getAttribute("max-scale"), 1.6);
3143
3143
  }
3144
3144
  _radius() {
3145
- return he(this.getAttribute("radius"), 100);
3145
+ return _e(this.getAttribute("radius"), 100);
3146
3146
  }
3147
3147
  _magnifyEnabled() {
3148
3148
  return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
@@ -3167,26 +3167,26 @@ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3167
3167
  _teardown() {
3168
3168
  this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
3169
3169
  }
3170
- }, he = (e, t) => {
3170
+ }, _e = (e, t) => {
3171
3171
  let n = Number.parseFloat(e);
3172
3172
  return Number.isFinite(n) ? n : t;
3173
- }, ge = {
3173
+ }, ve = {
3174
3174
  enter: "Enter",
3175
3175
  comma: ",",
3176
3176
  space: " ",
3177
3177
  tab: "Tab"
3178
- }, _e = {
3178
+ }, ye = {
3179
3179
  enter: "\n",
3180
3180
  comma: ",",
3181
3181
  space: " ",
3182
3182
  tab: " "
3183
- }, ve = (e) => ge[e], ye = (e) => _e[e];
3184
- function be(e, t) {
3183
+ }, be = (e) => ve[e], xe = (e) => ye[e];
3184
+ function Se(e, t) {
3185
3185
  let n = [String(e ?? "")];
3186
3186
  for (let e of t) n = n.flatMap((t) => t.split(e));
3187
3187
  return n.map((e) => e.trim()).filter(Boolean);
3188
3188
  }
3189
- var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extends e {
3189
+ var Ce = (e, t) => t.some((t) => String(e ?? "").includes(t)), we = class extends e {
3190
3190
  static formAssociated = !0;
3191
3191
  _accessibleName() {
3192
3192
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
@@ -3286,7 +3286,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3286
3286
  [g]: !0,
3287
3287
  selected: e.hasAttribute("selected")
3288
3288
  };
3289
- for (let [n, r] of we) {
3289
+ for (let [n, r] of Ee) {
3290
3290
  let i = e.getAttribute(n);
3291
3291
  i && (t[r] = i);
3292
3292
  }
@@ -3317,23 +3317,23 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3317
3317
  <div class="search-select${a}">
3318
3318
  <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : ""}>
3319
3319
  ${r ? m(r, { className: "search-select-icon" }) : ""}
3320
- <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(o)}" aria-label="${W(this._accessibleName())}" aria-describedby="${W(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
3320
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${H(o)}" aria-label="${H(this._accessibleName())}" aria-describedby="${H(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
3321
3321
  ${m("chevron-down", { className: "search-select-caret" })}
3322
3322
  </div>
3323
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${W(o)}" aria-multiselectable="true" tabindex="-1" hidden>
3323
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${H(o)}" aria-multiselectable="true" tabindex="-1" hidden>
3324
3324
  <div class="search-select-options"></div>
3325
3325
  </div>
3326
3326
  </div>
3327
- <div class="field-error wui-ms-custom-error" id="${W(e)}" aria-live="polite" hidden></div>`;
3327
+ <div class="field-error wui-ms-custom-error" id="${H(e)}" aria-live="polite" hidden></div>`;
3328
3328
  } else this.innerHTML = `
3329
3329
  <div class="search-select${a}">
3330
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(o)}" aria-label="${W(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
3330
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${H(o)}" aria-label="${H(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
3331
3331
  ${r ? m(r, { className: "search-select-icon" }) : ""}
3332
3332
  <div class="ms-chips" data-chips></div>
3333
3333
  ${m("chevron-down", { className: "search-select-caret" })}
3334
3334
  </div>
3335
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${W(o)}" aria-multiselectable="true" tabindex="-1" hidden>
3336
- ${t ? `<div class="search-select-search">${m("search")}<input class="search-select-input" placeholder="${W(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${m("x")}</button></div>` : ""}
3335
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${H(o)}" aria-multiselectable="true" tabindex="-1" hidden>
3336
+ ${t ? `<div class="search-select-search">${m("search")}<input class="search-select-input" placeholder="${H(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${m("x")}</button></div>` : ""}
3337
3337
  <div class="search-select-options"></div>
3338
3338
  <div class="search-select-empty" hidden>No matches</div>
3339
3339
  </div>
@@ -3343,7 +3343,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3343
3343
  _renderControl() {
3344
3344
  let e = this.querySelector("[data-chips]");
3345
3345
  if (!e) return;
3346
- let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${W(e)}" aria-label="Remove ${W(je(this._labelFor(e)))}">${m("x")}</button></span>`).join("");
3346
+ let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${H(e)}" aria-label="Remove ${H(Ne(this._labelFor(e)))}">${m("x")}</button></span>`).join("");
3347
3347
  if (n) {
3348
3348
  for (let t of [...e.querySelectorAll(":scope > .chip")]) t.remove();
3349
3349
  n.insertAdjacentHTML("beforebegin", r), n.placeholder = this._values.length ? "" : t, this._collapseChips();
@@ -3374,11 +3374,11 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3374
3374
  i.textContent = `+${t.length - o}`;
3375
3375
  }
3376
3376
  _matches(e, t) {
3377
- return je(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
3377
+ return Ne(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
3378
3378
  }
3379
3379
  _optionNamed(e) {
3380
3380
  let t = e.trim().toLowerCase();
3381
- return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || je(e.label).trim().toLowerCase() === t);
3381
+ return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || Ne(e.label).trim().toLowerCase() === t);
3382
3382
  }
3383
3383
  _renderOptions(e) {
3384
3384
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
@@ -3387,9 +3387,9 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3387
3387
  i && (a = a.filter((e) => this._matches(e, i)));
3388
3388
  let o = this._listboxId || `${this.id || "wui-multiselect"}-listbox`, s = this._allowCustom && r && !this._optionNamed(r), c = a.map((e, t) => {
3389
3389
  let n = this._values.includes(String(e.value)), r = `${o}-opt-${t}`;
3390
- return Te(e) ? Oe(e, r, n) : `<button type="button" role="option" id="${W(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${x(e)}</span><span class="ms-check">${m("check")}</span></button>`;
3390
+ return De(e) ? Ae(e, r, n) : `<button type="button" role="option" id="${H(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${H(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${x(e)}</span><span class="ms-check">${m("check")}</span></button>`;
3391
3391
  });
3392
- s && c.push(`<button type="button" role="option" id="${W(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${W(r)}" data-custom="true" aria-selected="false">Add “${_(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
3392
+ s && c.push(`<button type="button" role="option" id="${H(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${H(r)}" data-custom="true" aria-selected="false">Add “${_(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
3393
3393
  }
3394
3394
  _combobox() {
3395
3395
  return this._allowCustom ? this.querySelector("[data-input]") : this.querySelector(".search-select-control");
@@ -3402,7 +3402,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3402
3402
  _customRefusal(e) {
3403
3403
  let t = this.getAttribute("custom-invalid-message") || "Enter a valid value.", n = this.getAttribute("custom-pattern");
3404
3404
  if (n) {
3405
- let r = Ae(n);
3405
+ let r = Me(n);
3406
3406
  if (r && !r.test(e)) return t;
3407
3407
  }
3408
3408
  let r = this._validateCustom;
@@ -3462,7 +3462,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3462
3462
  }, w = (e) => {
3463
3463
  this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(this._query()), S();
3464
3464
  }, T = (e, { quiet: t = !1 } = {}) => {
3465
- let n = this._values.length, r = xe(e, Ce) ? be(e, Ce) : [e], i = [], a = "";
3465
+ let n = this._values.length, r = Ce(e, Te) ? Se(e, Te) : [e], i = [], a = "";
3466
3466
  for (let e of r) {
3467
3467
  let t = this._commitTyped(e);
3468
3468
  t && (i.push(e.trim()), a ||= t);
@@ -3540,7 +3540,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3540
3540
  (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), D(e);
3541
3541
  }), o.addEventListener("paste", (e) => {
3542
3542
  let t = e.clipboardData?.getData("text/plain") ?? "";
3543
- xe(t, Ce) && (e.preventDefault(), T(`${o.value}${t}`));
3543
+ Ce(t, Te) && (e.preventDefault(), T(`${o.value}${t}`));
3544
3544
  }), o.addEventListener("blur", (e) => {
3545
3545
  e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && T(o.value, { quiet: !0 }), x());
3546
3546
  });
@@ -3565,35 +3565,35 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3565
3565
  disconnectedCallback() {
3566
3566
  this._teardown(), this._ro?.disconnect(), this._ro = null;
3567
3567
  }
3568
- }, Ce = [
3568
+ }, Te = [
3569
3569
  ",",
3570
3570
  ";",
3571
3571
  "\n",
3572
3572
  " "
3573
- ], we = [
3573
+ ], Ee = [
3574
3574
  ["description", "description"],
3575
3575
  ["avatar", "avatar"],
3576
3576
  ["initials", "initials"],
3577
3577
  ["disabled-hint", "disabledHint"]
3578
- ], Te = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), Ee = (e) => {
3578
+ ], De = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), Oe = (e) => {
3579
3579
  let t = String(e ?? "").trim();
3580
3580
  return /^(https?:)?\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t) ? t : "";
3581
- }, De = (e) => {
3582
- let t = Ee(e.avatar);
3583
- return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${_(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${W(t)}" alt="" />` : ""}</span>`;
3584
- }, Oe = (e, t, n) => {
3581
+ }, ke = (e) => {
3582
+ let t = Oe(e.avatar);
3583
+ return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${_(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${H(t)}" alt="" />` : ""}</span>`;
3584
+ }, Ae = (e, t, n) => {
3585
3585
  let r = !!e.disabled, i = e.description ? `<span class="wui-opt-desc">${_(e.description)}</span>` : "", a = e.disabledHint && r ? `<span class="wui-opt-hint">${_(e.disabledHint)}</span>` : "";
3586
- return `<button type="button" role="option" id="${W(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${x(e)}</span>${i}</span>${a}${De(e)}<span class="ms-check">${m("check")}</span></button>`;
3587
- }, ke = /* @__PURE__ */ new Map(), Ae = (e) => {
3588
- if (ke.has(e)) return ke.get(e);
3586
+ return `<button type="button" role="option" id="${H(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${H(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${x(e)}</span>${i}</span>${a}${ke(e)}<span class="ms-check">${m("check")}</span></button>`;
3587
+ }, je = /* @__PURE__ */ new Map(), Me = (e) => {
3588
+ if (je.has(e)) return je.get(e);
3589
3589
  let t = null;
3590
3590
  try {
3591
3591
  t = RegExp(`^(?:${e})$`, "u");
3592
3592
  } catch {
3593
3593
  console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`);
3594
3594
  }
3595
- return ke.set(e, t), t;
3596
- }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), je = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Me = /[^0-9]/g, Ne = /[^0-9a-zA-Z]/g, Pe = class extends e {
3595
+ return je.set(e, t), t;
3596
+ }, H = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ne = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Pe = /[^0-9]/g, Fe = /[^0-9a-zA-Z]/g, Ie = class extends e {
3597
3597
  static formAssociated = !0;
3598
3598
  static get observedAttributes() {
3599
3599
  return [
@@ -3624,7 +3624,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3624
3624
  this._value = this._clean(e), f(this, this._value), this._paint();
3625
3625
  }
3626
3626
  _clean(e) {
3627
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ne : Me, "").slice(0, this.length);
3627
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Fe : Pe, "").slice(0, this.length);
3628
3628
  }
3629
3629
  constructor() {
3630
3630
  super();
@@ -3715,7 +3715,7 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
3715
3715
  disconnectedCallback() {
3716
3716
  this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
3717
3717
  }
3718
- }, Fe = {
3718
+ }, Le = {
3719
3719
  AD: ["Europe/Andorra"],
3720
3720
  AE: ["Asia/Dubai"],
3721
3721
  AF: ["Asia/Kabul"],
@@ -4117,13 +4117,13 @@ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extend
4117
4117
  ZA: ["Africa/Johannesburg"],
4118
4118
  ZM: ["Africa/Lusaka"],
4119
4119
  ZW: ["Africa/Harare"]
4120
- }, Ie = new Set(M.map(([e]) => e)), Le = /* @__PURE__ */ new Map();
4121
- for (let [e, t] of Object.entries(Fe)) for (let n of t) Le.set(n, e);
4122
- function Re(e) {
4123
- let t = Le.get(e);
4124
- return t && Ie.has(t) ? t : null;
4120
+ }, Re = new Set(M.map(([e]) => e)), ze = /* @__PURE__ */ new Map();
4121
+ for (let [e, t] of Object.entries(Le)) for (let n of t) ze.set(n, e);
4122
+ function Be(e) {
4123
+ let t = ze.get(e);
4124
+ return t && Re.has(t) ? t : null;
4125
4125
  }
4126
- function ze(e) {
4126
+ function Ve(e) {
4127
4127
  if (!e) return null;
4128
4128
  let t;
4129
4129
  try {
@@ -4131,9 +4131,9 @@ function ze(e) {
4131
4131
  } catch {
4132
4132
  return null;
4133
4133
  }
4134
- return t && Ie.has(t) ? t : null;
4134
+ return t && Re.has(t) ? t : null;
4135
4135
  }
4136
- function Be() {
4136
+ function He() {
4137
4137
  let e;
4138
4138
  try {
4139
4139
  e = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -4141,77 +4141,77 @@ function Be() {
4141
4141
  e = void 0;
4142
4142
  }
4143
4143
  let t = typeof navigator > "u" ? void 0 : navigator.language;
4144
- return Re(e) || ze(t) || "IN";
4144
+ return Be(e) || Ve(t) || "IN";
4145
4145
  }
4146
4146
  //#endregion
4147
4147
  //#region src/WuiPhone.js
4148
- var Ve = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, G = null, He = null;
4149
- function Ue() {
4150
- return G ? Promise.resolve(G) : (He ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (G = {
4148
+ var Ue = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, U = null, We = null;
4149
+ function Ge() {
4150
+ return U ? Promise.resolve(U) : (We ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (U = {
4151
4151
  AsYouType: e.AsYouType,
4152
4152
  getExampleNumber: e.getExampleNumber,
4153
4153
  isValidPhoneNumber: e.isValidPhoneNumber,
4154
4154
  parsePhoneNumber: e.parsePhoneNumber,
4155
4155
  examples: t.default || t
4156
- }, G)).catch(() => null), He);
4156
+ }, U)).catch(() => null), We);
4157
4157
  }
4158
- function We(e, t) {
4158
+ function Ke(e, t) {
4159
4159
  let n = `+${N(e)}`;
4160
4160
  return t?.startsWith(n) ? t.slice(n.length).trimStart() : null;
4161
4161
  }
4162
- function K(e, t) {
4163
- if (!G || !t) return t;
4162
+ function W(e, t) {
4163
+ if (!U || !t) return t;
4164
4164
  try {
4165
- return We(e, new G.AsYouType(e).input(`+${N(e)}${t}`)) || t;
4165
+ return Ke(e, new U.AsYouType(e).input(`+${N(e)}${t}`)) || t;
4166
4166
  } catch {
4167
4167
  return t;
4168
4168
  }
4169
4169
  }
4170
- function Ge(e, t) {
4170
+ function qe(e, t) {
4171
4171
  if (t <= 0) return 0;
4172
4172
  let n = 0;
4173
4173
  for (let r = 0; r < e.length; r++) if (/[0-9]/.test(e[r]) && (n += 1, n === t)) return r + 1;
4174
4174
  return e.length;
4175
4175
  }
4176
- function q(e) {
4177
- if (!G) return null;
4176
+ function G(e) {
4177
+ if (!U) return null;
4178
4178
  try {
4179
- return We(e, G.getExampleNumber(e, G.examples)?.formatInternational()) || null;
4179
+ return Ke(e, U.getExampleNumber(e, U.examples)?.formatInternational()) || null;
4180
4180
  } catch {
4181
4181
  return null;
4182
4182
  }
4183
4183
  }
4184
- function Ke(e) {
4185
- if (!G || !e) return null;
4184
+ function Je(e) {
4185
+ if (!U || !e) return null;
4186
4186
  try {
4187
- if (!G.isValidPhoneNumber(e)) return !1;
4188
- let t = G.parsePhoneNumber(e)?.getType?.();
4187
+ if (!U.isValidPhoneNumber(e)) return !1;
4188
+ let t = U.parsePhoneNumber(e)?.getType?.();
4189
4189
  return t === void 0 || t === "MOBILE" || t === "FIXED_LINE_OR_MOBILE";
4190
4190
  } catch {
4191
4191
  return null;
4192
4192
  }
4193
4193
  }
4194
- function qe(e) {
4195
- if (!G) return null;
4194
+ function Ye(e) {
4195
+ if (!U) return null;
4196
4196
  try {
4197
- let t = G.getExampleNumber(e, G.examples);
4197
+ let t = U.getExampleNumber(e, U.examples);
4198
4198
  return t?.nationalNumber ? t.nationalNumber.length : null;
4199
4199
  } catch {
4200
4200
  return null;
4201
4201
  }
4202
4202
  }
4203
- function Je(e, t, n) {
4203
+ function Xe(e, t, n) {
4204
4204
  try {
4205
- let r = G.parsePhoneNumber(t, e), i = r?.nationalNumber;
4205
+ let r = U.parsePhoneNumber(t, e), i = r?.nationalNumber;
4206
4206
  return !i || r.country !== e || i.length > n || !t.endsWith(i) ? null : i;
4207
4207
  } catch {
4208
4208
  return null;
4209
4209
  }
4210
4210
  }
4211
- function Ye(e) {
4212
- if (!G || !e?.trim().startsWith("+")) return null;
4211
+ function Ze(e) {
4212
+ if (!U || !e?.trim().startsWith("+")) return null;
4213
4213
  try {
4214
- let t = new G.AsYouType();
4214
+ let t = new U.AsYouType();
4215
4215
  t.input(e.trim());
4216
4216
  let n = t.getCountry();
4217
4217
  return n ? {
@@ -4222,7 +4222,7 @@ function Ye(e) {
4222
4222
  return null;
4223
4223
  }
4224
4224
  }
4225
- var Xe = class extends e {
4225
+ var Qe = class extends e {
4226
4226
  static formAssociated = !0;
4227
4227
  static get observedAttributes() {
4228
4228
  return [
@@ -4242,7 +4242,7 @@ var Xe = class extends e {
4242
4242
  } catch {
4243
4243
  this._internals = null;
4244
4244
  }
4245
- this._defaultCountry = Be(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
4245
+ this._defaultCountry = He(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
4246
4246
  }
4247
4247
  connectedCallback() {
4248
4248
  if (!this._rendered) {
@@ -4272,7 +4272,7 @@ var Xe = class extends e {
4272
4272
  return this._national ? `+${N(this._country)}${this._national}` : "";
4273
4273
  }
4274
4274
  set value(e) {
4275
- let t = String(e ?? "").trim(), n = Ye(t);
4275
+ let t = String(e ?? "").trim(), n = Ze(t);
4276
4276
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
4277
4277
  else if (t.startsWith("+")) {
4278
4278
  let e = t.replace(/[^0-9]/g, ""), n = String(N(this._country));
@@ -4291,25 +4291,25 @@ var Xe = class extends e {
4291
4291
  }
4292
4292
  render() {
4293
4293
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
4294
- let e = this.getAttribute("placeholder") || q(this._country) || "Enter phone number";
4294
+ let e = this.getAttribute("placeholder") || G(this._country) || "Enter phone number";
4295
4295
  this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
4296
4296
  let t = `${this.id}-listbox`;
4297
4297
  this._listboxId = t;
4298
- let n = M.map(([e, n, r], i) => `<button type="button" role="option" id="${J(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${Ve(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
4298
+ let n = M.map(([e, n, r], i) => `<button type="button" role="option" id="${K(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${Ue(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
4299
4299
  this.innerHTML = `
4300
4300
  <div class="phone-input-wrap">
4301
4301
  <div class="phone-country-adornment">
4302
- <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${J(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
4303
- <span class="${Ve(this._country)}" data-flag aria-hidden="true"></span>
4302
+ <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${K(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
4303
+ <span class="${Ue(this._country)}" data-flag aria-hidden="true"></span>
4304
4304
  ${m("chevron-down", { className: "phone-chevron" })}
4305
4305
  <span class="phone-dial" data-dial>+${N(this._country)}</span>
4306
4306
  </button>
4307
- <div class="country-dropdown-menu" role="listbox" id="${J(t)}" tabindex="-1" hidden>
4308
- <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${m("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${J(t)}" aria-autocomplete="list" /></div>
4307
+ <div class="country-dropdown-menu" role="listbox" id="${K(t)}" tabindex="-1" hidden>
4308
+ <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${m("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${K(t)}" aria-autocomplete="list" /></div>
4309
4309
  <div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
4310
4310
  </div>
4311
4311
  </div>
4312
- <input type="tel" class="input" placeholder="${J(e)}" value="${J(K(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${J(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${J(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
4312
+ <input type="tel" class="input" placeholder="${K(e)}" value="${K(W(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${K(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${K(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
4313
4313
  </div>
4314
4314
  <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, f(this, this.value), this._wire();
4315
4315
  }
@@ -4340,12 +4340,12 @@ var Xe = class extends e {
4340
4340
  }
4341
4341
  a && (a.hidden = n > 0);
4342
4342
  }, v = (e) => {
4343
- this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = Ve(e)), d && (d.textContent = `+${N(e)}`);
4343
+ this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = Ue(e)), d && (d.textContent = `+${N(e)}`);
4344
4344
  for (let t of this._itemEls()) {
4345
4345
  let n = t.dataset.iso === e;
4346
4346
  t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
4347
4347
  }
4348
- !this.getAttribute("placeholder") && o && (o.placeholder = q(e) || "Enter phone number"), o && this._national && (o.value = K(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
4348
+ !this.getAttribute("placeholder") && o && (o.placeholder = G(e) || "Enter phone number"), o && this._national && (o.value = W(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
4349
4349
  }, y = (t) => {
4350
4350
  let n = this._visibleItems();
4351
4351
  if (t.key === "ArrowDown") {
@@ -4379,7 +4379,7 @@ var Xe = class extends e {
4379
4379
  let b = this.querySelector("[data-phone-error]"), x = (e) => {
4380
4380
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), b) {
4381
4381
  if (e) {
4382
- let e = q(this._country);
4382
+ let e = G(this._country);
4383
4383
  b.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
4384
4384
  }
4385
4385
  b.hidden = !e;
@@ -4387,24 +4387,24 @@ var Xe = class extends e {
4387
4387
  };
4388
4388
  o.addEventListener("input", (e) => {
4389
4389
  e.stopPropagation();
4390
- let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = qe(this._country);
4390
+ let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Ye(this._country);
4391
4391
  if (i && r.length > i) {
4392
- let e = Je(this._country, r, i);
4392
+ let e = Xe(this._country, r, i);
4393
4393
  e ? (n = Math.max(0, n - (r.length - e.length)), r = e) : r = r.slice(0, i);
4394
4394
  }
4395
4395
  this._national = r;
4396
- let a = K(this._country, this._national);
4396
+ let a = W(this._country, this._national);
4397
4397
  if (o.value !== a) {
4398
4398
  o.value = a;
4399
- let e = Ge(a, Math.min(n, r.length));
4399
+ let e = qe(a, Math.min(n, r.length));
4400
4400
  o.setSelectionRange(e, e);
4401
4401
  }
4402
- this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Ke(this.value) === !0) && x(!1);
4402
+ this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Je(this.value) === !0) && x(!1);
4403
4403
  }), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
4404
- x(this._national.length > 0 && Ke(this.value) === !1), this.value !== this._committedValue && this._emitChange();
4404
+ x(this._national.length > 0 && Je(this.value) === !1), this.value !== this._committedValue && this._emitChange();
4405
4405
  }), o.addEventListener("paste", (e) => {
4406
- let t = Ye(e.clipboardData?.getData("text"));
4407
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = K(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
4406
+ let t = Ze(e.clipboardData?.getData("text"));
4407
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = W(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
4408
4408
  }), this._bindGlobal = () => {
4409
4409
  this._teardownGlobals?.(), this._onDocClick = (e) => {
4410
4410
  f() && !this.contains(e.target) && g();
@@ -4413,9 +4413,9 @@ var Xe = class extends e {
4413
4413
  });
4414
4414
  }, this._teardownGlobals = () => {
4415
4415
  this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), u(this);
4416
- }, this._bindGlobal(), Ue().then((e) => {
4417
- if (!(!e || !o.isConnected) && (this._national && (o.value = K(this._country, this._national)), !this.getAttribute("placeholder"))) {
4418
- let e = q(this._country);
4416
+ }, this._bindGlobal(), Ge().then((e) => {
4417
+ if (!(!e || !o.isConnected) && (this._national && (o.value = W(this._country, this._national)), !this.getAttribute("placeholder"))) {
4418
+ let e = G(this._country);
4419
4419
  e && (o.placeholder = e);
4420
4420
  }
4421
4421
  }), this._syncMirror();
@@ -4426,7 +4426,7 @@ var Xe = class extends e {
4426
4426
  disconnectedCallback() {
4427
4427
  this._teardown();
4428
4428
  }
4429
- }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ze = class extends e {
4429
+ }, K = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), $e = class extends e {
4430
4430
  static formAssociated = !0;
4431
4431
  static get observedAttributes() {
4432
4432
  return [
@@ -4466,19 +4466,19 @@ var Xe = class extends e {
4466
4466
  return this._value;
4467
4467
  }
4468
4468
  set value(e) {
4469
- this._value = this._snapToStep(this._clamp(Y(e, this._value))), this._syncValue(), this._syncMirrors();
4469
+ this._value = this._snapToStep(this._clamp(q(e, this._value))), this._syncValue(), this._syncMirrors();
4470
4470
  }
4471
4471
  get start() {
4472
4472
  return this._start;
4473
4473
  }
4474
4474
  set start(e) {
4475
- this._start = Math.min(this._snapToStep(this._clamp(Y(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
4475
+ this._start = Math.min(this._snapToStep(this._clamp(q(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
4476
4476
  }
4477
4477
  get end() {
4478
4478
  return this._end;
4479
4479
  }
4480
4480
  set end(e) {
4481
- this._end = Math.max(this._snapToStep(this._clamp(Y(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
4481
+ this._end = Math.max(this._snapToStep(this._clamp(q(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
4482
4482
  }
4483
4483
  attributeChangedCallback(e, t, n) {
4484
4484
  if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
@@ -4491,19 +4491,19 @@ var Xe = class extends e {
4491
4491
  this._isRange() ? this._resetRange() : this._resetSingle();
4492
4492
  }
4493
4493
  _updateFromAttribute(e) {
4494
- e === "value" ? this._value = this._snapToStep(this._clamp(Y(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(Y(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(Y(this.getAttribute("end"), this._end))));
4494
+ e === "value" ? this._value = this._snapToStep(this._clamp(q(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(q(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(q(this.getAttribute("end"), this._end))));
4495
4495
  }
4496
4496
  _isRange() {
4497
4497
  return this.hasAttribute("range");
4498
4498
  }
4499
4499
  _min() {
4500
- return Y(this.getAttribute("min"), 0);
4500
+ return q(this.getAttribute("min"), 0);
4501
4501
  }
4502
4502
  _max() {
4503
- return Y(this.getAttribute("max"), 100);
4503
+ return q(this.getAttribute("max"), 100);
4504
4504
  }
4505
4505
  _step() {
4506
- return Y(this.getAttribute("step"), 1);
4506
+ return q(this.getAttribute("step"), 1);
4507
4507
  }
4508
4508
  _clamp(e) {
4509
4509
  return Math.max(this._min(), Math.min(e, this._max()));
@@ -4571,7 +4571,7 @@ var Xe = class extends e {
4571
4571
  aria-valuenow="${this._value}"
4572
4572
  aria-valuetext="${this._formatValue(this._value)}"
4573
4573
  ${a ? "disabled" : ""}
4574
- aria-label="${Qe(this.getAttribute("aria-label") || "Value")}"
4574
+ aria-label="${et(this.getAttribute("aria-label") || "Value")}"
4575
4575
  ></button>
4576
4576
  `}
4577
4577
  ${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
@@ -4673,10 +4673,10 @@ var Xe = class extends e {
4673
4673
  disconnectedCallback() {
4674
4674
  this._teardown();
4675
4675
  }
4676
- }, Y = (e, t) => {
4676
+ }, q = (e, t) => {
4677
4677
  let n = Number.parseFloat(e);
4678
4678
  return Number.isFinite(n) ? n : t;
4679
- }, Qe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), $e = class extends e {
4679
+ }, et = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), tt = class extends e {
4680
4680
  static formAssociated = !0;
4681
4681
  _accessibleName() {
4682
4682
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
@@ -4749,7 +4749,7 @@ var Xe = class extends e {
4749
4749
  f(this, this._values.join(",")), this.innerHTML = `
4750
4750
  <div class="search-select${t}">
4751
4751
  <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
4752
- <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input aria-label="${X(this._accessibleName())}" placeholder="${X(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/></div>
4752
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input aria-label="${J(this._accessibleName())}" placeholder="${J(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/></div>
4753
4753
  </div>
4754
4754
  </div>`, this._rendered = !0, f(this, this._values.join(",")), this._renderControl(), this._wire();
4755
4755
  }
@@ -4757,14 +4757,14 @@ var Xe = class extends e {
4757
4757
  let e = this.querySelector("[data-chips]");
4758
4758
  if (e) {
4759
4759
  for (let t of e.querySelectorAll(":scope > .chip")) t.remove();
4760
- this._values.length && e.querySelector("[data-input]").insertAdjacentHTML("beforebegin", this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${et(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(e)}">${m("x")}</button></span>`).join(""));
4760
+ this._values.length && e.querySelector("[data-input]").insertAdjacentHTML("beforebegin", this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${nt(e)}</span><button type="button" class="chip-remove" data-remove="${J(e)}" aria-label="Remove ${J(e)}">${m("x")}</button></span>`).join(""));
4761
4761
  }
4762
4762
  }
4763
4763
  _wire() {
4764
4764
  this._teardown();
4765
4765
  let e = this.querySelector(".search-select-control"), t = this.querySelector("[data-input]");
4766
4766
  if (!e || !t) return;
4767
- let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(ve).filter(Boolean)), s = () => {
4767
+ let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(be).filter(Boolean)), s = () => {
4768
4768
  f(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
4769
4769
  }, c = (e) => {
4770
4770
  let t = e.trim();
@@ -4796,9 +4796,9 @@ var Xe = class extends e {
4796
4796
  e.preventDefault();
4797
4797
  let n = e.clipboardData.getData("text/plain"), a = [];
4798
4798
  for (let e of r) {
4799
- let t = ye(e) ?? e;
4800
- if (xe(n, [t])) {
4801
- a.push(...be(n, [t]));
4799
+ let t = xe(e) ?? e;
4800
+ if (Ce(n, [t])) {
4801
+ a.push(...Se(n, [t]));
4802
4802
  break;
4803
4803
  }
4804
4804
  }
@@ -4826,18 +4826,18 @@ var Xe = class extends e {
4826
4826
  disconnectedCallback() {
4827
4827
  this._teardown();
4828
4828
  }
4829
- }, et = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), tt = (e) => String(e).padStart(2, "0"), nt = (e, t) => `${tt(e)}:${tt(t)}`, Z = (e) => {
4829
+ }, nt = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), J = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), rt = (e) => String(e).padStart(2, "0"), it = (e, t) => `${rt(e)}:${rt(t)}`, Y = (e) => {
4830
4830
  let t = /^(\d{2}):(\d{2})$/.exec(e || "");
4831
4831
  return t ? {
4832
4832
  h: +t[1],
4833
4833
  m: +t[2]
4834
4834
  } : null;
4835
- }, rt = (e, t = "24") => {
4835
+ }, at = (e, t = "24") => {
4836
4836
  if (!e) return "";
4837
- if (t === "24") return nt(e.h, e.m);
4837
+ if (t === "24") return it(e.h, e.m);
4838
4838
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
4839
- return `${n}:${tt(e.m)} ${r}`;
4840
- }, it = class extends e {
4839
+ return `${n}:${rt(e.m)} ${r}`;
4840
+ }, ot = class extends e {
4841
4841
  static formAssociated = !0;
4842
4842
  static get observedAttributes() {
4843
4843
  return [
@@ -4893,11 +4893,11 @@ var Xe = class extends e {
4893
4893
  }
4894
4894
  render() {
4895
4895
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
4896
- let e = this.getAttribute("placeholder") || "Select time", t = Z(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
4896
+ let e = this.getAttribute("placeholder") || "Select time", t = Y(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
4897
4897
  this.innerHTML = `
4898
4898
  <div class="timepicker">
4899
4899
  <button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${_(a)}"` : ""}${o ? ` aria-describedby="${_(o)}"` : ""}>
4900
- <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? rt(t, n) : _(e)}</span>
4900
+ <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? at(t, n) : _(e)}</span>
4901
4901
  ${m("clock")}
4902
4902
  </button>
4903
4903
  <div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
@@ -4909,14 +4909,14 @@ var Xe = class extends e {
4909
4909
  _syncTrigger() {
4910
4910
  let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
4911
4911
  if (!t) return;
4912
- let n = Z(this._value), r = this.getAttribute("format") || "24";
4913
- t.textContent = n ? rt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4912
+ let n = Y(this._value), r = this.getAttribute("format") || "24";
4913
+ t.textContent = n ? at(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4914
4914
  }
4915
4915
  _buildTimes() {
4916
- let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Z(t) || {
4916
+ let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Y(t) || {
4917
4917
  h: 0,
4918
4918
  m: 0
4919
- }, i = Z(n) || {
4919
+ }, i = Y(n) || {
4920
4920
  h: 23,
4921
4921
  m: 59
4922
4922
  }, a = [], o = r.h, s = r.m;
@@ -4929,10 +4929,10 @@ var Xe = class extends e {
4929
4929
  _renderOptions() {
4930
4930
  let e = this.querySelector(".timepicker-pop");
4931
4931
  if (!e) return;
4932
- let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Z(this._value), i = this._focus, a = "";
4932
+ let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Y(this._value), i = this._focus, a = "";
4933
4933
  for (let e = 0; e < n.length; e++) {
4934
- let o = n[e], s = nt(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4935
- a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${rt(o, t)}</button>`;
4934
+ let o = n[e], s = it(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4935
+ a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${at(o, t)}</button>`;
4936
4936
  }
4937
4937
  e.innerHTML = a, this._focusActive();
4938
4938
  }
@@ -5030,7 +5030,7 @@ var Xe = class extends e {
5030
5030
  disconnectedCallback() {
5031
5031
  this._teardown();
5032
5032
  }
5033
- }, at = "wui-wizard-step", ot = class extends e {
5033
+ }, st = "wui-wizard-step", ct = class extends e {
5034
5034
  static get observedAttributes() {
5035
5035
  return [
5036
5036
  "active",
@@ -5064,7 +5064,7 @@ var Xe = class extends e {
5064
5064
  this._beforeNext = typeof e == "function" ? e : null;
5065
5065
  }
5066
5066
  get _steps() {
5067
- return [...this.querySelectorAll(`:scope > ${at}`)];
5067
+ return [...this.querySelectorAll(`:scope > ${st}`)];
5068
5068
  }
5069
5069
  refresh() {
5070
5070
  this._rendered && this._renderChrome();
@@ -5103,7 +5103,7 @@ var Xe = class extends e {
5103
5103
  }
5104
5104
  _reconcileSteps() {
5105
5105
  let e = this._steps, t = this._known;
5106
- if (this._known = e, st(e, t)) return e;
5106
+ if (this._known = e, lt(e, t)) return e;
5107
5107
  let n = (n) => new Set([...n].map((n) => e.indexOf(t[n])).filter((e) => e >= 0));
5108
5108
  this._skipped = n(this._skipped), this._invalid = n(this._invalid);
5109
5109
  let r = t[this._active];
@@ -5123,7 +5123,7 @@ var Xe = class extends e {
5123
5123
  _onStepsMutated() {
5124
5124
  if (!this._rendered) return;
5125
5125
  let e = this._steps;
5126
- (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && st(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
5126
+ (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && lt(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
5127
5127
  }
5128
5128
  _syncPanels(e) {
5129
5129
  e.forEach((e, t) => {
@@ -5147,13 +5147,13 @@ var Xe = class extends e {
5147
5147
  return e.map((e, r) => {
5148
5148
  let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
5149
5149
  u = a === "done" ? m("check") : a === "error" ? m("alert-triangle") : a === "skipped" ? m("minus") : c ? m(c) : String(l);
5150
- let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, h = s ? `<span class="step-desc">${Q(s)}</span>` : "", g;
5151
- return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${Q(o)}</span>${h}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${g}</button>` : `<div class="${d}"${f}>${g}</div>`;
5150
+ let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", p = i || r < this._active, h = s ? `<span class="step-desc">${X(s)}</span>` : "", g;
5151
+ return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${X(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${X(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${X(o)}</span>${h}`, p ? `<button type="button" class="${d}" data-step="${r}"${f}>${g}</button>` : `<div class="${d}"${f}>${g}</div>`;
5152
5152
  }).join("");
5153
5153
  }
5154
5154
  _footerHtml(e) {
5155
5155
  let t = this._active, n = e.length - 1, r = this.hasAttribute("disabled") ? " disabled" : "", i = e[t]?.hasAttribute("optional") || this.hasAttribute("skippable"), a = this.getAttribute("back-label") || "Back", o = this.getAttribute("next-label") || "Next", s = this.getAttribute("skip-label") || "Skip", c = this.getAttribute("finish-label") || "Finish";
5156
- return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${m("arrow-left", { className: "me-2" })}${Q(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Q(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Q(o)}${m("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Q(c)}</button>`}</span>`;
5156
+ return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${m("arrow-left", { className: "me-2" })}${X(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${X(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${X(o)}${m("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${X(c)}</button>`}</span>`;
5157
5157
  }
5158
5158
  _wire() {
5159
5159
  this._teardown(), this._onHeaderClick = (e) => {
@@ -5227,7 +5227,7 @@ var Xe = class extends e {
5227
5227
  _reflectActive(e) {
5228
5228
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
5229
5229
  }
5230
- }, st = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Q = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ct = class extends e {
5230
+ }, lt = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ut = class extends e {
5231
5231
  static get observedAttributes() {
5232
5232
  return [
5233
5233
  "label",
@@ -5241,8 +5241,8 @@ var Xe = class extends e {
5241
5241
  let e = this.closest("wui-wizard");
5242
5242
  e && typeof e.refresh == "function" && e.refresh();
5243
5243
  }
5244
- }, lt = 2e3;
5245
- async function ut(e) {
5244
+ }, dt = 2e3;
5245
+ async function ft(e) {
5246
5246
  try {
5247
5247
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
5248
5248
  } catch {}
@@ -5257,14 +5257,14 @@ async function ut(e) {
5257
5257
  }
5258
5258
  //#endregion
5259
5259
  //#region src/fileValidation.js
5260
- var dt = "image/png,image/jpeg,image/webp", ft = 5, pt = {
5260
+ var pt = "image/png,image/jpeg,image/webp", mt = 5, ht = {
5261
5261
  "image/png": [".png"],
5262
5262
  "image/jpeg": [".jpg", ".jpeg"],
5263
5263
  "image/webp": [".webp"],
5264
5264
  "image/gif": [".gif"],
5265
5265
  "image/svg+xml": [".svg"],
5266
5266
  "application/pdf": [".pdf"]
5267
- }, mt = {
5267
+ }, gt = {
5268
5268
  "image/png": "PNG",
5269
5269
  "image/jpeg": "JPG",
5270
5270
  "image/webp": "WEBP",
@@ -5278,7 +5278,7 @@ var dt = "image/png,image/jpeg,image/webp", ft = 5, pt = {
5278
5278
  ".gif": "GIF",
5279
5279
  ".svg": "SVG",
5280
5280
  ".pdf": "PDF"
5281
- }, ht = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), gt = [
5281
+ }, _t = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), vt = [
5282
5282
  ".png",
5283
5283
  ".jpg",
5284
5284
  ".jpeg",
@@ -5289,54 +5289,54 @@ var dt = "image/png,image/jpeg,image/webp", ft = 5, pt = {
5289
5289
  ".avif",
5290
5290
  ".heic"
5291
5291
  ];
5292
- function _t(e) {
5292
+ function yt(e) {
5293
5293
  if (!e) return !1;
5294
5294
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
5295
5295
  if (t) return t.startsWith("image/");
5296
5296
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
5297
- return gt.some((e) => r.endsWith(e));
5297
+ return vt.some((e) => r.endsWith(e));
5298
5298
  }
5299
- function vt(e) {
5300
- let t = ht(e);
5301
- return t.length ? t.every((e) => e.startsWith(".") ? gt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5299
+ function bt(e) {
5300
+ let t = _t(e);
5301
+ return t.length ? t.every((e) => e.startsWith(".") ? vt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5302
5302
  }
5303
- function yt(e) {
5303
+ function xt(e) {
5304
5304
  let t = [];
5305
- for (let n of ht(e)) {
5306
- let e = mt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5305
+ for (let n of _t(e)) {
5306
+ let e = gt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5307
5307
  t.includes(e) || t.push(e);
5308
5308
  }
5309
5309
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
5310
5310
  }
5311
- function bt(e, t) {
5312
- let n = ht(t);
5311
+ function St(e, t) {
5312
+ let n = _t(t);
5313
5313
  if (!n.length) return !0;
5314
5314
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
5315
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (pt[e] || []).some((e) => i.endsWith(e)));
5315
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ht[e] || []).some((e) => i.endsWith(e)));
5316
5316
  }
5317
- function xt(e, t = {}) {
5317
+ function Ct(e, t = {}) {
5318
5318
  if (!e) return null;
5319
- let n = t.accept === void 0 ? dt : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
5320
- return bt(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${yt(n)} file.`;
5319
+ let n = t.accept === void 0 ? pt : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
5320
+ return St(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${xt(n)} file.`;
5321
5321
  }
5322
5322
  //#endregion
5323
5323
  //#region src/passwordRules.js
5324
- var St = {
5324
+ var wt = {
5325
5325
  minLength: 8,
5326
5326
  uppercase: !0,
5327
5327
  lowercase: !0,
5328
5328
  digit: !0,
5329
5329
  special: !0,
5330
5330
  uniqueChars: 0
5331
- }, Ct = "Password Requirements";
5332
- function wt(e) {
5333
- return e === !0 || e == null ? { ...St } : {
5334
- ...St,
5331
+ }, Tt = "Password Requirements";
5332
+ function Et(e) {
5333
+ return e === !0 || e == null ? { ...wt } : {
5334
+ ...wt,
5335
5335
  ...e
5336
5336
  };
5337
5337
  }
5338
- function Tt(e) {
5339
- let t = wt(e), n = [];
5338
+ function Dt(e) {
5339
+ let t = Et(e), n = [];
5340
5340
  if (t.minLength > 0 && n.push({
5341
5341
  key: "length",
5342
5342
  label: `At least ${t.minLength} characters long`,
@@ -5367,25 +5367,145 @@ function Tt(e) {
5367
5367
  }
5368
5368
  return n;
5369
5369
  }
5370
- function Et(e, t) {
5370
+ function Ot(e, t) {
5371
5371
  let n = e == null ? "" : String(e);
5372
- return Tt(t).map((e) => ({
5372
+ return Dt(t).map((e) => ({
5373
5373
  key: e.key,
5374
5374
  label: e.label,
5375
5375
  met: e.test(n)
5376
5376
  }));
5377
5377
  }
5378
- function Dt(e, t) {
5379
- return Et(e, t).every((e) => e.met);
5378
+ function kt(e, t) {
5379
+ return Ot(e, t).every((e) => e.met);
5380
+ }
5381
+ //#endregion
5382
+ //#region src/themeTransition.js
5383
+ var At = [
5384
+ "light",
5385
+ "dark",
5386
+ "auto"
5387
+ ], jt = [
5388
+ "wave",
5389
+ "circle",
5390
+ "slide",
5391
+ "blinds",
5392
+ "fade",
5393
+ "none"
5394
+ ], Mt = "wave", Nt = "theme", Pt = {
5395
+ wave: 1100,
5396
+ circle: 700,
5397
+ slide: 600,
5398
+ blinds: 900,
5399
+ fade: 350,
5400
+ none: 0
5401
+ }, Ft = "wui-theme-switching", It = "wui-theme-change", Lt = "wui-theme-toggle", Rt = "(prefers-color-scheme: dark)", zt = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Bt = (e) => At.includes(e);
5402
+ function Vt(e) {
5403
+ return e === "dark" || e === "auto" && zt(Rt) ? "dark" : "light";
5404
+ }
5405
+ function Ht(e = Nt, { includeAuto: t = !1 } = {}) {
5406
+ let n = null;
5407
+ try {
5408
+ n = window.localStorage.getItem(e);
5409
+ } catch {}
5410
+ return !Bt(n) || n === "auto" && !t ? "light" : n;
5411
+ }
5412
+ function Ut(e, t = Nt) {
5413
+ try {
5414
+ window.localStorage.setItem(t, e);
5415
+ } catch {}
5416
+ }
5417
+ function Wt(e) {
5418
+ let t = document.documentElement;
5419
+ t.setAttribute("data-theme", e), t.setAttribute("data-bs-theme", Vt(e)), document.dispatchEvent(new CustomEvent(It, { detail: { mode: e } }));
5420
+ }
5421
+ function Gt(e, { includeAuto: t = !1 } = {}) {
5422
+ return e === "light" ? "dark" : e === "dark" && t ? "auto" : "light";
5423
+ }
5424
+ function Kt(e) {
5425
+ if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
5426
+ let t = window.matchMedia(Rt), n = () => e(t.matches ? "dark" : "light");
5427
+ return t.addEventListener("change", n), () => t.removeEventListener("change", n);
5428
+ }
5429
+ var qt = 60, Jt = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, Z = (e) => e.toFixed(1), Q = (e, t) => `${Z(e)}px ${Z(t)}px`, Yt = {
5430
+ amplitude: 22,
5431
+ segments: 36,
5432
+ cycles: 1.5,
5433
+ ripples: 2
5434
+ }, Xt = 6, Zt = (e, t, n, r, i) => {
5435
+ let { amplitude: a, segments: o, cycles: s } = Yt, c = n * (t + 2 * a), l = i ? t + a - c : c - a, u = i ? t + 2 * a : -2 * a, d = [Q(0, u)];
5436
+ for (let t = 0; t <= o; t++) {
5437
+ let n = e * t / o, i = l + a * Math.sin(2 * Math.PI * s * t / o + r);
5438
+ d.push(Q(n, i));
5439
+ }
5440
+ return d.push(Q(e, u)), `polygon(${d.join(", ")})`;
5441
+ }, Qt = (e, t, n, r) => {
5442
+ let i = t / Xt, a = [];
5443
+ for (let t = 0; t < Xt; t++) {
5444
+ let o = t * i, s = i * n, c = r ? o + i - s : o, l = r ? o + i : o + s;
5445
+ a.push(Q(0, c), Q(e, c), Q(e, l), Q(0, l));
5446
+ }
5447
+ return `polygon(${a.join(", ")})`;
5448
+ };
5449
+ function $t(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
5450
+ let a = r === "dark", o = [];
5451
+ for (let r = 0; r <= qt; r++) {
5452
+ let s = r / qt, c = Jt(s);
5453
+ switch (e) {
5454
+ case "circle": {
5455
+ let e = i?.x ?? t / 2, r = i?.y ?? n / 2, a = Math.hypot(Math.max(e, t - e), Math.max(r, n - r));
5456
+ o.push({ clipPath: `circle(${Z(a * c)}px at ${Z(e)}px ${Z(r)}px)` });
5457
+ break;
5458
+ }
5459
+ case "slide": {
5460
+ let e = n * (1 - c);
5461
+ o.push({ clipPath: a ? `inset(${Z(e)}px 0px 0px 0px)` : `inset(0px 0px ${Z(e)}px 0px)` });
5462
+ break;
5463
+ }
5464
+ case "blinds":
5465
+ o.push({ clipPath: Qt(t, n, c, a) });
5466
+ break;
5467
+ case "fade":
5468
+ o.push({
5469
+ clipPath: "none",
5470
+ opacity: c
5471
+ });
5472
+ break;
5473
+ case "none": return [];
5474
+ default: o.push({ clipPath: Zt(t, n, c, s * Yt.ripples * 2 * Math.PI, a) });
5475
+ }
5476
+ }
5477
+ return o;
5478
+ }
5479
+ function en(e, { effect: t = Mt, to: n, origin: r, duration: i, live: a } = {}) {
5480
+ let o = document.documentElement, s = n !== void 0 && o.getAttribute("data-bs-theme") === n;
5481
+ if (t === "none" || s || zt("(prefers-reduced-motion: reduce)") || typeof document.startViewTransition != "function" || typeof o.animate != "function") return e(), Promise.resolve(!1);
5482
+ o.classList.add(Ft);
5483
+ let c = a instanceof Element ? a : null;
5484
+ c && (c.style.viewTransitionName = Lt);
5485
+ let l = document.startViewTransition(e), u = i ?? Pt[t] ?? Pt.wave;
5486
+ return l.ready.then(() => {
5487
+ let e = $t(t, {
5488
+ width: window.innerWidth,
5489
+ height: window.innerHeight,
5490
+ to: n,
5491
+ origin: r
5492
+ });
5493
+ o.animate(e, {
5494
+ duration: u,
5495
+ easing: "linear",
5496
+ fill: "both",
5497
+ pseudoElement: "::view-transition-new(root)"
5498
+ });
5499
+ }).catch(() => {}), l.finished.catch(() => {}).then(() => (o.classList.remove(Ft), c && (c.style.viewTransitionName = ""), !0));
5380
5500
  }
5381
5501
  //#endregion
5382
5502
  //#region src/index.js
5383
5503
  var $ = (e, t) => {
5384
5504
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
5385
5505
  };
5386
- function Ot() {
5387
- $("wui-select", P), $("wui-country-select", de), $("wui-phone", Xe), $("wui-datepicker", fe), $("wui-date-range", pe), $("wui-dock", me), $("wui-consent-banner", se), $("wui-slider", Ze), $("wui-timepicker", it), $("wui-autocomplete", S), $("wui-command-palette", ee), $("wui-multiselect", Se), $("wui-taginput", $e), $("wui-otp", Pe), $("wui-status-icon", i), $("wui-wizard-step", ct), $("wui-wizard", ot);
5506
+ function tn() {
5507
+ $("wui-select", P), $("wui-country-select", de), $("wui-phone", Qe), $("wui-datepicker", me), $("wui-date-range", he), $("wui-dock", ge), $("wui-consent-banner", se), $("wui-slider", $e), $("wui-timepicker", ot), $("wui-autocomplete", S), $("wui-command-palette", ee), $("wui-multiselect", we), $("wui-taginput", tt), $("wui-otp", Ie), $("wui-status-icon", i), $("wui-wizard-step", ut), $("wui-wizard", ct);
5388
5508
  }
5389
- Ot();
5509
+ tn();
5390
5510
  //#endregion
5391
- export { lt as COPY_FEEDBACK_MS, dt as DEFAULT_IMAGE_ACCEPT, ft as DEFAULT_MAX_SIZE_MB, St as DEFAULT_PASSWORD_RULES, Ct as DEFAULT_REQUIREMENTS_TITLE, r as STATUS_TONES, S as WuiAutocomplete, ee as WuiCommandPalette, se as WuiConsentBanner, de as WuiCountrySelect, fe as WuiDatePicker, pe as WuiDateRange, me as WuiDock, Se as WuiMultiSelect, Pe as WuiOtp, Xe as WuiPhone, P as WuiSelect, Ze as WuiSlider, i as WuiStatusIcon, $e as WuiTagInput, it as WuiTimePicker, ot as WuiWizard, ct as WuiWizardStep, yt as acceptLabel, Tt as buildPasswordRules, ut as copyTextToClipboard, Ot as defineWeborityElements, Et as evaluatePassword, m as glyphSvg, _t as isImageFile, vt as isImageOnlyAccept, T as matchSegments, bt as matchesAccept, Dt as passwordSatisfies, xt as validateFile };
5511
+ export { dt as COPY_FEEDBACK_MS, pt as DEFAULT_IMAGE_ACCEPT, mt as DEFAULT_MAX_SIZE_MB, wt as DEFAULT_PASSWORD_RULES, Tt as DEFAULT_REQUIREMENTS_TITLE, Mt as DEFAULT_THEME_EFFECT, Nt as DEFAULT_THEME_STORAGE_KEY, r as STATUS_TONES, It as THEME_CHANGE_EVENT, jt as THEME_EFFECTS, Pt as THEME_EFFECT_DURATION, Lt as THEME_LIVE_NAME, At as THEME_MODES, Ft as THEME_SWITCHING_CLASS, S as WuiAutocomplete, ee as WuiCommandPalette, se as WuiConsentBanner, de as WuiCountrySelect, me as WuiDatePicker, he as WuiDateRange, ge as WuiDock, we as WuiMultiSelect, Ie as WuiOtp, Qe as WuiPhone, P as WuiSelect, $e as WuiSlider, i as WuiStatusIcon, tt as WuiTagInput, ot as WuiTimePicker, ct as WuiWizard, ut as WuiWizardStep, xt as acceptLabel, Wt as applyTheme, Dt as buildPasswordRules, ft as copyTextToClipboard, tn as defineWeborityElements, Ot as evaluatePassword, m as glyphSvg, yt as isImageFile, bt as isImageOnlyAccept, T as matchSegments, St as matchesAccept, Gt as nextTheme, kt as passwordSatisfies, Ht as readStoredTheme, Vt as resolveTheme, Ut as storeTheme, $t as themeKeyframes, en as transitionTheme, Ct as validateFile, Kt as watchSystemTheme };