@nonoun/native-ui 0.2.6 → 0.2.8

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.
Files changed (106) hide show
  1. package/dist/components/ui-accordion/ui-accordion-element.d.ts.map +1 -1
  2. package/dist/components/ui-avatar/ui-avatar-element.d.ts +2 -0
  3. package/dist/components/ui-avatar/ui-avatar-element.d.ts.map +1 -1
  4. package/dist/components/ui-calendar/calendar-store.d.ts.map +1 -1
  5. package/dist/components/ui-calendar/ui-calendar-element.d.ts +1 -0
  6. package/dist/components/ui-calendar/ui-calendar-element.d.ts.map +1 -1
  7. package/dist/components/ui-chat/ui-chat-input-element.d.ts.map +1 -1
  8. package/dist/components/ui-checkbox/ui-checkbox-element.d.ts +1 -0
  9. package/dist/components/ui-checkbox/ui-checkbox-element.d.ts.map +1 -1
  10. package/dist/components/ui-combobox/ui-combobox-element.d.ts +1 -0
  11. package/dist/components/ui-combobox/ui-combobox-element.d.ts.map +1 -1
  12. package/dist/components/ui-command/ui-command-element.d.ts.map +1 -1
  13. package/dist/components/ui-command/ui-command-group-element.d.ts +1 -0
  14. package/dist/components/ui-command/ui-command-group-element.d.ts.map +1 -1
  15. package/dist/components/ui-controller/ui-controller-element.d.ts +1 -0
  16. package/dist/components/ui-controller/ui-controller-element.d.ts.map +1 -1
  17. package/dist/components/ui-dialog/ui-dialog-element.d.ts +0 -1
  18. package/dist/components/ui-dialog/ui-dialog-element.d.ts.map +1 -1
  19. package/dist/components/ui-drawer/ui-drawer-element.d.ts +0 -1
  20. package/dist/components/ui-drawer/ui-drawer-element.d.ts.map +1 -1
  21. package/dist/components/ui-field/ui-field-element.d.ts.map +1 -1
  22. package/dist/components/ui-input/ui-input-element.d.ts +1 -0
  23. package/dist/components/ui-input/ui-input-element.d.ts.map +1 -1
  24. package/dist/components/ui-input-otp/ui-input-otp-element.d.ts +1 -0
  25. package/dist/components/ui-input-otp/ui-input-otp-element.d.ts.map +1 -1
  26. package/dist/components/ui-listbox/ui-listbox-element.d.ts.map +1 -1
  27. package/dist/components/ui-nav/ui-nav-group-element.d.ts +1 -1
  28. package/dist/components/ui-pagination/ui-pagination-element.d.ts.map +1 -1
  29. package/dist/components/ui-radio/ui-radio-element.d.ts.map +1 -1
  30. package/dist/components/ui-radio/ui-radio-group-element.d.ts +1 -0
  31. package/dist/components/ui-radio/ui-radio-group-element.d.ts.map +1 -1
  32. package/dist/components/ui-range/ui-range-element.d.ts +4 -0
  33. package/dist/components/ui-range/ui-range-element.d.ts.map +1 -1
  34. package/dist/components/ui-segmented-control/ui-segment-element.d.ts.map +1 -1
  35. package/dist/components/ui-segmented-control/ui-segmented-control-element.d.ts +1 -0
  36. package/dist/components/ui-segmented-control/ui-segmented-control-element.d.ts.map +1 -1
  37. package/dist/components/ui-select/ui-select-element.d.ts +1 -0
  38. package/dist/components/ui-select/ui-select-element.d.ts.map +1 -1
  39. package/dist/components/ui-slideshow/ui-slideshow-element.d.ts.map +1 -1
  40. package/dist/components/ui-switch/ui-switch-element.d.ts +4 -0
  41. package/dist/components/ui-switch/ui-switch-element.d.ts.map +1 -1
  42. package/dist/components/ui-table/index.d.ts +1 -1
  43. package/dist/components/ui-table/index.d.ts.map +1 -1
  44. package/dist/components/ui-table/table-store.d.ts +0 -1
  45. package/dist/components/ui-table/table-store.d.ts.map +1 -1
  46. package/dist/components/ui-table/ui-table-element.d.ts +1 -0
  47. package/dist/components/ui-table/ui-table-element.d.ts.map +1 -1
  48. package/dist/components/ui-table/ui-table-header-element.d.ts +1 -0
  49. package/dist/components/ui-table/ui-table-header-element.d.ts.map +1 -1
  50. package/dist/components/ui-tabs/ui-tab-element.d.ts.map +1 -1
  51. package/dist/components/ui-tabs/ui-tabs-element.d.ts.map +1 -1
  52. package/dist/components/ui-textarea/ui-textarea-element.d.ts +1 -0
  53. package/dist/components/ui-textarea/ui-textarea-element.d.ts.map +1 -1
  54. package/dist/components/ui-tree/ui-tree-item-element.d.ts +4 -0
  55. package/dist/components/ui-tree/ui-tree-item-element.d.ts.map +1 -1
  56. package/dist/components-lean.css +91 -80
  57. package/dist/components.css +99 -80
  58. package/dist/core/form-associable.d.ts +2 -2
  59. package/dist/core/ui-element.d.ts +2 -0
  60. package/dist/core/ui-element.d.ts.map +1 -1
  61. package/dist/custom-elements.json +3728 -1586
  62. package/dist/dialog-controller.js +56 -39
  63. package/dist/icons/ui-icon-element.d.ts +1 -0
  64. package/dist/icons/ui-icon-element.d.ts.map +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/kernel/index.d.ts +1 -0
  68. package/dist/kernel/index.d.ts.map +1 -1
  69. package/dist/kernel/overlay-manager.d.ts +5 -1
  70. package/dist/kernel/overlay-manager.d.ts.map +1 -1
  71. package/dist/kernel.js +32 -13
  72. package/dist/native-ui-lean.css +91 -80
  73. package/dist/native-ui.css +99 -80
  74. package/dist/native-ui.js +7 -32
  75. package/dist/register-all.js +2 -2
  76. package/dist/register-all2.js +147 -76
  77. package/dist/traits/adapters/collapsible-adapter.d.ts.map +1 -1
  78. package/dist/traits/adapters/copyable-adapter.d.ts.map +1 -1
  79. package/dist/traits/adapters/hoverable-adapter.d.ts.map +1 -1
  80. package/dist/traits/adapters/intersectable-adapter.d.ts.map +1 -1
  81. package/dist/traits/adapters/resizable-adapter.d.ts.map +1 -1
  82. package/dist/traits/adapters/searchable-adapter.d.ts.map +1 -1
  83. package/dist/traits/adapters/sortable-adapter.d.ts.map +1 -1
  84. package/dist/traits/adapters/swipeable-adapter.d.ts.map +1 -1
  85. package/dist/traits/adapters/virtualizable-adapter.d.ts.map +1 -1
  86. package/dist/traits/collapsible-controller.d.ts.map +1 -1
  87. package/dist/traits/dialog-controller.d.ts.map +1 -1
  88. package/dist/traits/drag-controller.d.ts.map +1 -1
  89. package/dist/traits/drop-zone-controller.d.ts +1 -1
  90. package/dist/traits/drop-zone-controller.d.ts.map +1 -1
  91. package/dist/traits/focus-trap-controller.d.ts.map +1 -1
  92. package/dist/traits/hover-controller.d.ts +1 -1
  93. package/dist/traits/hover-controller.d.ts.map +1 -1
  94. package/dist/traits/intersect-controller.d.ts.map +1 -1
  95. package/dist/traits/popover-controller.d.ts.map +1 -1
  96. package/dist/traits/press-controller.d.ts.map +1 -1
  97. package/dist/traits/resize-controller.d.ts.map +1 -1
  98. package/dist/traits/selection-controller.d.ts.map +1 -1
  99. package/dist/traits/sort-controller.d.ts.map +1 -1
  100. package/dist/traits/swipe-controller.d.ts.map +1 -1
  101. package/dist/traits/validate-controller.d.ts +2 -0
  102. package/dist/traits/validate-controller.d.ts.map +1 -1
  103. package/dist/traits.js +4 -4
  104. package/dist/ui-element.js +13 -8
  105. package/dist/ui-icon-element.js +708 -465
  106. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./uid.js";
2
2
  import { i as t, n, r } from "./define.js";
3
- import { a as i, n as a, o, r as s, t as c } from "./ui-element.js";
4
- import { a as l, c as u, n as d, o as f, r as p, s as m, t as h } from "./dialog-controller.js";
5
- function g(e, t, n, r) {
3
+ import { a as i, c as a, n as o, o as s, p as c, r as l, s as u, t as d } from "./dialog-controller.js";
4
+ import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./ui-element.js";
5
+ function v(e, t, n, r) {
6
6
  let i;
7
7
  return () => {
8
8
  let n = t.value;
@@ -13,7 +13,7 @@ function g(e, t, n, r) {
13
13
  })), i = n;
14
14
  };
15
15
  }
16
- function _(e, n, r) {
16
+ function y(e, n, r) {
17
17
  let i = r.attribute ?? n;
18
18
  if (r.type === "boolean") {
19
19
  let n = t(!1);
@@ -78,7 +78,7 @@ function _(e, n, r) {
78
78
  * }
79
79
  * ```
80
80
  */
81
- function v(e, t, n) {
81
+ function b(e, t, n) {
82
82
  let r = e[t];
83
83
  return r ? (r.fromAttribute(n), !0) : !1;
84
84
  }
@@ -88,20 +88,20 @@ function v(e, t, n) {
88
88
  * - `static formAssociated = true`
89
89
  * - `formDisabledCallback` → calls `onFormDisabled(disabled)`
90
90
  * - `formResetCallback` → calls `onFormReset()`
91
- *
92
- * Subclasses override `onFormDisabled` and `onFormReset` with their own logic.
91
+ * - `formStateRestoreCallback` → calls `onFormStateRestore(state)`
93
92
  *
94
93
  * Must remain a mixin (not a controller) because the Web Components spec
95
94
  * requires `static formAssociated = true` on the class constructor.
96
95
  *
97
96
  * ```ts
98
97
  * class UIInput extends FormAssociable(UIElement) {
98
+ * #internals = this.attachInternals();
99
99
  * onFormDisabled(disabled: boolean) { this.#disabled.value = disabled; }
100
100
  * onFormReset() { this.textContent = ''; }
101
101
  * }
102
102
  * ```
103
103
  */
104
- function y(e) {
104
+ function x(e) {
105
105
  return class extends e {
106
106
  static formAssociated = !0;
107
107
  /** Override to handle form-initiated disabled state changes. */
@@ -122,10 +122,10 @@ function y(e) {
122
122
  formAssociatedCallback(e) {}
123
123
  };
124
124
  }
125
- function b(e, t) {
125
+ function S(e, t) {
126
126
  return e.label.toLowerCase().includes(t.toLowerCase());
127
127
  }
128
- var x = class {
128
+ var C = class {
129
129
  data;
130
130
  query;
131
131
  #e;
@@ -140,7 +140,7 @@ var x = class {
140
140
  selectedItem;
141
141
  empty;
142
142
  constructor(e = {}) {
143
- this.data = t([]), this.query = t(""), this.#e = t(e.filterFn ?? b), this.#t = t(e.sortFn ?? null), this.#n = t(e.multiple ?? !1), this.activeIndex = t(e.initialActiveIndex ?? -1), this.value = t(null), this.selected = t(/* @__PURE__ */ new Set()), this.filtered = r(() => {
143
+ this.data = t([]), this.query = t(""), this.#e = t(e.filterFn ?? S), this.#t = t(e.sortFn ?? null), this.#n = t(e.multiple ?? !1), this.activeIndex = t(e.initialActiveIndex ?? -1), this.value = t(null), this.selected = t(/* @__PURE__ */ new Set()), this.filtered = r(() => {
144
144
  let e = this.data.value, t = this.query.value, n = this.#e.value;
145
145
  return t ? e.filter((e) => n(e, t)) : e;
146
146
  }), this.sorted = r(() => {
@@ -224,14 +224,14 @@ var x = class {
224
224
  this.#t.value = e;
225
225
  }
226
226
  };
227
- function S(e) {
228
- return new x(e);
227
+ function ee(e) {
228
+ return new C(e);
229
229
  }
230
230
  /**
231
231
  * Validates a JSON string → typed option array.
232
232
  * Filters out entries missing `value` or `label` strings.
233
233
  */
234
- function C(e, t) {
234
+ function w(e, t) {
235
235
  try {
236
236
  let t = JSON.parse(e);
237
237
  return Array.isArray(t) ? t.filter((e) => typeof e == "object" && !!e && typeof e.value == "string" && typeof e.label == "string") : [];
@@ -244,7 +244,7 @@ function C(e, t) {
244
244
  * Aborts any in-flight request before starting a new one.
245
245
  * Returns the new AbortController for the caller to store.
246
246
  */
247
- async function w(e, t, n, r) {
247
+ async function T(e, t, n, r) {
248
248
  t?.abort();
249
249
  let i = new AbortController();
250
250
  try {
@@ -265,14 +265,14 @@ async function w(e, t, n, r) {
265
265
  * @attr {string} type - Form button type: "button" | "submit" | "reset"
266
266
  * @fires ui-press - Fired on activation (click, Enter, Space)
267
267
  */
268
- var ee = class extends y(c) {
268
+ var te = class extends x(_) {
269
269
  static observedAttributes = ["disabled", "type"];
270
270
  #e;
271
271
  #t;
272
272
  #n;
273
273
  #r;
274
274
  constructor() {
275
- super(), this.#e = this.attachInternals(), this.#e.role = "button", this.#t = _(this, "disabled", { type: "boolean" }), this.#n = _(this, "type", {
275
+ super(), this.#e = this.attachInternals(), this.#e.role = "button", this.#t = y(this, "disabled", { type: "boolean" }), this.#n = y(this, "type", {
276
276
  type: "string",
277
277
  initial: "button"
278
278
  });
@@ -290,13 +290,13 @@ var ee = class extends y(c) {
290
290
  this.#n.set(e);
291
291
  }
292
292
  attributeChangedCallback(e, t, n) {
293
- t !== n && (v({
293
+ t !== n && (b({
294
294
  disabled: this.#t,
295
295
  type: this.#n
296
296
  }, e, n), super.attributeChangedCallback?.(e, t, n));
297
297
  }
298
298
  setup() {
299
- super.setup(), this.#r = new f(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(g(this, this.#t.signal, this.#e, { manageTabindex: !0 })), this.addEventListener("ui-press", this.#i);
299
+ super.setup(), this.#r = new s(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(v(this, this.#t.signal, this.#e, { manageTabindex: !0 })), this.addEventListener("ui-press", this.#i);
300
300
  }
301
301
  teardown() {
302
302
  this.removeEventListener("ui-press", this.#i), this.#r.destroy(), super.teardown();
@@ -314,35 +314,37 @@ var ee = class extends y(c) {
314
314
  onFormReset() {
315
315
  this.#t.signal.value = this.hasAttribute("disabled");
316
316
  }
317
- }, te = class extends y(c) {
317
+ }, ne = class extends x(_) {
318
318
  static observedAttributes = [
319
319
  "value",
320
320
  "placeholder",
321
321
  "disabled",
322
322
  "readonly",
323
323
  "required",
324
- "name"
324
+ "pattern"
325
325
  ];
326
326
  #e;
327
327
  #t = t(!1);
328
328
  #n = t(!1);
329
329
  #r = t("");
330
- #i = [];
330
+ #i = "";
331
+ #a = null;
332
+ #o = [];
331
333
  constructor() {
332
334
  super(), this.#e = this.attachInternals(), this.#e.role = "textbox";
333
335
  }
334
336
  get value() {
335
- return this.#a();
337
+ return this.#s();
336
338
  }
337
339
  set value(e) {
338
- this.#o(e), this.#r.value = e, this.#e.setFormValue(e), this.#s();
340
+ this.#c(e), this.#r.value = e, this.#e.setFormValue(e), this.#l();
339
341
  }
340
- #a() {
342
+ #s() {
341
343
  let e = "";
342
344
  for (let t of this.childNodes) t.nodeType === Node.TEXT_NODE && (e += t.textContent);
343
345
  return e;
344
346
  }
345
- #o(e) {
347
+ #c(e) {
346
348
  for (let e of [...this.childNodes]) e.nodeType === Node.TEXT_NODE && e.remove();
347
349
  e && this.append(e);
348
350
  }
@@ -380,7 +382,7 @@ var ee = class extends y(c) {
380
382
  if (t !== n) {
381
383
  switch (e) {
382
384
  case "value":
383
- this.#o(n ?? ""), this.#r.value = n ?? "", this.#e.setFormValue(n ?? ""), this.#s();
385
+ this.#c(n ?? ""), this.#r.value = n ?? "", this.#e.setFormValue(n ?? ""), this.#l();
384
386
  break;
385
387
  case "disabled":
386
388
  this.#t.value = n !== null, this.setAttribute("contenteditable", n !== null || this.hasAttribute("readonly") ? "false" : "plaintext-only");
@@ -391,19 +393,23 @@ var ee = class extends y(c) {
391
393
  case "required":
392
394
  this.#n.value = n !== null;
393
395
  break;
396
+ case "pattern":
397
+ this.#a = n;
398
+ break;
394
399
  }
395
400
  super.attributeChangedCallback?.(e, t, n);
396
401
  }
397
402
  }
398
403
  setup() {
399
- super.setup(), this.hasAttribute("contenteditable") || this.setAttribute("contenteditable", "plaintext-only"), this.#i = [...this.querySelectorAll(":scope > [slot]")];
400
- for (let e of this.#i) e.setAttribute("contenteditable", "false");
401
- this.#n.value = this.hasAttribute("required"), this.#r.value = this.#a(), this.#s(), this.addEffect(g(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
402
- this.#n.value && this.#r.value === "" ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : this.#e.setValidity({});
403
- }), this.addEventListener("input", this.#c), this.addEventListener("blur", this.#l);
404
+ super.setup(), this.hasAttribute("contenteditable") || this.setAttribute("contenteditable", "plaintext-only"), this.#o = [...this.querySelectorAll(":scope > [slot]")];
405
+ for (let e of this.#o) e.setAttribute("contenteditable", "false");
406
+ this.#n.value = this.hasAttribute("required"), this.#a = this.getAttribute("pattern"), this.#i = this.getAttribute("value") ?? this.#s(), this.#r.value = this.#s(), this.#l(), this.addEffect(v(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
407
+ let e = this.#r.value;
408
+ this.#n.value && e === "" ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : this.#a !== null && e !== "" && !RegExp(`^(?:${this.#a})$`).test(e) ? this.#e.setValidity({ patternMismatch: !0 }, "Please match the requested format.", this) : this.#e.setValidity({});
409
+ }), this.addEventListener("input", this.#u), this.addEventListener("blur", this.#d);
404
410
  }
405
411
  teardown() {
406
- this.removeEventListener("input", this.#c), this.removeEventListener("blur", this.#l), super.teardown();
412
+ this.removeEventListener("input", this.#u), this.removeEventListener("blur", this.#d), super.teardown();
407
413
  }
408
414
  select() {
409
415
  let e = document.createRange();
@@ -415,28 +421,31 @@ var ee = class extends y(c) {
415
421
  this.#t.value = e, this.setAttribute("contenteditable", e || this.hasAttribute("readonly") ? "false" : "plaintext-only");
416
422
  }
417
423
  onFormReset() {
418
- this.#o(""), this.#r.value = "", this.#e.setFormValue(""), this.#s(), this.#t.value = this.hasAttribute("disabled");
424
+ this.#c(this.#i), this.#r.value = this.#i, this.#e.setFormValue(this.#i), this.#l(), this.#t.value = this.hasAttribute("disabled"), this.setAttribute("contenteditable", this.#t.value || this.hasAttribute("readonly") ? "false" : "plaintext-only");
419
425
  }
420
- #s() {
421
- this.#a().trim() === "" ? this.#e.states.add("empty") : this.#e.states.delete("empty");
426
+ onFormStateRestore(e) {
427
+ this.value = typeof e == "string" ? e : "";
422
428
  }
423
- #c = () => {
424
- for (let e of this.#i) e.parentNode || this.appendChild(e);
425
- let e = this.#a();
426
- this.#r.value = e, this.#e.setFormValue(e), this.#s(), this.dispatchEvent(new CustomEvent("ui-input", {
429
+ #l() {
430
+ this.#s().trim() === "" ? this.#e.states.add("empty") : this.#e.states.delete("empty");
431
+ }
432
+ #u = () => {
433
+ for (let e of this.#o) e.parentNode || this.appendChild(e);
434
+ let e = this.#s();
435
+ this.#r.value = e, this.#e.setFormValue(e), this.#l(), this.dispatchEvent(new CustomEvent("ui-input", {
427
436
  bubbles: !0,
428
437
  composed: !0,
429
438
  detail: { value: e }
430
439
  }));
431
440
  };
432
- #l = () => {
441
+ #d = () => {
433
442
  this.dispatchEvent(new CustomEvent("ui-change", {
434
443
  bubbles: !0,
435
444
  composed: !0,
436
- detail: { value: this.#a() }
445
+ detail: { value: this.#s() }
437
446
  }));
438
447
  };
439
- }, ne = class extends c {
448
+ }, re = class extends _ {
440
449
  static observedAttributes = [
441
450
  "disabled",
442
451
  "multiple",
@@ -445,10 +454,10 @@ var ee = class extends y(c) {
445
454
  #e;
446
455
  #t;
447
456
  #n = t(!1);
448
- #r = new x();
457
+ #r = new C();
449
458
  #i;
450
459
  constructor() {
451
- super(), this.#e = this.attachInternals(), this.#e.role = "listbox", this.#t = _(this, "disabled", { type: "boolean" });
460
+ super(), this.#e = this.attachInternals(), this.#e.role = "listbox", this.#t = y(this, "disabled", { type: "boolean" });
452
461
  }
453
462
  get virtualFocus() {
454
463
  return this.hasAttribute("virtual-focus");
@@ -479,7 +488,7 @@ var ee = class extends y(c) {
479
488
  }
480
489
  attributeChangedCallback(e, t, n) {
481
490
  if (t !== n) {
482
- if (v({ disabled: this.#t }, e, n)) {
491
+ if (b({ disabled: this.#t }, e, n)) {
483
492
  super.attributeChangedCallback?.(e, t, n);
484
493
  return;
485
494
  }
@@ -495,7 +504,7 @@ var ee = class extends y(c) {
495
504
  }
496
505
  }
497
506
  setup() {
498
- super.setup(), this.#i = new d(this, {
507
+ super.setup(), this.#i = new o(this, {
499
508
  itemSelector: ":scope ui-option:not([disabled])",
500
509
  autoSync: !1,
501
510
  orientation: "vertical",
@@ -510,7 +519,7 @@ var ee = class extends y(c) {
510
519
  },
511
520
  addEffect: (e) => this.addEffect(e),
512
521
  deferChildren: (e) => this.deferChildren(e)
513
- }), this.addEffect(g(this, this.#t.signal, this.#e)), this.deferChildren(() => {
522
+ }), this.addEffect(v(this, this.#t.signal, this.#e)), this.deferChildren(() => {
514
523
  this.addEffect(() => {
515
524
  let e = this.#r.value.value, t = this.#r.selected.value, n = this.#n.value, r = this.querySelectorAll(":scope ui-option");
516
525
  for (let i of r) {
@@ -518,8 +527,12 @@ var ee = class extends y(c) {
518
527
  i.setAttribute("aria-selected", a ? "true" : "false");
519
528
  }
520
529
  }), this.addEffect(() => {
521
- let e = this.#r.activeIndex.value, t = this.querySelectorAll(":scope ui-option:not([disabled])");
522
- for (let n = 0; n < t.length; n++) t[n].toggleAttribute("active", n === e);
530
+ let t = this.#r.activeIndex.value, n = this.querySelectorAll(":scope ui-option:not([disabled])");
531
+ for (let r = 0; r < n.length; r++) {
532
+ let i = n[r], a = r === t;
533
+ i.toggleAttribute("active", a), a && (i.id ||= e("opt"), this.setAttribute("aria-activedescendant", i.id));
534
+ }
535
+ (t < 0 || t >= n.length) && this.removeAttribute("aria-activedescendant");
523
536
  });
524
537
  });
525
538
  }
@@ -530,7 +543,7 @@ var ee = class extends y(c) {
530
543
  let e = this.#r.activeIndex.value;
531
544
  return this.querySelectorAll(":scope ui-option:not([disabled])")[e] ?? null;
532
545
  }
533
- }, re = class extends c {
546
+ }, ie = class extends _ {
534
547
  static observedAttributes = [
535
548
  "value",
536
549
  "disabled",
@@ -541,7 +554,7 @@ var ee = class extends y(c) {
541
554
  #n;
542
555
  #r = t("");
543
556
  constructor() {
544
- super(), this.#e = this.attachInternals(), this.#e.role = "option", this.#n = _(this, "disabled", { type: "boolean" });
557
+ super(), this.#e = this.attachInternals(), this.#e.role = "option", this.#n = y(this, "disabled", { type: "boolean" });
545
558
  }
546
559
  get value() {
547
560
  return this.#t.value;
@@ -563,7 +576,7 @@ var ee = class extends y(c) {
563
576
  }
564
577
  attributeChangedCallback(e, t, n) {
565
578
  if (t !== n) {
566
- if (v({ disabled: this.#n }, e, n)) {
579
+ if (b({ disabled: this.#n }, e, n)) {
567
580
  super.attributeChangedCallback?.(e, t, n);
568
581
  return;
569
582
  }
@@ -579,7 +592,7 @@ var ee = class extends y(c) {
579
592
  }
580
593
  }
581
594
  setup() {
582
- super.setup(), this.addEffect(g(this, this.#n.signal, this.#e)), this.addEventListener("click", this.#i);
595
+ super.setup(), this.addEffect(v(this, this.#n.signal, this.#e)), this.addEventListener("click", this.#i);
583
596
  }
584
597
  teardown() {
585
598
  this.removeEventListener("click", this.#i), super.teardown();
@@ -594,7 +607,7 @@ var ee = class extends y(c) {
594
607
  }
595
608
  }));
596
609
  };
597
- }, ie = class extends c {
610
+ }, ae = class extends _ {
598
611
  constructor() {
599
612
  super();
600
613
  let e = this.attachInternals();
@@ -605,19 +618,19 @@ var ee = class extends y(c) {
605
618
  let t = this.closest("ui-option-group");
606
619
  t && t.setAttribute("aria-labelledby", this.id);
607
620
  }
608
- }, ae = class extends c {
621
+ }, oe = class extends _ {
609
622
  constructor() {
610
623
  super();
611
624
  let e = this.attachInternals();
612
625
  e.role = "group";
613
626
  }
614
- }, oe = class extends c {
627
+ }, se = class extends _ {
615
628
  static observedAttributes = ["disabled"];
616
629
  #e;
617
- #t = new x({ initialActiveIndex: 0 });
630
+ #t = new C({ initialActiveIndex: 0 });
618
631
  #n = t(!1);
619
632
  constructor() {
620
- super(), this.#e = this.attachInternals();
633
+ super(), this.#e = this.attachInternals(), this.#e.role = "search";
621
634
  }
622
635
  get store() {
623
636
  return this.#t;
@@ -632,7 +645,7 @@ var ee = class extends y(c) {
632
645
  t !== n && (e === "disabled" && (this.#n.value = n !== null), super.attributeChangedCallback?.(e, t, n));
633
646
  }
634
647
  setup() {
635
- super.setup(), this.addEffect(g(this, this.#n, this.#e)), this.addEventListener("ui-input", this.#i), this.addEventListener("ui-select", this.#a), this.addEventListener("keydown", this.#o), this.deferChildren(() => {
648
+ super.setup(), this.addEffect(v(this, this.#n, this.#e)), this.addEventListener("ui-input", this.#i), this.addEventListener("ui-select", this.#a), this.addEventListener("keydown", this.#o), this.deferChildren(() => {
636
649
  this.addEffect(() => {
637
650
  let e = this.#t.query.value.toLowerCase().trim(), t = this.querySelectorAll("ui-command-item");
638
651
  for (let n of t) {
@@ -641,10 +654,10 @@ var ee = class extends y(c) {
641
654
  }
642
655
  }), this.addEffect(() => {
643
656
  this.#t.query.value;
644
- let e = this.#t.activeIndex.value, t = this.#r();
645
- for (let n = 0; n < t.length; n++) t[n].toggleAttribute("active", n === e);
646
- let n = t[e];
647
- n && n.scrollIntoView({ block: "nearest" });
657
+ let t = this.#t.activeIndex.value, n = this.#r(), r = this.querySelector("ui-command-list");
658
+ for (let e = 0; e < n.length; e++) n[e].toggleAttribute("active", e === t);
659
+ let i = n[t];
660
+ i && r ? (i.id ||= e("cmd"), r.setAttribute("aria-activedescendant", i.id), i.scrollIntoView({ block: "nearest" })) : r?.removeAttribute("aria-activedescendant");
648
661
  }), this.addEffect(() => {
649
662
  this.#t.query.value;
650
663
  let e = this.#r(), t = this.querySelector("ui-command-empty");
@@ -702,7 +715,7 @@ var ee = class extends y(c) {
702
715
  break;
703
716
  }
704
717
  };
705
- }, se = class extends c {
718
+ }, ce = class extends _ {
706
719
  #e = null;
707
720
  setup() {
708
721
  super.setup(), this.deferChildren(() => {
@@ -729,13 +742,13 @@ var ee = class extends y(c) {
729
742
  detail: { value: e }
730
743
  }));
731
744
  };
732
- }, ce = class extends c {
745
+ }, le = class extends _ {
733
746
  constructor() {
734
747
  super();
735
748
  let e = this.attachInternals();
736
749
  e.role = "listbox";
737
750
  }
738
- }, le = class extends c {
751
+ }, ue = class extends _ {
739
752
  static observedAttributes = [
740
753
  "value",
741
754
  "disabled",
@@ -789,7 +802,7 @@ var ee = class extends y(c) {
789
802
  }
790
803
  }
791
804
  setup() {
792
- super.setup(), this.addEffect(g(this, this.#n, this.#e)), this.addEventListener("click", this.#i);
805
+ super.setup(), this.addEffect(v(this, this.#n, this.#e)), this.addEventListener("click", this.#i);
793
806
  }
794
807
  teardown() {
795
808
  this.removeEventListener("click", this.#i), super.teardown();
@@ -804,13 +817,18 @@ var ee = class extends y(c) {
804
817
  }
805
818
  }));
806
819
  };
807
- }, T = class extends c {
820
+ }, E = class extends _ {
808
821
  constructor() {
809
822
  super();
810
823
  let e = this.attachInternals();
811
824
  e.role = "group";
812
825
  }
813
- }, E = class extends c {}, D = class extends y(c) {
826
+ setup() {
827
+ super.setup();
828
+ let t = this.querySelector("[slot=\"heading\"]");
829
+ t && (t.id ||= e("cg"), this.setAttribute("aria-labelledby", t.id));
830
+ }
831
+ }, D = class extends _ {}, O = class extends x(_) {
814
832
  static observedAttributes = [
815
833
  "checked",
816
834
  "indeterminate",
@@ -827,7 +845,7 @@ var ee = class extends y(c) {
827
845
  #a = !1;
828
846
  #o;
829
847
  constructor() {
830
- super(), this.#e = this.attachInternals(), this.#e.role = "checkbox", this.#t = _(this, "checked", { type: "boolean" }), this.#n = _(this, "indeterminate", { type: "boolean" }), this.#r = _(this, "disabled", { type: "boolean" });
848
+ super(), this.#e = this.attachInternals(), this.#e.role = "checkbox", this.#t = y(this, "checked", { type: "boolean" }), this.#n = y(this, "indeterminate", { type: "boolean" }), this.#r = y(this, "disabled", { type: "boolean" });
831
849
  }
832
850
  get checked() {
833
851
  return this.#t.value;
@@ -867,7 +885,7 @@ var ee = class extends y(c) {
867
885
  }
868
886
  attributeChangedCallback(e, t, n) {
869
887
  if (t !== n) {
870
- if (v({
888
+ if (b({
871
889
  checked: this.#t,
872
890
  indeterminate: this.#n,
873
891
  disabled: this.#r
@@ -879,12 +897,11 @@ var ee = class extends y(c) {
879
897
  }
880
898
  }
881
899
  setup() {
882
- super.setup(), this.#o = new f(this, { disabled: () => this.disabled }), this.#a = this.hasAttribute("checked"), this.#i.value = this.hasAttribute("required"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(g(this, this.#r.signal, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
900
+ super.setup(), this.#o = new s(this, { disabled: () => this.disabled }), this.#a = this.hasAttribute("checked"), this.#i.value = this.hasAttribute("required"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(v(this, this.#r.signal, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
883
901
  let e = this.#t.value, t = this.#n.value ? "mixed" : e ? "true" : "false";
884
902
  this.setAttribute("aria-checked", t), this.#e.setFormValue(e ? this.value : null);
885
903
  }), this.addEffect(() => {
886
- let e = this.#i.value;
887
- this.#e.ariaRequired = e ? "true" : null;
904
+ this.#i.value ? this.setAttribute("aria-required", "true") : this.removeAttribute("aria-required");
888
905
  }), this.addEffect(() => {
889
906
  this.#i.value && !this.#t.value ? this.#e.setValidity({ valueMissing: !0 }, "Please check this box if you want to proceed.", this) : this.#e.setValidity({});
890
907
  }), this.addEventListener("ui-press", this.#s);
@@ -898,6 +915,9 @@ var ee = class extends y(c) {
898
915
  onFormReset() {
899
916
  this.#t.set(this.#a), this.#n.set(!1);
900
917
  }
918
+ onFormStateRestore(e) {
919
+ this.checked = typeof e == "string" && e === this.value;
920
+ }
901
921
  #s = () => {
902
922
  this.#r.value || (this.#n.value ? (this.indeterminate = !1, this.checked = !0) : this.checked = !this.#t.value, this.dispatchEvent(new CustomEvent("ui-change", {
903
923
  bubbles: !0,
@@ -908,20 +928,22 @@ var ee = class extends y(c) {
908
928
  }
909
929
  })));
910
930
  };
911
- }, O = class extends y(c) {
931
+ }, k = class extends x(_) {
912
932
  static observedAttributes = [
913
933
  "checked",
914
934
  "disabled",
915
935
  "name",
916
- "value"
936
+ "value",
937
+ "required"
917
938
  ];
918
939
  #e;
919
940
  #t;
920
941
  #n;
921
- #r = !1;
922
- #i;
942
+ #r;
943
+ #i = !1;
944
+ #a;
923
945
  constructor() {
924
- super(), this.#e = this.attachInternals(), this.#e.role = "switch", this.#t = _(this, "checked", { type: "boolean" }), this.#n = _(this, "disabled", { type: "boolean" });
946
+ super(), this.#e = this.attachInternals(), this.#e.role = "switch", this.#t = y(this, "checked", { type: "boolean" }), this.#n = y(this, "disabled", { type: "boolean" }), this.#r = y(this, "required", { type: "boolean" });
925
947
  }
926
948
  get checked() {
927
949
  return this.#t.value;
@@ -947,28 +969,40 @@ var ee = class extends y(c) {
947
969
  set value(e) {
948
970
  this.setAttribute("value", e);
949
971
  }
972
+ get required() {
973
+ return this.#r.value;
974
+ }
975
+ set required(e) {
976
+ this.#r.set(e);
977
+ }
950
978
  attributeChangedCallback(e, t, n) {
951
- t !== n && (v({
979
+ t !== n && (b({
952
980
  checked: this.#t,
953
- disabled: this.#n
981
+ disabled: this.#n,
982
+ required: this.#r
954
983
  }, e, n), super.attributeChangedCallback?.(e, t, n));
955
984
  }
956
985
  setup() {
957
- super.setup(), this.#i = new f(this, { disabled: () => this.disabled }), this.#r = this.hasAttribute("checked"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(g(this, this.#n.signal, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
986
+ super.setup(), this.#a = new s(this, { disabled: () => this.disabled }), this.#i = this.hasAttribute("checked"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(v(this, this.#n.signal, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
958
987
  let e = this.#t.value;
959
988
  this.setAttribute("aria-checked", e ? "true" : "false"), this.#e.setFormValue(e ? this.value : null);
960
- }), this.addEventListener("ui-press", this.#a);
989
+ }), this.addEffect(() => {
990
+ this.#r.value && !this.#t.value ? this.#e.setValidity({ valueMissing: !0 }, "Please toggle this switch.", this) : this.#e.setValidity({});
991
+ }), this.addEventListener("ui-press", this.#o);
961
992
  }
962
993
  teardown() {
963
- this.removeEventListener("ui-press", this.#a), this.#i.destroy(), super.teardown();
994
+ this.removeEventListener("ui-press", this.#o), this.#a.destroy(), super.teardown();
964
995
  }
965
996
  onFormDisabled(e) {
966
997
  this.#n.signal.value = e;
967
998
  }
968
999
  onFormReset() {
969
- this.#t.set(this.#r);
1000
+ this.#t.set(this.#i);
1001
+ }
1002
+ onFormStateRestore(e) {
1003
+ this.checked = typeof e == "string" && e === this.value;
970
1004
  }
971
- #a = () => {
1005
+ #o = () => {
972
1006
  this.#n.value || (this.checked = !this.#t.value, this.dispatchEvent(new CustomEvent("ui-change", {
973
1007
  bubbles: !0,
974
1008
  composed: !0,
@@ -978,13 +1012,13 @@ var ee = class extends y(c) {
978
1012
  }
979
1013
  })));
980
1014
  };
981
- }, k = class extends c {
982
- static observedAttributes = ["value", "disabled"];
1015
+ }, A = class extends _ {
1016
+ static observedAttributes = ["disabled"];
983
1017
  #e;
984
1018
  #t;
985
1019
  #n;
986
1020
  constructor() {
987
- super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t = _(this, "disabled", { type: "boolean" });
1021
+ super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t = y(this, "disabled", { type: "boolean" });
988
1022
  }
989
1023
  get value() {
990
1024
  return this.getAttribute("value") ?? "";
@@ -1002,10 +1036,10 @@ var ee = class extends y(c) {
1002
1036
  return this.getAttribute("label") ?? this.textContent?.trim() ?? "";
1003
1037
  }
1004
1038
  attributeChangedCallback(e, t, n) {
1005
- t !== n && (v({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
1039
+ t !== n && (b({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
1006
1040
  }
1007
1041
  setup() {
1008
- super.setup(), this.setAttribute("aria-checked", "false"), this.#n = new f(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(g(this, this.#t.signal, this.#e)), this.addEventListener("click", this.#r), this.addEventListener("keydown", this.#i);
1042
+ super.setup(), this.setAttribute("aria-checked", "false"), this.#n = new s(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(v(this, this.#t.signal, this.#e)), this.addEventListener("click", this.#r), this.addEventListener("keydown", this.#i);
1009
1043
  }
1010
1044
  teardown() {
1011
1045
  this.removeEventListener("click", this.#r), this.removeEventListener("keydown", this.#i), this.#n.destroy(), super.teardown();
@@ -1030,7 +1064,7 @@ var ee = class extends y(c) {
1030
1064
  }
1031
1065
  })));
1032
1066
  };
1033
- }, A = class extends y(c) {
1067
+ }, j = class extends x(_) {
1034
1068
  static observedAttributes = [
1035
1069
  "value",
1036
1070
  "disabled",
@@ -1090,7 +1124,7 @@ var ee = class extends y(c) {
1090
1124
  }
1091
1125
  }
1092
1126
  setup() {
1093
- super.setup(), this.#r = this.getAttribute("value"), this.#n.value = this.hasAttribute("required"), this.#i = new d(this, {
1127
+ super.setup(), this.#r = this.getAttribute("value"), this.#n.value = this.hasAttribute("required"), this.#i = new o(this, {
1094
1128
  itemSelector: ":scope ui-radio:not([disabled])",
1095
1129
  ariaAttr: "aria-checked",
1096
1130
  orientation: "vertical",
@@ -1105,9 +1139,11 @@ var ee = class extends y(c) {
1105
1139
  deferChildren: (e) => this.deferChildren(e)
1106
1140
  });
1107
1141
  let e = this.getAttribute("value");
1108
- e !== null && (this.#i.listValue.value = e), this.addEffect(g(this, this.#t, this.#e)), this.addEffect(() => {
1109
- let e = this.#n.value;
1110
- this.#e.ariaRequired = e ? "true" : null;
1142
+ e !== null && (this.#i.listValue.value = e), this.addEffect(v(this, this.#t, this.#e)), this.addEffect(() => {
1143
+ let e = this.#t.value, t = this.querySelectorAll("ui-radio");
1144
+ for (let n of t) n.toggleAttribute("disabled", e);
1145
+ }), this.addEffect(() => {
1146
+ this.#n.value ? this.setAttribute("aria-required", "true") : this.removeAttribute("aria-required");
1111
1147
  }), this.addEffect(() => {
1112
1148
  let e = this.#i.listValue.value;
1113
1149
  this.#e.setFormValue(e);
@@ -1125,7 +1161,10 @@ var ee = class extends y(c) {
1125
1161
  onFormReset() {
1126
1162
  this.#i && (this.#i.listValue.value = this.#r), this.#r === null ? this.removeAttribute("value") : this.setAttribute("value", this.#r);
1127
1163
  }
1128
- }, j = class extends y(c) {
1164
+ onFormStateRestore(e) {
1165
+ typeof e == "string" && e && (this.value = e);
1166
+ }
1167
+ }, M = class extends x(_) {
1129
1168
  static observedAttributes = [
1130
1169
  "value",
1131
1170
  "disabled",
@@ -1181,7 +1220,7 @@ var ee = class extends y(c) {
1181
1220
  }
1182
1221
  }
1183
1222
  setup() {
1184
- super.setup(), this.#r = this.getAttribute("value"), this.#i = new d(this, {
1223
+ super.setup(), this.#r = this.getAttribute("value"), this.#i = new o(this, {
1185
1224
  itemSelector: ":scope > ui-segment:not([disabled])",
1186
1225
  ariaAttr: "aria-checked",
1187
1226
  orientation: "horizontal",
@@ -1196,7 +1235,7 @@ var ee = class extends y(c) {
1196
1235
  deferChildren: (e) => this.deferChildren(e)
1197
1236
  });
1198
1237
  let e = this.getAttribute("value");
1199
- e !== null && (this.#i.listValue.value = e), this.addEffect(g(this, this.#t, this.#e)), this.#n.value = this.hasAttribute("required"), this.addEffect(() => {
1238
+ e !== null && (this.#i.listValue.value = e), this.addEffect(v(this, this.#t, this.#e)), this.#n.value = this.hasAttribute("required"), this.addEffect(() => {
1200
1239
  let e = this.#i.listValue.value;
1201
1240
  this.#n.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select one of these options.", this) : this.#e.setValidity({});
1202
1241
  }), this.addEffect(() => {
@@ -1219,6 +1258,9 @@ var ee = class extends y(c) {
1219
1258
  onFormReset() {
1220
1259
  this.#i && (this.#i.listValue.value = this.#r), this.#r === null ? this.removeAttribute("value") : this.setAttribute("value", this.#r);
1221
1260
  }
1261
+ onFormStateRestore(e) {
1262
+ typeof e == "string" && e && (this.value = e);
1263
+ }
1222
1264
  #a(e, t) {
1223
1265
  if (e < 0) {
1224
1266
  this.#e.states.delete("ready");
@@ -1226,13 +1268,13 @@ var ee = class extends y(c) {
1226
1268
  }
1227
1269
  this.style.setProperty("--_indicator-index", `${e}`), this.style.setProperty("--_segment-count", `${t}`), this.#e.states.add("ready");
1228
1270
  }
1229
- }, M = class extends c {
1230
- static observedAttributes = ["value", "disabled"];
1271
+ }, N = class extends _ {
1272
+ static observedAttributes = ["disabled"];
1231
1273
  #e;
1232
1274
  #t;
1233
1275
  #n;
1234
1276
  constructor() {
1235
- super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t = _(this, "disabled", { type: "boolean" });
1277
+ super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t = y(this, "disabled", { type: "boolean" }), this.setAttribute("aria-checked", "false");
1236
1278
  }
1237
1279
  get value() {
1238
1280
  return this.getAttribute("value") ?? "";
@@ -1250,10 +1292,10 @@ var ee = class extends y(c) {
1250
1292
  return this.getAttribute("label") ?? this.textContent?.trim() ?? "";
1251
1293
  }
1252
1294
  attributeChangedCallback(e, t, n) {
1253
- t !== n && (v({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
1295
+ t !== n && (b({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
1254
1296
  }
1255
1297
  setup() {
1256
- super.setup(), this.#n = new f(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(g(this, this.#t.signal, this.#e)), this.addEventListener("ui-press", this.#r);
1298
+ super.setup(), this.#n = new s(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(v(this, this.#t.signal, this.#e)), this.addEventListener("ui-press", this.#r);
1257
1299
  }
1258
1300
  teardown() {
1259
1301
  this.removeEventListener("ui-press", this.#r), this.#n.destroy(), super.teardown();
@@ -1268,7 +1310,7 @@ var ee = class extends y(c) {
1268
1310
  }
1269
1311
  }));
1270
1312
  };
1271
- }, N = class extends c {
1313
+ }, P = class extends _ {
1272
1314
  static observedAttributes = [
1273
1315
  "placement",
1274
1316
  "delay",
@@ -1305,7 +1347,7 @@ var ee = class extends y(c) {
1305
1347
  t !== n && (e === "disabled" && (this.#n.value = n !== null), super.attributeChangedCallback?.(e, t, n));
1306
1348
  }
1307
1349
  setup() {
1308
- super.setup(), this.addEffect(g(this, this.#n, this.#e)), this.#i = this.parentElement, this.#i && (this.#a = e("tip"), this.#i.style.setProperty("anchor-name", `--${this.#a}`), this.style.setProperty("position-anchor", `--${this.#a}`), this.hasAttribute("popover") || this.setAttribute("popover", "manual"), this.id ||= e("tooltip"), this.#i.setAttribute("aria-describedby", this.id), this.#i.addEventListener("mouseenter", this.#o), this.#i.addEventListener("mouseleave", this.#s), this.#i.addEventListener("focusin", this.#o), this.#i.addEventListener("focusout", this.#s), this.#i.addEventListener("keydown", this.#c), this.addEffect(() => {
1350
+ super.setup(), this.addEffect(v(this, this.#n, this.#e)), this.#i = this.parentElement, this.#i && (this.#a = e("tip"), this.#i.style.setProperty("anchor-name", `--${this.#a}`), this.style.setProperty("position-anchor", `--${this.#a}`), this.hasAttribute("popover") || this.setAttribute("popover", "manual"), this.id ||= e("tooltip"), this.#i.setAttribute("aria-describedby", this.id), this.#i.addEventListener("mouseenter", this.#o), this.#i.addEventListener("mouseleave", this.#s), this.#i.addEventListener("focusin", this.#o), this.#i.addEventListener("focusout", this.#s), this.#i.addEventListener("keydown", this.#c), this.addEffect(() => {
1309
1351
  this.#n.value && this.#t.value && (this.#l(), this.#t.value = !1);
1310
1352
  }), this.addEffect(() => {
1311
1353
  if (this.#t.value) try {
@@ -1333,7 +1375,7 @@ var ee = class extends y(c) {
1333
1375
  #l() {
1334
1376
  this.#r !== null && (clearTimeout(this.#r), this.#r = null);
1335
1377
  }
1336
- }, P = class extends c {
1378
+ }, F = class extends _ {
1337
1379
  static observedAttributes = ["multiple", "disabled"];
1338
1380
  #e = t(!1);
1339
1381
  get multiple() {
@@ -1349,10 +1391,23 @@ var ee = class extends y(c) {
1349
1391
  this.#e.value = e, this.toggleAttribute("disabled", e);
1350
1392
  }
1351
1393
  attributeChangedCallback(e, t, n) {
1352
- t !== n && (e === "disabled" && (this.#e.value = n !== null), super.attributeChangedCallback?.(e, t, n));
1394
+ if (t !== n) {
1395
+ switch (e) {
1396
+ case "disabled":
1397
+ this.#e.value = n !== null;
1398
+ break;
1399
+ case "multiple":
1400
+ if (n === null && this.isConnected) {
1401
+ let e = [...this.querySelectorAll(":scope > ui-accordion-item[open]")];
1402
+ for (let t = 1; t < e.length; t++) e[t].open = !1;
1403
+ }
1404
+ break;
1405
+ }
1406
+ super.attributeChangedCallback?.(e, t, n);
1407
+ }
1353
1408
  }
1354
1409
  setup() {
1355
- super.setup(), this.addEffect(g(this, this.#e)), this.addEventListener("toggle", this.#t, !0);
1410
+ super.setup(), this.addEffect(v(this, this.#e)), this.addEventListener("toggle", this.#t, !0);
1356
1411
  }
1357
1412
  teardown() {
1358
1413
  this.removeEventListener("toggle", this.#t, !0), super.teardown();
@@ -1366,7 +1421,7 @@ var ee = class extends y(c) {
1366
1421
  let r = this.querySelectorAll(":scope > ui-accordion-item[open]");
1367
1422
  for (let e of r) e !== n && (e.open = !1);
1368
1423
  };
1369
- }, F = class extends c {
1424
+ }, I = class extends _ {
1370
1425
  static observedAttributes = ["open", "disabled"];
1371
1426
  #e = t(!1);
1372
1427
  #t = t(!1);
@@ -1405,7 +1460,7 @@ var ee = class extends y(c) {
1405
1460
  e.appendChild(t), e.appendChild(r), this.appendChild(e), this.#n = e, this.addEffect(() => {
1406
1461
  let e = this.#e.value;
1407
1462
  this.#n && (this.#n.open = e);
1408
- }), this.addEffect(g(this, this.#t)), e.addEventListener("toggle", this.#r);
1463
+ }), this.addEffect(v(this, this.#t)), e.addEventListener("toggle", this.#r);
1409
1464
  }
1410
1465
  teardown() {
1411
1466
  this.#n?.removeEventListener("toggle", this.#r), this.#n = null, super.teardown();
@@ -1415,8 +1470,7 @@ var ee = class extends y(c) {
1415
1470
  let e = this.#n.open;
1416
1471
  this.#e.value = e, this.toggleAttribute("open", e);
1417
1472
  };
1418
- }, I = class extends c {
1419
- static observedAttributes = ["no-close-on-escape", "no-close-on-backdrop"];
1473
+ }, L = class extends _ {
1420
1474
  #e;
1421
1475
  get open() {
1422
1476
  return this.#e.open;
@@ -1428,12 +1482,12 @@ var ee = class extends y(c) {
1428
1482
  this.#e.close();
1429
1483
  }
1430
1484
  setup() {
1431
- super.setup(), this.#e = new h(this);
1485
+ super.setup(), this.#e = new d(this);
1432
1486
  }
1433
1487
  teardown() {
1434
1488
  this.#e.destroy(), super.teardown();
1435
1489
  }
1436
- }, L = class extends c {
1490
+ }, R = class extends _ {
1437
1491
  static observedAttributes = [
1438
1492
  "value",
1439
1493
  "disabled",
@@ -1474,7 +1528,7 @@ var ee = class extends y(c) {
1474
1528
  }
1475
1529
  }
1476
1530
  setup() {
1477
- super.setup(), this.#n = new d(this, {
1531
+ super.setup(), this.#n = new o(this, {
1478
1532
  itemSelector: ":scope > ui-tab:not([disabled])",
1479
1533
  orientation: "horizontal",
1480
1534
  autoSync: !0,
@@ -1489,7 +1543,10 @@ var ee = class extends y(c) {
1489
1543
  deferChildren: (e) => this.deferChildren(e)
1490
1544
  });
1491
1545
  let e = this.getAttribute("value");
1492
- e !== null && (this.#n.listValue.value = e), this.addEffect(g(this, this.#t, this.#e)), this.deferChildren(() => {
1546
+ e !== null && (this.#n.listValue.value = e), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Tabs"), this.addEffect(v(this, this.#t, this.#e)), this.addEffect(() => {
1547
+ let e = this.#t.value, t = this.querySelectorAll(":scope > ui-tab");
1548
+ for (let n of t) n.toggleAttribute("disabled", e);
1549
+ }), this.deferChildren(() => {
1493
1550
  this.#r(), this.addEffect(() => {
1494
1551
  let e = this.#n.listValue.value, t = this.querySelectorAll(":scope > ui-tab"), n = this.querySelectorAll(":scope > ui-tab-panels > ui-tab-panel"), r = -1, i = 0;
1495
1552
  for (let n of t) (n.getAttribute("value") ?? "") === e && (r = i), i++;
@@ -1520,13 +1577,13 @@ var ee = class extends y(c) {
1520
1577
  }
1521
1578
  this.style.setProperty("--_indicator-index", `${e}`), this.style.setProperty("--_tab-count", `${t}`), this.#e.states.add("ready");
1522
1579
  }
1523
- }, R = class extends c {
1524
- static observedAttributes = ["value", "disabled"];
1580
+ }, z = class extends _ {
1581
+ static observedAttributes = ["disabled"];
1525
1582
  #e;
1526
1583
  #t;
1527
1584
  #n;
1528
1585
  constructor() {
1529
- super(), this.#e = this.attachInternals(), this.#e.role = "tab", this.#t = _(this, "disabled", { type: "boolean" });
1586
+ super(), this.#e = this.attachInternals(), this.#e.role = "tab", this.#t = y(this, "disabled", { type: "boolean" });
1530
1587
  }
1531
1588
  get value() {
1532
1589
  return this.getAttribute("value") ?? "";
@@ -1544,10 +1601,10 @@ var ee = class extends y(c) {
1544
1601
  return this.getAttribute("label") ?? this.textContent?.trim() ?? "";
1545
1602
  }
1546
1603
  attributeChangedCallback(e, t, n) {
1547
- t !== n && (v({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
1604
+ t !== n && (b({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
1548
1605
  }
1549
1606
  setup() {
1550
- super.setup(), this.#n = new f(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(g(this, this.#t.signal, this.#e)), this.addEventListener("ui-press", this.#r);
1607
+ super.setup(), this.#n = new s(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(v(this, this.#t.signal, this.#e)), this.addEventListener("ui-press", this.#r);
1551
1608
  }
1552
1609
  teardown() {
1553
1610
  this.removeEventListener("ui-press", this.#r), this.#n.destroy(), super.teardown();
@@ -1562,7 +1619,7 @@ var ee = class extends y(c) {
1562
1619
  }
1563
1620
  }));
1564
1621
  };
1565
- }, z = class extends c {
1622
+ }, B = class extends _ {
1566
1623
  static observedAttributes = ["value"];
1567
1624
  #e;
1568
1625
  constructor() {
@@ -1577,12 +1634,12 @@ var ee = class extends y(c) {
1577
1634
  attributeChangedCallback(e, t, n) {
1578
1635
  t !== n && super.attributeChangedCallback?.(e, t, n);
1579
1636
  }
1580
- }, B = class extends c {
1637
+ }, V = class extends _ {
1581
1638
  #e;
1582
1639
  constructor() {
1583
1640
  super(), this.#e = this.attachInternals(), this.#e.role = "presentation";
1584
1641
  }
1585
- }, V = class {
1642
+ }, H = class {
1586
1643
  sortColumn;
1587
1644
  sortDirection;
1588
1645
  selected;
@@ -1591,10 +1648,12 @@ var ee = class extends y(c) {
1591
1648
  this.sortColumn = t(e.sortColumn ?? null), this.sortDirection = t(e.sortDirection ?? "none"), this.selected = t(/* @__PURE__ */ new Set()), this.columnWidths = t([]);
1592
1649
  }
1593
1650
  toggleSort(e) {
1594
- if (this.sortColumn.value === e) {
1595
- let e = this.sortDirection.value;
1596
- this.sortDirection.value = e === "asc" ? "desc" : e === "desc" ? "none" : "asc", this.sortDirection.value === "none" && (this.sortColumn.value = null);
1597
- } else this.sortColumn.value = e, this.sortDirection.value = "asc";
1651
+ n(() => {
1652
+ if (this.sortColumn.value === e) {
1653
+ let e = this.sortDirection.value;
1654
+ this.sortDirection.value = e === "asc" ? "desc" : e === "desc" ? "none" : "asc", this.sortDirection.value === "none" && (this.sortColumn.value = null);
1655
+ } else this.sortColumn.value = e, this.sortDirection.value = "asc";
1656
+ });
1598
1657
  }
1599
1658
  select(e) {
1600
1659
  let t = new Set(this.selected.value);
@@ -1617,10 +1676,10 @@ var ee = class extends y(c) {
1617
1676
  return this.selected.value.has(e);
1618
1677
  }
1619
1678
  };
1620
- function H(e = {}) {
1621
- return new V(e);
1679
+ function U(e = {}) {
1680
+ return new H(e);
1622
1681
  }
1623
- var U = class {
1682
+ var W = class {
1624
1683
  table;
1625
1684
  #e = [];
1626
1685
  #t = -1;
@@ -1697,13 +1756,13 @@ var U = class {
1697
1756
  #m() {
1698
1757
  this.#i = !1, this.#t = -1, this.table.removeAttribute("resizing"), document.removeEventListener("pointermove", this.#u), document.removeEventListener("pointerup", this.#d), document.removeEventListener("pointercancel", this.#f), document.removeEventListener("keydown", this.#p);
1699
1758
  }
1700
- }, W = class {
1759
+ }, de = class {
1701
1760
  #e;
1702
1761
  #t;
1703
1762
  #n;
1704
1763
  #r = !1;
1705
1764
  constructor(e, t) {
1706
- this.#t = t, this.#n = e, this.#e = new u(e, {
1765
+ this.#t = t, this.#n = e, this.#e = new a(e, {
1707
1766
  selector: "ui-table-row:not([colspan])",
1708
1767
  axis: "vertical",
1709
1768
  mode: "slot"
@@ -1733,14 +1792,14 @@ var U = class {
1733
1792
  destroy() {
1734
1793
  this.#n.removeEventListener("ui-drag-start", this.#i), this.#n.removeEventListener("ui-drop", this.#a), this.#n.removeEventListener("click", this.#o, { capture: !0 }), this.#e.destroy();
1735
1794
  }
1736
- }, ue = class extends c {
1795
+ }, fe = class extends _ {
1737
1796
  static observedAttributes = [
1738
1797
  "selectable",
1739
1798
  "resizable",
1740
1799
  "reorderable"
1741
1800
  ];
1742
1801
  #e;
1743
- #t = new V();
1802
+ #t = new H();
1744
1803
  #n = null;
1745
1804
  #r = null;
1746
1805
  #i = null;
@@ -1759,6 +1818,19 @@ var U = class {
1759
1818
  set selectable(e) {
1760
1819
  this.toggleAttribute("selectable", e);
1761
1820
  }
1821
+ attributeChangedCallback(e, t, n) {
1822
+ if (t !== n) {
1823
+ switch (e) {
1824
+ case "resizable":
1825
+ n !== null && !this.#n ? this.#a() : n === null && this.#n && (this.#n.destroy(), this.#n = null);
1826
+ break;
1827
+ case "reorderable":
1828
+ n !== null && !this.#i ? this.#s() : n === null && this.#i && (this.#i.destroy(), this.#i = null);
1829
+ break;
1830
+ }
1831
+ super.attributeChangedCallback?.(e, t, n);
1832
+ }
1833
+ }
1762
1834
  setup() {
1763
1835
  super.setup(), this.addEventListener("ui-sort", this.#c), this.addEventListener("ui-row-select", this.#l), this.deferChildren(() => {
1764
1836
  this.addEffect(() => {
@@ -1785,7 +1857,7 @@ var U = class {
1785
1857
  let e = document.createElement("div");
1786
1858
  e.className = "table-resize-handle", e.setAttribute("aria-hidden", "true"), e.addEventListener("click", (e) => e.stopPropagation()), t.appendChild(e);
1787
1859
  }
1788
- this.#n = new U(this), this.#n.init();
1860
+ this.#n = new W(this), this.#n.init();
1789
1861
  }
1790
1862
  #o() {
1791
1863
  let e = this.querySelector(":scope > ui-table-head > ui-table-row");
@@ -1798,7 +1870,7 @@ var U = class {
1798
1870
  }
1799
1871
  #s() {
1800
1872
  let e = this.querySelector(":scope > ui-table-body");
1801
- e && (this.#i = new W(e, this));
1873
+ e && (this.#i = new de(e, this));
1802
1874
  }
1803
1875
  #c = (e) => {
1804
1876
  let t = e.detail;
@@ -1824,17 +1896,17 @@ var U = class {
1824
1896
  }
1825
1897
  }));
1826
1898
  };
1827
- }, de = class extends c {
1899
+ }, pe = class extends _ {
1828
1900
  #e;
1829
1901
  constructor() {
1830
1902
  super(), this.#e = this.attachInternals(), this.#e.role = "rowgroup";
1831
1903
  }
1832
- }, fe = class extends c {
1904
+ }, me = class extends _ {
1833
1905
  #e;
1834
1906
  constructor() {
1835
1907
  super(), this.#e = this.attachInternals(), this.#e.role = "rowgroup";
1836
1908
  }
1837
- }, pe = class extends c {
1909
+ }, he = class extends _ {
1838
1910
  static observedAttributes = ["value", "selected"];
1839
1911
  #e;
1840
1912
  constructor() {
@@ -1865,12 +1937,12 @@ var U = class {
1865
1937
  detail: { value: this.value }
1866
1938
  }));
1867
1939
  };
1868
- }, me = class extends c {
1940
+ }, ge = class extends _ {
1869
1941
  #e;
1870
1942
  constructor() {
1871
1943
  super(), this.#e = this.attachInternals(), this.#e.role = "cell";
1872
1944
  }
1873
- }, he = class extends c {
1945
+ }, _e = class extends _ {
1874
1946
  static observedAttributes = ["sort", "sortable"];
1875
1947
  #e;
1876
1948
  constructor() {
@@ -1888,6 +1960,16 @@ var U = class {
1888
1960
  set sort(e) {
1889
1961
  this.setAttribute("sort", e);
1890
1962
  }
1963
+ attributeChangedCallback(e, t, n) {
1964
+ if (t !== n) {
1965
+ switch (e) {
1966
+ case "sortable":
1967
+ n === null ? (this.removeAttribute("tabindex"), this.removeEventListener("click", this.#t), this.removeEventListener("keydown", this.#n)) : (this.setAttribute("tabindex", "0"), this.addEventListener("click", this.#t), this.addEventListener("keydown", this.#n));
1968
+ break;
1969
+ }
1970
+ super.attributeChangedCallback?.(e, t, n);
1971
+ }
1972
+ }
1891
1973
  setup() {
1892
1974
  super.setup(), this.sortable && (this.setAttribute("tabindex", "0"), this.addEventListener("click", this.#t), this.addEventListener("keydown", this.#n));
1893
1975
  }
@@ -1910,7 +1992,7 @@ function G(e) {
1910
1992
  let t = /* @__PURE__ */ new Date(e + "T00:00:00");
1911
1993
  return isNaN(t.getTime()) ? null : t;
1912
1994
  }
1913
- function ge(e) {
1995
+ function ve(e) {
1914
1996
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
1915
1997
  }
1916
1998
  function K(e, t) {
@@ -1959,13 +2041,19 @@ var q = class {
1959
2041
  this.value.value = e;
1960
2042
  }
1961
2043
  selectMonth(e) {
1962
- this.focusedMonth.value = e, this.view.value = "day";
2044
+ n(() => {
2045
+ this.focusedMonth.value = e, this.view.value = "day";
2046
+ });
1963
2047
  }
1964
2048
  selectYear(e) {
1965
- this.focusedYear.value = e, this.view.value = "month";
2049
+ n(() => {
2050
+ this.focusedYear.value = e, this.view.value = "month";
2051
+ });
1966
2052
  }
1967
2053
  setRange(e, t) {
1968
- this.rangeStart.value = e, this.rangeEnd.value = t;
2054
+ n(() => {
2055
+ this.rangeStart.value = e, this.rangeEnd.value = t;
2056
+ });
1969
2057
  }
1970
2058
  isDateDisabled(e) {
1971
2059
  let t = G(this.min.value), n = G(this.max.value), r = G(e);
@@ -1974,7 +2062,7 @@ var q = class {
1974
2062
  #e() {
1975
2063
  let e = this.focusedYear.value, t = this.focusedMonth.value, n = G(this.value.value), r = /* @__PURE__ */ new Date(), i = G(this.rangeStart.value), a = G(this.rangeEnd.value), o = new Date(e, t, 1).getDay(), s = new Date(e, t, 1 - o), c = [];
1976
2064
  for (let e = 0; e < 42; e++) {
1977
- let o = new Date(s.getFullYear(), s.getMonth(), s.getDate() + e), l = ge(o), u = o.getMonth() === t, d = K(o, r), f = n ? K(o, n) : !1, p = this.isDateDisabled(l), m = !1, h = !1, g = !1;
2065
+ let o = new Date(s.getFullYear(), s.getMonth(), s.getDate() + e), l = ve(o), u = o.getMonth() === t, d = K(o, r), f = n ? K(o, n) : !1, p = this.isDateDisabled(l), m = !1, h = !1, g = !1;
1978
2066
  if (i && a) {
1979
2067
  let e = i <= a ? i : a, t = i <= a ? a : i;
1980
2068
  m = o >= e && o <= t, h = K(o, e), g = K(o, t);
@@ -2050,7 +2138,7 @@ var q = class {
2050
2138
  }
2051
2139
  }
2052
2140
  };
2053
- function _e(e = {}) {
2141
+ function ye(e = {}) {
2054
2142
  return new q(e);
2055
2143
  }
2056
2144
  /**
@@ -2064,7 +2152,7 @@ function _e(e = {}) {
2064
2152
  * @fires ui-change - Fired on single date selection with `{ value }` detail
2065
2153
  * @fires ui-range-select - Fired on range commit with `{ start, end }` detail
2066
2154
  */
2067
- var ve = class extends y(c) {
2155
+ var be = class extends x(_) {
2068
2156
  static observedAttributes = [
2069
2157
  "value",
2070
2158
  "min",
@@ -2082,7 +2170,7 @@ var ve = class extends y(c) {
2082
2170
  #a = t(0);
2083
2171
  #o = "idle";
2084
2172
  constructor() {
2085
- super(), this.#e = this.attachInternals(), this.#e.role = "group", this.setAttribute("tabindex", "0");
2173
+ super(), this.#e = this.attachInternals(), this.#e.role = "group";
2086
2174
  }
2087
2175
  get store() {
2088
2176
  return this.#t;
@@ -2126,18 +2214,24 @@ var ve = class extends y(c) {
2126
2214
  case "required":
2127
2215
  this.#r.value = n !== null;
2128
2216
  break;
2217
+ case "range":
2218
+ this.#o = "idle", this.#t.setRange(null, null);
2219
+ break;
2220
+ case "name": break;
2129
2221
  }
2130
2222
  super.attributeChangedCallback?.(e, t, n);
2131
2223
  }
2132
2224
  }
2133
2225
  setup() {
2134
- super.setup(), this.#i = this.getAttribute("value");
2226
+ super.setup(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.#i = this.getAttribute("value");
2135
2227
  let e = this.getAttribute("value"), t = this.getAttribute("min"), r = this.getAttribute("max");
2136
2228
  n(() => {
2137
2229
  e && (this.#t.value.value = e), t && (this.#t.min.value = t), r && (this.#t.max.value = r);
2138
2230
  }), this.#s(), this.addEventListener("keydown", this.#b), this.addEffect(() => this.#c()), this.addEffect(() => {
2139
2231
  this.#e.setFormValue(this.#t.value.value);
2140
- }), this.addEffect(g(this, this.#n, this.#e, { manageTabindex: !0 })), this.#r.value = this.hasAttribute("required"), this.addEffect(() => {
2232
+ }), this.addEffect(() => {
2233
+ this.setAttribute("aria-label", this.#t.title.value);
2234
+ }), this.addEffect(v(this, this.#n, this.#e, { manageTabindex: !0 })), this.#r.value = this.hasAttribute("required"), this.addEffect(() => {
2141
2235
  let e = this.#t.value.value;
2142
2236
  this.#r.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select a date.", this) : this.#e.setValidity({});
2143
2237
  });
@@ -2153,6 +2247,9 @@ var ve = class extends y(c) {
2153
2247
  onFormReset() {
2154
2248
  this.#t.value.value = this.#i, this.#i ? this.setAttribute("value", this.#i) : this.removeAttribute("value");
2155
2249
  }
2250
+ onFormStateRestore(e) {
2251
+ typeof e == "string" && e && (this.value = e);
2252
+ }
2156
2253
  #s() {
2157
2254
  this.innerHTML = "\n <div class=\"cal-header\">\n <button type=\"button\" class=\"cal-prev\" aria-label=\"Previous\" tabindex=\"-1\"></button>\n <button type=\"button\" class=\"cal-title\" tabindex=\"-1\"></button>\n <button type=\"button\" class=\"cal-next\" aria-label=\"Next\" tabindex=\"-1\"></button>\n </div>\n <div class=\"cal-weekdays\"></div>\n <div class=\"cal-grid\" role=\"grid\"></div>\n ";
2158
2255
  let e = this.querySelector(".cal-prev"), t = this.querySelector(".cal-next"), n = this.querySelector(".cal-title");
@@ -2216,7 +2313,9 @@ var ve = class extends y(c) {
2216
2313
  n ? this.#v(n) : r === void 0 ? i !== void 0 && this.#t.selectYear(Number(i)) : this.#t.selectMonth(Number(r));
2217
2314
  }
2218
2315
  #v(e) {
2219
- if (this.range) if (this.#o === "idle") this.#t.selectDate(e), this.#t.setRange(e, null), this.setAttribute("value", e), this.#o = "selecting";
2316
+ if (this.range) if (this.#o === "idle") n(() => {
2317
+ this.#t.selectDate(e), this.#t.setRange(e, null);
2318
+ }), this.setAttribute("value", e), this.#o = "selecting";
2220
2319
  else if (this.#o === "selecting") {
2221
2320
  let t = this.#t.rangeStart.value;
2222
2321
  if (!t) return;
@@ -2228,7 +2327,9 @@ var ve = class extends y(c) {
2228
2327
  end: this.#t.rangeEnd.value
2229
2328
  }
2230
2329
  }));
2231
- } else this.#t.value.value = null, this.#t.setRange(null, null), this.removeAttribute("value"), this.#o = "idle";
2330
+ } else n(() => {
2331
+ this.#t.value.value = null, this.#t.setRange(null, null);
2332
+ }), this.removeAttribute("value"), this.#o = "idle";
2232
2333
  else this.#t.selectDate(e), this.setAttribute("value", e), this.dispatchEvent(new CustomEvent("ui-change", {
2233
2334
  bubbles: !0,
2234
2335
  composed: !0,
@@ -2305,7 +2406,7 @@ var ve = class extends y(c) {
2305
2406
  this.open.value = !1, this.value.value = null, this.label.value = "";
2306
2407
  });
2307
2408
  }
2308
- }, ye = class extends y(c) {
2409
+ }, xe = class extends x(_) {
2309
2410
  static observedAttributes = [
2310
2411
  "value",
2311
2412
  "disabled",
@@ -2327,6 +2428,8 @@ var ve = class extends y(c) {
2327
2428
  #l = null;
2328
2429
  #u = null;
2329
2430
  #d = null;
2431
+ #f = null;
2432
+ #p = "";
2330
2433
  constructor() {
2331
2434
  super(), this.#e = this.attachInternals();
2332
2435
  }
@@ -2380,13 +2483,13 @@ var ve = class extends y(c) {
2380
2483
  set placeholder(e) {
2381
2484
  this.#s.value = e, e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder");
2382
2485
  }
2383
- #f(e) {
2384
- return C(e, "ui-select");
2486
+ #m(e) {
2487
+ return w(e, "ui-select");
2385
2488
  }
2386
- async #p(e) {
2387
- this.#l = await w(e, this.#l, this.#a, "ui-select");
2489
+ async #h(e) {
2490
+ this.#l = await T(e, this.#l, this.#a, "ui-select");
2388
2491
  }
2389
- #m() {
2492
+ #g() {
2390
2493
  let e = document.createElement("ui-button");
2391
2494
  e.setAttribute("justify", "spread");
2392
2495
  let t = document.createElement("span");
@@ -2396,7 +2499,7 @@ var ve = class extends y(c) {
2396
2499
  let r = document.createElement("ui-listbox");
2397
2500
  r.setAttribute("popover", "manual"), this.appendChild(e), this.appendChild(r);
2398
2501
  }
2399
- #h(e) {
2502
+ #_(e) {
2400
2503
  let t = this.#u;
2401
2504
  if (t) {
2402
2505
  for (; t.firstChild;) t.removeChild(t.firstChild);
@@ -2409,6 +2512,12 @@ var ve = class extends y(c) {
2409
2512
  attributeChangedCallback(e, t, n) {
2410
2513
  if (t !== n) {
2411
2514
  switch (e) {
2515
+ case "value":
2516
+ if (n !== null) {
2517
+ let e = this.querySelector(`ui-option[value="${CSS.escape(n)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? n;
2518
+ this.#t.select(n, t);
2519
+ } else this.#t.reset();
2520
+ break;
2412
2521
  case "disabled":
2413
2522
  this.#n.value = n !== null;
2414
2523
  break;
@@ -2416,7 +2525,7 @@ var ve = class extends y(c) {
2416
2525
  this.#r.value = n !== null;
2417
2526
  break;
2418
2527
  case "options":
2419
- n ? this.#a.value = this.#f(n) : this.#a.value = [];
2528
+ n ? this.#a.value = this.#m(n) : this.#a.value = [];
2420
2529
  break;
2421
2530
  case "src":
2422
2531
  this.#o.value = n;
@@ -2429,59 +2538,59 @@ var ve = class extends y(c) {
2429
2538
  }
2430
2539
  }
2431
2540
  setup() {
2432
- if (super.setup(), this.#i = new p(this), this.#c = this.hasAttribute("options") || this.hasAttribute("src"), this.#c) {
2541
+ if (super.setup(), this.#i = new l(this), this.#c = this.hasAttribute("options") || this.hasAttribute("src"), this.#c) {
2433
2542
  let e = this.getAttribute("options");
2434
- e && (this.#a.value = this.#f(e)), this.#o.value = this.getAttribute("src"), this.#s.value = this.getAttribute("placeholder") ?? "", this.#m();
2543
+ e && (this.#a.value = this.#m(e)), this.#o.value = this.getAttribute("src"), this.#s.value = this.getAttribute("placeholder") ?? "", this.#g();
2435
2544
  }
2436
- let e = this.querySelector(":scope > ui-button");
2437
- this.#d = e;
2438
- let t = this.querySelector(":scope > ui-listbox[popover]");
2439
- this.#u = t, t?.setAttribute("popover", "manual"), e && t && this.#i.wirePopover(e, t), e?.setAttribute("aria-haspopup", "listbox"), this.deferChildren(() => {
2440
- let n = this.getAttribute("value");
2441
- if (n) {
2442
- let e = this.querySelector(`ui-option[value="${CSS.escape(n)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? n;
2443
- this.#t.value.value = n, this.#t.label.value = t;
2545
+ let t = this.querySelector(":scope > ui-button");
2546
+ this.#d = t;
2547
+ let n = this.querySelector(":scope > ui-listbox[popover]");
2548
+ this.#u = n, n?.setAttribute("popover", "manual"), t && n && this.#i.wirePopover(t, n), t?.setAttribute("aria-haspopup", "listbox"), t && n && (n.id ||= e("lb"), t.setAttribute("aria-controls", n.id)), this.#c && (this.addEffect(() => {
2549
+ let e = this.#a.value;
2550
+ this.#_(e);
2551
+ }), this.addEffect(() => {
2552
+ let e = this.#o.value;
2553
+ e && this.#h(e);
2554
+ }), this.addEffect(() => {
2555
+ let e = this.#s.value, n = this.#t.label.value, r = t?.querySelector("[slot=\"label\"]");
2556
+ r && !n && (r.textContent = e || "\xA0");
2557
+ })), this.deferChildren(() => {
2558
+ let e = this.getAttribute("value");
2559
+ if (e) {
2560
+ let t = this.querySelector(`ui-option[value="${CSS.escape(e)}"]`), n = t?.getAttribute("label") ?? t?.textContent?.trim() ?? e;
2561
+ this.#t.value.value = e, this.#t.label.value = n, this.#f = e, this.#p = n;
2444
2562
  }
2445
2563
  this.addEffect(() => {
2446
- let t = this.#t.label.value, n = e?.querySelector("[slot=\"label\"]");
2447
- n && (n.textContent = t || (this.#c ? this.#s.value || "\xA0" : n.textContent ?? ""));
2564
+ let e = this.#t.label.value, n = t?.querySelector("[slot=\"label\"]");
2565
+ n && (n.textContent = e || (this.#c ? this.#s.value || "\xA0" : n.textContent ?? ""));
2448
2566
  }), this.addEffect(() => {
2449
- let e = this.#t.value.value, n = t?.querySelectorAll("ui-option") ?? [];
2450
- for (let t of n) {
2451
- let n = t.getAttribute("value") === e;
2452
- t.setAttribute("aria-selected", String(n));
2567
+ let e = this.#t.value.value, t = n?.querySelectorAll("ui-option") ?? [];
2568
+ for (let n of t) {
2569
+ let t = n.getAttribute("value") === e;
2570
+ n.setAttribute("aria-selected", String(t));
2453
2571
  }
2454
- }), this.#c && (this.addEffect(() => {
2455
- let e = this.#a.value;
2456
- this.#h(e);
2457
- }), this.addEffect(() => {
2458
- let e = this.#o.value;
2459
- e && this.#p(e);
2460
- }), this.addEffect(() => {
2461
- let t = this.#s.value, n = this.#t.label.value, r = e?.querySelector("[slot=\"label\"]");
2462
- r && !n && (r.textContent = t || "\xA0");
2463
- }));
2464
- }), this.addEffect(g(this, this.#n, this.#e)), this.addEffect(() => {
2465
- let t = this.#n.value;
2466
- e && e.toggleAttribute("disabled", t), t && this.#t.open.value && this.#t.hide();
2572
+ });
2573
+ }), this.addEffect(v(this, this.#n, this.#e)), this.addEffect(() => {
2574
+ let e = this.#n.value;
2575
+ t && t.toggleAttribute("disabled", e), e && this.#t.open.peek() && this.#t.hide();
2467
2576
  }), this.#r.value = this.hasAttribute("required"), this.addEffect(() => {
2468
2577
  let e = this.#t.value.value;
2469
2578
  this.#r.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select an option.", this) : this.#e.setValidity({});
2470
2579
  }), this.addEffect(() => {
2471
- let t = this.#t.open.value;
2472
- this.#i.syncPopover(t), e?.setAttribute("aria-expanded", String(t));
2580
+ let e = this.#t.open.value;
2581
+ this.#i.syncPopover(e), t?.setAttribute("aria-expanded", String(e));
2473
2582
  }), this.addEffect(() => {
2474
2583
  let e = this.#t.value.value;
2475
2584
  this.#e.setFormValue(e ?? ""), e == null ? this.removeAttribute("value") : this.setAttribute("value", e);
2476
- }), e?.addEventListener("ui-press", this.#g), this.addEventListener("ui-change", this.#_), this.addEventListener("ui-select", this.#v), this.addEventListener("ui-dismiss", this.#y), e?.addEventListener("keydown", this.#b);
2585
+ }), t?.addEventListener("ui-press", this.#v), this.addEventListener("ui-change", this.#y), this.addEventListener("ui-select", this.#b), this.addEventListener("ui-dismiss", this.#x), t?.addEventListener("keydown", this.#S);
2477
2586
  }
2478
- #g = () => {
2587
+ #v = () => {
2479
2588
  this.#n.value || this.#t.toggle();
2480
2589
  };
2481
- #_ = (e) => {
2590
+ #y = (e) => {
2482
2591
  e.target !== this && e.stopImmediatePropagation();
2483
2592
  };
2484
- #v = (e) => {
2593
+ #b = (e) => {
2485
2594
  let t = e.detail;
2486
2595
  this.#t.select(t.value, t.label), this.dispatchEvent(new CustomEvent("ui-change", {
2487
2596
  bubbles: !0,
@@ -2489,10 +2598,10 @@ var ve = class extends y(c) {
2489
2598
  detail: t
2490
2599
  }));
2491
2600
  };
2492
- #y = () => {
2601
+ #x = () => {
2493
2602
  this.#t.hide();
2494
2603
  };
2495
- #b = (e) => {
2604
+ #S = (e) => {
2496
2605
  if (this.#n.value) return;
2497
2606
  let t = this.#u;
2498
2607
  switch (e.key) {
@@ -2501,7 +2610,7 @@ var ve = class extends y(c) {
2501
2610
  e.preventDefault();
2502
2611
  let n = t?.controller;
2503
2612
  if (this.#t.open.value || this.#t.show(), n) {
2504
- let r = t?.querySelectorAll(":scope > ui-option:not([disabled])")?.length ?? 0;
2613
+ let r = t?.querySelectorAll(":scope ui-option:not([disabled])")?.length ?? 0;
2505
2614
  n.moveActive(e.key === "ArrowDown" ? 1 : -1, r);
2506
2615
  }
2507
2616
  break;
@@ -2526,7 +2635,7 @@ var ve = class extends y(c) {
2526
2635
  e.preventDefault();
2527
2636
  let n = t?.controller;
2528
2637
  if (n) {
2529
- let e = t?.querySelectorAll(":scope > ui-option:not([disabled])");
2638
+ let e = t?.querySelectorAll(":scope ui-option:not([disabled])");
2530
2639
  n.activeIndex.value = Math.max(0, (e?.length ?? 1) - 1);
2531
2640
  }
2532
2641
  break;
@@ -2534,15 +2643,18 @@ var ve = class extends y(c) {
2534
2643
  }
2535
2644
  };
2536
2645
  teardown() {
2537
- this.#d?.removeEventListener("ui-press", this.#g), this.#d?.removeEventListener("keydown", this.#b), this.removeEventListener("ui-change", this.#_), this.removeEventListener("ui-select", this.#v), this.removeEventListener("ui-dismiss", this.#y), this.#d = null, this.#l?.abort(), this.#l = null, this.#u = null, this.#i.destroy(), super.teardown();
2646
+ this.#d?.removeEventListener("ui-press", this.#v), this.#d?.removeEventListener("keydown", this.#S), this.removeEventListener("ui-change", this.#y), this.removeEventListener("ui-select", this.#b), this.removeEventListener("ui-dismiss", this.#x), this.#d = null, this.#l?.abort(), this.#l = null, this.#u = null, this.#i.destroy(), super.teardown();
2538
2647
  }
2539
2648
  onFormReset() {
2540
- this.#t.reset();
2649
+ this.#f === null ? this.#t.reset() : this.#t.select(this.#f, this.#p);
2650
+ }
2651
+ onFormStateRestore(e) {
2652
+ typeof e == "string" && e && (this.value = e);
2541
2653
  }
2542
2654
  onFormDisabled(e) {
2543
2655
  this.#n.value = e;
2544
2656
  }
2545
- }, be = class extends y(c) {
2657
+ }, Se = class extends x(_) {
2546
2658
  static observedAttributes = [
2547
2659
  "value",
2548
2660
  "disabled",
@@ -2553,7 +2665,7 @@ var ve = class extends y(c) {
2553
2665
  "required"
2554
2666
  ];
2555
2667
  #e;
2556
- #t = new x();
2668
+ #t = new C();
2557
2669
  #n = t(!1);
2558
2670
  #r = t(!1);
2559
2671
  #i = t(!1);
@@ -2566,6 +2678,8 @@ var ve = class extends y(c) {
2566
2678
  #d = !1;
2567
2679
  #f = null;
2568
2680
  #p = null;
2681
+ #m = null;
2682
+ #h = "";
2569
2683
  constructor() {
2570
2684
  super(), this.#e = this.attachInternals();
2571
2685
  }
@@ -2620,13 +2734,13 @@ var ve = class extends y(c) {
2620
2734
  set placeholder(e) {
2621
2735
  this.#u.value = e, e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder");
2622
2736
  }
2623
- #m(e) {
2624
- return C(e, "ui-combobox");
2737
+ #g(e) {
2738
+ return w(e, "ui-combobox");
2625
2739
  }
2626
- async #h(e) {
2627
- this.#f = await w(e, this.#f, this.#c, "ui-combobox");
2740
+ async #_(e) {
2741
+ this.#f = await T(e, this.#f, this.#c, "ui-combobox");
2628
2742
  }
2629
- #g() {
2743
+ #v() {
2630
2744
  let e = document.createElement("ui-input"), t = this.#u.value;
2631
2745
  t && e.setAttribute("placeholder", t);
2632
2746
  let n = this.getAttribute("size");
@@ -2634,7 +2748,7 @@ var ve = class extends y(c) {
2634
2748
  let r = document.createElement("ui-listbox");
2635
2749
  r.setAttribute("popover", "manual"), this.appendChild(e), this.appendChild(r);
2636
2750
  }
2637
- #_(e) {
2751
+ #y(e) {
2638
2752
  let t = this.#p;
2639
2753
  if (t) {
2640
2754
  for (; t.firstChild;) t.removeChild(t.firstChild);
@@ -2645,37 +2759,54 @@ var ve = class extends y(c) {
2645
2759
  this.#t.data.value = e;
2646
2760
  }
2647
2761
  }
2648
- attributeChangedCallback(e, t, n) {
2649
- if (t !== n) {
2762
+ attributeChangedCallback(e, t, r) {
2763
+ if (t !== r) {
2650
2764
  switch (e) {
2765
+ case "value":
2766
+ if (r !== null) {
2767
+ let e = this.querySelector(`ui-option[value="${CSS.escape(r)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? r;
2768
+ this.#t.select(r), this.#t.query.value = t, this.#s && "value" in this.#s && (this.#s.value = t);
2769
+ } else n(() => {
2770
+ this.#t.clearSelection(), this.#t.query.value = "";
2771
+ }), this.#s && "value" in this.#s && (this.#s.value = "");
2772
+ break;
2651
2773
  case "disabled":
2652
- this.#r.value = n !== null;
2774
+ this.#r.value = r !== null;
2653
2775
  break;
2654
2776
  case "required":
2655
- this.#i.value = n !== null;
2777
+ this.#i.value = r !== null;
2656
2778
  break;
2657
2779
  case "options":
2658
- n ? this.#c.value = this.#m(n) : this.#c.value = [];
2780
+ r ? this.#c.value = this.#g(r) : this.#c.value = [];
2659
2781
  break;
2660
2782
  case "src":
2661
- this.#l.value = n;
2783
+ this.#l.value = r;
2662
2784
  break;
2663
2785
  case "placeholder":
2664
- this.#u.value = n ?? "";
2786
+ this.#u.value = r ?? "";
2665
2787
  break;
2666
2788
  }
2667
- super.attributeChangedCallback?.(e, t, n);
2789
+ super.attributeChangedCallback?.(e, t, r);
2668
2790
  }
2669
2791
  }
2670
2792
  setup() {
2671
- if (super.setup(), this.#a = new p(this), this.#d = this.hasAttribute("options") || this.hasAttribute("src"), this.#d) {
2793
+ if (super.setup(), this.#a = new l(this), this.#d = this.hasAttribute("options") || this.hasAttribute("src"), this.#d) {
2672
2794
  let e = this.getAttribute("options");
2673
- e && (this.#c.value = this.#m(e)), this.#l.value = this.getAttribute("src"), this.#u.value = this.getAttribute("placeholder") ?? "", this.#g();
2795
+ e && (this.#c.value = this.#g(e)), this.#l.value = this.getAttribute("src"), this.#u.value = this.getAttribute("placeholder") ?? "", this.#v();
2674
2796
  }
2675
2797
  let t = this.querySelector(":scope > ui-input");
2676
2798
  this.#s = t;
2677
2799
  let n = this.querySelector(":scope > ui-listbox[popover]");
2678
- this.#p = n, n?.setAttribute("popover", "manual"), n?.setAttribute("virtual-focus", ""), t && n && (this.#a.wirePopover(t, n), n.id ||= this.#o), t?.setAttribute("role", "combobox"), t?.setAttribute("aria-autocomplete", "list"), t?.setAttribute("aria-controls", n?.id ?? ""), t?.setAttribute("aria-expanded", "false"), this.deferChildren(() => {
2800
+ this.#p = n, n?.setAttribute("popover", "manual"), n?.setAttribute("virtual-focus", ""), t && n && (this.#a.wirePopover(t, n), n.id ||= this.#o), t?.setAttribute("role", "combobox"), t?.setAttribute("aria-autocomplete", "list"), t?.setAttribute("aria-controls", n?.id ?? ""), t?.setAttribute("aria-expanded", "false"), this.#d && (this.addEffect(() => {
2801
+ let e = this.#c.value;
2802
+ this.#y(e);
2803
+ }), this.addEffect(() => {
2804
+ let e = this.#l.value;
2805
+ e && this.#_(e);
2806
+ }), this.addEffect(() => {
2807
+ let e = this.#u.value;
2808
+ t && (e ? t.setAttribute("placeholder", e) : t.removeAttribute("placeholder"));
2809
+ })), this.deferChildren(() => {
2679
2810
  if (!this.#d) {
2680
2811
  let e = n?.querySelectorAll("ui-option") ?? [];
2681
2812
  this.#t.data.value = [...e].map((e) => ({
@@ -2686,7 +2817,7 @@ var ve = class extends y(c) {
2686
2817
  let r = this.getAttribute("value");
2687
2818
  if (r) {
2688
2819
  let e = this.querySelector(`ui-option[value="${CSS.escape(r)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? r;
2689
- this.#t.value.value = r, this.#t.query.value = t;
2820
+ this.#t.value.value = r, this.#t.query.value = t, this.#m = r, this.#h = t;
2690
2821
  }
2691
2822
  this.addEffect(() => {
2692
2823
  let e = this.#t.view.value, t = new Set(e.map((e) => e.value)), r = n?.querySelectorAll("ui-option") ?? [];
@@ -2703,19 +2834,10 @@ var ve = class extends y(c) {
2703
2834
  let t = n.getAttribute("value") === e;
2704
2835
  n.setAttribute("aria-selected", String(t));
2705
2836
  }
2706
- }), this.#d && (this.addEffect(() => {
2707
- let e = this.#c.value;
2708
- this.#_(e);
2709
- }), this.addEffect(() => {
2710
- let e = this.#l.value;
2711
- e && this.#h(e);
2712
- }), this.addEffect(() => {
2713
- let e = this.#u.value;
2714
- t && (e ? t.setAttribute("placeholder", e) : t.removeAttribute("placeholder"));
2715
- }));
2716
- }), this.addEffect(g(this, this.#r, this.#e)), this.addEffect(() => {
2837
+ });
2838
+ }), this.addEffect(v(this, this.#r, this.#e)), this.addEffect(() => {
2717
2839
  let e = this.#r.value;
2718
- t && t.toggleAttribute("disabled", e), e && this.#n.value && (this.#n.value = !1);
2840
+ t && t.toggleAttribute("disabled", e), e && this.#n.peek() && (this.#n.value = !1);
2719
2841
  }), this.#i.value = this.hasAttribute("required"), this.addEffect(() => {
2720
2842
  let e = this.#t.value.value;
2721
2843
  this.#i.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select an option.", this) : this.#e.setValidity({});
@@ -2725,18 +2847,18 @@ var ve = class extends y(c) {
2725
2847
  }), this.addEffect(() => {
2726
2848
  let e = this.#t.value.value;
2727
2849
  this.#e.setFormValue(e ?? ""), e == null ? this.removeAttribute("value") : this.setAttribute("value", e);
2728
- }), t?.addEventListener("focus", this.#v), this.addEventListener("ui-input", this.#y), this.addEventListener("ui-change", this.#b), this.addEventListener("ui-select", this.#x), this.addEventListener("ui-dismiss", this.#S), t?.addEventListener("keydown", this.#C);
2850
+ }), t?.addEventListener("focus", this.#b), this.addEventListener("ui-input", this.#x), this.addEventListener("ui-change", this.#S), this.addEventListener("ui-select", this.#C), this.addEventListener("ui-dismiss", this.#w), t?.addEventListener("keydown", this.#T);
2729
2851
  }
2730
- #v = () => {
2852
+ #b = () => {
2731
2853
  !this.#r.value && !this.#n.value && (this.#n.value = !0);
2732
2854
  };
2733
- #y = (e) => {
2855
+ #x = (e) => {
2734
2856
  this.#t.setQuery(e.detail.value), this.#n.value = !0;
2735
2857
  };
2736
- #b = (e) => {
2858
+ #S = (e) => {
2737
2859
  e.target !== this && e.stopImmediatePropagation();
2738
2860
  };
2739
- #x = (e) => {
2861
+ #C = (e) => {
2740
2862
  let t = e.detail;
2741
2863
  n(() => {
2742
2864
  this.#t.select(t.value), this.#t.query.value = t.label, this.#t.activeIndex.value = -1, this.#n.value = !1;
@@ -2748,10 +2870,10 @@ var ve = class extends y(c) {
2748
2870
  detail: t
2749
2871
  }));
2750
2872
  };
2751
- #S = () => {
2873
+ #w = () => {
2752
2874
  this.#n.value = !1;
2753
2875
  };
2754
- #C = (e) => {
2876
+ #T = (e) => {
2755
2877
  if (this.#r.value) return;
2756
2878
  let t = this.#s;
2757
2879
  switch (e.key) {
@@ -2784,19 +2906,22 @@ var ve = class extends y(c) {
2784
2906
  }
2785
2907
  };
2786
2908
  teardown() {
2787
- this.#s?.removeEventListener("focus", this.#v), this.#s?.removeEventListener("keydown", this.#C), this.removeEventListener("ui-input", this.#y), this.removeEventListener("ui-change", this.#b), this.removeEventListener("ui-select", this.#x), this.removeEventListener("ui-dismiss", this.#S), this.#s = null, this.#p = null, this.#f?.abort(), this.#f = null, this.#a.destroy(), super.teardown();
2909
+ this.#s?.removeEventListener("focus", this.#b), this.#s?.removeEventListener("keydown", this.#T), this.removeEventListener("ui-input", this.#x), this.removeEventListener("ui-change", this.#S), this.removeEventListener("ui-select", this.#C), this.removeEventListener("ui-dismiss", this.#w), this.#s = null, this.#p = null, this.#f?.abort(), this.#f = null, this.#a.destroy(), super.teardown();
2788
2910
  }
2789
2911
  onFormReset() {
2790
2912
  n(() => {
2791
- this.#t.clearSelection(), this.#t.query.value = "", this.#t.activeIndex.value = -1, this.#n.value = !1;
2913
+ this.#m === null ? (this.#t.clearSelection(), this.#t.query.value = "") : (this.#t.select(this.#m), this.#t.query.value = this.#h), this.#t.activeIndex.value = -1, this.#n.value = !1;
2792
2914
  });
2793
2915
  let e = this.querySelector(":scope > ui-input");
2794
- e && (e.value = "");
2916
+ e && (e.value = this.#h);
2917
+ }
2918
+ onFormStateRestore(e) {
2919
+ typeof e == "string" && e && (this.value = e);
2795
2920
  }
2796
2921
  onFormDisabled(e) {
2797
2922
  this.#r.value = e;
2798
2923
  }
2799
- }, xe = class extends c {
2924
+ }, Ce = class extends _ {
2800
2925
  static observedAttributes = ["disabled", "required"];
2801
2926
  #e = e("field-label");
2802
2927
  #t = e("field-desc");
@@ -2836,13 +2961,12 @@ var ve = class extends y(c) {
2836
2961
  }
2837
2962
  #o() {
2838
2963
  if (!this.#r) return;
2839
- let e = this.querySelector("[slot=\"label\"]"), t = this.querySelector("[slot=\"description\"]"), n = this.querySelector("[slot=\"error\"]");
2840
- e && this.#r.setAttribute("aria-labelledby", e.id);
2841
- let r = [];
2842
- t && r.push(t.id), n && r.push(n.id), r.length && this.#r.setAttribute("aria-describedby", r.join(" "));
2964
+ let e = this.querySelector("[slot=\"label\"]"), t = this.querySelector("[slot=\"description\"]");
2965
+ e && this.#r.setAttribute("aria-labelledby", e.id), t && this.#r.setAttribute("aria-describedby", t.id);
2843
2966
  }
2844
2967
  #s() {
2845
- this.#r && (this.hasAttribute("disabled") ? this.#r.setAttribute("disabled", "") : this.#r.removeAttribute("disabled"));
2968
+ let e = this.hasAttribute("disabled");
2969
+ e ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"), this.#r && (e ? this.#r.setAttribute("disabled", "") : this.#r.removeAttribute("disabled"));
2846
2970
  }
2847
2971
  #c() {
2848
2972
  this.#r && (this.hasAttribute("required") ? this.#r.setAttribute("required", "") : this.#r.removeAttribute("required"));
@@ -2851,36 +2975,44 @@ var ve = class extends y(c) {
2851
2975
  let t = e;
2852
2976
  this.setAttribute("invalid", "");
2853
2977
  let n = this.querySelector("[slot=\"error\"]");
2854
- n && t.detail?.message && (n.textContent = t.detail.message);
2978
+ n && t.detail?.message && (n.textContent = t.detail.message), this.#d(!0);
2855
2979
  };
2856
2980
  #u = () => {
2857
- this.removeAttribute("invalid");
2981
+ this.removeAttribute("invalid"), this.#d(!1);
2858
2982
  };
2859
- }, Se = class extends y(c) {
2983
+ #d(e) {
2984
+ if (!this.#r) return;
2985
+ let t = this.querySelector("[slot=\"description\"]"), n = this.querySelector("[slot=\"error\"]"), r = [];
2986
+ t && r.push(t.id), e && n && r.push(n.id), r.length ? this.#r.setAttribute("aria-describedby", r.join(" ")) : this.#r.removeAttribute("aria-describedby");
2987
+ }
2988
+ }, we = class extends x(_) {
2860
2989
  static observedAttributes = [
2861
2990
  "value",
2862
2991
  "placeholder",
2863
2992
  "disabled",
2864
2993
  "readonly",
2865
2994
  "required",
2866
- "name",
2867
2995
  "rows",
2868
2996
  "maxlength",
2869
- "autogrow"
2997
+ "autogrow",
2998
+ "pattern"
2870
2999
  ];
2871
3000
  #e;
2872
3001
  #t = t(!1);
2873
3002
  #n = t(!1);
2874
- #r = t("");
2875
- #i = 0;
3003
+ #r = t(NaN);
3004
+ #i = t("");
3005
+ #a = "";
3006
+ #o = 0;
3007
+ #s = null;
2876
3008
  constructor() {
2877
- super(), this.#e = this.attachInternals(), this.#e.role = "textbox", this.#e.ariaMultiLine = "true", this.setAttribute("aria-multiline", "true");
3009
+ super(), this.#e = this.attachInternals(), this.#e.role = "textbox", this.#e.ariaMultiLine = "true";
2878
3010
  }
2879
3011
  get value() {
2880
3012
  return this.textContent ?? "";
2881
3013
  }
2882
3014
  set value(e) {
2883
- this.textContent = e, this.#r.value = e, this.#e.setFormValue(e), this.#a(), this.#o();
3015
+ this.textContent = e, this.#i.value = e, this.#e.setFormValue(e), this.#c(), this.#l();
2884
3016
  }
2885
3017
  get placeholder() {
2886
3018
  return this.getAttribute("placeholder") ?? "";
@@ -2916,7 +3048,7 @@ var ve = class extends y(c) {
2916
3048
  if (t !== n) {
2917
3049
  switch (e) {
2918
3050
  case "value":
2919
- this.textContent = n ?? "", this.#r.value = n ?? "", this.#e.setFormValue(n ?? ""), this.#a(), this.#o();
3051
+ this.textContent = n ?? "", this.#i.value = n ?? "", this.#e.setFormValue(n ?? ""), this.#c(), this.#l();
2920
3052
  break;
2921
3053
  case "disabled":
2922
3054
  this.#t.value = n !== null, this.setAttribute("contenteditable", n !== null || this.hasAttribute("readonly") ? "false" : "plaintext-only");
@@ -2927,103 +3059,108 @@ var ve = class extends y(c) {
2927
3059
  case "required":
2928
3060
  this.#n.value = n !== null;
2929
3061
  break;
3062
+ case "maxlength":
3063
+ this.#r.value = n === null ? NaN : parseInt(n, 10);
3064
+ break;
2930
3065
  case "autogrow":
2931
- this.#o();
3066
+ this.#l();
3067
+ break;
3068
+ case "pattern":
3069
+ this.#s = n;
2932
3070
  break;
2933
3071
  }
2934
3072
  super.attributeChangedCallback?.(e, t, n);
2935
3073
  }
2936
3074
  }
2937
3075
  setup() {
2938
- super.setup(), this.hasAttribute("contenteditable") || this.setAttribute("contenteditable", "plaintext-only"), this.#n.value = this.hasAttribute("required"), this.#r.value = this.textContent ?? "", this.#a(), this.#o(), this.addEffect(g(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
2939
- this.#n.value && this.#r.value === "" ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : this.#e.setValidity({});
2940
- }), this.addEventListener("input", this.#s), this.addEventListener("blur", this.#c);
3076
+ super.setup(), this.setAttribute("aria-multiline", "true"), this.hasAttribute("contenteditable") || this.setAttribute("contenteditable", "plaintext-only"), this.#n.value = this.hasAttribute("required");
3077
+ let e = this.getAttribute("maxlength");
3078
+ this.#r.value = e === null ? NaN : parseInt(e, 10), this.#s = this.getAttribute("pattern"), this.#a = this.getAttribute("value") ?? this.textContent ?? "", this.#i.value = this.textContent ?? "", this.#c(), this.#l(), this.addEffect(v(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
3079
+ let e = this.#i.value, t = this.#r.value;
3080
+ this.#n.value && e === "" ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : !isNaN(t) && e.length > t ? this.#e.setValidity({ tooLong: !0 }, `Please shorten this text to ${t} characters or less.`, this) : this.#s !== null && e !== "" && !RegExp(`^(?:${this.#s})$`).test(e) ? this.#e.setValidity({ patternMismatch: !0 }, "Please match the requested format.", this) : this.#e.setValidity({});
3081
+ }), this.addEventListener("input", this.#u), this.addEventListener("blur", this.#d);
2941
3082
  }
2942
3083
  teardown() {
2943
- cancelAnimationFrame(this.#i), this.removeEventListener("input", this.#s), this.removeEventListener("blur", this.#c), super.teardown();
3084
+ cancelAnimationFrame(this.#o), this.removeEventListener("input", this.#u), this.removeEventListener("blur", this.#d), super.teardown();
2944
3085
  }
2945
3086
  onFormDisabled(e) {
2946
3087
  this.#t.value = e, this.setAttribute("contenteditable", e || this.hasAttribute("readonly") ? "false" : "plaintext-only");
2947
3088
  }
2948
3089
  onFormReset() {
2949
- this.textContent = "", this.#r.value = "", this.#e.setFormValue(""), this.#a(), this.#t.value = this.hasAttribute("disabled");
3090
+ this.textContent = this.#a, this.#i.value = this.#a, this.#e.setFormValue(this.#a), this.#c(), this.#l(), this.#t.value = this.hasAttribute("disabled"), this.setAttribute("contenteditable", this.#t.value || this.hasAttribute("readonly") ? "false" : "plaintext-only");
2950
3091
  }
2951
- #a() {
3092
+ onFormStateRestore(e) {
3093
+ this.value = typeof e == "string" ? e : "";
3094
+ }
3095
+ #c() {
2952
3096
  (this.textContent ?? "").trim() === "" ? this.#e.states.add("empty") : this.#e.states.delete("empty");
2953
3097
  }
2954
- #o() {
2955
- !this.hasAttribute("autogrow") || !this.isConnected || (this.style.setProperty("--_autogrow-height", "auto"), cancelAnimationFrame(this.#i), this.#i = requestAnimationFrame(() => {
3098
+ #l() {
3099
+ !this.hasAttribute("autogrow") || !this.isConnected || (this.style.setProperty("--_autogrow-height", "auto"), cancelAnimationFrame(this.#o), this.#o = requestAnimationFrame(() => {
2956
3100
  this.style.setProperty("--_autogrow-height", `${this.scrollHeight}px`);
2957
3101
  }));
2958
3102
  }
2959
- #s = () => {
2960
- let e = this.textContent ?? "", t = this.getAttribute("maxlength");
2961
- if (t !== null) {
2962
- let n = parseInt(t, 10);
2963
- if (!isNaN(n) && e.length > n) {
2964
- this.textContent = e.slice(0, n);
2965
- let t = window.getSelection();
2966
- t && (t.selectAllChildren(this), t.collapseToEnd());
2967
- }
2968
- }
2969
- let n = this.textContent ?? "";
2970
- this.#r.value = n, this.#e.setFormValue(n), this.#a(), this.#o(), this.dispatchEvent(new CustomEvent("ui-input", {
3103
+ #u = () => {
3104
+ let e = this.textContent ?? "";
3105
+ this.#i.value = e, this.#e.setFormValue(e), this.#c(), this.#l(), this.dispatchEvent(new CustomEvent("ui-input", {
2971
3106
  bubbles: !0,
2972
3107
  composed: !0,
2973
- detail: { value: n }
3108
+ detail: { value: e }
2974
3109
  }));
2975
3110
  };
2976
- #c = () => {
3111
+ #d = () => {
2977
3112
  this.dispatchEvent(new CustomEvent("ui-change", {
2978
3113
  bubbles: !0,
2979
3114
  composed: !0,
2980
3115
  detail: { value: this.textContent ?? "" }
2981
3116
  }));
2982
3117
  };
2983
- }, Ce = class extends y(c) {
3118
+ }, Te = class extends x(_) {
2984
3119
  static observedAttributes = [
2985
3120
  "value",
2986
3121
  "min",
2987
3122
  "max",
2988
3123
  "step",
2989
3124
  "disabled",
2990
- "name"
3125
+ "name",
3126
+ "required"
2991
3127
  ];
2992
3128
  #e;
2993
3129
  #t = t(!1);
2994
- #n = t(50);
2995
- #r = 50;
2996
- #i = t(0);
2997
- #a = t(100);
2998
- #o = t(1);
2999
- #s = null;
3000
- #c = !1;
3130
+ #n = t(!1);
3131
+ #r = t(50);
3132
+ #i = 50;
3133
+ #a = t(0);
3134
+ #o = t(100);
3135
+ #s = t(1);
3136
+ #c = null;
3137
+ #l = !1;
3001
3138
  constructor() {
3002
3139
  super(), this.#e = this.attachInternals(), this.#e.role = "slider";
3003
3140
  }
3004
3141
  get value() {
3005
- return this.#n.value;
3142
+ return this.#r.value;
3006
3143
  }
3007
3144
  set value(e) {
3008
- this.#n.value = this.#l(e), this.#d();
3145
+ this.#r.value = this.#u(e);
3009
3146
  }
3010
3147
  get min() {
3011
- return this.#i.value;
3148
+ return this.#a.value;
3012
3149
  }
3013
3150
  set min(e) {
3014
- this.#i.value = e;
3151
+ this.#a.value = e, this.setAttribute("min", String(e));
3015
3152
  }
3016
3153
  get max() {
3017
- return this.#a.value;
3154
+ return this.#o.value;
3018
3155
  }
3019
3156
  set max(e) {
3020
- this.#a.value = e;
3157
+ this.#o.value = e, this.setAttribute("max", String(e));
3021
3158
  }
3022
3159
  get step() {
3023
- return this.#o.value;
3160
+ return this.#s.value;
3024
3161
  }
3025
3162
  set step(e) {
3026
- this.#o.value = e;
3163
+ this.#s.value = e, this.setAttribute("step", String(e));
3027
3164
  }
3028
3165
  get disabled() {
3029
3166
  return this.#t.value;
@@ -3031,6 +3168,12 @@ var ve = class extends y(c) {
3031
3168
  set disabled(e) {
3032
3169
  this.#t.value = e, this.toggleAttribute("disabled", e);
3033
3170
  }
3171
+ get required() {
3172
+ return this.#n.value;
3173
+ }
3174
+ set required(e) {
3175
+ this.#n.value = e, this.toggleAttribute("required", e);
3176
+ }
3034
3177
  get name() {
3035
3178
  return this.getAttribute("name") ?? "";
3036
3179
  }
@@ -3041,76 +3184,82 @@ var ve = class extends y(c) {
3041
3184
  if (t !== n) {
3042
3185
  switch (e) {
3043
3186
  case "value":
3044
- this.#n.value = this.#l(parseFloat(n ?? "50") || 50);
3187
+ this.#r.value = this.#u(parseFloat(n ?? "50") || 50);
3045
3188
  break;
3046
3189
  case "min":
3047
- this.#i.value = parseFloat(n ?? "0") || 0;
3190
+ this.#a.value = parseFloat(n ?? "0") || 0;
3048
3191
  break;
3049
3192
  case "max":
3050
- this.#a.value = parseFloat(n ?? "100") || 100;
3193
+ this.#o.value = parseFloat(n ?? "100") || 100;
3051
3194
  break;
3052
3195
  case "step":
3053
- this.#o.value = parseFloat(n ?? "1") || 1;
3196
+ this.#s.value = parseFloat(n ?? "1") || 1;
3054
3197
  break;
3055
3198
  case "disabled":
3056
3199
  this.#t.value = n !== null;
3057
3200
  break;
3201
+ case "required":
3202
+ this.#n.value = n !== null;
3203
+ break;
3058
3204
  }
3059
3205
  super.attributeChangedCallback(e, t, n);
3060
3206
  }
3061
3207
  }
3062
3208
  setup() {
3063
- super.setup(), this.#r = this.#n.value, this.#s = document.createElement("div"), this.#s.classList.add("ui-range-thumb"), this.appendChild(this.#s), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(g(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
3064
- let e = this.#u();
3065
- this.style.setProperty("--_progress", String(e)), this.#e.ariaValueNow = String(this.#n.value), this.#e.ariaValueMin = String(this.#i.value), this.#e.ariaValueMax = String(this.#a.value);
3066
- }), this.#d(), this.addEventListener("pointerdown", this.#p), this.addEventListener("keydown", this.#_);
3209
+ super.setup(), this.#i = this.#r.value, this.#c = document.createElement("div"), this.#c.classList.add("ui-range-thumb"), this.appendChild(this.#c), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(v(this, this.#t, this.#e, { manageTabindex: !0 })), this.#n.value = this.hasAttribute("required"), this.addEffect(() => {
3210
+ let e = this.#r.value, t = this.#d();
3211
+ this.style.setProperty("--_progress", String(t)), this.setAttribute("aria-valuenow", String(e)), this.setAttribute("aria-valuemin", String(this.#a.value)), this.setAttribute("aria-valuemax", String(this.#o.value)), this.#e.setFormValue(String(e));
3212
+ }), this.addEventListener("pointerdown", this.#p), this.addEventListener("keydown", this.#_);
3067
3213
  }
3068
3214
  teardown() {
3069
- this.removeEventListener("pointerdown", this.#p), this.removeEventListener("keydown", this.#_), this.#s &&= (this.#s.remove(), null), super.teardown();
3215
+ this.removeEventListener("pointerdown", this.#p), this.removeEventListener("keydown", this.#_), this.#c &&= (this.#c.remove(), null), super.teardown();
3070
3216
  }
3071
3217
  onFormDisabled(e) {
3072
3218
  this.#t.value = e;
3073
3219
  }
3074
3220
  onFormReset() {
3075
- this.#n.value = this.#r, this.#d();
3221
+ this.#r.value = this.#i;
3076
3222
  }
3077
- #l(e) {
3078
- let t = this.#i.value, n = this.#a.value, r = this.#o.value, i = Math.round((e - t) / r) * r + t;
3079
- return Math.min(n, Math.max(t, i));
3223
+ onFormStateRestore(e) {
3224
+ if (typeof e == "string") {
3225
+ let t = parseFloat(e);
3226
+ isNaN(t) || (this.value = t);
3227
+ }
3080
3228
  }
3081
- #u() {
3082
- let e = this.#a.value - this.#i.value;
3083
- return e === 0 ? 0 : (this.#n.value - this.#i.value) / e;
3229
+ #u(e) {
3230
+ let t = this.#a.value, n = this.#o.value, r = this.#s.value, i = Math.round((e - t) / r) * r + t;
3231
+ return Math.min(n, Math.max(t, i));
3084
3232
  }
3085
3233
  #d() {
3086
- this.#e.setFormValue(String(this.#n.value));
3234
+ let e = this.#o.value - this.#a.value;
3235
+ return e === 0 ? 0 : (this.#r.value - this.#a.value) / e;
3087
3236
  }
3088
3237
  #f(e) {
3089
- let t = this.getBoundingClientRect(), n = this.#s?.offsetWidth ?? 0, r = n / 2, i = t.width - n;
3090
- if (i <= 0) return this.#i.value;
3238
+ let t = this.getBoundingClientRect(), n = this.#c?.offsetWidth ?? 0, r = n / 2, i = t.width - n;
3239
+ if (i <= 0) return this.#a.value;
3091
3240
  let a = e.clientX - t.left - r, o = Math.min(1, Math.max(0, a / i));
3092
- return this.#i.value + o * (this.#a.value - this.#i.value);
3241
+ return this.#a.value + o * (this.#o.value - this.#a.value);
3093
3242
  }
3094
3243
  #p = (e) => {
3095
3244
  if (e.button !== 0 || this.#t.value) return;
3096
- this.setPointerCapture(e.pointerId), this.#c = !0, this.toggleAttribute("pressed", !0);
3097
- let t = this.#l(this.#f(e));
3098
- this.#n.value = t, this.#d(), this.#v(), this.addEventListener("pointermove", this.#m), this.addEventListener("pointerup", this.#h), this.addEventListener("pointercancel", this.#g);
3245
+ this.setPointerCapture(e.pointerId), this.#l = !0, this.toggleAttribute("pressed", !0);
3246
+ let t = this.#u(this.#f(e));
3247
+ this.#r.value = t, this.#v(), this.addEventListener("pointermove", this.#m), this.addEventListener("pointerup", this.#h), this.addEventListener("pointercancel", this.#g);
3099
3248
  };
3100
3249
  #m = (e) => {
3101
- if (!this.#c || this.#t.value) return;
3102
- let t = this.#l(this.#f(e));
3103
- t !== this.#n.value && (this.#n.value = t, this.#d(), this.#v());
3250
+ if (!this.#l || this.#t.value) return;
3251
+ let t = this.#u(this.#f(e));
3252
+ t !== this.#r.value && (this.#r.value = t, this.#v());
3104
3253
  };
3105
3254
  #h = () => {
3106
- this.#c = !1, this.removeAttribute("pressed"), this.removeEventListener("pointermove", this.#m), this.removeEventListener("pointerup", this.#h), this.removeEventListener("pointercancel", this.#g), this.#y();
3255
+ this.#l = !1, this.removeAttribute("pressed"), this.removeEventListener("pointermove", this.#m), this.removeEventListener("pointerup", this.#h), this.removeEventListener("pointercancel", this.#g), this.#y();
3107
3256
  };
3108
3257
  #g = () => {
3109
- this.#c = !1, this.removeAttribute("pressed"), this.removeEventListener("pointermove", this.#m), this.removeEventListener("pointerup", this.#h), this.removeEventListener("pointercancel", this.#g);
3258
+ this.#l = !1, this.removeAttribute("pressed"), this.removeEventListener("pointermove", this.#m), this.removeEventListener("pointerup", this.#h), this.removeEventListener("pointercancel", this.#g);
3110
3259
  };
3111
3260
  #_ = (e) => {
3112
3261
  if (this.#t.value) return;
3113
- let t = this.#o.value, n = t * 10, r = this.#n.value;
3262
+ let t = this.#s.value, n = t * 10, r = this.#r.value;
3114
3263
  switch (e.key) {
3115
3264
  case "ArrowRight":
3116
3265
  case "ArrowUp":
@@ -3127,30 +3276,30 @@ var ve = class extends y(c) {
3127
3276
  r -= n;
3128
3277
  break;
3129
3278
  case "Home":
3130
- r = this.#i.value;
3279
+ r = this.#a.value;
3131
3280
  break;
3132
3281
  case "End":
3133
- r = this.#a.value;
3282
+ r = this.#o.value;
3134
3283
  break;
3135
3284
  default: return;
3136
3285
  }
3137
- e.preventDefault(), r = this.#l(r), r !== this.#n.value && (this.#n.value = r, this.#d(), this.#v(), this.#y());
3286
+ e.preventDefault(), r = this.#u(r), r !== this.#r.value && (this.#r.value = r, this.#v(), this.#y());
3138
3287
  };
3139
3288
  #v() {
3140
3289
  this.dispatchEvent(new CustomEvent("ui-input", {
3141
3290
  bubbles: !0,
3142
3291
  composed: !0,
3143
- detail: { value: this.#n.value }
3292
+ detail: { value: this.#r.value }
3144
3293
  }));
3145
3294
  }
3146
3295
  #y() {
3147
3296
  this.dispatchEvent(new CustomEvent("ui-change", {
3148
3297
  bubbles: !0,
3149
3298
  composed: !0,
3150
- detail: { value: this.#n.value }
3299
+ detail: { value: this.#r.value }
3151
3300
  }));
3152
3301
  }
3153
- }, we = class extends y(c) {
3302
+ }, Ee = class extends x(_) {
3154
3303
  static observedAttributes = [
3155
3304
  "value",
3156
3305
  "length",
@@ -3167,14 +3316,16 @@ var ve = class extends y(c) {
3167
3316
  #i = [];
3168
3317
  #a = 6;
3169
3318
  #o = /[0-9]/;
3319
+ #s = null;
3320
+ #c = "";
3170
3321
  constructor() {
3171
- super(), this.#e = this.attachInternals(), this.#e.role = "group", this.#n = _(this, "disabled", { type: "boolean" });
3322
+ super(), this.#e = this.attachInternals(), this.#e.role = "group", this.#n = y(this, "disabled", { type: "boolean" });
3172
3323
  }
3173
3324
  get value() {
3174
3325
  return this.#i.join("");
3175
3326
  }
3176
3327
  set value(e) {
3177
- this.#i = e.split("").slice(0, this.#a), this.#c(), this.#l();
3328
+ this.#i = e.split("").slice(0, this.#a), this.#u(), this.#d();
3178
3329
  }
3179
3330
  get name() {
3180
3331
  return this.getAttribute("name") ?? "";
@@ -3196,7 +3347,7 @@ var ve = class extends y(c) {
3196
3347
  }
3197
3348
  attributeChangedCallback(e, t, n) {
3198
3349
  if (t !== n) {
3199
- if (v({ disabled: this.#n }, e, n)) {
3350
+ if (b({ disabled: this.#n }, e, n)) {
3200
3351
  super.attributeChangedCallback(e, t, n);
3201
3352
  return;
3202
3353
  }
@@ -3206,7 +3357,7 @@ var ve = class extends y(c) {
3206
3357
  break;
3207
3358
  case "length": {
3208
3359
  let e = parseInt(n ?? "6", 10);
3209
- !isNaN(e) && e >= 1 && e <= 12 && (this.#a = e, this.isConnected && this.#s());
3360
+ !isNaN(e) && e >= 1 && e <= 12 && (this.#a = e, this.isConnected && this.#l());
3210
3361
  break;
3211
3362
  }
3212
3363
  case "pattern":
@@ -3214,8 +3365,11 @@ var ve = class extends y(c) {
3214
3365
  this.#o = new RegExp(n ?? "[0-9]");
3215
3366
  } catch {}
3216
3367
  break;
3368
+ case "mask":
3369
+ this.#s = n, this.isConnected && this.#u();
3370
+ break;
3217
3371
  case "required":
3218
- this.#t.value = n !== null, this.isConnected && this.#l();
3372
+ this.#t.value = n !== null, this.isConnected && this.#d();
3219
3373
  break;
3220
3374
  }
3221
3375
  super.attributeChangedCallback(e, t, n);
@@ -3232,35 +3386,38 @@ var ve = class extends y(c) {
3232
3386
  if (t) try {
3233
3387
  this.#o = new RegExp(t);
3234
3388
  } catch {}
3235
- this.#s(), this.addEffect(g(this, this.#n.signal, this.#e, { manageTabindex: !1 })), this.#t.value = this.hasAttribute("required");
3389
+ this.#s = this.getAttribute("mask"), this.#l(), this.addEffect(v(this, this.#n.signal, this.#e, { manageTabindex: !1 })), this.addEffect(() => {
3390
+ let e = this.#n.value;
3391
+ for (let t of this.#r) t.setAttribute("contenteditable", e ? "false" : "plaintext-only");
3392
+ }), this.#t.value = this.hasAttribute("required");
3236
3393
  let n = this.getAttribute("value");
3237
- n && (this.value = n), this.addEventListener("paste", this.#m);
3394
+ this.#c = n ?? "", n && (this.value = n), this.addEventListener("paste", this.#g);
3238
3395
  }
3239
3396
  teardown() {
3240
- for (let e of this.#r) e.removeEventListener("input", this.#d), e.removeEventListener("keydown", this.#f), e.removeEventListener("focus", this.#p);
3241
- this.removeEventListener("paste", this.#m), super.teardown();
3397
+ for (let e of this.#r) e.removeEventListener("input", this.#p), e.removeEventListener("keydown", this.#m), e.removeEventListener("focus", this.#h);
3398
+ this.removeEventListener("paste", this.#g), super.teardown();
3242
3399
  }
3243
- #s() {
3244
- for (let e of this.#r) e.removeEventListener("input", this.#d), e.removeEventListener("keydown", this.#f), e.removeEventListener("focus", this.#p), e.remove();
3400
+ #l() {
3401
+ for (let e of this.#r) e.removeEventListener("input", this.#p), e.removeEventListener("keydown", this.#m), e.removeEventListener("focus", this.#h), e.remove();
3245
3402
  this.#r = [], this.#i = [];
3246
3403
  for (let e = 0; e < this.#a; e++) {
3247
3404
  let e = document.createElement("div");
3248
- e.classList.add("ui-otp-cell"), e.setAttribute("data-empty", ""), e.setAttribute("contenteditable", "plaintext-only"), e.setAttribute("inputmode", "numeric"), e.addEventListener("input", this.#d), e.addEventListener("keydown", this.#f), e.addEventListener("focus", this.#p), this.appendChild(e), this.#r.push(e), this.#i.push("");
3405
+ e.classList.add("ui-otp-cell"), e.setAttribute("data-empty", ""), e.setAttribute("contenteditable", "plaintext-only"), e.setAttribute("inputmode", "numeric"), e.addEventListener("input", this.#p), e.addEventListener("keydown", this.#m), e.addEventListener("focus", this.#h), this.appendChild(e), this.#r.push(e), this.#i.push("");
3249
3406
  }
3250
3407
  }
3251
- #c() {
3408
+ #u() {
3252
3409
  for (let e = 0; e < this.#a; e++) {
3253
3410
  let t = this.#r[e];
3254
3411
  if (!t) continue;
3255
3412
  let n = this.#i[e] ?? "";
3256
- t.textContent = n, n ? t.removeAttribute("data-empty") : t.setAttribute("data-empty", "");
3413
+ t.textContent = n ? this.#s ?? n : "", n ? t.removeAttribute("data-empty") : t.setAttribute("data-empty", "");
3257
3414
  }
3258
3415
  }
3259
- #l() {
3416
+ #d() {
3260
3417
  let e = this.value;
3261
- this.#e.setFormValue(e), this.#t.value && e.length < this.#a ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : this.#e.setValidity({});
3418
+ this.#e.setFormValue(e), this.#t.value && e.length === 0 ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : this.#t.value && e.length < this.#a ? this.#e.setValidity({ tooShort: !0 }, `Please enter ${this.#a} characters.`, this) : this.#e.setValidity({});
3262
3419
  }
3263
- #u(e) {
3420
+ #f(e) {
3264
3421
  let t = this.#r[e];
3265
3422
  if (t) {
3266
3423
  t.focus();
@@ -3268,26 +3425,30 @@ var ve = class extends y(c) {
3268
3425
  e && (e.selectAllChildren(t), e.collapseToEnd());
3269
3426
  }
3270
3427
  }
3271
- #d = (e) => {
3428
+ #p = (e) => {
3272
3429
  if (this.disabled) return;
3273
3430
  let t = e.target, n = this.#r.indexOf(t);
3274
3431
  if (n === -1) return;
3275
3432
  let r = t.textContent ?? "";
3276
3433
  if (r.length > 0) {
3277
3434
  let e = r[r.length - 1];
3278
- this.#o.test(e) ? (this.#i[n] = e, t.textContent = e, t.removeAttribute("data-empty"), this.#l(), this.#h(), n < this.#a - 1 && this.#u(n + 1), this.value.length === this.#a && this.#g()) : t.textContent = this.#i[n] || "";
3279
- } else this.#i[n] = "", t.setAttribute("data-empty", ""), this.#l(), this.#h();
3435
+ if (this.#o.test(e)) this.#i[n] = e, t.textContent = this.#s ?? e, t.removeAttribute("data-empty"), this.#d(), this.#_(), n < this.#a - 1 && this.#f(n + 1), this.value.length === this.#a && this.#v();
3436
+ else {
3437
+ let e = this.#i[n] || "";
3438
+ t.textContent = e ? this.#s ?? e : "";
3439
+ }
3440
+ } else this.#i[n] = "", t.setAttribute("data-empty", ""), this.#d(), this.#_();
3280
3441
  };
3281
- #f = (e) => {
3442
+ #m = (e) => {
3282
3443
  if (this.disabled) return;
3283
3444
  let t = e.target, n = this.#r.indexOf(t);
3284
- n !== -1 && (e.key === "Backspace" ? (this.#i[n] ? (this.#i[n] = "", t.textContent = "", t.setAttribute("data-empty", ""), this.#l(), this.#h()) : n > 0 && this.#u(n - 1), e.preventDefault()) : e.key === "ArrowLeft" && n > 0 ? (this.#u(n - 1), e.preventDefault()) : e.key === "ArrowRight" && n < this.#a - 1 ? (this.#u(n + 1), e.preventDefault()) : e.key === "Delete" && (this.#i[n] = "", t.textContent = "", t.setAttribute("data-empty", ""), this.#l(), this.#h(), e.preventDefault()));
3445
+ n !== -1 && (e.key === "Backspace" ? (this.#i[n] ? (this.#i[n] = "", t.textContent = "", t.setAttribute("data-empty", ""), this.#d(), this.#_()) : n > 0 && this.#f(n - 1), e.preventDefault()) : e.key === "ArrowLeft" && n > 0 ? (this.#f(n - 1), e.preventDefault()) : e.key === "ArrowRight" && n < this.#a - 1 ? (this.#f(n + 1), e.preventDefault()) : e.key === "Delete" && (this.#i[n] = "", t.textContent = "", t.setAttribute("data-empty", ""), this.#d(), this.#_(), e.preventDefault()));
3285
3446
  };
3286
- #p = (e) => {
3447
+ #h = (e) => {
3287
3448
  let t = e.target, n = window.getSelection();
3288
3449
  n && (n.selectAllChildren(t), n.collapseToEnd());
3289
3450
  };
3290
- #m = (e) => {
3451
+ #g = (e) => {
3291
3452
  if (this.disabled) {
3292
3453
  e.preventDefault();
3293
3454
  return;
@@ -3295,32 +3456,35 @@ var ve = class extends y(c) {
3295
3456
  e.preventDefault();
3296
3457
  let t = (e.clipboardData?.getData("text") ?? "").split("").filter((e) => this.#o.test(e)).slice(0, this.#a);
3297
3458
  for (let e = 0; e < this.#a; e++) this.#i[e] = t[e] ?? "";
3298
- this.#c(), this.#l(), this.#h();
3459
+ this.#u(), this.#d(), this.#_();
3299
3460
  let n = this.#i.findIndex((e) => !e);
3300
- this.#u(n >= 0 ? n : this.#a - 1), t.length === this.#a && this.#g();
3461
+ this.#f(n >= 0 ? n : this.#a - 1), t.length === this.#a && this.#v();
3301
3462
  };
3302
3463
  onFormDisabled(e) {
3303
3464
  this.#n.signal.value = e;
3304
3465
  for (let t of this.#r) t.setAttribute("contenteditable", e ? "false" : "plaintext-only");
3305
3466
  }
3306
3467
  onFormReset() {
3307
- this.value = "", this.#n.signal.value = this.hasAttribute("disabled");
3468
+ this.value = this.#c, this.#n.signal.value = this.hasAttribute("disabled");
3308
3469
  }
3309
- #h() {
3470
+ onFormStateRestore(e) {
3471
+ this.value = typeof e == "string" ? e : "";
3472
+ }
3473
+ #_() {
3310
3474
  this.dispatchEvent(new CustomEvent("ui-input", {
3311
3475
  bubbles: !0,
3312
3476
  composed: !0,
3313
3477
  detail: { value: this.value }
3314
3478
  }));
3315
3479
  }
3316
- #g() {
3480
+ #v() {
3317
3481
  this.dispatchEvent(new CustomEvent("ui-change", {
3318
3482
  bubbles: !0,
3319
3483
  composed: !0,
3320
3484
  detail: { value: this.value }
3321
3485
  }));
3322
3486
  }
3323
- }, Te = class extends c {
3487
+ }, De = class extends _ {
3324
3488
  static observedAttributes = [
3325
3489
  "src",
3326
3490
  "name",
@@ -3343,6 +3507,12 @@ var ve = class extends y(c) {
3343
3507
  set name(e) {
3344
3508
  this.setAttribute("name", e);
3345
3509
  }
3510
+ get alt() {
3511
+ return this.getAttribute("alt") ?? "";
3512
+ }
3513
+ set alt(e) {
3514
+ this.setAttribute("alt", e);
3515
+ }
3346
3516
  attributeChangedCallback(e, t, n) {
3347
3517
  t !== n && (this.isConnected && this.#n(), super.attributeChangedCallback(e, t, n));
3348
3518
  }
@@ -3366,7 +3536,7 @@ var ve = class extends y(c) {
3366
3536
  let e = this.getAttribute("name");
3367
3537
  e ? this.textContent = this.#r(e) : this.textContent = "?";
3368
3538
  };
3369
- }, Ee = class extends c {
3539
+ }, Oe = class extends _ {
3370
3540
  static observedAttributes = ["max"];
3371
3541
  #e;
3372
3542
  #t = "";
@@ -3387,7 +3557,7 @@ var ve = class extends y(c) {
3387
3557
  let n = parseInt(this.#t, 10);
3388
3558
  isNaN(n) || (n > t ? this.textContent = `${t}+` : this.textContent = this.#t);
3389
3559
  }
3390
- }, De = class extends c {
3560
+ }, ke = class extends _ {}, Ae = class extends _ {
3391
3561
  #e;
3392
3562
  constructor() {
3393
3563
  super(), this.#e = this.attachInternals(), this.#e.role = "navigation";
@@ -3397,7 +3567,7 @@ var ve = class extends y(c) {
3397
3567
  let e = this.getAttribute("aria-label") ?? "Breadcrumb";
3398
3568
  this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e);
3399
3569
  }
3400
- }, Oe = class extends c {
3570
+ }, je = class extends _ {
3401
3571
  static observedAttributes = ["href", "current"];
3402
3572
  #e;
3403
3573
  constructor() {
@@ -3423,7 +3593,7 @@ var ve = class extends y(c) {
3423
3593
  #r = (e) => {
3424
3594
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#n());
3425
3595
  };
3426
- }, ke = class extends c {
3596
+ }, Me = class extends _ {
3427
3597
  static observedAttributes = [
3428
3598
  "total",
3429
3599
  "value",
@@ -3488,15 +3658,21 @@ var ve = class extends y(c) {
3488
3658
  break;
3489
3659
  case "disabled":
3490
3660
  this.#a.value = n !== null;
3491
- return;
3661
+ break;
3492
3662
  }
3493
3663
  super.attributeChangedCallback(e, t, n);
3494
3664
  }
3495
3665
  setup() {
3496
3666
  super.setup();
3497
3667
  let e = this.getAttribute("aria-label") ?? "Pagination";
3498
- this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(g(this, this.#a, this.#e)), this.addEffect(() => {
3668
+ this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(v(this, this.#a, this.#e)), this.addEffect(() => {
3499
3669
  this.#l();
3670
+ }), this.addEffect(() => {
3671
+ let e = this.#a.value, t = c(() => this.#n.value), n = c(() => this.#t.value);
3672
+ for (let r of this.querySelectorAll("ui-button")) {
3673
+ let i = r.getAttribute("aria-label") ?? "";
3674
+ i === "Previous page" ? r.toggleAttribute("disabled", e || t <= 1) : i === "Next page" ? r.toggleAttribute("disabled", e || t >= n) : r.toggleAttribute("disabled", e);
3675
+ }
3500
3676
  });
3501
3677
  }
3502
3678
  teardown() {
@@ -3526,16 +3702,16 @@ var ve = class extends y(c) {
3526
3702
  return a.setAttribute("name", e), i.appendChild(a), i.addEventListener("ui-press", r), i;
3527
3703
  }
3528
3704
  #l() {
3529
- let e = this.#t.value, t = this.#n.value, n = this.#o();
3530
- this.textContent = "", this.appendChild(this.#c("caret-left", "Previous page", t <= 1, () => this.#u(t - 1)));
3531
- for (let e of n) if (e === "ellipsis") {
3705
+ let e = this.#t.value, t = this.#n.value, n = c(() => this.#a.value), r = this.#o();
3706
+ this.textContent = "", this.appendChild(this.#c("caret-left", "Previous page", n || t <= 1, () => this.#u(t - 1)));
3707
+ for (let e of r) if (e === "ellipsis") {
3532
3708
  let e = document.createElement("span");
3533
3709
  e.classList.add("ui-pagination-ellipsis"), e.textContent = "…", this.appendChild(e);
3534
3710
  } else {
3535
- let n = this.#s(String(e), `Page ${e}`, !1, () => this.#u(e));
3536
- e === t && n.setAttribute("aria-current", "page"), this.appendChild(n);
3711
+ let r = this.#s(String(e), `Page ${e}`, n, () => this.#u(e));
3712
+ e === t && r.setAttribute("aria-current", "page"), this.appendChild(r);
3537
3713
  }
3538
- this.appendChild(this.#c("caret-right", "Next page", t >= e, () => this.#u(t + 1)));
3714
+ this.appendChild(this.#c("caret-right", "Next page", n || t >= e, () => this.#u(t + 1)));
3539
3715
  }
3540
3716
  #u(e) {
3541
3717
  if (this.#a.value) return;
@@ -3546,12 +3722,7 @@ var ve = class extends y(c) {
3546
3722
  detail: { value: t }
3547
3723
  })));
3548
3724
  }
3549
- }, Ae = class extends c {
3550
- static observedAttributes = [
3551
- "side",
3552
- "no-close-on-escape",
3553
- "no-close-on-backdrop"
3554
- ];
3725
+ }, Ne = class extends _ {
3555
3726
  #e;
3556
3727
  get open() {
3557
3728
  return this.#e.open;
@@ -3563,12 +3734,12 @@ var ve = class extends y(c) {
3563
3734
  this.#e.close();
3564
3735
  }
3565
3736
  setup() {
3566
- super.setup(), this.#e = new h(this, { contentTarget: () => document.createElement("ui-drawer-panel") });
3737
+ super.setup(), this.#e = new d(this, { contentTarget: () => document.createElement("ui-drawer-panel") });
3567
3738
  }
3568
3739
  teardown() {
3569
3740
  this.#e.destroy(), super.teardown();
3570
3741
  }
3571
- }, je = class extends c {
3742
+ }, Pe = class extends _ {
3572
3743
  static observedAttributes = ["disabled"];
3573
3744
  #e;
3574
3745
  #t = t(!1);
@@ -3586,17 +3757,17 @@ var ve = class extends y(c) {
3586
3757
  t !== n && (e === "disabled" && (this.#t.value = n !== null), super.attributeChangedCallback?.(e, t, n));
3587
3758
  }
3588
3759
  setup() {
3589
- super.setup(), this.#n = new l(this, {
3760
+ super.setup(), this.#n = new i(this, {
3590
3761
  selector: ":scope ui-tree-item > [slot=\"label\"]",
3591
3762
  orientation: "vertical"
3592
3763
  });
3593
3764
  let e = this.getAttribute("aria-label") ?? "Tree";
3594
- this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(g(this, this.#t, this.#e));
3765
+ this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(v(this, this.#t, this.#e));
3595
3766
  }
3596
3767
  teardown() {
3597
3768
  this.#n.destroy(), super.teardown();
3598
3769
  }
3599
- }, Me = class extends c {
3770
+ }, Fe = class extends _ {
3600
3771
  static observedAttributes = [
3601
3772
  "expanded",
3602
3773
  "selected",
@@ -3609,6 +3780,18 @@ var ve = class extends y(c) {
3609
3780
  constructor() {
3610
3781
  super(), this.#e = this.attachInternals(), this.#e.role = "treeitem";
3611
3782
  }
3783
+ get expanded() {
3784
+ return this.hasAttribute("expanded");
3785
+ }
3786
+ set expanded(e) {
3787
+ this.toggleAttribute("expanded", e), this.isConnected && this.#a();
3788
+ }
3789
+ get selected() {
3790
+ return this.hasAttribute("selected");
3791
+ }
3792
+ set selected(e) {
3793
+ this.toggleAttribute("selected", e), this.isConnected && this.#a();
3794
+ }
3612
3795
  get disabled() {
3613
3796
  return this.#r.value;
3614
3797
  }
@@ -3616,7 +3799,7 @@ var ve = class extends y(c) {
3616
3799
  this.#r.value = e, this.toggleAttribute("disabled", e);
3617
3800
  }
3618
3801
  setup() {
3619
- super.setup(), this.addEffect(g(this, this.#r, this.#e)), this.deferChildren(() => {
3802
+ super.setup(), this.addEffect(v(this, this.#r, this.#e)), this.deferChildren(() => {
3620
3803
  this.#i(), this.#a();
3621
3804
  }), this.addEventListener("click", this.#o), this.addEventListener("keydown", this.#s);
3622
3805
  }
@@ -3678,7 +3861,7 @@ var ve = class extends y(c) {
3678
3861
  break;
3679
3862
  }
3680
3863
  };
3681
- }, Ne = class extends c {
3864
+ }, Ie = class extends _ {
3682
3865
  static observedAttributes = [
3683
3866
  "direction",
3684
3867
  "controls",
@@ -3746,6 +3929,12 @@ var ve = class extends y(c) {
3746
3929
  case "autoplay":
3747
3930
  n === null ? this.#E() : this.#T();
3748
3931
  break;
3932
+ case "interval":
3933
+ this.hasAttribute("autoplay") && (this.#E(), this.#T());
3934
+ break;
3935
+ case "loop":
3936
+ this.#w(this.#a.value, this.#o.value);
3937
+ break;
3749
3938
  }
3750
3939
  super.attributeChangedCallback?.(e, t, n);
3751
3940
  }
@@ -3772,7 +3961,7 @@ var ve = class extends y(c) {
3772
3961
  s.id = e("ss-live"), s.setAttribute("aria-live", "polite"), s.setAttribute("aria-atomic", "true"), s.setAttribute("data-visually-hidden", ""), this.appendChild(s), this.#i = s, this.setAttribute("aria-roledescription", "carousel"), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Slideshow"), this.#v(this.getAttribute("per-view")), this.#o.value = n.length, this.#y(n), this.#b(n.length), this.#S(n), n.length > 0 && n[0].toggleAttribute("active", !0), this.addEffect(() => {
3773
3962
  let e = this.#a.value, t = this.#o.value;
3774
3963
  this.#C(e), this.#w(e, t), this.#i && (this.#i.textContent = `Slide ${e + 1} of ${t}`);
3775
- }), this.addEffect(g(this, this.#s, this.#_)), i.addEventListener("click", this.#D), a.addEventListener("click", this.#O), t.addEventListener("keydown", this.#P), t.addEventListener("pointerdown", this.#j), this.addEventListener("mouseenter", this.#k), this.addEventListener("mouseleave", this.#A), this.addEventListener("focusin", this.#k), this.addEventListener("focusout", this.#A), this.hasAttribute("autoplay") && this.#T();
3964
+ }), this.addEffect(v(this, this.#s, this.#_)), i.addEventListener("click", this.#D), a.addEventListener("click", this.#O), t.addEventListener("keydown", this.#P), t.addEventListener("pointerdown", this.#j), this.addEventListener("mouseenter", this.#k), this.addEventListener("mouseleave", this.#A), this.addEventListener("focusin", this.#k), this.addEventListener("focusout", this.#A), this.hasAttribute("autoplay") && this.#T();
3776
3965
  }
3777
3966
  teardown() {
3778
3967
  this.#E(), this.#u?.disconnect(), this.#u = null, this.#n?.removeEventListener("click", this.#D), this.#r?.removeEventListener("click", this.#O), this.#e?.removeEventListener("keydown", this.#P), this.#e?.removeEventListener("pointerdown", this.#j), this.removeEventListener("mouseenter", this.#k), this.removeEventListener("mouseleave", this.#A), this.removeEventListener("focusin", this.#k), this.removeEventListener("focusout", this.#A), this.#e = null, this.#t?.removeEventListener("click", this.#x), this.#t && (this.#t.innerHTML = ""), this.#t = null, this.#n = null, this.#r = null, this.#i = null, this.#d = [], super.teardown();
@@ -3891,17 +4080,17 @@ var ve = class extends y(c) {
3891
4080
  break;
3892
4081
  }
3893
4082
  };
3894
- }, Pe = class extends c {
4083
+ }, Le = class extends _ {
3895
4084
  setup() {
3896
4085
  super.setup(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1");
3897
4086
  }
3898
- }, Fe = class extends c {
4087
+ }, Re = class extends _ {
3899
4088
  static observedAttributes = ["value", "disabled"];
3900
4089
  #e;
3901
4090
  #t;
3902
4091
  #n;
3903
4092
  constructor() {
3904
- super(), this.#e = this.attachInternals(), this.#e.role = "navigation", this.#t = _(this, "disabled", { type: "boolean" });
4093
+ super(), this.#e = this.attachInternals(), this.#e.role = "navigation", this.#t = y(this, "disabled", { type: "boolean" });
3905
4094
  }
3906
4095
  get value() {
3907
4096
  return this.#n?.listValue.value ?? null;
@@ -3917,7 +4106,7 @@ var ve = class extends y(c) {
3917
4106
  }
3918
4107
  attributeChangedCallback(e, t, n) {
3919
4108
  if (t !== n) {
3920
- if (v({ disabled: this.#t }, e, n)) {
4109
+ if (b({ disabled: this.#t }, e, n)) {
3921
4110
  super.attributeChangedCallback?.(e, t, n);
3922
4111
  return;
3923
4112
  }
@@ -3925,7 +4114,7 @@ var ve = class extends y(c) {
3925
4114
  }
3926
4115
  }
3927
4116
  setup() {
3928
- super.setup(), this.#n = new d(this, {
4117
+ super.setup(), this.#n = new o(this, {
3929
4118
  itemSelector: ":scope ui-nav-item:not([disabled])",
3930
4119
  orientation: "vertical",
3931
4120
  ariaAttr: "aria-current",
@@ -3941,12 +4130,12 @@ var ve = class extends y(c) {
3941
4130
  deferChildren: (e) => this.deferChildren(e)
3942
4131
  });
3943
4132
  let e = this.getAttribute("value");
3944
- e !== null && (this.#n.listValue.value = e), this.addEffect(g(this, this.#t.signal, this.#e));
4133
+ e !== null && (this.#n.listValue.value = e), this.addEffect(v(this, this.#t.signal, this.#e));
3945
4134
  }
3946
4135
  teardown() {
3947
4136
  this.#n.destroy(), super.teardown();
3948
4137
  }
3949
- }, Ie = class extends c {
4138
+ }, ze = class extends _ {
3950
4139
  static observedAttributes = [
3951
4140
  "value",
3952
4141
  "disabled",
@@ -3957,7 +4146,7 @@ var ve = class extends y(c) {
3957
4146
  #n;
3958
4147
  #r = t("");
3959
4148
  constructor() {
3960
- super(), this.#e = this.attachInternals(), this.#e.role = "option", this.#n = _(this, "disabled", { type: "boolean" });
4149
+ super(), this.#e = this.attachInternals(), this.#e.role = "link", this.#n = y(this, "disabled", { type: "boolean" });
3961
4150
  }
3962
4151
  get value() {
3963
4152
  return this.#t.value;
@@ -3979,7 +4168,7 @@ var ve = class extends y(c) {
3979
4168
  }
3980
4169
  attributeChangedCallback(e, t, n) {
3981
4170
  if (t !== n) {
3982
- if (v({ disabled: this.#n }, e, n)) {
4171
+ if (b({ disabled: this.#n }, e, n)) {
3983
4172
  super.attributeChangedCallback?.(e, t, n);
3984
4173
  return;
3985
4174
  }
@@ -3995,7 +4184,7 @@ var ve = class extends y(c) {
3995
4184
  }
3996
4185
  }
3997
4186
  setup() {
3998
- super.setup(), this.addEffect(g(this, this.#n.signal, this.#e)), this.addEventListener("click", this.#i);
4187
+ super.setup(), this.addEffect(v(this, this.#n.signal, this.#e)), this.addEventListener("click", this.#i);
3999
4188
  }
4000
4189
  teardown() {
4001
4190
  this.removeEventListener("click", this.#i), super.teardown();
@@ -4010,9 +4199,9 @@ var ve = class extends y(c) {
4010
4199
  }
4011
4200
  }));
4012
4201
  };
4013
- }, Le = class extends c {
4202
+ }, Be = class extends _ {
4014
4203
  static observedAttributes = ["open"];
4015
- #e = t(!0);
4204
+ #e = t(!1);
4016
4205
  #t = null;
4017
4206
  #n;
4018
4207
  #r = null;
@@ -4048,7 +4237,7 @@ var ve = class extends y(c) {
4048
4237
  attributeFilter: ["aria-current"]
4049
4238
  }), this.#s();
4050
4239
  let r = document.createElement("ui-listbox");
4051
- r.setAttribute("popover", "manual"), r.className = "nav-group-flyout", this.appendChild(r), this.#i = r, this.#a = new p(this), this.#a.wirePopover(this, r), r.addEventListener("ui-select", this.#u), r.addEventListener("ui-change", this.#d), this.addEventListener("ui-dismiss", this.#l);
4240
+ r.setAttribute("popover", "manual"), r.className = "nav-group-flyout", this.appendChild(r), this.#i = r, this.#a = new l(this), this.#a.wirePopover(this, r), r.addEventListener("ui-select", this.#u), r.addEventListener("ui-change", this.#d), this.addEventListener("ui-dismiss", this.#l);
4052
4241
  }
4053
4242
  teardown() {
4054
4243
  this.closeFlyout(), this.#a?.destroy(), this.#a = null, this.#i?.remove(), this.#i = null, this.#r?.disconnect(), this.#r = null, this.#t?.removeEventListener("toggle", this.#c), this.#t = null, super.teardown();
@@ -4097,7 +4286,7 @@ var ve = class extends y(c) {
4097
4286
  #d = (e) => {
4098
4287
  e.stopPropagation();
4099
4288
  };
4100
- }, Re = class extends c {
4289
+ }, Ve = class extends _ {
4101
4290
  constructor() {
4102
4291
  super();
4103
4292
  let e = this.attachInternals();
@@ -4113,7 +4302,7 @@ var ve = class extends y(c) {
4113
4302
  e.className = "icon-well", this.insertBefore(e, n), e.appendChild(n);
4114
4303
  }
4115
4304
  }
4116
- }, Y = class extends c {
4305
+ }, He = class extends _ {
4117
4306
  static observedAttributes = [
4118
4307
  "traits",
4119
4308
  "for",
@@ -4121,109 +4310,133 @@ var ve = class extends y(c) {
4121
4310
  ];
4122
4311
  /** Per-target controller instances: target → Map<traitName, instance> */
4123
4312
  #e = /* @__PURE__ */ new Map();
4124
- /** Watches for child additions/removals in selector mode */
4313
+ /** Watches for child additions/removals in selector mode, or first-child changes in wrapper mode */
4125
4314
  #t = null;
4126
4315
  /** Watches for trait option attribute changes on this element */
4127
4316
  #n = null;
4128
4317
  /** Traits requested but not yet registered — retried on registration */
4129
4318
  #r = /* @__PURE__ */ new Set();
4130
4319
  #i = null;
4320
+ #a = !1;
4131
4321
  connectedCallback() {
4132
- this.setup();
4322
+ this.#a || (this.#a = !0, this.setup());
4323
+ }
4324
+ disconnectedCallback() {
4325
+ this.#a = !1, super.disconnectedCallback();
4133
4326
  }
4134
4327
  setup() {
4135
- super.setup(), this.#a(), this.#p();
4328
+ super.setup(), this.#o(), this.#m();
4136
4329
  }
4137
4330
  teardown() {
4138
- this.#f(), this.#t?.disconnect(), this.#t = null, this.#n?.disconnect(), this.#n = null, this.#i?.(), this.#i = null, this.#r.clear(), super.teardown();
4331
+ this.#p(), this.#t?.disconnect(), this.#t = null, this.#n?.disconnect(), this.#n = null, this.#i?.(), this.#i = null, this.#r.clear(), super.teardown();
4139
4332
  }
4140
4333
  attributeChangedCallback(e, t, n) {
4141
- super.attributeChangedCallback(e, t, n), this.isConnected && (e === "traits" || e === "for" || e === "provides") && (this.#f(), this.#t?.disconnect(), this.#t = null, this.#a());
4334
+ super.attributeChangedCallback(e, t, n), this.isConnected && (e === "traits" || e === "for" || e === "provides") && (this.#p(), this.#t?.disconnect(), this.#t = null, this.#o());
4142
4335
  }
4143
- #a() {
4336
+ #o() {
4144
4337
  if (this.getAttribute("provides") !== null) return;
4145
4338
  let e = this.getAttribute("traits");
4146
4339
  if (!e) return;
4147
4340
  let t = this.getAttribute("for");
4148
- t === null ? this.#o(e) : this.#s(e, t), this.#r.size > 0 && !this.#i && (this.#i = o((e) => {
4149
- this.#r.has(e) && (this.#r.delete(e), this.#a(), this.#r.size === 0 && (this.#i?.(), this.#i = null));
4341
+ t === null ? this.#s(e) : this.#c(e, t), this.#r.size > 0 && !this.#i && (this.#i = h((e) => {
4342
+ this.#r.has(e) && (this.#r.delete(e), this.#o(), this.#r.size === 0 && (this.#i?.(), this.#i = null));
4150
4343
  }));
4151
4344
  }
4152
- #o(e) {
4153
- let t = this.#u();
4154
- t && this.#l(t, e);
4345
+ #s(e) {
4346
+ let t = this.#d();
4347
+ t && this.#u(t, e), this.#t = new MutationObserver((t) => {
4348
+ for (let n of t) {
4349
+ if (n.type !== "childList") continue;
4350
+ for (let e of n.removedNodes) if (e instanceof HTMLElement) {
4351
+ let t = this.#e.get(e);
4352
+ t && (this.#f(e, t), this.#e.delete(e));
4353
+ }
4354
+ let t = this.#d();
4355
+ t && !this.#e.has(t) && this.#u(t, e);
4356
+ }
4357
+ }), this.#t.observe(this, { childList: !0 });
4155
4358
  }
4156
- #s(e, t) {
4359
+ #c(e, t) {
4157
4360
  let n = this.querySelectorAll(t);
4158
- for (let t of n) this.#l(t, e);
4361
+ for (let t of n) this.#u(t, e);
4159
4362
  this.#t = new MutationObserver(() => {
4160
- this.#c(e, t);
4363
+ this.#l(e, t);
4161
4364
  }), this.#t.observe(this, {
4162
4365
  childList: !0,
4163
4366
  subtree: !0
4164
4367
  });
4165
4368
  }
4166
- #c(e, t) {
4369
+ #l(e, t) {
4167
4370
  let n = new Set(this.querySelectorAll(t));
4168
- for (let [e, t] of this.#e) n.has(e) || (this.#d(e, t), this.#e.delete(e));
4169
- for (let t of n) this.#e.has(t) || this.#l(t, e);
4371
+ for (let [e, t] of this.#e) n.has(e) || (this.#f(e, t), this.#e.delete(e));
4372
+ for (let t of n) this.#e.has(t) || this.#u(t, e);
4170
4373
  }
4171
- #l(e, t) {
4374
+ #u(e, t) {
4172
4375
  let n = t.split(/\s+/).filter(Boolean), r = this.#e.get(e) ?? /* @__PURE__ */ new Map();
4173
4376
  for (let t of n) {
4174
4377
  if (r.has(t)) continue;
4175
- let n = i(t);
4378
+ let n = f(t);
4176
4379
  if (!n) {
4177
4380
  this.#r.add(t);
4178
4381
  continue;
4179
4382
  }
4180
- for (let [e] of r) if (i(e)?.conflicts?.includes(t) || n.conflicts?.includes(e)) {
4383
+ for (let [e] of r) if (f(e)?.conflicts?.includes(t) || n.conflicts?.includes(e)) {
4181
4384
  let n = `[native-ui] Trait conflict: "${t}" and "${e}" are incompatible.`;
4182
4385
  console.warn(n);
4183
4386
  }
4184
- let o = a(this, t), s = n.create(e, o);
4185
- r.set(t, s);
4387
+ let i = m(this, t), a = n.create(e, i);
4388
+ r.set(t, a);
4186
4389
  }
4187
4390
  this.#e.set(e, r);
4188
4391
  }
4189
- #u() {
4392
+ #d() {
4190
4393
  for (let e of this.children) if (e instanceof HTMLElement) return e;
4191
4394
  return null;
4192
4395
  }
4193
- #d(e, t) {
4396
+ #f(e, t) {
4194
4397
  for (let [e, n] of t) {
4195
- let t = i(e);
4398
+ let t = f(e);
4196
4399
  t && t.destroy(n);
4197
4400
  }
4198
4401
  t.clear();
4199
4402
  }
4200
- #f() {
4201
- for (let [e, t] of this.#e) this.#d(e, t);
4403
+ #p() {
4404
+ for (let [e, t] of this.#e) this.#f(e, t);
4202
4405
  this.#e.clear();
4203
4406
  }
4204
4407
  /** Watch trait option attributes (e.g. draggable-axis) on this element */
4205
- #p() {
4408
+ #m() {
4206
4409
  this.#n = new MutationObserver((e) => {
4207
4410
  for (let t of e) {
4208
- if (!t.attributeName || t.attributeName === "traits" || t.attributeName === "for" || t.attributeName === "provides") continue;
4209
- let e = s(t.attributeName);
4411
+ if (!t.attributeName) continue;
4412
+ let e = g(t.attributeName);
4210
4413
  if (!e) continue;
4211
- let n = i(e.trait);
4414
+ let n = f(e.trait);
4212
4415
  if (!n?.update) continue;
4213
- let r = a(this, e.trait);
4416
+ let r = m(this, e.trait);
4214
4417
  for (let [, t] of this.#e) {
4215
4418
  let i = t.get(e.trait);
4216
4419
  i && n.update(i, r);
4217
4420
  }
4218
4421
  }
4219
- }), this.#n.observe(this, { attributes: !0 });
4422
+ });
4423
+ let e = this.#h();
4424
+ e.length > 0 ? this.#n.observe(this, {
4425
+ attributes: !0,
4426
+ attributeFilter: e
4427
+ }) : this.#n.observe(this, { attributes: !0 });
4220
4428
  }
4221
- }, ze = class extends c {
4222
- static observedAttributes = [
4223
- "disabled",
4224
- "no-enter-submit",
4225
- "no-auto-clear"
4226
- ];
4429
+ /** Collect all attributes on this element that match any registered trait prefix. */
4430
+ #h() {
4431
+ let e = p(), t = [];
4432
+ for (let n of this.attributes) for (let r of e) if (n.name.startsWith(r + "-")) {
4433
+ t.push(n.name);
4434
+ break;
4435
+ }
4436
+ return t;
4437
+ }
4438
+ }, Ue = class extends _ {
4439
+ static observedAttributes = ["disabled"];
4227
4440
  #e;
4228
4441
  #t = t(!1);
4229
4442
  #n = null;
@@ -4254,7 +4467,7 @@ var ve = class extends y(c) {
4254
4467
  }
4255
4468
  }
4256
4469
  setup() {
4257
- super.setup(), this.addEffect(g(this, this.#t, this.#e)), this.deferChildren(() => {
4470
+ super.setup(), this.addEffect(v(this, this.#t, this.#e)), this.deferChildren(() => {
4258
4471
  this.#i(), this.addEffect(() => {
4259
4472
  let e = this.#t.value;
4260
4473
  this.#n && this.#n.toggleAttribute("disabled", e), this.#r && (e ? this.#r.setAttribute("disabled", "") : this.#o());
@@ -4298,7 +4511,7 @@ var ve = class extends y(c) {
4298
4511
  detail: { value: e }
4299
4512
  })) && !this.hasAttribute("no-auto-clear") && (this.value = "", this.#r?.setAttribute("disabled", ""));
4300
4513
  }
4301
- }, Be = class extends c {
4514
+ }, We = class extends _ {
4302
4515
  static observedAttributes = ["interactive", "href"];
4303
4516
  setup() {
4304
4517
  super.setup(), this.hasAttribute("interactive") && (this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("click", this.#e), this.addEventListener("keydown", this.#t));
@@ -4313,7 +4526,7 @@ var ve = class extends y(c) {
4313
4526
  #t = (e) => {
4314
4527
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#e());
4315
4528
  };
4316
- }, Ve = class extends c {
4529
+ }, Ge = class extends _ {
4317
4530
  static observedAttributes = [
4318
4531
  "collapsible",
4319
4532
  "collapsed",
@@ -4332,14 +4545,14 @@ var ve = class extends y(c) {
4332
4545
  #e = () => {
4333
4546
  this.hasAttribute("collapsible") && this.toggleAttribute("collapsed");
4334
4547
  };
4335
- }, He = class extends c {
4548
+ }, Y = class extends _ {
4336
4549
  #e;
4337
4550
  #t;
4338
4551
  constructor() {
4339
4552
  super(), this.#e = this.attachInternals(), this.#e.role = "toolbar";
4340
4553
  }
4341
4554
  setup() {
4342
- super.setup(), this.#t = new l(this, {
4555
+ super.setup(), this.#t = new i(this, {
4343
4556
  selector: ":scope > ui-button:not([disabled]), :scope > button:not([disabled])",
4344
4557
  orientation: "horizontal"
4345
4558
  }), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Toolbar");
@@ -4347,7 +4560,7 @@ var ve = class extends y(c) {
4347
4560
  teardown() {
4348
4561
  this.#t.destroy(), super.teardown();
4349
4562
  }
4350
- }, Ue = class extends c {
4563
+ }, Ke = class extends _ {
4351
4564
  static observedAttributes = ["collapsed"];
4352
4565
  #e = null;
4353
4566
  #t = null;
@@ -4359,7 +4572,7 @@ var ve = class extends y(c) {
4359
4572
  setup() {
4360
4573
  super.setup();
4361
4574
  let e = this.querySelector(":scope > [slot=\"sidebar\"]");
4362
- e?.querySelector(".layout-resize-handle") && (this.#e = new m(e, {
4575
+ e?.querySelector(".layout-resize-handle") && (this.#e = new u(e, {
4363
4576
  handleSelector: ".layout-resize-handle",
4364
4577
  axis: "horizontal",
4365
4578
  min: 160,
@@ -4415,13 +4628,13 @@ var ve = class extends y(c) {
4415
4628
  for (let e of a) this.#t.observe(e);
4416
4629
  }
4417
4630
  }
4418
- }, We = class extends c {
4631
+ }, qe = class extends _ {
4419
4632
  #e = null;
4420
4633
  #t = !1;
4421
4634
  setup() {
4422
4635
  super.setup();
4423
4636
  let e = this.querySelector(":scope > ui-listbox[popover]");
4424
- e && (this.#e = new p(this), this.#e.wirePopover(this, e), this.addEventListener("click", this.#n), this.addEventListener("ui-dismiss", this.#r));
4637
+ e && (this.#e = new l(this), this.#e.wirePopover(this, e), this.addEventListener("click", this.#n), this.addEventListener("ui-dismiss", this.#r));
4425
4638
  }
4426
4639
  teardown() {
4427
4640
  this.removeEventListener("click", this.#n), this.removeEventListener("ui-dismiss", this.#r), this.#e?.destroy(), this.#e = null, this.#t = !1, super.teardown();
@@ -4432,7 +4645,7 @@ var ve = class extends y(c) {
4432
4645
  #r = () => {
4433
4646
  this.#t = !1, this.#e?.syncPopover(!1);
4434
4647
  };
4435
- }, Ge = class extends c {
4648
+ }, Je = class extends _ {
4436
4649
  #e = null;
4437
4650
  get open() {
4438
4651
  return this.hasAttribute("open");
@@ -4444,7 +4657,30 @@ var ve = class extends y(c) {
4444
4657
  this.open = !this.open;
4445
4658
  }
4446
4659
  setup() {
4447
- super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new m(this, {
4660
+ super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new u(this, {
4661
+ handleSelector: ".layout-resize-handle",
4662
+ axis: "horizontal",
4663
+ min: 280,
4664
+ max: 480,
4665
+ reverse: !0
4666
+ }));
4667
+ }
4668
+ teardown() {
4669
+ this.#e?.destroy(), this.#e = null, super.teardown();
4670
+ }
4671
+ }, Ye = class extends _ {
4672
+ #e = null;
4673
+ get open() {
4674
+ return this.hasAttribute("open");
4675
+ }
4676
+ set open(e) {
4677
+ this.toggleAttribute("open", e);
4678
+ }
4679
+ toggle() {
4680
+ this.open = !this.open;
4681
+ }
4682
+ setup() {
4683
+ super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new u(this, {
4448
4684
  handleSelector: ".layout-resize-handle",
4449
4685
  axis: "horizontal",
4450
4686
  min: 280,
@@ -4456,7 +4692,7 @@ var ve = class extends y(c) {
4456
4692
  this.#e?.destroy(), this.#e = null, super.teardown();
4457
4693
  }
4458
4694
  }, X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Set();
4459
- function Ke(e, t) {
4695
+ function Xe(e, t) {
4460
4696
  X.set(e, t), Z.forEach((t) => t(e));
4461
4697
  }
4462
4698
  function Q(e) {
@@ -4468,21 +4704,23 @@ function $(e) {
4468
4704
  /**
4469
4705
  * Icon component rendering SVG from the global icon registry.
4470
4706
  * @attr {string} name - Icon name from the Phosphor icon set
4707
+ * @attr {string} weight - Icon weight: "regular" (default) or "fill"
4471
4708
  * @attr {string} size - Icon size override
4472
4709
  * @attr {string} aria-label - Accessible label (sets role="img" when present)
4473
4710
  */
4474
- var qe = class extends c {
4711
+ var Ze = class extends _ {
4475
4712
  static observedAttributes = [
4476
4713
  "name",
4714
+ "weight",
4477
4715
  "size",
4478
4716
  "aria-label"
4479
4717
  ];
4480
4718
  #e = null;
4481
4719
  setup() {
4482
- super.setup(), this.#t(), this.#n();
4720
+ super.setup(), this.#t(), this.#r();
4483
4721
  }
4484
4722
  attributeChangedCallback(e, t, n) {
4485
- super.attributeChangedCallback(e, t, n), e === "name" && this.#n(), e === "aria-label" && this.#t();
4723
+ super.attributeChangedCallback(e, t, n), (e === "name" || e === "weight") && this.#r(), e === "aria-label" && this.#t();
4486
4724
  }
4487
4725
  disconnectedCallback() {
4488
4726
  super.disconnectedCallback(), this.#e?.(), this.#e = null;
@@ -4490,16 +4728,21 @@ var qe = class extends c {
4490
4728
  #t() {
4491
4729
  this.hasAttribute("aria-label") ? (this.setAttribute("role", "img"), this.removeAttribute("aria-hidden")) : (this.setAttribute("aria-hidden", "true"), this.removeAttribute("role"));
4492
4730
  }
4731
+ /** Compute the effective registry key from name + weight attributes. */
4493
4732
  #n() {
4494
4733
  let e = this.getAttribute("name");
4734
+ return e ? this.getAttribute("weight") === "fill" && !e.endsWith("-fill") ? `${e}-fill` : e : null;
4735
+ }
4736
+ #r() {
4737
+ let e = this.#n();
4495
4738
  if (!e) {
4496
4739
  this.innerHTML = "", this.#e?.(), this.#e = null;
4497
4740
  return;
4498
4741
  }
4499
4742
  let t = Q(e);
4500
4743
  t ? (this.innerHTML = t, this.#e?.(), this.#e = null) : (this.innerHTML = "", this.#e ||= $((e) => {
4501
- e === this.getAttribute("name") && this.#n();
4744
+ e === this.#n() && this.#r();
4502
4745
  }));
4503
4746
  }
4504
4747
  };
4505
- export { N as $, xe as A, fe as B, Oe as C, _ as Ct, we as D, Te as E, q as F, H as G, ue as H, _e as I, R as J, B as K, he as L, ye as M, J as N, Ce as O, ve as P, P as Q, me as R, ke as S, y as St, Ee as T, g as Tt, U, de as V, V as W, I as X, L as Y, F as Z, Pe as _, ee as _t, Ge as a, D as at, je as b, x as bt, He as c, le as ct, ze as d, oe as dt, M as et, Y as f, ae as ft, Fe as g, te as gt, Ie as h, ne as ht, Ke as i, O as it, be as j, Se as k, Ve as l, ce as lt, Le as m, re as mt, Q as n, A as nt, We as o, E as ot, Re as p, ie as pt, z as q, $ as r, k as rt, Ue as s, T as st, qe as t, j as tt, Be as u, se as ut, Ne as v, w as vt, De as w, v as wt, Ae as x, S as xt, Me as y, C as yt, pe as z };
4748
+ export { I as $, Te as A, ge as B, Me as C, ee as Ct, Oe as D, v as Dt, ke as E, b as Et, J as F, W as G, me as H, be as I, V as J, H as K, q as L, Ce as M, Se as N, De as O, xe as P, L as Q, ye as R, Ne as S, C as St, Ae as T, y as Tt, pe as U, he as V, fe as W, z as X, B as Y, R as Z, Re as _, re as _t, Ye as a, A as at, Fe as b, T as bt, Ke as c, D as ct, We as d, le as dt, F as et, Ue as f, ce as ft, ze as g, ie as gt, Be as h, ae as ht, Xe as i, j as it, we as j, Ee as k, Y as l, E as lt, Ve as m, oe as mt, Q as n, N as nt, Je as o, k as ot, He as p, se as pt, U as q, $ as r, M as rt, qe as s, O as st, Ze as t, P as tt, Ge as u, ue as ut, Le as v, ne as vt, je as w, x as wt, Pe as x, w as xt, Ie as y, te as yt, _e as z };