@webority/ui-elements 0.28.0 → 0.30.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.
@@ -6894,7 +6894,20 @@ var pi = class extends e {
6894
6894
  if (t === "24") return _i(e.h, e.m);
6895
6895
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
6896
6896
  return `${n}:${gi(e.m)} ${r}`;
6897
- }, bi = class extends e {
6897
+ }, bi = (e) => {
6898
+ let t = String(e || "").trim().toLowerCase(), n = /^(\d{1,2})(?:[:.](\d{2})|(\d{2}))?\s*(?:([ap])\.?\s*(?:m\.?)?)?$/.exec(t);
6899
+ if (!n) return null;
6900
+ let r = +n[1], i = +(n[2] ?? n[3] ?? "0");
6901
+ if (i > 59) return null;
6902
+ if (n[4]) {
6903
+ if (r < 1 || r > 12) return null;
6904
+ r = r % 12 + (n[4] === "p" ? 12 : 0);
6905
+ } else if (r > 23) return null;
6906
+ return {
6907
+ h: r,
6908
+ m: i
6909
+ };
6910
+ }, xi = 0, Si = class extends e {
6898
6911
  static formAssociated = !0;
6899
6912
  static get observedAttributes() {
6900
6913
  return [
@@ -6919,7 +6932,9 @@ var pi = class extends e {
6919
6932
  } catch {
6920
6933
  this._internals = null;
6921
6934
  }
6922
- this._value = "", this._focus = null, this._typeahead = "", this._typeaheadTimer = null;
6935
+ this._value = "", this._uid = `wui-tp-${++xi}`, this._typedError = "", this._typeahead = "", this._typeaheadTimer = null, this.addEventListener("focusout", (e) => {
6936
+ this._isOpen?.() && e.relatedTarget && !this.contains(e.relatedTarget) && this._close({ commit: !0 });
6937
+ });
6923
6938
  }
6924
6939
  connectedCallback() {
6925
6940
  if (!this._rendered) {
@@ -6929,15 +6944,22 @@ var pi = class extends e {
6929
6944
  this._bindGlobal?.();
6930
6945
  }
6931
6946
  attributeChangedCallback(e, t, n) {
6932
- if (e === "aria-invalid") {
6933
- this._syncInvalid();
6934
- return;
6947
+ if (this._rendered) switch (e) {
6948
+ case "value":
6949
+ this._value = n || "", this._typedError = "", this._syncFormValue(), this._syncText(), this._syncInvalid();
6950
+ return;
6951
+ case "aria-invalid":
6952
+ case "aria-describedby":
6953
+ this._syncInvalid();
6954
+ return;
6955
+ case "aria-label":
6956
+ case "placeholder":
6957
+ case "disabled":
6958
+ case "required":
6959
+ this._syncAttrs();
6960
+ return;
6961
+ default: this.render();
6935
6962
  }
6936
- this._rendered && (e === "value" ? (this._value = n || "", this._syncFormValue(), this._syncTrigger()) : this.render());
6937
- }
6938
- _syncInvalid() {
6939
- let e = this.querySelector(".timepicker-trigger");
6940
- e && (this.hasAttribute("aria-invalid") ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
6941
6963
  }
6942
6964
  formResetCallback() {
6943
6965
  this.value = this._defaultValue || "";
@@ -6946,140 +6968,276 @@ var pi = class extends e {
6946
6968
  return this._value;
6947
6969
  }
6948
6970
  set value(e) {
6949
- this._value = e || "", R(this, this._value), this._syncTrigger();
6971
+ this._value = e || "", this._typedError = "", R(this, this._value), this._syncText(), this._syncInvalid();
6972
+ }
6973
+ _format() {
6974
+ return this.getAttribute("format") || "24";
6975
+ }
6976
+ _step() {
6977
+ return Math.max(1, parseInt(this.getAttribute("step") || "30", 10) || 30);
6978
+ }
6979
+ _bounds() {
6980
+ let e = vi(this.getAttribute("min")) || {
6981
+ h: 0,
6982
+ m: 0
6983
+ }, t = vi(this.getAttribute("max")) || {
6984
+ h: 23,
6985
+ m: 59
6986
+ };
6987
+ return {
6988
+ min: e.h * 60 + e.m,
6989
+ max: t.h * 60 + t.m
6990
+ };
6991
+ }
6992
+ _allowed(e, t) {
6993
+ let n = e * 60 + t, { min: r, max: i } = this._bounds();
6994
+ return n >= r && n <= i && n % this._step() === 0;
6995
+ }
6996
+ _times() {
6997
+ let e = [];
6998
+ for (let t = 0; t < 1440; t += this._step()) {
6999
+ let n = Math.floor(t / 60), r = t % 60;
7000
+ this._allowed(n, r) && e.push({
7001
+ h: n,
7002
+ m: r
7003
+ });
7004
+ }
7005
+ return e;
7006
+ }
7007
+ _refusal(e) {
7008
+ if (this._allowed(e.h, e.m)) return "";
7009
+ let t = this._format(), { min: n, max: r } = this._bounds(), i = e.h * 60 + e.m, a = (e) => yi({
7010
+ h: Math.floor(e / 60),
7011
+ m: e % 60
7012
+ }, t);
7013
+ if (i < n || i > r) {
7014
+ let e = !!vi(this.getAttribute("min")), t = !!vi(this.getAttribute("max"));
7015
+ return e && t ? `Enter a time between ${a(n)} and ${a(r)}.` : e ? `Enter a time at or after ${a(n)}.` : `Enter a time at or before ${a(r)}.`;
7016
+ }
7017
+ return `Enter a time in ${this._step()}-minute steps.`;
6950
7018
  }
6951
7019
  render() {
6952
- this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
6953
- let e = this.getAttribute("placeholder") || "Select time", t = vi(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");
7020
+ this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value), this._isOpen = null;
7021
+ let e = this.getAttribute("size"), t = e === "sm" ? " input-sm" : e === "lg" ? " input-lg" : "", n = this._uid;
6954
7022
  this.innerHTML = `
6955
7023
  <div class="timepicker">
6956
- <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="${V(a)}"` : ""}${o ? ` aria-describedby="${V(o)}"` : ""}>
6957
- <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? yi(t, n) : V(e)}</span>
6958
- ${B("clock")}
6959
- </button>
6960
- <div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
6961
- </div>`, this._rendered = !0, R(this, this._value), this._wire();
7024
+ <div class="wui-timepicker-field">
7025
+ <input type="text" class="input timepicker-trigger${t}" id="${n}-input" role="combobox" aria-haspopup="dialog" aria-expanded="false" aria-controls="${n}-pop" aria-autocomplete="none" autocomplete="off" spellcheck="false">
7026
+ <button type="button" class="wui-timepicker-toggle" tabindex="-1" aria-label="Choose time" aria-haspopup="dialog" aria-expanded="false" aria-controls="${n}-pop">${B("clock")}</button>
7027
+ </div>
7028
+ <div class="timepicker-pop" id="${n}-pop" role="dialog" aria-label="Choose time" hidden></div>
7029
+ <div class="field-error wui-timepicker-error" id="${n}-error" hidden></div>
7030
+ </div>`, this._rendered = !0, this._syncAttrs(), this._syncText(), this._syncInvalid(), R(this, this._value), this._wire();
7031
+ }
7032
+ _input() {
7033
+ return this.querySelector(".timepicker-trigger");
7034
+ }
7035
+ _pop() {
7036
+ return this.querySelector(".timepicker-pop");
6962
7037
  }
6963
7038
  _syncFormValue() {
6964
7039
  R(this, this._value);
6965
7040
  }
6966
- _syncTrigger() {
6967
- let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
6968
- if (!t) return;
6969
- let n = vi(this._value), r = this.getAttribute("format") || "24";
6970
- t.textContent = n ? yi(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
6971
- }
6972
- _buildTimes() {
6973
- let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = vi(t) || {
6974
- h: 0,
6975
- m: 0
6976
- }, i = vi(n) || {
6977
- h: 23,
6978
- m: 59
6979
- }, a = [], o = r.h, s = r.m;
6980
- for (s = Math.ceil(s / e) * e, s >= 60 && (o += 1, s -= 60); o < i.h || o === i.h && s <= i.m;) a.push({
6981
- h: o,
6982
- m: s
6983
- }), s += e, s >= 60 && (o += 1, s -= 60);
6984
- return a;
6985
- }
6986
- _renderOptions() {
6987
- let e = this.querySelector(".timepicker-pop");
7041
+ _syncAttrs() {
7042
+ let e = this._input(), t = this.querySelector(".wui-timepicker-toggle");
6988
7043
  if (!e) return;
6989
- let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = vi(this._value), i = this._focus, a = "";
6990
- for (let e = 0; e < n.length; e++) {
6991
- let o = n[e], s = _i(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
6992
- a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${yi(o, t)}</button>`;
6993
- }
6994
- e.innerHTML = a, this._focusActive();
7044
+ let n = this.hasAttribute("disabled");
7045
+ e.disabled = n, t && (t.disabled = n), e.placeholder = this.getAttribute("placeholder") || "Select time", this.hasAttribute("required") ? e.setAttribute("aria-required", "true") : e.removeAttribute("aria-required");
7046
+ let r = this.getAttribute("aria-label");
7047
+ r ? e.setAttribute("aria-label", r) : e.removeAttribute("aria-label"), R(this, this._value), n && this._isOpen?.() && this._close({ commit: !1 });
6995
7048
  }
6996
- _focusActive() {
6997
- let e = this.querySelector(".timepicker-pop"), t = e?.querySelector("[tabindex=\"0\"]") || e?.querySelector(".is-selected");
6998
- t && !e.hidden && t.focus();
7049
+ _syncText() {
7050
+ let e = this._input();
7051
+ e && (e.value = yi(vi(this._value), this._format()), this._isOpen?.() && this._syncColumns());
6999
7052
  }
7000
- _position(e, t) {
7001
- I(e, t);
7053
+ _syncInvalid() {
7054
+ let e = this._input(), t = this.querySelector(".wui-timepicker-error");
7055
+ if (!e || !t) return;
7056
+ let n = this._typedError;
7057
+ t.textContent = n, t.hidden = !n, this.hasAttribute("aria-invalid") || n ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid");
7058
+ let r = [this.getAttribute("aria-describedby"), n ? t.id : null].filter(Boolean).join(" ");
7059
+ r ? e.setAttribute("aria-describedby", r) : e.removeAttribute("aria-describedby"), e.setCustomValidity?.(n);
7060
+ }
7061
+ _commitText() {
7062
+ let e = this._input();
7063
+ if (!e || e.value === yi(vi(this._value), this._format())) return !0;
7064
+ let t = e.value.trim(), n = "";
7065
+ if (t) {
7066
+ let e = bi(t), r = e ? this._refusal(e) : `Enter a time like ${this._format() === "12" ? "7:45 PM" : "19:45"}.`;
7067
+ if (r) return this._typedError = r, this._syncInvalid(), !1;
7068
+ n = _i(e.h, e.m);
7069
+ }
7070
+ let r = n !== this._value;
7071
+ return this.value = n, r && this.dispatchEvent(new Event("change", { bubbles: !0 })), !0;
7072
+ }
7073
+ _pending() {
7074
+ let e = bi(this._input()?.value);
7075
+ return e && this._allowed(e.h, e.m) ? e : null;
7076
+ }
7077
+ _columnsHtml() {
7078
+ let e = this._format(), t = this._times(), n = (e, t, n) => `<div class="wui-timepicker-col" role="listbox" aria-label="${t}" data-col="${e}">${n.map((e) => `<button type="button" class="timepicker-option" role="option" tabindex="-1" aria-selected="false" data-v="${e.v}">${e.text}</button>`).join("")}</div>`, r = [...new Set(t.map((e) => e.h))], i = [...new Set(t.map((e) => e.m))].sort((e, t) => e - t), a;
7079
+ if (e === "12") {
7080
+ let e = [...new Set(r.map((e) => e % 12))].sort((e, t) => e - t), t = [...new Set(r.map((e) => e >= 12 ? "pm" : "am"))].sort();
7081
+ a = n("hour", "Hour", e.map((e) => ({
7082
+ v: e,
7083
+ text: String(e || 12)
7084
+ }))) + n("minute", "Minute", i.map((e) => ({
7085
+ v: e,
7086
+ text: gi(e)
7087
+ }))) + n("period", "AM or PM", t.map((e) => ({
7088
+ v: e,
7089
+ text: e.toUpperCase()
7090
+ })));
7091
+ } else a = n("hour", "Hour", r.map((e) => ({
7092
+ v: e,
7093
+ text: gi(e)
7094
+ }))) + n("minute", "Minute", i.map((e) => ({
7095
+ v: e,
7096
+ text: gi(e)
7097
+ })));
7098
+ return `<div class="wui-timepicker-cols">${a}</div>`;
7002
7099
  }
7003
- _onKey(e) {
7004
- let t = [...this.querySelector(".timepicker-pop").querySelectorAll(".timepicker-option")];
7005
- switch (e.key) {
7006
- case "ArrowUp": {
7007
- e.preventDefault();
7008
- let t = Math.max((this._focus ?? 0) - 1, 0);
7009
- this._focus = t, this._renderOptions();
7010
- break;
7011
- }
7012
- case "ArrowDown": {
7013
- e.preventDefault();
7014
- let n = Math.min((this._focus ?? -1) + 1, t.length - 1);
7015
- this._focus = n, this._renderOptions();
7016
- break;
7100
+ _selectedIn(e, t) {
7101
+ return t ? e === "minute" ? String(t.m) : e === "period" ? t.h >= 12 ? "pm" : "am" : String(this._format() === "12" ? t.h % 12 : t.h) : null;
7102
+ }
7103
+ _optionEnabled(e, t, n) {
7104
+ if (!n) return !0;
7105
+ let r = this._format() === "12", i = n.h >= 12, a = (e) => r ? [e + (i ? 12 : 0)] : [e], o = Array.from({ length: 60 }, (e, t) => t);
7106
+ if (e === "hour") return a(+t).some((e) => o.some((t) => this._allowed(e, t)));
7107
+ if (e === "minute") return this._allowed(n.h, +t);
7108
+ let s = t === "pm" ? 12 : 0;
7109
+ return Array.from({ length: 12 }, (e, t) => s + t).some((e) => o.some((t) => this._allowed(e, t)));
7110
+ }
7111
+ _syncColumns({ scroll: e = !1 } = {}) {
7112
+ let t = this._pop();
7113
+ if (!t) return;
7114
+ let n = this._pending();
7115
+ for (let r of t.querySelectorAll(".wui-timepicker-col")) {
7116
+ let t = r.dataset.col, i = this._selectedIn(t, n), a = [...r.querySelectorAll(".timepicker-option")], o = null;
7117
+ for (let e of a) {
7118
+ let r = e.dataset.v === i;
7119
+ e.classList.toggle("is-selected", r), e.setAttribute("aria-selected", r ? "true" : "false"), e.disabled = !r && !this._optionEnabled(t, e.dataset.v, n), r && (o = e);
7017
7120
  }
7121
+ o = o || a.find((e) => !e.disabled) || null;
7122
+ for (let e of a) e.tabIndex = e === o ? 0 : -1;
7123
+ e && o && (r.scrollTop = o.offsetTop - (r.clientHeight - o.offsetHeight) / 2);
7124
+ }
7125
+ }
7126
+ _pick(e, t) {
7127
+ let n = this._times();
7128
+ if (!n.length) return;
7129
+ let r = this._pending() || n[0], i = this._format() === "12", a = r.h, o = r.m;
7130
+ if (e === "minute" ? o = +t : a = e === "period" ? a % 12 + (t === "pm" ? 12 : 0) : i ? +t + (r.h >= 12 ? 12 : 0) : +t, !this._allowed(a, o)) {
7131
+ let t = a * 60 + o, r = n.filter((t) => e === "minute" ? t.m === o : e === "period" ? t.h >= 12 == a >= 12 : i ? t.h % 12 == a % 12 && t.h >= 12 == a >= 12 : t.h === a).sort((e, n) => Math.abs(e.h * 60 + e.m - t) - Math.abs(n.h * 60 + n.m - t))[0];
7132
+ if (!r) return;
7133
+ a = r.h, o = r.m;
7134
+ }
7135
+ let s = this._input();
7136
+ s.value = yi({
7137
+ h: a,
7138
+ m: o
7139
+ }, this._format()), this._typedError = "", this._syncInvalid(), this._syncColumns();
7140
+ }
7141
+ _position() {
7142
+ I(this.querySelector(".wui-timepicker-field"), this._pop());
7143
+ }
7144
+ _onColumnKey(e) {
7145
+ let t = e.target.closest?.(".timepicker-option"), n = t?.closest(".wui-timepicker-col");
7146
+ if (!t || !n) return;
7147
+ let r = [...n.querySelectorAll(".timepicker-option")].filter((e) => !e.disabled), i = r.indexOf(t), a = [...this._pop().querySelectorAll(".wui-timepicker-col")], o = (e) => {
7148
+ e && (this._pick(n.dataset.col, e.dataset.v), (n.querySelector(".timepicker-option.is-selected") || e).focus());
7149
+ };
7150
+ switch (e.key) {
7151
+ case "ArrowDown":
7152
+ e.preventDefault(), o(r[Math.min(i + 1, r.length - 1)]);
7153
+ return;
7154
+ case "ArrowUp":
7155
+ e.preventDefault(), o(r[Math.max(i - 1, 0)]);
7156
+ return;
7018
7157
  case "Home":
7019
- if (e.preventDefault(), !t.length) return;
7020
- this._focus = 0, this._renderOptions();
7021
- break;
7158
+ e.preventDefault(), o(r[0]);
7159
+ return;
7022
7160
  case "End":
7023
- if (e.preventDefault(), !t.length) return;
7024
- this._focus = t.length - 1, this._renderOptions();
7025
- break;
7026
- case "PageUp": {
7027
- if (e.preventDefault(), !t.length) return;
7028
- let n = this._focus == null || this._focus < 0 ? 0 : this._focus;
7029
- this._focus = Math.max(n - 8, 0), this._renderOptions();
7030
- break;
7031
- }
7032
- case "PageDown": {
7033
- if (e.preventDefault(), !t.length) return;
7034
- let n = this._focus == null || this._focus < 0 ? 0 : this._focus;
7035
- this._focus = Math.min(n + 8, t.length - 1), this._renderOptions();
7036
- break;
7037
- }
7161
+ e.preventDefault(), o(r[r.length - 1]);
7162
+ return;
7163
+ case "PageDown":
7164
+ e.preventDefault(), o(r[Math.min(i + 8, r.length - 1)]);
7165
+ return;
7166
+ case "PageUp":
7167
+ e.preventDefault(), o(r[Math.max(i - 8, 0)]);
7168
+ return;
7169
+ case "ArrowRight":
7170
+ case "ArrowLeft":
7171
+ e.preventDefault(), a[a.indexOf(n) + (e.key === "ArrowRight" ? 1 : -1)]?.querySelector(".timepicker-option[tabindex=\"0\"]")?.focus();
7172
+ return;
7038
7173
  case "Enter":
7174
+ e.preventDefault(), this._close({
7175
+ commit: !0,
7176
+ refocus: !0
7177
+ });
7178
+ return;
7039
7179
  case " ":
7040
- e.preventDefault(), t[this._focus] && (this.value = t[this._focus].dataset.hm, this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
7041
- break;
7180
+ e.preventDefault(), o(t);
7181
+ return;
7042
7182
  case "Escape":
7043
- this._close();
7044
- break;
7045
- default: if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
7046
- e.preventDefault(), clearTimeout(this._typeaheadTimer), this._typeahead += e.key.toLowerCase(), this._typeaheadTimer = setTimeout(() => {
7047
- this._typeahead = "", this._typeaheadTimer = null;
7048
- }, 500);
7049
- let n = t.findIndex((e) => e.textContent.trim().toLowerCase().startsWith(this._typeahead));
7050
- n >= 0 && (this._focus = n, this._renderOptions());
7051
- }
7183
+ e.preventDefault(), this._close({
7184
+ commit: !1,
7185
+ refocus: !0
7186
+ });
7187
+ return;
7188
+ default: e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (e.preventDefault(), clearTimeout(this._typeaheadTimer), this._typeahead += e.key.toLowerCase(), this._typeaheadTimer = setTimeout(() => {
7189
+ this._typeahead = "", this._typeaheadTimer = null;
7190
+ }, 500), o(r.find((e) => e.textContent.trim().toLowerCase().startsWith(this._typeahead))));
7052
7191
  }
7053
7192
  }
7054
7193
  _wire() {
7055
7194
  this._teardown();
7056
- let e = this.querySelector(".timepicker-trigger"), t = this.querySelector(".timepicker-pop"), n = this.querySelector(".timepicker");
7057
- if (!e || !t) return;
7058
- let r = () => !t.hidden;
7059
- this._open = () => {
7060
- this._focus = null, this._renderOptions(), t.hidden = !1, n?.classList.add("open"), e.setAttribute("aria-expanded", "true"), this._position(e, t);
7061
- let r = t.querySelector(".is-selected");
7062
- r ? this._focus = [...t.querySelectorAll(".timepicker-option")].indexOf(r) : this._focus = 0, this._renderOptions(), t.querySelector("[tabindex=\"0\"]")?.focus();
7063
- }, this._close = () => {
7064
- t.hidden = !0, n?.classList.remove("open"), e.setAttribute("aria-expanded", "false"), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "", e.focus();
7065
- }, e.addEventListener("click", () => r() ? this._close() : this._open()), e.addEventListener("keydown", (e) => {
7066
- (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), r() || this._open());
7067
- }), t.addEventListener("click", (e) => {
7195
+ let e = this._input(), t = this.querySelector(".wui-timepicker-toggle"), n = this._pop(), r = this.querySelector(".timepicker");
7196
+ if (!e || !n) return;
7197
+ let i = () => !n.hidden;
7198
+ this._isOpen = i;
7199
+ let a = () => n.querySelector(".wui-timepicker-col .timepicker-option[tabindex=\"0\"]")?.focus();
7200
+ this._open = ({ focus: o = !1 } = {}) => {
7201
+ this.hasAttribute("disabled") || (i() || (n.innerHTML = this._columnsHtml(), n.hidden = !1, r?.classList.add("open"), e.setAttribute("aria-expanded", "true"), t?.setAttribute("aria-expanded", "true"), this._position(), this._syncColumns({ scroll: !0 })), o && a());
7202
+ }, this._close = ({ commit: a = !0, refocus: o = !1 } = {}) => {
7203
+ if (!i()) return;
7204
+ let s = n.contains(document.activeElement);
7205
+ n.hidden = !0, n.innerHTML = "", r?.classList.remove("open"), e.setAttribute("aria-expanded", "false"), t?.setAttribute("aria-expanded", "false"), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "", a ? this._commitText() : (this._typedError = "", this._syncText(), this._syncInvalid()), (o || s) && e.focus();
7206
+ }, e.addEventListener("pointerdown", (e) => {
7207
+ this._lastPointer = e.pointerType;
7208
+ }), e.addEventListener("click", () => {
7209
+ this._lastPointer !== "touch" && !i() && this._open(), this._lastPointer = null;
7210
+ }), t?.addEventListener("click", () => {
7211
+ i() ? this._close({
7212
+ commit: !0,
7213
+ refocus: !0
7214
+ }) : this._open({ focus: !0 });
7215
+ }), e.addEventListener("keydown", (e) => {
7216
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), this._open({ focus: !0 });
7217
+ else if (e.key === "Enter") {
7218
+ let t = i(), n = this._commitText();
7219
+ t && n && this._close({ commit: !1 }), (!n || t) && e.preventDefault();
7220
+ } else e.key === "Escape" && i() ? (e.preventDefault(), this._close({ commit: !1 })) : e.key === "Tab" && i() && this._close({ commit: !0 });
7221
+ }), e.addEventListener("input", (e) => {
7222
+ e.stopPropagation(), this._typedError && (this._typedError = "", this._syncInvalid()), i() && this._syncColumns({ scroll: !0 });
7223
+ }), e.addEventListener("change", (e) => {
7224
+ e.stopPropagation(), i() || this._commitText();
7225
+ }), n.addEventListener("click", (e) => {
7068
7226
  this._popClick = !0;
7069
- let t = e.target.closest(".timepicker-option");
7070
- t && !t.disabled && (this.value = t.dataset.hm, this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
7071
- }), this._onKeyBound = (e) => {
7072
- r() && this._onKey(e);
7073
- }, t.addEventListener("keydown", this._onKeyBound), this._bindGlobal = () => {
7227
+ let t = e.target.closest(".timepicker-option"), n = t?.closest(".wui-timepicker-col");
7228
+ t && n && !t.disabled && this._pick(n.dataset.col, t.dataset.v);
7229
+ }), n.addEventListener("keydown", (e) => {
7230
+ i() && this._onColumnKey(e);
7231
+ }), this._bindGlobal = () => {
7074
7232
  this._teardown(), this._onDocClick = (e) => {
7075
7233
  let t = this._popClick;
7076
- this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
7234
+ this._popClick = !1, i() && !t && !this.contains(e.target) && this._close({ commit: !0 });
7077
7235
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
7078
- r() && e.key === "Escape" && this._close();
7236
+ i() && e.key === "Escape" && this._close({ commit: !1 });
7079
7237
  }, document.addEventListener("keydown", this._onDocKey), Bt(this, () => {
7080
- r() && this._position(e, t);
7238
+ i() && this._position();
7081
7239
  });
7082
- }, this._bindGlobal(), this._syncFormValue();
7240
+ }, this._bindGlobal();
7083
7241
  }
7084
7242
  _teardown() {
7085
7243
  this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), this._onDocKey &&= (document.removeEventListener("keydown", this._onDocKey), null), L(this), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
@@ -7087,11 +7245,11 @@ var pi = class extends e {
7087
7245
  disconnectedCallback() {
7088
7246
  this._teardown();
7089
7247
  }
7090
- }, xi = [
7248
+ }, Ci = [
7091
7249
  "none",
7092
7250
  "single",
7093
7251
  "multiple"
7094
- ], Si = "parentId", Ci = "Loading", wi = "Could not load. Try again.", Ti = ":scope > input[data-wui-mirror]", Ei = [
7252
+ ], wi = "parentId", Ti = "Loading", Ei = "Could not load. Try again.", Di = ":scope > input[data-wui-mirror]", Oi = [
7095
7253
  "nodes",
7096
7254
  "selection",
7097
7255
  "selected",
@@ -7099,14 +7257,14 @@ var pi = class extends e {
7099
7257
  "loadChildren",
7100
7258
  "loadUrl",
7101
7259
  "name"
7102
- ], Di = 0;
7260
+ ], ki = 0;
7103
7261
  function X(e, t, n) {
7104
7262
  let r = document.createElement(e);
7105
7263
  t && (r.className = t);
7106
7264
  for (let [e, t] of Object.entries(n ?? {})) t != null && r.setAttribute(e, String(t));
7107
7265
  return r;
7108
7266
  }
7109
- var Oi = class extends e {
7267
+ var Ai = class extends e {
7110
7268
  static get observedAttributes() {
7111
7269
  return [
7112
7270
  "selection",
@@ -7118,7 +7276,7 @@ var Oi = class extends e {
7118
7276
  ];
7119
7277
  }
7120
7278
  constructor() {
7121
- super(), this._uid = `wui-tree-${++Di}`, this._seq = 0, this._roots = [], this._byId = /* @__PURE__ */ new Map(), this._prev = null, this._staged = null, this._els = /* @__PURE__ */ new Map(), this._checked = /* @__PURE__ */ new Set(), this._selected = null, this._focusId = null, this._loader = null, this._list = null, this._live = null, this._ready = !1, this._nav = Gt({
7279
+ super(), this._uid = `wui-tree-${++ki}`, this._seq = 0, this._roots = [], this._byId = /* @__PURE__ */ new Map(), this._prev = null, this._staged = null, this._els = /* @__PURE__ */ new Map(), this._checked = /* @__PURE__ */ new Set(), this._selected = null, this._focusId = null, this._loader = null, this._list = null, this._live = null, this._ready = !1, this._nav = Gt({
7122
7280
  getVisibleOptions: () => this._visible().map((e) => this._els.get(e.id)?.row),
7123
7281
  getActive: () => this._visible().findIndex((e) => e.id === this._focusId),
7124
7282
  setActive: (e) => this._focusNode(this._visible()[e]),
@@ -7133,7 +7291,7 @@ var Oi = class extends e {
7133
7291
  }
7134
7292
  connectedCallback() {
7135
7293
  let e = {};
7136
- for (let t of Ei) Object.hasOwn(this, t) && (e[t] = this[t], delete this[t]);
7294
+ for (let t of Oi) Object.hasOwn(this, t) && (e[t] = this[t], delete this[t]);
7137
7295
  if (!this._ready) {
7138
7296
  this._ready = !0;
7139
7297
  let e = this._readScript();
@@ -7159,7 +7317,7 @@ var Oi = class extends e {
7159
7317
  }
7160
7318
  get selection() {
7161
7319
  let e = this.getAttribute("selection");
7162
- return xi.includes(e) ? e : "none";
7320
+ return Ci.includes(e) ? e : "none";
7163
7321
  }
7164
7322
  set selection(e) {
7165
7323
  this.setAttribute("selection", String(e));
@@ -7203,13 +7361,13 @@ var Oi = class extends e {
7203
7361
  e == null ? this.removeAttribute("name") : this.setAttribute("name", String(e));
7204
7362
  }
7205
7363
  get loadingText() {
7206
- return this.getAttribute("loading-text") ?? Ci;
7364
+ return this.getAttribute("loading-text") ?? Ti;
7207
7365
  }
7208
7366
  set loadingText(e) {
7209
7367
  this.setAttribute("loading-text", String(e ?? ""));
7210
7368
  }
7211
7369
  get errorText() {
7212
- return this.getAttribute("error-text") ?? wi;
7370
+ return this.getAttribute("error-text") ?? Ei;
7213
7371
  }
7214
7372
  set errorText(e) {
7215
7373
  this.setAttribute("error-text", String(e ?? ""));
@@ -7398,7 +7556,7 @@ var Oi = class extends e {
7398
7556
  let t = this.getAttribute("load-url");
7399
7557
  if (!t) throw Error("<wui-tree> has a node with children to load but no loadChildren or load-url.");
7400
7558
  let n = new URL(t, window.location.href);
7401
- n.searchParams.set(Si, e.id);
7559
+ n.searchParams.set(wi, e.id);
7402
7560
  let r = await A(n.href, { headers: { Accept: "application/json" } });
7403
7561
  if (!r.ok) throw Error(`Loading children answered ${r.kind}.`);
7404
7562
  return JSON.parse(r.html);
@@ -7419,7 +7577,7 @@ var Oi = class extends e {
7419
7577
  let e = this.selection;
7420
7578
  if (e === "multiple") z(this, this.values);
7421
7579
  else if (e === "single") R(this, this._selected ?? "");
7422
- else for (let e of this.querySelectorAll(Ti)) e.remove();
7580
+ else for (let e of this.querySelectorAll(Di)) e.remove();
7423
7581
  }
7424
7582
  _render() {
7425
7583
  if (!this._list) return;
@@ -7471,7 +7629,7 @@ var Oi = class extends e {
7471
7629
  row: s
7472
7630
  }), o;
7473
7631
  }
7474
- }, ki = "wui-wizard-step", Ai = class extends e {
7632
+ }, ji = "wui-wizard-step", Mi = class extends e {
7475
7633
  static get observedAttributes() {
7476
7634
  return [
7477
7635
  "active",
@@ -7506,7 +7664,7 @@ var Oi = class extends e {
7506
7664
  this._beforeNext = typeof e == "function" ? e : null;
7507
7665
  }
7508
7666
  get _steps() {
7509
- return [...this.querySelectorAll(`:scope > ${ki}`)];
7667
+ return [...this.querySelectorAll(`:scope > ${ji}`)];
7510
7668
  }
7511
7669
  refresh() {
7512
7670
  this._rendered && this._renderChrome();
@@ -7545,7 +7703,7 @@ var Oi = class extends e {
7545
7703
  }
7546
7704
  _reconcileSteps() {
7547
7705
  let e = this._steps, t = this._known;
7548
- if (this._known = e, ji(e, t)) return e;
7706
+ if (this._known = e, Ni(e, t)) return e;
7549
7707
  let n = (n) => new Set([...n].map((n) => e.indexOf(t[n])).filter((e) => e >= 0));
7550
7708
  this._skipped = n(this._skipped), this._invalid = n(this._invalid);
7551
7709
  let r = t[this._active];
@@ -7565,7 +7723,7 @@ var Oi = class extends e {
7565
7723
  _onStepsMutated() {
7566
7724
  if (!this._rendered) return;
7567
7725
  let e = this._steps;
7568
- (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && ji(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
7726
+ (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && Ni(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
7569
7727
  }
7570
7728
  _syncPanels(e) {
7571
7729
  e.forEach((e, t) => {
@@ -7590,15 +7748,15 @@ var Oi = class extends e {
7590
7748
  return e.map((r, o) => {
7591
7749
  let s = this._stepStatus(r, o), c = r.getAttribute("label") || "", l = r.getAttribute("description") || "", u = r.getAttribute("icon") || "", d = o + 1, f;
7592
7750
  f = s === "done" ? B("check") : s === "error" ? B("alert-triangle") : s === "skipped" ? B("minus") : u ? B(u) : String(d);
7593
- let p = s === "pending" ? "step" : `step ${s}`, m = s === "active" ? " aria-current=\"step\"" : "", h = a || o < this._active, g = l ? `<span class="step-desc">${Mi(l)}</span>` : "", _;
7594
- _ = t ? `<span class="step-circle">${f}</span><span class="step-text"><span class="step-index">Step ${d}</span><span class="step-label">${Mi(c)}</span>${g}</span>` : n ? `<span class="step-circle">${f}</span><span class="step-index">Step ${d}</span><span class="step-label">${Mi(c)}</span>${g}` : `<span class="step-circle">${f}</span><span class="step-label">${Mi(c)}</span>${g}`;
7751
+ let p = s === "pending" ? "step" : `step ${s}`, m = s === "active" ? " aria-current=\"step\"" : "", h = a || o < this._active, g = l ? `<span class="step-desc">${Pi(l)}</span>` : "", _;
7752
+ _ = t ? `<span class="step-circle">${f}</span><span class="step-text"><span class="step-index">Step ${d}</span><span class="step-label">${Pi(c)}</span>${g}</span>` : n ? `<span class="step-circle">${f}</span><span class="step-index">Step ${d}</span><span class="step-label">${Pi(c)}</span>${g}` : `<span class="step-circle">${f}</span><span class="step-label">${Pi(c)}</span>${g}`;
7595
7753
  let v = h ? `<button type="button" class="${p}" data-step="${o}"${m}>${_}</button>` : `<div class="${p}"${m}>${_}</div>`;
7596
7754
  return t && i && o < e.length - 1 ? `${v}<span class="step-line${s === "done" ? " done" : ""}" aria-hidden="true"></span>` : v;
7597
7755
  }).join("");
7598
7756
  }
7599
7757
  _footerHtml(e) {
7600
7758
  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";
7601
- return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${B("arrow-left", { className: "me-2" })}${Mi(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Mi(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Mi(o)}${B("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Mi(c)}</button>`}</span>`;
7759
+ return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${B("arrow-left", { className: "me-2" })}${Pi(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Pi(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Pi(o)}${B("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Pi(c)}</button>`}</span>`;
7602
7760
  }
7603
7761
  _wire() {
7604
7762
  this._teardown(), this._onHeaderClick = (e) => {
@@ -7672,7 +7830,7 @@ var Oi = class extends e {
7672
7830
  _reflectActive(e) {
7673
7831
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
7674
7832
  }
7675
- }, ji = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Mi = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Ni = class extends e {
7833
+ }, Ni = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Pi = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Fi = class extends e {
7676
7834
  static get observedAttributes() {
7677
7835
  return [
7678
7836
  "label",
@@ -7686,8 +7844,8 @@ var Oi = class extends e {
7686
7844
  let e = this.closest("wui-wizard");
7687
7845
  e && typeof e.refresh == "function" && e.refresh();
7688
7846
  }
7689
- }, Pi = 2e3;
7690
- async function Fi(e) {
7847
+ }, Ii = 2e3;
7848
+ async function Li(e) {
7691
7849
  try {
7692
7850
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
7693
7851
  } catch {}
@@ -7702,14 +7860,14 @@ async function Fi(e) {
7702
7860
  }
7703
7861
  //#endregion
7704
7862
  //#region src/fileValidation.js
7705
- var Ii = "image/png,image/jpeg,image/webp", Li = 5, Ri = {
7863
+ var Ri = "image/png,image/jpeg,image/webp", zi = 5, Bi = {
7706
7864
  "image/png": [".png"],
7707
7865
  "image/jpeg": [".jpg", ".jpeg"],
7708
7866
  "image/webp": [".webp"],
7709
7867
  "image/gif": [".gif"],
7710
7868
  "image/svg+xml": [".svg"],
7711
7869
  "application/pdf": [".pdf"]
7712
- }, zi = {
7870
+ }, Vi = {
7713
7871
  "image/png": "PNG",
7714
7872
  "image/jpeg": "JPG",
7715
7873
  "image/webp": "WEBP",
@@ -7723,7 +7881,7 @@ var Ii = "image/png,image/jpeg,image/webp", Li = 5, Ri = {
7723
7881
  ".gif": "GIF",
7724
7882
  ".svg": "SVG",
7725
7883
  ".pdf": "PDF"
7726
- }, Bi = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Vi = [
7884
+ }, Hi = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Ui = [
7727
7885
  ".png",
7728
7886
  ".jpg",
7729
7887
  ".jpeg",
@@ -7734,64 +7892,64 @@ var Ii = "image/png,image/jpeg,image/webp", Li = 5, Ri = {
7734
7892
  ".avif",
7735
7893
  ".heic"
7736
7894
  ];
7737
- function Hi(e) {
7895
+ function Wi(e) {
7738
7896
  if (!e) return !1;
7739
7897
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
7740
7898
  if (t) return t.startsWith("image/");
7741
7899
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
7742
- return Vi.some((e) => r.endsWith(e));
7900
+ return Ui.some((e) => r.endsWith(e));
7743
7901
  }
7744
- function Ui(e) {
7745
- let t = Bi(e);
7746
- return t.length ? t.every((e) => e.startsWith(".") ? Vi.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
7902
+ function Gi(e) {
7903
+ let t = Hi(e);
7904
+ return t.length ? t.every((e) => e.startsWith(".") ? Ui.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
7747
7905
  }
7748
- function Wi(e) {
7906
+ function Ki(e) {
7749
7907
  let t = [];
7750
- for (let n of Bi(e)) {
7751
- let e = zi[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
7908
+ for (let n of Hi(e)) {
7909
+ let e = Vi[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
7752
7910
  t.includes(e) || t.push(e);
7753
7911
  }
7754
7912
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
7755
7913
  }
7756
- function Gi(e, t) {
7757
- let n = Bi(t);
7914
+ function qi(e, t) {
7915
+ let n = Hi(t);
7758
7916
  if (!n.length) return !0;
7759
7917
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
7760
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Ri[e] || []).some((e) => i.endsWith(e)));
7918
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Bi[e] || []).some((e) => i.endsWith(e)));
7761
7919
  }
7762
- function Ki(e, t = {}) {
7920
+ function Ji(e, t = {}) {
7763
7921
  if (!e) return null;
7764
- let n = t.accept === void 0 ? Ii : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
7765
- return Gi(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Wi(n)} file.`;
7922
+ let n = t.accept === void 0 ? Ri : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
7923
+ return qi(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Ki(n)} file.`;
7766
7924
  }
7767
7925
  //#endregion
7768
7926
  //#region src/inputMask.js
7769
- var qi = /[0-9]/, Ji = {
7770
- 9: qi,
7927
+ var Yi = /[0-9]/, Xi = {
7928
+ 9: Yi,
7771
7929
  A: /[A-Za-z]/,
7772
7930
  "*": /[0-9A-Za-z]/
7773
- }, Yi = /[9A*]/, Xi = /* @__PURE__ */ new Set([
7931
+ }, Zi = /[9A*]/, Qi = /* @__PURE__ */ new Set([
7774
7932
  "text",
7775
7933
  "tel",
7776
7934
  "search",
7777
7935
  "url",
7778
7936
  "password"
7779
- ]), Zi = (e) => {
7937
+ ]), $i = (e) => {
7780
7938
  let t = e.replace(/\D/g, "");
7781
7939
  return t.length === 12 && t.startsWith("91") ? t.slice(2) : t.length === 11 && t.startsWith("0") ? t.slice(1) : e;
7782
- }, Qi = (e) => {
7940
+ }, ea = (e) => {
7783
7941
  let t = Number(e.slice(0, 2)), n = Number(e.slice(2, 4)), r = Number(e.slice(4, 8));
7784
7942
  if (r < 1) return !1;
7785
7943
  let i = new Date(Date.UTC(r, n - 1, t));
7786
7944
  return i.getUTCFullYear() === r && i.getUTCMonth() === n - 1 && i.getUTCDate() === t;
7787
- }, $i = (e) => e.length <= 3 ? e : `${e.slice(0, -3).replace(/\B(?=(\d{2})+(?!\d))/g, ",")},${e.slice(-3)}`, ea = (e) => {
7945
+ }, ta = (e) => e.length <= 3 ? e : `${e.slice(0, -3).replace(/\B(?=(\d{2})+(?!\d))/g, ",")},${e.slice(-3)}`, na = (e) => {
7788
7946
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());
7789
7947
  return t ? `${t[3]}-${t[2]}-${t[1]}` : e;
7790
7948
  };
7791
- function ta(e, { upper: t = !1, normalize: n, valid: r, post: i = (e) => e, message: a = "Enter the full value" } = {}) {
7792
- let o = [...e].map((e) => Ji[e] ? { re: Ji[e] } : { lit: e }), s = o.filter((e) => e.re).length;
7949
+ function ra(e, { upper: t = !1, normalize: n, valid: r, post: i = (e) => e, message: a = "Enter the full value" } = {}) {
7950
+ let o = [...e].map((e) => Xi[e] ? { re: Xi[e] } : { lit: e }), s = o.filter((e) => e.re).length;
7793
7951
  return {
7794
- inputMode: o.every((e) => !e.re || e.re === qi) ? "numeric" : "text",
7952
+ inputMode: o.every((e) => !e.re || e.re === Yi) ? "numeric" : "text",
7795
7953
  normalize: n,
7796
7954
  post: i,
7797
7955
  message: a,
@@ -7816,18 +7974,18 @@ function ta(e, { upper: t = !1, normalize: n, valid: r, post: i = (e) => e, mess
7816
7974
  isValid: (e) => e.length === s && (!r || r(e))
7817
7975
  };
7818
7976
  }
7819
- function na() {
7977
+ function ia() {
7820
7978
  return {
7821
7979
  inputMode: "decimal",
7822
7980
  post: (e) => e,
7823
7981
  message: "Enter a valid amount",
7824
7982
  extract(e) {
7825
7983
  let t = "", n = !1, r = 0;
7826
- for (let i of e) qi.test(i) ? n ? r < 2 && (t += i, r++) : t += i : i === "." && !n && (n = !0, t += i);
7984
+ for (let i of e) Yi.test(i) ? n ? r < 2 && (t += i, r++) : t += i : i === "." && !n && (n = !0, t += i);
7827
7985
  return t.startsWith(".") && (t = `0${t}`), t.replace(/^0+(?=\d)/, "");
7828
7986
  },
7829
7987
  layout(e) {
7830
- let [t, n] = e.split("."), r = $i(t) + (e.includes(".") ? `.${n}` : "");
7988
+ let [t, n] = e.split("."), r = ta(t) + (e.includes(".") ? `.${n}` : "");
7831
7989
  return {
7832
7990
  text: r,
7833
7991
  isRaw: [...r].map((e) => e !== ",")
@@ -7836,75 +7994,75 @@ function na() {
7836
7994
  isValid: (e) => /^\d+(\.\d{1,2})?$/.test(e)
7837
7995
  };
7838
7996
  }
7839
- var ra = {
7840
- "phone-in": () => ta("99999 99999", {
7841
- normalize: Zi,
7997
+ var aa = {
7998
+ "phone-in": () => ra("99999 99999", {
7999
+ normalize: $i,
7842
8000
  valid: (e) => /^[6-9]/.test(e),
7843
8001
  message: "Enter a 10-digit mobile number"
7844
8002
  }),
7845
- pan: () => ta("AAAAA9999A", {
8003
+ pan: () => ra("AAAAA9999A", {
7846
8004
  upper: !0,
7847
8005
  valid: (e) => /^[A-Z]{5}\d{4}[A-Z]$/.test(e),
7848
8006
  message: "Enter a valid PAN"
7849
8007
  }),
7850
- gstin: () => ta("99AAAAA9999A***", {
8008
+ gstin: () => ra("99AAAAA9999A***", {
7851
8009
  upper: !0,
7852
8010
  valid: (e) => /^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),
7853
8011
  message: "Enter a valid GSTIN"
7854
8012
  }),
7855
- aadhaar: () => ta("9999 9999 9999", {
8013
+ aadhaar: () => ra("9999 9999 9999", {
7856
8014
  valid: (e) => /^[2-9]/.test(e),
7857
8015
  message: "Enter a valid 12-digit Aadhaar number"
7858
8016
  }),
7859
- ifsc: () => ta("AAAA*******", {
8017
+ ifsc: () => ra("AAAA*******", {
7860
8018
  upper: !0,
7861
8019
  valid: (e) => /^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),
7862
8020
  message: "Enter a valid IFSC"
7863
8021
  }),
7864
- "pin-code": () => ta("999999", {
8022
+ "pin-code": () => ra("999999", {
7865
8023
  valid: (e) => /^[1-9]/.test(e),
7866
8024
  message: "Enter a valid 6-digit PIN code"
7867
8025
  }),
7868
- date: () => ta("99-99-9999", {
7869
- normalize: ea,
7870
- valid: Qi,
7871
- post: (e, t) => e.length === 8 && Qi(e) ? `${e.slice(4)}-${e.slice(2, 4)}-${e.slice(0, 2)}` : t,
8026
+ date: () => ra("99-99-9999", {
8027
+ normalize: na,
8028
+ valid: ea,
8029
+ post: (e, t) => e.length === 8 && ea(e) ? `${e.slice(4)}-${e.slice(2, 4)}-${e.slice(0, 2)}` : t,
7872
8030
  message: "Enter a valid date as DD-MM-YYYY"
7873
8031
  }),
7874
- amount: na
7875
- }, ia = Object.keys(ra), aa = (e) => {
8032
+ amount: ia
8033
+ }, oa = Object.keys(aa), sa = (e) => {
7876
8034
  let t = String(e).toLowerCase();
7877
- return Object.hasOwn(ra, t) ? t : void 0;
7878
- }, oa = (e) => Yi.test(String(e)) && aa(e) === void 0, sa = /* @__PURE__ */ new Map();
7879
- function ca(e) {
8035
+ return Object.hasOwn(aa, t) ? t : void 0;
8036
+ }, ca = (e) => Zi.test(String(e)) && sa(e) === void 0, la = /* @__PURE__ */ new Map();
8037
+ function ua(e) {
7880
8038
  if (e == null || e === "") return null;
7881
8039
  let t = String(e);
7882
- return sa.has(t) || (oa(t) ? sa.set(t, ta(t)) : sa.set(t, Object.hasOwn(ra, t) ? ra[t]() : null)), sa.get(t);
8040
+ return la.has(t) || (ca(t) ? la.set(t, ra(t)) : la.set(t, Object.hasOwn(aa, t) ? aa[t]() : null)), la.get(t);
7883
8041
  }
7884
8042
  var Z = (e, t) => e.normalize ? e.normalize(t) : t;
7885
- function la(e, t) {
7886
- let n = ca(e);
8043
+ function da(e, t) {
8044
+ let n = ua(e);
7887
8045
  return n ? n.extract(Z(n, String(t ?? ""))) : String(t ?? "");
7888
8046
  }
7889
- function ua(e, t) {
7890
- let n = ca(e);
8047
+ function fa(e, t) {
8048
+ let n = ua(e);
7891
8049
  if (!n) return String(t ?? "");
7892
8050
  let r = n.extract(Z(n, String(t ?? "")));
7893
8051
  return n.post(r, n.layout(r).text);
7894
8052
  }
7895
- function da(e, t) {
7896
- let n = ca(e);
8053
+ function pa(e, t) {
8054
+ let n = ua(e);
7897
8055
  return n ? n.layout(n.extract(Z(n, String(t ?? "")))).text : String(t ?? "");
7898
8056
  }
7899
- var fa = (e, t) => {
8057
+ var ma = (e, t) => {
7900
8058
  if (t <= 0) return 0;
7901
8059
  let n = 0;
7902
8060
  for (let r = 0; r < e.length; r++) if (e[r] && ++n === t) return r + 1;
7903
8061
  return e.length;
7904
- }, pa = /* @__PURE__ */ new WeakMap(), ma = (e) => pa.get(e)?.(), ha = /* @__PURE__ */ new WeakMap();
7905
- function ga(e, t, n, r) {
7906
- let i = e.getAll(t), a = ha.get(e);
7907
- a || ha.set(e, a = /* @__PURE__ */ new Set());
8062
+ }, ha = /* @__PURE__ */ new WeakMap(), ga = (e) => ha.get(e)?.(), _a = /* @__PURE__ */ new WeakMap();
8063
+ function va(e, t, n, r) {
8064
+ let i = e.getAll(t), a = _a.get(e);
8065
+ a || _a.set(e, a = /* @__PURE__ */ new Set());
7908
8066
  let o = i.findIndex((e, r) => e === n && !a.has(`${t}\u0000${r}`));
7909
8067
  if (!(o < 0)) {
7910
8068
  if (a.add(`${t}\u0000${o}`), i[o] = r, i.length === 1) {
@@ -7915,7 +8073,7 @@ function ga(e, t, n, r) {
7915
8073
  for (let n of i) e.append(t, n);
7916
8074
  }
7917
8075
  }
7918
- function _a(e) {
8076
+ function ya(e) {
7919
8077
  let t = null, n = null, r = !1, i = (t, n) => n === null ? e.removeAttribute(t) : e.setAttribute(t, n), a, o, s = () => {
7920
8078
  t?.remove(), t = null, n && (n.hidden = !1), n = null, r && e.classList.remove("error"), r = !1, a !== void 0 && i("aria-invalid", a), o !== void 0 && i("aria-describedby", o), a = void 0, o = void 0;
7921
8079
  };
@@ -7928,18 +8086,18 @@ function _a(e) {
7928
8086
  l && l !== t && l.textContent.trim() || (t || (r = !e.classList.contains("error"), e.classList.add("error"), a = e.getAttribute("aria-invalid"), o = e.getAttribute("aria-describedby"), c && (t = document.createElement("div"), t.className = "field-error", e.id && (t.id = `${e.id}-error`), n = c.querySelector(".field-hint"), n && (n.hidden = !0), c.insertBefore(t, [...c.children].find((e) => e.classList.contains("field-count")) ?? null), t.id && e.setAttribute("aria-describedby", t.id)), e.setAttribute("aria-invalid", "true")), t && (t.textContent = i));
7929
8087
  };
7930
8088
  }
7931
- function va(e, { mask: t, postFormatted: n = !1, onChange: r, onInvalidChange: i } = {}) {
7932
- let a = ca(t);
7933
- if (!a || !Xi.has(e.type)) return () => {};
8089
+ function ba(e, { mask: t, postFormatted: n = !1, onChange: r, onInvalidChange: i } = {}) {
8090
+ let a = ua(t);
8091
+ if (!a || !Qi.has(e.type)) return () => {};
7934
8092
  let o = Object.getPrototypeOf(e), s = Object.getOwnPropertyDescriptor(o, "value").set, c = !e.hasAttribute("inputmode");
7935
8093
  c && e.setAttribute("inputmode", a.inputMode);
7936
- let l = i ?? _a(e), u = null, d = !1, f = !1, p = !1, m = "", h = "", g, _ = () => {
8094
+ let l = i ?? ya(e), u = null, d = !1, f = !1, p = !1, m = "", h = "", g, _ = () => {
7937
8095
  let e = p ? m : "";
7938
8096
  e !== h && (h = e, l(h));
7939
8097
  }, v = (t, n, i) => {
7940
8098
  let o = a.extract(t.slice(0, n)).length, c = a.extract(t), { text: l, isRaw: d } = a.layout(c);
7941
- if (e.value !== l && (s.call(e, l), document.activeElement === e && Xi.has(e.type))) {
7942
- let t = fa(d, o);
8099
+ if (e.value !== l && (s.call(e, l), document.activeElement === e && Qi.has(e.type))) {
8100
+ let t = ma(d, o);
7943
8101
  e.setSelectionRange(t, t);
7944
8102
  }
7945
8103
  e.dataset.maskRaw = c, m = c && !a.isValid(c) ? a.message : "", e.setCustomValidity(m), _(), i && c !== u && r?.(c, l), u = c;
@@ -7989,67 +8147,68 @@ function va(e, { mask: t, postFormatted: n = !1, onChange: r, onInvalidChange: i
7989
8147
  };
7990
8148
  e.addEventListener("input", S), e.addEventListener("beforeinput", ee), e.addEventListener("paste", te), e.addEventListener("compositionstart", C), e.addEventListener("compositionend", w), e.addEventListener("blur", T), e.addEventListener("invalid", T);
7991
8149
  let E = e.form, re = (t) => {
7992
- e.name && !e.disabled && ga(t.formData, e.name, e.value, ne());
8150
+ e.name && !e.disabled && va(t.formData, e.name, e.value, ne());
7993
8151
  }, ie = () => {
7994
8152
  clearTimeout(g), g = setTimeout(() => {
7995
8153
  p = !1, v(Z(a, e.value), e.value.length, !0);
7996
8154
  }, 0);
7997
8155
  };
7998
- n || (E?.addEventListener("formdata", re), pa.set(e, ne)), E?.addEventListener("reset", ie), E?.addEventListener("submit", T);
8156
+ n || (E?.addEventListener("formdata", re), ha.set(e, ne)), E?.addEventListener("reset", ie), E?.addEventListener("submit", T);
7999
8157
  let D = Z(a, e.value);
8000
8158
  return v(D, D.length, !1), () => {
8001
- clearTimeout(g), e.removeEventListener("input", S), e.removeEventListener("beforeinput", ee), e.removeEventListener("paste", te), e.removeEventListener("compositionstart", C), e.removeEventListener("compositionend", w), e.removeEventListener("blur", T), e.removeEventListener("invalid", T), E?.removeEventListener("formdata", re), E?.removeEventListener("reset", ie), E?.removeEventListener("submit", T), pa.delete(e), y ? Object.defineProperty(e, "value", y) : delete e.value, p = !1, m = "", _(), e.setCustomValidity(""), delete e.dataset.maskRaw, c && e.removeAttribute("inputmode");
8159
+ clearTimeout(g), e.removeEventListener("input", S), e.removeEventListener("beforeinput", ee), e.removeEventListener("paste", te), e.removeEventListener("compositionstart", C), e.removeEventListener("compositionend", w), e.removeEventListener("blur", T), e.removeEventListener("invalid", T), E?.removeEventListener("formdata", re), E?.removeEventListener("reset", ie), E?.removeEventListener("submit", T), ha.delete(e), y ? Object.defineProperty(e, "value", y) : delete e.value, p = !1, m = "", _(), e.setCustomValidity(""), delete e.dataset.maskRaw, c && e.removeAttribute("inputmode");
8002
8160
  };
8003
8161
  }
8004
- function ya() {
8162
+ function xa() {
8005
8163
  let e = typeof window > "u" ? void 0 : window.jQuery?.validator?.prototype;
8006
8164
  if (!e || e.wuiMaskHook) return;
8007
8165
  let t = e.elementValue;
8008
8166
  e.elementValue = function(e) {
8009
- let n = ma(e);
8167
+ let n = ga(e);
8010
8168
  return n === void 0 ? t.call(this, e) : n;
8011
8169
  }, e.wuiMaskHook = !0;
8012
8170
  }
8013
- var ba = /* @__PURE__ */ new WeakMap(), xa, Sa = (e) => {
8014
- ba.has(e) || ba.set(e, va(e, {
8171
+ var Sa = /* @__PURE__ */ new WeakMap(), Ca, wa = (e) => {
8172
+ Sa.has(e) || Sa.set(e, ba(e, {
8015
8173
  mask: e.dataset.appMask,
8016
8174
  postFormatted: e.hasAttribute("data-mask-post-formatted")
8017
8175
  }));
8018
- }, Ca = (e) => e.nodeType === 1 ? [...e.matches("input[data-app-mask]") ? [e] : [], ...e.querySelectorAll("input[data-app-mask]")] : [];
8019
- function wa() {
8020
- xa || typeof MutationObserver > "u" || (xa = new MutationObserver((e) => {
8176
+ }, Ta = (e) => e.nodeType === 1 ? [...e.matches("input[data-app-mask]") ? [e] : [], ...e.querySelectorAll("input[data-app-mask]")] : [];
8177
+ function Ea() {
8178
+ Ca || typeof MutationObserver > "u" || (Ca = new MutationObserver((e) => {
8021
8179
  for (let t of e) {
8022
- for (let e of t.removedNodes) for (let t of Ca(e)) ba.get(t)?.(), ba.delete(t);
8023
- for (let e of t.addedNodes) for (let t of Ca(e)) Sa(t);
8180
+ for (let e of t.removedNodes) for (let t of Ta(e)) Sa.get(t)?.(), Sa.delete(t);
8181
+ for (let e of t.addedNodes) for (let t of Ta(e)) wa(t);
8024
8182
  }
8025
- }), xa.observe(document.documentElement, {
8183
+ }), Ca.observe(document.documentElement, {
8026
8184
  childList: !0,
8027
8185
  subtree: !0
8028
8186
  }));
8029
8187
  }
8030
- function Ta(e = document) {
8031
- ya();
8032
- for (let t of e.querySelectorAll("input[data-app-mask]")) Sa(t);
8033
- e === document && wa();
8188
+ function Da(e = document) {
8189
+ xa();
8190
+ for (let t of e.querySelectorAll("input[data-app-mask]")) wa(t);
8191
+ e === document && Ea();
8034
8192
  }
8035
8193
  //#endregion
8036
8194
  //#region src/passwordRules.js
8037
- var Ea = {
8038
- minLength: 8,
8195
+ var Oa = {
8196
+ minLength: 10,
8039
8197
  uppercase: !0,
8040
8198
  lowercase: !0,
8041
8199
  digit: !0,
8042
8200
  special: !0,
8043
- uniqueChars: 0
8044
- }, Da = "Password requirements";
8045
- function Oa(e) {
8046
- return e === !0 || e == null ? { ...Ea } : {
8047
- ...Ea,
8201
+ uniqueChars: 0,
8202
+ customRules: []
8203
+ }, ka = "Password requirements";
8204
+ function Aa(e) {
8205
+ return e === !0 || e == null ? { ...Oa } : {
8206
+ ...Oa,
8048
8207
  ...e
8049
8208
  };
8050
8209
  }
8051
- function ka(e) {
8052
- let t = Oa(e), n = [];
8210
+ function ja(e) {
8211
+ let t = Aa(e), n = [];
8053
8212
  if (t.minLength > 0 && n.push({
8054
8213
  key: "length",
8055
8214
  label: `At least ${t.minLength} characters long`,
@@ -8078,49 +8237,57 @@ function ka(e) {
8078
8237
  test: (t) => new Set(t).size >= e
8079
8238
  });
8080
8239
  }
8240
+ for (let [e, r] of (t.customRules ?? []).entries()) {
8241
+ let t = new RegExp(r.pattern);
8242
+ n.push({
8243
+ key: `custom-${e}`,
8244
+ label: r.label,
8245
+ test: (e) => t.test(e)
8246
+ });
8247
+ }
8081
8248
  return n;
8082
8249
  }
8083
- function Aa(e, t) {
8250
+ function Ma(e, t) {
8084
8251
  let n = e == null ? "" : String(e);
8085
- return ka(t).map((e) => ({
8252
+ return ja(t).map((e) => ({
8086
8253
  key: e.key,
8087
8254
  label: e.label,
8088
8255
  met: e.test(n)
8089
8256
  }));
8090
8257
  }
8091
- function ja(e, t) {
8092
- return Aa(e, t).every((e) => e.met);
8258
+ function Na(e, t) {
8259
+ return Ma(e, t).every((e) => e.met);
8093
8260
  }
8094
8261
  //#endregion
8095
8262
  //#region src/tableSelect.js
8096
- var Ma = "Select all rows", Na = "Select row", Q = "wui-select-cell", Pa = (e, t) => {
8263
+ var Pa = "Select all rows", Fa = "Select row", Q = "wui-select-cell", Ia = (e, t) => {
8097
8264
  let n = e.createElement("input");
8098
8265
  return n.type = "checkbox", n.className = "wui-check", n.setAttribute("aria-label", t), n;
8099
8266
  };
8100
- function Fa(e = document) {
8267
+ function La(e = document) {
8101
8268
  let t = e.createElement("th");
8102
- return t.className = Q, t.appendChild(Pa(e, Ma)), t;
8269
+ return t.className = Q, t.appendChild(Ia(e, Pa)), t;
8103
8270
  }
8104
- function Ia(e = document) {
8271
+ function Ra(e = document) {
8105
8272
  let t = e.createElement("td");
8106
- return t.className = Q, t.appendChild(Pa(e, Na)), t;
8273
+ return t.className = Q, t.appendChild(Ia(e, Fa)), t;
8107
8274
  }
8108
- function La(e = document) {
8275
+ function za(e = document) {
8109
8276
  let t = e.createElement("td");
8110
8277
  return t.className = Q, t;
8111
8278
  }
8112
- var Ra = (e) => e.firstElementChild?.classList.contains(Q);
8113
- function za(e) {
8114
- for (let t of e) Ra(t) || t.insertBefore(Ia(t.ownerDocument), t.firstChild);
8279
+ var Ba = (e) => e.firstElementChild?.classList.contains(Q);
8280
+ function Va(e) {
8281
+ for (let t of e) Ba(t) || t.insertBefore(Ra(t.ownerDocument), t.firstChild);
8115
8282
  }
8116
- function Ba(e) {
8283
+ function Ha(e) {
8117
8284
  let t = e.querySelector("thead tr");
8118
8285
  if (!t) return null;
8119
- Ra(t) || t.insertBefore(Fa(e.ownerDocument), t.firstChild), za(e.querySelectorAll("tbody tr"));
8120
- for (let t of e.querySelectorAll("tfoot tr")) Ra(t) || t.insertBefore(La(e.ownerDocument), t.firstChild);
8286
+ Ba(t) || t.insertBefore(La(e.ownerDocument), t.firstChild), Va(e.querySelectorAll("tbody tr"));
8287
+ for (let t of e.querySelectorAll("tfoot tr")) Ba(t) || t.insertBefore(za(e.ownerDocument), t.firstChild);
8121
8288
  return t.querySelector(`.${Q} .wui-check`);
8122
8289
  }
8123
- function Va(e) {
8290
+ function Ua(e) {
8124
8291
  let t = e.querySelector(`thead .${Q} .wui-check`), n = [...e.querySelectorAll("tbody tr .wui-check")], r = n.length, i = n.filter((e) => e.checked).length;
8125
8292
  t && (t.checked = r > 0 && i === r, t.indeterminate = i > 0 && i < r);
8126
8293
  for (let t of e.querySelectorAll("tbody tr")) t.classList.toggle("is-selected", !!t.querySelector(".wui-check")?.checked);
@@ -8131,12 +8298,12 @@ function Va(e) {
8131
8298
  }
8132
8299
  //#endregion
8133
8300
  //#region src/serverTable.js
8134
- var Ha = Object.freeze([
8301
+ var Wa = Object.freeze([
8135
8302
  "page",
8136
8303
  "pageSize",
8137
8304
  "sortBy",
8138
8305
  "sortOrder"
8139
- ]), Ua = "search", Wa = Object.freeze({
8306
+ ]), Ga = "search", Ka = Object.freeze({
8140
8307
  loading: "Loading rows",
8141
8308
  error: "These rows did not load. Try again.",
8142
8309
  network: "The connection dropped before the rows loaded. Check it and try again.",
@@ -8145,28 +8312,28 @@ var Ha = Object.freeze([
8145
8312
  actionFailed: "That did not work. Try again.",
8146
8313
  actionForbidden: "You do not have permission to do that.",
8147
8314
  empty: "No rows"
8148
- }), Ga = /* @__PURE__ */ new WeakMap(), Ka = (e, t) => {
8315
+ }), qa = /* @__PURE__ */ new WeakMap(), Ja = (e, t) => {
8149
8316
  let n = Number(e);
8150
8317
  return Number.isInteger(n) ? n : t;
8151
- }, qa = (e) => ({
8152
- total: Ka(e.dataset.total, 0),
8153
- page: Ka(e.dataset.page, 1),
8154
- pageSize: Ka(e.dataset.pageSize, 0),
8318
+ }, Ya = (e) => ({
8319
+ total: Ja(e.dataset.total, 0),
8320
+ page: Ja(e.dataset.page, 1),
8321
+ pageSize: Ja(e.dataset.pageSize, 0),
8155
8322
  sortBy: e.dataset.sortBy || "",
8156
8323
  sortOrder: e.dataset.sortOrder === "desc" ? "desc" : "asc"
8157
- }), Ja = (e, t) => {
8324
+ }), Xa = (e, t) => {
8158
8325
  e && window.WUI?.toast?.(e, { variant: t });
8159
8326
  };
8160
- function Ya(e = document) {
8327
+ function Za(e = document) {
8161
8328
  let t = e.querySelectorAll ? [...e.querySelectorAll("[data-wui-server]")] : [];
8162
8329
  e instanceof Element && e.matches("[data-wui-server]") && t.unshift(e);
8163
- for (let e of t) Ga.has(e) || Ga.set(e, Za(e));
8330
+ for (let e of t) qa.has(e) || qa.set(e, $a(e));
8164
8331
  }
8165
- function Xa(e) {
8332
+ function Qa(e) {
8166
8333
  let t = e instanceof Element ? e.closest("[data-wui-server]") : null;
8167
- return t && Ga.get(t) || null;
8334
+ return t && qa.get(t) || null;
8168
8335
  }
8169
- function Za(e) {
8336
+ function $a(e) {
8170
8337
  let t = e.querySelector(".table-wrap"), n = t?.querySelector(":scope > table"), r = e.dataset.src;
8171
8338
  if (!n || !r) throw Error("A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.");
8172
8339
  let i = t.querySelector(":scope > [data-wui-table-state]"), a = e.querySelector("[data-wui-table-pager]"), o = e.querySelector("[data-wui-table-status]"), s = {
@@ -8175,11 +8342,11 @@ function Za(e) {
8175
8342
  filtersForm: e.dataset.filtersForm || null,
8176
8343
  filtersRegion: e.dataset.filtersRegion || null,
8177
8344
  searchInput: e.dataset.searchInput || null,
8178
- loadingText: e.dataset.loadingText || Wa.loading,
8179
- errorText: e.dataset.errorText || Wa.error
8345
+ loadingText: e.dataset.loadingText || Ka.loading,
8346
+ errorText: e.dataset.errorText || Ka.error
8180
8347
  }, c = new URL(r, window.location.href), l = new Set(c.searchParams.keys()), u = n.hasAttribute("data-app-datatable-selectable"), d = /* @__PURE__ */ new Set(), f = ue(), p = new AbortController(), m = { signal: p.signal }, h = n.querySelector(":scope > tbody[data-wui-rows]");
8181
8348
  if (!h) throw Error("A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).");
8182
- let g = qa(h), _ = null, v = null, y = (e) => {
8349
+ let g = Ya(h), _ = null, v = null, y = (e) => {
8183
8350
  let t = new URLSearchParams();
8184
8351
  for (let [n, r] of new URLSearchParams(e)) l.has(n) || t.append(n, r);
8185
8352
  return t;
@@ -8201,7 +8368,7 @@ function Za(e) {
8201
8368
  })), te = (e) => {
8202
8369
  o && (o.textContent = e);
8203
8370
  }, ne = (e) => {
8204
- if (e.total === 0) return Wa.empty;
8371
+ if (e.total === 0) return Ka.empty;
8205
8372
  let t = e.pageSize > 0 ? Math.max(1, Math.ceil(e.total / e.pageSize)) : 1;
8206
8373
  return `Page ${e.page} of ${t}, ${e.total} ${e.total === 1 ? "row" : "rows"}`;
8207
8374
  }, T = () => [...n.querySelectorAll(":scope > thead > tr:first-child > th")], E = (e) => {
@@ -8209,12 +8376,12 @@ function Za(e) {
8209
8376
  }, re = (e) => {
8210
8377
  let t = [...e.querySelectorAll(":scope > tr")];
8211
8378
  if (u) {
8212
- za(t);
8379
+ Va(t);
8213
8380
  for (let e of t) {
8214
8381
  let t = e.querySelector(`.${Q} .wui-check`);
8215
8382
  t && (t.checked = d.has(e.dataset.rowKey));
8216
8383
  }
8217
- Va(n);
8384
+ Ua(n);
8218
8385
  }
8219
8386
  let r = T();
8220
8387
  if (n.classList.contains("wui-table-stack")) for (let e of t) [...e.cells].forEach((e, t) => {
@@ -8231,7 +8398,7 @@ function Za(e) {
8231
8398
  let n = e.querySelector(":scope > template[data-wui-empty]");
8232
8399
  D(i), t.total === 0 && n ? (i.replaceChildren(n.content.cloneNode(!0)), i.hidden = !1) : (i.replaceChildren(), i.hidden = !0);
8233
8400
  }, ae = (e) => {
8234
- let r = qa(e);
8401
+ let r = Ya(e);
8235
8402
  if (a) {
8236
8403
  let t = e.querySelector(":scope > template[data-wui-pager]");
8237
8404
  D(a), a.replaceChildren(...t ? [t.content.cloneNode(!0)] : []), a.hidden = !1;
@@ -8246,7 +8413,7 @@ function Za(e) {
8246
8413
  return n && E(n), n ? document.importNode(n, !0) : null;
8247
8414
  }, se = (e) => {
8248
8415
  e ? t.setAttribute("aria-busy", "true") : t.removeAttribute("aria-busy");
8249
- }, ce = (e) => e === "forbidden" ? Wa.forbidden : e === "network" ? Wa.network : s.errorText, le = (e) => {
8416
+ }, ce = (e) => e === "forbidden" ? Ka.forbidden : e === "network" ? Ka.network : s.errorText, le = (e) => {
8250
8417
  let n = ce(e);
8251
8418
  if (t.setAttribute("data-wui-table-error", e), a && (a.hidden = !0), i) {
8252
8419
  let t = document.createElement("div");
@@ -8258,7 +8425,7 @@ function Za(e) {
8258
8425
  let o = document.createElement("div");
8259
8426
  o.className = "tbl-empty-action";
8260
8427
  let s = document.createElement("button");
8261
- s.type = "button", s.className = "btn btn-outline-primary btn-sm", s.setAttribute("data-wui-table-retry", ""), s.textContent = Wa.retry, o.append(s), t.append(r, a, o), D(i), i.replaceChildren(t), i.hidden = !1;
8428
+ s.type = "button", s.className = "btn btn-outline-primary btn-sm", s.setAttribute("data-wui-table-retry", ""), s.textContent = Ka.retry, o.append(s), t.append(r, a, o), D(i), i.replaceChildren(t), i.hidden = !1;
8262
8429
  }
8263
8430
  te(n);
8264
8431
  }, k = async (e, t = "none") => {
@@ -8310,7 +8477,7 @@ function Za(e) {
8310
8477
  !t || !n.tHead?.contains(t) || (e.preventDefault(), j(t.dataset.sortKey));
8311
8478
  });
8312
8479
  let me = () => {
8313
- Va(n), n.dispatchEvent(new CustomEvent("selectionchange", {
8480
+ Ua(n), n.dispatchEvent(new CustomEvent("selectionchange", {
8314
8481
  bubbles: !0,
8315
8482
  detail: {
8316
8483
  selected: d.size,
@@ -8344,13 +8511,13 @@ function Za(e) {
8344
8511
  return e && (e.matches("input, textarea") ? e : e.querySelector("input"));
8345
8512
  }, ge = () => e.isConnected ? !0 : (p.abort(), clearTimeout(v), !1), _e = (e, t) => {
8346
8513
  let n = t?.name ? new FormData(e, t) : new FormData(e), r = new Set([...e.querySelectorAll("[name]")].map((e) => e.getAttribute("name"))), i = new URLSearchParams();
8347
- for (let [e, t] of w) e !== "page" && (Ha.includes(e) || !r.has(e)) && i.append(e, t);
8348
- for (let [e, t] of n) typeof t != "string" || t === "" || Ha.includes(e) || l.has(e) || i.append(e, t);
8514
+ for (let [e, t] of w) e !== "page" && (Wa.includes(e) || !r.has(e)) && i.append(e, t);
8515
+ for (let [e, t] of n) typeof t != "string" || t === "" || Wa.includes(e) || l.has(e) || i.append(e, t);
8349
8516
  let a = he();
8350
8517
  if (a) {
8351
- i.delete(Ua);
8518
+ i.delete(Ga);
8352
8519
  let e = a.value.trim();
8353
- e && i.set(Ua, e);
8520
+ e && i.set(Ga, e);
8354
8521
  }
8355
8522
  return k(i, "push");
8356
8523
  }, ve = (e) => s.filtersForm && e.closest?.(s.filtersForm) || s.filtersRegion && e.closest?.(s.filtersRegion) || null;
@@ -8381,7 +8548,7 @@ function Za(e) {
8381
8548
  let t = he();
8382
8549
  !t || e.target !== t || (clearTimeout(v), v = setTimeout(() => {
8383
8550
  let e = de(new URLSearchParams(w)), n = t.value.trim();
8384
- n ? e.set(Ua, n) : e.delete(Ua), e.toString() !== w.toString() && k(e, "replace");
8551
+ n ? e.set(Ga, n) : e.delete(Ga), e.toString() !== w.toString() && k(e, "replace");
8385
8552
  }, 300));
8386
8553
  }, m), s.urlState && window.addEventListener("popstate", () => {
8387
8554
  if (!ge()) return;
@@ -8400,7 +8567,7 @@ function Za(e) {
8400
8567
  let i = await A(t, { method: (e.dataset.method || "post").toUpperCase() });
8401
8568
  if (e.disabled = !1, e.removeAttribute("aria-busy"), i.kind === "session" || i.kind === "aborted") return;
8402
8569
  let a = i.message;
8403
- i.ok ? (Ja(a, i.toastVariant || "success"), await k(w, "none")) : Ja(a || (i.kind === "forbidden" ? Wa.actionForbidden : Wa.actionFailed), "danger"), ee("wui:table:action", {
8570
+ i.ok ? (Xa(a, i.toastVariant || "success"), await k(w, "none")) : Xa(a || (i.kind === "forbidden" ? Ka.actionForbidden : Ka.actionFailed), "danger"), ee("wui:table:action", {
8404
8571
  action: r,
8405
8572
  key: n,
8406
8573
  ok: i.ok,
@@ -8410,7 +8577,7 @@ function Za(e) {
8410
8577
  return n.addEventListener("click", (e) => {
8411
8578
  let t = e.target.closest("[data-wui-row-action]");
8412
8579
  !t || !h.contains(t) || t.disabled || (e.preventDefault(), !(t.dataset.confirm && !window.confirm(t.dataset.confirm)) && be(t));
8413
- }), E(h), ie(h), u && Ba(n), re(h), pe(), {
8580
+ }), E(h), ie(h), u && Ha(n), re(h), pe(), {
8414
8581
  el: e,
8415
8582
  reload: () => k(w, "none"),
8416
8583
  query: () => new URLSearchParams(w),
@@ -8435,80 +8602,80 @@ function Za(e) {
8435
8602
  }
8436
8603
  //#endregion
8437
8604
  //#region src/serverActions.js
8438
- var Qa = "wuiConfirm", $a = Object.freeze(["danger"]), eo = Object.freeze([
8605
+ var eo = "wuiConfirm", to = Object.freeze(["danger"]), no = Object.freeze([
8439
8606
  "success",
8440
8607
  "info",
8441
8608
  "warning",
8442
8609
  "danger"
8443
- ]), to = "wui.flash", no = Object.freeze({
8610
+ ]), ro = "wui.flash", io = Object.freeze({
8444
8611
  confirmTitle: "Are you sure?",
8445
8612
  confirmLabel: "Confirm",
8446
8613
  cancelLabel: "Cancel",
8447
8614
  failed: "That did not work. Try again.",
8448
8615
  forbidden: "You do not have permission to do that.",
8449
8616
  network: "Could not reach the server. Check your connection and try again."
8450
- }), ro = /* @__PURE__ */ new WeakSet(), io = null, ao = null, oo = !1, so = (e) => {
8617
+ }), ao = /* @__PURE__ */ new WeakSet(), oo = null, so = null, co = !1, lo = (e) => {
8451
8618
  let t = document.createElement("span");
8452
8619
  return t.textContent = e ?? "", t.innerHTML;
8453
- }, co = (e, t) => {
8620
+ }, uo = (e, t) => {
8454
8621
  e && window.WUI?.toast?.(e, { variant: t });
8455
- }, lo = () => {
8622
+ }, fo = () => {
8456
8623
  let e = window.bootstrap?.Modal;
8457
8624
  if (!e) throw Error("data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.");
8458
8625
  return e;
8459
8626
  };
8460
- function uo() {
8461
- let e = document.getElementById(Qa);
8462
- return e || (e = document.createElement("div"), e.id = Qa, e.className = "modal fade wui-modal-shell", e.tabIndex = -1, e.setAttribute("aria-hidden", "true"), e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.style.setProperty("--wui-modal-max-width", `${pe.md}px`), e.innerHTML = `<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1"></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${so(no.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`, document.body.appendChild(e), e);
8627
+ function po() {
8628
+ let e = document.getElementById(eo);
8629
+ return e || (e = document.createElement("div"), e.id = eo, e.className = "modal fade wui-modal-shell", e.tabIndex = -1, e.setAttribute("aria-hidden", "true"), e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.style.setProperty("--wui-modal-max-width", `${pe.md}px`), e.innerHTML = `<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1"></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${lo(io.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`, document.body.appendChild(e), e);
8463
8630
  }
8464
- function fo(e, t) {
8631
+ function mo(e, t) {
8465
8632
  let n = e.getAttribute("data-wui-confirm-tone");
8466
- if (n !== null && !$a.includes(n)) throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);
8467
- let r = lo(), i = uo(), a = i.querySelector(".wui-confirm-title"), o = i.querySelector("[data-app-confirm]");
8468
- if (!a || !o) throw Error(`#${Qa} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Qa}"> without confirm-href, or leave the dialog to the library.`);
8633
+ if (n !== null && !to.includes(n)) throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);
8634
+ let r = fo(), i = po(), a = i.querySelector(".wui-confirm-title"), o = i.querySelector("[data-app-confirm]");
8635
+ if (!a || !o) throw Error(`#${eo} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${eo}"> without confirm-href, or leave the dialog to the library.`);
8469
8636
  let s = i.querySelector(".wui-confirm-msg");
8470
8637
  s || (s = document.createElement("p"), s.className = "wui-confirm-msg", a.after(s));
8471
8638
  let c = n === "danger";
8472
- a.textContent = e.getAttribute("data-wui-confirm-title") || no.confirmTitle, s.textContent = e.getAttribute("data-wui-confirm"), o.textContent = e.getAttribute("data-wui-confirm-label") || no.confirmLabel, o.classList.toggle("btn-danger", c), o.classList.toggle("btn-primary", !c), i.querySelector("wui-status-icon")?.setAttribute("tone", c ? "delete" : "info"), i.setAttribute("aria-label", a.textContent), ao = t, oo = !1, r.getOrCreateInstance(i).show();
8639
+ a.textContent = e.getAttribute("data-wui-confirm-title") || io.confirmTitle, s.textContent = e.getAttribute("data-wui-confirm"), o.textContent = e.getAttribute("data-wui-confirm-label") || io.confirmLabel, o.classList.toggle("btn-danger", c), o.classList.toggle("btn-primary", !c), i.querySelector("wui-status-icon")?.setAttribute("tone", c ? "delete" : "info"), i.setAttribute("aria-label", a.textContent), so = t, co = !1, r.getOrCreateInstance(i).show();
8473
8640
  }
8474
- var po = (e, t) => {
8475
- io = e;
8641
+ var ho = (e, t) => {
8642
+ oo = e;
8476
8643
  try {
8477
8644
  t();
8478
8645
  } finally {
8479
- io = null;
8646
+ oo = null;
8480
8647
  }
8481
- }, mo = (e) => e.disabled === !0 || e.getAttribute("aria-disabled") === "true";
8482
- function ho(e) {
8648
+ }, go = (e) => e.disabled === !0 || e.getAttribute("aria-disabled") === "true";
8649
+ function _o(e) {
8483
8650
  let t = e.target.closest?.("[data-wui-confirm]:not(form)");
8484
- !t || t === io || mo(t) || (e.preventDefault(), e.stopImmediatePropagation(), fo(t, () => po(t, () => t.click())));
8651
+ !t || t === oo || go(t) || (e.preventDefault(), e.stopImmediatePropagation(), mo(t, () => ho(t, () => t.click())));
8485
8652
  }
8486
- function go(e) {
8653
+ function vo(e) {
8487
8654
  let t = e.target;
8488
- if (!(t instanceof HTMLFormElement) || !t.hasAttribute("data-wui-confirm") || t === io || e.submitter && e.submitter === io) return;
8655
+ if (!(t instanceof HTMLFormElement) || !t.hasAttribute("data-wui-confirm") || t === oo || e.submitter && e.submitter === oo) return;
8489
8656
  e.preventDefault(), e.stopImmediatePropagation();
8490
8657
  let n = e.submitter?.form === t ? e.submitter : void 0;
8491
- fo(t, () => po(t, () => t.requestSubmit(n)));
8658
+ mo(t, () => ho(t, () => t.requestSubmit(n)));
8492
8659
  }
8493
- function _o(e) {
8494
- let t = e.target.closest?.(`#${Qa} [data-app-confirm]`);
8495
- !t || t.disabled || !ao || (oo = !0, lo().getOrCreateInstance(t.closest(`#${Qa}`)).hide());
8660
+ function yo(e) {
8661
+ let t = e.target.closest?.(`#${eo} [data-app-confirm]`);
8662
+ !t || t.disabled || !so || (co = !0, fo().getOrCreateInstance(t.closest(`#${eo}`)).hide());
8496
8663
  }
8497
- function vo(e) {
8664
+ function bo(e) {
8498
8665
  if (e.target.id !== "wuiConfirm") return;
8499
- let t = oo ? ao : null;
8500
- ao = null, oo = !1, t?.();
8666
+ let t = co ? so : null;
8667
+ so = null, co = !1, t?.();
8501
8668
  }
8502
- var yo = (e, t) => {
8503
- e && window.sessionStorage.setItem(to, JSON.stringify({
8669
+ var xo = (e, t) => {
8670
+ e && window.sessionStorage.setItem(ro, JSON.stringify({
8504
8671
  message: e,
8505
8672
  variant: t
8506
8673
  }));
8507
- }, bo = (e) => e === "forbidden" ? no.forbidden : e === "network" ? no.network : no.failed;
8508
- function xo() {
8509
- for (let e of document.querySelectorAll("[data-wui-server]")) e.dataset.refreshOnSuccess !== "false" && Xa(e)?.reload();
8674
+ }, So = (e) => e === "forbidden" ? io.forbidden : e === "network" ? io.network : io.failed;
8675
+ function Co() {
8676
+ for (let e of document.querySelectorAll("[data-wui-server]")) e.dataset.refreshOnSuccess !== "false" && Qa(e)?.reload();
8510
8677
  }
8511
- async function So(e) {
8678
+ async function wo(e) {
8512
8679
  let t = e.getAttribute("data-wui-post");
8513
8680
  if (!t) throw Error("A data-wui-post button needs the URL the action posts to.");
8514
8681
  let n = e.getAttribute("data-wui-post-reload");
@@ -8518,68 +8685,68 @@ async function So(e) {
8518
8685
  if (r.kind === "session" || r.kind === "aborted") return;
8519
8686
  let i = r.toastVariant || "success";
8520
8687
  if (r.ok && (r.redirect || n === "page")) {
8521
- yo(r.message, i), r.redirect ? window.location.assign(r.redirect) : window.location.reload();
8688
+ xo(r.message, i), r.redirect ? window.location.assign(r.redirect) : window.location.reload();
8522
8689
  return;
8523
8690
  }
8524
8691
  if (e.disabled = !1, e.removeAttribute("aria-busy"), r.ok) {
8525
- co(r.message, i), xo();
8692
+ uo(r.message, i), Co();
8526
8693
  return;
8527
8694
  }
8528
- co(r.message || bo(r.kind), "danger");
8695
+ uo(r.message || So(r.kind), "danger");
8529
8696
  }
8530
- function Co(e) {
8697
+ function To(e) {
8531
8698
  let t = e.target.closest?.("[data-wui-post]");
8532
- t && (e.preventDefault(), !(mo(t) || t.getAttribute("aria-busy") === "true") && So(t).catch((e) => console.error(e)));
8699
+ t && (e.preventDefault(), !(go(t) || t.getAttribute("aria-busy") === "true") && wo(t).catch((e) => console.error(e)));
8533
8700
  }
8534
- function wo() {
8535
- let e = window.sessionStorage.getItem(to);
8701
+ function Eo() {
8702
+ let e = window.sessionStorage.getItem(ro);
8536
8703
  if (!e) return;
8537
- window.sessionStorage.removeItem(to);
8704
+ window.sessionStorage.removeItem(ro);
8538
8705
  let { message: t, variant: n } = JSON.parse(e);
8539
- co(t, n);
8706
+ uo(t, n);
8540
8707
  }
8541
- function To(e) {
8708
+ function Do(e) {
8542
8709
  let t = e.querySelectorAll ? [...e.querySelectorAll("[data-wui-flash]")] : [];
8543
8710
  e instanceof Element && e.matches("[data-wui-flash]") && t.unshift(e);
8544
8711
  for (let e of t) {
8545
8712
  let t = e.getAttribute("data-wui-flash-variant") || "success";
8546
- if (!eo.includes(t)) throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${eo.join(", ")}.`);
8713
+ if (!no.includes(t)) throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${no.join(", ")}.`);
8547
8714
  let n = e.getAttribute("data-wui-flash") || e.textContent.trim();
8548
- e.remove(), co(n, t);
8715
+ e.remove(), uo(n, t);
8549
8716
  }
8550
8717
  }
8551
- function Eo(e = document) {
8718
+ function Oo(e = document) {
8552
8719
  let t = e.ownerDocument || e;
8553
- ro.has(t) || (ro.add(t), t.addEventListener("click", ho, !0), t.addEventListener("submit", go, !0), t.addEventListener("click", _o), t.addEventListener("click", Co), t.addEventListener("hidden.bs.modal", vo), wo()), To(e);
8720
+ ao.has(t) || (ao.add(t), t.addEventListener("click", _o, !0), t.addEventListener("submit", vo, !0), t.addEventListener("click", yo), t.addEventListener("click", To), t.addEventListener("hidden.bs.modal", bo), Eo()), Do(e);
8554
8721
  }
8555
- var Do = 31536e3, Oo = /* @__PURE__ */ new WeakMap(), ko = (e) => e > 99 ? "99+" : String(e);
8556
- function Ao(e, t, n = document) {
8557
- n.cookie = `${e}=${t ? "1" : "0"}; Path=/; Max-Age=${Do}; SameSite=Lax`;
8722
+ var ko = 31536e3, Ao = /* @__PURE__ */ new WeakMap(), jo = (e) => e > 99 ? "99+" : String(e);
8723
+ function Mo(e, t, n = document) {
8724
+ n.cookie = `${e}=${t ? "1" : "0"}; Path=/; Max-Age=${ko}; SameSite=Lax`;
8558
8725
  }
8559
- var jo = (e) => {
8726
+ var No = (e) => {
8560
8727
  let t = document.createElement("template");
8561
8728
  return t.innerHTML = e, t.content;
8562
- }, Mo = (e, t) => {
8729
+ }, Po = (e, t) => {
8563
8730
  let n = document.createElement("div");
8564
8731
  return n.className = e, n.textContent = t, n;
8565
8732
  };
8566
- function No(e, t) {
8733
+ function Fo(e, t) {
8567
8734
  let n = e.querySelector(".wui-bell-trigger"), r = e.querySelector(".wui-bell-count"), i = e.querySelector("[data-wui-bell-live]"), a = e.querySelector("[data-wui-bell-list]"), o = e.querySelector(".wui-bell-menu"), { src: s, readAction: c } = e.dataset, l = e.dataset.label || "Notifications", u = e.dataset.emptyText || "You are all caught up.", d = Number(e.dataset.pollSeconds ?? 60), f = ue(), p = Number(e.dataset.unread) || 0, m = (t, a = !0) => {
8568
8735
  let o = Math.max(0, Number(t) || 0), s = o !== p;
8569
- p = o, e.dataset.unread = String(o), r && (r.textContent = ko(o), r.hidden = o === 0), n?.setAttribute("aria-label", o === 0 ? l : `${l}, ${ko(o)} unread`), a && s && i && (i.textContent = o === 0 ? "No unread notifications" : `${ko(o)} unread notifications`);
8736
+ p = o, e.dataset.unread = String(o), r && (r.textContent = jo(o), r.hidden = o === 0), n?.setAttribute("aria-label", o === 0 ? l : `${l}, ${jo(o)} unread`), a && s && i && (i.textContent = o === 0 ? "No unread notifications" : `${jo(o)} unread notifications`);
8570
8737
  }, h = () => o?.classList.contains("show") ?? !1, g = () => {
8571
- let e = Mo("wui-bell-state", "Could not load notifications. "), t = document.createElement("button");
8738
+ let e = Po("wui-bell-state", "Could not load notifications. "), t = document.createElement("button");
8572
8739
  t.type = "button", t.className = "btn btn-link btn-sm", t.dataset.wuiBellRetry = "", t.textContent = "Retry", e.append(t), a.replaceChildren(e);
8573
8740
  }, _ = async (t) => {
8574
- t && (a.setAttribute("aria-busy", "true"), a.querySelector(".wui-bell-item") || a.replaceChildren(Mo("wui-bell-state", "Loading…")));
8741
+ t && (a.setAttribute("aria-busy", "true"), a.querySelector(".wui-bell-item") || a.replaceChildren(Po("wui-bell-state", "Loading…")));
8575
8742
  let n = await f.run(s);
8576
8743
  if (n.kind === "aborted" || n.kind === "stale" || n.kind === "session") return;
8577
8744
  if (a.removeAttribute("aria-busy"), !n.ok) {
8578
8745
  t && g();
8579
8746
  return;
8580
8747
  }
8581
- let r = jo(n.html), i = r.querySelector("[data-wui-unread]"), o = i ? Number(i.getAttribute("data-wui-unread")) : p;
8582
- m(o), (t || h()) && (r.querySelector(".wui-bell-item") ? a.replaceChildren(r) : a.replaceChildren(Mo("wui-bell-state", u))), e.dispatchEvent(new CustomEvent("wui:notifications:loaded", {
8748
+ let r = No(n.html), i = r.querySelector("[data-wui-unread]"), o = i ? Number(i.getAttribute("data-wui-unread")) : p;
8749
+ m(o), (t || h()) && (r.querySelector(".wui-bell-item") ? a.replaceChildren(r) : a.replaceChildren(Po("wui-bell-state", u))), e.dispatchEvent(new CustomEvent("wui:notifications:loaded", {
8583
8750
  bubbles: !0,
8584
8751
  detail: { unread: o }
8585
8752
  }));
@@ -8609,8 +8776,8 @@ function No(e, t) {
8609
8776
  refresh: () => _(h())
8610
8777
  };
8611
8778
  }
8612
- var Po = (e) => !!e && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), Fo = (e, t, n) => `${e}${e.includes("?") ? "&" : "?"}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;
8613
- function Io(e, t) {
8779
+ var Io = (e) => !!e && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), Lo = (e, t, n) => `${e}${e.includes("?") ? "&" : "?"}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;
8780
+ function Ro(e, t) {
8614
8781
  let n = e.querySelector("input.search-input"), r = e.querySelector(".wui-topsearch-results"), i = e.querySelector(".wui-topsearch-open"), a = e.querySelector("[data-wui-topsearch-live]"), { src: o, param: s = "q", resultsHref: c } = e.dataset, l = Number(e.dataset.minChars ?? 2), u = Number(e.dataset.debounceMs ?? 250), d = ue(), f = null, p = -1, m = () => [...r.querySelectorAll(".wui-topsearch-hit")], h = (e) => {
8615
8782
  let t = m();
8616
8783
  p = t.length === 0 ? -1 : (e + t.length) % t.length, t.forEach((e, t) => {
@@ -8632,16 +8799,16 @@ function Io(e, t) {
8632
8799
  e.dispatchEvent(n) && window.location.assign(t);
8633
8800
  }, b = async (t) => {
8634
8801
  e.classList.add("is-loading");
8635
- let n = await d.run(Fo(o, s, t));
8802
+ let n = await d.run(Lo(o, s, t));
8636
8803
  if (!(n.kind === "aborted" || n.kind === "stale" || n.kind === "session")) {
8637
8804
  if (e.classList.remove("is-loading"), n.ok) {
8638
- let e = jo(n.html), t = e.querySelector("[data-wui-count]");
8805
+ let e = No(n.html), t = e.querySelector("[data-wui-count]");
8639
8806
  r.replaceChildren(e), m().forEach((e, t) => {
8640
8807
  e.id = `${r.id}-opt-${t}`;
8641
8808
  });
8642
8809
  let i = t ? Number(t.getAttribute("data-wui-count")) : m().length;
8643
8810
  a && (a.textContent = i === 0 ? "No results" : `${i} ${i === 1 ? "result" : "results"}`);
8644
- } else r.replaceChildren(Mo("wui-topsearch-empty", "Search is unavailable right now."));
8811
+ } else r.replaceChildren(Po("wui-topsearch-empty", "Search is unavailable right now."));
8645
8812
  p = -1, _();
8646
8813
  }
8647
8814
  };
@@ -8659,7 +8826,7 @@ function Io(e, t) {
8659
8826
  t.preventDefault(), h(p + (t.key === "ArrowDown" ? 1 : -1));
8660
8827
  } else if (t.key === "Enter") {
8661
8828
  let e = m();
8662
- !r.hidden && p >= 0 && e[p] ? (t.preventDefault(), y(e[p].getAttribute("href"))) : c && n.value.trim() !== "" && (t.preventDefault(), y(Fo(c, s, n.value.trim())));
8829
+ !r.hidden && p >= 0 && e[p] ? (t.preventDefault(), y(e[p].getAttribute("href"))) : c && n.value.trim() !== "" && (t.preventDefault(), y(Lo(c, s, n.value.trim())));
8663
8830
  } else t.key === "Escape" && (r.hidden ? e.classList.contains("is-open") && (t.preventDefault(), v(!1), i?.focus()) : (t.preventDefault(), g()));
8664
8831
  }), r.addEventListener("click", (e) => {
8665
8832
  let t = e.target.closest(".wui-topsearch-hit");
@@ -8669,7 +8836,7 @@ function Io(e, t) {
8669
8836
  v(t), t && n.focus();
8670
8837
  });
8671
8838
  let x = (e) => {
8672
- e.key !== "/" || e.ctrlKey || e.metaKey || e.altKey || Po(e.target) || (e.preventDefault(), v(!0), n.focus());
8839
+ e.key !== "/" || e.ctrlKey || e.metaKey || e.altKey || Io(e.target) || (e.preventDefault(), v(!0), n.focus());
8673
8840
  }, S = (t) => {
8674
8841
  e.contains(t.target) || (g(), e.classList.contains("is-open") && v(!1));
8675
8842
  };
@@ -8677,13 +8844,13 @@ function Io(e, t) {
8677
8844
  clearTimeout(f), d.abort(), document.removeEventListener("keydown", x), document.removeEventListener("pointerdown", S);
8678
8845
  });
8679
8846
  }
8680
- function Lo(e) {
8847
+ function zo(e) {
8681
8848
  let t = [], n = e.dataset.wuiCollapsedCookie;
8682
- n && e.addEventListener("wui:shell:collapse", (e) => Ao(n, !!e.detail?.collapsed)), e.addEventListener("click", (t) => {
8849
+ n && e.addEventListener("wui:shell:collapse", (e) => Mo(n, !!e.detail?.collapsed)), e.addEventListener("click", (t) => {
8683
8850
  t.target.closest("[data-wui-tabbar-more]") && e.querySelector("[data-app-shell-menu]")?.click();
8684
8851
  });
8685
- let r = e.querySelector("[data-wui-bell]"), i = r ? No(r, t) : null, a = e.querySelector("[data-wui-topsearch]");
8686
- a && Io(a, t);
8852
+ let r = e.querySelector("[data-wui-bell]"), i = r ? Fo(r, t) : null, a = e.querySelector("[data-wui-topsearch]");
8853
+ a && Ro(a, t);
8687
8854
  let o = {
8688
8855
  el: e,
8689
8856
  setUnread(e) {
@@ -8703,109 +8870,109 @@ function Lo(e) {
8703
8870
  n ? n.click() : e.classList.toggle("collapsed", !!t);
8704
8871
  }
8705
8872
  };
8706
- Oo.set(e, o);
8873
+ Ao.set(e, o);
8707
8874
  let s = (n) => {
8708
8875
  if (n.target === e || n.target.contains?.(e)) {
8709
8876
  for (let e of t) e();
8710
- Oo.delete(e), delete e.dataset.wuiPartsWired, document.removeEventListener("wui:teardown", s);
8877
+ Ao.delete(e), delete e.dataset.wuiPartsWired, document.removeEventListener("wui:teardown", s);
8711
8878
  }
8712
8879
  };
8713
8880
  return document.addEventListener("wui:teardown", s), o;
8714
8881
  }
8715
- function Ro(e = document) {
8882
+ function Bo(e = document) {
8716
8883
  let t = [];
8717
8884
  e instanceof Element && e.matches("[data-app-shell]") && t.push(e), t.push(...e.querySelectorAll("[data-app-shell]"));
8718
- for (let e of t) e.dataset.wuiPartsWired || (e.dataset.wuiPartsWired = "1", Lo(e));
8885
+ for (let e of t) e.dataset.wuiPartsWired || (e.dataset.wuiPartsWired = "1", zo(e));
8719
8886
  }
8720
- function zo(e) {
8887
+ function Vo(e) {
8721
8888
  let t = e?.closest?.("[data-app-shell]") ?? null;
8722
- return t ? (Oo.has(t) || Ro(t), Oo.get(t) ?? null) : null;
8889
+ return t ? (Ao.has(t) || Bo(t), Ao.get(t) ?? null) : null;
8723
8890
  }
8724
8891
  //#endregion
8725
8892
  //#region src/themeTransition.js
8726
- var Bo = [
8893
+ var Ho = [
8727
8894
  "light",
8728
8895
  "dark",
8729
8896
  "auto"
8730
- ], Vo = [
8897
+ ], Uo = [
8731
8898
  "wave",
8732
8899
  "circle",
8733
8900
  "slide",
8734
8901
  "blinds",
8735
8902
  "fade",
8736
8903
  "none"
8737
- ], Ho = "wave", Uo = "theme", Wo = {
8904
+ ], Wo = "wave", Go = "theme", Ko = {
8738
8905
  wave: 1100,
8739
8906
  circle: 700,
8740
8907
  slide: 600,
8741
8908
  blinds: 900,
8742
8909
  fade: 350,
8743
8910
  none: 0
8744
- }, Go = "wui-theme-switching", Ko = "wui-theme-change", qo = "wui-theme-toggle", Jo = "(prefers-color-scheme: dark)", Yo = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Xo = (e) => Bo.includes(e);
8745
- function Zo(e) {
8746
- return e === "dark" || e === "auto" && Yo(Jo) ? "dark" : "light";
8911
+ }, qo = "wui-theme-switching", Jo = "wui:theme:change", Yo = "wui-theme-toggle", Xo = "(prefers-color-scheme: dark)", Zo = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Qo = (e) => Ho.includes(e);
8912
+ function $o(e) {
8913
+ return e === "dark" || e === "auto" && Zo(Xo) ? "dark" : "light";
8747
8914
  }
8748
- function Qo(e = Uo, { includeAuto: t = !1 } = {}) {
8915
+ function es(e = Go, { includeAuto: t = !1 } = {}) {
8749
8916
  let n = null;
8750
8917
  try {
8751
8918
  n = window.localStorage.getItem(e);
8752
8919
  } catch {}
8753
- return !Xo(n) || n === "auto" && !t ? "light" : n;
8920
+ return !Qo(n) || n === "auto" && !t ? "light" : n;
8754
8921
  }
8755
- function $o(e, t = Uo) {
8922
+ function ts(e, t = Go) {
8756
8923
  try {
8757
8924
  window.localStorage.setItem(t, e);
8758
8925
  } catch {}
8759
8926
  }
8760
- function es(e) {
8927
+ function ns(e) {
8761
8928
  let t = document.documentElement;
8762
- t.setAttribute("data-theme", e), t.setAttribute("data-bs-theme", Zo(e)), document.dispatchEvent(new CustomEvent(Ko, { detail: { mode: e } }));
8929
+ t.setAttribute("data-theme", e), t.setAttribute("data-bs-theme", $o(e)), document.dispatchEvent(new CustomEvent(Jo, { detail: { mode: e } }));
8763
8930
  }
8764
- function ts(e, { includeAuto: t = !1 } = {}) {
8931
+ function rs(e, { includeAuto: t = !1 } = {}) {
8765
8932
  return e === "light" ? "dark" : e === "dark" && t ? "auto" : "light";
8766
8933
  }
8767
- function ns(e) {
8934
+ function is(e) {
8768
8935
  if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
8769
- let t = window.matchMedia(Jo), n = () => e(t.matches ? "dark" : "light");
8936
+ let t = window.matchMedia(Xo), n = () => e(t.matches ? "dark" : "light");
8770
8937
  return t.addEventListener("change", n), () => t.removeEventListener("change", n);
8771
8938
  }
8772
- var rs = 60, is = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, as = (e) => e.toFixed(1), os = (e, t) => `${as(e)}px ${as(t)}px`, ss = {
8939
+ var as = 60, os = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, ss = (e) => e.toFixed(1), cs = (e, t) => `${ss(e)}px ${ss(t)}px`, ls = {
8773
8940
  amplitude: 22,
8774
8941
  segments: 36,
8775
8942
  cycles: 1.5,
8776
8943
  ripples: 2
8777
- }, cs = 6, ls = (e, t, n, r, i) => {
8778
- let { amplitude: a, segments: o, cycles: s } = ss, c = n * (t + 2 * a), l = i ? t + a - c : c - a, u = i ? t + 2 * a : -2 * a, d = [os(0, u)];
8944
+ }, us = 6, ds = (e, t, n, r, i) => {
8945
+ let { amplitude: a, segments: o, cycles: s } = ls, c = n * (t + 2 * a), l = i ? t + a - c : c - a, u = i ? t + 2 * a : -2 * a, d = [cs(0, u)];
8779
8946
  for (let t = 0; t <= o; t++) {
8780
8947
  let n = e * t / o, i = l + a * Math.sin(2 * Math.PI * s * t / o + r);
8781
- d.push(os(n, i));
8948
+ d.push(cs(n, i));
8782
8949
  }
8783
- return d.push(os(e, u)), `polygon(${d.join(", ")})`;
8784
- }, us = (e, t, n, r) => {
8785
- let i = t / cs, a = [];
8786
- for (let t = 0; t < cs; t++) {
8950
+ return d.push(cs(e, u)), `polygon(${d.join(", ")})`;
8951
+ }, fs = (e, t, n, r) => {
8952
+ let i = t / us, a = [];
8953
+ for (let t = 0; t < us; t++) {
8787
8954
  let o = t * i, s = i * n, c = r ? o + i - s : o, l = r ? o + i : o + s;
8788
- a.push(os(0, c), os(e, c), os(e, l), os(0, l));
8955
+ a.push(cs(0, c), cs(e, c), cs(e, l), cs(0, l));
8789
8956
  }
8790
8957
  return `polygon(${a.join(", ")})`;
8791
8958
  };
8792
- function ds(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
8959
+ function ps(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
8793
8960
  let a = r === "dark", o = [];
8794
- for (let r = 0; r <= rs; r++) {
8795
- let s = r / rs, c = is(s);
8961
+ for (let r = 0; r <= as; r++) {
8962
+ let s = r / as, c = os(s);
8796
8963
  switch (e) {
8797
8964
  case "circle": {
8798
8965
  let e = i?.x ?? t / 2, r = i?.y ?? n / 2, a = Math.hypot(Math.max(e, t - e), Math.max(r, n - r));
8799
- o.push({ clipPath: `circle(${as(a * c)}px at ${as(e)}px ${as(r)}px)` });
8966
+ o.push({ clipPath: `circle(${ss(a * c)}px at ${ss(e)}px ${ss(r)}px)` });
8800
8967
  break;
8801
8968
  }
8802
8969
  case "slide": {
8803
8970
  let e = n * (1 - c);
8804
- o.push({ clipPath: a ? `inset(${as(e)}px 0px 0px 0px)` : `inset(0px 0px ${as(e)}px 0px)` });
8971
+ o.push({ clipPath: a ? `inset(${ss(e)}px 0px 0px 0px)` : `inset(0px 0px ${ss(e)}px 0px)` });
8805
8972
  break;
8806
8973
  }
8807
8974
  case "blinds":
8808
- o.push({ clipPath: us(t, n, c, a) });
8975
+ o.push({ clipPath: fs(t, n, c, a) });
8809
8976
  break;
8810
8977
  case "fade":
8811
8978
  o.push({
@@ -8814,20 +8981,20 @@ function ds(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
8814
8981
  });
8815
8982
  break;
8816
8983
  case "none": return [];
8817
- default: o.push({ clipPath: ls(t, n, c, s * ss.ripples * 2 * Math.PI, a) });
8984
+ default: o.push({ clipPath: ds(t, n, c, s * ls.ripples * 2 * Math.PI, a) });
8818
8985
  }
8819
8986
  }
8820
8987
  return o;
8821
8988
  }
8822
- function fs(e, { effect: t = Ho, to: n, origin: r, duration: i, live: a } = {}) {
8989
+ function ms(e, { effect: t = Wo, to: n, origin: r, duration: i, live: a } = {}) {
8823
8990
  let o = document.documentElement, s = n !== void 0 && o.getAttribute("data-bs-theme") === n;
8824
- if (t === "none" || s || Yo("(prefers-reduced-motion: reduce)") || typeof document.startViewTransition != "function" || typeof o.animate != "function") return e(), Promise.resolve(!1);
8825
- o.classList.add(Go);
8991
+ if (t === "none" || s || Zo("(prefers-reduced-motion: reduce)") || typeof document.startViewTransition != "function" || typeof o.animate != "function") return e(), Promise.resolve(!1);
8992
+ o.classList.add(qo);
8826
8993
  let c = a instanceof Element ? a : null;
8827
- c && (c.style.viewTransitionName = qo);
8828
- let l = document.startViewTransition(e), u = i ?? Wo[t] ?? Wo.wave;
8994
+ c && (c.style.viewTransitionName = Yo);
8995
+ let l = document.startViewTransition(e), u = i ?? Ko[t] ?? Ko.wave;
8829
8996
  return l.ready.then(() => {
8830
- let e = ds(t, {
8997
+ let e = ps(t, {
8831
8998
  width: window.innerWidth,
8832
8999
  height: window.innerHeight,
8833
9000
  to: n,
@@ -8839,16 +9006,16 @@ function fs(e, { effect: t = Ho, to: n, origin: r, duration: i, live: a } = {})
8839
9006
  fill: "both",
8840
9007
  pseudoElement: "::view-transition-new(root)"
8841
9008
  });
8842
- }).catch(() => {}), l.finished.catch(() => {}).then(() => (o.classList.remove(Go), c && (c.style.viewTransitionName = ""), !0));
9009
+ }).catch(() => {}), l.finished.catch(() => {}).then(() => (o.classList.remove(qo), c && (c.style.viewTransitionName = ""), !0));
8843
9010
  }
8844
9011
  //#endregion
8845
9012
  //#region src/index.js
8846
9013
  var $ = (e, t) => {
8847
9014
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
8848
9015
  };
8849
- function ps() {
8850
- $("wui-select", On), $("wui-country-select", Mn), $("wui-phone", Qr), $("wui-datepicker", zn), $("wui-date-range", Bn), $("wui-dock", Vn), $("wui-image-crop", hr), $("wui-kanban", Nt), $("wui-consent-banner", un), $("wui-slider", ei), $("wui-sortable", ui), $("wui-timepicker", bi), $("wui-tree", Oi), $("wui-autocomplete", Zt), $("wui-command-palette", nn), $("wui-context-menu", Tn), $("wui-multiselect", Sr), $("wui-taginput", pi), $("wui-otp", Pr), $("wui-status-icon", Lt), $("wui-wizard-step", Ni), $("wui-wizard", Ai);
9016
+ function hs() {
9017
+ $("wui-select", On), $("wui-country-select", Mn), $("wui-phone", Qr), $("wui-datepicker", zn), $("wui-date-range", Bn), $("wui-dock", Vn), $("wui-image-crop", hr), $("wui-kanban", Nt), $("wui-consent-banner", un), $("wui-slider", ei), $("wui-sortable", ui), $("wui-timepicker", Si), $("wui-tree", Ai), $("wui-autocomplete", Zt), $("wui-command-palette", nn), $("wui-context-menu", Tn), $("wui-multiselect", Sr), $("wui-taginput", pi), $("wui-otp", Pr), $("wui-status-icon", Lt), $("wui-wizard-step", Fi), $("wui-wizard", Mi);
8851
9018
  }
8852
- ps();
9019
+ hs();
8853
9020
  //#endregion
8854
- export { Qa as CONFIRM_DIALOG_ID, $a as CONFIRM_TONES, Pi as COPY_FEEDBACK_MS, ie as CSRF_META_NAME, n as CURRENCIES, a as DATE_PATTERNS, D as DEFAULT_CSRF_HEADER, Ii as DEFAULT_IMAGE_ACCEPT, Li as DEFAULT_MAX_SIZE_MB, Ea as DEFAULT_PASSWORD_RULES, Da as DEFAULT_REQUIREMENTS_TITLE, Ho as DEFAULT_THEME_EFFECT, Uo as DEFAULT_THEME_STORAGE_KEY, i as DURATION_UNITS, s as EMPTY_VALUE, to as FLASH_STORAGE_KEY, eo as FLASH_VARIANTS, t as FORMAT_STYLES, ae as HTTP_KINDS, o as IST_TIME_ZONE, lt as KANBAN_DRAG_THRESHOLD_PX, ct as KANBAN_LONG_PRESS_MS, st as KANBAN_PHONE_QUERY, ot as KANBAN_STORAGE_PREFIX, at as KANBAN_SUMMARY_FORMATS, M as KANBAN_TEXT, it as KANBAN_TONES, Xi as MASK_INPUT_TYPES, ia as MASK_NAMES, r as MONEY_UNITS, Ma as SELECT_ALL_LABEL, Q as SELECT_CELL_CLASS, Na as SELECT_ROW_LABEL, no as SERVER_ACTION_TEXT, It as STATUS_TONES, Ko as THEME_CHANGE_EVENT, Vo as THEME_EFFECTS, Wo as THEME_EFFECT_DURATION, qo as THEME_LIVE_NAME, Bo as THEME_MODES, Go as THEME_SWITCHING_CLASS, O as WUI_HEADERS, Zt as WuiAutocomplete, nn as WuiCommandPalette, un as WuiConsentBanner, Tn as WuiContextMenu, Mn as WuiCountrySelect, zn as WuiDatePicker, Bn as WuiDateRange, Vn as WuiDock, Nt as WuiKanban, Sr as WuiMultiSelect, Pr as WuiOtp, Qr as WuiPhone, On as WuiSelect, ei as WuiSlider, ui as WuiSortable, Lt as WuiStatusIcon, pi as WuiTagInput, bi as WuiTimePicker, Oi as WuiTree, Ai as WuiWizard, Ni as WuiWizardStep, Wi as acceptLabel, za as addRowSelectCells, Ba as addSelectColumn, es as applyTheme, va as attachInputMask, ka as buildPasswordRules, le as classifyStatus, Fi as copyTextToClipboard, ue as createRequestQueue, Fa as createSelectHeaderCell, Ia as createSelectRowCell, La as createSelectSpacerCell, ps as defineWeborityElements, Aa as evaluatePassword, w as formatCompact, S as formatCurrency, E as formatDate, te as formatDuration, da as formatMasked, x as formatNumber, ee as formatPercent, re as formatValue, Xa as getServerTable, zo as getShell, B as glyphSvg, Ta as initInputMasks, nt as initRemoteModals, Eo as initServerActions, Ya as initServerTables, Ro as initShellParts, Hi as isImageFile, Ui as isImageOnlyAccept, oa as isMaskPattern, P as kanbanCardLabel, Dt as kanbanStorageKey, At as kanbanSummaryFormat, rt as loadRemoteModal, ma as maskedPostValue, $t as matchSegments, Gi as matchesAccept, ts as nextTheme, ja as passwordSatisfies, ua as postedMasked, la as rawMasked, se as readCsrf, Ot as readKanbanCollapsed, Qo as readStoredTheme, ca as resolveMask, Zo as resolveTheme, $o as storeTheme, jt as sumKanbanValues, Va as syncSelectAll, ds as themeKeyframes, ne as toInstant, fs as transitionTheme, Ki as validateFile, ns as watchSystemTheme, kt as writeKanbanCollapsed, A as wuiFetch };
9021
+ export { eo as CONFIRM_DIALOG_ID, to as CONFIRM_TONES, Ii as COPY_FEEDBACK_MS, ie as CSRF_META_NAME, n as CURRENCIES, a as DATE_PATTERNS, D as DEFAULT_CSRF_HEADER, Ri as DEFAULT_IMAGE_ACCEPT, zi as DEFAULT_MAX_SIZE_MB, Oa as DEFAULT_PASSWORD_RULES, ka as DEFAULT_REQUIREMENTS_TITLE, Wo as DEFAULT_THEME_EFFECT, Go as DEFAULT_THEME_STORAGE_KEY, i as DURATION_UNITS, s as EMPTY_VALUE, ro as FLASH_STORAGE_KEY, no as FLASH_VARIANTS, t as FORMAT_STYLES, ae as HTTP_KINDS, o as IST_TIME_ZONE, lt as KANBAN_DRAG_THRESHOLD_PX, ct as KANBAN_LONG_PRESS_MS, st as KANBAN_PHONE_QUERY, ot as KANBAN_STORAGE_PREFIX, at as KANBAN_SUMMARY_FORMATS, M as KANBAN_TEXT, it as KANBAN_TONES, Qi as MASK_INPUT_TYPES, oa as MASK_NAMES, r as MONEY_UNITS, Pa as SELECT_ALL_LABEL, Q as SELECT_CELL_CLASS, Fa as SELECT_ROW_LABEL, io as SERVER_ACTION_TEXT, It as STATUS_TONES, Jo as THEME_CHANGE_EVENT, Uo as THEME_EFFECTS, Ko as THEME_EFFECT_DURATION, Yo as THEME_LIVE_NAME, Ho as THEME_MODES, qo as THEME_SWITCHING_CLASS, O as WUI_HEADERS, Zt as WuiAutocomplete, nn as WuiCommandPalette, un as WuiConsentBanner, Tn as WuiContextMenu, Mn as WuiCountrySelect, zn as WuiDatePicker, Bn as WuiDateRange, Vn as WuiDock, Nt as WuiKanban, Sr as WuiMultiSelect, Pr as WuiOtp, Qr as WuiPhone, On as WuiSelect, ei as WuiSlider, ui as WuiSortable, Lt as WuiStatusIcon, pi as WuiTagInput, Si as WuiTimePicker, Ai as WuiTree, Mi as WuiWizard, Fi as WuiWizardStep, Ki as acceptLabel, Va as addRowSelectCells, Ha as addSelectColumn, ns as applyTheme, ba as attachInputMask, ja as buildPasswordRules, le as classifyStatus, Li as copyTextToClipboard, ue as createRequestQueue, La as createSelectHeaderCell, Ra as createSelectRowCell, za as createSelectSpacerCell, hs as defineWeborityElements, Ma as evaluatePassword, w as formatCompact, S as formatCurrency, E as formatDate, te as formatDuration, pa as formatMasked, x as formatNumber, ee as formatPercent, re as formatValue, Qa as getServerTable, Vo as getShell, B as glyphSvg, Da as initInputMasks, nt as initRemoteModals, Oo as initServerActions, Za as initServerTables, Bo as initShellParts, Wi as isImageFile, Gi as isImageOnlyAccept, ca as isMaskPattern, P as kanbanCardLabel, Dt as kanbanStorageKey, At as kanbanSummaryFormat, rt as loadRemoteModal, ga as maskedPostValue, $t as matchSegments, qi as matchesAccept, rs as nextTheme, Na as passwordSatisfies, fa as postedMasked, da as rawMasked, se as readCsrf, Ot as readKanbanCollapsed, es as readStoredTheme, ua as resolveMask, $o as resolveTheme, ts as storeTheme, jt as sumKanbanValues, Ua as syncSelectAll, ps as themeKeyframes, ne as toInstant, ms as transitionTheme, Ji as validateFile, is as watchSystemTheme, kt as writeKanbanCollapsed, A as wuiFetch };