@webority/ui-elements 0.29.0 → 0.31.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.
@@ -51,22 +51,22 @@ function S(e, { unit: t = "rupees", decimals: n } = {}) {
51
51
  let r = b(e, t), i = _(p(n, 0)).format(Math.abs(r));
52
52
  return (Number(i.replace(/,/g, "")) === 0 ? "" : y(r)) + l + i;
53
53
  }
54
- var C = (e) => e > 0 && e < .1 ? Math.min(20, 1 - Math.floor(Math.log10(e))) : 2;
55
- function w(e, { currency: t, unit: n = "rupees" } = {}) {
54
+ var ee = (e) => e > 0 && e < .1 ? Math.min(20, 1 - Math.floor(Math.log10(e))) : 2;
55
+ function C(e, { currency: t, unit: n = "rupees" } = {}) {
56
56
  if (!v(e)) return "-";
57
57
  let r = t ? b(e, n) : e, i = t ? l : "", a = Math.abs(r), o = f.findIndex(([e]) => a >= e);
58
58
  if (o === -1) {
59
- let e = h(C(a)).format(a);
59
+ let e = h(ee(a)).format(a);
60
60
  if (e !== "1,000") return (e === "0" ? "" : y(r)) + i + e;
61
61
  o = f.length - 1;
62
62
  }
63
63
  let [s, c] = f[o], u = a / s, d = u >= 100 ? 0 : u >= 10 ? 1 : 2, p = Number(u.toFixed(d));
64
64
  return p >= 100 && o > 0 && (--o, [s, c] = f[o], u = a / s, d = u >= 100 ? 0 : u >= 10 ? 1 : 2, p = Number(u.toFixed(d))), `${y(r)}${i}${h(d).format(p)} ${c}`;
65
65
  }
66
- function ee(e, { decimals: t } = {}) {
66
+ function te(e, { decimals: t } = {}) {
67
67
  return v(e) ? `${x(e * 100, { decimals: p(t, 1) })}%` : "-";
68
68
  }
69
- function te(e, { unit: t = "s" } = {}) {
69
+ function ne(e, { unit: t = "s" } = {}) {
70
70
  if (!v(e)) return "-";
71
71
  let n = {
72
72
  ms: 1,
@@ -84,7 +84,7 @@ function te(e, { unit: t = "s" } = {}) {
84
84
  let l = Math.floor(c / 60);
85
85
  return `${i}${h(0).format(l)}h ${s(c % 60)}m`;
86
86
  }
87
- function ne(e) {
87
+ function re(e) {
88
88
  if (e instanceof Date) return e.getTime();
89
89
  if (v(e)) return e;
90
90
  if (typeof e != "string") return NaN;
@@ -99,7 +99,7 @@ function ne(e) {
99
99
  }
100
100
  return Date.parse(e);
101
101
  }
102
- function T(e) {
102
+ function w(e) {
103
103
  let t = new Date(e + u);
104
104
  return {
105
105
  year: t.getUTCFullYear(),
@@ -109,10 +109,10 @@ function T(e) {
109
109
  minute: t.getUTCMinutes()
110
110
  };
111
111
  }
112
- function E(e, { pattern: t = "day" } = {}) {
113
- let n = ne(e);
112
+ function T(e, { pattern: t = "day" } = {}) {
113
+ let n = re(e);
114
114
  if (!Number.isFinite(n)) return "-";
115
- let r = T(n), i = (e) => String(e).padStart(2, "0"), a = `${i(r.day)}-${d[r.month]}-${r.year}`, o = `${i(r.hour)}:${i(r.minute)}`;
115
+ let r = w(n), i = (e) => String(e).padStart(2, "0"), a = `${i(r.day)}-${d[r.month]}-${r.year}`, o = `${i(r.hour)}:${i(r.minute)}`;
116
116
  switch (t) {
117
117
  case "month": return `${d[r.month]}-${r.year}`;
118
118
  case "year": return String(r.year);
@@ -121,29 +121,29 @@ function E(e, { pattern: t = "day" } = {}) {
121
121
  default: return a;
122
122
  }
123
123
  }
124
- function re(e, t) {
124
+ function ie(e, t) {
125
125
  if (e == null || e === "") return "-";
126
126
  let n = t?.style;
127
- if (n === "date") return E(e, t);
127
+ if (n === "date") return T(e, t);
128
128
  if (typeof e != "number") return String(e);
129
129
  switch (n) {
130
130
  case "currency": return S(e, t);
131
- case "percent": return ee(e, t);
132
- case "compact": return w(e, t);
133
- case "duration": return te(e, t);
131
+ case "percent": return te(e, t);
132
+ case "compact": return C(e, t);
133
+ case "duration": return ne(e, t);
134
134
  default: return x(e, t);
135
135
  }
136
136
  }
137
137
  //#endregion
138
138
  //#region src/wuiHttp.js
139
- var ie = "wui-csrf", D = "RequestVerificationToken", O = Object.freeze({
139
+ var ae = "wui-csrf", E = "RequestVerificationToken", D = Object.freeze({
140
140
  fragment: "X-Wui-Fragment",
141
141
  message: "X-Wui-Message",
142
142
  redirect: "X-Wui-Redirect",
143
143
  result: "X-Wui-Result",
144
144
  keepOpen: "X-Wui-Keep-Open",
145
145
  toastVariant: "X-Wui-Toast-Variant"
146
- }), ae = Object.freeze([
146
+ }), oe = Object.freeze([
147
147
  "ok",
148
148
  "validation",
149
149
  "forbidden",
@@ -153,33 +153,33 @@ var ie = "wui-csrf", D = "RequestVerificationToken", O = Object.freeze({
153
153
  "aborted",
154
154
  "stale",
155
155
  "session"
156
- ]), oe = /* @__PURE__ */ new Set(["GET", "HEAD"]);
157
- function se(e = document) {
158
- let t = e.querySelector(`meta[name="${ie}"]`), n = t?.getAttribute("content");
156
+ ]), se = /* @__PURE__ */ new Set(["GET", "HEAD"]);
157
+ function ce(e = document) {
158
+ let t = e.querySelector(`meta[name="${ae}"]`), n = t?.getAttribute("content");
159
159
  return n ? {
160
160
  header: t.getAttribute("data-header") || "RequestVerificationToken",
161
161
  token: n
162
162
  } : null;
163
163
  }
164
- var ce = (e) => {
164
+ var le = (e) => {
165
165
  try {
166
166
  return new URL(e, window.location.href).origin === window.location.origin;
167
167
  } catch {
168
168
  return !1;
169
169
  }
170
170
  };
171
- function le(e) {
171
+ function ue(e) {
172
172
  return e >= 200 && e < 300 ? "ok" : e === 401 ? "session" : e === 403 ? "forbidden" : e === 422 ? "validation" : e >= 400 && e < 500 ? "client" : "server";
173
173
  }
174
- var k = (e) => e?.name === "AbortError";
175
- async function A(e, t = {}) {
174
+ var de = (e) => e?.name === "AbortError";
175
+ async function fe(e, t = {}) {
176
176
  let n = (t.method || "GET").toUpperCase(), r = t.navigate || ((e) => window.location.assign(e)), i = {
177
177
  Accept: "text/html",
178
178
  "X-Requested-With": "XMLHttpRequest",
179
179
  ...t.headers
180
180
  };
181
- if (!oe.has(n) && ce(e)) {
182
- let e = se();
181
+ if (!se.has(n) && le(e)) {
182
+ let e = ce();
183
183
  e && (i[e.header] = e.token);
184
184
  }
185
185
  let a = (e) => {
@@ -197,12 +197,12 @@ async function A(e, t = {}) {
197
197
  status: t?.status ?? 0,
198
198
  html: n,
199
199
  response: t,
200
- message: a(r(O.message)),
201
- redirect: r(O.redirect),
202
- result: r(O.result),
203
- keepOpen: r(O.keepOpen) === "1",
204
- toastVariant: r(O.toastVariant),
205
- fragment: r(O.fragment) === "1"
200
+ message: a(r(D.message)),
201
+ redirect: r(D.redirect),
202
+ result: r(D.result),
203
+ keepOpen: r(D.keepOpen) === "1",
204
+ toastVariant: r(D.toastVariant),
205
+ fragment: r(D.fragment) === "1"
206
206
  };
207
207
  }, s;
208
208
  try {
@@ -214,19 +214,19 @@ async function A(e, t = {}) {
214
214
  credentials: "same-origin"
215
215
  });
216
216
  } catch (e) {
217
- return o(k(e) || t.signal?.aborted ? "aborted" : "network");
217
+ return o(de(e) || t.signal?.aborted ? "aborted" : "network");
218
218
  }
219
- let c = le(s.status);
220
- if (c === "ok" && s.redirected && s.headers.get(O.fragment) !== "1" && (c = "session"), c === "session") return r(s.status === 401 ? s.headers.get("Location") || window.location.href : s.url), o(c, s);
219
+ let c = ue(s.status);
220
+ if (c === "ok" && s.redirected && s.headers.get(D.fragment) !== "1" && (c = "session"), c === "session") return r(s.status === 401 ? s.headers.get("Location") || window.location.href : s.url), o(c, s);
221
221
  let l = "";
222
222
  if (c === "ok" || c === "validation") try {
223
223
  l = await s.text();
224
224
  } catch (e) {
225
- return o(k(e) || t.signal?.aborted ? "aborted" : "network", s);
225
+ return o(de(e) || t.signal?.aborted ? "aborted" : "network", s);
226
226
  }
227
227
  return o(c, s, l);
228
228
  }
229
- function ue() {
229
+ function pe() {
230
230
  let e = null, t = 0;
231
231
  return {
232
232
  async run(n, r = {}) {
@@ -235,7 +235,7 @@ function ue() {
235
235
  e = i;
236
236
  let a = ++t, o = r.signal;
237
237
  o && (o.aborted ? i.abort() : o.addEventListener("abort", () => i.abort(), { once: !0 }));
238
- let s = await A(n, {
238
+ let s = await fe(n, {
239
239
  ...r,
240
240
  signal: i.signal
241
241
  });
@@ -252,12 +252,12 @@ function ue() {
252
252
  }
253
253
  //#endregion
254
254
  //#region src/remoteModal.js
255
- var de = "wui-remote-modal", fe = "wui-modal-fullscreen", pe = Object.freeze({
255
+ var O = "wui-remote-modal", me = "wui-modal-fullscreen", he = Object.freeze({
256
256
  sm: 380,
257
257
  md: 440,
258
258
  lg: 640,
259
259
  xl: 880
260
- }), j = Object.freeze({
260
+ }), k = Object.freeze({
261
261
  loading: "Loading",
262
262
  close: "Close",
263
263
  retry: "Try again",
@@ -268,38 +268,38 @@ var de = "wui-remote-modal", fe = "wui-modal-fullscreen", pe = Object.freeze({
268
268
  network: "Could not reach the server. Check your connection and try again.",
269
269
  submitFailed: "Your changes were not saved.",
270
270
  invalid: "Some fields need attention."
271
- }), me = "a[href],button:not([disabled]),input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", he = "[aria-invalid=\"true\"], .is-invalid, .input-validation-error", ge = ".wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]", _e = "[data-wui-modal-content]", ve = "<button type=\"button\" class=\"wui-modal-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M18 6 6 18M6 6l12 12\"></path></svg></button>", ye = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakSet(), xe = () => Object.assign(/* @__PURE__ */ Error("The remote modal load was aborted."), { name: "AbortError" }), Se = (e) => {
271
+ }), ge = "a[href],button:not([disabled]),input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", _e = "[aria-invalid=\"true\"], .is-invalid, .input-validation-error", ve = ".wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]", A = "[data-wui-modal-content]", ye = "<button type=\"button\" class=\"wui-modal-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M18 6 6 18M6 6l12 12\"></path></svg></button>", be = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakSet(), Se = () => Object.assign(/* @__PURE__ */ Error("The remote modal load was aborted."), { name: "AbortError" }), Ce = (e) => {
272
272
  let t = window.bootstrap?.Modal;
273
273
  if (!t) throw Error(`WUI.modal.load(${String(e)}): Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);
274
274
  return t;
275
- }, Ce = (e) => {
275
+ }, we = (e) => {
276
276
  let t = document.createElement("span");
277
277
  return t.textContent = e ?? "", t.innerHTML;
278
278
  };
279
- function we(e) {
279
+ function Te(e) {
280
280
  if (e == null || e === "") return null;
281
281
  if (e === "fullscreen") return { fullscreen: !0 };
282
- if (Object.hasOwn(pe, e)) return { px: pe[e] };
282
+ if (Object.hasOwn(he, e)) return { px: he[e] };
283
283
  let t = typeof e == "number" ? e : /^\d+$/.test(String(e)) ? Number(e) : NaN;
284
284
  if (Number.isInteger(t) && t > 0) return { px: t };
285
285
  throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, fullscreen or a px number.`);
286
286
  }
287
- var Te = (e) => {
287
+ var Ee = (e) => {
288
288
  if (e.classList.contains("wui-modal-fullscreen")) return { fullscreen: !0 };
289
289
  let t = Number.parseInt(e.style.getPropertyValue("--wui-modal-max-width"), 10);
290
- return { px: t > 0 ? t : pe.md };
291
- }, Ee = (e, t) => {
292
- e.classList.toggle(fe, !!t.fullscreen), t.fullscreen ? e.style.removeProperty("--wui-modal-max-width") : e.style.setProperty("--wui-modal-max-width", `${t.px}px`);
293
- }, De = ["center", "top"];
294
- function Oe() {
295
- let e = document.getElementById(de);
296
- return e || (e = document.createElement("div"), e.id = de, 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\"></div></div>", document.body.appendChild(e), e);
297
- }
298
- var ke = (e) => `<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${Ce(e)}</div></div></div>${ve}</div>`, Ae = (e) => `<div class="modal-content wui-modal" aria-busy="true">${ke(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${Ce(j.loading)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`, je = (e, t) => `<div class="modal-content wui-modal" data-wui-modal-error="${Ce(t)}">${ke(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${Ce(j.errorTitle)}</p><p class="wui-modal-state-text">${Ce(j[t] || j.server)}</p><div class="wui-modal-state-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${Ce(j.close)}</button><button type="button" class="btn btn-primary" data-wui-modal-retry>${Ce(j.retry)}</button></div></div></div></div>`, Me = (e) => {
290
+ return { px: t > 0 ? t : he.md };
291
+ }, De = (e, t) => {
292
+ e.classList.toggle(me, !!t.fullscreen), t.fullscreen ? e.style.removeProperty("--wui-modal-max-width") : e.style.setProperty("--wui-modal-max-width", `${t.px}px`);
293
+ }, Oe = ["center", "top"];
294
+ function ke() {
295
+ let e = document.getElementById(O);
296
+ return e || (e = document.createElement("div"), e.id = O, 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", `${he.md}px`), e.innerHTML = "<div class=\"modal-dialog modal-dialog-centered wui-rb-dialog\"><div class=\"modal-content wui-modal\"></div></div>", document.body.appendChild(e), e);
297
+ }
298
+ var Ae = (e) => `<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${we(e)}</div></div></div>${ye}</div>`, je = (e) => `<div class="modal-content wui-modal" aria-busy="true">${Ae(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${we(k.loading)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`, Me = (e, t) => `<div class="modal-content wui-modal" data-wui-modal-error="${we(t)}">${Ae(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${we(k.errorTitle)}</p><p class="wui-modal-state-text">${we(k[t] || k.server)}</p><div class="wui-modal-state-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${we(k.close)}</button><button type="button" class="btn btn-primary" data-wui-modal-retry>${we(k.retry)}</button></div></div></div></div>`, Ne = (e) => {
299
299
  let t = document.createElement("template");
300
300
  return t.innerHTML = e, t.content.querySelector(".modal-content");
301
- }, Ne = (e) => e.shell.querySelector(".modal-content");
302
- function Pe(e) {
301
+ }, Pe = (e) => e.shell.querySelector(".modal-content");
302
+ function Fe(e) {
303
303
  if (!e) return;
304
304
  e.dispatchEvent(new CustomEvent("wui:teardown", { bubbles: !0 }));
305
305
  let t = window.bootstrap, n = [
@@ -309,51 +309,51 @@ function Pe(e) {
309
309
  ].filter((e) => e?.getInstance);
310
310
  for (let t of [e, ...e.querySelectorAll("*")]) for (let e of n) e.getInstance(t)?.dispose();
311
311
  }
312
- function Fe(e, t) {
313
- let n = Ne(e);
314
- Pe(n), n ? n.replaceWith(t) : e.shell.querySelector(".modal-dialog").appendChild(t), window.WUI?.refresh?.();
312
+ function Ie(e, t) {
313
+ let n = Pe(e);
314
+ Fe(n), n ? n.replaceWith(t) : e.shell.querySelector(".modal-dialog").appendChild(t), window.WUI?.refresh?.();
315
315
  }
316
- var Ie = (e) => e.shell.classList.contains("show");
317
- function Le(e, t) {
318
- let n = t && e.querySelector(he), r = n ? n.matches(me) ? n : n.querySelector(me) || n : null;
316
+ var Le = (e) => e.shell.classList.contains("show");
317
+ function Re(e, t) {
318
+ let n = t && e.querySelector(_e), r = n ? n.matches(ge) ? n : n.querySelector(ge) || n : null;
319
319
  if (!r) {
320
- let t = [...e.querySelectorAll(me)];
320
+ let t = [...e.querySelectorAll(ge)];
321
321
  r = e.querySelector("[data-autofocus]") || t.find((e) => !e.classList.contains("wui-modal-close")) || t[0] || e;
322
322
  }
323
323
  r.focus?.();
324
324
  }
325
- function Re(e, t) {
325
+ function ze(e, t) {
326
326
  let n = e.shell.querySelector("[data-wui-modal-live]");
327
327
  n || (n = document.createElement("div"), n.className = "visually-hidden", n.setAttribute("aria-live", "assertive"), n.setAttribute("data-wui-modal-live", ""), e.shell.querySelector(".modal-dialog").appendChild(n)), n.textContent = "", n.textContent = t;
328
328
  }
329
- var ze = (e, t, n) => e.dispatchEvent(new CustomEvent(t, {
329
+ var Be = (e, t, n) => e.dispatchEvent(new CustomEvent(t, {
330
330
  bubbles: !0,
331
331
  detail: n
332
332
  }));
333
- function Be(e) {
334
- let t = ye.get(e);
333
+ function Ve(e) {
334
+ let t = be.get(e);
335
335
  return t || (t = {
336
336
  shell: e,
337
- queue: ue(),
338
- defaultSize: Te(e),
337
+ queue: pe(),
338
+ defaultSize: Ee(e),
339
339
  defaultLabel: e.getAttribute("aria-label"),
340
- placeholder: Ne({ shell: e })?.outerHTML || "<div class=\"modal-content wui-modal\"></div>",
340
+ placeholder: Pe({ shell: e })?.outerHTML || "<div class=\"modal-content wui-modal\"></div>",
341
341
  remoteUrl: e.getAttribute("data-wui-remote-url"),
342
342
  cache: e.getAttribute("data-wui-remote-cache") === "true",
343
343
  loadedUrl: null,
344
344
  session: null
345
- }, ye.set(e, t), e.addEventListener("submit", (e) => $e(t, e)), e.addEventListener("click", (e) => {
346
- !e.target.closest?.("[data-wui-modal-retry]") || !t.session || (e.preventDefault(), Ke(t, t.session));
345
+ }, be.set(e, t), e.addEventListener("submit", (e) => et(t, e)), e.addEventListener("click", (e) => {
346
+ !e.target.closest?.("[data-wui-modal-retry]") || !t.session || (e.preventDefault(), qe(t, t.session));
347
347
  }), e.addEventListener("hidden.bs.modal", (n) => {
348
- n.target === e && Ue(t);
348
+ n.target === e && We(t);
349
349
  }), e.addEventListener("shown.bs.modal", (n) => {
350
- let r = Ne(t);
351
- n.target === e && t.session && r?.matches(_e) && !r.contains(document.activeElement) && Le(r, !1);
350
+ let r = Pe(t);
351
+ n.target === e && t.session && r?.matches(A) && !r.contains(document.activeElement) && Re(r, !1);
352
352
  }), t.remoteUrl && e.addEventListener("show.bs.modal", (n) => {
353
- n.target === e && We(t, n);
353
+ n.target === e && Ge(t, n);
354
354
  }), t);
355
355
  }
356
- function Ve(e, t, n) {
356
+ function He(e, t, n) {
357
357
  e.session && (e.queue.abort(), e.session.resolveClosed({
358
358
  status: "dismissed",
359
359
  detail: { replaced: !0 }
@@ -374,17 +374,17 @@ function Ve(e, t, n) {
374
374
  return a.handle = {
375
375
  el: e.shell,
376
376
  closed: i,
377
- close: () => He(e, a, "dismissed", null),
378
- reload: () => Ke(e, a)
377
+ close: () => Ue(e, a, "dismissed", null),
378
+ reload: () => qe(e, a)
379
379
  }, e.session = a, a;
380
380
  }
381
- function He(e, t, n, r) {
381
+ function Ue(e, t, n, r) {
382
382
  e.session === t && (t.closing = {
383
383
  status: n,
384
384
  detail: r
385
385
  }, window.bootstrap?.Modal?.getOrCreateInstance(e.shell).hide());
386
386
  }
387
- function Ue(e) {
387
+ function We(e) {
388
388
  let t = e.session;
389
389
  if (e.queue.abort(), e.session = null, t) {
390
390
  let { status: n, detail: r } = t.closing || {
@@ -394,28 +394,28 @@ function Ue(e) {
394
394
  t.resolveClosed({
395
395
  status: n,
396
396
  detail: r
397
- }), ze(e.shell, "wui:modal:closed", {
397
+ }), Be(e.shell, "wui:modal:closed", {
398
398
  status: n,
399
399
  url: t.url
400
400
  });
401
401
  let i = document.activeElement;
402
402
  t.trigger?.isConnected && (!i || i === document.body || e.shell.contains(i)) && t.trigger.focus?.();
403
403
  }
404
- e.cache || (Fe(e, Me(e.placeholder)), e.loadedUrl = null, Ee(e.shell, e.defaultSize), e.defaultLabel ? e.shell.setAttribute("aria-label", e.defaultLabel) : e.shell.removeAttribute("aria-label"));
404
+ e.cache || (Ie(e, Ne(e.placeholder)), e.loadedUrl = null, De(e.shell, e.defaultSize), e.defaultLabel ? e.shell.setAttribute("aria-label", e.defaultLabel) : e.shell.removeAttribute("aria-label"));
405
405
  }
406
- function We(e, t) {
407
- let n = t.relatedTarget instanceof Element ? t.relatedTarget : null, r = n?.getAttribute("data-wui-url") || e.remoteUrl, i = Ve(e, r, { trigger: n });
408
- i.explicitSize = Ge(n?.getAttribute("data-wui-size")), i.explicitSize && Ee(e.shell, i.explicitSize), !(e.cache && e.loadedUrl === r) && (e.loadedUrl && Fe(e, Me(e.placeholder)), Ke(e, i, { keepPlaceholder: !0 }));
406
+ function Ge(e, t) {
407
+ let n = t.relatedTarget instanceof Element ? t.relatedTarget : null, r = n?.getAttribute("data-wui-url") || e.remoteUrl, i = He(e, r, { trigger: n });
408
+ i.explicitSize = Ke(n?.getAttribute("data-wui-size")), i.explicitSize && De(e.shell, i.explicitSize), !(e.cache && e.loadedUrl === r) && (e.loadedUrl && Ie(e, Ne(e.placeholder)), qe(e, i, { keepPlaceholder: !0 }));
409
409
  }
410
- function Ge(e) {
410
+ function Ke(e) {
411
411
  try {
412
- return we(e);
412
+ return Te(e);
413
413
  } catch (e) {
414
414
  return console.error(e), null;
415
415
  }
416
416
  }
417
- async function Ke(e, t, { keepPlaceholder: n = !1 } = {}) {
418
- n || Fe(e, Me(Ae(t.options.title || qe(e))));
417
+ async function qe(e, t, { keepPlaceholder: n = !1 } = {}) {
418
+ n || Ie(e, Ne(je(t.options.title || Je(e))));
419
419
  let r = await e.queue.run(t.url, {
420
420
  method: t.method,
421
421
  body: t.body,
@@ -423,19 +423,19 @@ async function Ke(e, t, { keepPlaceholder: n = !1 } = {}) {
423
423
  });
424
424
  if (e.session !== t || r.kind === "aborted" || r.kind === "stale") return "aborted";
425
425
  if (r.kind === "session") return "session";
426
- if ((r.kind === "ok" || r.kind === "validation") && Je(e, t, r.html, !1)) return e.loadedUrl = t.url, ze(e.shell, "wui:modal:loaded", {
426
+ if ((r.kind === "ok" || r.kind === "validation") && Ye(e, t, r.html, !1)) return e.loadedUrl = t.url, Be(e.shell, "wui:modal:loaded", {
427
427
  url: t.url,
428
428
  handle: t.handle
429
429
  }), "loaded";
430
430
  let i = r.kind === "ok" || r.kind === "validation" ? "server" : r.kind;
431
- return Fe(e, Me(je(t.options.title || qe(e), i))), Ie(e) && Le(Ne(e), !1), ze(e.shell, "wui:modal:error", {
431
+ return Ie(e, Ne(Me(t.options.title || Je(e), i))), Le(e) && Re(Pe(e), !1), Be(e.shell, "wui:modal:error", {
432
432
  url: t.url,
433
433
  kind: i,
434
434
  status: r.status
435
435
  }), "error";
436
436
  }
437
- var qe = (e) => Ne(e)?.querySelector(".wui-modal-title")?.textContent || e.shell.getAttribute("aria-label") || "";
438
- function Je(e, t, n, r) {
437
+ var Je = (e) => Pe(e)?.querySelector(".wui-modal-title")?.textContent || e.shell.getAttribute("aria-label") || "";
438
+ function Ye(e, t, n, r) {
439
439
  let i = document.createElement("template");
440
440
  i.innerHTML = n;
441
441
  let a = i.content.querySelectorAll("script");
@@ -443,15 +443,15 @@ function Je(e, t, n, r) {
443
443
  console.warn(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);
444
444
  for (let e of a) e.remove();
445
445
  }
446
- let o = i.content.querySelector(_e);
446
+ let o = i.content.querySelector(A);
447
447
  if (!o) return console.error(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`), !1;
448
- Fe(e, o), Ee(e.shell, t.explicitSize || Ge(o.getAttribute("data-wui-size")) || e.defaultSize);
448
+ Ie(e, o), De(e.shell, t.explicitSize || Ke(o.getAttribute("data-wui-size")) || e.defaultSize);
449
449
  let s = o.getAttribute("data-wui-title");
450
- return s && e.shell.setAttribute("aria-label", s), Ie(e) && Le(o, r), !0;
450
+ return s && e.shell.setAttribute("aria-label", s), Le(e) && Re(o, r), !0;
451
451
  }
452
- var Ye = "button[type=\"submit\"], button:not([type]), input[type=\"submit\"], input[type=\"image\"]";
453
- function Xe(e, t, n) {
454
- let r = [...e.elements].filter((e) => e.matches(Ye));
452
+ var Xe = "button[type=\"submit\"], button:not([type]), input[type=\"submit\"], input[type=\"image\"]";
453
+ function Ze(e, t, n) {
454
+ let r = [...e.elements].filter((e) => e.matches(Xe));
455
455
  if (n) {
456
456
  e.setAttribute("data-wui-submitting", "");
457
457
  let n = t && r.includes(t) ? t : r[0];
@@ -462,45 +462,45 @@ function Xe(e, t, n) {
462
462
  e.removeAttribute("data-wui-submitting");
463
463
  for (let e of r) e.disabled = e.hasAttribute("data-wui-was-disabled"), e.removeAttribute("data-wui-was-disabled"), e.classList.remove("is-loading"), e.removeAttribute("aria-busy"), e.querySelector("[data-wui-submit-spinner]")?.remove();
464
464
  }
465
- function Ze(e, t, n) {
465
+ function Qe(e, t, n) {
466
466
  let r = t.closest(".wui-modal-body") || t;
467
467
  r.querySelector("[data-wui-modal-submit-error]")?.remove();
468
468
  let i = document.createElement("div");
469
- i.className = "alert alert-danger wui-modal-submit-error", i.setAttribute("role", "alert"), i.setAttribute("data-wui-modal-submit-error", ""), i.textContent = `${j.submitFailed} ${j[n] || j.server}`, r.prepend(i), Re(e, i.textContent);
469
+ i.className = "alert alert-danger wui-modal-submit-error", i.setAttribute("role", "alert"), i.setAttribute("data-wui-modal-submit-error", ""), i.textContent = `${k.submitFailed} ${k[n] || k.server}`, r.prepend(i), ze(e, i.textContent);
470
470
  }
471
- var Qe = (e, t) => {
471
+ var $e = (e, t) => {
472
472
  let n = new URL(e, window.location.href);
473
473
  for (let [e, r] of t) typeof r == "string" && n.searchParams.append(e, r);
474
474
  return n.origin === window.location.origin ? n.pathname + n.search : n.href;
475
475
  };
476
- async function $e(e, t) {
476
+ async function et(e, t) {
477
477
  let n = t.target, r = e.session;
478
- if (!(n instanceof HTMLFormElement) || !r || n.hasAttribute("data-wui-native") || !n.closest(_e) || (t.preventDefault(), n.hasAttribute("data-wui-submitting"))) return;
478
+ if (!(n instanceof HTMLFormElement) || !r || n.hasAttribute("data-wui-native") || !n.closest(A) || (t.preventDefault(), n.hasAttribute("data-wui-submitting"))) return;
479
479
  let i = t.submitter || null, a = i?.getAttribute("formaction") || n.getAttribute("action") || r.url, o = (i?.getAttribute("formmethod") || n.getAttribute("method") || "GET").toUpperCase(), s = new FormData(n);
480
480
  i?.name && !s.has(i.name) && s.append(i.name, i.value);
481
481
  let c = o === "GET";
482
- Xe(n, i, !0);
483
- let l = await e.queue.run(c ? Qe(a, s) : a, {
482
+ Ze(n, i, !0);
483
+ let l = await e.queue.run(c ? $e(a, s) : a, {
484
484
  method: o,
485
485
  body: c ? void 0 : s,
486
486
  navigate: r.options.navigate
487
487
  });
488
488
  if (e.session === r) {
489
- if (n.isConnected && Xe(n, i, !1), l.kind === "ok" && l.result === "success") {
490
- et(e, r, l);
489
+ if (n.isConnected && Ze(n, i, !1), l.kind === "ok" && l.result === "success") {
490
+ tt(e, r, l);
491
491
  return;
492
492
  }
493
493
  if (!(l.kind === "aborted" || l.kind === "stale" || l.kind === "session")) {
494
- if (l.kind === "validation" && Je(e, r, l.html, !0)) {
495
- let t = Ne(e).querySelector(ge)?.textContent.replace(/\s+/g, " ").trim();
496
- Re(e, t || j.invalid);
494
+ if (l.kind === "validation" && Ye(e, r, l.html, !0)) {
495
+ let t = Pe(e).querySelector(ve)?.textContent.replace(/\s+/g, " ").trim();
496
+ ze(e, t || k.invalid);
497
497
  return;
498
498
  }
499
- l.kind === "ok" && l.html && Je(e, r, l.html, !1) || Ze(e, n, l.kind === "ok" || l.kind === "validation" ? "server" : l.kind);
499
+ l.kind === "ok" && l.html && Ye(e, r, l.html, !1) || Qe(e, n, l.kind === "ok" || l.kind === "validation" ? "server" : l.kind);
500
500
  }
501
501
  }
502
502
  }
503
- function et(e, t, n) {
503
+ function tt(e, t, n) {
504
504
  let r = n.message, i = n.redirect || null, a = {
505
505
  url: t.url,
506
506
  trigger: t.trigger,
@@ -508,15 +508,15 @@ function et(e, t, n) {
508
508
  message: r,
509
509
  redirect: i
510
510
  };
511
- if (r && window.WUI?.toast?.(r, { variant: "success" }), ze(t.trigger?.isConnected ? t.trigger : document, "wui:modal:success", a), t.options.onSuccess?.(a, t.handle), i && (t.options.navigate || ((e) => window.location.assign(e)))(i), n.keepOpen) {
512
- n.html && Je(e, t, n.html, !1);
511
+ if (r && window.WUI?.toast?.(r, { variant: "success" }), Be(t.trigger?.isConnected ? t.trigger : document, "wui:modal:success", a), t.options.onSuccess?.(a, t.handle), i && (t.options.navigate || ((e) => window.location.assign(e)))(i), n.keepOpen) {
512
+ n.html && Ye(e, t, n.html, !1);
513
513
  return;
514
514
  }
515
- He(e, t, "success", a);
515
+ Ue(e, t, "success", a);
516
516
  }
517
- function tt(e) {
517
+ function nt(e) {
518
518
  let t = e.target.closest?.("[data-wui-modal]");
519
- t && (t.matches("a[href]") && (e.ctrlKey || e.metaKey || e.shiftKey || e.button !== 0) || (e.preventDefault(), rt(t.getAttribute("data-wui-modal"), {
519
+ t && (t.matches("a[href]") && (e.ctrlKey || e.metaKey || e.shiftKey || e.button !== 0) || (e.preventDefault(), it(t.getAttribute("data-wui-modal"), {
520
520
  size: t.getAttribute("data-wui-size") || void 0,
521
521
  title: t.getAttribute("data-wui-title") || void 0,
522
522
  trigger: t
@@ -524,34 +524,34 @@ function tt(e) {
524
524
  e?.name !== "AbortError" && console.error(e);
525
525
  })));
526
526
  }
527
- function nt(e = document) {
527
+ function rt(e = document) {
528
528
  let t = e.ownerDocument || e;
529
- be.has(t) || (be.add(t), t.addEventListener("click", tt));
529
+ xe.has(t) || (xe.add(t), t.addEventListener("click", nt));
530
530
  let n = [...e.querySelectorAll?.(".modal[data-wui-remote-url]") || []];
531
531
  e.matches?.(".modal[data-wui-remote-url]") && n.unshift(e);
532
- for (let e of n) Be(e);
532
+ for (let e of n) Ve(e);
533
533
  }
534
- function rt(e, t = {}) {
534
+ function it(e, t = {}) {
535
535
  try {
536
536
  if (!e) throw TypeError("WUI.modal.load: a fragment url is required.");
537
- let n = Se(e), r = we(t.size), i = t.placement || "center";
538
- if (!De.includes(i)) throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);
539
- if (t.signal?.aborted) return Promise.reject(xe());
540
- let a = Oe();
541
- nt(document);
542
- let o = Be(a), s = Ie(o), c = Ve(o, e, t);
543
- c.explicitSize = r, Ee(a, r || o.defaultSize), a.querySelector(".modal-dialog").classList.toggle("modal-dialog-centered", i === "center"), t.title && a.setAttribute("aria-label", t.title), s || (n.getInstance(a)?.dispose(), n.getOrCreateInstance(a, {
537
+ let n = Ce(e), r = Te(t.size), i = t.placement || "center";
538
+ if (!Oe.includes(i)) throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);
539
+ if (t.signal?.aborted) return Promise.reject(Se());
540
+ let a = ke();
541
+ rt(document);
542
+ let o = Ve(a), s = Le(o), c = He(o, e, t);
543
+ c.explicitSize = r, De(a, r || o.defaultSize), a.querySelector(".modal-dialog").classList.toggle("modal-dialog-centered", i === "center"), t.title && a.setAttribute("aria-label", t.title), s || (n.getInstance(a)?.dispose(), n.getOrCreateInstance(a, {
544
544
  backdrop: !t.staticBackdrop || "static",
545
545
  keyboard: !t.staticBackdrop
546
546
  }));
547
- let l = s ? Promise.resolve() : new Promise((e) => a.addEventListener("shown.bs.modal", () => e(), { once: !0 })), u = Ke(o, c);
547
+ let l = s ? Promise.resolve() : new Promise((e) => a.addEventListener("shown.bs.modal", () => e(), { once: !0 })), u = qe(o, c);
548
548
  s || n.getOrCreateInstance(a).show();
549
549
  let d = new Promise((e, n) => {
550
550
  t.signal?.addEventListener("abort", () => {
551
- o.session === c && (o.queue.abort(), He(o, c, "dismissed", { aborted: !0 })), n(xe());
551
+ o.session === c && (o.queue.abort(), Ue(o, c, "dismissed", { aborted: !0 })), n(Se());
552
552
  }, { once: !0 });
553
553
  }), f = Promise.all([l, u]).then(([, t]) => {
554
- if (t === "aborted") throw xe();
554
+ if (t === "aborted") throw Se();
555
555
  if (t === "session") throw Error(`WUI.modal.load(${e}): the session expired; the browser is signing in again.`);
556
556
  return c.handle;
557
557
  });
@@ -562,18 +562,18 @@ function rt(e, t = {}) {
562
562
  }
563
563
  //#endregion
564
564
  //#region src/kanban.js
565
- var it = Object.freeze([
565
+ var at = Object.freeze([
566
566
  "neutral",
567
567
  "primary",
568
568
  "info",
569
569
  "success",
570
570
  "warning",
571
571
  "danger"
572
- ]), at = Object.freeze([
572
+ ]), ot = Object.freeze([
573
573
  "number",
574
574
  "currency",
575
575
  "compact"
576
- ]), ot = "wui-kanban:", st = "(max-width: 767.98px)", ct = 400, lt = 6, M = Object.freeze({
576
+ ]), st = "wui-kanban:", ct = "(max-width: 767.98px)", lt = 400, ut = 6, j = Object.freeze({
577
577
  help: "Press Space to pick up the card. Use the Left and Right arrow keys to choose a column, then Space to drop it, or Escape to cancel.",
578
578
  empty: "Nothing here",
579
579
  collapse: (e) => `Collapse ${e}`,
@@ -597,16 +597,16 @@ var it = Object.freeze([
597
597
  server: "Something went wrong on our side, so the card went back. Try again in a moment.",
598
598
  network: "Could not reach the server, so the card went back. Check your connection and try again."
599
599
  })
600
- }), ut = "[data-wui-column]", dt = "[data-wui-body]", ft = "[data-wui-card]", pt = "[data-wui-count]", mt = "[data-wui-summary]", ht = "[data-wui-empty]", gt = "[data-wui-drop-note]", _t = "[data-wui-live]", vt = "[data-wui-help]", yt = "[data-wui-switch]", bt = "[data-wui-scroller]", xt = "[data-wui-collapse]", St = "input, select, textarea, [contenteditable=\"\"], [contenteditable=\"true\"], [data-wui-no-drag]", Ct = 48, wt = 16, N = (e) => e.getAttribute("data-wui-column"), Tt = (e) => e.getAttribute("data-wui-card"), Et = (e) => e.hidden || e.hasAttribute("hidden");
601
- function P(e) {
600
+ }), dt = "[data-wui-column]", ft = "[data-wui-body]", pt = "[data-wui-card]", mt = "[data-wui-count]", ht = "[data-wui-summary]", gt = "[data-wui-empty]", _t = "[data-wui-drop-note]", vt = "[data-wui-live]", yt = "[data-wui-help]", bt = "[data-wui-switch]", xt = "[data-wui-scroller]", St = "[data-wui-collapse]", Ct = "input, select, textarea, [contenteditable=\"\"], [contenteditable=\"true\"], [data-wui-no-drag]", wt = 48, Tt = 16, M = (e) => e.getAttribute("data-wui-column"), Et = (e) => e.getAttribute("data-wui-card"), Dt = (e) => e.hidden || e.hasAttribute("hidden");
601
+ function N(e) {
602
602
  let t = (e.getAttribute("aria-label") || e.textContent || "").replace(/\s+/g, " ").trim();
603
- return t.length > 80 ? `${t.slice(0, 79)}…` : t || Tt(e) || "Card";
603
+ return t.length > 80 ? `${t.slice(0, 79)}…` : t || Et(e) || "Card";
604
604
  }
605
- function Dt(e) {
606
- return e ? `${ot}${e}` : null;
605
+ function Ot(e) {
606
+ return e ? `${st}${e}` : null;
607
607
  }
608
- function Ot(e, t = globalThis.localStorage) {
609
- let n = Dt(e);
608
+ function kt(e, t = globalThis.localStorage) {
609
+ let n = Ot(e);
610
610
  if (!n || !t) return {};
611
611
  try {
612
612
  let e = JSON.parse(t.getItem(n) || "null");
@@ -615,19 +615,19 @@ function Ot(e, t = globalThis.localStorage) {
615
615
  return {};
616
616
  }
617
617
  }
618
- function kt(e, t, n, r = globalThis.localStorage) {
619
- let i = Dt(e);
618
+ function At(e, t, n, r = globalThis.localStorage) {
619
+ let i = Ot(e);
620
620
  if (!i || !r) return;
621
621
  let a = {
622
- ...Ot(e, r),
622
+ ...kt(e, r),
623
623
  [t]: !!n
624
624
  };
625
625
  try {
626
626
  r.setItem(i, JSON.stringify({ collapsed: a }));
627
627
  } catch {}
628
628
  }
629
- function At(e, t) {
630
- if (!at.includes(e)) throw TypeError(`Unsupported kanban summary format "${String(e)}". Use ${at.join(", ")}.`);
629
+ function jt(e, t) {
630
+ if (!ot.includes(e)) throw TypeError(`Unsupported kanban summary format "${String(e)}". Use ${ot.join(", ")}.`);
631
631
  if (t != null && t !== "" && !r.includes(t)) throw TypeError(`Unsupported kanban summary unit "${String(t)}". Use ${r.join(", ")}.`);
632
632
  return e === "currency" ? {
633
633
  style: "currency",
@@ -641,7 +641,7 @@ function At(e, t) {
641
641
  decimals: 0
642
642
  };
643
643
  }
644
- function jt(e) {
644
+ function Mt(e) {
645
645
  let t = 0;
646
646
  for (let n of e) {
647
647
  if (n == null || n === "") continue;
@@ -650,9 +650,9 @@ function jt(e) {
650
650
  }
651
651
  return t;
652
652
  }
653
- var Mt = (e, t) => {
653
+ var Nt = (e, t) => {
654
654
  e && window.WUI?.toast?.(e, { variant: t });
655
- }, Nt = class extends e {
655
+ }, Pt = class extends e {
656
656
  constructor() {
657
657
  super(), this._wired = !1, this._filter = null, this._press = null, this._drag = null, this._kbd = null, this._suppressClick = !1, this._observer = null, this._refreshQueued = !1, this._scrollTimer = 0, this._onPointerMove = (e) => this._pointerMove(e), this._onPointerUp = (e) => this._pointerUp(e), this._onPointerCancel = () => this._endPointer(!1), this._onDocKeyDown = (e) => {
658
658
  e.key === "Escape" && this._drag && (e.preventDefault(), this._endPointer(!1));
@@ -666,17 +666,17 @@ var Mt = (e, t) => {
666
666
  connectedCallback() {
667
667
  if (!this._wired) {
668
668
  this._wired = !0, this.addEventListener("pointerdown", (e) => this._pointerDown(e)), this.addEventListener("keydown", (e) => this._keyDown(e)), this.addEventListener("click", (e) => this._click(e), !0), this.addEventListener("dragstart", (e) => {
669
- e.target.closest?.(ft) && e.preventDefault();
669
+ e.target.closest?.(pt) && e.preventDefault();
670
670
  }), this.addEventListener("touchmove", (e) => {
671
671
  this._drag && e.preventDefault();
672
672
  }, { passive: !1 }), this._scroller()?.addEventListener("scroll", this._onScroll, { passive: !0 }), this._restoreCollapsed();
673
673
  for (let e of this._allCards()) this._prepareCard(e);
674
674
  if (typeof MutationObserver == "function") {
675
675
  this._observer = new MutationObserver((e) => {
676
- for (let t of e) for (let e of t.addedNodes) e.nodeType === 1 && e.matches(ft) && this._prepareCard(e);
676
+ for (let t of e) for (let e of t.addedNodes) e.nodeType === 1 && e.matches(pt) && this._prepareCard(e);
677
677
  this._queueRefresh();
678
678
  });
679
- for (let e of this.querySelectorAll(dt)) this._observer.observe(e, { childList: !0 });
679
+ for (let e of this.querySelectorAll(ft)) this._observer.observe(e, { childList: !0 });
680
680
  }
681
681
  this.refresh();
682
682
  }
@@ -695,13 +695,13 @@ var Mt = (e, t) => {
695
695
  let e = this._summaryFormat();
696
696
  for (let t of this._columns()) {
697
697
  let n = 0, r = [];
698
- for (let e of this._cardsIn(t)) this._filter && (e.hidden = this._filter(e) === !1), !Et(e) && (n++, r.push(e.getAttribute("data-wui-value")));
698
+ for (let e of this._cardsIn(t)) this._filter && (e.hidden = this._filter(e) === !1), !Dt(e) && (n++, r.push(e.getAttribute("data-wui-value")));
699
699
  let i = String(n);
700
700
  for (let e of this._countsOf(t)) e.textContent !== i && (e.textContent = i);
701
- let a = t.querySelector(ht);
701
+ let a = t.querySelector(gt);
702
702
  if (a && (a.hidden = n > 0), e) {
703
- let n = t.querySelector(mt);
704
- n && (n.textContent = re(jt(r), e));
703
+ let n = t.querySelector(ht);
704
+ n && (n.textContent = ie(Mt(r), e));
705
705
  }
706
706
  }
707
707
  }
@@ -712,43 +712,43 @@ var Mt = (e, t) => {
712
712
  return this._commit(r, t, n);
713
713
  }
714
714
  _columns() {
715
- return [...this.querySelectorAll(ut)];
715
+ return [...this.querySelectorAll(dt)];
716
716
  }
717
717
  _columnByKey(e) {
718
- return this._columns().find((t) => N(t) === e) || null;
718
+ return this._columns().find((t) => M(t) === e) || null;
719
719
  }
720
720
  _columnOf(e) {
721
- return e.closest(ut);
721
+ return e.closest(dt);
722
722
  }
723
723
  _titleOf(e) {
724
- return (e.querySelector(".wui-kanban-title")?.textContent || N(e) || "").replace(/\s+/g, " ").trim();
724
+ return (e.querySelector(".wui-kanban-title")?.textContent || M(e) || "").replace(/\s+/g, " ").trim();
725
725
  }
726
726
  _bodyOf(e) {
727
- return e.querySelector(dt);
727
+ return e.querySelector(ft);
728
728
  }
729
729
  _cardsIn(e) {
730
730
  let t = this._bodyOf(e);
731
- return t ? [...t.children].filter((e) => e.matches(ft)) : [];
731
+ return t ? [...t.children].filter((e) => e.matches(pt)) : [];
732
732
  }
733
733
  _visibleCardsIn(e) {
734
- return this._cardsIn(e).filter((e) => !Et(e));
734
+ return this._cardsIn(e).filter((e) => !Dt(e));
735
735
  }
736
736
  _allCards() {
737
- return [...this.querySelectorAll(`${dt} > ${ft}`)];
737
+ return [...this.querySelectorAll(`${ft} > ${pt}`)];
738
738
  }
739
739
  _cardByKey(e) {
740
- return this._allCards().find((t) => Tt(t) === e) || null;
740
+ return this._allCards().find((t) => Et(t) === e) || null;
741
741
  }
742
742
  _countsOf(e) {
743
- let t = N(e), n = [...this.querySelectorAll(yt)].filter((e) => e.getAttribute("data-wui-switch") === t);
744
- return [...e.querySelectorAll(pt), ...n.flatMap((e) => [...e.querySelectorAll(pt)])];
743
+ let t = M(e), n = [...this.querySelectorAll(bt)].filter((e) => e.getAttribute("data-wui-switch") === t);
744
+ return [...e.querySelectorAll(mt), ...n.flatMap((e) => [...e.querySelectorAll(mt)])];
745
745
  }
746
746
  _scroller() {
747
- return this.querySelector(bt);
747
+ return this.querySelector(xt);
748
748
  }
749
749
  _summaryFormat() {
750
750
  let e = this.getAttribute("summary-format");
751
- return e ? At(e, this.getAttribute("summary-unit")) : null;
751
+ return e ? jt(e, this.getAttribute("summary-unit")) : null;
752
752
  }
753
753
  _queueRefresh() {
754
754
  this._refreshQueued || (this._refreshQueued = !0, queueMicrotask(() => {
@@ -756,11 +756,11 @@ var Mt = (e, t) => {
756
756
  }));
757
757
  }
758
758
  _prepareCard(e) {
759
- let t = this.querySelector(vt);
759
+ let t = this.querySelector(yt);
760
760
  t?.id && !e.hasAttribute("aria-describedby") && e.setAttribute("aria-describedby", t.id), e.hasAttribute("tabindex") || (e.tabIndex = 0);
761
761
  }
762
762
  _announce(e) {
763
- let t = this.querySelector(_t);
763
+ let t = this.querySelector(vt);
764
764
  !t || !e || (t.textContent = "", t.textContent = e);
765
765
  }
766
766
  _fire(e, t, n = !1) {
@@ -771,8 +771,8 @@ var Mt = (e, t) => {
771
771
  }));
772
772
  }
773
773
  _canLift(e) {
774
- let t = P(e);
775
- return this.hasAttribute("readonly") || e.hasAttribute("data-wui-locked") ? (this._announce(M.locked(t)), !1) : e.getAttribute("aria-busy") === "true" ? (this._announce(M.busy), Mt(M.busy, "info"), !1) : !0;
774
+ let t = N(e);
775
+ return this.hasAttribute("readonly") || e.hasAttribute("data-wui-locked") ? (this._announce(j.locked(t)), !1) : e.getAttribute("aria-busy") === "true" ? (this._announce(j.busy), Nt(j.busy, "info"), !1) : !0;
776
776
  }
777
777
  _check(e, t, n) {
778
778
  if (t === n) return {
@@ -780,7 +780,7 @@ var Mt = (e, t) => {
780
780
  source: !0,
781
781
  reason: null
782
782
  };
783
- let r = this._columnByKey(t), i = this._columnByKey(n), a = M.refused(r ? this._titleOf(r) : t, i ? this._titleOf(i) : n), o = i?.getAttribute("data-accept-from");
783
+ let r = this._columnByKey(t), i = this._columnByKey(n), a = j.refused(r ? this._titleOf(r) : t, i ? this._titleOf(i) : n), o = i?.getAttribute("data-accept-from");
784
784
  if (o != null && !o.split(/\s+/).filter(Boolean).includes(t)) return {
785
785
  ok: !1,
786
786
  reason: a
@@ -802,35 +802,35 @@ var Mt = (e, t) => {
802
802
  };
803
803
  }
804
804
  _markTargets(e, t) {
805
- let n = P(e), r = /* @__PURE__ */ new Map();
805
+ let n = N(e), r = /* @__PURE__ */ new Map();
806
806
  for (let i of this._columns()) {
807
- let a = N(i), o = this._check(e, t, a);
807
+ let a = M(i), o = this._check(e, t, a);
808
808
  r.set(a, o), i.setAttribute("data-wui-drop", o.source ? "source" : o.ok ? "ok" : "refused");
809
- let s = i.querySelector(gt);
810
- s && !o.source && (s.textContent = o.ok ? M.dropHere(n, this._titleOf(i)) : o.reason, s.hidden = !1);
809
+ let s = i.querySelector(_t);
810
+ s && !o.source && (s.textContent = o.ok ? j.dropHere(n, this._titleOf(i)) : o.reason, s.hidden = !1);
811
811
  }
812
812
  return r;
813
813
  }
814
814
  _clearTargets() {
815
815
  for (let e of this._columns()) {
816
816
  e.removeAttribute("data-wui-drop"), e.removeAttribute("data-wui-over"), e.removeAttribute("data-wui-target");
817
- let t = e.querySelector(gt);
817
+ let t = e.querySelector(_t);
818
818
  t && (t.hidden = !0, t.textContent = "");
819
819
  }
820
820
  }
821
821
  async _commit(e, t, n) {
822
- let r = this._columnOf(e), i = N(r), a = this._columnByKey(t), o = P(e);
822
+ let r = this._columnOf(e), i = M(r), a = this._columnByKey(t), o = N(e);
823
823
  if (i === t || !this._canLift(e)) return !1;
824
824
  let s = this._check(e, i, t);
825
- if (!s.ok) return this._announce(s.reason), Mt(s.reason, "info"), !1;
825
+ if (!s.ok) return this._announce(s.reason), Nt(s.reason, "info"), !1;
826
826
  let c = this._cardsIn(a), l = Number.isInteger(n) ? Math.max(0, Math.min(n, c.length)) : c.length, u = {
827
- key: Tt(e),
827
+ key: Et(e),
828
828
  card: e,
829
829
  from: i,
830
830
  to: t,
831
831
  index: l
832
832
  }, d = e.contains(document.activeElement);
833
- if (this._controlled()) return this._fire("wui:kanban:move", u), this._announce(M.moved(o, this._titleOf(a))), d && this._refocusSoon(u.key), !0;
833
+ if (this._controlled()) return this._fire("wui:kanban:move", u), this._announce(j.moved(o, this._titleOf(a))), d && this._refocusSoon(u.key), !0;
834
834
  if (!this._fire("wui:kanban:move", u, !0)) return !1;
835
835
  let f = {
836
836
  parent: e.parentNode,
@@ -841,12 +841,12 @@ var Mt = (e, t) => {
841
841
  let p = a.getAttribute("data-wui-step");
842
842
  if (p) return this._runStep(e, u, f, p, a.getAttribute("data-wui-step-size"));
843
843
  let m = this.getAttribute("move-url");
844
- if (!m) return this._announce(M.moved(o, this._titleOf(a))), this._fire("wui:kanban:moved", {
844
+ if (!m) return this._announce(j.moved(o, this._titleOf(a))), this._fire("wui:kanban:moved", {
845
845
  ...u,
846
846
  result: null
847
847
  }), !0;
848
- this._lock(e, !0), this._announce(M.saving(o, this._titleOf(a)));
849
- let h = await A(m, {
848
+ this._lock(e, !0), this._announce(j.saving(o, this._titleOf(a)));
849
+ let h = await fe(m, {
850
850
  method: "POST",
851
851
  body: new URLSearchParams({
852
852
  card: u.key,
@@ -858,13 +858,13 @@ var Mt = (e, t) => {
858
858
  if (this._lock(e, !1), h.kind === "session") return !1;
859
859
  if (h.ok) {
860
860
  let t = this._applyFragment(h.html) || e;
861
- return Mt(h.message, "success"), this._announce(M.moved(P(t), this._titleOf(a))), this._fire("wui:kanban:moved", {
861
+ return Nt(h.message, "success"), this._announce(j.moved(N(t), this._titleOf(a))), this._fire("wui:kanban:moved", {
862
862
  ...u,
863
863
  card: t,
864
864
  result: h
865
865
  }), !0;
866
866
  }
867
- return this._rollback(e, f), h.kind !== "aborted" && Mt(h.message || M.failed[h.kind] || M.failed.server, "danger"), this._fire("wui:kanban:failed", {
867
+ return this._rollback(e, f), h.kind !== "aborted" && Nt(h.message || j.failed[h.kind] || j.failed.server, "danger"), this._fire("wui:kanban:failed", {
868
868
  ...u,
869
869
  kind: h.kind,
870
870
  status: h.status,
@@ -872,7 +872,7 @@ var Mt = (e, t) => {
872
872
  }), !1;
873
873
  }
874
874
  async _runStep(e, t, n, r, i) {
875
- let a = P(e), o = this._columnByKey(t.to), s = new URLSearchParams({
875
+ let a = N(e), o = this._columnByKey(t.to), s = new URLSearchParams({
876
876
  card: t.key,
877
877
  from: t.from,
878
878
  to: t.to
@@ -880,19 +880,19 @@ var Mt = (e, t) => {
880
880
  this._lock(e, !0);
881
881
  let l;
882
882
  try {
883
- l = await (await rt(c, {
883
+ l = await (await it(c, {
884
884
  trigger: e,
885
885
  size: i || void 0
886
886
  })).closed;
887
887
  } catch (r) {
888
- return this._lock(e, !1), this._rollback(e, n), r?.name !== "AbortError" && Mt(M.failed.server, "danger"), this._fire("wui:kanban:failed", {
888
+ return this._lock(e, !1), this._rollback(e, n), r?.name !== "AbortError" && Nt(j.failed.server, "danger"), this._fire("wui:kanban:failed", {
889
889
  ...t,
890
890
  kind: "step",
891
891
  status: 0,
892
892
  message: r?.message ?? null
893
893
  }), !1;
894
894
  }
895
- if (l?.status !== "success") return this._lock(e, !1), this._rollback(e, n), this._announce(M.cancelled(a)), this._fire("wui:kanban:failed", {
895
+ if (l?.status !== "success") return this._lock(e, !1), this._rollback(e, n), this._announce(j.cancelled(a)), this._fire("wui:kanban:failed", {
896
896
  ...t,
897
897
  kind: "dismissed",
898
898
  status: 0,
@@ -900,10 +900,10 @@ var Mt = (e, t) => {
900
900
  }), !1;
901
901
  let u = e, d = this.getAttribute("card-url");
902
902
  if (d) {
903
- let n = await A(`${d}${d.includes("?") ? "&" : "?"}${new URLSearchParams({ card: t.key })}`);
903
+ let n = await fe(`${d}${d.includes("?") ? "&" : "?"}${new URLSearchParams({ card: t.key })}`);
904
904
  n.ok && (u = this._applyFragment(n.html) || e);
905
905
  }
906
- return this._lock(u, !1), this._announce(M.moved(P(u), this._titleOf(o))), this._fire("wui:kanban:moved", {
906
+ return this._lock(u, !1), this._announce(j.moved(N(u), this._titleOf(o))), this._fire("wui:kanban:moved", {
907
907
  ...t,
908
908
  card: u,
909
909
  result: l
@@ -914,7 +914,7 @@ var Mt = (e, t) => {
914
914
  }
915
915
  _rollback(e, t) {
916
916
  let n = e.contains(document.activeElement), r = t.next && t.next.parentNode === t.parent ? t.next : null;
917
- t.parent.insertBefore(e, r), n && e.focus(), this.refresh(), this._announce(M.rolledBack(P(e), this._titleOf(t.column)));
917
+ t.parent.insertBefore(e, r), n && e.focus(), this.refresh(), this._announce(j.rolledBack(N(e), this._titleOf(t.column)));
918
918
  }
919
919
  _applyFragment(e) {
920
920
  if (!e) return null;
@@ -922,14 +922,14 @@ var Mt = (e, t) => {
922
922
  t.innerHTML = e;
923
923
  for (let e of t.content.querySelectorAll("script")) console.warn("[@webority/ui-elements] A kanban fragment carried a script tag; it was removed, not run."), e.remove();
924
924
  let n = null;
925
- for (let e of [...t.content.querySelectorAll(ft)]) {
925
+ for (let e of [...t.content.querySelectorAll(pt)]) {
926
926
  if (e.closest("template")) continue;
927
- let t = this._cardByKey(Tt(e));
927
+ let t = this._cardByKey(Et(e));
928
928
  if (!t) continue;
929
929
  let r = t.contains(document.activeElement);
930
930
  t.dispatchEvent(new CustomEvent("wui:teardown", { bubbles: !0 })), t.hidden && (e.hidden = !0), t.replaceWith(e), this._prepareCard(e), r && e.focus(), n ??= e;
931
931
  }
932
- for (let e of t.content.querySelectorAll("template[data-wui-kanban-summary]")) this._columnByKey(e.getAttribute("data-wui-kanban-summary"))?.querySelector(mt)?.replaceChildren(e.content.cloneNode(!0));
932
+ for (let e of t.content.querySelectorAll("template[data-wui-kanban-summary]")) this._columnByKey(e.getAttribute("data-wui-kanban-summary"))?.querySelector(ht)?.replaceChildren(e.content.cloneNode(!0));
933
933
  return this.refresh(), window.WUI?.refresh?.(), n;
934
934
  }
935
935
  _refocusSoon(e) {
@@ -938,8 +938,8 @@ var Mt = (e, t) => {
938
938
  }
939
939
  _pointerDown(e) {
940
940
  if (e.button !== 0 || e.isPrimary === !1 || this._drag || this._kbd) return;
941
- let t = e.target.closest?.(ft);
942
- if (!t || !this.contains(t) || e.target.closest(St)) return;
941
+ let t = e.target.closest?.(pt);
942
+ if (!t || !this.contains(t) || e.target.closest(Ct)) return;
943
943
  let n = {
944
944
  card: t,
945
945
  id: e.pointerId,
@@ -975,7 +975,7 @@ var Mt = (e, t) => {
975
975
  this._endPointer(!1);
976
976
  return;
977
977
  }
978
- let i = N(this._columnOf(r)), a = r.getBoundingClientRect(), o = r.cloneNode(!0);
978
+ let i = M(this._columnOf(r)), a = r.getBoundingClientRect(), o = r.cloneNode(!0);
979
979
  for (let e of [o, ...o.querySelectorAll("[id]")]) e.removeAttribute("id");
980
980
  o.removeAttribute("data-wui-card"), o.removeAttribute("tabindex"), o.setAttribute("aria-hidden", "true"), o.classList.add("wui-kanban-ghost"), o.style.width = `${a.width}px`, this.appendChild(o), r.setAttribute("data-wui-dragging", ""), this.setAttribute("data-wui-dragging", ""), this._drag = {
981
981
  card: r,
@@ -985,7 +985,7 @@ var Mt = (e, t) => {
985
985
  dy: n - a.top,
986
986
  over: null,
987
987
  verdicts: this._markTargets(r, i)
988
- }, this._announce(M.lifted(P(r), this._titleOf(this._columnOf(r)))), document.addEventListener("keydown", this._onDocKeyDown), this._dragTo(t, n);
988
+ }, this._announce(j.lifted(N(r), this._titleOf(this._columnOf(r)))), document.addEventListener("keydown", this._onDocKeyDown), this._dragTo(t, n);
989
989
  }
990
990
  _dragTo(e, t) {
991
991
  let n = this._drag;
@@ -1011,10 +1011,10 @@ var Mt = (e, t) => {
1011
1011
  let n = this._scroller();
1012
1012
  if (n) {
1013
1013
  let t = n.getBoundingClientRect();
1014
- t.width > 0 && (e < t.left + Ct ? n.scrollBy?.({ left: -16 }) : e > t.right - Ct && n.scrollBy?.({ left: wt }));
1014
+ t.width > 0 && (e < t.left + wt ? n.scrollBy?.({ left: -16 }) : e > t.right - wt && n.scrollBy?.({ left: Tt }));
1015
1015
  }
1016
1016
  let r = window.innerHeight || 0;
1017
- r > 0 && (t < Ct ? window.scrollBy?.({ top: -16 }) : t > r - Ct && window.scrollBy?.({ top: wt }));
1017
+ r > 0 && (t < wt ? window.scrollBy?.({ top: -16 }) : t > r - wt && window.scrollBy?.({ top: Tt }));
1018
1018
  }
1019
1019
  _endPointer(e) {
1020
1020
  let t = this._press, n = this._drag;
@@ -1024,32 +1024,32 @@ var Mt = (e, t) => {
1024
1024
  }, 0);
1025
1025
  let r = n.over;
1026
1026
  if (this._clearTargets(), !e || !r) {
1027
- this._announce(M.cancelled(P(n.card)));
1027
+ this._announce(j.cancelled(N(n.card)));
1028
1028
  return;
1029
1029
  }
1030
- let i = N(r), a = n.verdicts.get(i);
1030
+ let i = M(r), a = n.verdicts.get(i);
1031
1031
  if (a?.source) {
1032
- this._announce(M.cancelled(P(n.card)));
1032
+ this._announce(j.cancelled(N(n.card)));
1033
1033
  return;
1034
1034
  }
1035
1035
  if (!a?.ok) {
1036
- this._announce(a?.reason), Mt(a?.reason, "info");
1036
+ this._announce(a?.reason), Nt(a?.reason, "info");
1037
1037
  return;
1038
1038
  }
1039
1039
  this._commit(n.card, i, this._indexAt(r, n.y));
1040
1040
  }
1041
1041
  _click(e) {
1042
- if (this._suppressClick && e.target.closest?.(ft)) {
1042
+ if (this._suppressClick && e.target.closest?.(pt)) {
1043
1043
  e.preventDefault(), e.stopPropagation(), this._suppressClick = !1;
1044
1044
  return;
1045
1045
  }
1046
- let t = e.target.closest?.(xt);
1046
+ let t = e.target.closest?.(St);
1047
1047
  if (t && this.contains(t)) {
1048
- let e = t.closest(ut);
1048
+ let e = t.closest(dt);
1049
1049
  e && this._setCollapsed(e, !e.hasAttribute("data-collapsed"), !0);
1050
1050
  return;
1051
1051
  }
1052
- let n = e.target.closest?.(yt);
1052
+ let n = e.target.closest?.(bt);
1053
1053
  n && this.contains(n) && this._showColumn(n.getAttribute("data-wui-switch"));
1054
1054
  }
1055
1055
  _keyDown(e) {
@@ -1058,19 +1058,19 @@ var Mt = (e, t) => {
1058
1058
  return;
1059
1059
  }
1060
1060
  let t = e.target;
1061
- if (!t.matches?.(ft) || !this.contains(t)) return;
1061
+ if (!t.matches?.(pt) || !this.contains(t)) return;
1062
1062
  let n = this._columnOf(t);
1063
1063
  switch (e.key) {
1064
1064
  case " ":
1065
1065
  case "Spacebar": {
1066
1066
  if (e.preventDefault(), !this._canLift(t)) return;
1067
- let r = N(n), i = this._columns();
1067
+ let r = M(n), i = this._columns();
1068
1068
  this._kbd = {
1069
1069
  card: t,
1070
1070
  from: r,
1071
1071
  target: i.indexOf(n),
1072
1072
  verdicts: this._markTargets(t, r)
1073
- }, t.setAttribute("data-wui-lifted", ""), this.setAttribute("data-wui-dragging", ""), n.setAttribute("data-wui-target", ""), this._announce(M.lifted(P(t), this._titleOf(n)));
1073
+ }, t.setAttribute("data-wui-lifted", ""), this.setAttribute("data-wui-dragging", ""), n.setAttribute("data-wui-target", ""), this._announce(j.lifted(N(t), this._titleOf(n)));
1074
1074
  return;
1075
1075
  }
1076
1076
  case "ArrowDown":
@@ -1104,26 +1104,26 @@ var Mt = (e, t) => {
1104
1104
  if (r < 0 || r >= n.length) return;
1105
1105
  n[t.target]?.removeAttribute("data-wui-target"), t.target = r;
1106
1106
  let i = n[r];
1107
- i.setAttribute("data-wui-target", ""), this._showColumn(N(i), !1);
1108
- let a = t.verdicts.get(N(i)), o = this._titleOf(i);
1109
- this._announce(a.source ? M.overSource(o) : a.ok ? M.over(o, this._visibleCardsIn(i).length) : M.overRefused(o, a.reason));
1107
+ i.setAttribute("data-wui-target", ""), this._showColumn(M(i), !1);
1108
+ let a = t.verdicts.get(M(i)), o = this._titleOf(i);
1109
+ this._announce(a.source ? j.overSource(o) : a.ok ? j.over(o, this._visibleCardsIn(i).length) : j.overRefused(o, a.reason));
1110
1110
  return;
1111
1111
  }
1112
1112
  case " ":
1113
1113
  case "Spacebar":
1114
1114
  case "Enter": {
1115
1115
  e.preventDefault();
1116
- let r = n[t.target], i = N(r), a = t.verdicts.get(i);
1116
+ let r = n[t.target], i = M(r), a = t.verdicts.get(i);
1117
1117
  if (!a.source && !a.ok) {
1118
1118
  this._announce(a.reason);
1119
1119
  return;
1120
1120
  }
1121
- this._endKeyboard(), a.source ? this._announce(M.cancelled(P(t.card))) : this._commit(t.card, i);
1121
+ this._endKeyboard(), a.source ? this._announce(j.cancelled(N(t.card))) : this._commit(t.card, i);
1122
1122
  return;
1123
1123
  }
1124
1124
  case "Escape":
1125
1125
  case "Tab":
1126
- e.key === "Escape" && e.preventDefault(), this._endKeyboard(), this._showColumn(t.from, !1), this._announce(M.cancelled(P(t.card)));
1126
+ e.key === "Escape" && e.preventDefault(), this._endKeyboard(), this._showColumn(t.from, !1), this._announce(j.cancelled(N(t.card)));
1127
1127
  return;
1128
1128
  default:
1129
1129
  }
@@ -1133,18 +1133,18 @@ var Mt = (e, t) => {
1133
1133
  this._kbd = null, e && (e.card.removeAttribute("data-wui-lifted"), this.removeAttribute("data-wui-dragging"), this._clearTargets());
1134
1134
  }
1135
1135
  _restoreCollapsed() {
1136
- let e = Ot(this.getAttribute("board-id"));
1136
+ let e = kt(this.getAttribute("board-id"));
1137
1137
  for (let t of this._columns()) {
1138
- let n = N(t);
1138
+ let n = M(t);
1139
1139
  t.hasAttribute("data-collapsible") && Object.hasOwn(e, n) && this._setCollapsed(t, e[n], !1);
1140
1140
  }
1141
1141
  }
1142
1142
  _setCollapsed(e, t, n) {
1143
- let r = N(e);
1143
+ let r = M(e);
1144
1144
  e.toggleAttribute("data-collapsed", t);
1145
1145
  let i = this._titleOf(e);
1146
- for (let n of e.querySelectorAll(xt)) n.setAttribute("aria-expanded", t ? "false" : "true"), n.setAttribute("aria-label", t ? M.expand(i) : M.collapse(i));
1147
- n && (kt(this.getAttribute("board-id"), r, t), this._fire("wui:kanban:collapse", {
1146
+ for (let n of e.querySelectorAll(St)) n.setAttribute("aria-expanded", t ? "false" : "true"), n.setAttribute("aria-label", t ? j.expand(i) : j.collapse(i));
1147
+ n && (At(this.getAttribute("board-id"), r, t), this._fire("wui:kanban:collapse", {
1148
1148
  column: r,
1149
1149
  collapsed: t
1150
1150
  }));
@@ -1153,7 +1153,7 @@ var Mt = (e, t) => {
1153
1153
  return typeof matchMedia == "function" && matchMedia("(max-width: 767.98px)").matches;
1154
1154
  }
1155
1155
  _showColumn(e, t = !0) {
1156
- for (let t of this.querySelectorAll(yt)) t.getAttribute("data-wui-switch") === e ? t.setAttribute("aria-current", "true") : t.removeAttribute("aria-current");
1156
+ for (let t of this.querySelectorAll(bt)) t.getAttribute("data-wui-switch") === e ? t.setAttribute("aria-current", "true") : t.removeAttribute("aria-current");
1157
1157
  let n = this._columnByKey(e), r = this._scroller();
1158
1158
  if (!n || !r || !t && !this._isPhone()) return;
1159
1159
  let i = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -1166,22 +1166,22 @@ var Mt = (e, t) => {
1166
1166
  let e = this._scroller();
1167
1167
  if (!e || !this._isPhone()) return;
1168
1168
  let t = e.clientWidth || 1, n = this._columns()[Math.round(e.scrollLeft / t)];
1169
- if (n) for (let e of this.querySelectorAll(yt)) e.getAttribute("data-wui-switch") === N(n) ? e.setAttribute("aria-current", "true") : e.removeAttribute("aria-current");
1169
+ if (n) for (let e of this.querySelectorAll(bt)) e.getAttribute("data-wui-switch") === M(n) ? e.setAttribute("aria-current", "true") : e.removeAttribute("aria-current");
1170
1170
  }
1171
- }, Pt = {
1171
+ }, Ft = {
1172
1172
  delete: "data:image/webp;base64,UklGRh4RAABXRUJQVlA4WAoAAAAQAAAAFwEAFwEAQUxQSGwFAAABkFXbbh1JgiAIhmAIZjBhEDOIGcQMqhgkDKoZCEIgCIIh6KO7Xokt6WtWREwAjBxDykvdNjqYWZ42ZqLHVpecIpgbY67b0eSEjR51SmginJYHy+mPR53QMnHZWC7MjyVZJC7UpIONlmgJzFuTjvI2owlwIekwzUF5uJB0m+agNlxIOk8zaizdmwywbUlZuJAMk2fUU1ibDJW3oKNEMuAt6SeRDJpm3SSSgfOsl0QyeJ51kkgUSFEfgUSJW9AFrqLIW1DE0kSVPGshkqiTgwbwJipdcXiJRan8b2x4E8VuYWCJRbWcRoU3Ue86pnCIgjkMaGmi4lZGgzdR8w2HElgUzWEgUxNVt2kYq6h7HQNuovAbDiAcovIjdC+w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n/n94fILJ8jpdG267h4zj4z1vgCEX2tiu01a3JueayBKehW9HfPGTqCF57Rujz/bsMolTAVaD6GonBUIyFxvInkIi2IM9G1N3XB1U3QEEGvP+CoxGSIAzwyGF57YiDt90pO7R94NP1ZankVp1dtEccWyzU9DrUI8iLKYeKwy6Gvokz/NZHnpQd6ehlmIduqYS27V0kM0LbdpYI0qLGlVFA22uCW61dbyfUDaur9N+Tw6rwH/kW97h8HUyAQCnXLSDNgFqRN/1Xgdp0r0dzKU7ImzaKzjS1tYxLXAf/kXCghSyLnGF+uTjhAAAAAA="
1177
- }, Ft = { error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>" }, It = [
1177
+ }, It = { error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>" }, Lt = [
1178
1178
  "success",
1179
1179
  "error",
1180
1180
  "warning",
1181
1181
  "info",
1182
1182
  "delete",
1183
1183
  "primary"
1184
- ], Lt = class extends e {
1184
+ ], Rt = class extends e {
1185
1185
  static get observedAttributes() {
1186
1186
  return ["tone", "size"];
1187
1187
  }
@@ -1192,29 +1192,29 @@ var Mt = (e, t) => {
1192
1192
  this.isConnected && this.render();
1193
1193
  }
1194
1194
  render() {
1195
- let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = Ft[e];
1195
+ let e = this.getAttribute("tone"), t = Number.parseInt(this.getAttribute("size"), 10) || 72, n = It[e];
1196
1196
  if (n) {
1197
1197
  this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
1198
1198
  return;
1199
1199
  }
1200
- let r = Pt[e] || Pt.info;
1200
+ let r = Ft[e] || Ft.info;
1201
1201
  this.innerHTML = `<img src="${r}" width="${t}" height="${t}" alt="" aria-hidden="true" draggable="false" />`;
1202
1202
  }
1203
- }, F = 4, Rt = 300, zt = 400;
1204
- function I(e, t, n = {}) {
1203
+ }, P = 4, zt = 300, Bt = 400;
1204
+ function F(e, t, n = {}) {
1205
1205
  if (!e || !t) return;
1206
1206
  let r = e.getBoundingClientRect(), i = n.clampHeight ? t.scrollTop : 0;
1207
1207
  n.clampHeight && (t.style.maxHeight = "");
1208
- let a = t.offsetHeight, o = window.innerHeight - r.bottom, s = o < a + F && r.top > o;
1209
- if (t.classList.toggle("drop-up", s), t.style.position = "fixed", t.style.top = s ? `${Math.max(F, r.top - a - F)}px` : `${r.bottom + F}px`, n.clampHeight) {
1210
- let e = s ? r.top - F * 2 : window.innerHeight - r.bottom - F * 2;
1208
+ let a = t.offsetHeight, o = window.innerHeight - r.bottom, s = o < a + P && r.top > o;
1209
+ if (t.classList.toggle("drop-up", s), t.style.position = "fixed", t.style.top = s ? `${Math.max(P, r.top - a - P)}px` : `${r.bottom + P}px`, n.clampHeight) {
1210
+ let e = s ? r.top - P * 2 : window.innerHeight - r.bottom - P * 2;
1211
1211
  e < a && (t.style.maxHeight = `${Math.max(e, 0)}px`), t.scrollTop = i;
1212
1212
  }
1213
- n.matchWidth && (r.width >= Rt ? (t.style.minWidth = `${r.width}px`, t.style.width = `${r.width}px`, t.style.maxWidth = `${r.width}px`) : (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${Math.min(zt, window.innerWidth - F * 2)}px`));
1214
- let c = t.offsetWidth, l = Math.min(r.left, window.innerWidth - c - F);
1215
- t.style.left = `${Math.max(F, l)}px`;
1213
+ n.matchWidth && (r.width >= zt ? (t.style.minWidth = `${r.width}px`, t.style.width = `${r.width}px`, t.style.maxWidth = `${r.width}px`) : (t.style.minWidth = `${r.width}px`, t.style.width = "max-content", t.style.maxWidth = `${Math.min(Bt, window.innerWidth - P * 2)}px`));
1214
+ let c = t.offsetWidth, l = Math.min(r.left, window.innerWidth - c - P);
1215
+ t.style.left = `${Math.max(P, l)}px`;
1216
1216
  }
1217
- function Bt(e, t) {
1217
+ function I(e, t) {
1218
1218
  L(e), e._reanchor = t, e._reanchorScroll = (n) => {
1219
1219
  n.target instanceof Node && typeof e.contains == "function" && e.contains(n.target) || t();
1220
1220
  }, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchorScroll, !0);
@@ -1685,7 +1685,7 @@ var Kt = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&a
1685
1685
  this._teardown();
1686
1686
  let e = this._refs();
1687
1687
  if (!e.control || !e.input) return;
1688
- let t = () => I(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
1688
+ let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (t) => {
1689
1689
  let r = n();
1690
1690
  this._active = t;
1691
1691
  for (let e of this._optionEls()) e.classList.remove("is-active");
@@ -1763,7 +1763,7 @@ var Kt = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&a
1763
1763
  }), this._bindGlobal = () => {
1764
1764
  this._teardown(), this._onDocClick = (e) => {
1765
1765
  i() && !this.contains(e.target) && o();
1766
- }, document.addEventListener("click", this._onDocClick), Bt(this, () => {
1766
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
1767
1767
  i() && t();
1768
1768
  });
1769
1769
  }, this._bindGlobal();
@@ -2398,7 +2398,7 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
2398
2398
  let e = document.activeElement;
2399
2399
  this._returnFocus = e && e !== document.body && !this._inPanel(e) ? e : null;
2400
2400
  }
2401
- this._region = n, this._origin = r, xn = null, a.setAttribute(gn, ""), bn = this, I({ getBoundingClientRect: () => ({
2401
+ this._region = n, this._origin = r, xn = null, a.setAttribute(gn, ""), bn = this, F({ getBoundingClientRect: () => ({
2402
2402
  left: e,
2403
2403
  right: e,
2404
2404
  top: t,
@@ -3906,8 +3906,8 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
3906
3906
  let t = () => {
3907
3907
  if (this.hasAttribute("compact")) {
3908
3908
  let t = e.control.getBoundingClientRect();
3909
- e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", I(e.control, e.menu);
3910
- } else I(e.control, e.menu, { matchWidth: !0 });
3909
+ e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", F(e.control, e.menu);
3910
+ } else F(e.control, e.menu, { matchWidth: !0 });
3911
3911
  }, n = (t) => {
3912
3912
  let n = this._visible();
3913
3913
  this._active = t;
@@ -3958,7 +3958,7 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
3958
3958
  }), e.menu.addEventListener("keydown", this._navHandler.handler), this._bindGlobal = () => {
3959
3959
  this._teardown(), this._onDocClick = (e) => {
3960
3960
  i() && !this.contains(e.target) && o();
3961
- }, document.addEventListener("click", this._onDocClick), Bt(this, () => {
3961
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
3962
3962
  i() && t();
3963
3963
  });
3964
3964
  }, this._bindGlobal();
@@ -4204,7 +4204,7 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
4204
4204
  t && e.contains(document.activeElement) && t.focus();
4205
4205
  }
4206
4206
  _position(e, t) {
4207
- I(e, t, { clampHeight: !0 });
4207
+ F(e, t, { clampHeight: !0 });
4208
4208
  }
4209
4209
  _setFocus(e, t, n, r) {
4210
4210
  let { y: i, m: a } = K(e, t);
@@ -4333,7 +4333,7 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
4333
4333
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
4334
4334
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
4335
4335
  r() && e.key === "Escape" && this._close();
4336
- }, document.addEventListener("keydown", this._onDocKey), Bt(this, () => {
4336
+ }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
4337
4337
  r() && this._position(e, t);
4338
4338
  });
4339
4339
  }, this._bindGlobal(), this._syncFormValue();
@@ -4506,7 +4506,7 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
4506
4506
  i && (i.textContent = this._start ? this._end ? `${Ln(this._start)} to ${Ln(this._end)}` : "Pick an end date" : "Pick a start date");
4507
4507
  }
4508
4508
  _position(e, t) {
4509
- I(e, t, { clampHeight: !0 });
4509
+ F(e, t, { clampHeight: !0 });
4510
4510
  }
4511
4511
  _pick(e) {
4512
4512
  if (!this._start || this._start && this._end) {
@@ -4557,7 +4557,7 @@ var wn = (e) => e instanceof Element ? e : e?.parentElement ?? null, Tn = class
4557
4557
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
4558
4558
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
4559
4559
  r() && e.key === "Escape" && this._close();
4560
- }, document.addEventListener("keydown", this._onDocKey), Bt(this, () => {
4560
+ }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
4561
4561
  r() && this._position(e, t);
4562
4562
  });
4563
4563
  }, this._bindGlobal(), this._syncMirrors();
@@ -5207,7 +5207,7 @@ var xr = (e, t) => t.some((t) => String(e ?? "").includes(t)), Sr = class extend
5207
5207
  this._teardown();
5208
5208
  let e = this.querySelector(".search-select-control"), t = this.querySelector(".search-select-menu"), n = this.querySelector(".search-select-input"), r = this.querySelector(".search-select-clear"), i = this.querySelector(".search-select-options"), a = this._allowCustom, o = a ? this.querySelector("[data-input]") : null, s = o || e;
5209
5209
  if (!e || !t) return;
5210
- let c = () => this.hasAttribute("disabled"), l = () => I(e, t, { matchWidth: !0 }), u = () => [...this.querySelectorAll(".search-select-option")], d = () => u().filter((e) => !e.hidden), f = (e) => {
5210
+ let c = () => this.hasAttribute("disabled"), l = () => F(e, t, { matchWidth: !0 }), u = () => [...this.querySelectorAll(".search-select-option")], d = () => u().filter((e) => !e.hidden), f = (e) => {
5211
5211
  let t = d();
5212
5212
  this._active = e;
5213
5213
  for (let e of u()) e.classList.remove("is-active");
@@ -5287,7 +5287,7 @@ var xr = (e, t) => t.some((t) => String(e ?? "").includes(t)), Sr = class extend
5287
5287
  this._navHandler.clearTypeahead(), _(), o || e.focus();
5288
5288
  }
5289
5289
  });
5290
- let C = (e) => {
5290
+ let ee = (e) => {
5291
5291
  let t = o || n;
5292
5292
  if (e.key === "Backspace" && !t?.value && this._values.length) {
5293
5293
  b(this._values[this._values.length - 1]);
@@ -5295,7 +5295,7 @@ var xr = (e, t) => t.some((t) => String(e ?? "").includes(t)), Sr = class extend
5295
5295
  }
5296
5296
  this._navHandler.handler(e);
5297
5297
  };
5298
- if (n?.addEventListener("keydown", C), r?.addEventListener("click", () => {
5298
+ if (n?.addEventListener("keydown", ee), r?.addEventListener("click", () => {
5299
5299
  n.value = "", this._renderOptions(""), r.hidden = !0, n.focus();
5300
5300
  }), o) {
5301
5301
  let t = (e) => {
@@ -5313,7 +5313,7 @@ var xr = (e, t) => t.some((t) => String(e ?? "").includes(t)), Sr = class extend
5313
5313
  this._navHandler.handler(e);
5314
5314
  return;
5315
5315
  }
5316
- (e.key === "ArrowDown" || e.key === "ArrowUp") && !m() && g(), C(e);
5316
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && !m() && g(), ee(e);
5317
5317
  }), o.addEventListener("paste", (e) => {
5318
5318
  let t = e.clipboardData?.getData("text/plain") ?? "";
5319
5319
  xr(t, Cr) && (e.preventDefault(), x(`${o.value}${t}`));
@@ -5322,7 +5322,7 @@ var xr = (e, t) => t.some((t) => String(e ?? "").includes(t)), Sr = class extend
5322
5322
  });
5323
5323
  } else e.addEventListener("keydown", (e) => {
5324
5324
  if (m()) {
5325
- C(e);
5325
+ ee(e);
5326
5326
  return;
5327
5327
  }
5328
5328
  (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), g());
@@ -5330,7 +5330,7 @@ var xr = (e, t) => t.some((t) => String(e ?? "").includes(t)), Sr = class extend
5330
5330
  this._bindGlobal = () => {
5331
5331
  this._teardown(), !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this)), this._onDocClick = (e) => {
5332
5332
  m() && !this.contains(e.target) && _();
5333
- }, document.addEventListener("click", this._onDocClick), Bt(this, () => {
5333
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
5334
5334
  m() && l();
5335
5335
  });
5336
5336
  }, this._bindGlobal();
@@ -6103,7 +6103,7 @@ var Qr = class extends e {
6103
6103
  this._teardown();
6104
6104
  let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), c = this.querySelector("[data-dial]");
6105
6105
  if (!e || !n) return;
6106
- let l = () => !n.hidden, u = () => I(t || e, n), d = (e) => {
6106
+ let l = () => !n.hidden, u = () => F(t || e, n), d = (e) => {
6107
6107
  let t = this._visibleItems();
6108
6108
  this._active = e;
6109
6109
  for (let e of this._itemEls()) e.classList.remove("is-active");
@@ -6188,7 +6188,7 @@ var Qr = class extends e {
6188
6188
  }), this._bindGlobal = () => {
6189
6189
  this._teardownGlobals?.(), this._onDocClick = (e) => {
6190
6190
  l() && !this.contains(e.target) && p();
6191
- }, document.addEventListener("click", this._onDocClick), Bt(this, () => {
6191
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
6192
6192
  l() && u();
6193
6193
  });
6194
6194
  }, this._teardownGlobals = () => {
@@ -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
+ F(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();
7079
- }, document.addEventListener("keydown", this._onDocKey), Bt(this, () => {
7080
- r() && this._position(e, t);
7236
+ i() && e.key === "Escape" && this._close({ commit: !1 });
7237
+ }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
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,207 @@ var pi = class extends e {
7087
7245
  disconnectedCallback() {
7088
7246
  this._teardown();
7089
7247
  }
7090
- }, xi = [
7248
+ }, Ci = "wui-tour-step", wi = "wui-tour-seen:", Ti = {
7249
+ back: "Back",
7250
+ next: "Next",
7251
+ skip: "Skip",
7252
+ done: "Done"
7253
+ }, Ei = {
7254
+ back: "back-label",
7255
+ next: "next-label",
7256
+ skip: "skip-label",
7257
+ done: "done-label"
7258
+ }, Di = 4, Oi = 0;
7259
+ function ki(e = wi, t = globalThis.localStorage) {
7260
+ return {
7261
+ isSeen: async (n) => t.getItem(e + n) === "1",
7262
+ markSeen: async (n) => {
7263
+ t.setItem(e + n, "1");
7264
+ }
7265
+ };
7266
+ }
7267
+ var Ai = (e) => !e?.isConnected || getComputedStyle(e).visibility === "hidden" ? !1 : e.getClientRects().length > 0, ji = class extends e {
7268
+ static get observedAttributes() {
7269
+ return ["open"];
7270
+ }
7271
+ constructor() {
7272
+ super(), this.seenStore = null, this.onBeforeStep = null, this._run = 0, this._running = !1, this._layer = null;
7273
+ }
7274
+ connectedCallback() {
7275
+ this.hasAttribute("open") && this.start();
7276
+ }
7277
+ disconnectedCallback() {
7278
+ this.stop();
7279
+ }
7280
+ attributeChangedCallback(e, t, n) {
7281
+ e !== "open" || !this.isConnected || (n === null ? this.stop() : this.start());
7282
+ }
7283
+ get tourId() {
7284
+ return this.getAttribute("tour-id") || "";
7285
+ }
7286
+ _stepList() {
7287
+ return Array.from(this.querySelectorAll(`:scope > ${Ci}`), (e) => ({
7288
+ target: e.getAttribute("target") || "",
7289
+ title: e.getAttribute("title") || void 0,
7290
+ description: e.textContent.trim()
7291
+ }));
7292
+ }
7293
+ _store() {
7294
+ return this.seenStore ? this.seenStore : this.getAttribute("seen-store") === "local" ? ki() : globalThis.window?.WUI?.tour?.seenStore || null;
7295
+ }
7296
+ _label(e) {
7297
+ return this.getAttribute(Ei[e]) || Ti[e];
7298
+ }
7299
+ async start() {
7300
+ if (this._running) return;
7301
+ this._running = !0;
7302
+ let e = ++this._run;
7303
+ this.hasAttribute("open") || this.setAttribute("open", "");
7304
+ try {
7305
+ await this._start(e);
7306
+ } catch (t) {
7307
+ throw e === this._run && (this._running = !1), t;
7308
+ }
7309
+ }
7310
+ async _start(e) {
7311
+ this._steps = this._stepList();
7312
+ let t = this._store();
7313
+ if (t && !this.tourId) throw Error("<wui-tour> needs a tour-id to use a seen store.");
7314
+ if (t && await t.isSeen(this.tourId)) {
7315
+ e === this._run && this._finish("alreadySeen");
7316
+ return;
7317
+ }
7318
+ this._returnFocus = document.activeElement;
7319
+ let n = await this._locate(0, 1, e);
7320
+ if (e === this._run) {
7321
+ if (!n) {
7322
+ this._finish("noTargets");
7323
+ return;
7324
+ }
7325
+ this._firstIndex = n.index, this._build(), this._show(n);
7326
+ }
7327
+ }
7328
+ stop() {
7329
+ this._running && (this._run++, this._teardown(), this._running = !1, this.hasAttribute("open") && this.removeAttribute("open"));
7330
+ }
7331
+ async _locate(e, t, n) {
7332
+ let r = this._steps;
7333
+ for (let i = e; i >= 0 && i < r.length; i += t) {
7334
+ let e = r[i];
7335
+ if (await this._beforeStep(e, i), n !== this._run) return null;
7336
+ let t = document.querySelector(e.target);
7337
+ if (Ai(t)) return {
7338
+ index: i,
7339
+ target: t
7340
+ };
7341
+ }
7342
+ return null;
7343
+ }
7344
+ async _beforeStep(e, t) {
7345
+ let n = [];
7346
+ this.dispatchEvent(new CustomEvent("wui-tour:beforestep", {
7347
+ bubbles: !0,
7348
+ detail: {
7349
+ step: e,
7350
+ index: t,
7351
+ wait: (e) => n.push(e)
7352
+ }
7353
+ })), await Promise.all(n), typeof this.onBeforeStep == "function" && await this.onBeforeStep(e, t);
7354
+ }
7355
+ _build() {
7356
+ let e = `wui-tour-${++Oi}`, t = document.createElement("div");
7357
+ t.className = "wui-tour-layer", t.innerHTML = `
7358
+ <div class="wui-tour-spot" aria-hidden="true"></div>
7359
+ <div class="wui-tour-card" role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="${e}-title" aria-describedby="${e}-text">
7360
+ <p class="wui-tour-position"></p>
7361
+ <h2 class="wui-tour-title" id="${e}-title"></h2>
7362
+ <p class="wui-tour-text" id="${e}-text"></p>
7363
+ <div class="wui-tour-actions">
7364
+ <button type="button" class="btn btn-sm btn-link wui-tour-skip"></button>
7365
+ <div class="wui-tour-nav">
7366
+ <button type="button" class="btn btn-sm btn-outline-secondary wui-tour-back"></button>
7367
+ <button type="button" class="btn btn-sm btn-primary wui-tour-next"></button>
7368
+ </div>
7369
+ </div>
7370
+ </div>
7371
+ <div class="visually-hidden" role="status" aria-live="polite"></div>`, document.body.appendChild(t), this._layer = t, this._spot = t.querySelector(".wui-tour-spot"), this._card = t.querySelector(".wui-tour-card"), this._live = t.querySelector("[role=status]"), this._card.querySelector(".wui-tour-skip").addEventListener("click", () => this._close("skipped")), this._card.querySelector(".wui-tour-back").addEventListener("click", () => this._move(-1)), this._card.querySelector(".wui-tour-next").addEventListener("click", () => this._move(1)), this._onKey = (e) => this._key(e), this._onFocusIn = (e) => {
7372
+ this._layer && !this._layer.contains(e.target) && this._card.focus();
7373
+ }, document.addEventListener("keydown", this._onKey, !0), document.addEventListener("focusin", this._onFocusIn), I(t, () => this._place());
7374
+ }
7375
+ _show(e) {
7376
+ this._current = e;
7377
+ let { index: t, target: n } = e, r = this._steps[t], i = this._steps, a = t === i.length - 1, o = this._card;
7378
+ o.querySelector(".wui-tour-position").textContent = `Step ${t + 1} of ${i.length}`;
7379
+ let s = o.querySelector(".wui-tour-title");
7380
+ s.textContent = r.title || "", s.hidden = !r.title, o.querySelector(".wui-tour-text").textContent = r.description || "", o.querySelector(".wui-tour-skip").textContent = this._label("skip"), o.querySelector(".wui-tour-back").textContent = this._label("back"), o.querySelector(".wui-tour-back").hidden = t <= this._firstIndex, o.querySelector(".wui-tour-next").textContent = this._label(a ? "done" : "next"), this._live.textContent = [
7381
+ `Step ${t + 1} of ${i.length}`,
7382
+ r.title,
7383
+ r.description
7384
+ ].filter(Boolean).join(". "), n.scrollIntoView?.({
7385
+ block: "center",
7386
+ inline: "nearest"
7387
+ }), this._place(), (!o.contains(document.activeElement) || document.activeElement.hidden) && o.focus(), this.dispatchEvent(new CustomEvent("wui-tour:step", {
7388
+ bubbles: !0,
7389
+ detail: {
7390
+ step: r,
7391
+ index: t
7392
+ }
7393
+ }));
7394
+ }
7395
+ _place() {
7396
+ if (!this._current || !this._layer) return;
7397
+ let e = this._current.target.getBoundingClientRect(), t = this._spot.style;
7398
+ t.top = `${e.top - Di}px`, t.left = `${e.left - Di}px`, t.width = `${e.width + Di * 2}px`, t.height = `${e.height + Di * 2}px`, F(this._spot, this._card, { clampHeight: !0 });
7399
+ }
7400
+ async _move(e) {
7401
+ if (!this._current || this._moving) return;
7402
+ this._moving = !0;
7403
+ let t = this._run;
7404
+ try {
7405
+ let n = await this._locate(this._current.index + e, e, t);
7406
+ if (t !== this._run) return;
7407
+ n ? this._show(n) : e > 0 && await this._close("finished");
7408
+ } finally {
7409
+ this._moving = !1;
7410
+ }
7411
+ }
7412
+ _key(e) {
7413
+ if (!(!this._layer || e.altKey || e.ctrlKey || e.metaKey)) {
7414
+ if (e.key === "Escape") e.preventDefault(), e.stopPropagation(), this._close("skipped");
7415
+ else if (e.key === "ArrowRight" || e.key === "ArrowLeft") e.preventDefault(), e.key === "ArrowRight" ? this._move(1) : this._current.index > this._firstIndex && this._move(-1);
7416
+ else if (e.key === "Tab") {
7417
+ let t = Array.from(this._card.querySelectorAll("button")).filter((e) => !e.hidden), n = t[0], r = t[t.length - 1], i = document.activeElement;
7418
+ !this._card.contains(i) || e.shiftKey && (i === n || i === this._card) ? (e.preventDefault(), (e.shiftKey ? r : n).focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
7419
+ }
7420
+ }
7421
+ }
7422
+ _teardown() {
7423
+ if (!this._layer) return;
7424
+ document.removeEventListener("keydown", this._onKey, !0), document.removeEventListener("focusin", this._onFocusIn), L(this._layer), this._layer.remove(), this._layer = null, this._current = null;
7425
+ let e = this._returnFocus;
7426
+ this._returnFocus = null, e?.isConnected && e.focus?.();
7427
+ }
7428
+ async _close(e) {
7429
+ let t = this._run;
7430
+ this._teardown();
7431
+ let n = this._store();
7432
+ try {
7433
+ n && t === this._run && await n.markSeen(this.tourId);
7434
+ } finally {
7435
+ this._finish(e);
7436
+ }
7437
+ }
7438
+ _finish(e) {
7439
+ this._run++, this._running = !1, this.hasAttribute("open") && this.removeAttribute("open"), this.dispatchEvent(new CustomEvent("wui-tour:close", {
7440
+ bubbles: !0,
7441
+ detail: { reason: e }
7442
+ }));
7443
+ }
7444
+ }, Mi = [
7091
7445
  "none",
7092
7446
  "single",
7093
7447
  "multiple"
7094
- ], Si = "parentId", Ci = "Loading", wi = "Could not load. Try again.", Ti = ":scope > input[data-wui-mirror]", Ei = [
7448
+ ], Ni = "parentId", Pi = "Loading", Fi = "Could not load. Try again.", Ii = ":scope > input[data-wui-mirror]", Li = [
7095
7449
  "nodes",
7096
7450
  "selection",
7097
7451
  "selected",
@@ -7099,14 +7453,14 @@ var pi = class extends e {
7099
7453
  "loadChildren",
7100
7454
  "loadUrl",
7101
7455
  "name"
7102
- ], Di = 0;
7456
+ ], Ri = 0;
7103
7457
  function X(e, t, n) {
7104
7458
  let r = document.createElement(e);
7105
7459
  t && (r.className = t);
7106
7460
  for (let [e, t] of Object.entries(n ?? {})) t != null && r.setAttribute(e, String(t));
7107
7461
  return r;
7108
7462
  }
7109
- var Oi = class extends e {
7463
+ var zi = class extends e {
7110
7464
  static get observedAttributes() {
7111
7465
  return [
7112
7466
  "selection",
@@ -7118,7 +7472,7 @@ var Oi = class extends e {
7118
7472
  ];
7119
7473
  }
7120
7474
  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({
7475
+ super(), this._uid = `wui-tree-${++Ri}`, 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
7476
  getVisibleOptions: () => this._visible().map((e) => this._els.get(e.id)?.row),
7123
7477
  getActive: () => this._visible().findIndex((e) => e.id === this._focusId),
7124
7478
  setActive: (e) => this._focusNode(this._visible()[e]),
@@ -7133,7 +7487,7 @@ var Oi = class extends e {
7133
7487
  }
7134
7488
  connectedCallback() {
7135
7489
  let e = {};
7136
- for (let t of Ei) Object.hasOwn(this, t) && (e[t] = this[t], delete this[t]);
7490
+ for (let t of Li) Object.hasOwn(this, t) && (e[t] = this[t], delete this[t]);
7137
7491
  if (!this._ready) {
7138
7492
  this._ready = !0;
7139
7493
  let e = this._readScript();
@@ -7159,7 +7513,7 @@ var Oi = class extends e {
7159
7513
  }
7160
7514
  get selection() {
7161
7515
  let e = this.getAttribute("selection");
7162
- return xi.includes(e) ? e : "none";
7516
+ return Mi.includes(e) ? e : "none";
7163
7517
  }
7164
7518
  set selection(e) {
7165
7519
  this.setAttribute("selection", String(e));
@@ -7203,13 +7557,13 @@ var Oi = class extends e {
7203
7557
  e == null ? this.removeAttribute("name") : this.setAttribute("name", String(e));
7204
7558
  }
7205
7559
  get loadingText() {
7206
- return this.getAttribute("loading-text") ?? Ci;
7560
+ return this.getAttribute("loading-text") ?? Pi;
7207
7561
  }
7208
7562
  set loadingText(e) {
7209
7563
  this.setAttribute("loading-text", String(e ?? ""));
7210
7564
  }
7211
7565
  get errorText() {
7212
- return this.getAttribute("error-text") ?? wi;
7566
+ return this.getAttribute("error-text") ?? Fi;
7213
7567
  }
7214
7568
  set errorText(e) {
7215
7569
  this.setAttribute("error-text", String(e ?? ""));
@@ -7398,8 +7752,8 @@ var Oi = class extends e {
7398
7752
  let t = this.getAttribute("load-url");
7399
7753
  if (!t) throw Error("<wui-tree> has a node with children to load but no loadChildren or load-url.");
7400
7754
  let n = new URL(t, window.location.href);
7401
- n.searchParams.set(Si, e.id);
7402
- let r = await A(n.href, { headers: { Accept: "application/json" } });
7755
+ n.searchParams.set(Ni, e.id);
7756
+ let r = await fe(n.href, { headers: { Accept: "application/json" } });
7403
7757
  if (!r.ok) throw Error(`Loading children answered ${r.kind}.`);
7404
7758
  return JSON.parse(r.html);
7405
7759
  }
@@ -7419,7 +7773,7 @@ var Oi = class extends e {
7419
7773
  let e = this.selection;
7420
7774
  if (e === "multiple") z(this, this.values);
7421
7775
  else if (e === "single") R(this, this._selected ?? "");
7422
- else for (let e of this.querySelectorAll(Ti)) e.remove();
7776
+ else for (let e of this.querySelectorAll(Ii)) e.remove();
7423
7777
  }
7424
7778
  _render() {
7425
7779
  if (!this._list) return;
@@ -7471,7 +7825,7 @@ var Oi = class extends e {
7471
7825
  row: s
7472
7826
  }), o;
7473
7827
  }
7474
- }, ki = "wui-wizard-step", Ai = class extends e {
7828
+ }, Bi = "wui-wizard-step", Vi = class extends e {
7475
7829
  static get observedAttributes() {
7476
7830
  return [
7477
7831
  "active",
@@ -7506,7 +7860,7 @@ var Oi = class extends e {
7506
7860
  this._beforeNext = typeof e == "function" ? e : null;
7507
7861
  }
7508
7862
  get _steps() {
7509
- return [...this.querySelectorAll(`:scope > ${ki}`)];
7863
+ return [...this.querySelectorAll(`:scope > ${Bi}`)];
7510
7864
  }
7511
7865
  refresh() {
7512
7866
  this._rendered && this._renderChrome();
@@ -7545,7 +7899,7 @@ var Oi = class extends e {
7545
7899
  }
7546
7900
  _reconcileSteps() {
7547
7901
  let e = this._steps, t = this._known;
7548
- if (this._known = e, ji(e, t)) return e;
7902
+ if (this._known = e, Hi(e, t)) return e;
7549
7903
  let n = (n) => new Set([...n].map((n) => e.indexOf(t[n])).filter((e) => e >= 0));
7550
7904
  this._skipped = n(this._skipped), this._invalid = n(this._invalid);
7551
7905
  let r = t[this._active];
@@ -7565,7 +7919,7 @@ var Oi = class extends e {
7565
7919
  _onStepsMutated() {
7566
7920
  if (!this._rendered) return;
7567
7921
  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());
7922
+ (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && Hi(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
7569
7923
  }
7570
7924
  _syncPanels(e) {
7571
7925
  e.forEach((e, t) => {
@@ -7590,15 +7944,15 @@ var Oi = class extends e {
7590
7944
  return e.map((r, o) => {
7591
7945
  let s = this._stepStatus(r, o), c = r.getAttribute("label") || "", l = r.getAttribute("description") || "", u = r.getAttribute("icon") || "", d = o + 1, f;
7592
7946
  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}`;
7947
+ let p = s === "pending" ? "step" : `step ${s}`, m = s === "active" ? " aria-current=\"step\"" : "", h = a || o < this._active, g = l ? `<span class="step-desc">${Ui(l)}</span>` : "", _;
7948
+ _ = t ? `<span class="step-circle">${f}</span><span class="step-text"><span class="step-index">Step ${d}</span><span class="step-label">${Ui(c)}</span>${g}</span>` : n ? `<span class="step-circle">${f}</span><span class="step-index">Step ${d}</span><span class="step-label">${Ui(c)}</span>${g}` : `<span class="step-circle">${f}</span><span class="step-label">${Ui(c)}</span>${g}`;
7595
7949
  let v = h ? `<button type="button" class="${p}" data-step="${o}"${m}>${_}</button>` : `<div class="${p}"${m}>${_}</div>`;
7596
7950
  return t && i && o < e.length - 1 ? `${v}<span class="step-line${s === "done" ? " done" : ""}" aria-hidden="true"></span>` : v;
7597
7951
  }).join("");
7598
7952
  }
7599
7953
  _footerHtml(e) {
7600
7954
  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>`;
7955
+ return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${B("arrow-left", { className: "me-2" })}${Ui(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Ui(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Ui(o)}${B("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Ui(c)}</button>`}</span>`;
7602
7956
  }
7603
7957
  _wire() {
7604
7958
  this._teardown(), this._onHeaderClick = (e) => {
@@ -7672,7 +8026,7 @@ var Oi = class extends e {
7672
8026
  _reflectActive(e) {
7673
8027
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
7674
8028
  }
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 {
8029
+ }, Hi = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Ui = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Wi = class extends e {
7676
8030
  static get observedAttributes() {
7677
8031
  return [
7678
8032
  "label",
@@ -7686,8 +8040,8 @@ var Oi = class extends e {
7686
8040
  let e = this.closest("wui-wizard");
7687
8041
  e && typeof e.refresh == "function" && e.refresh();
7688
8042
  }
7689
- }, Pi = 2e3;
7690
- async function Fi(e) {
8043
+ }, Gi = 2e3;
8044
+ async function Ki(e) {
7691
8045
  try {
7692
8046
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
7693
8047
  } catch {}
@@ -7702,14 +8056,14 @@ async function Fi(e) {
7702
8056
  }
7703
8057
  //#endregion
7704
8058
  //#region src/fileValidation.js
7705
- var Ii = "image/png,image/jpeg,image/webp", Li = 5, Ri = {
8059
+ var qi = "image/png,image/jpeg,image/webp", Ji = 5, Yi = {
7706
8060
  "image/png": [".png"],
7707
8061
  "image/jpeg": [".jpg", ".jpeg"],
7708
8062
  "image/webp": [".webp"],
7709
8063
  "image/gif": [".gif"],
7710
8064
  "image/svg+xml": [".svg"],
7711
8065
  "application/pdf": [".pdf"]
7712
- }, zi = {
8066
+ }, Xi = {
7713
8067
  "image/png": "PNG",
7714
8068
  "image/jpeg": "JPG",
7715
8069
  "image/webp": "WEBP",
@@ -7723,7 +8077,7 @@ var Ii = "image/png,image/jpeg,image/webp", Li = 5, Ri = {
7723
8077
  ".gif": "GIF",
7724
8078
  ".svg": "SVG",
7725
8079
  ".pdf": "PDF"
7726
- }, Bi = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Vi = [
8080
+ }, Zi = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Qi = [
7727
8081
  ".png",
7728
8082
  ".jpg",
7729
8083
  ".jpeg",
@@ -7734,64 +8088,71 @@ var Ii = "image/png,image/jpeg,image/webp", Li = 5, Ri = {
7734
8088
  ".avif",
7735
8089
  ".heic"
7736
8090
  ];
7737
- function Hi(e) {
8091
+ function $i(e) {
7738
8092
  if (!e) return !1;
7739
8093
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
7740
8094
  if (t) return t.startsWith("image/");
7741
8095
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
7742
- return Vi.some((e) => r.endsWith(e));
8096
+ return Qi.some((e) => r.endsWith(e));
8097
+ }
8098
+ function ea(e) {
8099
+ if (!e) return !1;
8100
+ let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
8101
+ if (t) return t === "application/pdf";
8102
+ let n = typeof e == "string" ? e : e.name || e.url || "";
8103
+ return String(n).toLowerCase().split(/[?#]/)[0].endsWith(".pdf");
7743
8104
  }
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;
8105
+ function ta(e) {
8106
+ let t = Zi(e);
8107
+ return t.length ? t.every((e) => e.startsWith(".") ? Qi.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
7747
8108
  }
7748
- function Wi(e) {
8109
+ function na(e) {
7749
8110
  let t = [];
7750
- for (let n of Bi(e)) {
7751
- let e = zi[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
8111
+ for (let n of Zi(e)) {
8112
+ let e = Xi[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
7752
8113
  t.includes(e) || t.push(e);
7753
8114
  }
7754
8115
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
7755
8116
  }
7756
- function Gi(e, t) {
7757
- let n = Bi(t);
8117
+ function ra(e, t) {
8118
+ let n = Zi(t);
7758
8119
  if (!n.length) return !0;
7759
8120
  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)));
8121
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Yi[e] || []).some((e) => i.endsWith(e)));
7761
8122
  }
7762
- function Ki(e, t = {}) {
8123
+ function ia(e, t = {}) {
7763
8124
  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.`;
8125
+ let n = t.accept === void 0 ? qi : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
8126
+ return ra(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${na(n)} file.`;
7766
8127
  }
7767
8128
  //#endregion
7768
8129
  //#region src/inputMask.js
7769
- var qi = /[0-9]/, Ji = {
7770
- 9: qi,
8130
+ var aa = /[0-9]/, oa = {
8131
+ 9: aa,
7771
8132
  A: /[A-Za-z]/,
7772
8133
  "*": /[0-9A-Za-z]/
7773
- }, Yi = /[9A*]/, Xi = /* @__PURE__ */ new Set([
8134
+ }, sa = /[9A*]/, ca = /* @__PURE__ */ new Set([
7774
8135
  "text",
7775
8136
  "tel",
7776
8137
  "search",
7777
8138
  "url",
7778
8139
  "password"
7779
- ]), Zi = (e) => {
8140
+ ]), la = (e) => {
7780
8141
  let t = e.replace(/\D/g, "");
7781
8142
  return t.length === 12 && t.startsWith("91") ? t.slice(2) : t.length === 11 && t.startsWith("0") ? t.slice(1) : e;
7782
- }, Qi = (e) => {
8143
+ }, ua = (e) => {
7783
8144
  let t = Number(e.slice(0, 2)), n = Number(e.slice(2, 4)), r = Number(e.slice(4, 8));
7784
8145
  if (r < 1) return !1;
7785
8146
  let i = new Date(Date.UTC(r, n - 1, t));
7786
8147
  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) => {
8148
+ }, da = (e) => e.length <= 3 ? e : `${e.slice(0, -3).replace(/\B(?=(\d{2})+(?!\d))/g, ",")},${e.slice(-3)}`, fa = (e) => {
7788
8149
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());
7789
8150
  return t ? `${t[3]}-${t[2]}-${t[1]}` : e;
7790
8151
  };
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;
8152
+ function pa(e, { upper: t = !1, normalize: n, valid: r, post: i = (e) => e, message: a = "Enter the full value" } = {}) {
8153
+ let o = [...e].map((e) => oa[e] ? { re: oa[e] } : { lit: e }), s = o.filter((e) => e.re).length;
7793
8154
  return {
7794
- inputMode: o.every((e) => !e.re || e.re === qi) ? "numeric" : "text",
8155
+ inputMode: o.every((e) => !e.re || e.re === aa) ? "numeric" : "text",
7795
8156
  normalize: n,
7796
8157
  post: i,
7797
8158
  message: a,
@@ -7816,18 +8177,18 @@ function ta(e, { upper: t = !1, normalize: n, valid: r, post: i = (e) => e, mess
7816
8177
  isValid: (e) => e.length === s && (!r || r(e))
7817
8178
  };
7818
8179
  }
7819
- function na() {
8180
+ function ma() {
7820
8181
  return {
7821
8182
  inputMode: "decimal",
7822
8183
  post: (e) => e,
7823
8184
  message: "Enter a valid amount",
7824
8185
  extract(e) {
7825
8186
  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);
8187
+ for (let i of e) aa.test(i) ? n ? r < 2 && (t += i, r++) : t += i : i === "." && !n && (n = !0, t += i);
7827
8188
  return t.startsWith(".") && (t = `0${t}`), t.replace(/^0+(?=\d)/, "");
7828
8189
  },
7829
8190
  layout(e) {
7830
- let [t, n] = e.split("."), r = $i(t) + (e.includes(".") ? `.${n}` : "");
8191
+ let [t, n] = e.split("."), r = da(t) + (e.includes(".") ? `.${n}` : "");
7831
8192
  return {
7832
8193
  text: r,
7833
8194
  isRaw: [...r].map((e) => e !== ",")
@@ -7836,75 +8197,75 @@ function na() {
7836
8197
  isValid: (e) => /^\d+(\.\d{1,2})?$/.test(e)
7837
8198
  };
7838
8199
  }
7839
- var ra = {
7840
- "phone-in": () => ta("99999 99999", {
7841
- normalize: Zi,
8200
+ var ha = {
8201
+ "phone-in": () => pa("99999 99999", {
8202
+ normalize: la,
7842
8203
  valid: (e) => /^[6-9]/.test(e),
7843
8204
  message: "Enter a 10-digit mobile number"
7844
8205
  }),
7845
- pan: () => ta("AAAAA9999A", {
8206
+ pan: () => pa("AAAAA9999A", {
7846
8207
  upper: !0,
7847
8208
  valid: (e) => /^[A-Z]{5}\d{4}[A-Z]$/.test(e),
7848
8209
  message: "Enter a valid PAN"
7849
8210
  }),
7850
- gstin: () => ta("99AAAAA9999A***", {
8211
+ gstin: () => pa("99AAAAA9999A***", {
7851
8212
  upper: !0,
7852
8213
  valid: (e) => /^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),
7853
8214
  message: "Enter a valid GSTIN"
7854
8215
  }),
7855
- aadhaar: () => ta("9999 9999 9999", {
8216
+ aadhaar: () => pa("9999 9999 9999", {
7856
8217
  valid: (e) => /^[2-9]/.test(e),
7857
8218
  message: "Enter a valid 12-digit Aadhaar number"
7858
8219
  }),
7859
- ifsc: () => ta("AAAA*******", {
8220
+ ifsc: () => pa("AAAA*******", {
7860
8221
  upper: !0,
7861
8222
  valid: (e) => /^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),
7862
8223
  message: "Enter a valid IFSC"
7863
8224
  }),
7864
- "pin-code": () => ta("999999", {
8225
+ "pin-code": () => pa("999999", {
7865
8226
  valid: (e) => /^[1-9]/.test(e),
7866
8227
  message: "Enter a valid 6-digit PIN code"
7867
8228
  }),
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,
8229
+ date: () => pa("99-99-9999", {
8230
+ normalize: fa,
8231
+ valid: ua,
8232
+ post: (e, t) => e.length === 8 && ua(e) ? `${e.slice(4)}-${e.slice(2, 4)}-${e.slice(0, 2)}` : t,
7872
8233
  message: "Enter a valid date as DD-MM-YYYY"
7873
8234
  }),
7874
- amount: na
7875
- }, ia = Object.keys(ra), aa = (e) => {
8235
+ amount: ma
8236
+ }, ga = Object.keys(ha), _a = (e) => {
7876
8237
  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) {
8238
+ return Object.hasOwn(ha, t) ? t : void 0;
8239
+ }, va = (e) => sa.test(String(e)) && _a(e) === void 0, ya = /* @__PURE__ */ new Map();
8240
+ function ba(e) {
7880
8241
  if (e == null || e === "") return null;
7881
8242
  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);
8243
+ return ya.has(t) || (va(t) ? ya.set(t, pa(t)) : ya.set(t, Object.hasOwn(ha, t) ? ha[t]() : null)), ya.get(t);
7883
8244
  }
7884
8245
  var Z = (e, t) => e.normalize ? e.normalize(t) : t;
7885
- function la(e, t) {
7886
- let n = ca(e);
8246
+ function xa(e, t) {
8247
+ let n = ba(e);
7887
8248
  return n ? n.extract(Z(n, String(t ?? ""))) : String(t ?? "");
7888
8249
  }
7889
- function ua(e, t) {
7890
- let n = ca(e);
8250
+ function Sa(e, t) {
8251
+ let n = ba(e);
7891
8252
  if (!n) return String(t ?? "");
7892
8253
  let r = n.extract(Z(n, String(t ?? "")));
7893
8254
  return n.post(r, n.layout(r).text);
7894
8255
  }
7895
- function da(e, t) {
7896
- let n = ca(e);
8256
+ function Ca(e, t) {
8257
+ let n = ba(e);
7897
8258
  return n ? n.layout(n.extract(Z(n, String(t ?? "")))).text : String(t ?? "");
7898
8259
  }
7899
- var fa = (e, t) => {
8260
+ var wa = (e, t) => {
7900
8261
  if (t <= 0) return 0;
7901
8262
  let n = 0;
7902
8263
  for (let r = 0; r < e.length; r++) if (e[r] && ++n === t) return r + 1;
7903
8264
  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());
8265
+ }, Ta = /* @__PURE__ */ new WeakMap(), Ea = (e) => Ta.get(e)?.(), Da = /* @__PURE__ */ new WeakMap();
8266
+ function Oa(e, t, n, r) {
8267
+ let i = e.getAll(t), a = Da.get(e);
8268
+ a || Da.set(e, a = /* @__PURE__ */ new Set());
7908
8269
  let o = i.findIndex((e, r) => e === n && !a.has(`${t}\u0000${r}`));
7909
8270
  if (!(o < 0)) {
7910
8271
  if (a.add(`${t}\u0000${o}`), i[o] = r, i.length === 1) {
@@ -7915,7 +8276,7 @@ function ga(e, t, n, r) {
7915
8276
  for (let n of i) e.append(t, n);
7916
8277
  }
7917
8278
  }
7918
- function _a(e) {
8279
+ function ka(e) {
7919
8280
  let t = null, n = null, r = !1, i = (t, n) => n === null ? e.removeAttribute(t) : e.setAttribute(t, n), a, o, s = () => {
7920
8281
  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
8282
  };
@@ -7928,18 +8289,18 @@ function _a(e) {
7928
8289
  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
8290
  };
7930
8291
  }
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 () => {};
8292
+ function Aa(e, { mask: t, postFormatted: n = !1, onChange: r, onInvalidChange: i } = {}) {
8293
+ let a = ba(t);
8294
+ if (!a || !ca.has(e.type)) return () => {};
7934
8295
  let o = Object.getPrototypeOf(e), s = Object.getOwnPropertyDescriptor(o, "value").set, c = !e.hasAttribute("inputmode");
7935
8296
  c && e.setAttribute("inputmode", a.inputMode);
7936
- let l = i ?? _a(e), u = null, d = !1, f = !1, p = !1, m = "", h = "", g, _ = () => {
8297
+ let l = i ?? ka(e), u = null, d = !1, f = !1, p = !1, m = "", h = "", g, _ = () => {
7937
8298
  let e = p ? m : "";
7938
8299
  e !== h && (h = e, l(h));
7939
8300
  }, v = (t, n, i) => {
7940
8301
  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);
8302
+ if (e.value !== l && (s.call(e, l), document.activeElement === e && ca.has(e.type))) {
8303
+ let t = wa(d, o);
7943
8304
  e.setSelectionRange(t, t);
7944
8305
  }
7945
8306
  e.dataset.maskRaw = c, m = c && !a.isValid(c) ? a.message : "", e.setCustomValidity(m), _(), i && c !== u && r?.(c, l), u = c;
@@ -7960,13 +8321,13 @@ function va(e, { mask: t, postFormatted: n = !1, onChange: r, onInvalidChange: i
7960
8321
  if (d || f || t.isComposing) return;
7961
8322
  let n = t.inputType === "insertText" && (t.data?.length ?? 0) <= 1 || t.inputType?.startsWith("delete") ? e.value : Z(a, e.value);
7962
8323
  v(n, e.selectionStart ?? n.length, !0);
7963
- }, C = () => {
8324
+ }, ee = () => {
7964
8325
  f = !0;
7965
- }, w = () => {
8326
+ }, C = () => {
7966
8327
  f = !1;
7967
8328
  let t = Z(a, e.value);
7968
8329
  v(t, e.selectionStart ?? t.length, !0), x();
7969
- }, ee = (t) => {
8330
+ }, te = (t) => {
7970
8331
  let n = t.inputType === "deleteContentBackward";
7971
8332
  if (!n && t.inputType !== "deleteContentForward" || t.isComposing) return;
7972
8333
  let r = e.selectionStart;
@@ -7974,67 +8335,67 @@ function va(e, { mask: t, postFormatted: n = !1, onChange: r, onInvalidChange: i
7974
8335
  let { isRaw: i } = a.layout(a.extract(e.value)), o = n ? r - 1 : r;
7975
8336
  for (; o >= 0 && o < i.length && !i[o];) o += n ? -1 : 1;
7976
8337
  o !== (n ? r - 1 : r) && (t.preventDefault(), !(o < 0 || o >= i.length) && (v(e.value.slice(0, o) + e.value.slice(o + 1), n ? o : r, !0), x()));
7977
- }, te = (t) => {
8338
+ }, ne = (t) => {
7978
8339
  if (e.readOnly || e.disabled) return;
7979
8340
  let n = t.clipboardData?.getData("text");
7980
8341
  if (n == null) return;
7981
8342
  t.preventDefault();
7982
8343
  let r = Z(a, n), i = e.selectionStart ?? e.value.length, o = e.selectionEnd ?? i;
7983
8344
  v(e.value.slice(0, i) + r + e.value.slice(o), i + r.length, !0), x();
7984
- }, ne = () => {
8345
+ }, re = () => {
7985
8346
  let t = a.extract(e.value);
7986
8347
  return a.post(t, a.layout(t).text);
7987
- }, T = () => {
8348
+ }, w = () => {
7988
8349
  p = !0, _();
7989
8350
  };
7990
- 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
- let E = e.form, re = (t) => {
7992
- e.name && !e.disabled && ga(t.formData, e.name, e.value, ne());
7993
- }, ie = () => {
8351
+ e.addEventListener("input", S), e.addEventListener("beforeinput", te), e.addEventListener("paste", ne), e.addEventListener("compositionstart", ee), e.addEventListener("compositionend", C), e.addEventListener("blur", w), e.addEventListener("invalid", w);
8352
+ let T = e.form, ie = (t) => {
8353
+ e.name && !e.disabled && Oa(t.formData, e.name, e.value, re());
8354
+ }, ae = () => {
7994
8355
  clearTimeout(g), g = setTimeout(() => {
7995
8356
  p = !1, v(Z(a, e.value), e.value.length, !0);
7996
8357
  }, 0);
7997
8358
  };
7998
- n || (E?.addEventListener("formdata", re), pa.set(e, ne)), E?.addEventListener("reset", ie), E?.addEventListener("submit", T);
7999
- let D = Z(a, e.value);
8000
- 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");
8359
+ n || (T?.addEventListener("formdata", ie), Ta.set(e, re)), T?.addEventListener("reset", ae), T?.addEventListener("submit", w);
8360
+ let E = Z(a, e.value);
8361
+ return v(E, E.length, !1), () => {
8362
+ clearTimeout(g), e.removeEventListener("input", S), e.removeEventListener("beforeinput", te), e.removeEventListener("paste", ne), e.removeEventListener("compositionstart", ee), e.removeEventListener("compositionend", C), e.removeEventListener("blur", w), e.removeEventListener("invalid", w), T?.removeEventListener("formdata", ie), T?.removeEventListener("reset", ae), T?.removeEventListener("submit", w), Ta.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
8363
  };
8003
8364
  }
8004
- function ya() {
8365
+ function ja() {
8005
8366
  let e = typeof window > "u" ? void 0 : window.jQuery?.validator?.prototype;
8006
8367
  if (!e || e.wuiMaskHook) return;
8007
8368
  let t = e.elementValue;
8008
8369
  e.elementValue = function(e) {
8009
- let n = ma(e);
8370
+ let n = Ea(e);
8010
8371
  return n === void 0 ? t.call(this, e) : n;
8011
8372
  }, e.wuiMaskHook = !0;
8012
8373
  }
8013
- var ba = /* @__PURE__ */ new WeakMap(), xa, Sa = (e) => {
8014
- ba.has(e) || ba.set(e, va(e, {
8374
+ var Ma = /* @__PURE__ */ new WeakMap(), Na, Pa = (e) => {
8375
+ Ma.has(e) || Ma.set(e, Aa(e, {
8015
8376
  mask: e.dataset.appMask,
8016
8377
  postFormatted: e.hasAttribute("data-mask-post-formatted")
8017
8378
  }));
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) => {
8379
+ }, Fa = (e) => e.nodeType === 1 ? [...e.matches("input[data-app-mask]") ? [e] : [], ...e.querySelectorAll("input[data-app-mask]")] : [];
8380
+ function Ia() {
8381
+ Na || typeof MutationObserver > "u" || (Na = new MutationObserver((e) => {
8021
8382
  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);
8383
+ for (let e of t.removedNodes) for (let t of Fa(e)) Ma.get(t)?.(), Ma.delete(t);
8384
+ for (let e of t.addedNodes) for (let t of Fa(e)) Pa(t);
8024
8385
  }
8025
- }), xa.observe(document.documentElement, {
8386
+ }), Na.observe(document.documentElement, {
8026
8387
  childList: !0,
8027
8388
  subtree: !0
8028
8389
  }));
8029
8390
  }
8030
- function Ta(e = document) {
8031
- ya();
8032
- for (let t of e.querySelectorAll("input[data-app-mask]")) Sa(t);
8033
- e === document && wa();
8391
+ function La(e = document) {
8392
+ ja();
8393
+ for (let t of e.querySelectorAll("input[data-app-mask]")) Pa(t);
8394
+ e === document && Ia();
8034
8395
  }
8035
8396
  //#endregion
8036
8397
  //#region src/passwordRules.js
8037
- var Ea = {
8398
+ var Ra = {
8038
8399
  minLength: 10,
8039
8400
  uppercase: !0,
8040
8401
  lowercase: !0,
@@ -8042,15 +8403,15 @@ var Ea = {
8042
8403
  special: !0,
8043
8404
  uniqueChars: 0,
8044
8405
  customRules: []
8045
- }, Da = "Password requirements";
8046
- function Oa(e) {
8047
- return e === !0 || e == null ? { ...Ea } : {
8048
- ...Ea,
8406
+ }, za = "Password requirements";
8407
+ function Ba(e) {
8408
+ return e === !0 || e == null ? { ...Ra } : {
8409
+ ...Ra,
8049
8410
  ...e
8050
8411
  };
8051
8412
  }
8052
- function ka(e) {
8053
- let t = Oa(e), n = [];
8413
+ function Va(e) {
8414
+ let t = Ba(e), n = [];
8054
8415
  if (t.minLength > 0 && n.push({
8055
8416
  key: "length",
8056
8417
  label: `At least ${t.minLength} characters long`,
@@ -8089,47 +8450,47 @@ function ka(e) {
8089
8450
  }
8090
8451
  return n;
8091
8452
  }
8092
- function Aa(e, t) {
8453
+ function Ha(e, t) {
8093
8454
  let n = e == null ? "" : String(e);
8094
- return ka(t).map((e) => ({
8455
+ return Va(t).map((e) => ({
8095
8456
  key: e.key,
8096
8457
  label: e.label,
8097
8458
  met: e.test(n)
8098
8459
  }));
8099
8460
  }
8100
- function ja(e, t) {
8101
- return Aa(e, t).every((e) => e.met);
8461
+ function Ua(e, t) {
8462
+ return Ha(e, t).every((e) => e.met);
8102
8463
  }
8103
8464
  //#endregion
8104
8465
  //#region src/tableSelect.js
8105
- var Ma = "Select all rows", Na = "Select row", Q = "wui-select-cell", Pa = (e, t) => {
8466
+ var Wa = "Select all rows", Ga = "Select row", Q = "wui-select-cell", Ka = (e, t) => {
8106
8467
  let n = e.createElement("input");
8107
8468
  return n.type = "checkbox", n.className = "wui-check", n.setAttribute("aria-label", t), n;
8108
8469
  };
8109
- function Fa(e = document) {
8470
+ function qa(e = document) {
8110
8471
  let t = e.createElement("th");
8111
- return t.className = Q, t.appendChild(Pa(e, Ma)), t;
8472
+ return t.className = Q, t.appendChild(Ka(e, Wa)), t;
8112
8473
  }
8113
- function Ia(e = document) {
8474
+ function Ja(e = document) {
8114
8475
  let t = e.createElement("td");
8115
- return t.className = Q, t.appendChild(Pa(e, Na)), t;
8476
+ return t.className = Q, t.appendChild(Ka(e, Ga)), t;
8116
8477
  }
8117
- function La(e = document) {
8478
+ function Ya(e = document) {
8118
8479
  let t = e.createElement("td");
8119
8480
  return t.className = Q, t;
8120
8481
  }
8121
- var Ra = (e) => e.firstElementChild?.classList.contains(Q);
8122
- function za(e) {
8123
- for (let t of e) Ra(t) || t.insertBefore(Ia(t.ownerDocument), t.firstChild);
8482
+ var Xa = (e) => e.firstElementChild?.classList.contains(Q);
8483
+ function Za(e) {
8484
+ for (let t of e) Xa(t) || t.insertBefore(Ja(t.ownerDocument), t.firstChild);
8124
8485
  }
8125
- function Ba(e) {
8486
+ function Qa(e) {
8126
8487
  let t = e.querySelector("thead tr");
8127
8488
  if (!t) return null;
8128
- Ra(t) || t.insertBefore(Fa(e.ownerDocument), t.firstChild), za(e.querySelectorAll("tbody tr"));
8129
- for (let t of e.querySelectorAll("tfoot tr")) Ra(t) || t.insertBefore(La(e.ownerDocument), t.firstChild);
8489
+ Xa(t) || t.insertBefore(qa(e.ownerDocument), t.firstChild), Za(e.querySelectorAll("tbody tr"));
8490
+ for (let t of e.querySelectorAll("tfoot tr")) Xa(t) || t.insertBefore(Ya(e.ownerDocument), t.firstChild);
8130
8491
  return t.querySelector(`.${Q} .wui-check`);
8131
8492
  }
8132
- function Va(e) {
8493
+ function $a(e) {
8133
8494
  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;
8134
8495
  t && (t.checked = r > 0 && i === r, t.indeterminate = i > 0 && i < r);
8135
8496
  for (let t of e.querySelectorAll("tbody tr")) t.classList.toggle("is-selected", !!t.querySelector(".wui-check")?.checked);
@@ -8140,12 +8501,12 @@ function Va(e) {
8140
8501
  }
8141
8502
  //#endregion
8142
8503
  //#region src/serverTable.js
8143
- var Ha = Object.freeze([
8504
+ var eo = Object.freeze([
8144
8505
  "page",
8145
8506
  "pageSize",
8146
8507
  "sortBy",
8147
8508
  "sortOrder"
8148
- ]), Ua = "search", Wa = Object.freeze({
8509
+ ]), to = "search", no = Object.freeze({
8149
8510
  loading: "Loading rows",
8150
8511
  error: "These rows did not load. Try again.",
8151
8512
  network: "The connection dropped before the rows loaded. Check it and try again.",
@@ -8154,28 +8515,28 @@ var Ha = Object.freeze([
8154
8515
  actionFailed: "That did not work. Try again.",
8155
8516
  actionForbidden: "You do not have permission to do that.",
8156
8517
  empty: "No rows"
8157
- }), Ga = /* @__PURE__ */ new WeakMap(), Ka = (e, t) => {
8518
+ }), ro = 5, io = /* @__PURE__ */ new WeakMap(), ao = (e, t) => {
8158
8519
  let n = Number(e);
8159
8520
  return Number.isInteger(n) ? n : t;
8160
- }, qa = (e) => ({
8161
- total: Ka(e.dataset.total, 0),
8162
- page: Ka(e.dataset.page, 1),
8163
- pageSize: Ka(e.dataset.pageSize, 0),
8521
+ }, oo = (e) => ({
8522
+ total: ao(e.dataset.total, 0),
8523
+ page: ao(e.dataset.page, 1),
8524
+ pageSize: ao(e.dataset.pageSize, 0),
8164
8525
  sortBy: e.dataset.sortBy || "",
8165
8526
  sortOrder: e.dataset.sortOrder === "desc" ? "desc" : "asc"
8166
- }), Ja = (e, t) => {
8527
+ }), so = (e, t) => {
8167
8528
  e && window.WUI?.toast?.(e, { variant: t });
8168
8529
  };
8169
- function Ya(e = document) {
8530
+ function co(e = document) {
8170
8531
  let t = e.querySelectorAll ? [...e.querySelectorAll("[data-wui-server]")] : [];
8171
8532
  e instanceof Element && e.matches("[data-wui-server]") && t.unshift(e);
8172
- for (let e of t) Ga.has(e) || Ga.set(e, Za(e));
8533
+ for (let e of t) io.has(e) || io.set(e, uo(e));
8173
8534
  }
8174
- function Xa(e) {
8535
+ function lo(e) {
8175
8536
  let t = e instanceof Element ? e.closest("[data-wui-server]") : null;
8176
- return t && Ga.get(t) || null;
8537
+ return t && io.get(t) || null;
8177
8538
  }
8178
- function Za(e) {
8539
+ function uo(e) {
8179
8540
  let t = e.querySelector(".table-wrap"), n = t?.querySelector(":scope > table"), r = e.dataset.src;
8180
8541
  if (!n || !r) throw Error("A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.");
8181
8542
  let i = t.querySelector(":scope > [data-wui-table-state]"), a = e.querySelector("[data-wui-table-pager]"), o = e.querySelector("[data-wui-table-status]"), s = {
@@ -8184,11 +8545,11 @@ function Za(e) {
8184
8545
  filtersForm: e.dataset.filtersForm || null,
8185
8546
  filtersRegion: e.dataset.filtersRegion || null,
8186
8547
  searchInput: e.dataset.searchInput || null,
8187
- loadingText: e.dataset.loadingText || Wa.loading,
8188
- errorText: e.dataset.errorText || Wa.error
8189
- }, 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]");
8548
+ loadingText: e.dataset.loadingText || no.loading,
8549
+ errorText: e.dataset.errorText || no.error
8550
+ }, 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 = pe(), p = new AbortController(), m = { signal: p.signal }, h = n.querySelector(":scope > tbody[data-wui-rows]");
8190
8551
  if (!h) throw Error("A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).");
8191
- let g = qa(h), _ = null, v = null, y = (e) => {
8552
+ let g = oo(h), _ = null, v = null, y = (e) => {
8192
8553
  let t = new URLSearchParams();
8193
8554
  for (let [n, r] of new URLSearchParams(e)) l.has(n) || t.append(n, r);
8194
8555
  return t;
@@ -8199,33 +8560,33 @@ function Za(e) {
8199
8560
  let t = new URL(c.href);
8200
8561
  for (let [n, r] of e) l.has(n) || t.searchParams.append(n, r);
8201
8562
  return t.origin === window.location.origin ? `${t.pathname}${t.search}` : t.href;
8202
- }, C = (e, t) => {
8563
+ }, ee = (e, t) => {
8203
8564
  let n = new URLSearchParams(e);
8204
8565
  return n.has("page") && n.set("page", String(t.page)), n.has("pageSize") && n.set("pageSize", String(t.pageSize)), n.has("sortBy") ? t.sortBy ? (n.set("sortBy", t.sortBy), n.set("sortOrder", t.sortOrder)) : (n.delete("sortBy"), n.delete("sortOrder")) : n.delete("sortOrder"), n;
8205
- }, w = C(s.urlState ? y(window.location.search) : new URLSearchParams(), g);
8206
- s.urlState && x(w) !== `${window.location.pathname}${window.location.search}${window.location.hash}` && window.history.replaceState(window.history.state, "", x(w));
8207
- let ee = (e, n) => t.dispatchEvent(new CustomEvent(e, {
8566
+ }, C = ee(s.urlState ? y(window.location.search) : new URLSearchParams(), g);
8567
+ s.urlState && x(C) !== `${window.location.pathname}${window.location.search}${window.location.hash}` && window.history.replaceState(window.history.state, "", x(C));
8568
+ let te = (e, n) => t.dispatchEvent(new CustomEvent(e, {
8208
8569
  bubbles: !0,
8209
8570
  detail: n
8210
- })), te = (e) => {
8571
+ })), ne = (e) => {
8211
8572
  o && (o.textContent = e);
8212
- }, ne = (e) => {
8213
- if (e.total === 0) return Wa.empty;
8573
+ }, re = (e) => {
8574
+ if (e.total === 0) return no.empty;
8214
8575
  let t = e.pageSize > 0 ? Math.max(1, Math.ceil(e.total / e.pageSize)) : 1;
8215
8576
  return `Page ${e.page} of ${t}, ${e.total} ${e.total === 1 ? "row" : "rows"}`;
8216
- }, T = () => [...n.querySelectorAll(":scope > thead > tr:first-child > th")], E = (e) => {
8577
+ }, w = () => [...n.querySelectorAll(":scope > thead > tr:first-child > th")], T = (e) => {
8217
8578
  if (u && [...e.querySelectorAll(":scope > tr")].some((e) => !e.dataset.rowKey)) throw Error("A selectable server-paged table needs data-row-key on every row, so a selection can span pages.");
8218
- }, re = (e) => {
8579
+ }, ie = (e) => {
8219
8580
  let t = [...e.querySelectorAll(":scope > tr")];
8220
8581
  if (u) {
8221
- za(t);
8582
+ Za(t);
8222
8583
  for (let e of t) {
8223
8584
  let t = e.querySelector(`.${Q} .wui-check`);
8224
8585
  t && (t.checked = d.has(e.dataset.rowKey));
8225
8586
  }
8226
- Va(n);
8587
+ $a(n);
8227
8588
  }
8228
- let r = T();
8589
+ let r = w();
8229
8590
  if (n.classList.contains("wui-table-stack")) for (let e of t) [...e.cells].forEach((e, t) => {
8230
8591
  let n = r[t]?.textContent.trim();
8231
8592
  n && !e.hasAttribute("data-label") && e.setAttribute("data-label", n);
@@ -8233,30 +8594,42 @@ function Za(e) {
8233
8594
  r.forEach((e, n) => {
8234
8595
  if (e.classList.contains("wui-col-hidden")) for (let e of t) e.cells[n]?.classList.add("wui-col-hidden");
8235
8596
  });
8236
- }, ie = (e) => {
8597
+ }, ae = (e) => {
8237
8598
  for (let t of e.querySelectorAll(":scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]")) t.remove();
8238
- }, D = (e) => e?.dispatchEvent(new CustomEvent("wui:teardown", { bubbles: !0 })), O = (e, t) => {
8599
+ }, E = (e) => e?.dispatchEvent(new CustomEvent("wui:teardown", { bubbles: !0 })), D = (e, t) => {
8239
8600
  if (!i) return;
8240
8601
  let n = e.querySelector(":scope > template[data-wui-empty]");
8241
- D(i), t.total === 0 && n ? (i.replaceChildren(n.content.cloneNode(!0)), i.hidden = !1) : (i.replaceChildren(), i.hidden = !0);
8242
- }, ae = (e) => {
8243
- let r = qa(e);
8602
+ E(i), t.total === 0 && n ? (i.replaceChildren(n.content.cloneNode(!0)), i.hidden = !1) : (i.replaceChildren(), i.hidden = !0);
8603
+ }, oe = (e) => {
8604
+ let r = oo(e);
8244
8605
  if (a) {
8245
8606
  let t = e.querySelector(":scope > template[data-wui-pager]");
8246
- D(a), a.replaceChildren(...t ? [t.content.cloneNode(!0)] : []), a.hidden = !1;
8607
+ E(a), a.replaceChildren(...t ? [t.content.cloneNode(!0)] : []), a.hidden = !1;
8247
8608
  }
8248
- O(e, r);
8609
+ D(e, r);
8249
8610
  let i = e.querySelector(":scope > template[data-wui-filters]"), o = s.filtersRegion && i ? document.querySelector(s.filtersRegion) : null;
8250
- o && (D(o), o.replaceChildren(i.content.cloneNode(!0))), ie(e), D(h), n.replaceChild(e, h), h = e, g = r, t.removeAttribute("data-wui-table-error"), re(e), pe();
8251
- }, oe = (e) => {
8611
+ o && (E(o), o.replaceChildren(i.content.cloneNode(!0))), ae(e), E(h), n.replaceChild(e, h), h = e, g = r, t.removeAttribute("data-wui-table-error"), ie(e), k();
8612
+ }, se = (e) => {
8252
8613
  let t = document.createElement("template");
8253
8614
  t.innerHTML = `<table>${e}</table>`;
8254
8615
  let n = t.content.querySelector("tbody[data-wui-rows]");
8255
- return n && E(n), n ? document.importNode(n, !0) : null;
8256
- }, se = (e) => {
8257
- e ? t.setAttribute("aria-busy", "true") : t.removeAttribute("aria-busy");
8258
- }, ce = (e) => e === "forbidden" ? Wa.forbidden : e === "network" ? Wa.network : s.errorText, le = (e) => {
8259
- let n = ce(e);
8616
+ return n && T(n), n ? document.importNode(n, !0) : null;
8617
+ }, ce = () => {
8618
+ if (h.querySelector(":scope > tr:not([data-wui-skeleton])")) return;
8619
+ let e = Math.max(1, w().length);
8620
+ h.replaceChildren(...Array.from({ length: ro }, () => {
8621
+ let t = document.createElement("tr");
8622
+ t.setAttribute("data-wui-skeleton", "");
8623
+ for (let n = 0; n < e; n++) {
8624
+ let e = document.createElement("td"), r = document.createElement("span");
8625
+ r.className = "skeleton", r.setAttribute("aria-hidden", "true"), r.style.cssText = `display:block;width:${n === 0 ? 70 : 50}%;height:12px;border-radius:6px`, e.append(r), t.append(e);
8626
+ }
8627
+ return t;
8628
+ })), t.removeAttribute("data-wui-table-error"), i && (i.hidden = !0);
8629
+ }, le = (e) => {
8630
+ e ? (t.setAttribute("aria-busy", "true"), ce()) : t.removeAttribute("aria-busy");
8631
+ }, ue = (e) => e === "forbidden" ? no.forbidden : e === "network" ? no.network : s.errorText, de = (e) => {
8632
+ let n = ue(e);
8260
8633
  if (t.setAttribute("data-wui-table-error", e), a && (a.hidden = !0), i) {
8261
8634
  let t = document.createElement("div");
8262
8635
  t.className = "tbl-empty wui-table-error", t.setAttribute("role", "alert");
@@ -8267,59 +8640,59 @@ function Za(e) {
8267
8640
  let o = document.createElement("div");
8268
8641
  o.className = "tbl-empty-action";
8269
8642
  let s = document.createElement("button");
8270
- 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;
8643
+ s.type = "button", s.className = "btn btn-outline-primary btn-sm", s.setAttribute("data-wui-table-retry", ""), s.textContent = no.retry, o.append(s), t.append(r, a, o), E(i), i.replaceChildren(t), i.hidden = !1;
8271
8644
  }
8272
- te(n);
8273
- }, k = async (e, t = "none") => {
8645
+ ne(n);
8646
+ }, O = async (e, t = "none") => {
8274
8647
  let n = new URLSearchParams(e);
8275
8648
  _ = {
8276
8649
  query: n,
8277
8650
  mode: t
8278
- }, se(!0), te(s.loadingText), ee("wui:table:loading", { query: n.toString() });
8651
+ }, le(!0), ne(s.loadingText), te("wui:table:loading", { query: n.toString() });
8279
8652
  let r = await f.run(S(n));
8280
8653
  if (r.kind === "aborted" || r.kind === "stale" || r.kind === "session") return r;
8281
- se(!1);
8654
+ le(!1);
8282
8655
  let i = null, a = r.ok ? null : r.kind;
8283
8656
  if (r.ok) {
8284
8657
  try {
8285
- i = oe(r.html);
8658
+ i = se(r.html);
8286
8659
  } catch (e) {
8287
8660
  console.error(e);
8288
8661
  }
8289
8662
  i || (a = "server");
8290
8663
  }
8291
- return a ? (le(a), ee("wui:table:error", {
8664
+ return a ? (de(a), te("wui:table:error", {
8292
8665
  status: r.status,
8293
8666
  kind: a,
8294
- message: ce(a)
8295
- }), r) : (ae(i), w = C(n, g), s.urlState && t === "push" ? window.history.pushState(window.history.state, "", x(w)) : s.urlState && t === "replace" && window.history.replaceState(window.history.state, "", x(w)), te(ne(g)), window.WUI?.refresh?.(), ee("wui:table:loaded", {
8667
+ message: ue(a)
8668
+ }), r) : (oe(i), C = ee(n, g), s.urlState && t === "push" ? window.history.pushState(window.history.state, "", x(C)) : s.urlState && t === "replace" && window.history.replaceState(window.history.state, "", x(C)), ne(re(g)), window.WUI?.refresh?.(), te("wui:table:loaded", {
8296
8669
  ...g,
8297
- query: w.toString()
8670
+ query: C.toString()
8298
8671
  }), r);
8299
- }, de = (e) => (e.delete("page"), e), fe = () => [...n.querySelectorAll(":scope > thead th[data-sort-key]")], pe = () => {
8300
- for (let e of fe()) {
8672
+ }, me = (e) => (e.delete("page"), e), he = () => [...n.querySelectorAll(":scope > thead th[data-sort-key]")], k = () => {
8673
+ for (let e of he()) {
8301
8674
  let t = e.dataset.sortKey === g.sortBy;
8302
8675
  e.setAttribute("aria-sort", t ? g.sortOrder === "desc" ? "descending" : "ascending" : "none");
8303
8676
  }
8304
8677
  };
8305
- for (let e of fe()) if (e.classList.add("sortable"), e.tabIndex = 0, !e.querySelector(".sort-icon")) {
8678
+ for (let e of he()) if (e.classList.add("sortable"), e.tabIndex = 0, !e.querySelector(".sort-icon")) {
8306
8679
  let t = e.classList.contains("num") || e.classList.contains("text-end"), n = document.createElement("span");
8307
8680
  n.className = t ? "sort-icon wui-sort-lead" : "sort-icon", n.innerHTML = B("chevrons-up-down", { size: 14 }), t ? e.prepend(n) : e.append(n);
8308
8681
  }
8309
- let j = (e) => {
8310
- let t = de(new URLSearchParams(w)), n = g.sortBy === e && g.sortOrder === "asc" ? "desc" : "asc";
8311
- return t.set("sortBy", e), t.set("sortOrder", n), k(t, "push");
8682
+ let ge = (e) => {
8683
+ let t = me(new URLSearchParams(C)), n = g.sortBy === e && g.sortOrder === "asc" ? "desc" : "asc";
8684
+ return t.set("sortBy", e), t.set("sortOrder", n), O(t, "push");
8312
8685
  };
8313
8686
  n.addEventListener("click", (e) => {
8314
8687
  let t = e.target.closest("th[data-sort-key]");
8315
- t && n.tHead?.contains(t) && j(t.dataset.sortKey);
8688
+ t && n.tHead?.contains(t) && ge(t.dataset.sortKey);
8316
8689
  }), n.addEventListener("keydown", (e) => {
8317
8690
  if (e.key !== "Enter" && e.key !== " ") return;
8318
8691
  let t = e.target.closest?.("th[data-sort-key]");
8319
- !t || !n.tHead?.contains(t) || (e.preventDefault(), j(t.dataset.sortKey));
8692
+ !t || !n.tHead?.contains(t) || (e.preventDefault(), ge(t.dataset.sortKey));
8320
8693
  });
8321
- let me = () => {
8322
- Va(n), n.dispatchEvent(new CustomEvent("selectionchange", {
8694
+ let _e = () => {
8695
+ $a(n), n.dispatchEvent(new CustomEvent("selectionchange", {
8323
8696
  bubbles: !0,
8324
8697
  detail: {
8325
8698
  selected: d.size,
@@ -8339,77 +8712,77 @@ function Za(e) {
8339
8712
  if (!e) return;
8340
8713
  t.checked ? d.add(e) : d.delete(e);
8341
8714
  }
8342
- me();
8715
+ _e();
8343
8716
  }
8344
8717
  }), a && (a.addEventListener("click", (e) => {
8345
8718
  let t = e.target.closest("a[href]");
8346
- !t || e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || (e.preventDefault(), k(b(t.getAttribute("href")), "push"));
8719
+ !t || e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || (e.preventDefault(), O(b(t.getAttribute("href")), "push"));
8347
8720
  }), a.addEventListener("change", (e) => {
8348
- !e.target.classList?.contains("tpg-select") || !e.target.value || (e.stopPropagation(), k(b(e.target.value), "push"));
8721
+ !e.target.classList?.contains("tpg-select") || !e.target.value || (e.stopPropagation(), O(b(e.target.value), "push"));
8349
8722
  }));
8350
- let he = () => {
8723
+ let ve = () => {
8351
8724
  if (!s.searchInput) return null;
8352
8725
  let e = document.querySelector(s.searchInput);
8353
8726
  return e && (e.matches("input, textarea") ? e : e.querySelector("input"));
8354
- }, ge = () => e.isConnected ? !0 : (p.abort(), clearTimeout(v), !1), _e = (e, t) => {
8727
+ }, A = () => e.isConnected ? !0 : (p.abort(), clearTimeout(v), !1), ye = (e, t) => {
8355
8728
  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();
8356
- for (let [e, t] of w) e !== "page" && (Ha.includes(e) || !r.has(e)) && i.append(e, t);
8357
- for (let [e, t] of n) typeof t != "string" || t === "" || Ha.includes(e) || l.has(e) || i.append(e, t);
8358
- let a = he();
8729
+ for (let [e, t] of C) e !== "page" && (eo.includes(e) || !r.has(e)) && i.append(e, t);
8730
+ for (let [e, t] of n) typeof t != "string" || t === "" || eo.includes(e) || l.has(e) || i.append(e, t);
8731
+ let a = ve();
8359
8732
  if (a) {
8360
- i.delete(Ua);
8733
+ i.delete(to);
8361
8734
  let e = a.value.trim();
8362
- e && i.set(Ua, e);
8735
+ e && i.set(to, e);
8363
8736
  }
8364
- return k(i, "push");
8365
- }, ve = (e) => s.filtersForm && e.closest?.(s.filtersForm) || s.filtersRegion && e.closest?.(s.filtersRegion) || null;
8737
+ return O(i, "push");
8738
+ }, be = (e) => s.filtersForm && e.closest?.(s.filtersForm) || s.filtersRegion && e.closest?.(s.filtersRegion) || null;
8366
8739
  document.addEventListener("submit", (e) => {
8367
- !ge() || !s.filtersForm || !(e.target instanceof HTMLFormElement) || !e.target.matches(s.filtersForm) || (e.preventDefault(), _e(e.target, e.submitter));
8740
+ !A() || !s.filtersForm || !(e.target instanceof HTMLFormElement) || !e.target.matches(s.filtersForm) || (e.preventDefault(), ye(e.target, e.submitter));
8368
8741
  }, m), document.addEventListener("change", (e) => {
8369
- if (!ge() || !s.filtersForm) return;
8742
+ if (!A() || !s.filtersForm) return;
8370
8743
  let t = e.target.closest?.(s.filtersForm);
8371
- !t || e.target === he() || _e(t);
8744
+ !t || e.target === ve() || ye(t);
8372
8745
  }, m);
8373
- let ye = (e, t) => {
8746
+ let xe = (e, t) => {
8374
8747
  for (let n of e?.querySelectorAll("input[name]:not([type=hidden], [type=checkbox], [type=radio])") ?? []) {
8375
8748
  let e = t.get(n.name) ?? "";
8376
8749
  n.value !== e && (n.value = e, n.dispatchEvent(new Event("input", { bubbles: !0 })));
8377
8750
  }
8378
8751
  };
8379
8752
  document.addEventListener("click", (e) => {
8380
- if (!ge()) return;
8753
+ if (!A()) return;
8381
8754
  let t = e.target.closest?.("a[href]");
8382
- if (!t || !ve(t) || e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
8755
+ if (!t || !be(t) || e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
8383
8756
  let n = new URL(t.getAttribute("href"), window.location.href);
8384
8757
  if (n.origin !== window.location.origin || n.pathname !== window.location.pathname) return;
8385
8758
  e.preventDefault();
8386
- let r = de(b(n.href));
8387
- ye(t.closest("form"), r), k(r, "push");
8759
+ let r = me(b(n.href));
8760
+ xe(t.closest("form"), r), O(r, "push");
8388
8761
  }, m), document.addEventListener("input", (e) => {
8389
- if (!ge()) return;
8390
- let t = he();
8762
+ if (!A()) return;
8763
+ let t = ve();
8391
8764
  !t || e.target !== t || (clearTimeout(v), v = setTimeout(() => {
8392
- let e = de(new URLSearchParams(w)), n = t.value.trim();
8393
- n ? e.set(Ua, n) : e.delete(Ua), e.toString() !== w.toString() && k(e, "replace");
8765
+ let e = me(new URLSearchParams(C)), n = t.value.trim();
8766
+ n ? e.set(to, n) : e.delete(to), e.toString() !== C.toString() && O(e, "replace");
8394
8767
  }, 300));
8395
8768
  }, m), s.urlState && window.addEventListener("popstate", () => {
8396
- if (!ge()) return;
8397
- let e = y(window.location.search), t = he();
8398
- t && (t.value = e.get("search") ?? ""), k(e, "none");
8769
+ if (!A()) return;
8770
+ let e = y(window.location.search), t = ve();
8771
+ t && (t.value = e.get("search") ?? ""), O(e, "none");
8399
8772
  }, m), document.addEventListener("wui:modal:success", () => {
8400
- ge() && s.refreshOnSuccess && k(w, "none");
8773
+ A() && s.refreshOnSuccess && O(C, "none");
8401
8774
  }, m), i?.addEventListener("click", (e) => {
8402
- e.target.closest("[data-wui-table-retry]") && _ && k(_.query, _.mode);
8775
+ e.target.closest("[data-wui-table-retry]") && _ && O(_.query, _.mode);
8403
8776
  });
8404
- let be = async (e) => {
8777
+ let Se = async (e) => {
8405
8778
  let t = e.dataset.url;
8406
8779
  if (!t) throw Error("A data-wui-row-action button needs data-url: the handler the action posts to.");
8407
8780
  let n = e.closest("tr")?.dataset.rowKey ?? null, r = e.dataset.wuiRowAction || "";
8408
8781
  e.disabled = !0, e.setAttribute("aria-busy", "true");
8409
- let i = await A(t, { method: (e.dataset.method || "post").toUpperCase() });
8782
+ let i = await fe(t, { method: (e.dataset.method || "post").toUpperCase() });
8410
8783
  if (e.disabled = !1, e.removeAttribute("aria-busy"), i.kind === "session" || i.kind === "aborted") return;
8411
8784
  let a = i.message;
8412
- 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", {
8785
+ i.ok ? (so(a, i.toastVariant || "success"), await O(C, "none")) : so(a || (i.kind === "forbidden" ? no.actionForbidden : no.actionFailed), "danger"), te("wui:table:action", {
8413
8786
  action: r,
8414
8787
  key: n,
8415
8788
  ok: i.ok,
@@ -8418,18 +8791,18 @@ function Za(e) {
8418
8791
  };
8419
8792
  return n.addEventListener("click", (e) => {
8420
8793
  let t = e.target.closest("[data-wui-row-action]");
8421
- !t || !h.contains(t) || t.disabled || (e.preventDefault(), !(t.dataset.confirm && !window.confirm(t.dataset.confirm)) && be(t));
8422
- }), E(h), ie(h), u && Ba(n), re(h), pe(), {
8794
+ !t || !h.contains(t) || t.disabled || (e.preventDefault(), Se(t));
8795
+ }), T(h), ae(h), u && Qa(n), ie(h), k(), {
8423
8796
  el: e,
8424
- reload: () => k(w, "none"),
8425
- query: () => new URLSearchParams(w),
8797
+ reload: () => O(C, "none"),
8798
+ query: () => new URLSearchParams(C),
8426
8799
  setQuery: (e) => {
8427
- let t = new URLSearchParams(w);
8800
+ let t = new URLSearchParams(C);
8428
8801
  for (let [n, r] of Object.entries(e ?? {})) {
8429
8802
  t.delete(n);
8430
8803
  for (let e of Array.isArray(r) ? r : [r]) e != null && e !== "" && t.append(n, String(e));
8431
8804
  }
8432
- return (!e || !("page" in e)) && t.delete("page"), k(t, "push");
8805
+ return (!e || !("page" in e)) && t.delete("page"), O(t, "push");
8433
8806
  },
8434
8807
  selection: {
8435
8808
  keys: () => [...d],
@@ -8437,158 +8810,158 @@ function Za(e) {
8437
8810
  clear: () => {
8438
8811
  d.clear();
8439
8812
  for (let e of h.querySelectorAll(`:scope > tr > .${Q} .wui-check`)) e.checked = !1;
8440
- me();
8813
+ _e();
8441
8814
  }
8442
8815
  }
8443
8816
  };
8444
8817
  }
8445
8818
  //#endregion
8446
8819
  //#region src/serverActions.js
8447
- var Qa = "wuiConfirm", $a = Object.freeze(["danger"]), eo = Object.freeze([
8820
+ var fo = "wuiConfirm", po = Object.freeze(["danger"]), mo = Object.freeze([
8448
8821
  "success",
8449
8822
  "info",
8450
8823
  "warning",
8451
8824
  "danger"
8452
- ]), to = "wui.flash", no = Object.freeze({
8825
+ ]), ho = "wui.flash", go = Object.freeze({
8453
8826
  confirmTitle: "Are you sure?",
8454
8827
  confirmLabel: "Confirm",
8455
8828
  cancelLabel: "Cancel",
8456
8829
  failed: "That did not work. Try again.",
8457
8830
  forbidden: "You do not have permission to do that.",
8458
8831
  network: "Could not reach the server. Check your connection and try again."
8459
- }), ro = /* @__PURE__ */ new WeakSet(), io = null, ao = null, oo = !1, so = (e) => {
8832
+ }), _o = /* @__PURE__ */ new WeakSet(), vo = null, yo = null, bo = !1, xo = (e) => {
8460
8833
  let t = document.createElement("span");
8461
8834
  return t.textContent = e ?? "", t.innerHTML;
8462
- }, co = (e, t) => {
8835
+ }, So = (e, t) => {
8463
8836
  e && window.WUI?.toast?.(e, { variant: t });
8464
- }, lo = () => {
8837
+ }, Co = () => {
8465
8838
  let e = window.bootstrap?.Modal;
8466
8839
  if (!e) throw Error("data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.");
8467
8840
  return e;
8468
8841
  };
8469
- function uo() {
8470
- let e = document.getElementById(Qa);
8471
- 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);
8842
+ function wo() {
8843
+ let e = document.getElementById(fo);
8844
+ return e || (e = document.createElement("div"), e.id = fo, 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", `${he.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">${xo(go.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`, document.body.appendChild(e), e);
8472
8845
  }
8473
- function fo(e, t) {
8846
+ function To(e, t) {
8474
8847
  let n = e.getAttribute("data-wui-confirm-tone");
8475
- if (n !== null && !$a.includes(n)) throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);
8476
- let r = lo(), i = uo(), a = i.querySelector(".wui-confirm-title"), o = i.querySelector("[data-app-confirm]");
8477
- 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.`);
8848
+ if (n !== null && !po.includes(n)) throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);
8849
+ let r = Co(), i = wo(), a = i.querySelector(".wui-confirm-title"), o = i.querySelector("[data-app-confirm]");
8850
+ if (!a || !o) throw Error(`#${fo} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${fo}"> without confirm-href, or leave the dialog to the library.`);
8478
8851
  let s = i.querySelector(".wui-confirm-msg");
8479
8852
  s || (s = document.createElement("p"), s.className = "wui-confirm-msg", a.after(s));
8480
8853
  let c = n === "danger";
8481
- 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();
8854
+ a.textContent = e.getAttribute("data-wui-confirm-title") || go.confirmTitle, s.textContent = e.getAttribute("data-wui-confirm"), o.textContent = e.getAttribute("data-wui-confirm-label") || go.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), yo = t, bo = !1, r.getOrCreateInstance(i).show();
8482
8855
  }
8483
- var po = (e, t) => {
8484
- io = e;
8856
+ var Eo = (e, t) => {
8857
+ vo = e;
8485
8858
  try {
8486
8859
  t();
8487
8860
  } finally {
8488
- io = null;
8861
+ vo = null;
8489
8862
  }
8490
- }, mo = (e) => e.disabled === !0 || e.getAttribute("aria-disabled") === "true";
8491
- function ho(e) {
8863
+ }, Do = (e) => e.disabled === !0 || e.getAttribute("aria-disabled") === "true";
8864
+ function Oo(e) {
8492
8865
  let t = e.target.closest?.("[data-wui-confirm]:not(form)");
8493
- !t || t === io || mo(t) || (e.preventDefault(), e.stopImmediatePropagation(), fo(t, () => po(t, () => t.click())));
8866
+ !t || t === vo || Do(t) || (e.preventDefault(), e.stopImmediatePropagation(), To(t, () => Eo(t, () => t.click())));
8494
8867
  }
8495
- function go(e) {
8868
+ function ko(e) {
8496
8869
  let t = e.target;
8497
- if (!(t instanceof HTMLFormElement) || !t.hasAttribute("data-wui-confirm") || t === io || e.submitter && e.submitter === io) return;
8870
+ if (!(t instanceof HTMLFormElement) || !t.hasAttribute("data-wui-confirm") || t === vo || e.submitter && e.submitter === vo) return;
8498
8871
  e.preventDefault(), e.stopImmediatePropagation();
8499
8872
  let n = e.submitter?.form === t ? e.submitter : void 0;
8500
- fo(t, () => po(t, () => t.requestSubmit(n)));
8873
+ To(t, () => Eo(t, () => t.requestSubmit(n)));
8501
8874
  }
8502
- function _o(e) {
8503
- let t = e.target.closest?.(`#${Qa} [data-app-confirm]`);
8504
- !t || t.disabled || !ao || (oo = !0, lo().getOrCreateInstance(t.closest(`#${Qa}`)).hide());
8875
+ function Ao(e) {
8876
+ let t = e.target.closest?.(`#${fo} [data-app-confirm]`);
8877
+ !t || t.disabled || !yo || (bo = !0, Co().getOrCreateInstance(t.closest(`#${fo}`)).hide());
8505
8878
  }
8506
- function vo(e) {
8879
+ function jo(e) {
8507
8880
  if (e.target.id !== "wuiConfirm") return;
8508
- let t = oo ? ao : null;
8509
- ao = null, oo = !1, t?.();
8881
+ let t = bo ? yo : null;
8882
+ yo = null, bo = !1, t?.();
8510
8883
  }
8511
- var yo = (e, t) => {
8512
- e && window.sessionStorage.setItem(to, JSON.stringify({
8884
+ var Mo = (e, t) => {
8885
+ e && window.sessionStorage.setItem(ho, JSON.stringify({
8513
8886
  message: e,
8514
8887
  variant: t
8515
8888
  }));
8516
- }, bo = (e) => e === "forbidden" ? no.forbidden : e === "network" ? no.network : no.failed;
8517
- function xo() {
8518
- for (let e of document.querySelectorAll("[data-wui-server]")) e.dataset.refreshOnSuccess !== "false" && Xa(e)?.reload();
8889
+ }, No = (e) => e === "forbidden" ? go.forbidden : e === "network" ? go.network : go.failed;
8890
+ function Po() {
8891
+ for (let e of document.querySelectorAll("[data-wui-server]")) e.dataset.refreshOnSuccess !== "false" && lo(e)?.reload();
8519
8892
  }
8520
- async function So(e) {
8893
+ async function Fo(e) {
8521
8894
  let t = e.getAttribute("data-wui-post");
8522
8895
  if (!t) throw Error("A data-wui-post button needs the URL the action posts to.");
8523
8896
  let n = e.getAttribute("data-wui-post-reload");
8524
8897
  if (n !== null && n !== "page") throw TypeError(`data-wui-post-reload="${n}" is not supported. Use page, or leave it off to reload the server tables.`);
8525
8898
  e.disabled = !0, e.setAttribute("aria-busy", "true");
8526
- let r = await A(t, { method: "POST" });
8899
+ let r = await fe(t, { method: "POST" });
8527
8900
  if (r.kind === "session" || r.kind === "aborted") return;
8528
8901
  let i = r.toastVariant || "success";
8529
8902
  if (r.ok && (r.redirect || n === "page")) {
8530
- yo(r.message, i), r.redirect ? window.location.assign(r.redirect) : window.location.reload();
8903
+ Mo(r.message, i), r.redirect ? window.location.assign(r.redirect) : window.location.reload();
8531
8904
  return;
8532
8905
  }
8533
8906
  if (e.disabled = !1, e.removeAttribute("aria-busy"), r.ok) {
8534
- co(r.message, i), xo();
8907
+ So(r.message, i), Po();
8535
8908
  return;
8536
8909
  }
8537
- co(r.message || bo(r.kind), "danger");
8910
+ So(r.message || No(r.kind), "danger");
8538
8911
  }
8539
- function Co(e) {
8912
+ function Io(e) {
8540
8913
  let t = e.target.closest?.("[data-wui-post]");
8541
- t && (e.preventDefault(), !(mo(t) || t.getAttribute("aria-busy") === "true") && So(t).catch((e) => console.error(e)));
8914
+ t && (e.preventDefault(), !(Do(t) || t.getAttribute("aria-busy") === "true") && Fo(t).catch((e) => console.error(e)));
8542
8915
  }
8543
- function wo() {
8544
- let e = window.sessionStorage.getItem(to);
8916
+ function Lo() {
8917
+ let e = window.sessionStorage.getItem(ho);
8545
8918
  if (!e) return;
8546
- window.sessionStorage.removeItem(to);
8919
+ window.sessionStorage.removeItem(ho);
8547
8920
  let { message: t, variant: n } = JSON.parse(e);
8548
- co(t, n);
8921
+ So(t, n);
8549
8922
  }
8550
- function To(e) {
8923
+ function Ro(e) {
8551
8924
  let t = e.querySelectorAll ? [...e.querySelectorAll("[data-wui-flash]")] : [];
8552
8925
  e instanceof Element && e.matches("[data-wui-flash]") && t.unshift(e);
8553
8926
  for (let e of t) {
8554
8927
  let t = e.getAttribute("data-wui-flash-variant") || "success";
8555
- if (!eo.includes(t)) throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${eo.join(", ")}.`);
8928
+ if (!mo.includes(t)) throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${mo.join(", ")}.`);
8556
8929
  let n = e.getAttribute("data-wui-flash") || e.textContent.trim();
8557
- e.remove(), co(n, t);
8930
+ e.remove(), So(n, t);
8558
8931
  }
8559
8932
  }
8560
- function Eo(e = document) {
8933
+ function zo(e = document) {
8561
8934
  let t = e.ownerDocument || e;
8562
- 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);
8935
+ _o.has(t) || (_o.add(t), t.addEventListener("click", Oo, !0), t.addEventListener("submit", ko, !0), t.addEventListener("click", Ao), t.addEventListener("click", Io), t.addEventListener("hidden.bs.modal", jo), Lo()), Ro(e);
8563
8936
  }
8564
- var Do = 31536e3, Oo = /* @__PURE__ */ new WeakMap(), ko = (e) => e > 99 ? "99+" : String(e);
8565
- function Ao(e, t, n = document) {
8566
- n.cookie = `${e}=${t ? "1" : "0"}; Path=/; Max-Age=${Do}; SameSite=Lax`;
8937
+ var Bo = 31536e3, Vo = /* @__PURE__ */ new WeakMap(), Ho = (e) => e > 99 ? "99+" : String(e);
8938
+ function Uo(e, t, n = document) {
8939
+ n.cookie = `${e}=${t ? "1" : "0"}; Path=/; Max-Age=${Bo}; SameSite=Lax`;
8567
8940
  }
8568
- var jo = (e) => {
8941
+ var Wo = (e) => {
8569
8942
  let t = document.createElement("template");
8570
8943
  return t.innerHTML = e, t.content;
8571
- }, Mo = (e, t) => {
8944
+ }, Go = (e, t) => {
8572
8945
  let n = document.createElement("div");
8573
8946
  return n.className = e, n.textContent = t, n;
8574
8947
  };
8575
- function No(e, t) {
8576
- 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) => {
8948
+ function Ko(e, t) {
8949
+ 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 = pe(), p = Number(e.dataset.unread) || 0, m = (t, a = !0) => {
8577
8950
  let o = Math.max(0, Number(t) || 0), s = o !== p;
8578
- 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`);
8951
+ p = o, e.dataset.unread = String(o), r && (r.textContent = Ho(o), r.hidden = o === 0), n?.setAttribute("aria-label", o === 0 ? l : `${l}, ${Ho(o)} unread`), a && s && i && (i.textContent = o === 0 ? "No unread notifications" : `${Ho(o)} unread notifications`);
8579
8952
  }, h = () => o?.classList.contains("show") ?? !1, g = () => {
8580
- let e = Mo("wui-bell-state", "Could not load notifications. "), t = document.createElement("button");
8953
+ let e = Go("wui-bell-state", "Could not load notifications. "), t = document.createElement("button");
8581
8954
  t.type = "button", t.className = "btn btn-link btn-sm", t.dataset.wuiBellRetry = "", t.textContent = "Retry", e.append(t), a.replaceChildren(e);
8582
8955
  }, _ = async (t) => {
8583
- t && (a.setAttribute("aria-busy", "true"), a.querySelector(".wui-bell-item") || a.replaceChildren(Mo("wui-bell-state", "Loading…")));
8956
+ t && (a.setAttribute("aria-busy", "true"), a.querySelector(".wui-bell-item") || a.replaceChildren(Go("wui-bell-state", "Loading…")));
8584
8957
  let n = await f.run(s);
8585
8958
  if (n.kind === "aborted" || n.kind === "stale" || n.kind === "session") return;
8586
8959
  if (a.removeAttribute("aria-busy"), !n.ok) {
8587
8960
  t && g();
8588
8961
  return;
8589
8962
  }
8590
- let r = jo(n.html), i = r.querySelector("[data-wui-unread]"), o = i ? Number(i.getAttribute("data-wui-unread")) : p;
8591
- 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", {
8963
+ let r = Wo(n.html), i = r.querySelector("[data-wui-unread]"), o = i ? Number(i.getAttribute("data-wui-unread")) : p;
8964
+ m(o), (t || h()) && (r.querySelector(".wui-bell-item") ? a.replaceChildren(r) : a.replaceChildren(Go("wui-bell-state", u))), e.dispatchEvent(new CustomEvent("wui:notifications:loaded", {
8592
8965
  bubbles: !0,
8593
8966
  detail: { unread: o }
8594
8967
  }));
@@ -8601,7 +8974,7 @@ function No(e, t) {
8601
8974
  let t = e.target.closest("[data-wui-bell-read]");
8602
8975
  if (!t || !c) return;
8603
8976
  t.disabled = !0;
8604
- let n = await A(c, { method: "POST" });
8977
+ let n = await fe(c, { method: "POST" });
8605
8978
  t.disabled = !1, n.ok && (m(0), _(!0));
8606
8979
  });
8607
8980
  let v = null, y = () => {
@@ -8618,9 +8991,9 @@ function No(e, t) {
8618
8991
  refresh: () => _(h())
8619
8992
  };
8620
8993
  }
8621
- var Po = (e) => !!e && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), Fo = (e, t, n) => `${e}${e.includes("?") ? "&" : "?"}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;
8622
- function Io(e, t) {
8623
- 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) => {
8994
+ var qo = (e) => !!e && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), Jo = (e, t, n) => `${e}${e.includes("?") ? "&" : "?"}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;
8995
+ function Yo(e, t) {
8996
+ 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 = pe(), f = null, p = -1, m = () => [...r.querySelectorAll(".wui-topsearch-hit")], h = (e) => {
8624
8997
  let t = m();
8625
8998
  p = t.length === 0 ? -1 : (e + t.length) % t.length, t.forEach((e, t) => {
8626
8999
  let n = t === p;
@@ -8641,16 +9014,16 @@ function Io(e, t) {
8641
9014
  e.dispatchEvent(n) && window.location.assign(t);
8642
9015
  }, b = async (t) => {
8643
9016
  e.classList.add("is-loading");
8644
- let n = await d.run(Fo(o, s, t));
9017
+ let n = await d.run(Jo(o, s, t));
8645
9018
  if (!(n.kind === "aborted" || n.kind === "stale" || n.kind === "session")) {
8646
9019
  if (e.classList.remove("is-loading"), n.ok) {
8647
- let e = jo(n.html), t = e.querySelector("[data-wui-count]");
9020
+ let e = Wo(n.html), t = e.querySelector("[data-wui-count]");
8648
9021
  r.replaceChildren(e), m().forEach((e, t) => {
8649
9022
  e.id = `${r.id}-opt-${t}`;
8650
9023
  });
8651
9024
  let i = t ? Number(t.getAttribute("data-wui-count")) : m().length;
8652
9025
  a && (a.textContent = i === 0 ? "No results" : `${i} ${i === 1 ? "result" : "results"}`);
8653
- } else r.replaceChildren(Mo("wui-topsearch-empty", "Search is unavailable right now."));
9026
+ } else r.replaceChildren(Go("wui-topsearch-empty", "Search is unavailable right now."));
8654
9027
  p = -1, _();
8655
9028
  }
8656
9029
  };
@@ -8668,7 +9041,7 @@ function Io(e, t) {
8668
9041
  t.preventDefault(), h(p + (t.key === "ArrowDown" ? 1 : -1));
8669
9042
  } else if (t.key === "Enter") {
8670
9043
  let e = m();
8671
- !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())));
9044
+ !r.hidden && p >= 0 && e[p] ? (t.preventDefault(), y(e[p].getAttribute("href"))) : c && n.value.trim() !== "" && (t.preventDefault(), y(Jo(c, s, n.value.trim())));
8672
9045
  } else t.key === "Escape" && (r.hidden ? e.classList.contains("is-open") && (t.preventDefault(), v(!1), i?.focus()) : (t.preventDefault(), g()));
8673
9046
  }), r.addEventListener("click", (e) => {
8674
9047
  let t = e.target.closest(".wui-topsearch-hit");
@@ -8678,7 +9051,7 @@ function Io(e, t) {
8678
9051
  v(t), t && n.focus();
8679
9052
  });
8680
9053
  let x = (e) => {
8681
- e.key !== "/" || e.ctrlKey || e.metaKey || e.altKey || Po(e.target) || (e.preventDefault(), v(!0), n.focus());
9054
+ e.key !== "/" || e.ctrlKey || e.metaKey || e.altKey || qo(e.target) || (e.preventDefault(), v(!0), n.focus());
8682
9055
  }, S = (t) => {
8683
9056
  e.contains(t.target) || (g(), e.classList.contains("is-open") && v(!1));
8684
9057
  };
@@ -8686,13 +9059,13 @@ function Io(e, t) {
8686
9059
  clearTimeout(f), d.abort(), document.removeEventListener("keydown", x), document.removeEventListener("pointerdown", S);
8687
9060
  });
8688
9061
  }
8689
- function Lo(e) {
9062
+ function Xo(e) {
8690
9063
  let t = [], n = e.dataset.wuiCollapsedCookie;
8691
- n && e.addEventListener("wui:shell:collapse", (e) => Ao(n, !!e.detail?.collapsed)), e.addEventListener("click", (t) => {
9064
+ n && e.addEventListener("wui:shell:collapse", (e) => Uo(n, !!e.detail?.collapsed)), e.addEventListener("click", (t) => {
8692
9065
  t.target.closest("[data-wui-tabbar-more]") && e.querySelector("[data-app-shell-menu]")?.click();
8693
9066
  });
8694
- let r = e.querySelector("[data-wui-bell]"), i = r ? No(r, t) : null, a = e.querySelector("[data-wui-topsearch]");
8695
- a && Io(a, t);
9067
+ let r = e.querySelector("[data-wui-bell]"), i = r ? Ko(r, t) : null, a = e.querySelector("[data-wui-topsearch]");
9068
+ a && Yo(a, t);
8696
9069
  let o = {
8697
9070
  el: e,
8698
9071
  setUnread(e) {
@@ -8712,109 +9085,109 @@ function Lo(e) {
8712
9085
  n ? n.click() : e.classList.toggle("collapsed", !!t);
8713
9086
  }
8714
9087
  };
8715
- Oo.set(e, o);
9088
+ Vo.set(e, o);
8716
9089
  let s = (n) => {
8717
9090
  if (n.target === e || n.target.contains?.(e)) {
8718
9091
  for (let e of t) e();
8719
- Oo.delete(e), delete e.dataset.wuiPartsWired, document.removeEventListener("wui:teardown", s);
9092
+ Vo.delete(e), delete e.dataset.wuiPartsWired, document.removeEventListener("wui:teardown", s);
8720
9093
  }
8721
9094
  };
8722
9095
  return document.addEventListener("wui:teardown", s), o;
8723
9096
  }
8724
- function Ro(e = document) {
9097
+ function Zo(e = document) {
8725
9098
  let t = [];
8726
9099
  e instanceof Element && e.matches("[data-app-shell]") && t.push(e), t.push(...e.querySelectorAll("[data-app-shell]"));
8727
- for (let e of t) e.dataset.wuiPartsWired || (e.dataset.wuiPartsWired = "1", Lo(e));
9100
+ for (let e of t) e.dataset.wuiPartsWired || (e.dataset.wuiPartsWired = "1", Xo(e));
8728
9101
  }
8729
- function zo(e) {
9102
+ function Qo(e) {
8730
9103
  let t = e?.closest?.("[data-app-shell]") ?? null;
8731
- return t ? (Oo.has(t) || Ro(t), Oo.get(t) ?? null) : null;
9104
+ return t ? (Vo.has(t) || Zo(t), Vo.get(t) ?? null) : null;
8732
9105
  }
8733
9106
  //#endregion
8734
9107
  //#region src/themeTransition.js
8735
- var Bo = [
9108
+ var $o = [
8736
9109
  "light",
8737
9110
  "dark",
8738
9111
  "auto"
8739
- ], Vo = [
9112
+ ], es = [
8740
9113
  "wave",
8741
9114
  "circle",
8742
9115
  "slide",
8743
9116
  "blinds",
8744
9117
  "fade",
8745
9118
  "none"
8746
- ], Ho = "wave", Uo = "theme", Wo = {
9119
+ ], ts = "wave", ns = "theme", rs = {
8747
9120
  wave: 1100,
8748
9121
  circle: 700,
8749
9122
  slide: 600,
8750
9123
  blinds: 900,
8751
9124
  fade: 350,
8752
9125
  none: 0
8753
- }, 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);
8754
- function Zo(e) {
8755
- return e === "dark" || e === "auto" && Yo(Jo) ? "dark" : "light";
9126
+ }, is = "wui-theme-switching", as = "wui:theme:change", os = "wui-theme-toggle", ss = "(prefers-color-scheme: dark)", cs = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, ls = (e) => $o.includes(e);
9127
+ function us(e) {
9128
+ return e === "dark" || e === "auto" && cs(ss) ? "dark" : "light";
8756
9129
  }
8757
- function Qo(e = Uo, { includeAuto: t = !1 } = {}) {
9130
+ function ds(e = ns, { includeAuto: t = !1 } = {}) {
8758
9131
  let n = null;
8759
9132
  try {
8760
9133
  n = window.localStorage.getItem(e);
8761
9134
  } catch {}
8762
- return !Xo(n) || n === "auto" && !t ? "light" : n;
9135
+ return !ls(n) || n === "auto" && !t ? "light" : n;
8763
9136
  }
8764
- function $o(e, t = Uo) {
9137
+ function fs(e, t = ns) {
8765
9138
  try {
8766
9139
  window.localStorage.setItem(t, e);
8767
9140
  } catch {}
8768
9141
  }
8769
- function es(e) {
9142
+ function ps(e) {
8770
9143
  let t = document.documentElement;
8771
- t.setAttribute("data-theme", e), t.setAttribute("data-bs-theme", Zo(e)), document.dispatchEvent(new CustomEvent(Ko, { detail: { mode: e } }));
9144
+ t.setAttribute("data-theme", e), t.setAttribute("data-bs-theme", us(e)), document.dispatchEvent(new CustomEvent(as, { detail: { mode: e } }));
8772
9145
  }
8773
- function ts(e, { includeAuto: t = !1 } = {}) {
9146
+ function ms(e, { includeAuto: t = !1 } = {}) {
8774
9147
  return e === "light" ? "dark" : e === "dark" && t ? "auto" : "light";
8775
9148
  }
8776
- function ns(e) {
9149
+ function hs(e) {
8777
9150
  if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
8778
- let t = window.matchMedia(Jo), n = () => e(t.matches ? "dark" : "light");
9151
+ let t = window.matchMedia(ss), n = () => e(t.matches ? "dark" : "light");
8779
9152
  return t.addEventListener("change", n), () => t.removeEventListener("change", n);
8780
9153
  }
8781
- 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 = {
9154
+ var gs = 60, _s = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, vs = (e) => e.toFixed(1), ys = (e, t) => `${vs(e)}px ${vs(t)}px`, bs = {
8782
9155
  amplitude: 22,
8783
9156
  segments: 36,
8784
9157
  cycles: 1.5,
8785
9158
  ripples: 2
8786
- }, cs = 6, ls = (e, t, n, r, i) => {
8787
- 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)];
9159
+ }, xs = 6, Ss = (e, t, n, r, i) => {
9160
+ let { amplitude: a, segments: o, cycles: s } = bs, c = n * (t + 2 * a), l = i ? t + a - c : c - a, u = i ? t + 2 * a : -2 * a, d = [ys(0, u)];
8788
9161
  for (let t = 0; t <= o; t++) {
8789
9162
  let n = e * t / o, i = l + a * Math.sin(2 * Math.PI * s * t / o + r);
8790
- d.push(os(n, i));
9163
+ d.push(ys(n, i));
8791
9164
  }
8792
- return d.push(os(e, u)), `polygon(${d.join(", ")})`;
8793
- }, us = (e, t, n, r) => {
8794
- let i = t / cs, a = [];
8795
- for (let t = 0; t < cs; t++) {
9165
+ return d.push(ys(e, u)), `polygon(${d.join(", ")})`;
9166
+ }, Cs = (e, t, n, r) => {
9167
+ let i = t / xs, a = [];
9168
+ for (let t = 0; t < xs; t++) {
8796
9169
  let o = t * i, s = i * n, c = r ? o + i - s : o, l = r ? o + i : o + s;
8797
- a.push(os(0, c), os(e, c), os(e, l), os(0, l));
9170
+ a.push(ys(0, c), ys(e, c), ys(e, l), ys(0, l));
8798
9171
  }
8799
9172
  return `polygon(${a.join(", ")})`;
8800
9173
  };
8801
- function ds(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
9174
+ function ws(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
8802
9175
  let a = r === "dark", o = [];
8803
- for (let r = 0; r <= rs; r++) {
8804
- let s = r / rs, c = is(s);
9176
+ for (let r = 0; r <= gs; r++) {
9177
+ let s = r / gs, c = _s(s);
8805
9178
  switch (e) {
8806
9179
  case "circle": {
8807
9180
  let e = i?.x ?? t / 2, r = i?.y ?? n / 2, a = Math.hypot(Math.max(e, t - e), Math.max(r, n - r));
8808
- o.push({ clipPath: `circle(${as(a * c)}px at ${as(e)}px ${as(r)}px)` });
9181
+ o.push({ clipPath: `circle(${vs(a * c)}px at ${vs(e)}px ${vs(r)}px)` });
8809
9182
  break;
8810
9183
  }
8811
9184
  case "slide": {
8812
9185
  let e = n * (1 - c);
8813
- o.push({ clipPath: a ? `inset(${as(e)}px 0px 0px 0px)` : `inset(0px 0px ${as(e)}px 0px)` });
9186
+ o.push({ clipPath: a ? `inset(${vs(e)}px 0px 0px 0px)` : `inset(0px 0px ${vs(e)}px 0px)` });
8814
9187
  break;
8815
9188
  }
8816
9189
  case "blinds":
8817
- o.push({ clipPath: us(t, n, c, a) });
9190
+ o.push({ clipPath: Cs(t, n, c, a) });
8818
9191
  break;
8819
9192
  case "fade":
8820
9193
  o.push({
@@ -8823,20 +9196,20 @@ function ds(e, { width: t, height: n, to: r = "dark", origin: i } = {}) {
8823
9196
  });
8824
9197
  break;
8825
9198
  case "none": return [];
8826
- default: o.push({ clipPath: ls(t, n, c, s * ss.ripples * 2 * Math.PI, a) });
9199
+ default: o.push({ clipPath: Ss(t, n, c, s * bs.ripples * 2 * Math.PI, a) });
8827
9200
  }
8828
9201
  }
8829
9202
  return o;
8830
9203
  }
8831
- function fs(e, { effect: t = Ho, to: n, origin: r, duration: i, live: a } = {}) {
9204
+ function Ts(e, { effect: t = ts, to: n, origin: r, duration: i, live: a } = {}) {
8832
9205
  let o = document.documentElement, s = n !== void 0 && o.getAttribute("data-bs-theme") === n;
8833
- if (t === "none" || s || Yo("(prefers-reduced-motion: reduce)") || typeof document.startViewTransition != "function" || typeof o.animate != "function") return e(), Promise.resolve(!1);
8834
- o.classList.add(Go);
9206
+ if (t === "none" || s || cs("(prefers-reduced-motion: reduce)") || typeof document.startViewTransition != "function" || typeof o.animate != "function") return e(), Promise.resolve(!1);
9207
+ o.classList.add(is);
8835
9208
  let c = a instanceof Element ? a : null;
8836
- c && (c.style.viewTransitionName = qo);
8837
- let l = document.startViewTransition(e), u = i ?? Wo[t] ?? Wo.wave;
9209
+ c && (c.style.viewTransitionName = os);
9210
+ let l = document.startViewTransition(e), u = i ?? rs[t] ?? rs.wave;
8838
9211
  return l.ready.then(() => {
8839
- let e = ds(t, {
9212
+ let e = ws(t, {
8840
9213
  width: window.innerWidth,
8841
9214
  height: window.innerHeight,
8842
9215
  to: n,
@@ -8848,16 +9221,16 @@ function fs(e, { effect: t = Ho, to: n, origin: r, duration: i, live: a } = {})
8848
9221
  fill: "both",
8849
9222
  pseudoElement: "::view-transition-new(root)"
8850
9223
  });
8851
- }).catch(() => {}), l.finished.catch(() => {}).then(() => (o.classList.remove(Go), c && (c.style.viewTransitionName = ""), !0));
9224
+ }).catch(() => {}), l.finished.catch(() => {}).then(() => (o.classList.remove(is), c && (c.style.viewTransitionName = ""), !0));
8852
9225
  }
8853
9226
  //#endregion
8854
9227
  //#region src/index.js
8855
9228
  var $ = (e, t) => {
8856
9229
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
8857
9230
  };
8858
- function ps() {
8859
- $("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);
9231
+ function Es() {
9232
+ $("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", Pt), $("wui-consent-banner", un), $("wui-slider", ei), $("wui-sortable", ui), $("wui-timepicker", Si), $("wui-tour", ji), $("wui-tree", zi), $("wui-autocomplete", Zt), $("wui-command-palette", nn), $("wui-context-menu", Tn), $("wui-multiselect", Sr), $("wui-taginput", pi), $("wui-otp", Pr), $("wui-status-icon", Rt), $("wui-wizard-step", Wi), $("wui-wizard", Vi);
8860
9233
  }
8861
- ps();
9234
+ Es();
8862
9235
  //#endregion
8863
- 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 };
9236
+ export { fo as CONFIRM_DIALOG_ID, po as CONFIRM_TONES, Gi as COPY_FEEDBACK_MS, ae as CSRF_META_NAME, n as CURRENCIES, a as DATE_PATTERNS, E as DEFAULT_CSRF_HEADER, qi as DEFAULT_IMAGE_ACCEPT, Ji as DEFAULT_MAX_SIZE_MB, Ra as DEFAULT_PASSWORD_RULES, za as DEFAULT_REQUIREMENTS_TITLE, ts as DEFAULT_THEME_EFFECT, ns as DEFAULT_THEME_STORAGE_KEY, i as DURATION_UNITS, s as EMPTY_VALUE, ho as FLASH_STORAGE_KEY, mo as FLASH_VARIANTS, t as FORMAT_STYLES, oe as HTTP_KINDS, o as IST_TIME_ZONE, ut as KANBAN_DRAG_THRESHOLD_PX, lt as KANBAN_LONG_PRESS_MS, ct as KANBAN_PHONE_QUERY, st as KANBAN_STORAGE_PREFIX, ot as KANBAN_SUMMARY_FORMATS, j as KANBAN_TEXT, at as KANBAN_TONES, ca as MASK_INPUT_TYPES, ga as MASK_NAMES, r as MONEY_UNITS, Wa as SELECT_ALL_LABEL, Q as SELECT_CELL_CLASS, Ga as SELECT_ROW_LABEL, go as SERVER_ACTION_TEXT, Lt as STATUS_TONES, as as THEME_CHANGE_EVENT, es as THEME_EFFECTS, rs as THEME_EFFECT_DURATION, os as THEME_LIVE_NAME, $o as THEME_MODES, is as THEME_SWITCHING_CLASS, D 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, Pt as WuiKanban, Sr as WuiMultiSelect, Pr as WuiOtp, Qr as WuiPhone, On as WuiSelect, ei as WuiSlider, ui as WuiSortable, Rt as WuiStatusIcon, pi as WuiTagInput, Si as WuiTimePicker, ji as WuiTour, zi as WuiTree, Vi as WuiWizard, Wi as WuiWizardStep, na as acceptLabel, Za as addRowSelectCells, Qa as addSelectColumn, ps as applyTheme, Aa as attachInputMask, Va as buildPasswordRules, ue as classifyStatus, Ki as copyTextToClipboard, ki as createLocalSeenStore, pe as createRequestQueue, qa as createSelectHeaderCell, Ja as createSelectRowCell, Ya as createSelectSpacerCell, Es as defineWeborityElements, Ha as evaluatePassword, C as formatCompact, S as formatCurrency, T as formatDate, ne as formatDuration, Ca as formatMasked, x as formatNumber, te as formatPercent, ie as formatValue, lo as getServerTable, Qo as getShell, B as glyphSvg, La as initInputMasks, rt as initRemoteModals, zo as initServerActions, co as initServerTables, Zo as initShellParts, $i as isImageFile, ta as isImageOnlyAccept, va as isMaskPattern, ea as isPdfFile, N as kanbanCardLabel, Ot as kanbanStorageKey, jt as kanbanSummaryFormat, it as loadRemoteModal, Ea as maskedPostValue, $t as matchSegments, ra as matchesAccept, ms as nextTheme, Ua as passwordSatisfies, Sa as postedMasked, xa as rawMasked, ce as readCsrf, kt as readKanbanCollapsed, ds as readStoredTheme, ba as resolveMask, us as resolveTheme, fs as storeTheme, Mt as sumKanbanValues, $a as syncSelectAll, ws as themeKeyframes, re as toInstant, Ts as transitionTheme, ia as validateFile, hs as watchSystemTheme, At as writeKanbanCollapsed, fe as wuiFetch };