@webority/ui-react 0.6.13 → 0.7.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.
package/dist/ui-react.js CHANGED
@@ -1,34 +1,34 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
3
- import u from "react-bootstrap/Alert";
4
- import d from "react-bootstrap/Badge";
5
- import f from "react-bootstrap/Button";
6
- import p from "react-bootstrap/Card";
7
- import m from "react-bootstrap/Form";
8
- import { createPortal as h } from "react-dom";
9
- import g from "react-bootstrap/Modal";
10
- import _ from "react-bootstrap/Dropdown";
11
- import { toast as v } from "react-toastify";
12
- import y from "react-bootstrap/Offcanvas";
13
- import b from "react-bootstrap/Nav";
2
+ import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
3
+ import d from "react-bootstrap/Alert";
4
+ import f from "react-bootstrap/Badge";
5
+ import p from "react-bootstrap/Button";
6
+ import m from "react-bootstrap/Card";
7
+ import h from "react-bootstrap/Form";
8
+ import { createPortal as g } from "react-dom";
9
+ import _ from "react-bootstrap/Modal";
10
+ import v from "react-bootstrap/Dropdown";
11
+ import { toast as y } from "react-toastify";
12
+ import b from "react-bootstrap/Offcanvas";
13
+ import x from "react-bootstrap/Nav";
14
14
  //#region src/components/warnUnknownProps.js
15
- var x = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), S = () => {
15
+ var S = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), C = () => {
16
16
  try {
17
17
  return process.env.NODE_ENV !== "production";
18
18
  } catch {
19
19
  return !0;
20
20
  }
21
- }, C = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), w = /* @__PURE__ */ new Set();
22
- function T(e, t) {
23
- if (!(!S() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
24
- if (C(n) || x.has(n)) continue;
21
+ }, w = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), T = /* @__PURE__ */ new Set();
22
+ function E(e, t) {
23
+ if (!(!C() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
24
+ if (w(n) || S.has(n)) continue;
25
25
  let t = `${e}.${n}`;
26
- w.has(t) || (w.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
26
+ T.has(t) || (T.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
27
27
  }
28
28
  }
29
29
  //#endregion
30
30
  //#region src/components/Icon.jsx
31
- var E = {
31
+ var D = {
32
32
  activity: "activity",
33
33
  "alert-circle": "exclamation-circle",
34
34
  "alert-triangle": "exclamation-triangle",
@@ -126,9 +126,9 @@ var E = {
126
126
  "wand-sparkles": "magic",
127
127
  x: "x-lg",
128
128
  zap: "lightning-charge"
129
- }, D = [...Object.keys(E), "hard-hat"].sort();
130
- function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
131
- if (T("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
129
+ }, O = [...Object.keys(D), "hard-hat"].sort();
130
+ function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
131
+ if (E("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
132
132
  width: r,
133
133
  height: r,
134
134
  viewBox: "0 0 24 24",
@@ -150,7 +150,7 @@ function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
150
150
  }), /* @__PURE__ */ t("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
151
151
  })
152
152
  });
153
- let c = E[e] || e;
153
+ let c = D[e] || e;
154
154
  return c ? /* @__PURE__ */ t("i", {
155
155
  className: `bi bi-${c}${i ? ` ${i}` : ""}`,
156
156
  "data-icon": e,
@@ -165,8 +165,8 @@ function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
165
165
  }
166
166
  //#endregion
167
167
  //#region src/components/ActionIcon.jsx
168
- function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
169
- T("ActionIcon", u);
168
+ function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
169
+ E("ActionIcon", u);
170
170
  let d = [
171
171
  "u-action",
172
172
  r ? "danger" : "",
@@ -183,7 +183,7 @@ function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
183
183
  role: !p && i ? "link" : void 0,
184
184
  onClick: o,
185
185
  ...u,
186
- children: /* @__PURE__ */ t(O, {
186
+ children: /* @__PURE__ */ t(k, {
187
187
  name: e,
188
188
  size: a
189
189
  })
@@ -191,9 +191,9 @@ function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
191
191
  }
192
192
  //#endregion
193
193
  //#region src/components/AppAccordion.jsx
194
- function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
195
- T("AppAccordion", s);
196
- let c = o(), u = i || c, [d, f] = l(() => {
194
+ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
195
+ E("AppAccordion", s);
196
+ let c = o(), l = i || c, [d, f] = u(() => {
197
197
  let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
198
198
  return new Set(r ? t : t.slice(0, 1));
199
199
  }), p = (e, t) => e.key ?? String(t), m = (e) => {
@@ -205,7 +205,7 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
205
205
  return /* @__PURE__ */ t("div", {
206
206
  className: `faq-list${a ? ` ${a}` : ""}`,
207
207
  children: e.map((e, r) => {
208
- let i = p(e, r), a = d.has(i), o = `${u}-${r}`, s = `${o}-q`;
208
+ let i = p(e, r), a = d.has(i), o = `${l}-${r}`, s = `${o}-q`;
209
209
  return /* @__PURE__ */ n("div", {
210
210
  className: `faq-item${a ? " open" : ""}`,
211
211
  children: [/* @__PURE__ */ n("button", {
@@ -217,7 +217,7 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
217
217
  onClick: () => m(i),
218
218
  children: [e.title, /* @__PURE__ */ t("span", {
219
219
  className: "faq-q-icon",
220
- children: /* @__PURE__ */ t(O, {
220
+ children: /* @__PURE__ */ t(k, {
221
221
  name: "chevron-down",
222
222
  size: 18
223
223
  })
@@ -237,8 +237,8 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
237
237
  }
238
238
  //#endregion
239
239
  //#region src/components/AppAlert.jsx
240
- function j({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
241
- return T("AppAlert", s), /* @__PURE__ */ t(u, {
240
+ function M({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
241
+ return E("AppAlert", s), /* @__PURE__ */ t(d, {
242
242
  variant: e,
243
243
  className: r || void 0,
244
244
  onClose: i,
@@ -251,14 +251,14 @@ function j({ variant: e = "info", children: n, className: r = "", onClose: i, di
251
251
  }
252
252
  //#endregion
253
253
  //#region ../elements/dist/ui-elements.js
254
- var M = {
254
+ var N = {
255
255
  success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
256
256
  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>",
257
257
  warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
258
258
  info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
259
259
  delete: "<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_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
260
260
  };
261
- Object.keys(M);
261
+ Object.keys(N);
262
262
  var ee = class extends HTMLElement {
263
263
  static get observedAttributes() {
264
264
  return ["tone", "size"];
@@ -270,25 +270,25 @@ var ee = class extends HTMLElement {
270
270
  this.isConnected && this.render();
271
271
  }
272
272
  render() {
273
- let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = M[e] || M.info;
273
+ let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = N[e] || N.info;
274
274
  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>`;
275
275
  }
276
- }, N = 4;
277
- function P(e, t, n = {}) {
276
+ }, P = 4;
277
+ function F(e, t, n = {}) {
278
278
  if (!e || !t) return;
279
- let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + N && r.top > a;
280
- t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(N, r.top - i - N)}px` : `${r.bottom + N}px`, n.matchWidth && (t.style.width = `${r.width}px`);
281
- let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - N);
282
- t.style.left = `${Math.max(N, c)}px`;
279
+ let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + P && r.top > a;
280
+ t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(P, r.top - i - P)}px` : `${r.bottom + P}px`, n.matchWidth && (t.style.width = `${r.width}px`);
281
+ let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - P);
282
+ t.style.left = `${Math.max(P, c)}px`;
283
283
  }
284
- function F(e, t) {
285
- I(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
284
+ function I(e, t) {
285
+ L(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
286
286
  }
287
- function I(e) {
287
+ function L(e) {
288
288
  e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
289
289
  }
290
290
  var te = "data-wui-mirror";
291
- function L(e, t) {
291
+ function R(e, t) {
292
292
  let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${te}]`);
293
293
  if (!n) {
294
294
  r?.remove();
@@ -298,13 +298,13 @@ function L(e, t) {
298
298
  for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
299
299
  r.disabled = e.hasAttribute("disabled");
300
300
  }
301
- var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), ne = (e) => {
301
+ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), ne = (e) => {
302
302
  if (!e) return "";
303
303
  let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
304
304
  return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
305
- }, B = (e) => {
305
+ }, V = (e) => {
306
306
  if (e == null) return "";
307
- let t = e[R] ? String(e.label ?? "") : z(e.label), n = ne(e.icon);
307
+ let t = e[z] ? String(e.label ?? "") : B(e.label), n = ne(e.icon);
308
308
  return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
309
309
  }, re = class extends HTMLElement {
310
310
  _accessibleName() {
@@ -335,18 +335,20 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
335
335
  return this._value;
336
336
  }
337
337
  set value(e) {
338
- this._value = e == null ? "" : String(e), L(this, this._value);
338
+ this._value = e == null ? "" : String(e), R(this, this._value);
339
339
  let t = this._readOptions().find((e) => String(e.value) === this._value);
340
- t && (this._label = H(t.label)), this._syncInput();
340
+ this._label = t ? ae(t.label) : "", this._syncInput(), this._renderOptions("");
341
341
  }
342
342
  set options(e) {
343
- this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
343
+ this._optionsProp = Array.isArray(e) ? e : [];
344
+ let t = this._readOptions().find((e) => String(e.value) === this._value);
345
+ t && (this._label = ae(t.label)), this._renderOptions(), this._syncInput();
344
346
  }
345
347
  get options() {
346
348
  return this._readOptions();
347
349
  }
348
350
  set loading(e) {
349
- this._loading = !!e, this._renderLoading();
351
+ this._loading = !!e, this._renderLoading(), this._renderOptions();
350
352
  }
351
353
  get loading() {
352
354
  return this._loading;
@@ -358,8 +360,10 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
358
360
  return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
359
361
  }
360
362
  get _debounceMs() {
361
- let e = Number(this.getAttribute("debounce"));
362
- return Number.isFinite(e) && e >= 0 ? e : 250;
363
+ let e = this.getAttribute("debounce");
364
+ if (e == null || e === "") return 250;
365
+ let t = Number(e);
366
+ return Number.isFinite(t) && t >= 0 ? t : 250;
363
367
  }
364
368
  _snapshotDeclared() {
365
369
  if (this._declared) return;
@@ -368,7 +372,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
368
372
  value: e.getAttribute("value") ?? e.textContent.trim(),
369
373
  label: e.innerHTML,
370
374
  icon: e.getAttribute("icon") || void 0,
371
- [R]: !0,
375
+ [z]: !0,
372
376
  selected: e.hasAttribute("selected")
373
377
  })));
374
378
  }
@@ -380,8 +384,8 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
380
384
  let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
381
385
  this.innerHTML = `
382
386
  <div class="search-select${n}">
383
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${V(this._accessibleName())}">
384
- <input class="search-select-input search-select-ac-input" placeholder="${V(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
387
+ <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${ie(this._accessibleName())}">
388
+ <input class="search-select-input search-select-ac-input" placeholder="${ie(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
385
389
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
386
390
  <button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
387
391
  </div>
@@ -390,7 +394,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
390
394
  <div class="search-select-empty" hidden>No matches</div>
391
395
  <div class="search-select-hint" hidden>Type to search…</div>
392
396
  </div>
393
- </div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
397
+ </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
394
398
  }
395
399
  _refs() {
396
400
  return {
@@ -419,9 +423,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
419
423
  let t = this._refs();
420
424
  if (!t.optionsWrap) return;
421
425
  let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
422
- !this._remote && n && (r = r.filter((e) => H(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
426
+ !this._remote && n && (r = r.filter((e) => ae(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
423
427
  let t = String(e.value) === String(this._value);
424
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${V(e.value)}" aria-selected="${t}">${B(e)}</button>`;
428
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ie(e.value)}" aria-selected="${t}">${V(e)}</button>`;
425
429
  }).join(""), this._active = -1;
426
430
  let i = n.length < this._minChars;
427
431
  t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
@@ -429,7 +433,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
429
433
  _wire() {
430
434
  let e = this._refs();
431
435
  if (!e.control || !e.input) return;
432
- let t = () => P(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
436
+ let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
433
437
  let t = n();
434
438
  this._active = e;
435
439
  for (let e of this._optionEls()) e.classList.remove("is-active");
@@ -439,7 +443,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
439
443
  }, o = () => {
440
444
  e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
441
445
  }, s = (t) => {
442
- this._value = t.dataset.value, this._label = H(t.innerHTML), L(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
446
+ this._value = t.dataset.value, this._label = ae(t.innerHTML), R(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
443
447
  };
444
448
  e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
445
449
  let t = e.input.value;
@@ -462,17 +466,17 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
462
466
  let t = e.target.closest(".search-select-option");
463
467
  t && r(this._optionEls().indexOf(t));
464
468
  }), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
465
- this._value = "", this._label = "", L(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
469
+ this._value = "", this._label = "", R(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
466
470
  }), this._onDocClick = (e) => {
467
471
  i() && !this.contains(e.target) && o();
468
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
472
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
469
473
  i() && t();
470
474
  });
471
475
  }
472
476
  disconnectedCallback() {
473
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this), clearTimeout(this._timer);
477
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), clearTimeout(this._timer);
474
478
  }
475
- }, V = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), H = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ie = [
479
+ }, ie = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ae = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), oe = [
476
480
  "January",
477
481
  "February",
478
482
  "March",
@@ -485,7 +489,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
485
489
  "October",
486
490
  "November",
487
491
  "December"
488
- ], ae = [
492
+ ], se = [
489
493
  "Su",
490
494
  "Mo",
491
495
  "Tu",
@@ -493,16 +497,16 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
493
497
  "Th",
494
498
  "Fr",
495
499
  "Sa"
496
- ], oe = (e) => String(e).padStart(2, "0"), U = (e, t, n) => `${e}-${oe(t + 1)}-${oe(n)}`, W = (e) => {
500
+ ], H = (e) => String(e).padStart(2, "0"), U = (e, t, n) => `${e}-${H(t + 1)}-${H(n)}`, W = (e) => {
497
501
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
498
502
  return t ? {
499
503
  y: +t[1],
500
504
  m: t[2] - 1,
501
505
  d: +t[3]
502
506
  } : null;
503
- }, se = (e) => {
507
+ }, ce = (e) => {
504
508
  let t = W(e);
505
- return t ? `${oe(t.d)} ${ie[t.m].slice(0, 3)} ${t.y}` : "";
509
+ return t ? `${H(t.d)} ${oe[t.m].slice(0, 3)} ${t.y}` : "";
506
510
  }, G = (e, t) => new Date(e, t + 1, 0).getDate(), K = (e, t) => {
507
511
  for (; t < 0;) t += 12, --e;
508
512
  for (; t > 11;) t -= 12, e += 1;
@@ -510,7 +514,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
510
514
  y: e,
511
515
  m: t
512
516
  };
513
- }, ce = class extends HTMLElement {
517
+ }, le = class extends HTMLElement {
514
518
  static get observedAttributes() {
515
519
  return [
516
520
  "value",
@@ -537,7 +541,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
537
541
  return this._value;
538
542
  }
539
543
  set value(e) {
540
- this._value = e || "", L(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
544
+ this._value = e || "", R(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
541
545
  }
542
546
  _firstDay() {
543
547
  let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
@@ -551,20 +555,20 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
551
555
  this.innerHTML = `
552
556
  <div class="datepicker">
553
557
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
554
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? se(this._value) : e}</span>
558
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? ce(this._value) : e}</span>
555
559
  <i class="bi bi-calendar3" aria-hidden="true"></i>
556
560
  </button>
557
561
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
558
- </div>`, this._rendered = !0, L(this, this._value), this._wire();
562
+ </div>`, this._rendered = !0, R(this, this._value), this._wire();
559
563
  }
560
564
  _syncFormValue() {
561
- L(this, this._value);
565
+ R(this, this._value);
562
566
  }
563
567
  _syncTrigger() {
564
568
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
565
569
  if (!t) return;
566
570
  let n = W(this._value);
567
- t.textContent = n ? se(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
571
+ t.textContent = n ? ce(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
568
572
  }
569
573
  _limits() {
570
574
  let e = W(this.getAttribute("min")), t = W(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
@@ -605,11 +609,11 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
605
609
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
606
610
  let d = K(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
607
611
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
608
- let p = ae.map((t, n) => ae[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
612
+ let p = se.map((t, n) => se[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
609
613
  return `
610
614
  <div class="datepicker-head">
611
615
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
612
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${ie[this._viewM]} ${this._viewY}</button>
616
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${oe[this._viewM]} ${this._viewY}</button>
613
617
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month"><i class="bi bi-chevron-right" aria-hidden="true"></i></button>
614
618
  </div>
615
619
  <div class="datepicker-weekdays">${p}</div>
@@ -627,7 +631,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
627
631
  o ? "is-today" : "",
628
632
  a ? "is-selected" : ""
629
633
  ].filter(Boolean).join(" ");
630
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${ie[i].slice(0, 3)}</button>`;
634
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${oe[i].slice(0, 3)}</button>`;
631
635
  }
632
636
  return `
633
637
  <div class="datepicker-head">
@@ -660,7 +664,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
660
664
  t && e.contains(document.activeElement) && t.focus();
661
665
  }
662
666
  _position(e, t) {
663
- P(e, t);
667
+ F(e, t);
664
668
  }
665
669
  _setFocus(e, t, n, r) {
666
670
  let { y: i, m: a } = K(e, t);
@@ -786,14 +790,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
786
790
  }, t.addEventListener("keydown", this._onKeyBound), this._onDocClick = (e) => {
787
791
  let t = this._popClick;
788
792
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
789
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
793
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
790
794
  r() && this._position(e, t);
791
795
  }), this._syncFormValue();
792
796
  }
793
797
  disconnectedCallback() {
794
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this);
798
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
795
799
  }
796
- }, le = [
800
+ }, ue = [
797
801
  "January",
798
802
  "February",
799
803
  "March",
@@ -806,7 +810,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
806
810
  "October",
807
811
  "November",
808
812
  "December"
809
- ], ue = [
813
+ ], de = [
810
814
  "Su",
811
815
  "Mo",
812
816
  "Tu",
@@ -814,24 +818,24 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
814
818
  "Th",
815
819
  "Fr",
816
820
  "Sa"
817
- ], de = (e) => String(e).padStart(2, "0"), fe = (e, t, n) => `${e}-${de(t + 1)}-${de(n)}`, q = (e) => {
821
+ ], fe = (e) => String(e).padStart(2, "0"), pe = (e, t, n) => `${e}-${fe(t + 1)}-${fe(n)}`, q = (e) => {
818
822
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
819
823
  return t ? {
820
824
  y: +t[1],
821
825
  m: t[2] - 1,
822
826
  d: +t[3]
823
827
  } : null;
824
- }, pe = (e) => {
828
+ }, me = (e) => {
825
829
  let t = q(e);
826
- return t ? `${de(t.d)} ${le[t.m].slice(0, 3)} ${t.y}` : "";
827
- }, me = (e, t) => new Date(e, t + 1, 0).getDate(), he = (e, t) => {
830
+ return t ? `${fe(t.d)} ${ue[t.m].slice(0, 3)} ${t.y}` : "";
831
+ }, he = (e, t) => new Date(e, t + 1, 0).getDate(), ge = (e, t) => {
828
832
  for (; t < 0;) t += 12, --e;
829
833
  for (; t > 11;) t -= 12, e += 1;
830
834
  return {
831
835
  y: e,
832
836
  m: t
833
837
  };
834
- }, ge = class extends HTMLElement {
838
+ }, _e = class extends HTMLElement {
835
839
  static get observedAttributes() {
836
840
  return [
837
841
  "start",
@@ -874,7 +878,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
874
878
  text: e,
875
879
  empty: !0
876
880
  } : {
877
- text: `${pe(this._start) || "Start"} – ${pe(this._end) || "End"}`,
881
+ text: `${me(this._start) || "Start"} – ${me(this._end) || "End"}`,
878
882
  empty: !1
879
883
  };
880
884
  }
@@ -915,17 +919,17 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
915
919
  };
916
920
  }
917
921
  _monthHtml(e, t) {
918
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = me(e, t), a = this._limits(), o = ue.map((e, t) => ue[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
919
- let i = fe(e, t, n), o = a(e, t, n);
922
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = he(e, t), a = this._limits(), o = de.map((e, t) => de[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
923
+ let i = pe(e, t, n), o = a(e, t, n);
920
924
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
921
- }, c = "", l = he(e, t - 1), u = me(l.y, l.m);
925
+ }, c = "", l = ge(e, t - 1), u = he(l.y, l.m);
922
926
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
923
927
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
924
- let d = he(e, t + 1), f = (7 - (r + i) % 7) % 7;
928
+ let d = ge(e, t + 1), f = (7 - (r + i) % 7) % 7;
925
929
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
926
930
  return `
927
931
  <div class="daterange-cal">
928
- <div class="datepicker-month-label">${le[t]} ${e}</div>
932
+ <div class="datepicker-month-label">${ue[t]} ${e}</div>
929
933
  <div class="datepicker-weekdays">${o}</div>
930
934
  <div class="datepicker-grid" role="grid">${c}</div>
931
935
  </div>`;
@@ -933,7 +937,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
933
937
  _renderView() {
934
938
  let e = this.querySelector(".daterange-pop");
935
939
  if (!e) return;
936
- let t = he(this._viewY, this._viewM + 1);
940
+ let t = ge(this._viewY, this._viewM + 1);
937
941
  e.innerHTML = `
938
942
  <div class="daterange-head">
939
943
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
@@ -959,10 +963,10 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
959
963
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
960
964
  }
961
965
  let i = e.querySelector("[data-range-hint]");
962
- i && (i.textContent = this._start ? this._end ? `${pe(this._start)} – ${pe(this._end)}` : "Pick an end date" : "Pick a start date");
966
+ i && (i.textContent = this._start ? this._end ? `${me(this._start)} – ${me(this._end)}` : "Pick an end date" : "Pick a start date");
963
967
  }
964
968
  _position(e, t) {
965
- P(e, t);
969
+ F(e, t);
966
970
  }
967
971
  _pick(e) {
968
972
  if (!this._start || this._start && this._end) {
@@ -993,7 +997,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
993
997
  this._popClick = !0;
994
998
  let t = e.target.closest("[data-nav]");
995
999
  if (t) {
996
- let e = he(this._viewY, this._viewM + Number(t.dataset.nav));
1000
+ let e = ge(this._viewY, this._viewM + Number(t.dataset.nav));
997
1001
  this._viewY = e.y, this._viewM = e.m, this._renderView();
998
1002
  return;
999
1003
  }
@@ -1011,14 +1015,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1011
1015
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
1012
1016
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
1013
1017
  r() && e.key === "Escape" && this._close();
1014
- }, document.addEventListener("keydown", this._onDocKey), F(this, () => {
1018
+ }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
1015
1019
  r() && this._position(e, t);
1016
1020
  }), this._syncMirrors();
1017
1021
  }
1018
1022
  disconnectedCallback() {
1019
- this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), I(this);
1023
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), L(this);
1020
1024
  }
1021
- }, _e = class extends HTMLElement {
1025
+ }, ve = class extends HTMLElement {
1022
1026
  _accessibleName() {
1023
1027
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
1024
1028
  }
@@ -1053,7 +1057,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1053
1057
  return this._values.slice();
1054
1058
  }
1055
1059
  set values(e) {
1056
- this._values = Array.isArray(e) ? e.map(String) : [], L(this, this._values.join(",")), this._rendered && this._renderControl();
1060
+ this._values = Array.isArray(e) ? e.map(String) : [], R(this, this._values.join(",")), this._rendered && this._renderControl();
1057
1061
  }
1058
1062
  set options(e) {
1059
1063
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -1068,7 +1072,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1068
1072
  value: e.getAttribute("value") ?? e.textContent.trim(),
1069
1073
  label: e.innerHTML,
1070
1074
  icon: e.getAttribute("icon") || void 0,
1071
- [R]: !0,
1075
+ [z]: !0,
1072
1076
  selected: e.hasAttribute("selected")
1073
1077
  })));
1074
1078
  }
@@ -1081,12 +1085,12 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1081
1085
  }
1082
1086
  _labelHtmlFor(e) {
1083
1087
  let t = this._readOptions().find((t) => String(t.value) === String(e));
1084
- return t ? B(t) : z(e);
1088
+ return t ? V(t) : B(e);
1085
1089
  }
1086
1090
  render() {
1087
1091
  this._snapshotDeclared();
1088
1092
  let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
1089
- L(this, this._values.join(",")), this.innerHTML = `
1093
+ R(this, this._values.join(",")), this.innerHTML = `
1090
1094
  <div class="search-select${i}">
1091
1095
  <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${J(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1092
1096
  ${n ? `<i class="bi bi-${J(n)} search-select-icon" aria-hidden="true"></i>` : ""}
@@ -1098,14 +1102,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1098
1102
  <div class="search-select-options"></div>
1099
1103
  <div class="search-select-empty" hidden>No matches</div>
1100
1104
  </div>
1101
- </div>`, this._rendered = !0, L(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1105
+ </div>`, this._rendered = !0, R(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1102
1106
  }
1103
1107
  _renderControl() {
1104
1108
  let e = this.querySelector("[data-chips]");
1105
1109
  if (!e) return;
1106
1110
  let t = this.getAttribute("placeholder") || "Select…";
1107
1111
  if (!this._values.length) {
1108
- e.innerHTML = `<span class="search-select-placeholder">${z(t)}</span>`;
1112
+ e.innerHTML = `<span class="search-select-placeholder">${B(t)}</span>`;
1109
1113
  return;
1110
1114
  }
1111
1115
  e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${J(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
@@ -1132,9 +1136,9 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1132
1136
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1133
1137
  if (!t) return;
1134
1138
  let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1135
- r && (i = i.filter((e) => ve(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1139
+ r && (i = i.filter((e) => ye(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1136
1140
  let t = this._values.includes(String(e.value));
1137
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${B(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
1141
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${V(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
1138
1142
  }).join(""), n && (n.hidden = i.length > 0), this._active = -1;
1139
1143
  }
1140
1144
  _wire() {
@@ -1142,7 +1146,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1142
1146
  if (!e || !t) return;
1143
1147
  let a = () => this.hasAttribute("disabled");
1144
1148
  !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this));
1145
- let o = () => P(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1149
+ let o = () => F(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1146
1150
  let t = c();
1147
1151
  this._active = e;
1148
1152
  for (let e of s()) e.classList.remove("is-active");
@@ -1152,7 +1156,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1152
1156
  }, f = () => {
1153
1157
  t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
1154
1158
  }, p = () => {
1155
- L(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1159
+ R(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1156
1160
  }, m = (e) => {
1157
1161
  let t = String(e);
1158
1162
  this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), p();
@@ -1189,14 +1193,14 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1189
1193
  (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
1190
1194
  }), this._onDocClick = (e) => {
1191
1195
  u() && !this.contains(e.target) && f();
1192
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
1196
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
1193
1197
  u() && o();
1194
1198
  });
1195
1199
  }
1196
1200
  disconnectedCallback() {
1197
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this), this._ro?.disconnect(), this._ro = null;
1201
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), this._ro?.disconnect(), this._ro = null;
1198
1202
  }
1199
- }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ve = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ye = /[^0-9]/g, be = /[^0-9a-zA-Z]/g, xe = class extends HTMLElement {
1203
+ }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ye = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), be = /[^0-9]/g, xe = /[^0-9a-zA-Z]/g, Se = class extends HTMLElement {
1200
1204
  static get observedAttributes() {
1201
1205
  return [
1202
1206
  "value",
@@ -1223,16 +1227,16 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1223
1227
  return this._value ?? "";
1224
1228
  }
1225
1229
  set value(e) {
1226
- this._value = this._clean(e), L(this, this._value), this._paint();
1230
+ this._value = this._clean(e), R(this, this._value), this._paint();
1227
1231
  }
1228
1232
  _clean(e) {
1229
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? be : ye, "").slice(0, this.length);
1233
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? xe : be, "").slice(0, this.length);
1230
1234
  }
1231
1235
  connectedCallback() {
1232
1236
  this._rendered || this.render();
1233
1237
  }
1234
1238
  attributeChangedCallback(e, t, n) {
1235
- this._rendered && (e === "value" ? (this._value = this._clean(n), L(this, this._value), this._paint()) : this.render());
1239
+ this._rendered && (e === "value" ? (this._value = this._clean(n), R(this, this._value), this._paint()) : this.render());
1236
1240
  }
1237
1241
  render() {
1238
1242
  this._value = this._clean(this.getAttribute("value") ?? this._value);
@@ -1250,7 +1254,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1250
1254
  spellcheck="false"
1251
1255
  ${n ? "disabled" : ""} />
1252
1256
  <div class="otp-slots" aria-hidden="true">${r}</div>
1253
- </div>`, this._rendered = !0, L(this, this._value), this._wire(), this._paint();
1257
+ </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._paint();
1254
1258
  }
1255
1259
  _refs() {
1256
1260
  return {
@@ -1272,7 +1276,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1272
1276
  if (!e) return;
1273
1277
  let t = (e) => {
1274
1278
  let t = this._clean(e), n = t !== this._value;
1275
- this._value = t, L(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
1279
+ this._value = t, R(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
1276
1280
  bubbles: !0,
1277
1281
  detail: t
1278
1282
  }));
@@ -1292,7 +1296,7 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
1292
1296
  document.activeElement === e && this._paint();
1293
1297
  });
1294
1298
  }
1295
- }, Se = [
1299
+ }, Ce = [
1296
1300
  [
1297
1301
  "AF",
1298
1302
  "Afghanistan",
@@ -2518,20 +2522,20 @@ var R = Symbol("wui.trustedHtml"), z = (e) => String(e ?? "").replace(/&/g, "&am
2518
2522
  "Zimbabwe",
2519
2523
  "263"
2520
2524
  ]
2521
- ], Ce = (e) => (Se.find((t) => t[0] === e) || [
2525
+ ], we = (e) => (Ce.find((t) => t[0] === e) || [
2522
2526
  "",
2523
2527
  "",
2524
2528
  ""
2525
- ])[2], we = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, Te = null;
2526
- function Ee() {
2527
- return Y ? Promise.resolve(Y) : (Te ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
2529
+ ])[2], Te = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, Ee = null;
2530
+ function De() {
2531
+ return Y ? Promise.resolve(Y) : (Ee ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
2528
2532
  AsYouType: e.AsYouType,
2529
2533
  getExampleNumber: e.getExampleNumber,
2530
2534
  isValidPhoneNumber: e.isValidPhoneNumber,
2531
2535
  examples: t.default || t
2532
- }, Y)).catch(() => null), Te);
2536
+ }, Y)).catch(() => null), Ee);
2533
2537
  }
2534
- function De(e, t) {
2538
+ function Oe(e, t) {
2535
2539
  if (!Y || !t) return t;
2536
2540
  try {
2537
2541
  return new Y.AsYouType(e).input(t);
@@ -2539,7 +2543,7 @@ function De(e, t) {
2539
2543
  return t;
2540
2544
  }
2541
2545
  }
2542
- function Oe(e) {
2546
+ function ke(e) {
2543
2547
  if (!Y) return null;
2544
2548
  try {
2545
2549
  return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
@@ -2547,7 +2551,7 @@ function Oe(e) {
2547
2551
  return null;
2548
2552
  }
2549
2553
  }
2550
- function ke(e) {
2554
+ function Ae(e) {
2551
2555
  if (!Y || !e) return null;
2552
2556
  try {
2553
2557
  return Y.isValidPhoneNumber(e);
@@ -2555,7 +2559,7 @@ function ke(e) {
2555
2559
  return null;
2556
2560
  }
2557
2561
  }
2558
- function Ae(e) {
2562
+ function je(e) {
2559
2563
  if (!Y) return null;
2560
2564
  try {
2561
2565
  let t = Y.getExampleNumber(e, Y.examples);
@@ -2564,7 +2568,7 @@ function Ae(e) {
2564
2568
  return null;
2565
2569
  }
2566
2570
  }
2567
- function je(e) {
2571
+ function Me(e) {
2568
2572
  if (!Y || !e?.trim().startsWith("+")) return null;
2569
2573
  try {
2570
2574
  let t = new Y.AsYouType();
@@ -2578,7 +2582,7 @@ function je(e) {
2578
2582
  return null;
2579
2583
  }
2580
2584
  }
2581
- var Me = class extends HTMLElement {
2585
+ var Ne = class extends HTMLElement {
2582
2586
  static get observedAttributes() {
2583
2587
  return [
2584
2588
  "value",
@@ -2597,34 +2601,40 @@ var Me = class extends HTMLElement {
2597
2601
  this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
2598
2602
  }
2599
2603
  get value() {
2600
- return `+${Ce(this._country)}${this._national}`;
2604
+ return `+${we(this._country)}${this._national}`;
2601
2605
  }
2602
2606
  set value(e) {
2603
- this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
2607
+ let t = String(e ?? "").trim(), n = Me(t);
2608
+ if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
2609
+ else if (t.startsWith("+")) {
2610
+ let e = t.replace(/[^0-9]/g, ""), n = String(we(this._country));
2611
+ n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
2612
+ } else this._national = t.replace(/[^0-9]/g, "");
2613
+ n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._commit();
2604
2614
  }
2605
2615
  _commit() {
2606
- L(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2616
+ R(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2607
2617
  }
2608
2618
  render() {
2609
- let e = this.getAttribute("placeholder") || Oe(this._country) || "Enter phone number";
2619
+ let e = this.getAttribute("placeholder") || ke(this._country) || "Enter phone number";
2610
2620
  this._country = this.getAttribute("country") || this._country;
2611
- let t = Se.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${we(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
2621
+ let t = Ce.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${Te(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
2612
2622
  this.innerHTML = `
2613
2623
  <div class="phone-input-wrap">
2614
2624
  <div class="phone-country-adornment">
2615
2625
  <button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
2616
- <span class="${we(this._country)}" data-flag aria-hidden="true"></span>
2626
+ <span class="${Te(this._country)}" data-flag aria-hidden="true"></span>
2617
2627
  <i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
2618
- <span class="phone-dial" data-dial>+${Ce(this._country)}</span>
2628
+ <span class="phone-dial" data-dial>+${we(this._country)}</span>
2619
2629
  </button>
2620
2630
  <div class="country-dropdown-menu" role="listbox" hidden>
2621
2631
  <div class="dropdown-search-wrapper"><span class="dropdown-search-icon"><i class="bi bi-search" aria-hidden="true"></i></span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" /></div>
2622
2632
  <div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
2623
2633
  </div>
2624
2634
  </div>
2625
- <input type="tel" class="input" placeholder="${Ne(e)}" value="${Ne(De(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2635
+ <input type="tel" class="input" placeholder="${Pe(e)}" value="${Pe(Oe(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2626
2636
  </div>
2627
- <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, L(this, this.value), this._wire();
2637
+ <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, R(this, this.value), this._wire();
2628
2638
  }
2629
2639
  _wire() {
2630
2640
  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]");
@@ -2648,7 +2658,7 @@ var Me = class extends HTMLElement {
2648
2658
  }
2649
2659
  a && (a.hidden = n > 0);
2650
2660
  }, m = (e) => {
2651
- this._country = e, this.setAttribute("country", e), s && (s.className = we(e)), c && (c.textContent = `+${Ce(e)}`);
2661
+ this._country = e, this.setAttribute("country", e), s && (s.className = Te(e)), c && (c.textContent = `+${we(e)}`);
2652
2662
  for (let t of i.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
2653
2663
  f(), this._commit();
2654
2664
  };
@@ -2659,35 +2669,35 @@ var Me = class extends HTMLElement {
2659
2669
  let h = this.querySelector("[data-phone-error]"), g = (e) => {
2660
2670
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), h) {
2661
2671
  if (e) {
2662
- let e = Oe(this._country);
2672
+ let e = ke(this._country);
2663
2673
  h.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
2664
2674
  }
2665
2675
  h.hidden = !e;
2666
2676
  }
2667
2677
  };
2668
2678
  o.addEventListener("input", () => {
2669
- let e = o.value.replace(/[^0-9]/g, ""), t = Ae(this._country);
2679
+ let e = o.value.replace(/[^0-9]/g, ""), t = je(this._country);
2670
2680
  t && e.length > t && (e = e.slice(0, t)), this._national = e;
2671
- let n = De(this._country, this._national);
2672
- o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || ke(this.value) === !0) && g(!1);
2681
+ let n = Oe(this._country, this._national);
2682
+ o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || Ae(this.value) === !0) && g(!1);
2673
2683
  }), o.addEventListener("blur", () => {
2674
- g(this._national.length > 0 && ke(this.value) === !1);
2684
+ g(this._national.length > 0 && Ae(this.value) === !1);
2675
2685
  }), o.addEventListener("paste", (e) => {
2676
- let t = je(e.clipboardData?.getData("text"));
2677
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = De(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
2686
+ let t = Me(e.clipboardData?.getData("text"));
2687
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = Oe(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
2678
2688
  }), this._onDocClick = (e) => {
2679
2689
  l() && !this.contains(e.target) && f();
2680
- }, document.addEventListener("click", this._onDocClick), Ee().then((e) => {
2681
- if (!(!e || !o) && (this._national && (o.value = De(this._country, this._national)), !this.getAttribute("placeholder"))) {
2682
- let e = Oe(this._country);
2690
+ }, document.addEventListener("click", this._onDocClick), De().then((e) => {
2691
+ if (!(!e || !o) && (this._national && (o.value = Oe(this._country, this._national)), !this.getAttribute("placeholder"))) {
2692
+ let e = ke(this._country);
2683
2693
  e && (o.placeholder = e);
2684
2694
  }
2685
- }), L(this, this.value);
2695
+ }), R(this, this.value);
2686
2696
  }
2687
2697
  disconnectedCallback() {
2688
2698
  this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
2689
2699
  }
2690
- }, Ne = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Pe = class extends HTMLElement {
2700
+ }, Pe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Fe = class extends HTMLElement {
2691
2701
  static get observedAttributes() {
2692
2702
  return [
2693
2703
  "value",
@@ -2713,13 +2723,17 @@ var Me = class extends HTMLElement {
2713
2723
  this._rendered || this.render();
2714
2724
  }
2715
2725
  attributeChangedCallback(e, t, n) {
2716
- this._rendered && (e === "value" ? this.value = n : this.render());
2726
+ if (e === "value") {
2727
+ this.value = n;
2728
+ return;
2729
+ }
2730
+ this._rendered && this.render();
2717
2731
  }
2718
2732
  get value() {
2719
2733
  return this._value;
2720
2734
  }
2721
2735
  set value(e) {
2722
- this._value = e == null ? "" : String(e), L(this, this._value), this._syncSelected(), this._syncReset();
2736
+ this._value = e == null ? "" : String(e), R(this, this._value), this._syncSelected(), this._syncReset();
2723
2737
  }
2724
2738
  set options(e) {
2725
2739
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -2734,7 +2748,7 @@ var Me = class extends HTMLElement {
2734
2748
  value: e.getAttribute("value") ?? e.textContent.trim(),
2735
2749
  label: e.innerHTML,
2736
2750
  icon: e.getAttribute("icon") || void 0,
2737
- [R]: !0,
2751
+ [z]: !0,
2738
2752
  selected: e.hasAttribute("selected")
2739
2753
  })));
2740
2754
  }
@@ -2744,25 +2758,25 @@ var Me = class extends HTMLElement {
2744
2758
  render() {
2745
2759
  this._snapshotDeclared();
2746
2760
  let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
2747
- l && (this._value = String(l.value)), L(this, this._value);
2761
+ l && (this._value = String(l.value)), R(this, this._value);
2748
2762
  let u = e.map((e) => {
2749
2763
  let t = String(e.value) === String(this._value);
2750
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Fe(e.value)}" aria-selected="${t}">${B(e)}</button>`;
2764
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Ie(e.value)}" aria-selected="${t}">${V(e)}</button>`;
2751
2765
  }).join("");
2752
2766
  this.innerHTML = `
2753
2767
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2754
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Fe(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2755
- ${a ? `<i class="bi bi-${Fe(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2756
- ${o ? `<span class="search-select-prefix">${z(o)}</span>` : ""}
2757
- <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? B(l) : z(s)}</span>
2768
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Ie(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2769
+ ${a ? `<i class="bi bi-${Ie(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2770
+ ${o ? `<span class="search-select-prefix">${B(o)}</span>` : ""}
2771
+ <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? V(l) : B(s)}</span>
2758
2772
  ${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
2759
2773
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
2760
2774
  </button>
2761
2775
  <div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
2762
- ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Fe(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
2776
+ ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Ie(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
2763
2777
  <div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
2764
2778
  </div>
2765
- </div>`, this._rendered = !0, L(this, this._value), this._wire(), this._syncReset();
2779
+ </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncReset();
2766
2780
  }
2767
2781
  _refs() {
2768
2782
  return {
@@ -2788,7 +2802,7 @@ var Me = class extends HTMLElement {
2788
2802
  let t = e.dataset.value === String(this._value);
2789
2803
  e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
2790
2804
  }
2791
- e && (e.innerHTML = t ? B(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2805
+ e && (e.innerHTML = t ? V(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2792
2806
  }
2793
2807
  _syncReset() {
2794
2808
  let { reset: e } = this._refs();
@@ -2800,8 +2814,8 @@ var Me = class extends HTMLElement {
2800
2814
  let t = () => {
2801
2815
  if (this.hasAttribute("compact")) {
2802
2816
  let t = e.control.getBoundingClientRect();
2803
- e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", P(e.control, e.menu);
2804
- } else P(e.control, e.menu, { matchWidth: !0 });
2817
+ e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", F(e.control, e.menu);
2818
+ } else F(e.control, e.menu, { matchWidth: !0 });
2805
2819
  }, n = (e) => {
2806
2820
  let t = this._visible();
2807
2821
  this._active = e;
@@ -2840,25 +2854,25 @@ var Me = class extends HTMLElement {
2840
2854
  t && n(this._visible().indexOf(t));
2841
2855
  }), e.optionsWrap.addEventListener("mouseleave", () => n(-1)), e.search?.addEventListener("input", () => {
2842
2856
  r(e.search.value), n(-1);
2843
- }), e.search?.addEventListener("keydown", c), e.clear?.addEventListener("click", () => {
2857
+ }), e.clear?.addEventListener("click", () => {
2844
2858
  e.search.value = "", r(""), e.search.focus();
2845
2859
  }), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
2846
2860
  i() && !this.contains(e.target) && o();
2847
- }, document.addEventListener("click", this._onDocClick), F(this, () => {
2861
+ }, document.addEventListener("click", this._onDocClick), I(this, () => {
2848
2862
  i() && t();
2849
2863
  });
2850
2864
  }
2851
2865
  disconnectedCallback() {
2852
- this._onDocClick && document.removeEventListener("click", this._onDocClick), I(this);
2866
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
2853
2867
  }
2854
- }, Fe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ie = "image/png,image/jpeg,image/webp", Le = {
2868
+ }, Ie = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Le = "image/png,image/jpeg,image/webp", Re = {
2855
2869
  "image/png": [".png"],
2856
2870
  "image/jpeg": [".jpg", ".jpeg"],
2857
2871
  "image/webp": [".webp"],
2858
2872
  "image/gif": [".gif"],
2859
2873
  "image/svg+xml": [".svg"],
2860
2874
  "application/pdf": [".pdf"]
2861
- }, Re = {
2875
+ }, ze = {
2862
2876
  "image/png": "PNG",
2863
2877
  "image/jpeg": "JPG",
2864
2878
  "image/webp": "WEBP",
@@ -2872,33 +2886,33 @@ var Me = class extends HTMLElement {
2872
2886
  ".gif": "GIF",
2873
2887
  ".svg": "SVG",
2874
2888
  ".pdf": "PDF"
2875
- }, ze = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
2876
- function Be(e) {
2889
+ }, Be = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
2890
+ function Ve(e) {
2877
2891
  let t = [];
2878
- for (let n of ze(e)) {
2879
- let e = Re[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2892
+ for (let n of Be(e)) {
2893
+ let e = ze[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2880
2894
  t.includes(e) || t.push(e);
2881
2895
  }
2882
2896
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
2883
2897
  }
2884
- function Ve(e, t) {
2885
- let n = ze(t);
2898
+ function He(e, t) {
2899
+ let n = Be(t);
2886
2900
  if (!n.length) return !0;
2887
2901
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
2888
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Le[e] || []).some((e) => i.endsWith(e)));
2902
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Re[e] || []).some((e) => i.endsWith(e)));
2889
2903
  }
2890
- function He(e, t = {}) {
2904
+ function Ue(e, t = {}) {
2891
2905
  if (!e) return null;
2892
- let n = t.accept === void 0 ? Ie : t.accept, r = t.maxSizeMb || 5;
2893
- return Ve(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Be(n)} file.`;
2906
+ let n = t.accept === void 0 ? Le : t.accept, r = t.maxSizeMb || 5;
2907
+ return He(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Ve(n)} file.`;
2894
2908
  }
2895
2909
  var X = (e, t) => {
2896
2910
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
2897
2911
  };
2898
- function Ue() {
2899
- X("wui-select", Pe), X("wui-phone", Me), X("wui-datepicker", ce), X("wui-date-range", ge), X("wui-autocomplete", re), X("wui-multiselect", _e), X("wui-otp", xe), X("wui-status-icon", ee);
2912
+ function We() {
2913
+ X("wui-select", Fe), X("wui-phone", Ne), X("wui-datepicker", le), X("wui-date-range", _e), X("wui-autocomplete", re), X("wui-multiselect", ve), X("wui-otp", Se), X("wui-status-icon", ee);
2900
2914
  }
2901
- Ue();
2915
+ We();
2902
2916
  //#endregion
2903
2917
  //#region src/components/RequiredMark.jsx
2904
2918
  function Z() {
@@ -2910,9 +2924,9 @@ function Z() {
2910
2924
  }
2911
2925
  //#endregion
2912
2926
  //#region src/components/AppAutocomplete.jsx
2913
- function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
2914
- T("AppAutocomplete", y);
2915
- let b = c(null), x = typeof o == "function";
2927
+ function Ge({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: c, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
2928
+ E("AppAutocomplete", y);
2929
+ let b = l(null), x = typeof o == "function";
2916
2930
  return a(() => {
2917
2931
  let e = b.current;
2918
2932
  e && !x && (e.options = i || []);
@@ -2954,7 +2968,7 @@ function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2954
2968
  name: p,
2955
2969
  placeholder: s,
2956
2970
  remote: x ? "" : void 0,
2957
- "min-chars": l == null ? void 0 : String(l),
2971
+ "min-chars": c == null ? void 0 : String(c),
2958
2972
  debounce: u == null ? void 0 : String(u),
2959
2973
  size: f || void 0,
2960
2974
  disabled: d ? "" : void 0,
@@ -2972,14 +2986,14 @@ function We({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2972
2986
  }
2973
2987
  //#endregion
2974
2988
  //#region src/components/AppAvatar.jsx
2975
- function Ge(e) {
2989
+ function Ke(e) {
2976
2990
  let t = (e || "").trim();
2977
2991
  if (!t) return "?";
2978
2992
  let n = t.split(/\s+/).filter(Boolean);
2979
2993
  return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
2980
2994
  }
2981
- function Ke({ name: e, src: n, className: r = "", ...i }) {
2982
- T("AppAvatar", i);
2995
+ function qe({ name: e, src: n, className: r = "", ...i }) {
2996
+ E("AppAvatar", i);
2983
2997
  let a = ["avatar", r].filter(Boolean).join(" ");
2984
2998
  return n ? /* @__PURE__ */ t("span", {
2985
2999
  className: a,
@@ -2992,13 +3006,13 @@ function Ke({ name: e, src: n, className: r = "", ...i }) {
2992
3006
  className: a,
2993
3007
  role: "img",
2994
3008
  "aria-label": e,
2995
- children: Ge(e)
3009
+ children: Ke(e)
2996
3010
  });
2997
3011
  }
2998
3012
  //#endregion
2999
3013
  //#region src/components/AppBadge.jsx
3000
- function qe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3001
- return T("AppBadge", a), /* @__PURE__ */ t(d, {
3014
+ function Je({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3015
+ return E("AppBadge", a), /* @__PURE__ */ t(f, {
3002
3016
  bg: !1,
3003
3017
  className: [
3004
3018
  n ? `badge-${n}` : "",
@@ -3011,17 +3025,17 @@ function qe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3011
3025
  }
3012
3026
  //#endregion
3013
3027
  //#region src/components/AppButton.jsx
3014
- var Je = {
3028
+ var Ye = {
3015
3029
  primary: "primary",
3016
3030
  secondary: "secondary",
3017
3031
  outline: "outline-primary",
3018
3032
  ghost: "link",
3019
3033
  danger: "danger"
3020
3034
  };
3021
- function Ye(e, n) {
3035
+ function Xe(e, n) {
3022
3036
  if (!e) return null;
3023
3037
  let r = n === "left" ? "me-2" : "ms-2";
3024
- return typeof e == "string" ? /* @__PURE__ */ t(O, {
3038
+ return typeof e == "string" ? /* @__PURE__ */ t(k, {
3025
3039
  name: e,
3026
3040
  size: 16,
3027
3041
  className: r
@@ -3030,35 +3044,35 @@ function Ye(e, n) {
3030
3044
  children: e
3031
3045
  });
3032
3046
  }
3033
- function Q({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: d = "", ...p }) {
3034
- T("AppButton", p);
3047
+ function Q({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: d = "", ...f }) {
3048
+ E("AppButton", f);
3035
3049
  let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
3036
- return /* @__PURE__ */ n(f, {
3037
- type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
3038
- variant: Je[r] ?? "primary",
3050
+ return /* @__PURE__ */ n(p, {
3051
+ type: (f.as === void 0 || f.as === "button") && f.href === void 0 ? a : void 0,
3052
+ variant: Ye[r] ?? "primary",
3039
3053
  size: i === "md" ? void 0 : i,
3040
3054
  disabled: s || o,
3041
3055
  className: m || void 0,
3042
- ...p,
3056
+ ...f,
3043
3057
  children: [
3044
3058
  o && /* @__PURE__ */ t("span", {
3045
3059
  className: "spinner-border spinner-border-sm me-2",
3046
3060
  "aria-hidden": "true"
3047
3061
  }),
3048
- !o && Ye(l, "left"),
3062
+ !o && Xe(l, "left"),
3049
3063
  e,
3050
- !o && Ye(u, "right")
3064
+ !o && Xe(u, "right")
3051
3065
  ]
3052
3066
  });
3053
3067
  }
3054
3068
  //#endregion
3055
3069
  //#region src/components/AppCallout.jsx
3056
- function Xe({ children: e, icon: r = "info", className: i = "", ...a }) {
3057
- return T("AppCallout", a), /* @__PURE__ */ n("div", {
3070
+ function Ze({ children: e, icon: r = "info", className: i = "", ...a }) {
3071
+ return E("AppCallout", a), /* @__PURE__ */ n("div", {
3058
3072
  className: `info-callout${i ? ` ${i}` : ""}`,
3059
3073
  children: [r && /* @__PURE__ */ t("span", {
3060
3074
  className: "info-callout-icon",
3061
- children: /* @__PURE__ */ t(O, {
3075
+ children: /* @__PURE__ */ t(k, {
3062
3076
  name: r,
3063
3077
  size: 18
3064
3078
  })
@@ -3067,24 +3081,27 @@ function Xe({ children: e, icon: r = "info", className: i = "", ...a }) {
3067
3081
  }
3068
3082
  //#endregion
3069
3083
  //#region src/components/AppCard.jsx
3070
- function Ze({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: m = !1, ...h }) {
3071
- T("AppCard", h);
3084
+ function Qe({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: p = !1, ...h }) {
3085
+ E("AppCard", h);
3072
3086
  let g = a != null || r != null || o != null || s != null;
3073
- return /* @__PURE__ */ n(p, {
3074
- className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
3087
+ return /* @__PURE__ */ n(m, {
3088
+ className: [p ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
3075
3089
  ...h,
3076
- children: [g && /* @__PURE__ */ t(p.Header, {
3090
+ children: [g && /* @__PURE__ */ t(m.Header, {
3077
3091
  className: d || void 0,
3078
3092
  children: a ?? /* @__PURE__ */ n(e, { children: [
3079
- r != null && /* @__PURE__ */ t(p.Title, {
3093
+ r != null && /* @__PURE__ */ t(m.Title, {
3080
3094
  as: "div",
3081
3095
  className: i || void 0,
3082
3096
  children: r
3083
3097
  }),
3084
3098
  o,
3085
- s
3099
+ s != null && /* @__PURE__ */ t("div", {
3100
+ className: "card-header-actions",
3101
+ children: s
3102
+ })
3086
3103
  ] })
3087
- }), f ? /* @__PURE__ */ t(p.Body, {
3104
+ }), f ? /* @__PURE__ */ t(m.Body, {
3088
3105
  className: u || void 0,
3089
3106
  children: c
3090
3107
  }) : c]
@@ -3092,8 +3109,8 @@ function Ze({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
3092
3109
  }
3093
3110
  //#endregion
3094
3111
  //#region src/components/AppCheckbox.jsx
3095
- var Qe = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3096
- T("AppCheckbox", s);
3112
+ var $e = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3113
+ E("AppCheckbox", s);
3097
3114
  let l = o(), u = r || i || l;
3098
3115
  return /* @__PURE__ */ n("div", {
3099
3116
  className: `form-check${a ? ` ${a}` : ""}`,
@@ -3113,8 +3130,8 @@ var Qe = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3113
3130
  });
3114
3131
  //#endregion
3115
3132
  //#region src/components/AppChip.jsx
3116
- function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
3117
- T("AppChip", m);
3133
+ function et({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
3134
+ E("AppChip", m);
3118
3135
  let h = r ?? i, g = [
3119
3136
  "chip",
3120
3137
  a && a !== "neutral" ? a : "",
@@ -3131,7 +3148,7 @@ function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3131
3148
  }) : c
3132
3149
  }) : s ? /* @__PURE__ */ t("span", {
3133
3150
  className: "chip-ic",
3134
- children: /* @__PURE__ */ t(O, {
3151
+ children: /* @__PURE__ */ t(k, {
3135
3152
  name: s,
3136
3153
  size: o === "sm" ? 12 : 14
3137
3154
  })
@@ -3156,7 +3173,7 @@ function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3156
3173
  onClick: l,
3157
3174
  disabled: d,
3158
3175
  "aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
3159
- children: /* @__PURE__ */ t(O, {
3176
+ children: /* @__PURE__ */ t(k, {
3160
3177
  name: "x",
3161
3178
  size: o === "sm" ? 12 : 14
3162
3179
  })
@@ -3165,8 +3182,8 @@ function $e({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3165
3182
  }
3166
3183
  //#endregion
3167
3184
  //#region src/components/AppChoiceCard.jsx
3168
- function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
3169
- return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
3185
+ function tt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
3186
+ return E("AppChoiceCard", y), /* @__PURE__ */ n("label", {
3170
3187
  className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
3171
3188
  children: [
3172
3189
  /* @__PURE__ */ t("input", {
@@ -3186,7 +3203,7 @@ function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3186
3203
  })
3187
3204
  }) : l || c ? /* @__PURE__ */ t("span", {
3188
3205
  className: "struct-card-ic",
3189
- children: l || /* @__PURE__ */ t(O, {
3206
+ children: l || /* @__PURE__ */ t(k, {
3190
3207
  name: c,
3191
3208
  size: u
3192
3209
  })
@@ -3203,7 +3220,7 @@ function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3203
3220
  }),
3204
3221
  /* @__PURE__ */ t("span", {
3205
3222
  className: "struct-card-check",
3206
- children: /* @__PURE__ */ t(O, {
3223
+ children: /* @__PURE__ */ t(k, {
3207
3224
  name: g,
3208
3225
  size: _
3209
3226
  })
@@ -3213,8 +3230,8 @@ function et({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3213
3230
  }
3214
3231
  //#endregion
3215
3232
  //#region src/components/AppChoiceChip.jsx
3216
- function tt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3217
- return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
3233
+ function nt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3234
+ return E("AppChoiceChip", d), /* @__PURE__ */ n("label", {
3218
3235
  className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
3219
3236
  children: [
3220
3237
  /* @__PURE__ */ t("input", {
@@ -3234,59 +3251,59 @@ function tt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
3234
3251
  }
3235
3252
  //#endregion
3236
3253
  //#region src/components/AppColorField.jsx
3237
- function nt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, size: d = "md", className: f = "", ...p }) {
3238
- T("AppColorField", p);
3239
- let m = l || c, h = (e) => /^#[0-9a-f]{6}$/i.test(e), g = d === "sm" ? " color-field-sm" : d === "lg" ? " color-field-lg" : "", _ = d === "sm" ? " input-sm" : d === "lg" ? " input-lg" : "";
3254
+ function rt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: s, hint: c, name: l, id: u, disabled: d = !1, size: f = "md", className: p = "", ...m }) {
3255
+ E("AppColorField", m);
3256
+ let h = o(), g = u || l || h, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = f === "sm" ? " color-field-sm" : f === "lg" ? " color-field-lg" : "", y = f === "sm" ? " input-sm" : f === "lg" ? " input-lg" : "";
3240
3257
  return /* @__PURE__ */ n("div", {
3241
- className: `field${f ? ` ${f}` : ""}`,
3258
+ className: `field${p ? ` ${p}` : ""}`,
3242
3259
  children: [
3243
3260
  i && /* @__PURE__ */ n("label", {
3244
3261
  className: "label",
3245
- htmlFor: m,
3262
+ htmlFor: g,
3246
3263
  children: [i, a && /* @__PURE__ */ t(Z, {})]
3247
3264
  }),
3248
3265
  /* @__PURE__ */ n("div", {
3249
- className: `color-field${g}`,
3266
+ className: `color-field${v}`,
3250
3267
  children: [/* @__PURE__ */ t("input", {
3251
3268
  type: "color",
3252
3269
  className: "color-field-swatch",
3253
- value: h(e) ? e : "#000000",
3270
+ value: _(e) ? e : "#000000",
3254
3271
  onChange: (e) => r?.(e.target.value),
3255
- disabled: u,
3272
+ disabled: d,
3256
3273
  "aria-label": `${i || "Colour"} — colour picker`,
3257
3274
  tabIndex: -1
3258
3275
  }), /* @__PURE__ */ t("input", {
3259
3276
  type: "text",
3260
- className: `input color-field-hex${_}${o ? " error" : ""}`,
3261
- id: m,
3262
- name: c,
3277
+ className: `input color-field-hex${y}${s ? " error" : ""}`,
3278
+ id: g,
3279
+ name: l,
3263
3280
  value: e,
3264
3281
  onChange: (e) => r?.(e.target.value),
3265
3282
  placeholder: "#4F46E5",
3266
3283
  spellCheck: !1,
3267
3284
  maxLength: 7,
3268
3285
  required: a,
3269
- disabled: u,
3270
- "aria-invalid": o ? "true" : "false"
3286
+ disabled: d,
3287
+ "aria-invalid": s ? "true" : "false"
3271
3288
  })]
3272
3289
  }),
3273
- o ? /* @__PURE__ */ t("div", {
3290
+ s ? /* @__PURE__ */ t("div", {
3274
3291
  className: "field-error",
3275
- children: o
3276
- }) : s ? /* @__PURE__ */ t("div", {
3277
- className: "field-hint",
3278
3292
  children: s
3293
+ }) : c ? /* @__PURE__ */ t("div", {
3294
+ className: "field-hint",
3295
+ children: c
3279
3296
  }) : null
3280
3297
  ]
3281
3298
  });
3282
3299
  }
3283
3300
  //#endregion
3284
3301
  //#region src/components/AppCompareTable.jsx
3285
- function rt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3286
- T("AppCompareTable", o);
3302
+ function it({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3303
+ E("AppCompareTable", o);
3287
3304
  let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
3288
3305
  className: "compare-yes",
3289
- children: /* @__PURE__ */ t(O, {
3306
+ children: /* @__PURE__ */ t(k, {
3290
3307
  name: "check",
3291
3308
  size: 16
3292
3309
  })
@@ -3318,9 +3335,9 @@ function rt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
3318
3335
  }
3319
3336
  //#endregion
3320
3337
  //#region src/components/AppInfoTip.jsx
3321
- function it({ label: e, children: r, ...i }) {
3322
- T("AppInfoTip", i);
3323
- let [a, u] = l(!1), [d, f] = l(null), p = c(null), m = c(null), g = o();
3338
+ function at({ label: e, children: r, ...i }) {
3339
+ E("AppInfoTip", i);
3340
+ let [a, c] = u(!1), [d, f] = u(null), p = l(null), m = l(null), h = o(), _ = l(!1);
3324
3341
  return s(() => {
3325
3342
  if (!a || !p.current || !m.current) return;
3326
3343
  let e = p.current.getBoundingClientRect(), t = m.current.offsetWidth, n = m.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
@@ -3332,27 +3349,37 @@ function it({ label: e, children: r, ...i }) {
3332
3349
  });
3333
3350
  }, [a]), r ? /* @__PURE__ */ n("span", {
3334
3351
  className: "infotip",
3335
- onMouseLeave: () => u(!1),
3352
+ onMouseLeave: () => c(!1),
3336
3353
  children: [/* @__PURE__ */ t("button", {
3337
3354
  type: "button",
3338
3355
  ref: p,
3339
3356
  className: "infotip-btn",
3340
3357
  "aria-label": e,
3341
3358
  "aria-expanded": a,
3342
- "aria-describedby": a ? g : void 0,
3343
- onMouseEnter: () => u(!0),
3344
- onClick: () => u((e) => !e),
3345
- onFocus: () => u(!0),
3346
- onBlur: () => u(!1),
3347
- children: /* @__PURE__ */ t(O, {
3359
+ "aria-describedby": a ? h : void 0,
3360
+ onMouseEnter: () => c(!0),
3361
+ onClick: () => {
3362
+ if (_.current) {
3363
+ _.current = !1;
3364
+ return;
3365
+ }
3366
+ c((e) => !e);
3367
+ },
3368
+ onFocus: () => {
3369
+ _.current = !0, c(!0);
3370
+ },
3371
+ onBlur: () => {
3372
+ _.current = !1, c(!1);
3373
+ },
3374
+ children: /* @__PURE__ */ t(k, {
3348
3375
  name: "info",
3349
3376
  size: 16
3350
3377
  })
3351
- }), a && h(/* @__PURE__ */ t("span", {
3378
+ }), a && g(/* @__PURE__ */ t("span", {
3352
3379
  ref: m,
3353
3380
  className: "infotip-pop is-portal",
3354
3381
  role: "tooltip",
3355
- id: g,
3382
+ id: h,
3356
3383
  style: {
3357
3384
  position: "fixed",
3358
3385
  top: d ? d.top : 0,
@@ -3365,29 +3392,29 @@ function it({ label: e, children: r, ...i }) {
3365
3392
  }
3366
3393
  //#endregion
3367
3394
  //#region src/components/AppInput.jsx
3368
- var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: u = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: h, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: E, prefix: D, suffix: k, floatingLabel: A = !1, ...j }, M) {
3369
- T("AppInput", j);
3370
- let [ee, N] = l(!1), P = v || y, F = u === "password", I = F && ee ? "text" : u, te = c(null), L = (e) => {
3371
- te.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
3372
- }, R = String(j.value ?? j.defaultValue ?? ""), [z, ne] = l(() => !!R), [B, re] = l(() => R.length), V = C && !S, H = C || w, ie = (e) => {
3373
- ne(!!e.target.value), re(e.target.value.length), j.onInput?.(e);
3374
- }, ae = V ? /* @__PURE__ */ t("button", {
3395
+ var ot = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: c = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: m, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: D, suffix: O, floatingLabel: A = !1, ...j }, M) {
3396
+ E("AppInput", j);
3397
+ let [N, ee] = u(!1), P = v || y, F = c === "password", I = F && N ? "text" : c, L = l(null), te = (e) => {
3398
+ L.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
3399
+ }, R = String(j.value ?? j.defaultValue ?? ""), [z, B] = u(() => !!R), [ne, V] = u(() => R.length), re = C && !S, ie = C || w, ae = (e) => {
3400
+ B(!!e.target.value), V(e.target.value.length), j.onInput?.(e);
3401
+ }, oe = re ? /* @__PURE__ */ t("button", {
3375
3402
  type: "button",
3376
3403
  className: "input-clear",
3377
3404
  onClick: () => {
3378
- let e = te.current;
3405
+ let e = L.current;
3379
3406
  if (!e) return;
3380
3407
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
3381
- t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ne(!1), e.focus();
3408
+ t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), B(!1), e.focus();
3382
3409
  },
3383
3410
  "aria-label": "Clear",
3384
3411
  tabIndex: -1,
3385
3412
  hidden: !z,
3386
- children: /* @__PURE__ */ t(O, {
3413
+ children: /* @__PURE__ */ t(k, {
3387
3414
  name: "x",
3388
3415
  size: 16
3389
3416
  })
3390
- }) : null, oe = [
3417
+ }) : null, se = [
3391
3418
  "input",
3392
3419
  d === "sm" ? "input-sm" : "",
3393
3420
  d === "lg" ? "input-lg" : "",
@@ -3396,69 +3423,69 @@ var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3396
3423
  _ ? "num-input" : "",
3397
3424
  C ? "has-clear" : "",
3398
3425
  b
3399
- ].filter(Boolean).join(" "), U = /* @__PURE__ */ t(m.Control, {
3426
+ ].filter(Boolean).join(" "), H = /* @__PURE__ */ t(h.Control, {
3400
3427
  id: P,
3401
3428
  name: y,
3402
3429
  type: I,
3403
- className: oe,
3430
+ className: se,
3404
3431
  disabled: S,
3405
3432
  required: r,
3406
3433
  "aria-invalid": i ? "true" : "false",
3407
- maxLength: E,
3434
+ maxLength: T,
3408
3435
  ...j,
3409
3436
  placeholder: A ? " " : j.placeholder,
3410
- ref: L,
3411
- onInput: H ? ie : j.onInput
3412
- }), W;
3413
- return W = A && e ? /* @__PURE__ */ n("div", {
3437
+ ref: te,
3438
+ onInput: ie ? ae : j.onInput
3439
+ }), U;
3440
+ return U = A && e ? /* @__PURE__ */ n("div", {
3414
3441
  className: "field-float",
3415
- children: [U, /* @__PURE__ */ n("label", {
3442
+ children: [H, /* @__PURE__ */ n("label", {
3416
3443
  className: "float-label",
3417
3444
  htmlFor: P,
3418
3445
  children: [e, r && /* @__PURE__ */ t(Z, {})]
3419
3446
  })]
3420
- }) : D || k ? /* @__PURE__ */ n("div", {
3447
+ }) : D || O ? /* @__PURE__ */ n("div", {
3421
3448
  className: "input-affixed",
3422
3449
  children: [
3423
3450
  D != null && /* @__PURE__ */ t("span", {
3424
3451
  className: "affix affix-pre",
3425
3452
  children: D
3426
3453
  }),
3427
- U,
3428
- k != null && /* @__PURE__ */ t("span", {
3454
+ H,
3455
+ O != null && /* @__PURE__ */ t("span", {
3429
3456
  className: "affix affix-suf",
3430
- children: k
3457
+ children: O
3431
3458
  })
3432
3459
  ]
3433
3460
  }) : _ ? /* @__PURE__ */ n("div", {
3434
3461
  className: "input-with-unit",
3435
- children: [U, /* @__PURE__ */ t("span", {
3462
+ children: [H, /* @__PURE__ */ t("span", {
3436
3463
  className: "unit",
3437
3464
  children: _
3438
3465
  })]
3439
3466
  }) : F ? /* @__PURE__ */ n("div", {
3440
3467
  className: "input-wrap",
3441
- children: [U, /* @__PURE__ */ t("button", {
3468
+ children: [H, /* @__PURE__ */ t("button", {
3442
3469
  type: "button",
3443
3470
  className: "pw-toggle",
3444
- onClick: () => N((e) => !e),
3445
- "aria-label": ee ? "Hide password" : "Show password",
3471
+ onClick: () => ee((e) => !e),
3472
+ "aria-label": N ? "Hide password" : "Show password",
3446
3473
  tabIndex: -1,
3447
- children: /* @__PURE__ */ t(O, {
3448
- name: ee ? "eye-off" : "eye",
3474
+ children: /* @__PURE__ */ t(k, {
3475
+ name: N ? "eye-off" : "eye",
3449
3476
  size: 18
3450
3477
  })
3451
3478
  })]
3452
3479
  }) : p ? /* @__PURE__ */ n("div", {
3453
3480
  className: "input-wrap",
3454
- children: [U, /* @__PURE__ */ t("button", {
3481
+ children: [H, /* @__PURE__ */ t("button", {
3455
3482
  type: "button",
3456
3483
  className: "pw-toggle",
3457
- onClick: h,
3458
- disabled: !h,
3484
+ onClick: m,
3485
+ disabled: !m,
3459
3486
  tabIndex: -1,
3460
3487
  "aria-label": g || p,
3461
- children: /* @__PURE__ */ t(O, {
3488
+ children: /* @__PURE__ */ t(k, {
3462
3489
  name: p,
3463
3490
  size: 18
3464
3491
  })
@@ -3468,39 +3495,39 @@ var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3468
3495
  children: [
3469
3496
  f && /* @__PURE__ */ t("span", {
3470
3497
  className: "ic",
3471
- children: /* @__PURE__ */ t(O, {
3498
+ children: /* @__PURE__ */ t(k, {
3472
3499
  name: f,
3473
3500
  size: 16
3474
3501
  })
3475
3502
  }),
3476
- U,
3477
- ae
3503
+ H,
3504
+ oe
3478
3505
  ]
3479
3506
  }) : f ? /* @__PURE__ */ n("div", {
3480
3507
  className: "input-icon",
3481
3508
  children: [/* @__PURE__ */ t("span", {
3482
3509
  className: "ic",
3483
- children: /* @__PURE__ */ t(O, {
3510
+ children: /* @__PURE__ */ t(k, {
3484
3511
  name: f,
3485
3512
  size: 16
3486
3513
  })
3487
- }), U]
3488
- }) : U, /* @__PURE__ */ n(m.Group, {
3514
+ }), H]
3515
+ }) : H, /* @__PURE__ */ n(h.Group, {
3489
3516
  className: `field${x ? ` ${x}` : ""}`,
3490
3517
  children: [
3491
- e && !A && /* @__PURE__ */ n(m.Label, {
3518
+ e && !A && /* @__PURE__ */ n(h.Label, {
3492
3519
  className: "label",
3493
3520
  htmlFor: P,
3494
3521
  children: [
3495
3522
  e,
3496
3523
  r && /* @__PURE__ */ t(Z, {}),
3497
- o && /* @__PURE__ */ t(it, {
3524
+ o && /* @__PURE__ */ t(at, {
3498
3525
  label: s,
3499
3526
  children: o
3500
3527
  })
3501
3528
  ]
3502
3529
  }),
3503
- W,
3530
+ U,
3504
3531
  i ? /* @__PURE__ */ t("div", {
3505
3532
  className: "field-error",
3506
3533
  children: i
@@ -3509,29 +3536,29 @@ var at = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3509
3536
  children: a
3510
3537
  }) : null,
3511
3538
  w && /* @__PURE__ */ n("div", {
3512
- className: `field-count${E && B >= E ? " at-limit" : ""}`,
3513
- children: [B, E ? ` / ${E}` : ""]
3539
+ className: `field-count${T && ne >= T ? " at-limit" : ""}`,
3540
+ children: [ne, T ? ` / ${T}` : ""]
3514
3541
  })
3515
3542
  ]
3516
3543
  });
3517
- }), ot = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
3518
- function st({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: _, ...v }) {
3519
- T("AppModal", v);
3520
- let y = c(null);
3544
+ }), st = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
3545
+ function ct({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: c, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: g, ...v }) {
3546
+ E("AppModal", v);
3547
+ let y = l(null);
3521
3548
  a(() => {
3522
3549
  if (!e) return;
3523
3550
  let t = y.current?.closest(".modal-content");
3524
3551
  if (!t) return;
3525
- let n = () => Array.from(t.querySelectorAll(ot));
3526
- (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
3552
+ let n = () => Array.from(t.querySelectorAll(st));
3553
+ (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
3527
3554
  }, [e]);
3528
- let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
3529
- "lx-modal",
3530
- d ? "lx-modal-wide" : "",
3531
- f ? "lx-modal-side" : "",
3555
+ let b = ["wui-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
3556
+ "wui-modal",
3557
+ d ? "wui-modal-wide" : "",
3558
+ f ? "wui-modal-side" : "",
3532
3559
  h
3533
3560
  ].filter(Boolean).join(" ");
3534
- return /* @__PURE__ */ n(g, {
3561
+ return /* @__PURE__ */ n(_, {
3535
3562
  show: e,
3536
3563
  onHide: s,
3537
3564
  animation: !1,
@@ -3543,35 +3570,35 @@ function st({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3543
3570
  size: u,
3544
3571
  centered: !f,
3545
3572
  className: b,
3546
- style: p == null ? void 0 : { "--lx-modal-max-width": typeof p == "number" ? `${p}px` : p },
3547
- dialogClassName: "lx-rb-dialog",
3573
+ style: p == null ? void 0 : { "--wui-modal-max-width": typeof p == "number" ? `${p}px` : p },
3574
+ dialogClassName: "wui-rb-dialog",
3548
3575
  contentClassName: x,
3549
- backdropClassName: "lx-modal-dim",
3576
+ backdropClassName: "wui-modal-dim",
3550
3577
  "aria-label": typeof r == "string" ? r : void 0,
3551
3578
  children: [
3552
3579
  !m && /* @__PURE__ */ n("div", {
3553
- className: "lx-modal-header",
3580
+ className: "wui-modal-header",
3554
3581
  children: [/* @__PURE__ */ n("div", {
3555
- className: "lx-modal-heading",
3582
+ className: "wui-modal-heading",
3556
3583
  children: [o && /* @__PURE__ */ t("span", {
3557
- className: "lx-modal-headicon",
3558
- children: /* @__PURE__ */ t(O, {
3584
+ className: "wui-modal-headicon",
3585
+ children: /* @__PURE__ */ t(k, {
3559
3586
  name: o,
3560
3587
  size: 18
3561
3588
  })
3562
3589
  }), /* @__PURE__ */ n("div", {
3563
- className: "lx-modal-headtext",
3590
+ className: "wui-modal-headtext",
3564
3591
  children: [/* @__PURE__ */ t("div", {
3565
- className: "lx-modal-title",
3592
+ className: "wui-modal-title",
3566
3593
  children: r
3567
3594
  }), i && /* @__PURE__ */ t("div", {
3568
- className: "lx-modal-subtitle",
3595
+ className: "wui-modal-subtitle",
3569
3596
  children: i
3570
3597
  })]
3571
3598
  })]
3572
3599
  }), /* @__PURE__ */ t("button", {
3573
3600
  type: "button",
3574
- className: "lx-modal-close",
3601
+ className: "wui-modal-close",
3575
3602
  onClick: s,
3576
3603
  "aria-label": "Close",
3577
3604
  children: /* @__PURE__ */ t("svg", {
@@ -3589,13 +3616,13 @@ function st({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3589
3616
  })]
3590
3617
  }),
3591
3618
  /* @__PURE__ */ t("div", {
3592
- className: "lx-modal-body",
3619
+ className: "wui-modal-body",
3593
3620
  ref: y,
3594
- children: _
3621
+ children: g
3595
3622
  }),
3596
- l && /* @__PURE__ */ t("div", {
3597
- className: "lx-modal-footer",
3598
- children: l
3623
+ c && /* @__PURE__ */ t("div", {
3624
+ className: "wui-modal-footer",
3625
+ children: c
3599
3626
  })
3600
3627
  ]
3601
3628
  });
@@ -3607,7 +3634,7 @@ var $ = (e) => function({ size: n = 72 }) {
3607
3634
  tone: e,
3608
3635
  size: n
3609
3636
  });
3610
- }, ct = {
3637
+ }, lt = {
3611
3638
  success: $("success"),
3612
3639
  error: $("error"),
3613
3640
  warning: $("warning"),
@@ -3616,50 +3643,50 @@ var $ = (e) => function({ size: n = 72 }) {
3616
3643
  };
3617
3644
  //#endregion
3618
3645
  //#region src/components/AppConfirmDialog.jsx
3619
- function lt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
3620
- T("AppConfirmDialog", h);
3621
- let [g, _] = l("");
3646
+ function ut({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: l = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
3647
+ E("AppConfirmDialog", h);
3648
+ let [g, _] = u("");
3622
3649
  if (a(() => {
3623
3650
  r || _("");
3624
3651
  }, [r]), !r) return null;
3625
- let v = !!f && g.trim() !== f, y = ct[d || (u ? "delete" : "info")];
3626
- return /* @__PURE__ */ t(st, {
3652
+ let v = !!f && g.trim() !== f, y = lt[d || (l ? "delete" : "info")];
3653
+ return /* @__PURE__ */ t(ct, {
3627
3654
  open: r,
3628
3655
  hideHeader: !0,
3629
3656
  title: i,
3630
3657
  onClose: m,
3631
- className: "lx-confirm",
3658
+ className: "wui-confirm",
3632
3659
  footer: /* @__PURE__ */ n("div", {
3633
- className: "lx-confirm-actions",
3660
+ className: "wui-confirm-actions",
3634
3661
  children: [/* @__PURE__ */ t(Q, {
3635
3662
  variant: "secondary",
3636
3663
  onClick: m,
3637
3664
  children: c
3638
3665
  }), /* @__PURE__ */ t(Q, {
3639
- variant: u ? "danger" : "primary",
3666
+ variant: l ? "danger" : "primary",
3640
3667
  disabled: v,
3641
3668
  onClick: p,
3642
3669
  children: s
3643
3670
  })]
3644
3671
  }),
3645
3672
  children: /* @__PURE__ */ n("div", {
3646
- className: "lx-confirm-content",
3673
+ className: "wui-confirm-content",
3647
3674
  children: [
3648
3675
  y && /* @__PURE__ */ t("span", {
3649
- className: "lx-confirm-icon",
3676
+ className: "wui-confirm-icon",
3650
3677
  children: /* @__PURE__ */ t(y, { size: 104 })
3651
3678
  }),
3652
3679
  /* @__PURE__ */ t("h3", {
3653
- className: "lx-confirm-title",
3680
+ className: "wui-confirm-title",
3654
3681
  tabIndex: -1,
3655
3682
  "data-autofocus": !0,
3656
3683
  children: i
3657
3684
  }),
3658
3685
  o && /* @__PURE__ */ t("p", {
3659
- className: "lx-confirm-msg",
3686
+ className: "wui-confirm-msg",
3660
3687
  children: o
3661
3688
  }),
3662
- f && /* @__PURE__ */ t(at, {
3689
+ f && /* @__PURE__ */ t(ot, {
3663
3690
  fieldClassName: "mt-3 mb-0 w-100 text-start",
3664
3691
  label: /* @__PURE__ */ n(e, { children: [
3665
3692
  "Type ",
@@ -3676,8 +3703,8 @@ function lt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3676
3703
  }
3677
3704
  //#endregion
3678
3705
  //#region src/components/AppSkeleton.jsx
3679
- function ut({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3680
- return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
3706
+ function dt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3707
+ return E("AppSkeleton", o), /* @__PURE__ */ t("span", {
3681
3708
  className: `skeleton${i ? ` ${i}` : ""}`,
3682
3709
  "aria-hidden": "true",
3683
3710
  style: {
@@ -3685,10 +3712,11 @@ function ut({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
3685
3712
  height: n,
3686
3713
  borderRadius: r,
3687
3714
  ...a
3688
- }
3715
+ },
3716
+ ...o
3689
3717
  });
3690
3718
  }
3691
- var dt = [
3719
+ var ft = [
3692
3720
  "r0",
3693
3721
  "r1",
3694
3722
  "r2",
@@ -3697,7 +3725,7 @@ var dt = [
3697
3725
  "r5",
3698
3726
  "r6",
3699
3727
  "r7"
3700
- ], ft = [
3728
+ ], pt = [
3701
3729
  "c0",
3702
3730
  "c1",
3703
3731
  "c2",
@@ -3707,17 +3735,17 @@ var dt = [
3707
3735
  "c6",
3708
3736
  "c7"
3709
3737
  ];
3710
- function pt({ rows: e = 4, cols: n = 5 }) {
3711
- return dt.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: ft.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(ut, {
3738
+ function mt({ rows: e = 4, cols: n = 5 }) {
3739
+ return ft.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: pt.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(dt, {
3712
3740
  width: n === 0 ? "70%" : "50%",
3713
3741
  height: 12
3714
3742
  }) }, e)) }, e));
3715
3743
  }
3716
3744
  //#endregion
3717
3745
  //#region src/components/AppSelectMini.jsx
3718
- function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3719
- T("AppSelectMini", h);
3720
- let g = c(null);
3746
+ function ht({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: c, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3747
+ E("AppSelectMini", h);
3748
+ let g = l(null);
3721
3749
  return a(() => {
3722
3750
  g.current && (g.current.options = r.map((e) => ({
3723
3751
  value: e.value,
@@ -3739,7 +3767,7 @@ function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3739
3767
  ref: g,
3740
3768
  name: o,
3741
3769
  compact: "",
3742
- id: l,
3770
+ id: c,
3743
3771
  placeholder: i,
3744
3772
  "aria-label": s,
3745
3773
  size: d || void 0,
@@ -3749,19 +3777,19 @@ function mt({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3749
3777
  }
3750
3778
  //#endregion
3751
3779
  //#region src/components/AppTablePagination.jsx
3752
- var ht = [
3780
+ var gt = [
3753
3781
  5,
3754
3782
  10,
3755
3783
  25,
3756
3784
  50
3757
3785
  ];
3758
- function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = ht, ...d }) {
3759
- return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
3786
+ function _t({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = gt, ...d }) {
3787
+ return E("AppTablePagination", d), /* @__PURE__ */ n("div", {
3760
3788
  className: "table-pagination",
3761
3789
  children: [
3762
3790
  /* @__PURE__ */ n("span", {
3763
3791
  className: "tpg-rows",
3764
- children: ["Rows per page:", /* @__PURE__ */ t(mt, {
3792
+ children: ["Rows per page:", /* @__PURE__ */ t(ht, {
3765
3793
  value: i,
3766
3794
  onChange: (e) => l(Number(e)),
3767
3795
  ariaLabel: "Rows per page",
@@ -3789,7 +3817,7 @@ function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3789
3817
  onClick: () => c(Math.max(1, e - 1)),
3790
3818
  disabled: e <= 1,
3791
3819
  "aria-label": "Previous page",
3792
- children: /* @__PURE__ */ t(O, {
3820
+ children: /* @__PURE__ */ t(k, {
3793
3821
  name: "arrow-left",
3794
3822
  size: 18
3795
3823
  })
@@ -3799,7 +3827,7 @@ function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3799
3827
  onClick: () => c(Math.min(r, e + 1)),
3800
3828
  disabled: e >= r,
3801
3829
  "aria-label": "Next page",
3802
- children: /* @__PURE__ */ t(O, {
3830
+ children: /* @__PURE__ */ t(k, {
3803
3831
  name: "arrow-right",
3804
3832
  size: 18
3805
3833
  })
@@ -3810,15 +3838,15 @@ function gt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3810
3838
  }
3811
3839
  //#endregion
3812
3840
  //#region src/components/AppDataTable.jsx
3813
- function _t(e) {
3814
- return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3815
- }
3816
3841
  function vt(e) {
3817
- return e == null || e === "" ? "—" : e;
3842
+ return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3818
3843
  }
3819
- function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
3820
- T("AppDataTable", S);
3821
- let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, E = v && i && i.length > 0 && w === i.length, D = w > 0 && !E, k = (e) => {
3844
+ function yt(e) {
3845
+ return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
3846
+ }
3847
+ function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
3848
+ E("AppDataTable", S);
3849
+ let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, T = v && i && i.length > 0 && w === i.length, D = w > 0 && !T, O = (e) => {
3822
3850
  e && (e.indeterminate = D);
3823
3851
  }, A = d !== void 0 && f > 0 ? d : u;
3824
3852
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
@@ -3828,12 +3856,12 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3828
3856
  "aria-label": g,
3829
3857
  children: [/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [
3830
3858
  v && /* @__PURE__ */ t("th", {
3831
- className: "lx-select-cell",
3859
+ className: "wui-select-cell",
3832
3860
  children: /* @__PURE__ */ t("input", {
3833
- ref: k,
3861
+ ref: O,
3834
3862
  type: "checkbox",
3835
- className: "lx-check",
3836
- checked: E,
3863
+ className: "wui-check",
3864
+ checked: T,
3837
3865
  onChange: (e) => x?.(e.target.checked),
3838
3866
  "aria-label": "Select all rows"
3839
3867
  })
@@ -3841,7 +3869,7 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3841
3869
  r.map((e, r) => {
3842
3870
  let i = !!(e.sortable && s), a = o && o.key === e.key;
3843
3871
  return /* @__PURE__ */ n("th", {
3844
- className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + _t(e.align),
3872
+ className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + vt(e.align),
3845
3873
  style: e.width ? { width: e.width } : void 0,
3846
3874
  tabIndex: i ? 0 : void 0,
3847
3875
  "aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
@@ -3851,7 +3879,7 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3851
3879
  } : void 0,
3852
3880
  children: [e.label, i && /* @__PURE__ */ t("span", {
3853
3881
  className: "sort-icon",
3854
- children: /* @__PURE__ */ t(O, {
3882
+ children: /* @__PURE__ */ t(k, {
3855
3883
  name: "chevrons-up-down",
3856
3884
  size: 14
3857
3885
  })
@@ -3859,16 +3887,16 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3859
3887
  }, e.key);
3860
3888
  }),
3861
3889
  p && (m ? /* @__PURE__ */ t("th", {
3862
- className: "lx-cell-end",
3890
+ className: "wui-cell-end",
3863
3891
  children: m
3864
3892
  }) : /* @__PURE__ */ t("th", {
3865
- className: "lx-cell-end",
3893
+ className: "wui-cell-end",
3866
3894
  children: /* @__PURE__ */ t("span", {
3867
3895
  className: "visually-hidden",
3868
3896
  children: "Actions"
3869
3897
  })
3870
3898
  }))
3871
- ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(pt, {
3899
+ ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(mt, {
3872
3900
  rows: l,
3873
3901
  cols: C
3874
3902
  }) : i?.length ? i.map((e) => {
@@ -3877,18 +3905,18 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3877
3905
  className: v && y?.has(i) ? "is-selected" : void 0,
3878
3906
  children: [
3879
3907
  v && /* @__PURE__ */ t("td", {
3880
- className: "lx-select-cell",
3908
+ className: "wui-select-cell",
3881
3909
  children: /* @__PURE__ */ t("input", {
3882
3910
  type: "checkbox",
3883
- className: "lx-check",
3911
+ className: "wui-check",
3884
3912
  checked: y?.has(i) || !1,
3885
3913
  onChange: () => b?.(i),
3886
3914
  "aria-label": "Select row"
3887
3915
  })
3888
3916
  }),
3889
3917
  r.map((n, r) => /* @__PURE__ */ t("td", {
3890
- className: (r === 0 ? "lx-name-cell " : "") + _t(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
3891
- children: n.render ? n.render(e) : vt(e[n.key])
3918
+ className: (r === 0 ? "wui-name-cell " : "") + vt(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
3919
+ children: n.render ? n.render(e) : yt(e[n.key])
3892
3920
  }, n.key)),
3893
3921
  p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
3894
3922
  className: "u-row-actions",
@@ -3898,11 +3926,11 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3898
3926
  }, i);
3899
3927
  }) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
3900
3928
  colSpan: C,
3901
- className: "lx-table-empty",
3929
+ className: "wui-table-empty",
3902
3930
  children: A
3903
3931
  }) }) })]
3904
3932
  })
3905
- }), h && !c && h.total > 0 && /* @__PURE__ */ t(gt, {
3933
+ }), h && !c && h.total > 0 && /* @__PURE__ */ t(_t, {
3906
3934
  page: h.page,
3907
3935
  totalPages: h.totalPages,
3908
3936
  pageSize: h.pageSize,
@@ -3915,9 +3943,9 @@ function yt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3915
3943
  }
3916
3944
  //#endregion
3917
3945
  //#region src/components/AppDatePicker.jsx
3918
- function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
3919
- T("AppDatePicker", x);
3920
- let S = c(null), C = o(), w = v || d || C;
3946
+ function xt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
3947
+ E("AppDatePicker", x);
3948
+ let S = l(null), C = o(), w = v || d || C;
3921
3949
  a(() => {
3922
3950
  let t = S.current;
3923
3951
  t && t.value !== (e ?? "") && (t.value = e ?? "");
@@ -3927,7 +3955,7 @@ function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3927
3955
  let t = () => r?.(e.value);
3928
3956
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
3929
3957
  }, [r]);
3930
- let E = !i && !u && !l, D = /* @__PURE__ */ t("wui-datepicker", {
3958
+ let T = !i && !u && !c, D = /* @__PURE__ */ t("wui-datepicker", {
3931
3959
  ref: S,
3932
3960
  id: w,
3933
3961
  name: d,
@@ -3940,9 +3968,9 @@ function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3940
3968
  "aria-invalid": u ? "true" : void 0,
3941
3969
  disabled: h ? "" : void 0,
3942
3970
  required: s ? "" : void 0,
3943
- className: E && b || void 0
3971
+ className: T && b || void 0
3944
3972
  });
3945
- return E ? D : /* @__PURE__ */ n("div", {
3973
+ return T ? D : /* @__PURE__ */ n("div", {
3946
3974
  className: `field${b ? ` ${b}` : ""}`,
3947
3975
  children: [
3948
3976
  i && /* @__PURE__ */ n("label", {
@@ -3959,18 +3987,18 @@ function bt({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3959
3987
  className: "field-error",
3960
3988
  children: u
3961
3989
  }),
3962
- !u && l && /* @__PURE__ */ t("div", {
3990
+ !u && c && /* @__PURE__ */ t("div", {
3963
3991
  className: "field-hint",
3964
- children: l
3992
+ children: c
3965
3993
  })
3966
3994
  ]
3967
3995
  });
3968
3996
  }
3969
3997
  //#endregion
3970
3998
  //#region src/components/AppDateRangePicker.jsx
3971
- function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
3972
- T("AppDateRangePicker", C);
3973
- let w = c(null), E = o(), D = b || f || E;
3999
+ function St({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
4000
+ E("AppDateRangePicker", C);
4001
+ let w = l(null), T = o(), D = b || f || T;
3974
4002
  a(() => {
3975
4003
  let t = w.current;
3976
4004
  t && t.value.start !== (e ?? "") && t.setAttribute("start", e ?? "");
@@ -3996,7 +4024,7 @@ function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
3996
4024
  "aria-label": x,
3997
4025
  "aria-invalid": d ? "true" : void 0,
3998
4026
  disabled: _ ? "" : void 0,
3999
- required: l ? "" : void 0,
4027
+ required: c ? "" : void 0,
4000
4028
  className: O && S || void 0
4001
4029
  });
4002
4030
  return O ? k : /* @__PURE__ */ n("div", {
@@ -4005,7 +4033,7 @@ function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
4005
4033
  s && /* @__PURE__ */ n("label", {
4006
4034
  className: "label",
4007
4035
  htmlFor: D,
4008
- children: [s, l && /* @__PURE__ */ t("span", {
4036
+ children: [s, c && /* @__PURE__ */ t("span", {
4009
4037
  className: "required",
4010
4038
  "aria-hidden": "true",
4011
4039
  children: "*"
@@ -4025,7 +4053,7 @@ function xt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
4025
4053
  }
4026
4054
  //#endregion
4027
4055
  //#region src/components/AppDropdown.jsx
4028
- var St = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
4056
+ var Ct = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
4029
4057
  return /* @__PURE__ */ t("button", {
4030
4058
  ref: l,
4031
4059
  type: "button",
@@ -4033,23 +4061,23 @@ var St = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
4033
4061
  title: i,
4034
4062
  "aria-label": o,
4035
4063
  ...c,
4036
- children: /* @__PURE__ */ t(O, {
4064
+ children: /* @__PURE__ */ t(k, {
4037
4065
  name: e,
4038
4066
  size: n
4039
4067
  })
4040
4068
  });
4041
4069
  });
4042
- function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
4043
- return T("AppDropdown", d), /* @__PURE__ */ n(_, {
4070
+ function wt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
4071
+ return E("AppDropdown", d), /* @__PURE__ */ n(v, {
4044
4072
  align: s,
4045
- children: [/* @__PURE__ */ t(_.Toggle, {
4046
- as: St,
4073
+ children: [/* @__PURE__ */ t(v.Toggle, {
4074
+ as: Ct,
4047
4075
  icon: e,
4048
4076
  iconSize: r,
4049
4077
  btnClassName: i,
4050
4078
  title: a,
4051
4079
  "aria-label": o
4052
- }), /* @__PURE__ */ t(_.Menu, {
4080
+ }), /* @__PURE__ */ t(v.Menu, {
4053
4081
  className: l,
4054
4082
  renderOnMount: !0,
4055
4083
  children: c.map((e) => {
@@ -4063,14 +4091,14 @@ function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4063
4091
  as: "button",
4064
4092
  type: "button"
4065
4093
  };
4066
- return /* @__PURE__ */ n(_.Item, {
4094
+ return /* @__PURE__ */ n(v.Item, {
4067
4095
  ...r,
4068
4096
  onClick: e.onClick,
4069
4097
  className: e.danger ? "danger" : void 0,
4070
4098
  children: [e.image ? /* @__PURE__ */ t("img", {
4071
4099
  src: e.image,
4072
4100
  alt: ""
4073
- }) : e.icon && /* @__PURE__ */ t(O, {
4101
+ }) : e.icon && /* @__PURE__ */ t(k, {
4074
4102
  name: e.icon,
4075
4103
  size: 16
4076
4104
  }), e.label]
@@ -4081,8 +4109,8 @@ function Ct({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4081
4109
  }
4082
4110
  //#endregion
4083
4111
  //#region src/components/AppEmptyState.jsx
4084
- function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
4085
- return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
4112
+ function Tt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
4113
+ return E("AppEmptyState", u), /* @__PURE__ */ n("div", {
4086
4114
  className: [
4087
4115
  "empty-state",
4088
4116
  i === "sm" ? "empty-state-sm" : "",
@@ -4092,7 +4120,7 @@ function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
4092
4120
  children: [
4093
4121
  e ? /* @__PURE__ */ t("div", {
4094
4122
  className: "empty-state-icon",
4095
- children: /* @__PURE__ */ t(O, {
4123
+ children: /* @__PURE__ */ t(k, {
4096
4124
  name: e,
4097
4125
  size: r
4098
4126
  })
@@ -4114,9 +4142,9 @@ function wt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
4114
4142
  }
4115
4143
  //#endregion
4116
4144
  //#region src/components/AppFileAttachment.jsx
4117
- function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = Ie, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4118
- T("AppFileAttachment", h);
4119
- let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
4145
+ function Et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: l = Le, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4146
+ E("AppFileAttachment", h);
4147
+ let g = o(), _ = m || s || g, [v, y] = u(null), [b, x] = u("");
4120
4148
  a(() => {
4121
4149
  if (i instanceof File) {
4122
4150
  let e = URL.createObjectURL(i);
@@ -4127,8 +4155,8 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4127
4155
  function S(e) {
4128
4156
  let t = e.target.files?.[0];
4129
4157
  if (e.target.value = "", !t) return;
4130
- let n = He(t, {
4131
- accept: u,
4158
+ let n = Ue(t, {
4159
+ accept: l,
4132
4160
  maxSizeMb: d
4133
4161
  });
4134
4162
  if (n) {
@@ -4140,7 +4168,7 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4140
4168
  function C() {
4141
4169
  x(""), c(null);
4142
4170
  }
4143
- let w = i instanceof File ? i.name : i?.name, E = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
4171
+ let w = i instanceof File ? i.name : i?.name, T = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
4144
4172
  return /* @__PURE__ */ n("div", {
4145
4173
  className: "field",
4146
4174
  children: [
@@ -4164,7 +4192,7 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4164
4192
  className: "attach-remove",
4165
4193
  "aria-label": "Remove attachment",
4166
4194
  onClick: C,
4167
- children: /* @__PURE__ */ t(O, {
4195
+ children: /* @__PURE__ */ t(k, {
4168
4196
  name: "x",
4169
4197
  size: 18
4170
4198
  })
@@ -4174,9 +4202,9 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4174
4202
  children: [/* @__PURE__ */ t("div", {
4175
4203
  className: "attach-name",
4176
4204
  children: w
4177
- }), E && /* @__PURE__ */ t("div", {
4205
+ }), T && /* @__PURE__ */ t("div", {
4178
4206
  className: "attach-size",
4179
- children: E
4207
+ children: T
4180
4208
  })]
4181
4209
  })]
4182
4210
  }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
@@ -4185,7 +4213,7 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4185
4213
  children: [
4186
4214
  /* @__PURE__ */ t("span", {
4187
4215
  className: "attach-drop-icon",
4188
- children: /* @__PURE__ */ t(O, {
4216
+ children: /* @__PURE__ */ t(k, {
4189
4217
  name: "image",
4190
4218
  size: 18
4191
4219
  })
@@ -4214,7 +4242,7 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4214
4242
  type: "file",
4215
4243
  className: "visually-hidden-input",
4216
4244
  name: s,
4217
- accept: u,
4245
+ accept: l,
4218
4246
  onChange: S
4219
4247
  })] }),
4220
4248
  D && /* @__PURE__ */ t("div", {
@@ -4226,24 +4254,24 @@ function Tt({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4226
4254
  }
4227
4255
  //#endregion
4228
4256
  //#region src/components/toast.js
4229
- var Et = /* @__PURE__ */ new Set([
4257
+ var Dt = /* @__PURE__ */ new Set([
4230
4258
  "success",
4231
4259
  "info",
4232
4260
  "warning",
4233
4261
  "error"
4234
4262
  ]);
4235
- function Dt(e, t = "success") {
4236
- let n = Et.has(t) ? t : "success";
4237
- v[n](e, { toastId: `${n}:${e}` });
4263
+ function Ot(e, t = "success") {
4264
+ let n = Dt.has(t) ? t : "success";
4265
+ y[n](e, { toastId: `${n}:${e}` });
4238
4266
  }
4239
- function Ot(e) {
4240
- v.error(e, { toastId: `error:${e}` });
4267
+ function kt(e) {
4268
+ y.error(e, { toastId: `error:${e}` });
4241
4269
  }
4242
4270
  //#endregion
4243
4271
  //#region src/components/AppFilePicker.jsx
4244
- function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
4245
- T("AppFilePicker", m);
4246
- let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
4272
+ function At({ label: e, value: r, name: i, onPick: s, accept: c = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
4273
+ E("AppFilePicker", m);
4274
+ let [h, g] = u(null), [_, v] = u(!1), y = l(null), b = o(), x = i || b;
4247
4275
  a(() => {
4248
4276
  if (r instanceof File) {
4249
4277
  let e = URL.createObjectURL(r);
@@ -4252,24 +4280,24 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4252
4280
  g(null);
4253
4281
  }, [r]);
4254
4282
  let S = r?.url || h, C = (e) => {
4255
- let t = He(e, {
4256
- accept: u,
4283
+ let t = Ue(e, {
4284
+ accept: c,
4257
4285
  maxSizeMb: d
4258
4286
  });
4259
- return t ? (Dt(t, "error"), !1) : (s(e), !0);
4287
+ return t ? (Ot(t, "error"), !1) : (s(e), !0);
4260
4288
  }, w = (e) => {
4261
4289
  let t = e.target.files?.[0] || null;
4262
4290
  t && (C(t) || (e.target.value = ""));
4263
- }, E = (e) => {
4291
+ }, T = (e) => {
4264
4292
  e.preventDefault(), v(!1);
4265
4293
  let t = e.dataTransfer.files?.[0];
4266
4294
  t && C(t);
4267
- }, D = () => y.current?.click(), k = /* @__PURE__ */ t("input", {
4295
+ }, D = () => y.current?.click(), O = /* @__PURE__ */ t("input", {
4268
4296
  id: x,
4269
4297
  name: i,
4270
4298
  ref: y,
4271
4299
  type: "file",
4272
- accept: u,
4300
+ accept: c,
4273
4301
  hidden: !0,
4274
4302
  onClick: (e) => {
4275
4303
  e.currentTarget.value = "";
@@ -4300,7 +4328,7 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4300
4328
  className: "file-preview-overlay",
4301
4329
  children: /* @__PURE__ */ n("span", {
4302
4330
  className: "file-preview-cta",
4303
- children: [/* @__PURE__ */ t(O, {
4331
+ children: [/* @__PURE__ */ t(k, {
4304
4332
  name: "image",
4305
4333
  size: 16
4306
4334
  }), " Change image"]
@@ -4313,12 +4341,12 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4313
4341
  "aria-label": `Remove ${e}`,
4314
4342
  title: "Remove image",
4315
4343
  onClick: () => s(null),
4316
- children: /* @__PURE__ */ t(O, {
4344
+ children: /* @__PURE__ */ t(k, {
4317
4345
  name: "x",
4318
4346
  size: 16
4319
4347
  })
4320
4348
  }),
4321
- k
4349
+ O
4322
4350
  ]
4323
4351
  }) : /* @__PURE__ */ n("div", {
4324
4352
  className: `file-input file-input-tall${_ ? " dragging" : ""}${p ? " error" : ""}`,
@@ -4328,14 +4356,14 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4328
4356
  onDragLeave: (e) => {
4329
4357
  e.preventDefault(), v(!1);
4330
4358
  },
4331
- onDrop: E,
4359
+ onDrop: T,
4332
4360
  children: [/* @__PURE__ */ n("label", {
4333
4361
  htmlFor: x,
4334
4362
  className: "file-input-zone-label",
4335
4363
  children: [
4336
4364
  /* @__PURE__ */ t("span", {
4337
4365
  className: "file-input-icon",
4338
- children: /* @__PURE__ */ t(O, {
4366
+ children: /* @__PURE__ */ t(k, {
4339
4367
  name: "upload",
4340
4368
  size: 24
4341
4369
  })
@@ -4356,7 +4384,7 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4356
4384
  ]
4357
4385
  })
4358
4386
  ]
4359
- }), k]
4387
+ }), O]
4360
4388
  }),
4361
4389
  p && /* @__PURE__ */ t("div", {
4362
4390
  className: "field-error",
@@ -4367,13 +4395,13 @@ function kt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4367
4395
  }
4368
4396
  //#endregion
4369
4397
  //#region src/components/AppInfoList.jsx
4370
- function At({ items: r = [], className: i = "", ...a }) {
4371
- return T("AppInfoList", a), /* @__PURE__ */ t("div", {
4398
+ function jt({ items: r = [], className: i = "", ...a }) {
4399
+ return E("AppInfoList", a), /* @__PURE__ */ t("div", {
4372
4400
  className: `info-list${i ? ` ${i}` : ""}`,
4373
4401
  children: r.map((r, i) => {
4374
4402
  let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4375
4403
  className: "info-icon",
4376
- children: /* @__PURE__ */ t(O, {
4404
+ children: /* @__PURE__ */ t(k, {
4377
4405
  name: r.icon,
4378
4406
  size: 16
4379
4407
  })
@@ -4400,15 +4428,15 @@ function At({ items: r = [], className: i = "", ...a }) {
4400
4428
  }
4401
4429
  //#endregion
4402
4430
  //#region src/components/AppKpiTile.jsx
4403
- function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4404
- T("AppKpiTile", l);
4431
+ function Mt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4432
+ E("AppKpiTile", l);
4405
4433
  let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4406
4434
  return /* @__PURE__ */ n("div", {
4407
4435
  className: u,
4408
4436
  children: [
4409
4437
  i && /* @__PURE__ */ t("span", {
4410
4438
  className: "kpi-icon",
4411
- children: /* @__PURE__ */ t(O, {
4439
+ children: /* @__PURE__ */ t(k, {
4412
4440
  name: i,
4413
4441
  size: 20
4414
4442
  })
@@ -4423,7 +4451,7 @@ function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4423
4451
  }),
4424
4452
  a && /* @__PURE__ */ n("div", {
4425
4453
  className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
4426
- children: [d && /* @__PURE__ */ t(O, {
4454
+ children: [d && /* @__PURE__ */ t(k, {
4427
4455
  name: d,
4428
4456
  size: 13
4429
4457
  }), a]
@@ -4433,9 +4461,9 @@ function jt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4433
4461
  }
4434
4462
  //#endregion
4435
4463
  //#region src/components/AppLogoPicker.jsx
4436
- function Mt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
4437
- T("AppLogoPicker", m);
4438
- let h = c(null);
4464
+ function Nt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: c = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
4465
+ E("AppLogoPicker", m);
4466
+ let h = l(null);
4439
4467
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
4440
4468
  type: "button",
4441
4469
  className: "set-uploader",
@@ -4457,14 +4485,14 @@ function Mt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
4457
4485
  }), s ? /* @__PURE__ */ t("span", {
4458
4486
  className: "set-uploader-overlay is-loading",
4459
4487
  "aria-hidden": "true",
4460
- children: /* @__PURE__ */ t(O, {
4488
+ children: /* @__PURE__ */ t(k, {
4461
4489
  name: "refresh-cw",
4462
4490
  size: 22,
4463
- className: "lx-spin"
4491
+ className: "wui-spin"
4464
4492
  })
4465
4493
  }) : /* @__PURE__ */ n("span", {
4466
4494
  className: "set-uploader-overlay",
4467
- children: [/* @__PURE__ */ t(O, {
4495
+ children: [/* @__PURE__ */ t(k, {
4468
4496
  name: d,
4469
4497
  size: 22
4470
4498
  }), /* @__PURE__ */ t("span", { children: f })]
@@ -4475,16 +4503,16 @@ function Mt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
4475
4503
  type: "file",
4476
4504
  name: a,
4477
4505
  hidden: !0,
4478
- accept: l,
4506
+ accept: c,
4479
4507
  onChange: (e) => {
4480
4508
  let t = e.target.files?.[0];
4481
4509
  if (e.target.value = "", !t) return;
4482
- let n = He(t, {
4483
- accept: l,
4510
+ let n = Ue(t, {
4511
+ accept: c,
4484
4512
  maxSizeMb: u
4485
4513
  });
4486
4514
  if (n) {
4487
- Dt(n, "error");
4515
+ Ot(n, "error");
4488
4516
  return;
4489
4517
  }
4490
4518
  o(t);
@@ -4494,9 +4522,9 @@ function Mt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
4494
4522
  }
4495
4523
  //#endregion
4496
4524
  //#region src/components/AppMultiSelect.jsx
4497
- function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4498
- T("AppMultiSelect", b);
4499
- let x = c(null);
4525
+ function Pt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: c = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4526
+ E("AppMultiSelect", b);
4527
+ let x = l(null);
4500
4528
  return a(() => {
4501
4529
  let e = x.current;
4502
4530
  e && (e.options = i || []);
@@ -4528,7 +4556,7 @@ function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4528
4556
  icon: d || void 0,
4529
4557
  size: f || void 0,
4530
4558
  "collapse-chips": p ? "" : void 0,
4531
- searchable: l ? "" : void 0,
4559
+ searchable: c ? "" : void 0,
4532
4560
  disabled: u ? "" : void 0,
4533
4561
  required: v ? "" : void 0
4534
4562
  }),
@@ -4544,9 +4572,9 @@ function Nt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4544
4572
  }
4545
4573
  //#endregion
4546
4574
  //#region src/components/AppOtpInput.jsx
4547
- var Pt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: l = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4548
- T("AppOtpInput", v);
4549
- let b = c(null), x = o(), S = g || h || x, C = (e) => {
4575
+ var Ft = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: c = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4576
+ E("AppOtpInput", v);
4577
+ let b = l(null), x = o(), S = g || h || x, C = (e) => {
4550
4578
  b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
4551
4579
  };
4552
4580
  a(() => {
@@ -4566,7 +4594,7 @@ var Pt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4566
4594
  id: S,
4567
4595
  name: h,
4568
4596
  length: String(s),
4569
- mode: l,
4597
+ mode: c,
4570
4598
  "aria-invalid": p ? "true" : void 0,
4571
4599
  disabled: m ? "" : void 0,
4572
4600
  required: d ? "" : void 0
@@ -4597,8 +4625,8 @@ var Pt = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4597
4625
  });
4598
4626
  //#endregion
4599
4627
  //#region src/components/AppPageHeader.jsx
4600
- function Ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4601
- return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
4628
+ function It({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4629
+ return E("AppPageHeader", o), /* @__PURE__ */ n("div", {
4602
4630
  className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
4603
4631
  children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
4604
4632
  className: "page-title",
@@ -4614,9 +4642,9 @@ function Ft({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4614
4642
  }
4615
4643
  //#endregion
4616
4644
  //#region src/components/AppPhoneNumberInput.jsx
4617
- function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: l = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
4618
- T("AppPhoneNumberInput", m);
4619
- let h = c(null);
4645
+ function Lt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: c = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
4646
+ E("AppPhoneNumberInput", m);
4647
+ let h = l(null);
4620
4648
  return a(() => {
4621
4649
  let t = h.current;
4622
4650
  t && t.value !== (e ?? "") && (t.value = e ?? "");
@@ -4628,10 +4656,10 @@ function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4628
4656
  }, [r]), /* @__PURE__ */ n("div", {
4629
4657
  className: `field app-phone-number-input${p ? ` ${p}` : ""}`,
4630
4658
  children: [
4631
- l && /* @__PURE__ */ n("label", {
4659
+ c && /* @__PURE__ */ n("label", {
4632
4660
  className: "label",
4633
4661
  htmlFor: s,
4634
- children: [l, d && /* @__PURE__ */ t(Z, {})]
4662
+ children: [c, d && /* @__PURE__ */ t(Z, {})]
4635
4663
  }),
4636
4664
  /* @__PURE__ */ t("wui-phone", {
4637
4665
  ref: h,
@@ -4649,8 +4677,8 @@ function It({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4649
4677
  }
4650
4678
  //#endregion
4651
4679
  //#region src/components/AppPricingCard.jsx
4652
- function Lt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
4653
- return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
4680
+ function Rt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
4681
+ return E("AppPricingCard", f), /* @__PURE__ */ n("div", {
4654
4682
  className: [
4655
4683
  "plan-card",
4656
4684
  c ? "featured" : "",
@@ -4685,7 +4713,7 @@ function Lt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4685
4713
  className: r ? void 0 : "excluded",
4686
4714
  children: [/* @__PURE__ */ t("span", {
4687
4715
  className: "plan-feature-icon",
4688
- children: /* @__PURE__ */ t(O, {
4716
+ children: /* @__PURE__ */ t(k, {
4689
4717
  name: r ? "check" : "x",
4690
4718
  size: 16
4691
4719
  })
@@ -4702,8 +4730,8 @@ function Lt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4702
4730
  }
4703
4731
  //#endregion
4704
4732
  //#region src/components/AppRadio.jsx
4705
- var Rt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4706
- T("AppRadio", s);
4733
+ var zt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4734
+ E("AppRadio", s);
4707
4735
  let l = o(), u = r || l;
4708
4736
  return /* @__PURE__ */ n("div", {
4709
4737
  className: `form-check${a ? ` ${a}` : ""}`,
@@ -4723,8 +4751,8 @@ var Rt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4723
4751
  });
4724
4752
  //#endregion
4725
4753
  //#region src/components/AppRepeater.jsx
4726
- function zt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
4727
- T("AppRepeater", p);
4754
+ function Bt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
4755
+ E("AppRepeater", p);
4728
4756
  let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
4729
4757
  return /* @__PURE__ */ n("div", {
4730
4758
  className: `repeater${f ? ` ${f}` : ""}`,
@@ -4744,7 +4772,7 @@ function zt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4744
4772
  className: "repeater-body",
4745
4773
  children: r(e, i)
4746
4774
  }),
4747
- h && /* @__PURE__ */ t(k, {
4775
+ h && /* @__PURE__ */ t(A, {
4748
4776
  icon: "trash-2",
4749
4777
  label: `${s} ${i + 1}`,
4750
4778
  danger: !0,
@@ -4767,11 +4795,11 @@ function zt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4767
4795
  }
4768
4796
  //#endregion
4769
4797
  //#region src/components/AppResourceCard.jsx
4770
- function Bt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
4771
- T("AppResourceCard", u);
4798
+ function Vt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
4799
+ E("AppResourceCard", u);
4772
4800
  let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4773
4801
  className: "res-card-icon",
4774
- children: /* @__PURE__ */ t(O, {
4802
+ children: /* @__PURE__ */ t(k, {
4775
4803
  name: r,
4776
4804
  size: 18
4777
4805
  })
@@ -4799,8 +4827,8 @@ function Bt({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
4799
4827
  }
4800
4828
  //#endregion
4801
4829
  //#region src/components/AppSearch.jsx
4802
- function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
4803
- return T("AppSearch", d), /* @__PURE__ */ n("div", {
4830
+ function Ht({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
4831
+ return E("AppSearch", d), /* @__PURE__ */ n("div", {
4804
4832
  className: [
4805
4833
  "search-wrap",
4806
4834
  e ? "has-value" : "",
@@ -4813,12 +4841,12 @@ function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4813
4841
  className: "search-spinner",
4814
4842
  "aria-hidden": "true"
4815
4843
  }),
4816
- /* @__PURE__ */ t(O, {
4844
+ /* @__PURE__ */ t(k, {
4817
4845
  name: "search",
4818
4846
  size: o,
4819
4847
  className: "search-icon"
4820
4848
  }),
4821
- /* @__PURE__ */ t(m.Control, {
4849
+ /* @__PURE__ */ t(h.Control, {
4822
4850
  type: "search",
4823
4851
  className: "input search-input",
4824
4852
  placeholder: i,
@@ -4833,7 +4861,7 @@ function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4833
4861
  className: "search-clear",
4834
4862
  "aria-label": "Clear search",
4835
4863
  onClick: () => r(""),
4836
- children: /* @__PURE__ */ t(O, {
4864
+ children: /* @__PURE__ */ t(k, {
4837
4865
  name: "x",
4838
4866
  size: 16
4839
4867
  })
@@ -4843,9 +4871,9 @@ function Vt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4843
4871
  }
4844
4872
  //#endregion
4845
4873
  //#region src/components/AppSegmented.jsx
4846
- function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
4847
- T("AppSegmented", h);
4848
- let g = o(), _ = u || g, v = c(null), y = c(null), b = [
4874
+ function Ut({ options: e = [], value: r, onChange: i, label: c, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
4875
+ E("AppSegmented", h);
4876
+ let g = o(), _ = u || g, v = l(null), y = l(null), b = [
4849
4877
  "segmented",
4850
4878
  d === "sm" ? "segmented-sm" : d === "lg" ? "segmented-lg" : "",
4851
4879
  f ? "segmented-full" : "",
@@ -4879,7 +4907,7 @@ function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4879
4907
  ref: v,
4880
4908
  className: b,
4881
4909
  role: "radiogroup",
4882
- "aria-label": l,
4910
+ "aria-label": c,
4883
4911
  "aria-disabled": p || void 0,
4884
4912
  children: [/* @__PURE__ */ t("span", {
4885
4913
  className: "segmented-thumb",
@@ -4897,7 +4925,7 @@ function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4897
4925
  disabled: p || e.disabled,
4898
4926
  onChange: () => i?.(e.value)
4899
4927
  }),
4900
- e.icon && /* @__PURE__ */ t(O, {
4928
+ e.icon && /* @__PURE__ */ t(k, {
4901
4929
  name: e.icon,
4902
4930
  size: 13
4903
4931
  }),
@@ -4908,14 +4936,14 @@ function Ht({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4908
4936
  }
4909
4937
  //#endregion
4910
4938
  //#region src/components/AppSelect.jsx
4911
- var Ut = (e) => e == null ? "" : e.label ?? e.text ?? "";
4912
- function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: l = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", ...E }) {
4913
- T("AppSelect", E);
4914
- let D = c(null);
4939
+ var Wt = (e) => e == null ? "" : e.label ?? e.text ?? "";
4940
+ function Gt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: c = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", ...T }) {
4941
+ E("AppSelect", T);
4942
+ let D = l(null);
4915
4943
  a(() => {
4916
4944
  D.current && (D.current.options = i.map((e) => ({
4917
4945
  value: e.value,
4918
- label: Ut(e),
4946
+ label: Wt(e),
4919
4947
  icon: e.icon
4920
4948
  })));
4921
4949
  }, [i]), a(() => {
@@ -4932,9 +4960,9 @@ function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4932
4960
  ref: D,
4933
4961
  id: x || S,
4934
4962
  name: S,
4935
- placeholder: p ? " " : o,
4963
+ placeholder: p && h ? " " : o,
4936
4964
  "search-placeholder": s,
4937
- searchable: l ? "" : void 0,
4965
+ searchable: c ? "" : void 0,
4938
4966
  clearable: u ? "" : void 0,
4939
4967
  size: d || void 0,
4940
4968
  icon: f || void 0,
@@ -4956,7 +4984,7 @@ function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4956
4984
  children: [
4957
4985
  h,
4958
4986
  g && /* @__PURE__ */ t(Z, {}),
4959
- y && /* @__PURE__ */ t(it, {
4987
+ y && /* @__PURE__ */ t(at, {
4960
4988
  label: b,
4961
4989
  children: y
4962
4990
  })
@@ -4982,9 +5010,9 @@ function Wt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4982
5010
  }
4983
5011
  //#endregion
4984
5012
  //#region src/components/AppShell.jsx
4985
- function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
4986
- T("AppShell", _);
4987
- let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
5013
+ function Kt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: l, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
5014
+ E("AppShell", _);
5015
+ let [v, y] = u(!1), [b, x] = u(!1), [S, C] = u(!1), w = d ?? v;
4988
5016
  return a(() => {
4989
5017
  let e = () => C(window.scrollY > 4);
4990
5018
  return e(), window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
@@ -5018,7 +5046,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5018
5046
  children: [e.label && /* @__PURE__ */ t("div", {
5019
5047
  className: "app-nav-group-label",
5020
5048
  children: e.label
5021
- }), e.items.map((e) => /* @__PURE__ */ t(Kt, {
5049
+ }), e.items.map((e) => /* @__PURE__ */ t(qt, {
5022
5050
  item: e,
5023
5051
  linkComponent: h,
5024
5052
  onNavigate: () => x(!1)
@@ -5040,7 +5068,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5040
5068
  },
5041
5069
  "aria-label": w ? "Expand navigation" : "Collapse navigation",
5042
5070
  "aria-expanded": !w,
5043
- children: /* @__PURE__ */ t(O, {
5071
+ children: /* @__PURE__ */ t(k, {
5044
5072
  name: "chevron-left",
5045
5073
  size: 14
5046
5074
  })
@@ -5058,7 +5086,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5058
5086
  onClick: () => x(!0),
5059
5087
  "aria-label": "Open navigation",
5060
5088
  "aria-expanded": b,
5061
- children: /* @__PURE__ */ t(O, {
5089
+ children: /* @__PURE__ */ t(k, {
5062
5090
  name: "menu",
5063
5091
  size: 18
5064
5092
  })
@@ -5070,7 +5098,7 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5070
5098
  }),
5071
5099
  /* @__PURE__ */ t("main", {
5072
5100
  className: "app-content",
5073
- children: u
5101
+ children: l
5074
5102
  }),
5075
5103
  c && /* @__PURE__ */ t("footer", {
5076
5104
  className: "app-footer",
@@ -5088,11 +5116,11 @@ function Gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5088
5116
  ]
5089
5117
  });
5090
5118
  }
5091
- function Kt({ item: r, linkComponent: i, onNavigate: a }) {
5119
+ function qt({ item: r, linkComponent: i, onNavigate: a }) {
5092
5120
  let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
5093
5121
  r.icon && /* @__PURE__ */ t("span", {
5094
5122
  className: "app-nav-icon",
5095
- children: /* @__PURE__ */ t(O, {
5123
+ children: /* @__PURE__ */ t(k, {
5096
5124
  name: r.icon,
5097
5125
  size: 22
5098
5126
  })
@@ -5122,7 +5150,7 @@ function Kt({ item: r, linkComponent: i, onNavigate: a }) {
5122
5150
  }
5123
5151
  //#endregion
5124
5152
  //#region src/components/AppSidebarMenu.jsx
5125
- var qt = {
5153
+ var Jt = {
5126
5154
  left: "start",
5127
5155
  right: "end",
5128
5156
  start: "start",
@@ -5130,11 +5158,11 @@ var qt = {
5130
5158
  top: "top",
5131
5159
  bottom: "bottom"
5132
5160
  };
5133
- function Jt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, backdrop: d = !0, scroll: f = !1, keyboard: p = !0, closeButton: m = !0, responsive: h, className: g = "", bodyClassName: _ = "", ariaLabel: v, ...b }) {
5134
- return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
5161
+ function Yt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, backdrop: d = !0, scroll: f = !1, keyboard: p = !0, closeButton: m = !0, responsive: h, className: g = "", bodyClassName: _ = "", ariaLabel: v, ...y }) {
5162
+ return E("AppSidebarMenu", y), /* @__PURE__ */ n(b, {
5135
5163
  show: e,
5136
5164
  onHide: r,
5137
- placement: qt[i] || "end",
5165
+ placement: Jt[i] || "end",
5138
5166
  backdrop: d,
5139
5167
  scroll: f,
5140
5168
  keyboard: p,
@@ -5149,7 +5177,7 @@ function Jt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5149
5177
  className: "drawer-title",
5150
5178
  children: [o && /* @__PURE__ */ t("span", {
5151
5179
  className: "drawer-title-ic",
5152
- children: /* @__PURE__ */ t(O, {
5180
+ children: /* @__PURE__ */ t(k, {
5153
5181
  name: o,
5154
5182
  size: 18
5155
5183
  })
@@ -5159,13 +5187,13 @@ function Jt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5159
5187
  className: "btn-icon",
5160
5188
  onClick: r,
5161
5189
  "aria-label": "Close",
5162
- children: /* @__PURE__ */ t(O, {
5190
+ children: /* @__PURE__ */ t(k, {
5163
5191
  name: "x",
5164
5192
  size: 16
5165
5193
  })
5166
5194
  })]
5167
5195
  }) : s,
5168
- /* @__PURE__ */ t(y.Body, {
5196
+ /* @__PURE__ */ t(b.Body, {
5169
5197
  className: _,
5170
5198
  children: c
5171
5199
  }),
@@ -5178,8 +5206,8 @@ function Jt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5178
5206
  }
5179
5207
  //#endregion
5180
5208
  //#region src/components/AppSpinner.jsx
5181
- function Yt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5182
- return T("AppSpinner", i), /* @__PURE__ */ t("span", {
5209
+ function Xt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5210
+ return E("AppSpinner", i), /* @__PURE__ */ t("span", {
5183
5211
  className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
5184
5212
  role: "status",
5185
5213
  "aria-label": n
@@ -5187,8 +5215,8 @@ function Yt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5187
5215
  }
5188
5216
  //#endregion
5189
5217
  //#region src/components/AppSplash.jsx
5190
- function Xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5191
- return T("AppSplash", s), /* @__PURE__ */ t("div", {
5218
+ function Zt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5219
+ return E("AppSplash", s), /* @__PURE__ */ t("div", {
5192
5220
  className: `splash${o ? ` ${o}` : ""}`,
5193
5221
  role: "status",
5194
5222
  "aria-live": "polite",
@@ -5214,22 +5242,23 @@ function Xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5214
5242
  }
5215
5243
  //#endregion
5216
5244
  //#region src/components/AppStatusBadge.jsx
5217
- function Zt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5218
- return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5245
+ function Qt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5246
+ return E("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5219
5247
  className: `status-label ${n}${r ? ` ${r}` : ""}`,
5248
+ ...i,
5220
5249
  children: e
5221
5250
  });
5222
5251
  }
5223
5252
  //#endregion
5224
5253
  //#region src/components/AppStepper.jsx
5225
- function Qt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5226
- return T("AppStepper", c), /* @__PURE__ */ t("nav", {
5254
+ function $t({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5255
+ return E("AppStepper", c), /* @__PURE__ */ t("nav", {
5227
5256
  className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
5228
5257
  "aria-label": a,
5229
5258
  children: r.map((a, s) => {
5230
5259
  let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
5231
5260
  className: "step-circle",
5232
- children: c === "done" ? /* @__PURE__ */ t(O, {
5261
+ children: c === "done" ? /* @__PURE__ */ t(k, {
5233
5262
  name: "check",
5234
5263
  size: 14
5235
5264
  }) : s + 1
@@ -5269,8 +5298,8 @@ function Qt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
5269
5298
  }
5270
5299
  //#endregion
5271
5300
  //#region src/components/AppSwitch.jsx
5272
- var $t = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5273
- T("AppSwitch", s);
5301
+ var en = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5302
+ E("AppSwitch", s);
5274
5303
  let l = o(), u = r || i || l;
5275
5304
  return /* @__PURE__ */ n("div", {
5276
5305
  className: `form-check form-switch${a ? ` ${a}` : ""}`,
@@ -5290,13 +5319,13 @@ var $t = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5290
5319
  });
5291
5320
  //#endregion
5292
5321
  //#region src/components/AppTableEmptyState.jsx
5293
- function en({ icon: e, title: r, text: i, action: a, ...o }) {
5294
- return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5322
+ function tn({ icon: e, title: r, text: i, action: a, ...o }) {
5323
+ return E("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5295
5324
  className: "tbl-empty",
5296
5325
  children: [
5297
5326
  /* @__PURE__ */ t("span", {
5298
5327
  className: "tbl-empty-icon",
5299
- children: /* @__PURE__ */ t(O, {
5328
+ children: /* @__PURE__ */ t(k, {
5300
5329
  name: e,
5301
5330
  size: 24
5302
5331
  })
@@ -5318,19 +5347,25 @@ function en({ icon: e, title: r, text: i, action: a, ...o }) {
5318
5347
  }
5319
5348
  //#endregion
5320
5349
  //#region src/components/AppTabs.jsx
5321
- function tn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
5322
- T("AppTabs", l);
5323
- let u = c(null);
5350
+ function nn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...c }) {
5351
+ E("AppTabs", c);
5352
+ let u = l(null);
5324
5353
  function d(t) {
5325
5354
  let n = e.findIndex((e) => e.key === r);
5326
5355
  if (n < 0) return;
5327
- let a = null;
5328
- if (t.key === "ArrowRight" ? a = e[(n + 1) % e.length] : t.key === "ArrowLeft" ? a = e[(n - 1 + e.length) % e.length] : t.key === "Home" ? a = e[0] : t.key === "End" && (a = e[e.length - 1]), !a) return;
5329
- t.preventDefault(), i(a.key);
5330
- let o = CSS.escape(String(a.key));
5331
- u.current?.querySelector(`[data-rr-ui-event-key="${o}"]`)?.focus();
5332
- }
5333
- return /* @__PURE__ */ t(b, {
5356
+ let a = e.length, o = (t, n) => {
5357
+ for (let r = 1; r <= a; r++) {
5358
+ let i = e[((t + n * r) % a + a) % a];
5359
+ if (!i.disabled) return i;
5360
+ }
5361
+ return null;
5362
+ }, s = null;
5363
+ if (t.key === "ArrowRight" ? s = o(n, 1) : t.key === "ArrowLeft" ? s = o(n, -1) : t.key === "Home" ? s = e.find((e) => !e.disabled) ?? null : t.key === "End" && (s = [...e].reverse().find((e) => !e.disabled) ?? null), !s) return;
5364
+ t.preventDefault(), i(s.key);
5365
+ let c = CSS.escape(String(s.key));
5366
+ u.current?.querySelector(`[data-rr-ui-event-key="${c}"]`)?.focus();
5367
+ }
5368
+ return /* @__PURE__ */ t(x, {
5334
5369
  as: "div",
5335
5370
  role: "tablist",
5336
5371
  ref: u,
@@ -5342,11 +5377,12 @@ function tn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5342
5377
  bsPrefix: "app-tabs",
5343
5378
  className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
5344
5379
  "aria-label": o,
5345
- children: e.map((e) => /* @__PURE__ */ n(b.Link, {
5380
+ children: e.map((e) => /* @__PURE__ */ n(x.Link, {
5346
5381
  as: "button",
5347
5382
  type: "button",
5348
5383
  eventKey: e.key,
5349
5384
  role: "tab",
5385
+ disabled: e.disabled,
5350
5386
  bsPrefix: "app-tab",
5351
5387
  className: e.danger ? "danger" : void 0,
5352
5388
  children: [
@@ -5362,45 +5398,45 @@ function tn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5362
5398
  }
5363
5399
  //#endregion
5364
5400
  //#region src/components/AppTextarea.jsx
5365
- var nn = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
5366
- T("AppTextarea", v);
5401
+ var rn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: m = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
5402
+ E("AppTextarea", v);
5367
5403
  let b = d || f, x = [
5368
5404
  "textarea",
5369
- h ? "autosize" : "",
5405
+ m ? "autosize" : "",
5370
5406
  a ? "error" : "",
5371
5407
  g
5372
- ].filter(Boolean).join(" "), S = c(null), C = (e) => {
5408
+ ].filter(Boolean).join(" "), S = l(null), C = (e) => {
5373
5409
  S.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5374
5410
  }, w = i(() => {
5375
5411
  let e = S.current;
5376
5412
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
5377
5413
  }, []);
5378
5414
  s(() => {
5379
- h && w();
5415
+ m && w();
5380
5416
  }, [
5381
- h,
5417
+ m,
5382
5418
  w,
5383
5419
  v.value
5384
5420
  ]);
5385
- let E = (e) => {
5386
- h && w(), v.onInput?.(e);
5421
+ let T = (e) => {
5422
+ m && w(), v.onInput?.(e);
5387
5423
  };
5388
- return /* @__PURE__ */ n(m.Group, {
5424
+ return /* @__PURE__ */ n(h.Group, {
5389
5425
  className: `field${_ ? ` ${_}` : ""}`,
5390
5426
  children: [
5391
- e && /* @__PURE__ */ n(m.Label, {
5427
+ e && /* @__PURE__ */ n(h.Label, {
5392
5428
  className: "label",
5393
5429
  htmlFor: b,
5394
5430
  children: [
5395
5431
  e,
5396
5432
  r && /* @__PURE__ */ t(Z, {}),
5397
- l && /* @__PURE__ */ t(it, {
5433
+ c && /* @__PURE__ */ t(at, {
5398
5434
  label: u,
5399
- children: l
5435
+ children: c
5400
5436
  })
5401
5437
  ]
5402
5438
  }),
5403
- /* @__PURE__ */ t(m.Control, {
5439
+ /* @__PURE__ */ t(h.Control, {
5404
5440
  as: "textarea",
5405
5441
  id: b,
5406
5442
  name: f,
@@ -5410,7 +5446,7 @@ var nn = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
5410
5446
  required: r,
5411
5447
  ...v,
5412
5448
  ref: C,
5413
- onInput: E
5449
+ onInput: T
5414
5450
  }),
5415
5451
  a ? /* @__PURE__ */ t("div", {
5416
5452
  className: "field-error",
@@ -5424,14 +5460,14 @@ var nn = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
5424
5460
  });
5425
5461
  //#endregion
5426
5462
  //#region src/components/AppTimeline.jsx
5427
- function rn({ items: e = [], className: r = "", ...i }) {
5428
- return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
5463
+ function an({ items: e = [], className: r = "", ...i }) {
5464
+ return E("AppTimeline", i), /* @__PURE__ */ t("ol", {
5429
5465
  className: `timeline${r ? ` ${r}` : ""}`,
5430
5466
  children: e.map((e, r) => /* @__PURE__ */ n("li", {
5431
5467
  className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
5432
5468
  children: [/* @__PURE__ */ t("span", {
5433
5469
  className: "timeline-dot",
5434
- children: /* @__PURE__ */ t(O, {
5470
+ children: /* @__PURE__ */ t(k, {
5435
5471
  name: e.icon || "circle",
5436
5472
  size: 12
5437
5473
  })
@@ -5462,4 +5498,31 @@ function rn({ items: e = [], className: r = "", ...i }) {
5462
5498
  });
5463
5499
  }
5464
5500
  //#endregion
5465
- export { k as ActionIcon, A as AppAccordion, j as AppAlert, We as AppAutocomplete, Ke as AppAvatar, qe as AppBadge, Q as AppButton, Xe as AppCallout, Ze as AppCard, Qe as AppCheckbox, $e as AppChip, et as AppChoiceCard, tt as AppChoiceChip, nt as AppColorField, rt as AppCompareTable, lt as AppConfirmDialog, yt as AppDataTable, bt as AppDatePicker, xt as AppDateRangePicker, Ct as AppDropdown, wt as AppEmptyState, Tt as AppFileAttachment, kt as AppFilePicker, At as AppInfoList, it as AppInfoTip, at as AppInput, jt as AppKpiTile, Mt as AppLogoPicker, st as AppModal, Nt as AppMultiSelect, Pt as AppOtpInput, Ft as AppPageHeader, It as AppPhoneNumberInput, Lt as AppPricingCard, Rt as AppRadio, zt as AppRepeater, Bt as AppResourceCard, Vt as AppSearch, Ht as AppSegmented, Wt as AppSelect, mt as AppSelectMini, Gt as AppShell, Jt as AppSidebarMenu, ut as AppSkeleton, pt as AppSkeletonRows, Yt as AppSpinner, Xt as AppSplash, Zt as AppStatusBadge, Qt as AppStepper, $t as AppSwitch, en as AppTableEmptyState, gt as AppTablePagination, tn as AppTabs, nn as AppTextarea, rn as AppTimeline, O as Icon, ct as MODAL_ICONS, Z as RequiredMark, Ot as errorToast, D as iconNames, Dt as toast };
5501
+ //#region src/lib/usePagination.js
5502
+ function on(e, t = 10) {
5503
+ let [n, r] = u(1), [i, o] = u(t), s = e.length, l = Math.max(1, Math.ceil(s / i));
5504
+ a(() => {
5505
+ n > l && r(l);
5506
+ }, [n, l]);
5507
+ let d = (n - 1) * i, f = c(() => e.slice(d, d + i), [
5508
+ e,
5509
+ d,
5510
+ i
5511
+ ]);
5512
+ function p(e) {
5513
+ o(e), r(1);
5514
+ }
5515
+ return {
5516
+ page: n,
5517
+ setPage: r,
5518
+ pageSize: i,
5519
+ setPageSize: p,
5520
+ totalPages: l,
5521
+ pageRows: f,
5522
+ total: s,
5523
+ firstRow: s === 0 ? 0 : d + 1,
5524
+ lastRow: Math.min(s, d + i)
5525
+ };
5526
+ }
5527
+ //#endregion
5528
+ export { A as ActionIcon, j as AppAccordion, M as AppAlert, Ge as AppAutocomplete, qe as AppAvatar, Je as AppBadge, Q as AppButton, Ze as AppCallout, Qe as AppCard, $e as AppCheckbox, et as AppChip, tt as AppChoiceCard, nt as AppChoiceChip, rt as AppColorField, it as AppCompareTable, ut as AppConfirmDialog, bt as AppDataTable, xt as AppDatePicker, St as AppDateRangePicker, wt as AppDropdown, Tt as AppEmptyState, Et as AppFileAttachment, At as AppFilePicker, jt as AppInfoList, at as AppInfoTip, ot as AppInput, Mt as AppKpiTile, Nt as AppLogoPicker, ct as AppModal, Pt as AppMultiSelect, Ft as AppOtpInput, It as AppPageHeader, Lt as AppPhoneNumberInput, Rt as AppPricingCard, zt as AppRadio, Bt as AppRepeater, Vt as AppResourceCard, Ht as AppSearch, Ut as AppSegmented, Gt as AppSelect, ht as AppSelectMini, Kt as AppShell, Yt as AppSidebarMenu, dt as AppSkeleton, mt as AppSkeletonRows, Xt as AppSpinner, Zt as AppSplash, Qt as AppStatusBadge, $t as AppStepper, en as AppSwitch, tn as AppTableEmptyState, _t as AppTablePagination, nn as AppTabs, rn as AppTextarea, an as AppTimeline, k as Icon, lt as MODAL_ICONS, Z as RequiredMark, kt as errorToast, O as iconNames, Ot as toast, on as usePagination };