@blackcube/aurelia-kit 1.0.0-rc3 → 1.0.0-rc5

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 (48) hide show
  1. package/README.md +162 -29
  2. package/dist/index.es.js +1066 -615
  3. package/dist/index.es.js.map +1 -1
  4. package/dist/types/abstracts/components/abstract-dialog.d.ts +41 -0
  5. package/dist/types/abstracts/components/abstract-dialog.d.ts.map +1 -0
  6. package/dist/types/abstracts/components/abstract-dropdown.d.ts +105 -0
  7. package/dist/types/abstracts/components/abstract-dropdown.d.ts.map +1 -0
  8. package/dist/types/abstracts/components/abstract-pager.d.ts +51 -0
  9. package/dist/types/abstracts/components/abstract-pager.d.ts.map +1 -0
  10. package/dist/types/abstracts/components/abstract-toaster.d.ts +42 -0
  11. package/dist/types/abstracts/components/abstract-toaster.d.ts.map +1 -0
  12. package/dist/types/abstracts/components/index.d.ts +7 -0
  13. package/dist/types/abstracts/components/index.d.ts.map +1 -0
  14. package/dist/types/attributes/ajaxify-trigger.d.ts.map +1 -1
  15. package/dist/types/attributes/alert.d.ts.map +1 -1
  16. package/dist/types/attributes/badge.d.ts.map +1 -1
  17. package/dist/types/attributes/burger.d.ts.map +1 -1
  18. package/dist/types/attributes/dropdown.d.ts.map +1 -1
  19. package/dist/types/attributes/focus.d.ts.map +1 -1
  20. package/dist/types/attributes/menu.d.ts.map +1 -1
  21. package/dist/types/attributes/modal-trigger.d.ts.map +1 -1
  22. package/dist/types/attributes/overlay.d.ts.map +1 -1
  23. package/dist/types/attributes/pager.d.ts.map +1 -1
  24. package/dist/types/attributes/password.d.ts.map +1 -1
  25. package/dist/types/attributes/popover-trigger.d.ts.map +1 -1
  26. package/dist/types/attributes/popover.d.ts.map +1 -1
  27. package/dist/types/attributes/profile.d.ts.map +1 -1
  28. package/dist/types/attributes/tabs.d.ts.map +1 -1
  29. package/dist/types/attributes/toast.d.ts.map +1 -1
  30. package/dist/types/attributes/toaster-trigger.d.ts.map +1 -1
  31. package/dist/types/attributes/toaster.d.ts.map +1 -1
  32. package/dist/types/components/bleet-ajaxify.d.ts.map +1 -1
  33. package/dist/types/components/bleet-dialog.d.ts +13 -35
  34. package/dist/types/components/bleet-dialog.d.ts.map +1 -1
  35. package/dist/types/components/index.d.ts +0 -2
  36. package/dist/types/components/index.d.ts.map +1 -1
  37. package/dist/types/index.d.ts +5 -4
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/dist/types/interfaces/event-aggregator.d.ts +2 -1
  40. package/dist/types/interfaces/event-aggregator.d.ts.map +1 -1
  41. package/dist/types/services/storage-service.d.ts.map +1 -1
  42. package/dist/types/services/transition-service.d.ts.map +1 -1
  43. package/dist/types/services/trap-focus-service.d.ts +17 -1
  44. package/dist/types/services/trap-focus-service.d.ts.map +1 -1
  45. package/dist/types/utils/toaster.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/dist/types/components/bleet-toaster.d.ts +0 -43
  48. package/dist/types/components/bleet-toaster.d.ts.map +0 -1
package/dist/index.es.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { AjaxifyCodec as e, ApiConfiguration as t, IApiService as n } from "@blackcube/aurelia-api";
2
- import { DI as r, IEventAggregator as i, ILogger as a, INode as o, IPlatform as s, bindable as c, customAttribute as l, customElement as u, queueTask as d, resolve as f } from "aurelia";
3
- import { CustomElement as p } from "@aurelia/runtime-html";
2
+ import { BindingMode as r, DI as i, IEventAggregator as a, ILogger as o, INode as s, IPlatform as c, bindable as l, customAttribute as u, customElement as d, observable as f, queueTask as p, resolve as m } from "aurelia";
3
+ import { CustomElement as h } from "@aurelia/runtime-html";
4
4
  //#region \0rolldown/runtime.js
5
- var m = Object.defineProperty, h = (e, t) => {
5
+ var g = Object.defineProperty, _ = (e, t) => {
6
6
  let n = {};
7
- for (var r in e) m(n, r, {
7
+ for (var r in e) g(n, r, {
8
8
  get: e[r],
9
9
  enumerable: !0
10
10
  });
11
- return t || m(n, Symbol.toStringTag, { value: "Module" }), n;
12
- }, g = /*@__PURE__*/ r.createInterface("IStorageService", (e) => e.singleton(_)), _ = class {
11
+ return t || g(n, Symbol.toStringTag, { value: "Module" }), n;
12
+ }, v = /*@__PURE__*/ i.createInterface("IStorageService", (e) => e.singleton(y)), y = class {
13
13
  logger;
14
14
  p;
15
- constructor(e = f(a).scopeTo("StorageService"), t = f(s)) {
15
+ constructor(e = m(o).scopeTo("StorageService"), t = m(c)) {
16
16
  this.logger = e, this.p = t, this.logger.trace("constructor");
17
17
  }
18
18
  load(e, t = null) {
@@ -31,11 +31,11 @@ var m = Object.defineProperty, h = (e, t) => {
31
31
  remove(e) {
32
32
  this.logger.trace("remove", e), localStorage.removeItem(e);
33
33
  }
34
- }, v = /*@__PURE__*/ r.createInterface("ITransitionService", (e) => e.singleton(y)), y = class {
34
+ }, b = /*@__PURE__*/ i.createInterface("ITransitionService", (e) => e.singleton(x)), x = class {
35
35
  logger;
36
36
  p;
37
37
  securityTimeout = 2e3;
38
- constructor(e = f(a).scopeTo("TransitionService"), t = f(s)) {
38
+ constructor(e = m(o).scopeTo("TransitionService"), t = m(c)) {
39
39
  this.logger = e, this.p = t, this.logger.trace("constructor");
40
40
  }
41
41
  run(e, t, n) {
@@ -46,7 +46,7 @@ var m = Object.defineProperty, h = (e, t) => {
46
46
  this.logger.trace("before()"), t(e);
47
47
  }));
48
48
  }
49
- }, b = /*@__PURE__*/ r.createInterface("ITrapFocusService", (e) => e.transient(x)), x = class {
49
+ }, S = /*@__PURE__*/ i.createInterface("ITrapFocusService", (e) => e.transient(C)), C = class {
50
50
  logger;
51
51
  p;
52
52
  focusableElementsQuerySelector = "[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"]), [accesskey], summary, canvas, audio, video, details, iframe, [contenteditable]";
@@ -58,7 +58,7 @@ var m = Object.defineProperty, h = (e, t) => {
58
58
  focusableElements = [];
59
59
  lastFocusedElement = null;
60
60
  started = !1;
61
- constructor(e = f(a).scopeTo("TrapFocusService"), t = f(s)) {
61
+ constructor(e = m(o).scopeTo("TrapFocusService"), t = m(c)) {
62
62
  this.logger = e, this.p = t, this.logger.trace("constructor");
63
63
  }
64
64
  buildFocusableElements() {
@@ -96,27 +96,25 @@ var m = Object.defineProperty, h = (e, t) => {
96
96
  this.logger.trace("cleanup"), this.started &&= (this.opener = null, this.startCallback = null, this.stopCallback = null, this.target = null, this.lastFocusedElement = null, this.focusableElements = [], !1);
97
97
  }
98
98
  focusedElementIndex() {
99
- let e = -1;
100
- return this.lastFocusedElement && (e = this.focusableElements.indexOf(this.lastFocusedElement)), e === -1 && this.lastFocusedElement !== void 0 && (this.lastFocusedElement = null), e;
99
+ this.buildFocusableElements();
100
+ let e = this.p.document.activeElement;
101
+ return e !== null && this.focusableElements.includes(e) === !0 && (this.lastFocusedElement = e), this.lastFocusedElement === null ? -1 : this.focusableElements.indexOf(this.lastFocusedElement);
101
102
  }
102
103
  focusPreviousElement(e = !0) {
103
- let t = this.focusedElementIndex();
104
- if (t === -1) return null;
105
- let n = !1;
106
- return t === 0 && e === !0 ? (this.lastFocusedElement = this.focusableElements[this.focusableElements.length - 1], n = !0) : t > 0 && (this.lastFocusedElement = this.focusableElements[t - 1], n = !0), n === !0 && this.p.requestAnimationFrame(() => {
107
- this.logger.trace("focusPreviousElement: focusing", this.lastFocusedElement), this.lastFocusedElement?.focus();
108
- }), this.lastFocusedElement;
104
+ let t = this.focusedElementIndex(), n = this.focusableElements.length - 1, r = -1;
105
+ return t === -1 || t === 0 && e === !0 ? r = n : t > 0 && (r = t - 1), this.focusAt(r);
109
106
  }
110
107
  focusNextElement(e = !0) {
111
- let t = this.focusedElementIndex();
112
- if (t === -1) return null;
113
- let n = !1;
114
- return t === this.focusableElements.length - 1 && e === !0 ? (this.lastFocusedElement = this.focusableElements[0], n = !0) : t < this.focusableElements.length - 1 && (this.lastFocusedElement = this.focusableElements[t + 1], n = !0), n === !0 && this.p.requestAnimationFrame(() => {
115
- this.logger.trace("focusNextElement: focusing", this.lastFocusedElement), this.lastFocusedElement?.focus();
116
- }), this.lastFocusedElement;
108
+ let t = this.focusedElementIndex(), n = this.focusableElements.length - 1, r = -1;
109
+ return t === -1 || t === n && e === !0 ? r = 0 : t < n && (r = t + 1), this.focusAt(r);
110
+ }
111
+ focusAt(e) {
112
+ return e >= 0 && e < this.focusableElements.length && (this.lastFocusedElement = this.focusableElements[e], this.p.requestAnimationFrame(() => {
113
+ this.logger.trace("focusAt: focusing", this.lastFocusedElement), this.lastFocusedElement?.focus();
114
+ })), this.lastFocusedElement;
117
115
  }
118
116
  onKeyDown = (e) => {
119
- e.key === "Tab" ? e.shiftKey ? (e.preventDefault(), this.lastFocusedElement = this.focusPreviousElement(!0)) : (e.preventDefault(), this.lastFocusedElement = this.focusNextElement(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), this.lastFocusedElement = this.focusPreviousElement(!1)) : e.key === "ArrowDown" ? (e.preventDefault(), this.lastFocusedElement = this.focusNextElement(!1)) : e.key === "Escape" && (e.preventDefault(), this.stop());
117
+ e.key === "Tab" ? (e.preventDefault(), e.shiftKey ? this.focusPreviousElement(!0) : this.focusNextElement(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), this.focusPreviousElement(!1)) : e.key === "ArrowDown" ? (e.preventDefault(), this.focusNextElement(!1)) : e.key === "Escape" && (e.preventDefault(), this.stop());
120
118
  };
121
119
  onClickOutside = (e) => {
122
120
  this.logger.trace("onClickOutside", e), this.started && this.globalElement && e.target && (this.logger.trace("onClickOutside: checking if click is outside globalElement", e.target, this.globalElement), this.globalElement.contains(e.target) || this.stop());
@@ -124,11 +122,11 @@ var m = Object.defineProperty, h = (e, t) => {
124
122
  };
125
123
  //#endregion
126
124
  //#region src/utils/state-classes.ts
127
- function S(e, t, n, r = e) {
125
+ function w(e, t, n, r = e) {
128
126
  let i = n === "show" ? "hide" : "show";
129
- e.classList.remove(...C(r, t, i)), e.classList.add(...C(r, t, n));
127
+ e.classList.remove(...T(r, t, i)), e.classList.add(...T(r, t, n));
130
128
  }
131
- function C(e, t, n) {
129
+ function T(e, t, n) {
132
130
  let r = [];
133
131
  return (e.getAttribute(`data-${t}-${n}`) ?? "").split(" ").forEach((e) => {
134
132
  e !== "" && r.push(e);
@@ -136,14 +134,10 @@ function C(e, t, n) {
136
134
  }
137
135
  //#endregion
138
136
  //#region src/enums/event-aggregator.ts
139
- var w = /* @__PURE__ */ function(e) {
137
+ var E = /* @__PURE__ */ function(e) {
140
138
  return e.Overlay = "bleet:overlay", e.OverlayStatus = "bleet:overlay:status", e.Modal = "bleet:modal", e.ModalStatus = "bleet:modal:status", e.Toaster = "bleet:toaster", e.ToasterStatus = "bleet:toaster:status", e.Menu = "bleet:menu", e.MenuStatus = "bleet:menu:status", e.Badge = "bleet:badge", e.Profile = "bleet:profile", e.ProfileStatus = "bleet:profile:status", e.Ajaxify = "bleet:ajaxify", e.Popover = "bleet:popover", e.PopoverStatus = "bleet:popover:status", e.Upload = "bleet:upload", e;
141
- }({}), T = /* @__PURE__ */ function(e) {
142
- return e.Reset = "reset", e;
143
- }({}), E = /* @__PURE__ */ function(e) {
144
- return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
145
139
  }({}), D = /* @__PURE__ */ function(e) {
146
- return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
140
+ return e.Reset = "reset", e;
147
141
  }({}), O = /* @__PURE__ */ function(e) {
148
142
  return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
149
143
  }({}), k = /* @__PURE__ */ function(e) {
@@ -153,30 +147,34 @@ var w = /* @__PURE__ */ function(e) {
153
147
  }({}), j = /* @__PURE__ */ function(e) {
154
148
  return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
155
149
  }({}), M = /* @__PURE__ */ function(e) {
156
- return e.Refresh = "refresh", e.Run = "run", e;
150
+ return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
157
151
  }({}), N = /* @__PURE__ */ function(e) {
158
- return e.Classic = "classic", e.PublishOnly = "publishOnly", e;
152
+ return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
159
153
  }({}), P = /* @__PURE__ */ function(e) {
154
+ return e.Refresh = "refresh", e.Run = "run", e;
155
+ }({}), F = /* @__PURE__ */ function(e) {
156
+ return e.Classic = "classic", e.PublishOnly = "publishOnly", e;
157
+ }({}), I = /* @__PURE__ */ function(e) {
160
158
  return e.Add = "add", e.Remove = "remove", e;
161
159
  }({}), ee = /* @__PURE__ */ function(e) {
162
160
  return e.Added = "added", e.Removed = "removed", e;
163
- }({}), F = /* @__PURE__ */ function(e) {
161
+ }({}), L = /* @__PURE__ */ function(e) {
164
162
  return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
165
163
  }({}), te = /* @__PURE__ */ function(e) {
166
164
  return e.Remove = "remove", e;
167
- }({}), I = /* @__PURE__ */ function(e) {
168
- return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
169
- }({}), L = /* @__PURE__ */ function(e) {
170
- return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
171
165
  }({}), R = /* @__PURE__ */ function(e) {
172
166
  return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
173
167
  }({}), z = /* @__PURE__ */ function(e) {
174
- return e.Primary = "primary", e.Secondary = "secondary", e.Success = "success", e.Danger = "danger", e.Warning = "warning", e.Info = "info", e.Accent = "accent", e;
168
+ return e.Open = "open", e.Close = "close", e.Toggle = "toggle", e;
175
169
  }({}), B = /* @__PURE__ */ function(e) {
170
+ return e.Opening = "opening", e.Closing = "closing", e.Opened = "opened", e.Closed = "closed", e;
171
+ }({}), V = /* @__PURE__ */ function(e) {
172
+ return e.Primary = "primary", e.Secondary = "secondary", e.Success = "success", e.Danger = "danger", e.Warning = "warning", e.Info = "info", e.Accent = "accent", e;
173
+ }({}), H = /* @__PURE__ */ function(e) {
176
174
  return e.Info = "information-circle", e.Success = "check-circle", e.Warning = "exclamation-triangle", e.Danger = "x-circle", e;
177
175
  }({}), ne = /* @__PURE__ */ function(e) {
178
176
  return e.Info = "information-circle", e.Success = "check-circle", e.Warning = "exclamation-triangle", e.Danger = "x-circle", e.InformationCircle = "information-circle", e.CheckCircle = "check-circle", e.ExclamationTriangle = "exclamation-triangle", e.XCircle = "x-circle", e;
179
- }({}), V = /* @__PURE__ */ function(e) {
177
+ }({}), U = /* @__PURE__ */ function(e) {
180
178
  return e.Keep = "keep", e.Close = "close", e.RefreshAndClose = "refreshAndClose", e;
181
179
  }({});
182
180
  //#endregion
@@ -311,15 +309,15 @@ function se(e, t, n, r, i, a) {
311
309
  }
312
310
  };
313
311
  }
314
- var ce = l("bleet-burger"), le, H;
312
+ var ce = u("bleet-burger"), le, W;
315
313
  (class {
316
314
  logger;
317
315
  ea;
318
316
  element;
319
317
  static {
320
- ({c: [H, le]} = se(this, [ce], []));
318
+ ({c: [W, le]} = se(this, [ce], []));
321
319
  }
322
- constructor(e = f(a).scopeTo("bleet-burger"), t = f(i), n = f(o)) {
320
+ constructor(e = m(o).scopeTo("bleet-burger"), t = m(a), n = m(s)) {
323
321
  this.logger = e, this.ea = t, this.element = n, this.logger.trace("constructor");
324
322
  }
325
323
  attached() {
@@ -329,7 +327,7 @@ var ce = l("bleet-burger"), le, H;
329
327
  this.logger.trace("detaching"), this.element.removeEventListener("click", this.onClickButton);
330
328
  }
331
329
  onClickButton = (e) => {
332
- this.logger.trace("onClickButton", e), e.preventDefault(), this.ea.publish(w.Menu, { action: F.Open });
330
+ this.logger.trace("onClickButton", e), e.preventDefault(), this.ea.publish(E.Menu, { action: L.Open });
333
331
  };
334
332
  static {
335
333
  le();
@@ -467,7 +465,7 @@ function me(e, t, n, r, i, a) {
467
465
  }
468
466
  };
469
467
  }
470
- var he = l("bleet-menu"), ge, U;
468
+ var he = u("bleet-menu"), ge, G;
471
469
  (class {
472
470
  logger;
473
471
  ea;
@@ -476,10 +474,10 @@ var he = l("bleet-menu"), ge, U;
476
474
  transitionService;
477
475
  storageService;
478
476
  static {
479
- ({c: [U, ge]} = me(this, [he], []));
477
+ ({c: [G, ge]} = me(this, [he], []));
480
478
  }
481
- constructor(e = f(a).scopeTo("bleet-menu"), t = f(i), n = f(o), r = f(s), c = f(v), l = f(g)) {
482
- this.logger = e, this.ea = t, this.element = n, this.p = r, this.transitionService = c, this.storageService = l, this.logger.trace("constructor");
479
+ constructor(e = m(o).scopeTo("bleet-menu"), t = m(a), n = m(s), r = m(c), i = m(b), l = m(v)) {
480
+ this.logger = e, this.ea = t, this.element = n, this.p = r, this.transitionService = i, this.storageService = l, this.logger.trace("constructor");
483
481
  }
484
482
  disposable;
485
483
  disposableOverlay;
@@ -491,7 +489,7 @@ var he = l("bleet-menu"), ge, U;
491
489
  this.logger.trace("attaching"), this.closeButton = this.element.querySelector("[data-menu=close]"), this.toggleButtons = this.element.querySelectorAll("[data-menu^=\"toggle-button\"]"), this.initMenuButtons();
492
490
  }
493
491
  attached() {
494
- this.logger.trace("attached"), this.disposable = this.ea.subscribe(w.Menu, this.onMenuEvent), this.disposableOverlay = this.ea.subscribe(w.OverlayStatus, this.onOverlayStatus), this.closeButton?.addEventListener("click", this.onClickClose), this.element.addEventListener("click", this.onClickToggleButtons);
492
+ this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Menu, this.onMenuEvent), this.disposableOverlay = this.ea.subscribe(E.OverlayStatus, this.onOverlayStatus), this.closeButton?.addEventListener("click", this.onClickClose), this.element.addEventListener("click", this.onClickToggleButtons);
495
493
  }
496
494
  detaching() {
497
495
  this.logger.trace("detaching"), this.closeButton?.removeEventListener("click", this.onClickClose), this.element.removeEventListener("click", this.onClickToggleButtons), this.disposableOverlay?.dispose(), this.disposable?.dispose();
@@ -501,16 +499,16 @@ var he = l("bleet-menu"), ge, U;
501
499
  }
502
500
  open(e = !1) {
503
501
  this.isOpen || (this.logger.trace("open"), this.isOpen = !0, this.transitionService.run(this.element, (t) => {
504
- e || this.ea.publish(w.Overlay, { action: E.Open }), this.ea.publish(w.MenuStatus, { status: I.Opening }), S(t, "menu", "show"), t.ariaHidden = "false";
502
+ e || this.ea.publish(E.Overlay, { action: O.Open }), this.ea.publish(E.MenuStatus, { status: R.Opening }), w(t, "menu", "show"), t.ariaHidden = "false";
505
503
  }, (e) => {
506
- this.ea.publish(w.MenuStatus, { status: I.Opened });
504
+ this.ea.publish(E.MenuStatus, { status: R.Opened });
507
505
  }));
508
506
  }
509
507
  close(e = !1) {
510
508
  this.isOpen && (this.logger.trace("close"), this.isOpen = !1, this.transitionService.run(this.element, (t) => {
511
- this.ea.publish(w.MenuStatus, { status: I.Closing }), e || this.ea.publish(w.Overlay, { action: E.Close }), S(t, "menu", "hide"), t.ariaHidden = "true";
509
+ this.ea.publish(E.MenuStatus, { status: R.Closing }), e || this.ea.publish(E.Overlay, { action: O.Close }), w(t, "menu", "hide"), t.ariaHidden = "true";
512
510
  }, (e) => {
513
- this.ea.publish(w.MenuStatus, { status: I.Closed });
511
+ this.ea.publish(E.MenuStatus, { status: R.Closed });
514
512
  }));
515
513
  }
516
514
  onClickClose = (e) => {
@@ -551,14 +549,14 @@ var he = l("bleet-menu"), ge, U;
551
549
  let n = this.sublists.get(e);
552
550
  if (n !== void 0) {
553
551
  let r = e.dataset.menu?.replace("toggle-button-", "");
554
- n.list.hidden = t === !1, S(n.svg, "menu", t === !0 ? "show" : "hide"), e.ariaExpanded = t === !0 ? "true" : "false", this.storageService.save(`toggle-list-${r}`, t);
552
+ n.list.hidden = t === !1, w(n.svg, "menu", t === !0 ? "show" : "hide"), e.ariaExpanded = t === !0 ? "true" : "false", this.storageService.save(`toggle-list-${r}`, t);
555
553
  }
556
554
  }
557
555
  onMenuEvent = (e) => {
558
- this.logger.trace("onMenuEvent", e), e.action === F.Close ? (this.logger.trace("Menu Close action received"), this.close()) : e.action === F.Open ? (this.logger.trace("Menu Open action received"), this.open()) : e.action === F.Toggle && (this.logger.trace("Menu Toggle action received"), this.isOpen === !0 ? this.close() : this.open());
556
+ this.logger.trace("onMenuEvent", e), e.action === L.Close ? (this.logger.trace("Menu Close action received"), this.close()) : e.action === L.Open ? (this.logger.trace("Menu Open action received"), this.open()) : e.action === L.Toggle && (this.logger.trace("Menu Toggle action received"), this.isOpen === !0 ? this.close() : this.open());
559
557
  };
560
558
  onOverlayStatus = (e) => {
561
- e.status === D.Closing ? (this.logger.trace("Overlay Close action received"), this.close(!0)) : this.logger.trace("onOverlayStatus unhandled", e);
559
+ e.status === k.Closing ? (this.logger.trace("Overlay Close action received"), this.close(!0)) : this.logger.trace("onOverlayStatus unhandled", e);
562
560
  };
563
561
  static {
564
562
  ge();
@@ -696,22 +694,22 @@ function xe(e, t, n, r, i, a) {
696
694
  }
697
695
  };
698
696
  }
699
- var Se = l({
697
+ var Se = u({
700
698
  name: "bleet-badge",
701
699
  defaultProperty: "id"
702
- }), Ce, we, Te, W;
700
+ }), Ce, we, Te, K;
703
701
  (class {
704
702
  logger;
705
703
  ea;
706
704
  element;
707
705
  static {
708
- ({e: [we, Te], c: [W, Ce]} = xe(this, [Se], [[
709
- c,
706
+ ({e: [we, Te], c: [K, Ce]} = xe(this, [Se], [[
707
+ l,
710
708
  0,
711
709
  "id"
712
710
  ]]));
713
711
  }
714
- constructor(e = f(a).scopeTo("bleet-badge"), t = f(i), n = f(o)) {
712
+ constructor(e = m(o).scopeTo("bleet-badge"), t = m(a), n = m(s)) {
715
713
  this.logger = e, this.ea = t, this.element = n, this.logger.trace("constructor");
716
714
  }
717
715
  closeButton;
@@ -723,7 +721,7 @@ var Se = l({
723
721
  this.logger.trace("detaching"), this.closeButton?.removeEventListener("click", this.onClickRemove);
724
722
  }
725
723
  onClickRemove = (Te(this), (e) => {
726
- this.logger.trace("onClickRemove", e), e.preventDefault(), this.ea.publish(w.Badge, {
724
+ this.logger.trace("onClickRemove", e), e.preventDefault(), this.ea.publish(E.Badge, {
727
725
  action: te.Remove,
728
726
  id: this.id
729
727
  }), this.element.remove();
@@ -864,15 +862,15 @@ function Ae(e, t, n, r, i, a) {
864
862
  }
865
863
  };
866
864
  }
867
- var je = l("bleet-dropdown"), Me, G;
865
+ var je = u("bleet-dropdown"), Me, q;
868
866
  (class {
869
867
  logger;
870
868
  element;
871
869
  trapFocusService;
872
870
  static {
873
- ({c: [G, Me]} = Ae(this, [je], []));
871
+ ({c: [q, Me]} = Ae(this, [je], []));
874
872
  }
875
- constructor(e = f(a).scopeTo("bleet-dropdown"), t = f(o), n = f(b)) {
873
+ constructor(e = m(o).scopeTo("bleet-dropdown"), t = m(s), n = m(S)) {
876
874
  this.logger = e, this.element = t, this.trapFocusService = n, this.logger.trace("constructor");
877
875
  }
878
876
  select;
@@ -1010,7 +1008,7 @@ var je = l("bleet-dropdown"), Me, G;
1010
1008
  let t = this.itemsContainer?.querySelector(`[data-value="${CSS.escape(e.value)}"]`);
1011
1009
  if (!t) return;
1012
1010
  let n = t.querySelector("[data-dropdown=item-check]");
1013
- e.selected ? (S(t, "dropdown", "show"), n && S(n, "dropdown", "show"), t.setAttribute("aria-selected", "true"), this.button?.setAttribute("aria-activedescendant", t.id)) : (S(t, "dropdown", "hide"), n && S(n, "dropdown", "hide"), t.setAttribute("aria-selected", "false"));
1011
+ e.selected ? (w(t, "dropdown", "show"), n && w(n, "dropdown", "show"), t.setAttribute("aria-selected", "true"), this.button?.setAttribute("aria-activedescendant", t.id)) : (w(t, "dropdown", "hide"), n && w(n, "dropdown", "hide"), t.setAttribute("aria-selected", "false"));
1014
1012
  }), this.updateDisplay();
1015
1013
  }
1016
1014
  preparePanel() {
@@ -1174,14 +1172,14 @@ function Le(e, t, n, r, i, a) {
1174
1172
  }
1175
1173
  };
1176
1174
  }
1177
- var Re = l("bleet-password"), ze, K;
1175
+ var Re = u("bleet-password"), ze, J;
1178
1176
  (class {
1179
1177
  logger;
1180
1178
  element;
1181
1179
  static {
1182
- ({c: [K, ze]} = Le(this, [Re], []));
1180
+ ({c: [J, ze]} = Le(this, [Re], []));
1183
1181
  }
1184
- constructor(e = f(a).scopeTo("bleet-password"), t = f(o)) {
1182
+ constructor(e = m(o).scopeTo("bleet-password"), t = m(s)) {
1185
1183
  this.logger = e, this.element = t;
1186
1184
  }
1187
1185
  button;
@@ -1200,7 +1198,7 @@ var Re = l("bleet-password"), ze, K;
1200
1198
  onToggle = (e) => {
1201
1199
  e.preventDefault();
1202
1200
  let t = this.input?.type === "password";
1203
- this.input && (this.input.type = t ? "text" : "password"), this.iconHidden && S(this.iconHidden, "password", t ? "hide" : "show"), this.iconVisible && S(this.iconVisible, "password", t ? "show" : "hide");
1201
+ this.input && (this.input.type = t ? "text" : "password"), this.iconHidden && w(this.iconHidden, "password", t ? "hide" : "show"), this.iconVisible && w(this.iconVisible, "password", t ? "show" : "hide");
1204
1202
  };
1205
1203
  static {
1206
1204
  ze();
@@ -1338,15 +1336,15 @@ function We(e, t, n, r, i, a) {
1338
1336
  }
1339
1337
  };
1340
1338
  }
1341
- var Ge = l("bleet-tabs"), Ke, q;
1339
+ var Ge = u("bleet-tabs"), Ke, Y;
1342
1340
  (class {
1343
1341
  logger;
1344
1342
  element;
1345
1343
  p;
1346
1344
  static {
1347
- ({c: [q, Ke]} = We(this, [Ge], []));
1345
+ ({c: [Y, Ke]} = We(this, [Ge], []));
1348
1346
  }
1349
- constructor(e = f(a).scopeTo("bleet-tabs"), t = f(o), n = f(s)) {
1347
+ constructor(e = m(o).scopeTo("bleet-tabs"), t = m(s), n = m(c)) {
1350
1348
  this.logger = e, this.element = t, this.p = n, this.logger.trace("constructor");
1351
1349
  }
1352
1350
  activeClasses = "";
@@ -1517,10 +1515,10 @@ function Ze(e, t, n, r, i, a) {
1517
1515
  }
1518
1516
  };
1519
1517
  }
1520
- var Qe = l({
1518
+ var Qe = u({
1521
1519
  name: "bleet-profile",
1522
1520
  defaultProperty: "id"
1523
- }), $e, et, tt, J;
1521
+ }), $e, et, tt, X;
1524
1522
  (class {
1525
1523
  logger;
1526
1524
  ea;
@@ -1529,14 +1527,14 @@ var Qe = l({
1529
1527
  p;
1530
1528
  trapFocusService;
1531
1529
  static {
1532
- ({e: [et, tt], c: [J, $e]} = Ze(this, [Qe], [[
1533
- c,
1530
+ ({e: [et, tt], c: [X, $e]} = Ze(this, [Qe], [[
1531
+ l,
1534
1532
  0,
1535
1533
  "id"
1536
1534
  ]]));
1537
1535
  }
1538
- constructor(e = f(a).scopeTo("bleet-profile"), t = f(i), n = f(o), r = f(v), c = f(s), l = f(b)) {
1539
- this.logger = e, this.ea = t, this.element = n, this.transitionService = r, this.p = c, this.trapFocusService = l, this.logger.trace("constructor");
1536
+ constructor(e = m(o).scopeTo("bleet-profile"), t = m(a), n = m(s), r = m(b), i = m(c), l = m(S)) {
1537
+ this.logger = e, this.ea = t, this.element = n, this.transitionService = r, this.p = i, this.trapFocusService = l, this.logger.trace("constructor");
1540
1538
  }
1541
1539
  id = et(this, "");
1542
1540
  disposable = (tt(this), void 0);
@@ -1547,7 +1545,7 @@ var Qe = l({
1547
1545
  this.logger.trace("attaching"), this.toggleButton = this.element.querySelector("[data-profile=toggle]"), this.panel = this.element.querySelector("[data-profile=panel]");
1548
1546
  }
1549
1547
  attached() {
1550
- this.logger.trace("attached"), this.disposable = this.ea.subscribe(w.Profile, this.onProfileEvent), this.toggleButton?.addEventListener("click", this.onClickToggle);
1548
+ this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Profile, this.onProfileEvent), this.toggleButton?.addEventListener("click", this.onClickToggle);
1551
1549
  }
1552
1550
  detaching() {
1553
1551
  this.logger.trace("detaching"), this.toggleButton?.removeEventListener("click", this.onClickToggle), this.isOpen && this.trapFocusService.stop(), this.disposable?.dispose();
@@ -1559,18 +1557,18 @@ var Qe = l({
1559
1557
  this.logger.trace("onClickToggle", e), e.preventDefault(), this.isOpen ? this.close() : this.open();
1560
1558
  };
1561
1559
  onStopTrapFocus = () => (this.logger.trace("onStopTrapFocus"), this.isOpen = !1, this.toggleButton?.setAttribute("aria-expanded", "false"), this.transitionService.run(this.panel, (e) => {
1562
- this.ea.publish(w.Profile, {
1563
- action: O.Close,
1560
+ this.ea.publish(E.Profile, {
1561
+ action: A.Close,
1564
1562
  id: this.id
1565
- }), this.ea.publish(w.ProfileStatus, {
1566
- status: k.Closing,
1563
+ }), this.ea.publish(E.ProfileStatus, {
1564
+ status: j.Closing,
1567
1565
  id: this.id
1568
1566
  }), this.p.requestAnimationFrame(() => {
1569
- S(e, "profile", "hide");
1567
+ w(e, "profile", "hide");
1570
1568
  });
1571
1569
  }, (e) => {
1572
- e.hidden = !0, this.ea.publish(w.ProfileStatus, {
1573
- status: k.Closed,
1570
+ e.hidden = !0, this.ea.publish(E.ProfileStatus, {
1571
+ status: j.Closed,
1574
1572
  id: this.id
1575
1573
  });
1576
1574
  }), Promise.resolve());
@@ -1579,18 +1577,18 @@ var Qe = l({
1579
1577
  let e = this.panel?.querySelector("a, button");
1580
1578
  return this.trapFocusService.start(this.toggleButton, this.panel, this.element, void 0, this.onStopTrapFocus, e).then(() => {
1581
1579
  this.panel.hidden = !1, this.transitionService.run(this.panel, (e) => {
1582
- this.ea.publish(w.Profile, {
1583
- action: O.Open,
1580
+ this.ea.publish(E.Profile, {
1581
+ action: A.Open,
1584
1582
  id: this.id
1585
- }), this.ea.publish(w.ProfileStatus, {
1586
- status: k.Opening,
1583
+ }), this.ea.publish(E.ProfileStatus, {
1584
+ status: j.Opening,
1587
1585
  id: this.id
1588
1586
  }), this.p.requestAnimationFrame(() => {
1589
- S(e, "profile", "show");
1587
+ w(e, "profile", "show");
1590
1588
  });
1591
1589
  }, () => {
1592
- this.ea.publish(w.ProfileStatus, {
1593
- status: k.Opened,
1590
+ this.ea.publish(E.ProfileStatus, {
1591
+ status: j.Opened,
1594
1592
  id: this.id
1595
1593
  });
1596
1594
  });
@@ -1602,7 +1600,7 @@ var Qe = l({
1602
1600
  onProfileEvent = (e) => {
1603
1601
  this.logger.trace("onProfileEvent", e);
1604
1602
  let t = e.id === void 0 || e.id === this.id;
1605
- e.action === O.Close && t && this.isOpen && (this.logger.trace("Profile Close action received"), this.close());
1603
+ e.action === A.Close && t && this.isOpen && (this.logger.trace("Profile Close action received"), this.close());
1606
1604
  };
1607
1605
  static {
1608
1606
  $e();
@@ -1740,18 +1738,18 @@ function ot(e, t, n, r, i, a) {
1740
1738
  }
1741
1739
  };
1742
1740
  }
1743
- var st = l({
1741
+ var st = u({
1744
1742
  name: "bleet-toaster-trigger",
1745
1743
  defaultProperty: "id"
1746
- }), ct, lt = c(), ut = c(), dt = c(), ft = c(), pt = c(), mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt, Y;
1744
+ }), ct, lt = l(), ut = l(), dt = l(), ft = l(), pt = l(), mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt, Z;
1747
1745
  (class {
1748
1746
  logger;
1749
1747
  element;
1750
1748
  ea;
1751
1749
  static {
1752
- ({e: [mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt], c: [Y, ct]} = ot(this, [st], [
1750
+ ({e: [mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, Tt], c: [Z, ct]} = ot(this, [st], [
1753
1751
  [
1754
- c,
1752
+ l,
1755
1753
  0,
1756
1754
  "id"
1757
1755
  ],
@@ -1782,12 +1780,12 @@ var st = l({
1782
1780
  ]
1783
1781
  ]));
1784
1782
  }
1785
- constructor(e = f(a).scopeTo("bleet-toaster-trigger"), t = f(o), n = f(i)) {
1783
+ constructor(e = m(o).scopeTo("bleet-toaster-trigger"), t = m(s), n = m(a)) {
1786
1784
  this.logger = e, this.element = t, this.ea = n, this.logger.trace("constructor");
1787
1785
  }
1788
1786
  id = mt(this, "");
1789
- color = (ht(this), gt(this, z.Info));
1790
- icon = (_t(this), vt(this, B.Info));
1787
+ color = (ht(this), gt(this, V.Info));
1788
+ icon = (_t(this), vt(this, H.Info));
1791
1789
  title = (yt(this), bt(this, ""));
1792
1790
  content = (xt(this), St(this, ""));
1793
1791
  duration = (Ct(this), wt(this, 0));
@@ -1801,8 +1799,8 @@ var st = l({
1801
1799
  this.logger.trace("detaching"), this.element.removeEventListener("click", this.onClick);
1802
1800
  }
1803
1801
  onClick = (Tt(this), (e) => {
1804
- this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(w.Toaster, {
1805
- action: P.Add,
1802
+ this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(E.Toaster, {
1803
+ action: I.Add,
1806
1804
  toast: {
1807
1805
  id: this.id,
1808
1806
  duration: this.duration,
@@ -1949,16 +1947,16 @@ function At(e, t, n, r, i, a) {
1949
1947
  }
1950
1948
  };
1951
1949
  }
1952
- var jt = l("bleet-alert"), Mt, X;
1950
+ var jt = u("bleet-alert"), Mt, Q;
1953
1951
  (class {
1954
1952
  logger;
1955
1953
  element;
1956
1954
  p;
1957
1955
  transitionService;
1958
1956
  static {
1959
- ({c: [X, Mt]} = At(this, [jt], []));
1957
+ ({c: [Q, Mt]} = At(this, [jt], []));
1960
1958
  }
1961
- constructor(e = f(a).scopeTo("bleet-alert"), t = f(o), n = f(s), r = f(v)) {
1959
+ constructor(e = m(o).scopeTo("bleet-alert"), t = m(s), n = m(c), r = m(b)) {
1962
1960
  this.logger = e, this.element = t, this.p = n, this.transitionService = r, this.logger.trace("constructor");
1963
1961
  }
1964
1962
  closeButton;
@@ -1974,7 +1972,7 @@ var jt = l("bleet-alert"), Mt, X;
1974
1972
  onClose = (e) => {
1975
1973
  this.logger.trace("onClose", e), e.preventDefault(), this.transitionService.run(this.element, (e) => {
1976
1974
  let t = e.scrollHeight;
1977
- e.style.height = t + "px", e.offsetHeight, e.style.height = "0px", S(e, "alert", "hide");
1975
+ e.style.height = t + "px", e.offsetHeight, e.style.height = "0px", w(e, "alert", "hide");
1978
1976
  }, (e) => {
1979
1977
  e.hidden = !0, this.p.requestAnimationFrame(() => {
1980
1978
  e.style.height = "", e.remove();
@@ -2117,18 +2115,18 @@ function Lt(e, t, n, r, i, a) {
2117
2115
  }
2118
2116
  };
2119
2117
  }
2120
- var Rt = l({
2118
+ var Rt = u({
2121
2119
  name: "bleet-modal-trigger",
2122
2120
  defaultProperty: "id"
2123
- }), zt, Bt = c(), Vt = c(), Ht, Ut, Wt, Gt, Kt, qt, Z;
2121
+ }), zt, Bt = l(), Vt = l(), Ht, Ut, Wt, Gt, Kt, qt, $;
2124
2122
  (class {
2125
2123
  logger;
2126
2124
  element;
2127
2125
  ea;
2128
2126
  static {
2129
- ({e: [Ht, Ut, Wt, Gt, Kt, qt], c: [Z, zt]} = Lt(this, [Rt], [
2127
+ ({e: [Ht, Ut, Wt, Gt, Kt, qt], c: [$, zt]} = Lt(this, [Rt], [
2130
2128
  [
2131
- c,
2129
+ l,
2132
2130
  0,
2133
2131
  "id"
2134
2132
  ],
@@ -2144,7 +2142,7 @@ var Rt = l({
2144
2142
  ]
2145
2143
  ]));
2146
2144
  }
2147
- constructor(e = f(a).scopeTo("bleet-modal-trigger"), t = f(o), n = f(i)) {
2145
+ constructor(e = m(o).scopeTo("bleet-modal-trigger"), t = m(s), n = m(a)) {
2148
2146
  this.logger = e, this.element = t, this.ea = n, this.logger.trace("constructor");
2149
2147
  }
2150
2148
  id = Ht(this, "");
@@ -2163,8 +2161,8 @@ var Rt = l({
2163
2161
  this.logger.trace("dispose");
2164
2162
  }
2165
2163
  onClick = (qt(this), (e) => {
2166
- this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(w.Modal, {
2167
- action: A.Toggle,
2164
+ this.logger.trace("onClick", e), e.preventDefault(), this.ea.publish(E.Modal, {
2165
+ action: M.Toggle,
2168
2166
  id: this.id,
2169
2167
  url: this.url,
2170
2168
  color: this.color
@@ -2306,15 +2304,15 @@ function Qt(e, t, n, r, i, a) {
2306
2304
  }
2307
2305
  };
2308
2306
  }
2309
- var $t = l("bleet-pager"), en, Q;
2307
+ var $t = u("bleet-pager"), en, tn;
2310
2308
  (class {
2311
2309
  logger;
2312
2310
  element;
2313
2311
  p;
2314
2312
  static {
2315
- ({c: [Q, en]} = Qt(this, [$t], []));
2313
+ ({c: [tn, en]} = Qt(this, [$t], []));
2316
2314
  }
2317
- constructor(e = f(a).scopeTo("bleet-pager"), t = f(o), n = f(s)) {
2315
+ constructor(e = m(o).scopeTo("bleet-pager"), t = m(s), n = m(c)) {
2318
2316
  this.logger = e, this.element = t, this.p = n, this.logger.trace("constructor");
2319
2317
  }
2320
2318
  select;
@@ -2338,7 +2336,7 @@ var $t = l("bleet-pager"), en, Q;
2338
2336
  });
2339
2337
  //#endregion
2340
2338
  //#region src/attributes/ajaxify-trigger.ts
2341
- function tn(e, t) {
2339
+ function nn(e, t) {
2342
2340
  if (typeof e != "object" || !e) return e;
2343
2341
  var n = e[Symbol.toPrimitive];
2344
2342
  if (n !== void 0) {
@@ -2348,15 +2346,15 @@ function tn(e, t) {
2348
2346
  }
2349
2347
  return (t === "string" ? String : Number)(e);
2350
2348
  }
2351
- function nn(e) {
2352
- var t = tn(e, "string");
2349
+ function rn(e) {
2350
+ var t = nn(e, "string");
2353
2351
  return typeof t == "symbol" ? t : String(t);
2354
2352
  }
2355
- function rn(e) {
2353
+ function an(e) {
2356
2354
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
2357
2355
  return e;
2358
2356
  }
2359
- function an(e, t, n) {
2357
+ function on(e, t, n) {
2360
2358
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
2361
2359
  try {
2362
2360
  Object.defineProperty(e, "name", {
@@ -2366,7 +2364,7 @@ function an(e, t, n) {
2366
2364
  } catch {}
2367
2365
  return e;
2368
2366
  }
2369
- function on(e, t, n, r, i, a) {
2367
+ function sn(e, t, n, r, i, a) {
2370
2368
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
2371
2369
  function p(t, n, r) {
2372
2370
  return function(i, a) {
@@ -2391,13 +2389,13 @@ function on(e, t, n, r, i, a) {
2391
2389
  }
2392
2390
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
2393
2391
  if (!b && (d ? (h || x ? E = {
2394
- get: an(function() {
2392
+ get: on(function() {
2395
2393
  return y(this);
2396
2394
  }, r, "get"),
2397
2395
  set: function(e) {
2398
2396
  t[4](this, e);
2399
2397
  }
2400
- } : E[O] = y, h || an(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
2398
+ } : E[O] = y, h || on(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
2401
2399
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
2402
2400
  u[+c][r] = i < 3 ? 1 : i;
2403
2401
  }
@@ -2445,8 +2443,8 @@ function on(e, t, n, r, i, a) {
2445
2443
  var l = n[c], u = l[1], d = u & 7;
2446
2444
  if ((u & 8) == o && !d == s) {
2447
2445
  var f = l[2], p = !!l[3], m = u & 16;
2448
- h(o ? e : e.prototype, l, m, p ? "#" + f : nn(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
2449
- return rn(t) === e;
2446
+ h(o ? e : e.prototype, l, m, p ? "#" + f : rn(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
2447
+ return an(t) === e;
2450
2448
  } : i);
2451
2449
  }
2452
2450
  }
@@ -2468,10 +2466,10 @@ function on(e, t, n, r, i, a) {
2468
2466
  }
2469
2467
  };
2470
2468
  }
2471
- var sn = l({
2469
+ var cn = u({
2472
2470
  name: "bleet-ajaxify-trigger",
2473
2471
  defaultProperty: "url"
2474
- }), cn, ln = c(), un = c(), dn = c(), fn = c(), pn = c(), mn = c(), hn = c(), gn = c(), _n, vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn, $;
2472
+ }), ln, un = l(), dn = l(), fn = l(), pn = l(), mn = l(), hn = l(), gn = l(), _n = l(), vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn, Fn, In;
2475
2473
  (class {
2476
2474
  logger;
2477
2475
  element;
@@ -2479,66 +2477,66 @@ var sn = l({
2479
2477
  apiService;
2480
2478
  p;
2481
2479
  static {
2482
- ({e: [_n, vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn], c: [$, cn]} = on(this, [sn], [
2480
+ ({e: [vn, yn, bn, xn, Sn, Cn, wn, Tn, En, Dn, On, kn, An, jn, Mn, Nn, Pn, Fn], c: [In, ln]} = sn(this, [cn], [
2483
2481
  [
2484
- c,
2482
+ l,
2485
2483
  0,
2486
2484
  "url"
2487
2485
  ],
2488
2486
  [
2489
- ln,
2487
+ un,
2490
2488
  0,
2491
2489
  "verb"
2492
2490
  ],
2493
2491
  [
2494
- un,
2492
+ dn,
2495
2493
  0,
2496
2494
  "event"
2497
2495
  ],
2498
2496
  [
2499
- dn,
2497
+ fn,
2500
2498
  0,
2501
2499
  "id"
2502
2500
  ],
2503
2501
  [
2504
- fn,
2502
+ pn,
2505
2503
  0,
2506
2504
  "mode"
2507
2505
  ],
2508
2506
  [
2509
- pn,
2507
+ mn,
2510
2508
  0,
2511
2509
  "target"
2512
2510
  ],
2513
2511
  [
2514
- mn,
2512
+ hn,
2515
2513
  0,
2516
2514
  "method"
2517
2515
  ],
2518
2516
  [
2519
- hn,
2517
+ gn,
2520
2518
  0,
2521
2519
  "errorTitle"
2522
2520
  ],
2523
2521
  [
2524
- gn,
2522
+ _n,
2525
2523
  0,
2526
2524
  "errorContent"
2527
2525
  ]
2528
2526
  ]));
2529
2527
  }
2530
- constructor(e = f(a).scopeTo("bleet-ajaxify-trigger"), t = f(o), r = f(i), c = f(n), l = f(s)) {
2531
- this.logger = e, this.element = t, this.ea = r, this.apiService = c, this.p = l, this.logger.trace("constructor");
2532
- }
2533
- url = _n(this, "");
2534
- verb = (vn(this), yn(this, ""));
2535
- event = (bn(this), xn(this, "click"));
2536
- id = (Sn(this), Cn(this, ""));
2537
- mode = (wn(this), Tn(this, N.Classic));
2538
- target = (En(this), Dn(this, ""));
2539
- method = (On(this), kn(this, "POST"));
2540
- errorTitle = (An(this), jn(this, ""));
2541
- errorContent = (Mn(this), Nn(this, ""));
2528
+ constructor(e = m(o).scopeTo("bleet-ajaxify-trigger"), t = m(s), r = m(a), i = m(n), l = m(c)) {
2529
+ this.logger = e, this.element = t, this.ea = r, this.apiService = i, this.p = l, this.logger.trace("constructor");
2530
+ }
2531
+ url = vn(this, "");
2532
+ verb = (yn(this), bn(this, ""));
2533
+ event = (xn(this), Sn(this, "click"));
2534
+ id = (Cn(this), wn(this, ""));
2535
+ mode = (Tn(this), En(this, F.Classic));
2536
+ target = (Dn(this), On(this, ""));
2537
+ method = (kn(this), An(this, "POST"));
2538
+ errorTitle = (jn(this), Mn(this, ""));
2539
+ errorContent = (Nn(this), Pn(this, ""));
2542
2540
  attached() {
2543
2541
  this.logger.trace("attached", {
2544
2542
  url: this.url,
@@ -2550,8 +2548,8 @@ var sn = l({
2550
2548
  detaching() {
2551
2549
  this.logger.trace("detaching"), this.element.removeEventListener(this.event, this.onTrigger);
2552
2550
  }
2553
- onTrigger = (Pn(this), (e) => {
2554
- e.preventDefault(), e.stopPropagation(), this.logger.trace("onTrigger", e), this.mode === N.PublishOnly ? this.onTriggerPublishOnly() : this.onTriggerClassic(e);
2551
+ onTrigger = (Fn(this), (e) => {
2552
+ e.preventDefault(), e.stopPropagation(), this.logger.trace("onTrigger", e), this.mode === F.PublishOnly ? this.onTriggerPublishOnly() : this.onTriggerClassic(e);
2555
2553
  });
2556
2554
  onTriggerPublishOnly() {
2557
2555
  if (this.logger.debug("onTriggerPublishOnly", {
@@ -2572,8 +2570,8 @@ var sn = l({
2572
2570
  }
2573
2571
  let e = this.element.querySelectorAll("input:disabled, select:disabled, textarea:disabled");
2574
2572
  for (let t of Array.from(e)) t.disabled = !1;
2575
- this.ea.publish(w.Ajaxify, {
2576
- action: M.Run,
2573
+ this.ea.publish(E.Ajaxify, {
2574
+ action: P.Run,
2577
2575
  id: this.target,
2578
2576
  url: this.url || void 0,
2579
2577
  method: this.method
@@ -2591,15 +2589,15 @@ var sn = l({
2591
2589
  });
2592
2590
  let i = this.buildFormData(e);
2593
2591
  this.apiService.url(n).fromMultipart(i).request(r).then((e) => {
2594
- this.logger.debug("response", e.body), e.body.element && this.updateElement(e.body.element), e.body.toast && this.ea.publish(w.Toaster, {
2595
- action: P.Add,
2592
+ this.logger.debug("response", e.body), e.body.element && this.updateElement(e.body.element), e.body.toast && this.ea.publish(E.Toaster, {
2593
+ action: I.Add,
2596
2594
  toast: e.body.toast
2597
- }), e.body.ajaxify && this.ea.publish(w.Ajaxify, e.body.ajaxify);
2595
+ }), e.body.ajaxify && this.ea.publish(E.Ajaxify, e.body.ajaxify);
2598
2596
  }).catch((e) => {
2599
- this.logger.error("AJAX request failed", e), this.errorContent !== "" && this.ea.publish(w.Toaster, {
2600
- action: P.Add,
2597
+ this.logger.error("AJAX request failed", e), this.errorContent !== "" && this.ea.publish(E.Toaster, {
2598
+ action: I.Add,
2601
2599
  toast: {
2602
- color: z.Danger,
2600
+ color: V.Danger,
2603
2601
  title: this.errorTitle,
2604
2602
  content: this.errorContent,
2605
2603
  duration: 5e3
@@ -2646,12 +2644,12 @@ var sn = l({
2646
2644
  for (let e = 0; e < r.length; e++) e < n.length && this.syncElement(n[e], r[e]);
2647
2645
  }
2648
2646
  static {
2649
- cn();
2647
+ ln();
2650
2648
  }
2651
2649
  });
2652
2650
  //#endregion
2653
2651
  //#region src/attributes/popover.ts
2654
- function Fn(e, t) {
2652
+ function Ln(e, t) {
2655
2653
  if (typeof e != "object" || !e) return e;
2656
2654
  var n = e[Symbol.toPrimitive];
2657
2655
  if (n !== void 0) {
@@ -2661,15 +2659,15 @@ function Fn(e, t) {
2661
2659
  }
2662
2660
  return (t === "string" ? String : Number)(e);
2663
2661
  }
2664
- function In(e) {
2665
- var t = Fn(e, "string");
2662
+ function Rn(e) {
2663
+ var t = Ln(e, "string");
2666
2664
  return typeof t == "symbol" ? t : String(t);
2667
2665
  }
2668
- function Ln(e) {
2666
+ function zn(e) {
2669
2667
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
2670
2668
  return e;
2671
2669
  }
2672
- function Rn(e, t, n) {
2670
+ function Bn(e, t, n) {
2673
2671
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
2674
2672
  try {
2675
2673
  Object.defineProperty(e, "name", {
@@ -2679,7 +2677,7 @@ function Rn(e, t, n) {
2679
2677
  } catch {}
2680
2678
  return e;
2681
2679
  }
2682
- function zn(e, t, n, r, i, a) {
2680
+ function Vn(e, t, n, r, i, a) {
2683
2681
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
2684
2682
  function p(t, n, r) {
2685
2683
  return function(i, a) {
@@ -2704,13 +2702,13 @@ function zn(e, t, n, r, i, a) {
2704
2702
  }
2705
2703
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
2706
2704
  if (!b && (d ? (h || x ? E = {
2707
- get: Rn(function() {
2705
+ get: Bn(function() {
2708
2706
  return y(this);
2709
2707
  }, r, "get"),
2710
2708
  set: function(e) {
2711
2709
  t[4](this, e);
2712
2710
  }
2713
- } : E[O] = y, h || Rn(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
2711
+ } : E[O] = y, h || Bn(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
2714
2712
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
2715
2713
  u[+c][r] = i < 3 ? 1 : i;
2716
2714
  }
@@ -2758,8 +2756,8 @@ function zn(e, t, n, r, i, a) {
2758
2756
  var l = n[c], u = l[1], d = u & 7;
2759
2757
  if ((u & 8) == o && !d == s) {
2760
2758
  var f = l[2], p = !!l[3], m = u & 16;
2761
- h(o ? e : e.prototype, l, m, p ? "#" + f : In(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
2762
- return Ln(t) === e;
2759
+ h(o ? e : e.prototype, l, m, p ? "#" + f : Rn(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
2760
+ return zn(t) === e;
2763
2761
  } : i);
2764
2762
  }
2765
2763
  }
@@ -2781,30 +2779,30 @@ function zn(e, t, n, r, i, a) {
2781
2779
  }
2782
2780
  };
2783
2781
  }
2784
- var Bn = l({
2782
+ var Hn = u({
2785
2783
  name: "bleet-popover",
2786
2784
  defaultProperty: "id"
2787
- }), Vn, Hn, Un, Wn;
2785
+ }), Un, Wn, Gn, Kn;
2788
2786
  (class {
2789
2787
  logger;
2790
2788
  element;
2791
2789
  ea;
2792
2790
  p;
2793
2791
  static {
2794
- ({e: [Hn, Un], c: [Wn, Vn]} = zn(this, [Bn], [[
2795
- c,
2792
+ ({e: [Wn, Gn], c: [Kn, Un]} = Vn(this, [Hn], [[
2793
+ l,
2796
2794
  0,
2797
2795
  "id"
2798
2796
  ]]));
2799
2797
  }
2800
- constructor(e = f(a).scopeTo("bleet-popover"), t = f(o), n = f(i), r = f(s)) {
2798
+ constructor(e = m(o).scopeTo("bleet-popover"), t = m(s), n = m(a), r = m(c)) {
2801
2799
  this.logger = e, this.element = t, this.ea = n, this.p = r, this.logger.trace("constructor");
2802
2800
  }
2803
- id = Hn(this, "");
2804
- isOpen = (Un(this), !1);
2801
+ id = Wn(this, "");
2802
+ isOpen = (Gn(this), !1);
2805
2803
  subscription = null;
2806
2804
  attaching() {
2807
- this.logger.trace("attaching"), this.subscription = this.ea.subscribe(w.Popover, this.onPopover);
2805
+ this.logger.trace("attaching"), this.subscription = this.ea.subscribe(E.Popover, this.onPopover);
2808
2806
  }
2809
2807
  attached() {
2810
2808
  this.logger.trace("attached");
@@ -2817,24 +2815,24 @@ var Bn = l({
2817
2815
  }
2818
2816
  onPopover = (e) => {
2819
2817
  if (e.id === this.id) switch (e.action) {
2820
- case L.Open:
2818
+ case z.Open:
2821
2819
  this.open(e.rect);
2822
2820
  break;
2823
- case L.Close:
2821
+ case z.Close:
2824
2822
  this.close();
2825
2823
  break;
2826
- case L.Toggle: this.isOpen ? this.close() : this.open(e.rect);
2824
+ case z.Toggle: this.isOpen ? this.close() : this.open(e.rect);
2827
2825
  }
2828
2826
  };
2829
2827
  open(e) {
2830
- this.isOpen = !0, S(this.element, "popover", "show"), e && this.positionAt(e), this.ea.publish(w.PopoverStatus, {
2831
- status: R.Opened,
2828
+ this.isOpen = !0, w(this.element, "popover", "show"), e && this.positionAt(e), this.ea.publish(E.PopoverStatus, {
2829
+ status: B.Opened,
2832
2830
  id: this.id
2833
2831
  });
2834
2832
  }
2835
2833
  close() {
2836
- this.isOpen = !1, S(this.element, "popover", "hide"), this.ea.publish(w.PopoverStatus, {
2837
- status: R.Closed,
2834
+ this.isOpen = !1, w(this.element, "popover", "hide"), this.ea.publish(E.PopoverStatus, {
2835
+ status: B.Closed,
2838
2836
  id: this.id
2839
2837
  });
2840
2838
  }
@@ -2844,12 +2842,12 @@ var Bn = l({
2844
2842
  n < 4 && (n = e.bottom + 10), r < 4 && (r = 4), r + t.width > this.p.window.innerWidth - 4 && (r = this.p.window.innerWidth - t.width - 4), this.element.style.top = `${n}px`, this.element.style.left = `${r}px`, this.element.style.visibility = "", this.element.style.display = "";
2845
2843
  }
2846
2844
  static {
2847
- Vn();
2845
+ Un();
2848
2846
  }
2849
2847
  });
2850
2848
  //#endregion
2851
2849
  //#region src/attributes/popover-trigger.ts
2852
- function Gn(e, t) {
2850
+ function qn(e, t) {
2853
2851
  if (typeof e != "object" || !e) return e;
2854
2852
  var n = e[Symbol.toPrimitive];
2855
2853
  if (n !== void 0) {
@@ -2859,15 +2857,15 @@ function Gn(e, t) {
2859
2857
  }
2860
2858
  return (t === "string" ? String : Number)(e);
2861
2859
  }
2862
- function Kn(e) {
2863
- var t = Gn(e, "string");
2860
+ function Jn(e) {
2861
+ var t = qn(e, "string");
2864
2862
  return typeof t == "symbol" ? t : String(t);
2865
2863
  }
2866
- function qn(e) {
2864
+ function Yn(e) {
2867
2865
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
2868
2866
  return e;
2869
2867
  }
2870
- function Jn(e, t, n) {
2868
+ function Xn(e, t, n) {
2871
2869
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
2872
2870
  try {
2873
2871
  Object.defineProperty(e, "name", {
@@ -2877,7 +2875,7 @@ function Jn(e, t, n) {
2877
2875
  } catch {}
2878
2876
  return e;
2879
2877
  }
2880
- function Yn(e, t, n, r, i, a) {
2878
+ function Zn(e, t, n, r, i, a) {
2881
2879
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
2882
2880
  function p(t, n, r) {
2883
2881
  return function(i, a) {
@@ -2902,13 +2900,13 @@ function Yn(e, t, n, r, i, a) {
2902
2900
  }
2903
2901
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
2904
2902
  if (!b && (d ? (h || x ? E = {
2905
- get: Jn(function() {
2903
+ get: Xn(function() {
2906
2904
  return y(this);
2907
2905
  }, r, "get"),
2908
2906
  set: function(e) {
2909
2907
  t[4](this, e);
2910
2908
  }
2911
- } : E[O] = y, h || Jn(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
2909
+ } : E[O] = y, h || Xn(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
2912
2910
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
2913
2911
  u[+c][r] = i < 3 ? 1 : i;
2914
2912
  }
@@ -2956,8 +2954,8 @@ function Yn(e, t, n, r, i, a) {
2956
2954
  var l = n[c], u = l[1], d = u & 7;
2957
2955
  if ((u & 8) == o && !d == s) {
2958
2956
  var f = l[2], p = !!l[3], m = u & 16;
2959
- h(o ? e : e.prototype, l, m, p ? "#" + f : Kn(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
2960
- return qn(t) === e;
2957
+ h(o ? e : e.prototype, l, m, p ? "#" + f : Jn(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
2958
+ return Yn(t) === e;
2961
2959
  } : i);
2962
2960
  }
2963
2961
  }
@@ -2979,30 +2977,30 @@ function Yn(e, t, n, r, i, a) {
2979
2977
  }
2980
2978
  };
2981
2979
  }
2982
- var Xn = l({
2980
+ var Qn = u({
2983
2981
  name: "bleet-popover-trigger",
2984
2982
  defaultProperty: "id"
2985
- }), Zn, Qn = c(), $n, er, tr, nr, rr;
2983
+ }), $n, er = l(), tr, nr, rr, ir, ar;
2986
2984
  (class {
2987
2985
  logger;
2988
2986
  element;
2989
2987
  ea;
2990
2988
  static {
2991
- ({e: [$n, er, tr, nr], c: [rr, Zn]} = Yn(this, [Xn], [[
2992
- c,
2989
+ ({e: [tr, nr, rr, ir], c: [ar, $n]} = Zn(this, [Qn], [[
2990
+ l,
2993
2991
  0,
2994
2992
  "id"
2995
2993
  ], [
2996
- Qn,
2994
+ er,
2997
2995
  0,
2998
2996
  "absolute"
2999
2997
  ]]));
3000
2998
  }
3001
- constructor(e = f(a).scopeTo("bleet-popover-trigger"), t = f(o), n = f(i)) {
2999
+ constructor(e = m(o).scopeTo("bleet-popover-trigger"), t = m(s), n = m(a)) {
3002
3000
  this.logger = e, this.element = t, this.ea = n, this.logger.trace("constructor");
3003
3001
  }
3004
- id = $n(this, "");
3005
- absolute = (er(this), tr(this, !0));
3002
+ id = tr(this, "");
3003
+ absolute = (nr(this), rr(this, !0));
3006
3004
  attached() {
3007
3005
  this.logger.trace("attached"), this.element.addEventListener("mouseenter", this.onMouseEnter), this.element.addEventListener("mouseleave", this.onMouseLeave);
3008
3006
  }
@@ -3012,43 +3010,43 @@ var Xn = l({
3012
3010
  dispose() {
3013
3011
  this.logger.trace("dispose");
3014
3012
  }
3015
- onMouseEnter = (nr(this), () => {
3016
- this.ea.publish(w.Popover, {
3013
+ onMouseEnter = (ir(this), () => {
3014
+ this.ea.publish(E.Popover, {
3017
3015
  id: this.id,
3018
- action: L.Open,
3016
+ action: z.Open,
3019
3017
  rect: this.absolute ? this.element.getBoundingClientRect() : void 0
3020
3018
  });
3021
3019
  });
3022
3020
  onMouseLeave = () => {
3023
- this.ea.publish(w.Popover, {
3021
+ this.ea.publish(E.Popover, {
3024
3022
  id: this.id,
3025
- action: L.Close
3023
+ action: z.Close
3026
3024
  });
3027
3025
  };
3028
3026
  static {
3029
- Zn();
3027
+ $n();
3030
3028
  }
3031
3029
  });
3032
3030
  //#endregion
3033
3031
  //#region src/utils/toaster.ts
3034
- function ir(e) {
3032
+ function or(e) {
3035
3033
  return {
3036
3034
  ...e,
3037
3035
  id: e.id || `toast-${Math.random().toString(36).substring(2, 15)}`,
3038
- color: e.color || z.Info,
3039
- icon: e.icon || B.Info,
3036
+ color: e.color || V.Info,
3037
+ icon: e.icon || H.Info,
3040
3038
  duration: e.duration || 0
3041
3039
  };
3042
3040
  }
3043
- function ar(e) {
3041
+ function sr(e) {
3044
3042
  e.hasAttribute("popover") === !0 && (e.matches(":popover-open") === !0 && e.hidePopover(), e.showPopover());
3045
3043
  }
3046
- function or(e) {
3044
+ function cr(e) {
3047
3045
  e.hasAttribute("popover") === !0 && e.matches(":popover-open") === !0 && e.hidePopover();
3048
3046
  }
3049
3047
  //#endregion
3050
3048
  //#region src/attributes/toaster.ts
3051
- function sr(e, t) {
3049
+ function lr(e, t) {
3052
3050
  if (typeof e != "object" || !e) return e;
3053
3051
  var n = e[Symbol.toPrimitive];
3054
3052
  if (n !== void 0) {
@@ -3058,15 +3056,15 @@ function sr(e, t) {
3058
3056
  }
3059
3057
  return (t === "string" ? String : Number)(e);
3060
3058
  }
3061
- function cr(e) {
3062
- var t = sr(e, "string");
3059
+ function ur(e) {
3060
+ var t = lr(e, "string");
3063
3061
  return typeof t == "symbol" ? t : String(t);
3064
3062
  }
3065
- function lr(e) {
3063
+ function dr(e) {
3066
3064
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
3067
3065
  return e;
3068
3066
  }
3069
- function ur(e, t, n) {
3067
+ function fr(e, t, n) {
3070
3068
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
3071
3069
  try {
3072
3070
  Object.defineProperty(e, "name", {
@@ -3076,7 +3074,7 @@ function ur(e, t, n) {
3076
3074
  } catch {}
3077
3075
  return e;
3078
3076
  }
3079
- function dr(e, t, n, r, i, a) {
3077
+ function pr(e, t, n, r, i, a) {
3080
3078
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
3081
3079
  function p(t, n, r) {
3082
3080
  return function(i, a) {
@@ -3101,13 +3099,13 @@ function dr(e, t, n, r, i, a) {
3101
3099
  }
3102
3100
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
3103
3101
  if (!b && (d ? (h || x ? E = {
3104
- get: ur(function() {
3102
+ get: fr(function() {
3105
3103
  return y(this);
3106
3104
  }, r, "get"),
3107
3105
  set: function(e) {
3108
3106
  t[4](this, e);
3109
3107
  }
3110
- } : E[O] = y, h || ur(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3108
+ } : E[O] = y, h || fr(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3111
3109
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
3112
3110
  u[+c][r] = i < 3 ? 1 : i;
3113
3111
  }
@@ -3155,8 +3153,8 @@ function dr(e, t, n, r, i, a) {
3155
3153
  var l = n[c], u = l[1], d = u & 7;
3156
3154
  if ((u & 8) == o && !d == s) {
3157
3155
  var f = l[2], p = !!l[3], m = u & 16;
3158
- h(o ? e : e.prototype, l, m, p ? "#" + f : cr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3159
- return lr(t) === e;
3156
+ h(o ? e : e.prototype, l, m, p ? "#" + f : ur(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3157
+ return dr(t) === e;
3160
3158
  } : i);
3161
3159
  }
3162
3160
  }
@@ -3178,7 +3176,7 @@ function dr(e, t, n, r, i, a) {
3178
3176
  }
3179
3177
  };
3180
3178
  }
3181
- var fr = l("bleet-toaster"), pr, mr;
3179
+ var mr = u("bleet-toaster"), hr, gr;
3182
3180
  (class {
3183
3181
  logger;
3184
3182
  element;
@@ -3186,15 +3184,15 @@ var fr = l("bleet-toaster"), pr, mr;
3186
3184
  p;
3187
3185
  transitionService;
3188
3186
  static {
3189
- ({c: [mr, pr]} = dr(this, [fr], []));
3187
+ ({c: [gr, hr]} = pr(this, [mr], []));
3190
3188
  }
3191
- constructor(e = f(a).scopeTo("bleet-toaster"), t = f(o), n = f(i), r = f(s), c = f(v)) {
3192
- this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = c, this.logger.trace("constructor");
3189
+ constructor(e = m(o).scopeTo("bleet-toaster"), t = m(s), n = m(a), r = m(c), i = m(b)) {
3190
+ this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = i, this.logger.trace("constructor");
3193
3191
  }
3194
3192
  disposable;
3195
3193
  toasts = /* @__PURE__ */ new Map();
3196
3194
  attaching() {
3197
- this.logger.trace("attaching"), this.disposable = this.ea.subscribe(w.Toaster, this.onToasterEvent);
3195
+ this.logger.trace("attaching"), this.disposable = this.ea.subscribe(E.Toaster, this.onToasterEvent);
3198
3196
  }
3199
3197
  detaching() {
3200
3198
  this.logger.trace("detaching"), this.disposable?.dispose(), this.toasts.forEach((e) => {
@@ -3202,10 +3200,10 @@ var fr = l("bleet-toaster"), pr, mr;
3202
3200
  });
3203
3201
  }
3204
3202
  onToasterEvent = (e) => {
3205
- if (this.logger.trace("onToasterEvent", e), e.action === P.Add && e.toast) {
3206
- let t = ir(e.toast);
3203
+ if (this.logger.trace("onToasterEvent", e), e.action === I.Add && e.toast) {
3204
+ let t = or(e.toast);
3207
3205
  this.toasts.has(t.id) || this.add(t);
3208
- } else e.action === P.Remove && e.toast?.id && this.close(e.toast.id);
3206
+ } else e.action === I.Remove && e.toast?.id && this.close(e.toast.id);
3209
3207
  };
3210
3208
  add(e) {
3211
3209
  let t = this.element.querySelector(`template[data-toaster="${e.color}"]`);
@@ -3223,28 +3221,28 @@ var fr = l("bleet-toaster"), pr, mr;
3223
3221
  element: n,
3224
3222
  closing: !1
3225
3223
  };
3226
- this.toasts.set(e.id, s), this.element.appendChild(n), ar(this.element), this.logger.debug(`Toast added with ID: ${e.id}`), this.transitionService.run(n, (t) => {
3224
+ this.toasts.set(e.id, s), this.element.appendChild(n), sr(this.element), this.logger.debug(`Toast added with ID: ${e.id}`), this.transitionService.run(n, (t) => {
3227
3225
  e.duration > 0 && (s.closeTimeout = this.p.setTimeout(() => {
3228
3226
  this.close(e.id);
3229
- }, e.duration)), S(t, "toaster", "show");
3227
+ }, e.duration)), w(t, "toaster", "show");
3230
3228
  });
3231
3229
  }
3232
3230
  }
3233
3231
  close(e) {
3234
3232
  let t = this.toasts.get(e);
3235
3233
  t !== void 0 && t.closing === !1 && (t.closing = !0, t.closeTimeout !== void 0 && this.p.clearTimeout(t.closeTimeout), this.transitionService.run(t.element, (e) => {
3236
- S(e, "toaster", "hide");
3234
+ w(e, "toaster", "hide");
3237
3235
  }, (t) => {
3238
- t.remove(), this.toasts.delete(e), this.toasts.size === 0 && or(this.element), this.logger.debug(`Toast removed with ID: ${e}`);
3236
+ t.remove(), this.toasts.delete(e), this.toasts.size === 0 && cr(this.element), this.logger.debug(`Toast removed with ID: ${e}`);
3239
3237
  }));
3240
3238
  }
3241
3239
  static {
3242
- pr();
3240
+ hr();
3243
3241
  }
3244
3242
  });
3245
3243
  //#endregion
3246
3244
  //#region src/attributes/toast.ts
3247
- function hr(e, t) {
3245
+ function _r(e, t) {
3248
3246
  if (typeof e != "object" || !e) return e;
3249
3247
  var n = e[Symbol.toPrimitive];
3250
3248
  if (n !== void 0) {
@@ -3254,15 +3252,15 @@ function hr(e, t) {
3254
3252
  }
3255
3253
  return (t === "string" ? String : Number)(e);
3256
3254
  }
3257
- function gr(e) {
3258
- var t = hr(e, "string");
3255
+ function vr(e) {
3256
+ var t = _r(e, "string");
3259
3257
  return typeof t == "symbol" ? t : String(t);
3260
3258
  }
3261
- function _r(e) {
3259
+ function yr(e) {
3262
3260
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
3263
3261
  return e;
3264
3262
  }
3265
- function vr(e, t, n) {
3263
+ function br(e, t, n) {
3266
3264
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
3267
3265
  try {
3268
3266
  Object.defineProperty(e, "name", {
@@ -3272,7 +3270,7 @@ function vr(e, t, n) {
3272
3270
  } catch {}
3273
3271
  return e;
3274
3272
  }
3275
- function yr(e, t, n, r, i, a) {
3273
+ function xr(e, t, n, r, i, a) {
3276
3274
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
3277
3275
  function p(t, n, r) {
3278
3276
  return function(i, a) {
@@ -3297,13 +3295,13 @@ function yr(e, t, n, r, i, a) {
3297
3295
  }
3298
3296
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
3299
3297
  if (!b && (d ? (h || x ? E = {
3300
- get: vr(function() {
3298
+ get: br(function() {
3301
3299
  return y(this);
3302
3300
  }, r, "get"),
3303
3301
  set: function(e) {
3304
3302
  t[4](this, e);
3305
3303
  }
3306
- } : E[O] = y, h || vr(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3304
+ } : E[O] = y, h || br(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3307
3305
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
3308
3306
  u[+c][r] = i < 3 ? 1 : i;
3309
3307
  }
@@ -3351,8 +3349,8 @@ function yr(e, t, n, r, i, a) {
3351
3349
  var l = n[c], u = l[1], d = u & 7;
3352
3350
  if ((u & 8) == o && !d == s) {
3353
3351
  var f = l[2], p = !!l[3], m = u & 16;
3354
- h(o ? e : e.prototype, l, m, p ? "#" + f : gr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3355
- return _r(t) === e;
3352
+ h(o ? e : e.prototype, l, m, p ? "#" + f : vr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3353
+ return yr(t) === e;
3356
3354
  } : i);
3357
3355
  }
3358
3356
  }
@@ -3374,66 +3372,66 @@ function yr(e, t, n, r, i, a) {
3374
3372
  }
3375
3373
  };
3376
3374
  }
3377
- var br = l({
3375
+ var Sr = u({
3378
3376
  name: "bleet-toast",
3379
3377
  defaultProperty: "id"
3380
- }), xr, Sr = c(), Cr = c(), wr = c(), Tr = c(), Er = c(), Dr, Or, kr, Ar, jr, Mr, Nr, Pr, Fr, Ir, Lr, Rr, zr;
3378
+ }), Cr, wr = l(), Tr = l(), Er = l(), Dr = l(), Or = l(), kr, Ar, jr, Mr, Nr, Pr, Fr, Ir, Lr, Rr, zr, Br, Vr;
3381
3379
  (class {
3382
3380
  logger;
3383
3381
  ea;
3384
3382
  p;
3385
3383
  static {
3386
- ({e: [Dr, Or, kr, Ar, jr, Mr, Nr, Pr, Fr, Ir, Lr, Rr], c: [zr, xr]} = yr(this, [br], [
3384
+ ({e: [kr, Ar, jr, Mr, Nr, Pr, Fr, Ir, Lr, Rr, zr, Br], c: [Vr, Cr]} = xr(this, [Sr], [
3387
3385
  [
3388
- c,
3386
+ l,
3389
3387
  0,
3390
3388
  "id"
3391
3389
  ],
3392
3390
  [
3393
- Sr,
3391
+ wr,
3394
3392
  0,
3395
3393
  "color"
3396
3394
  ],
3397
3395
  [
3398
- Cr,
3396
+ Tr,
3399
3397
  0,
3400
3398
  "icon"
3401
3399
  ],
3402
3400
  [
3403
- wr,
3401
+ Er,
3404
3402
  0,
3405
3403
  "title"
3406
3404
  ],
3407
3405
  [
3408
- Tr,
3406
+ Dr,
3409
3407
  0,
3410
3408
  "content"
3411
3409
  ],
3412
3410
  [
3413
- Er,
3411
+ Or,
3414
3412
  0,
3415
3413
  "duration"
3416
3414
  ]
3417
3415
  ]));
3418
3416
  }
3419
- constructor(e = f(a).scopeTo("bleet-toast"), t = f(i), n = f(s)) {
3417
+ constructor(e = m(o).scopeTo("bleet-toast"), t = m(a), n = m(c)) {
3420
3418
  this.logger = e, this.ea = t, this.p = n, this.logger.trace("constructor");
3421
3419
  }
3422
- id = Dr(this, "");
3423
- color = (Or(this), kr(this, z.Info));
3424
- icon = (Ar(this), jr(this, B.Info));
3425
- title = (Mr(this), Nr(this, ""));
3426
- content = (Pr(this), Fr(this, ""));
3427
- duration = (Ir(this), Lr(this, 0));
3420
+ id = kr(this, "");
3421
+ color = (Ar(this), jr(this, V.Info));
3422
+ icon = (Mr(this), Nr(this, H.Info));
3423
+ title = (Pr(this), Fr(this, ""));
3424
+ content = (Ir(this), Lr(this, ""));
3425
+ duration = (Rr(this), zr(this, 0));
3428
3426
  attached() {
3429
3427
  this.logger.trace("attached"), this.p.document.readyState === "loading" ? this.p.document.addEventListener("DOMContentLoaded", () => {
3430
3428
  this.publish();
3431
3429
  }, { once: !0 }) : this.publish();
3432
3430
  }
3433
- publish = (Rr(this), () => {
3434
- this.logger.trace("publish"), d(() => {
3435
- this.ea.publish(w.Toaster, {
3436
- action: P.Add,
3431
+ publish = (Br(this), () => {
3432
+ this.logger.trace("publish"), p(() => {
3433
+ this.ea.publish(E.Toaster, {
3434
+ action: I.Add,
3437
3435
  toast: {
3438
3436
  id: this.id,
3439
3437
  duration: this.duration,
@@ -3446,12 +3444,12 @@ var br = l({
3446
3444
  });
3447
3445
  });
3448
3446
  static {
3449
- xr();
3447
+ Cr();
3450
3448
  }
3451
3449
  });
3452
3450
  //#endregion
3453
3451
  //#region src/attributes/overlay.ts
3454
- function Br(e, t) {
3452
+ function Hr(e, t) {
3455
3453
  if (typeof e != "object" || !e) return e;
3456
3454
  var n = e[Symbol.toPrimitive];
3457
3455
  if (n !== void 0) {
@@ -3461,15 +3459,15 @@ function Br(e, t) {
3461
3459
  }
3462
3460
  return (t === "string" ? String : Number)(e);
3463
3461
  }
3464
- function Vr(e) {
3465
- var t = Br(e, "string");
3462
+ function Ur(e) {
3463
+ var t = Hr(e, "string");
3466
3464
  return typeof t == "symbol" ? t : String(t);
3467
3465
  }
3468
- function Hr(e) {
3466
+ function Wr(e) {
3469
3467
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
3470
3468
  return e;
3471
3469
  }
3472
- function Ur(e, t, n) {
3470
+ function Gr(e, t, n) {
3473
3471
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
3474
3472
  try {
3475
3473
  Object.defineProperty(e, "name", {
@@ -3479,7 +3477,7 @@ function Ur(e, t, n) {
3479
3477
  } catch {}
3480
3478
  return e;
3481
3479
  }
3482
- function Wr(e, t, n, r, i, a) {
3480
+ function Kr(e, t, n, r, i, a) {
3483
3481
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
3484
3482
  function p(t, n, r) {
3485
3483
  return function(i, a) {
@@ -3504,13 +3502,13 @@ function Wr(e, t, n, r, i, a) {
3504
3502
  }
3505
3503
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
3506
3504
  if (!b && (d ? (h || x ? E = {
3507
- get: Ur(function() {
3505
+ get: Gr(function() {
3508
3506
  return y(this);
3509
3507
  }, r, "get"),
3510
3508
  set: function(e) {
3511
3509
  t[4](this, e);
3512
3510
  }
3513
- } : E[O] = y, h || Ur(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3511
+ } : E[O] = y, h || Gr(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3514
3512
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
3515
3513
  u[+c][r] = i < 3 ? 1 : i;
3516
3514
  }
@@ -3558,8 +3556,8 @@ function Wr(e, t, n, r, i, a) {
3558
3556
  var l = n[c], u = l[1], d = u & 7;
3559
3557
  if ((u & 8) == o && !d == s) {
3560
3558
  var f = l[2], p = !!l[3], m = u & 16;
3561
- h(o ? e : e.prototype, l, m, p ? "#" + f : Vr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3562
- return Hr(t) === e;
3559
+ h(o ? e : e.prototype, l, m, p ? "#" + f : Ur(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3560
+ return Wr(t) === e;
3563
3561
  } : i);
3564
3562
  }
3565
3563
  }
@@ -3581,7 +3579,7 @@ function Wr(e, t, n, r, i, a) {
3581
3579
  }
3582
3580
  };
3583
3581
  }
3584
- var Gr = l("bleet-overlay"), Kr, qr;
3582
+ var qr = u("bleet-overlay"), Jr, Yr;
3585
3583
  (class {
3586
3584
  logger;
3587
3585
  element;
@@ -3589,14 +3587,14 @@ var Gr = l("bleet-overlay"), Kr, qr;
3589
3587
  p;
3590
3588
  transitionService;
3591
3589
  static {
3592
- ({c: [qr, Kr]} = Wr(this, [Gr], []));
3590
+ ({c: [Yr, Jr]} = Kr(this, [qr], []));
3593
3591
  }
3594
- constructor(e = f(a).scopeTo("bleet-overlay"), t = f(o), n = f(i), r = f(s), c = f(v)) {
3595
- this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = c, this.logger.trace("constructor");
3592
+ constructor(e = m(o).scopeTo("bleet-overlay"), t = m(s), n = m(a), r = m(c), i = m(b)) {
3593
+ this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = i, this.logger.trace("constructor");
3596
3594
  }
3597
3595
  disposable;
3598
3596
  attached() {
3599
- this.logger.trace("attached"), this.disposable = this.ea.subscribe(w.Overlay, this.onOverlayEvent), this.element.addEventListener("click", this.onClickOverlay);
3597
+ this.logger.trace("attached"), this.disposable = this.ea.subscribe(E.Overlay, this.onOverlayEvent), this.element.addEventListener("click", this.onClickOverlay);
3600
3598
  }
3601
3599
  detaching() {
3602
3600
  this.logger.trace("detaching"), this.element.removeEventListener("click", this.onClickOverlay), this.disposable?.dispose();
@@ -3606,33 +3604,33 @@ var Gr = l("bleet-overlay"), Kr, qr;
3606
3604
  }
3607
3605
  open(e = !1) {
3608
3606
  this.element.hidden && (this.logger.trace("open"), this.transitionService.run(this.element, (t) => {
3609
- e && this.ea.publish(w.Overlay, { action: E.Open }), this.ea.publish(w.OverlayStatus, { status: D.Opening }), t.hidden = !1, this.p.requestAnimationFrame(() => {
3610
- S(t, "overlay", "show");
3607
+ e && this.ea.publish(E.Overlay, { action: O.Open }), this.ea.publish(E.OverlayStatus, { status: k.Opening }), t.hidden = !1, this.p.requestAnimationFrame(() => {
3608
+ w(t, "overlay", "show");
3611
3609
  }), this.logger.trace("open before()");
3612
3610
  }, (e) => {
3613
- this.ea.publish(w.OverlayStatus, { status: D.Opened }), this.logger.trace("open after()");
3611
+ this.ea.publish(E.OverlayStatus, { status: k.Opened }), this.logger.trace("open after()");
3614
3612
  }));
3615
3613
  }
3616
3614
  close(e = !1) {
3617
3615
  this.element.hidden || this.transitionService.run(this.element, (t) => {
3618
- e && this.ea.publish(w.Overlay, { action: E.Close }), this.ea.publish(w.OverlayStatus, { status: D.Closing }), S(t, "overlay", "hide"), this.logger.trace("close before()");
3616
+ e && this.ea.publish(E.Overlay, { action: O.Close }), this.ea.publish(E.OverlayStatus, { status: k.Closing }), w(t, "overlay", "hide"), this.logger.trace("close before()");
3619
3617
  }, (e) => {
3620
- e.hidden = !0, this.logger.trace("close after()"), this.ea.publish(w.OverlayStatus, { status: D.Closed });
3618
+ e.hidden = !0, this.logger.trace("close after()"), this.ea.publish(E.OverlayStatus, { status: k.Closed });
3621
3619
  });
3622
3620
  }
3623
3621
  onOverlayEvent = (e) => {
3624
- e.action === E.Open ? (this.logger.trace("onOverlayEvent", e), this.open()) : e.action === E.Close ? (this.logger.trace("onOverlayEvent", e), this.close()) : e.action === E.Toggle ? (this.logger.trace("onOverlayEvent", e), this.toggle()) : this.logger.trace("onOverlayEvent unhandled", e);
3622
+ e.action === O.Open ? (this.logger.trace("onOverlayEvent", e), this.open()) : e.action === O.Close ? (this.logger.trace("onOverlayEvent", e), this.close()) : e.action === O.Toggle ? (this.logger.trace("onOverlayEvent", e), this.toggle()) : this.logger.trace("onOverlayEvent unhandled", e);
3625
3623
  };
3626
3624
  onClickOverlay = (e) => {
3627
3625
  this.logger.trace("onClickOverlay", e), e.preventDefault(), this.close(!0);
3628
3626
  };
3629
3627
  static {
3630
- Kr();
3628
+ Jr();
3631
3629
  }
3632
3630
  });
3633
3631
  //#endregion
3634
3632
  //#region src/attributes/focus.ts
3635
- function Jr(e, t) {
3633
+ function Xr(e, t) {
3636
3634
  if (typeof e != "object" || !e) return e;
3637
3635
  var n = e[Symbol.toPrimitive];
3638
3636
  if (n !== void 0) {
@@ -3642,15 +3640,15 @@ function Jr(e, t) {
3642
3640
  }
3643
3641
  return (t === "string" ? String : Number)(e);
3644
3642
  }
3645
- function Yr(e) {
3646
- var t = Jr(e, "string");
3643
+ function Zr(e) {
3644
+ var t = Xr(e, "string");
3647
3645
  return typeof t == "symbol" ? t : String(t);
3648
3646
  }
3649
- function Xr(e) {
3647
+ function Qr(e) {
3650
3648
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
3651
3649
  return e;
3652
3650
  }
3653
- function Zr(e, t, n) {
3651
+ function $r(e, t, n) {
3654
3652
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
3655
3653
  try {
3656
3654
  Object.defineProperty(e, "name", {
@@ -3660,7 +3658,7 @@ function Zr(e, t, n) {
3660
3658
  } catch {}
3661
3659
  return e;
3662
3660
  }
3663
- function Qr(e, t, n, r, i, a) {
3661
+ function ei(e, t, n, r, i, a) {
3664
3662
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
3665
3663
  function p(t, n, r) {
3666
3664
  return function(i, a) {
@@ -3685,13 +3683,13 @@ function Qr(e, t, n, r, i, a) {
3685
3683
  }
3686
3684
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
3687
3685
  if (!b && (d ? (h || x ? E = {
3688
- get: Zr(function() {
3686
+ get: $r(function() {
3689
3687
  return y(this);
3690
3688
  }, r, "get"),
3691
3689
  set: function(e) {
3692
3690
  t[4](this, e);
3693
3691
  }
3694
- } : E[O] = y, h || Zr(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3692
+ } : E[O] = y, h || $r(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3695
3693
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
3696
3694
  u[+c][r] = i < 3 ? 1 : i;
3697
3695
  }
@@ -3739,8 +3737,8 @@ function Qr(e, t, n, r, i, a) {
3739
3737
  var l = n[c], u = l[1], d = u & 7;
3740
3738
  if ((u & 8) == o && !d == s) {
3741
3739
  var f = l[2], p = !!l[3], m = u & 16;
3742
- h(o ? e : e.prototype, l, m, p ? "#" + f : Yr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3743
- return Xr(t) === e;
3740
+ h(o ? e : e.prototype, l, m, p ? "#" + f : Zr(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3741
+ return Qr(t) === e;
3744
3742
  } : i);
3745
3743
  }
3746
3744
  }
@@ -3762,15 +3760,15 @@ function Qr(e, t, n, r, i, a) {
3762
3760
  }
3763
3761
  };
3764
3762
  }
3765
- var $r = l("bleet-focus"), ei, ti;
3763
+ var ti = u("bleet-focus"), ni, ri;
3766
3764
  (class {
3767
3765
  logger;
3768
3766
  element;
3769
3767
  p;
3770
3768
  static {
3771
- ({c: [ti, ei]} = Qr(this, [$r], []));
3769
+ ({c: [ri, ni]} = ei(this, [ti], []));
3772
3770
  }
3773
- constructor(e = f(a).scopeTo("bleet-focus"), t = f(o), n = f(s)) {
3771
+ constructor(e = m(o).scopeTo("bleet-focus"), t = m(s), n = m(c)) {
3774
3772
  this.logger = e, this.element = t, this.p = n, this.logger.trace("constructor");
3775
3773
  }
3776
3774
  attached() {
@@ -3779,30 +3777,30 @@ var $r = l("bleet-focus"), ei, ti;
3779
3777
  });
3780
3778
  }
3781
3779
  static {
3782
- ei();
3780
+ ni();
3783
3781
  }
3784
3782
  });
3785
3783
  //#endregion
3786
3784
  //#region src/components/bleet-ajaxify.$au.ts
3787
- var ni = /* @__PURE__ */ h({
3788
- bindables: () => oi,
3789
- default: () => ii,
3790
- dependencies: () => ai,
3791
- name: () => ri,
3792
- register: () => ci,
3793
- template: () => ii
3794
- }), ri = "bleet-ajaxify", ii = "<template>\n <au-slot if.bind=\"!ajaxedView\"></au-slot>\n <au-compose if.bind=\"ajaxedView\" template.bind=\"ajaxedView\"></au-compose>\n</template>\n", ai = [], oi = {}, si;
3795
- function ci(e) {
3796
- si ||= p.define({
3797
- name: ri,
3798
- template: ii,
3799
- dependencies: ai,
3800
- bindables: oi
3801
- }), e.register(si);
3785
+ var ii = /* @__PURE__ */ _({
3786
+ bindables: () => ci,
3787
+ default: () => oi,
3788
+ dependencies: () => si,
3789
+ name: () => ai,
3790
+ register: () => ui,
3791
+ template: () => oi
3792
+ }), ai = "bleet-ajaxify", oi = "<template>\n <au-slot if.bind=\"!ajaxedView\"></au-slot>\n <au-compose if.bind=\"ajaxedView\" template.bind=\"ajaxedView\"></au-compose>\n</template>\n", si = [], ci = {}, li;
3793
+ function ui(e) {
3794
+ li ||= h.define({
3795
+ name: ai,
3796
+ template: oi,
3797
+ dependencies: si,
3798
+ bindables: ci
3799
+ }), e.register(li);
3802
3800
  }
3803
3801
  //#endregion
3804
3802
  //#region src/components/bleet-ajaxify.ts
3805
- function li(e, t) {
3803
+ function di(e, t) {
3806
3804
  if (typeof e != "object" || !e) return e;
3807
3805
  var n = e[Symbol.toPrimitive];
3808
3806
  if (n !== void 0) {
@@ -3812,15 +3810,15 @@ function li(e, t) {
3812
3810
  }
3813
3811
  return (t === "string" ? String : Number)(e);
3814
3812
  }
3815
- function ui(e) {
3816
- var t = li(e, "string");
3813
+ function fi(e) {
3814
+ var t = di(e, "string");
3817
3815
  return typeof t == "symbol" ? t : String(t);
3818
3816
  }
3819
- function di(e) {
3817
+ function pi(e) {
3820
3818
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
3821
3819
  return e;
3822
3820
  }
3823
- function fi(e, t, n) {
3821
+ function mi(e, t, n) {
3824
3822
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
3825
3823
  try {
3826
3824
  Object.defineProperty(e, "name", {
@@ -3830,7 +3828,7 @@ function fi(e, t, n) {
3830
3828
  } catch {}
3831
3829
  return e;
3832
3830
  }
3833
- function pi(e, t, n, r, i, a) {
3831
+ function hi(e, t, n, r, i, a) {
3834
3832
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
3835
3833
  function p(t, n, r) {
3836
3834
  return function(i, a) {
@@ -3855,13 +3853,13 @@ function pi(e, t, n, r, i, a) {
3855
3853
  }
3856
3854
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
3857
3855
  if (!b && (d ? (h || x ? E = {
3858
- get: fi(function() {
3856
+ get: mi(function() {
3859
3857
  return y(this);
3860
3858
  }, r, "get"),
3861
3859
  set: function(e) {
3862
3860
  t[4](this, e);
3863
3861
  }
3864
- } : E[O] = y, h || fi(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3862
+ } : E[O] = y, h || mi(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
3865
3863
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
3866
3864
  u[+c][r] = i < 3 ? 1 : i;
3867
3865
  }
@@ -3909,8 +3907,8 @@ function pi(e, t, n, r, i, a) {
3909
3907
  var l = n[c], u = l[1], d = u & 7;
3910
3908
  if ((u & 8) == o && !d == s) {
3911
3909
  var f = l[2], p = !!l[3], m = u & 16;
3912
- h(o ? e : e.prototype, l, m, p ? "#" + f : ui(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3913
- return di(t) === e;
3910
+ h(o ? e : e.prototype, l, m, p ? "#" + f : fi(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
3911
+ return pi(t) === e;
3914
3912
  } : i);
3915
3913
  }
3916
3914
  }
@@ -3932,35 +3930,35 @@ function pi(e, t, n, r, i, a) {
3932
3930
  }
3933
3931
  };
3934
3932
  }
3935
- var mi = u({
3936
- ...ni,
3933
+ var gi = d({
3934
+ ...ii,
3937
3935
  name: "bleet-ajaxify"
3938
- }), hi, gi = c(), _i = c(), vi, yi, bi, xi, Si;
3936
+ }), _i, vi = l(), yi = l(), bi, xi, Si, Ci, wi;
3939
3937
  (class {
3940
3938
  ea;
3941
3939
  logger;
3942
3940
  apiService;
3943
3941
  element;
3944
3942
  static {
3945
- ({e: [vi, yi, bi, xi], c: [Si, hi]} = pi(this, [mi], [[
3946
- gi,
3943
+ ({e: [bi, xi, Si, Ci], c: [wi, _i]} = hi(this, [gi], [[
3944
+ vi,
3947
3945
  0,
3948
3946
  "id"
3949
3947
  ], [
3950
- _i,
3948
+ yi,
3951
3949
  0,
3952
3950
  "url"
3953
3951
  ]]));
3954
3952
  }
3955
- constructor(e = f(i), t = f(a).scopeTo("<bleet-ajaxify>"), r = f(n), s = f(o)) {
3956
- this.ea = e, this.logger = t, this.apiService = r, this.element = s, this.logger.trace("constructor");
3953
+ constructor(e = m(a), t = m(o).scopeTo("<bleet-ajaxify>"), r = m(n), i = m(s)) {
3954
+ this.ea = e, this.logger = t, this.apiService = r, this.element = i, this.logger.trace("constructor");
3957
3955
  }
3958
- id = vi(this, "");
3959
- url = (yi(this), bi(this));
3960
- ajaxedView = (xi(this), null);
3956
+ id = bi(this, "");
3957
+ url = (xi(this), Si(this));
3958
+ ajaxedView = (Ci(this), null);
3961
3959
  disposable;
3962
3960
  attaching() {
3963
- this.logger.trace("attaching"), this.disposable = this.ea.subscribe(w.Ajaxify, this.onEvent);
3961
+ this.logger.trace("attaching"), this.disposable = this.ea.subscribe(E.Ajaxify, this.onEvent);
3964
3962
  }
3965
3963
  detaching() {
3966
3964
  this.logger.trace("detaching"), this.disposable?.dispose();
@@ -3972,7 +3970,7 @@ var mi = u({
3972
3970
  return this.element.querySelector("form") ?? this.element.closest("form");
3973
3971
  }
3974
3972
  onEvent = (e) => {
3975
- this.logger.trace("onEvent", e), e.id && e.id == this.id && (e.action === M.Refresh ? this.handleRefresh(e) : e.action === M.Run && this.handleRun(e));
3973
+ this.logger.trace("onEvent", e), e.id && e.id == this.id && (e.action === P.Refresh ? this.handleRefresh(e) : e.action === P.Run && this.handleRun(e));
3976
3974
  };
3977
3975
  handleRefresh(t) {
3978
3976
  let n = t.url ? t.url : this.url;
@@ -4007,30 +4005,30 @@ var mi = u({
4007
4005
  });
4008
4006
  }
4009
4007
  static {
4010
- hi();
4008
+ _i();
4011
4009
  }
4012
4010
  });
4013
4011
  //#endregion
4014
4012
  //#region src/components/bleet-dialog.$au.ts
4015
- var Ci = /* @__PURE__ */ h({
4016
- bindables: () => Di,
4017
- default: () => Ti,
4018
- dependencies: () => Ei,
4019
- name: () => wi,
4020
- register: () => ki,
4021
- template: () => Ti
4022
- }), wi = "bleet-dialog", Ti = "<template>\n <dialog ref=\"dialogElement\" class.bind=\"dialogClass\">\n <au-slot name=\"loader\" if.bind=\"loading\"><progress></progress></au-slot>\n <template else>\n <au-compose if.bind=\"contentView\" template.bind=\"contentView\"></au-compose>\n <au-slot else></au-slot>\n </template>\n </dialog>\n</template>\n", Ei = [], Di = {}, Oi;
4023
- function ki(e) {
4024
- Oi ||= p.define({
4025
- name: wi,
4026
- template: Ti,
4027
- dependencies: Ei,
4028
- bindables: Di
4029
- }), e.register(Oi);
4013
+ var Ti = /* @__PURE__ */ _({
4014
+ bindables: () => ki,
4015
+ default: () => Di,
4016
+ dependencies: () => Oi,
4017
+ name: () => Ei,
4018
+ register: () => ji,
4019
+ template: () => Di
4020
+ }), Ei = "bleet-dialog", Di = "<template>\n <dialog ref=\"dialogElement\" class.bind=\"dialogClass\" aria-label.bind=\"title || null\">\n <au-slot name=\"loader\" if.bind=\"loading\"><progress></progress></au-slot>\n <template else>\n <au-compose if.bind=\"contentView\" template.bind=\"contentView\"></au-compose>\n <au-slot else></au-slot>\n </template>\n </dialog>\n</template>\n", Oi = [], ki = {}, Ai;
4021
+ function ji(e) {
4022
+ Ai ||= h.define({
4023
+ name: Ei,
4024
+ template: Di,
4025
+ dependencies: Oi,
4026
+ bindables: ki
4027
+ }), e.register(Ai);
4030
4028
  }
4031
4029
  //#endregion
4032
- //#region src/components/bleet-dialog.ts
4033
- function Ai(e, t) {
4030
+ //#region src/abstracts/components/abstract-dialog.ts
4031
+ function Mi(e, t) {
4034
4032
  if (typeof e != "object" || !e) return e;
4035
4033
  var n = e[Symbol.toPrimitive];
4036
4034
  if (n !== void 0) {
@@ -4040,15 +4038,15 @@ function Ai(e, t) {
4040
4038
  }
4041
4039
  return (t === "string" ? String : Number)(e);
4042
4040
  }
4043
- function ji(e) {
4044
- var t = Ai(e, "string");
4041
+ function Ni(e) {
4042
+ var t = Mi(e, "string");
4045
4043
  return typeof t == "symbol" ? t : String(t);
4046
4044
  }
4047
- function Mi(e) {
4045
+ function Pi(e) {
4048
4046
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
4049
4047
  return e;
4050
4048
  }
4051
- function Ni(e, t, n) {
4049
+ function Fi(e, t, n) {
4052
4050
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
4053
4051
  try {
4054
4052
  Object.defineProperty(e, "name", {
@@ -4058,7 +4056,7 @@ function Ni(e, t, n) {
4058
4056
  } catch {}
4059
4057
  return e;
4060
4058
  }
4061
- function Pi(e, t, n, r, i, a) {
4059
+ function Ii(e, t, n, r, i, a) {
4062
4060
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
4063
4061
  function p(t, n, r) {
4064
4062
  return function(i, a) {
@@ -4083,13 +4081,13 @@ function Pi(e, t, n, r, i, a) {
4083
4081
  }
4084
4082
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
4085
4083
  if (!b && (d ? (h || x ? E = {
4086
- get: Ni(function() {
4084
+ get: Fi(function() {
4087
4085
  return y(this);
4088
4086
  }, r, "get"),
4089
4087
  set: function(e) {
4090
4088
  t[4](this, e);
4091
4089
  }
4092
- } : E[O] = y, h || Ni(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
4090
+ } : E[O] = y, h || Fi(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
4093
4091
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
4094
4092
  u[+c][r] = i < 3 ? 1 : i;
4095
4093
  }
@@ -4137,8 +4135,8 @@ function Pi(e, t, n, r, i, a) {
4137
4135
  var l = n[c], u = l[1], d = u & 7;
4138
4136
  if ((u & 8) == o && !d == s) {
4139
4137
  var f = l[2], p = !!l[3], m = u & 16;
4140
- h(o ? e : e.prototype, l, m, p ? "#" + f : ji(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
4141
- return Mi(t) === e;
4138
+ h(o ? e : e.prototype, l, m, p ? "#" + f : Ni(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
4139
+ return Pi(t) === e;
4142
4140
  } : i);
4143
4141
  }
4144
4142
  }
@@ -4160,71 +4158,69 @@ function Pi(e, t, n, r, i, a) {
4160
4158
  }
4161
4159
  };
4162
4160
  }
4163
- var Fi = u({
4164
- ...Ci,
4165
- name: "bleet-dialog"
4166
- }), Ii, Li = c({ attribute: "data-dialog-class" }), Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi, Ki;
4167
- (class {
4168
- logger;
4161
+ var Li, Ri, zi = class {
4169
4162
  element;
4170
4163
  ea;
4171
4164
  p;
4172
4165
  transitionService;
4173
- apiService;
4174
4166
  static {
4175
- ({e: [Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi], c: [Ki, Ii]} = Pi(this, [Fi], [
4176
- [
4177
- c,
4178
- 0,
4179
- "id"
4180
- ],
4181
- [
4182
- Li,
4183
- 0,
4184
- "dialogClass"
4185
- ],
4186
- [
4187
- c,
4188
- 0,
4189
- "loadError"
4190
- ],
4191
- [
4192
- c,
4193
- 0,
4194
- "submitError"
4195
- ]
4196
- ]));
4197
- }
4198
- constructor(e = f(a).scopeTo("<bleet-dialog>"), t = f(o), r = f(i), c = f(s), l = f(v), u = f(n)) {
4199
- this.logger = e, this.element = t, this.ea = r, this.p = c, this.transitionService = l, this.apiService = u;
4167
+ ({e: [Li, Ri]} = Ii(this, [], [[
4168
+ l,
4169
+ 0,
4170
+ "id"
4171
+ ]]));
4200
4172
  }
4201
- id = Ri(this, "");
4202
- dialogClass = (zi(this), Bi(this, ""));
4203
- loadError = (Vi(this), Hi(this, ""));
4204
- submitError = (Ui(this), Wi(this, ""));
4205
- title = (Gi(this), "");
4173
+ id = Li(this, "");
4174
+ title = (Ri(this), "");
4206
4175
  color = "";
4207
4176
  dialogElement;
4208
4177
  disposable;
4209
- loading = !1;
4210
4178
  closing = !1;
4211
- contentView = null;
4179
+ constructor(e = m(s), t = m(a), n = m(c), r = m(b)) {
4180
+ this.element = e, this.ea = t, this.p = n, this.transitionService = r;
4181
+ }
4212
4182
  attached() {
4213
- this.disposable = this.ea.subscribe(w.Modal, this.onModalEvent), this.dialogElement.addEventListener("cancel", this.onCancelEvent);
4183
+ this.disposable = this.ea.subscribe(E.Modal, this.onModalEvent), this.dialogElement.addEventListener("cancel", this.onCancelEvent), this.dialogElement.addEventListener("click", this.onDialogClick);
4214
4184
  }
4215
4185
  detaching() {
4216
- this.dialogElement.removeEventListener("cancel", this.onCancelEvent), this.unbindDialogEvents(), this.disposable?.dispose();
4186
+ this.dialogElement.removeEventListener("cancel", this.onCancelEvent), this.dialogElement.removeEventListener("click", this.onDialogClick), this.disposable?.dispose();
4187
+ }
4188
+ show(e) {
4189
+ this.title = e.title ?? "", this.color = e.color ?? "", this.open();
4217
4190
  }
4218
- bindDialogEvents() {
4219
- this.dialogElement.addEventListener("submit", this.onFormSubmit), this.dialogElement.addEventListener("click", this.onDialogClick);
4191
+ clear() {}
4192
+ close() {
4193
+ this.closing = !0, this.transitionService.run(this.dialogElement, (e) => {
4194
+ this.closing === !0 && (this.ea.publish(E.ModalStatus, {
4195
+ status: N.Closing,
4196
+ id: this.id
4197
+ }), this.ea.publish(E.Overlay, { action: O.Close }), w(e, "dialog", "hide", this.element));
4198
+ }, (e) => {
4199
+ this.closing === !0 && (this.closing = !1, e.close(), this.title = "", this.color = "", this.clear(), this.ea.publish(E.ModalStatus, {
4200
+ status: N.Closed,
4201
+ id: this.id
4202
+ }));
4203
+ });
4220
4204
  }
4221
- unbindDialogEvents() {
4222
- this.dialogElement.removeEventListener("submit", this.onFormSubmit), this.dialogElement.removeEventListener("click", this.onDialogClick);
4205
+ open() {
4206
+ this.closing = !1, this.transitionService.run(this.dialogElement, (e) => {
4207
+ this.ea.publish(E.Overlay, { action: O.Open }), this.ea.publish(E.ModalStatus, {
4208
+ status: N.Opening,
4209
+ id: this.id
4210
+ }), e.showModal(), this.p.requestAnimationFrame(() => {
4211
+ w(e, "dialog", "show", this.element);
4212
+ });
4213
+ }, () => {
4214
+ this.ea.publish(E.ModalStatus, {
4215
+ status: N.Opened,
4216
+ id: this.id
4217
+ });
4218
+ });
4223
4219
  }
4224
4220
  onModalEvent = (e) => {
4225
- if (this.id && this.id !== "" && e.id === this.id) {
4221
+ if (this.id !== "" && e.id === this.id) {
4226
4222
  let t = this.dialogElement.open === !0 && this.closing === !1;
4227
- e.action === A.Open && t === !1 ? this.show(e) : e.action === A.Close && t === !0 ? this.close() : e.action === A.Toggle && (t === !0 ? this.close() : this.show(e));
4223
+ e.action === M.Open && t === !1 ? this.show(e) : e.action === M.Close && t === !0 ? this.close() : e.action === M.Toggle && (t === !0 ? this.close() : this.show(e));
4228
4224
  }
4229
4225
  };
4230
4226
  onCancelEvent = (e) => {
@@ -4236,104 +4232,10 @@ var Fi = u({
4236
4232
  onDialogClick = (e) => {
4237
4233
  e.target.closest("[data-dialog=\"close\"]") && (e.preventDefault(), this.close());
4238
4234
  };
4239
- onFormSubmit = (e) => {
4240
- let t = e.target.closest("form");
4241
- if (t && this.contentView !== null && t.getAttribute("data-dialog") !== "native") {
4242
- e.preventDefault();
4243
- let n = new FormData(t);
4244
- e.submitter instanceof HTMLButtonElement && e.submitter.name && n.append(e.submitter.name, e.submitter.value || "");
4245
- let r = n.get("_method") || t.getAttribute("method") || "POST";
4246
- this.apiService.url(t.action).fromMultipart(n).request(r).then((e) => {
4247
- this.applyResponse(e.body);
4248
- }).catch((e) => {
4249
- this.logger.error("form submit failed", e), this.publishError(this.submitError);
4250
- });
4251
- }
4252
- };
4253
- show(e) {
4254
- this.title = e.title ?? "", this.color = e.color ?? "", e.url ? this.loadFromUrl(e.url) : (this.contentView = e.content ?? null, this.open());
4255
- }
4256
- loadFromUrl(e) {
4257
- this.loading = !0, this.open(), this.apiService.url(e).get().then((e) => {
4258
- this.applyResponse(e.body);
4259
- }).catch((e) => {
4260
- this.logger.error("loadFromUrl failed", e), this.close(), this.publishError(this.loadError);
4261
- }).finally(() => {
4262
- this.loading = !1;
4263
- });
4264
- }
4265
- applyResponse(e) {
4266
- e.content && (this.contentView = e.content), this.executeActions(e);
4267
- }
4268
- executeActions(e) {
4269
- let t = e.refresh === !0 || e.action === V.RefreshAndClose;
4270
- (e.action === V.Close || e.action === V.RefreshAndClose) && this.close(), e.toast && this.ea.publish(w.Toaster, {
4271
- action: P.Add,
4272
- toast: e.toast
4273
- }), e.ajaxify ? this.ea.publish(w.Ajaxify, e.ajaxify) : e.redirect ? this.p.window.location.href = e.redirect : t === !0 && this.p.window.location.reload();
4274
- }
4275
- publishError(e) {
4276
- e !== "" && this.ea.publish(w.Toaster, {
4277
- action: P.Add,
4278
- toast: {
4279
- color: z.Danger,
4280
- content: e
4281
- }
4282
- });
4283
- }
4284
- open() {
4285
- this.closing = !1, this.bindDialogEvents(), this.transitionService.run(this.dialogElement, (e) => {
4286
- this.ea.publish(w.Overlay, { action: E.Open }), this.ea.publish(w.ModalStatus, {
4287
- status: j.Opening,
4288
- id: this.id
4289
- }), e.showModal(), this.p.requestAnimationFrame(() => {
4290
- S(e, "dialog", "show", this.element);
4291
- });
4292
- }, () => {
4293
- this.ea.publish(w.ModalStatus, {
4294
- status: j.Opened,
4295
- id: this.id
4296
- });
4297
- });
4298
- }
4299
- close() {
4300
- this.closing = !0, this.transitionService.run(this.dialogElement, (e) => {
4301
- this.closing === !0 && (this.ea.publish(w.ModalStatus, {
4302
- status: j.Closing,
4303
- id: this.id
4304
- }), this.ea.publish(w.Overlay, { action: E.Close }), S(e, "dialog", "hide", this.element));
4305
- }, (e) => {
4306
- this.closing === !0 && (this.closing = !1, e.close(), this.unbindDialogEvents(), this.contentView = null, this.loading = !1, this.title = "", this.color = "", this.ea.publish(w.ModalStatus, {
4307
- status: j.Closed,
4308
- id: this.id
4309
- }));
4310
- });
4311
- }
4312
- static {
4313
- Ii();
4314
- }
4315
- });
4316
- //#endregion
4317
- //#region src/components/bleet-toaster.$au.ts
4318
- var qi = /* @__PURE__ */ h({
4319
- bindables: () => Zi,
4320
- default: () => Yi,
4321
- dependencies: () => Xi,
4322
- name: () => Ji,
4323
- register: () => $i,
4324
- template: () => Yi
4325
- }), Ji = "bleet-toaster", Yi = "<template>\n <template repeat.for=\"toast of toasts\">\n <au-slot expose.bind=\"toast\"></au-slot>\n </template>\n</template>\n", Xi = [], Zi = {}, Qi;
4326
- function $i(e) {
4327
- Qi ||= p.define({
4328
- name: Ji,
4329
- template: Yi,
4330
- dependencies: Xi,
4331
- bindables: Zi
4332
- }), e.register(Qi);
4333
- }
4235
+ };
4334
4236
  //#endregion
4335
- //#region src/components/bleet-toaster.ts
4336
- function ea(e, t) {
4237
+ //#region src/abstracts/components/abstract-dropdown.ts
4238
+ function Bi(e, t) {
4337
4239
  if (typeof e != "object" || !e) return e;
4338
4240
  var n = e[Symbol.toPrimitive];
4339
4241
  if (n !== void 0) {
@@ -4343,15 +4245,15 @@ function ea(e, t) {
4343
4245
  }
4344
4246
  return (t === "string" ? String : Number)(e);
4345
4247
  }
4346
- function ta(e) {
4347
- var t = ea(e, "string");
4248
+ function Vi(e) {
4249
+ var t = Bi(e, "string");
4348
4250
  return typeof t == "symbol" ? t : String(t);
4349
4251
  }
4350
- function na(e) {
4252
+ function Hi(e) {
4351
4253
  if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
4352
4254
  return e;
4353
4255
  }
4354
- function ra(e, t, n) {
4256
+ function Ui(e, t, n) {
4355
4257
  typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
4356
4258
  try {
4357
4259
  Object.defineProperty(e, "name", {
@@ -4361,7 +4263,7 @@ function ra(e, t, n) {
4361
4263
  } catch {}
4362
4264
  return e;
4363
4265
  }
4364
- function ia(e, t, n, r, i, a) {
4266
+ function Wi(e, t, n, r, i, a) {
4365
4267
  var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
4366
4268
  function p(t, n, r) {
4367
4269
  return function(i, a) {
@@ -4386,13 +4288,13 @@ function ia(e, t, n, r, i, a) {
4386
4288
  }
4387
4289
  var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
4388
4290
  if (!b && (d ? (h || x ? E = {
4389
- get: ra(function() {
4291
+ get: Ui(function() {
4390
4292
  return y(this);
4391
4293
  }, r, "get"),
4392
4294
  set: function(e) {
4393
4295
  t[4](this, e);
4394
4296
  }
4395
- } : E[O] = y, h || ra(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
4297
+ } : E[O] = y, h || Ui(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
4396
4298
  if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
4397
4299
  u[+c][r] = i < 3 ? 1 : i;
4398
4300
  }
@@ -4440,8 +4342,8 @@ function ia(e, t, n, r, i, a) {
4440
4342
  var l = n[c], u = l[1], d = u & 7;
4441
4343
  if ((u & 8) == o && !d == s) {
4442
4344
  var f = l[2], p = !!l[3], m = u & 16;
4443
- h(o ? e : e.prototype, l, m, p ? "#" + f : ta(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
4444
- return na(t) === e;
4345
+ h(o ? e : e.prototype, l, m, p ? "#" + f : Vi(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
4346
+ return Hi(t) === e;
4445
4347
  } : i);
4446
4348
  }
4447
4349
  }
@@ -4463,113 +4365,662 @@ function ia(e, t, n, r, i, a) {
4463
4365
  }
4464
4366
  };
4465
4367
  }
4466
- var aa = u({
4467
- ...qi,
4468
- name: "bleet-toaster"
4469
- }), oa, sa;
4470
- (class {
4471
- logger;
4368
+ var Gi = l({ mode: r.twoWay }), Ki = l({ mode: r.twoWay }), qi, Ji, Yi, Xi, Zi, Qi, $i, ea, ta, na, ra, ia, aa, oa, sa = class {
4472
4369
  element;
4473
- ea;
4474
4370
  p;
4475
- transitionService;
4371
+ trapFocusService;
4476
4372
  static {
4477
- ({c: [sa, oa]} = ia(this, [aa], []));
4373
+ ({e: [qi, Ji, Yi, Xi, Zi, Qi, $i, ea, ta, na, ra, ia, aa, oa]} = Wi(this, [], [
4374
+ [
4375
+ l,
4376
+ 0,
4377
+ "options"
4378
+ ],
4379
+ [
4380
+ Gi,
4381
+ 0,
4382
+ "value"
4383
+ ],
4384
+ [
4385
+ Ki,
4386
+ 0,
4387
+ "values"
4388
+ ],
4389
+ [
4390
+ l,
4391
+ 0,
4392
+ "multiple"
4393
+ ],
4394
+ [
4395
+ l,
4396
+ 0,
4397
+ "disabled"
4398
+ ],
4399
+ [
4400
+ l,
4401
+ 0,
4402
+ "placeholder"
4403
+ ],
4404
+ [
4405
+ f,
4406
+ 0,
4407
+ "query"
4408
+ ]
4409
+ ]));
4478
4410
  }
4479
- constructor(e = f(a).scopeTo("<bleet-toaster>"), t = f(o), n = f(i), r = f(s), c = f(v)) {
4480
- this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = c;
4411
+ options = qi(this, []);
4412
+ value = (Ji(this), Yi(this, null));
4413
+ values = (Xi(this), Zi(this, []));
4414
+ multiple = (Qi(this), $i(this, !1));
4415
+ disabled = (ea(this), ta(this, !1));
4416
+ placeholder = (na(this), ra(this, ""));
4417
+ open = (ia(this), !1);
4418
+ groups = [];
4419
+ selection = [];
4420
+ empty = !1;
4421
+ button;
4422
+ panel;
4423
+ search = null;
4424
+ entries = [];
4425
+ placeholderRow = null;
4426
+ query = aa(this, "");
4427
+ constructor(e = m(s), t = m(c), n = m(S)) {
4428
+ this.element = e, this.p = t, this.trapFocusService = n;
4481
4429
  }
4482
- toasts = [];
4483
- entries = /* @__PURE__ */ new Map();
4484
- disposable;
4485
- attached() {
4486
- this.disposable = this.ea.subscribe(w.Toaster, this.onToasterEvent);
4430
+ bound() {
4431
+ this.build();
4487
4432
  }
4488
4433
  detaching() {
4489
- this.disposable?.dispose(), this.entries.forEach((e) => {
4490
- e.closeTimeout !== void 0 && this.p.clearTimeout(e.closeTimeout);
4491
- });
4434
+ let e = Promise.resolve();
4435
+ return this.open === !0 && (e = this.trapFocusService.stop()), e;
4492
4436
  }
4493
- onToasterEvent = (e) => {
4494
- if (e.action === P.Add && e.toast) {
4495
- let t = ir(e.toast);
4496
- this.entries.has(t.id) === !1 && this.add(t);
4497
- } else e.action === P.Remove && e.toast?.id && this.close(e.toast.id);
4498
- };
4499
- add(e) {
4500
- let t = { closing: !1 }, n = {
4501
- ...e,
4502
- close: (t) => {
4503
- t.preventDefault(), this.close(e.id);
4504
- }
4505
- };
4506
- this.entries.set(e.id, t), this.toasts = [...this.toasts, n], ar(this.element), this.p.requestAnimationFrame(() => {
4507
- let n = this.findToastElement(e.id);
4508
- n === null ? this.logger.warn(`No projected toast carries data-toaster-id="${e.id}"`) : this.transitionService.run(n, (n) => {
4509
- e.duration > 0 && (t.closeTimeout = this.p.setTimeout(() => {
4510
- this.close(e.id);
4511
- }, e.duration)), S(n, "toaster", "show");
4512
- });
4513
- });
4437
+ optionsChanged() {
4438
+ this.build();
4514
4439
  }
4515
- close(e) {
4516
- let t = this.entries.get(e);
4517
- if (t !== void 0 && t.closing === !1) {
4518
- let n = this.findToastElement(e);
4519
- t.closing = !0, t.closeTimeout !== void 0 && this.p.clearTimeout(t.closeTimeout), n === null ? this.remove(e) : this.transitionService.run(n, (e) => {
4520
- S(e, "toaster", "hide");
4521
- }, () => {
4522
- this.remove(e);
4523
- });
4524
- }
4440
+ placeholderChanged() {
4441
+ this.build();
4525
4442
  }
4526
- remove(e) {
4527
- this.entries.delete(e), this.toasts = this.toasts.filter((t) => t.id !== e), this.entries.size === 0 && or(this.element);
4443
+ valueChanged() {
4444
+ this.select();
4528
4445
  }
4529
- findToastElement(e) {
4530
- return this.element.querySelector(`[data-toaster-id="${e}"]`);
4446
+ valuesChanged() {
4447
+ this.select();
4531
4448
  }
4532
- static {
4533
- oa();
4449
+ queryChanged() {
4450
+ this.filter();
4534
4451
  }
4535
- });
4452
+ onClickToggle(e) {
4453
+ let t = Promise.resolve();
4454
+ return e.preventDefault(), this.open === !0 ? t = this.trapFocusService.stop() : this.disabled === !1 && (t = this.openPanel()), t;
4455
+ }
4456
+ onClickItem(e, t) {
4457
+ let n = Promise.resolve();
4458
+ return e.preventDefault(), t.disabled === !1 && (this.multiple === !0 ? this.values = t.selected === !0 ? this.values.filter((e) => e !== t.value) : [...this.values, t.value] : (this.value = t.value, n = this.trapFocusService.stop())), n;
4459
+ }
4460
+ onClickRemove(e, t) {
4461
+ e.preventDefault(), e.stopPropagation(), this.values = this.values.filter((e) => e !== t.value);
4462
+ }
4463
+ openPanel() {
4464
+ let e = this.search ?? this.panel.querySelector("[aria-selected=\"true\"]") ?? void 0;
4465
+ return this.open = !0, this.trapFocusService.start(this.button, this.panel, this.element, void 0, this.onStopTrapFocus, e).then(() => {
4466
+ this.p.requestAnimationFrame(() => {
4467
+ this.panel.querySelector("[aria-selected=\"true\"]")?.scrollIntoView({ block: "nearest" });
4468
+ });
4469
+ });
4470
+ }
4471
+ onStopTrapFocus = (oa(this), () => {
4472
+ this.open = !1, this.query = "";
4473
+ });
4474
+ build() {
4475
+ this.placeholderRow = this.multiple === !1 && this.placeholder !== "" ? {
4476
+ value: null,
4477
+ label: this.placeholder,
4478
+ disabled: !1,
4479
+ selected: !1
4480
+ } : null, this.entries = this.options.map((e) => ({
4481
+ group: e.group ?? "",
4482
+ row: {
4483
+ value: e.value,
4484
+ label: e.label,
4485
+ disabled: e.disabled === !0,
4486
+ selected: !1
4487
+ }
4488
+ })), this.select(), this.filter();
4489
+ }
4490
+ select() {
4491
+ this.placeholderRow !== null && (this.placeholderRow.selected = this.value === null), this.entries.forEach((e) => {
4492
+ e.row.selected = this.multiple === !0 ? this.values.includes(e.row.value) : this.value === e.row.value;
4493
+ }), this.selection = this.entries.map((e) => e.row).filter((e) => e.selected === !0);
4494
+ }
4495
+ filter() {
4496
+ let e = this.query.toLowerCase().trim(), t = [];
4497
+ this.placeholderRow !== null && e === "" && t.push({
4498
+ label: "",
4499
+ rows: [this.placeholderRow]
4500
+ }), this.entries.forEach((n) => {
4501
+ if (e === "" || n.row.label.toLowerCase().includes(e) === !0) {
4502
+ let e = t.find((e) => e.label === n.group);
4503
+ e === void 0 ? t.push({
4504
+ label: n.group,
4505
+ rows: [n.row]
4506
+ }) : e.rows.push(n.row);
4507
+ }
4508
+ }), this.groups = t, this.empty = e !== "" && t.length === 0;
4509
+ }
4510
+ };
4536
4511
  //#endregion
4537
- //#region src/index.ts
4538
- var ca = [
4539
- X,
4540
- H,
4541
- G,
4542
- U,
4543
- Z,
4544
- Q,
4545
- J,
4546
- K,
4547
- W,
4548
- q,
4549
- Y,
4550
- $,
4551
- Wn,
4552
- rr,
4553
- mr,
4554
- zr,
4555
- qr,
4556
- ti,
4557
- Si,
4558
- Ki,
4559
- sa
4560
- ];
4512
+ //#region src/abstracts/components/abstract-pager.ts
4513
+ function ca(e, t) {
4514
+ if (typeof e != "object" || !e) return e;
4515
+ var n = e[Symbol.toPrimitive];
4516
+ if (n !== void 0) {
4517
+ var r = n.call(e, t || "default");
4518
+ if (typeof r != "object") return r;
4519
+ throw TypeError("@@toPrimitive must return a primitive value.");
4520
+ }
4521
+ return (t === "string" ? String : Number)(e);
4522
+ }
4561
4523
  function la(e) {
4524
+ var t = ca(e, "string");
4525
+ return typeof t == "symbol" ? t : String(t);
4526
+ }
4527
+ function ua(e) {
4528
+ if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
4529
+ return e;
4530
+ }
4531
+ function da(e, t, n) {
4532
+ typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
4533
+ try {
4534
+ Object.defineProperty(e, "name", {
4535
+ configurable: !0,
4536
+ value: n ? n + " " + t : t
4537
+ });
4538
+ } catch {}
4539
+ return e;
4540
+ }
4541
+ function fa(e, t, n, r, i, a) {
4542
+ var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
4543
+ function p(t, n, r) {
4544
+ return function(i, a) {
4545
+ n && (a = i, i = e);
4546
+ for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
4547
+ return r ? a : i;
4548
+ };
4549
+ }
4550
+ function m(e, t, n, r) {
4551
+ if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
4552
+ return e;
4553
+ }
4554
+ function h(e, t, n, r, i, a, o, c, d, h, g) {
4555
+ function _(e) {
4556
+ if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
4557
+ }
4558
+ var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
4559
+ function T(t, n, r) {
4560
+ return function(i, a) {
4561
+ return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
4562
+ };
4563
+ }
4564
+ var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
4565
+ if (!b && (d ? (h || x ? E = {
4566
+ get: da(function() {
4567
+ return y(this);
4568
+ }, r, "get"),
4569
+ set: function(e) {
4570
+ t[4](this, e);
4571
+ }
4572
+ } : E[O] = y, h || da(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
4573
+ if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
4574
+ u[+c][r] = i < 3 ? 1 : i;
4575
+ }
4576
+ for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
4577
+ var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
4578
+ kind: [
4579
+ "field",
4580
+ "accessor",
4581
+ "method",
4582
+ "getter",
4583
+ "setter",
4584
+ "class"
4585
+ ][i],
4586
+ name: r,
4587
+ metadata: l,
4588
+ addInitializer: (function(e, t) {
4589
+ if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
4590
+ m(t, "An initializer", "be", !0), a.push(t);
4591
+ }).bind(null, N)
4592
+ };
4593
+ if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
4594
+ else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
4595
+ return r in e;
4596
+ } }, C || (f.get = d ? w ? function(e) {
4597
+ return _(e), E.value;
4598
+ } : T("get", 0, _) : function(e) {
4599
+ return e[r];
4600
+ }), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
4601
+ e[r] = t;
4602
+ }), k = j.call(M, x ? {
4603
+ get: E.get,
4604
+ set: E.set
4605
+ } : E[O], P), N.v = 1, x) {
4606
+ if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
4607
+ else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
4608
+ } else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
4609
+ }
4610
+ return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
4611
+ }
4612
+ function g() {
4613
+ var t = [], r, a, o = function(e) {
4614
+ e && t.push(p(e));
4615
+ }, s = function(o, s) {
4616
+ for (var c = 0; c < n.length; c++) {
4617
+ var l = n[c], u = l[1], d = u & 7;
4618
+ if ((u & 8) == o && !d == s) {
4619
+ var f = l[2], p = !!l[3], m = u & 16;
4620
+ h(o ? e : e.prototype, l, m, p ? "#" + f : la(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
4621
+ return ua(t) === e;
4622
+ } : i);
4623
+ }
4624
+ }
4625
+ };
4626
+ return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
4627
+ }
4628
+ function _(e) {
4629
+ return s(e, o, {
4630
+ configurable: !0,
4631
+ enumerable: !0,
4632
+ value: l
4633
+ });
4634
+ }
4635
+ return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
4636
+ e: f,
4637
+ get c() {
4638
+ var n = [];
4639
+ return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
4640
+ }
4641
+ };
4642
+ }
4643
+ var pa, ma, ha, ga, _a, va, ya = /*#__PURE__*/ function(e) {
4644
+ return e.Change = "bleet-page", e;
4645
+ }({}), ba = /*#__PURE__*/ function(e) {
4646
+ return e[e.MaxButtonCount = 10] = "MaxButtonCount", e;
4647
+ }(ba || {}), xa = class {
4648
+ element;
4649
+ static {
4650
+ ({e: [pa, ma, ha, ga, _a, va]} = fa(this, [], [
4651
+ [
4652
+ l,
4653
+ 0,
4654
+ "pagination"
4655
+ ],
4656
+ [
4657
+ l,
4658
+ 0,
4659
+ "maxButtonCount"
4660
+ ],
4661
+ [
4662
+ f,
4663
+ 0,
4664
+ "selectedPage"
4665
+ ]
4666
+ ]));
4667
+ }
4668
+ pagination = pa(this, {
4669
+ limit: 0,
4670
+ currentPage: 1,
4671
+ totalPages: 1,
4672
+ totalCount: 0
4673
+ });
4674
+ maxButtonCount = (ma(this), ha(this, ba.MaxButtonCount));
4675
+ page = (ga(this), 1);
4676
+ numbers = [];
4677
+ begin = 0;
4678
+ end = 0;
4679
+ selectedPage = _a(this, null);
4680
+ constructor(e = m(s)) {
4681
+ this.element = e, va(this);
4682
+ }
4683
+ bound() {
4684
+ this.page = this.pagination.currentPage, this.refresh();
4685
+ }
4686
+ paginationChanged() {
4687
+ this.page = this.pagination.currentPage, this.refresh();
4688
+ }
4689
+ selectedPageChanged() {
4690
+ this.selectedPage !== null && this.go(this.selectedPage);
4691
+ }
4692
+ onClickPage(e, t) {
4693
+ e.preventDefault(), this.go(t);
4694
+ }
4695
+ refreshed() {}
4696
+ go(e) {
4697
+ e !== this.page && e >= 1 && e <= this.pagination.totalPages && (this.page = e, this.refresh(), this.element.dispatchEvent(new CustomEvent(ya.Change, {
4698
+ bubbles: !0,
4699
+ detail: { page: e }
4700
+ })));
4701
+ }
4702
+ refresh() {
4703
+ let { limit: e, totalPages: t, totalCount: n } = this.pagination, r = Math.floor(this.maxButtonCount / 2), i = Math.max(1, this.page - r), a = i + this.maxButtonCount - 1;
4704
+ a > t && (a = t, i = Math.max(1, a - this.maxButtonCount + 1)), this.numbers = Array.from({ length: Math.max(0, a - i + 1) }, (e, t) => i + t), this.selectedPage = this.page, this.begin = n === 0 ? 0 : (this.page - 1) * e + 1, this.end = Math.min(this.page * e, n), this.refreshed();
4705
+ }
4706
+ }, Sa = class {
4707
+ logger;
4708
+ element;
4709
+ ea;
4710
+ p;
4711
+ transitionService;
4712
+ toasts = [];
4713
+ entries = /* @__PURE__ */ new Map();
4714
+ disposable;
4715
+ constructor(e = m(o).scopeTo("toaster"), t = m(s), n = m(a), r = m(c), i = m(b)) {
4716
+ this.logger = e, this.element = t, this.ea = n, this.p = r, this.transitionService = i;
4717
+ }
4718
+ attached() {
4719
+ this.disposable = this.ea.subscribe(E.Toaster, this.onToasterEvent);
4720
+ }
4721
+ detaching() {
4722
+ this.disposable?.dispose(), this.entries.forEach((e) => {
4723
+ e.closeTimeout !== void 0 && this.p.clearTimeout(e.closeTimeout);
4724
+ });
4725
+ }
4726
+ onClickClose(e, t) {
4727
+ e.preventDefault(), this.close(t);
4728
+ }
4729
+ close(e) {
4730
+ let t = this.entries.get(e);
4731
+ if (t !== void 0 && t.closing === !1) {
4732
+ let n = this.findToastElement(e);
4733
+ t.closing = !0, t.closeTimeout !== void 0 && this.p.clearTimeout(t.closeTimeout), n === null ? this.remove(e) : this.transitionService.run(n, (e) => {
4734
+ w(e, "toaster", "hide");
4735
+ }, () => {
4736
+ this.remove(e);
4737
+ });
4738
+ }
4739
+ }
4740
+ onToasterEvent = (e) => {
4741
+ if (e.action === I.Add && e.toast) {
4742
+ let t = or(e.toast);
4743
+ this.entries.has(t.id) === !1 && this.add(t);
4744
+ } else e.action === I.Remove && e.toast?.id && this.close(e.toast.id);
4745
+ };
4746
+ add(e) {
4747
+ let t = { closing: !1 };
4748
+ this.entries.set(e.id, t), this.toasts = [...this.toasts, e], sr(this.element), this.p.requestAnimationFrame(() => {
4749
+ let n = this.findToastElement(e.id);
4750
+ n === null ? this.logger.warn(`No rendered toast carries data-toaster-id="${e.id}"`) : this.transitionService.run(n, (n) => {
4751
+ e.duration > 0 && (t.closeTimeout = this.p.setTimeout(() => {
4752
+ this.close(e.id);
4753
+ }, e.duration)), w(n, "toaster", "show");
4754
+ });
4755
+ });
4756
+ }
4757
+ remove(e) {
4758
+ this.entries.delete(e), this.toasts = this.toasts.filter((t) => t.id !== e), this.entries.size === 0 && cr(this.element);
4759
+ }
4760
+ findToastElement(e) {
4761
+ return this.element.querySelector(`[data-toaster-id="${e}"]`);
4762
+ }
4763
+ };
4764
+ //#endregion
4765
+ //#region src/components/bleet-dialog.ts
4766
+ function Ca(e, t) {
4767
+ if (typeof e != "object" || !e) return e;
4768
+ var n = e[Symbol.toPrimitive];
4769
+ if (n !== void 0) {
4770
+ var r = n.call(e, t || "default");
4771
+ if (typeof r != "object") return r;
4772
+ throw TypeError("@@toPrimitive must return a primitive value.");
4773
+ }
4774
+ return (t === "string" ? String : Number)(e);
4775
+ }
4776
+ function wa(e) {
4777
+ var t = Ca(e, "string");
4778
+ return typeof t == "symbol" ? t : String(t);
4779
+ }
4780
+ function Ta(e) {
4781
+ if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
4782
+ return e;
4783
+ }
4784
+ function Ea(e, t, n) {
4785
+ typeof t == "symbol" && (t = t.description, t = t ? "[" + t + "]" : "");
4786
+ try {
4787
+ Object.defineProperty(e, "name", {
4788
+ configurable: !0,
4789
+ value: n ? n + " " + t : t
4790
+ });
4791
+ } catch {}
4792
+ return e;
4793
+ }
4794
+ function Da(e, t, n, r, i, a) {
4795
+ var o = Symbol.metadata || Symbol.for("Symbol.metadata"), s = Object.defineProperty, c = Object.create, l, u = [c(null), c(null)], d = t.length, f;
4796
+ function p(t, n, r) {
4797
+ return function(i, a) {
4798
+ n && (a = i, i = e);
4799
+ for (var o = 0; o < t.length; o++) a = t[o].apply(i, r ? [a] : []);
4800
+ return r ? a : i;
4801
+ };
4802
+ }
4803
+ function m(e, t, n, r) {
4804
+ if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
4805
+ return e;
4806
+ }
4807
+ function h(e, t, n, r, i, a, o, c, d, h, g) {
4808
+ function _(e) {
4809
+ if (!g(e)) throw TypeError("Attempted to access private element on non-instance");
4810
+ }
4811
+ var v = [].concat(t[0]), y = t[3], b = !o, x = i === 1, S = i === 3, C = i === 4, w = i === 2;
4812
+ function T(t, n, r) {
4813
+ return function(i, a) {
4814
+ return n && (a = i, i = e), r && r(i), desc[t].call(i, a);
4815
+ };
4816
+ }
4817
+ var E = {}, D = [], O = S ? "get" : C || x ? "set" : "value";
4818
+ if (!b && (d ? (h || x ? E = {
4819
+ get: Ea(function() {
4820
+ return y(this);
4821
+ }, r, "get"),
4822
+ set: function(e) {
4823
+ t[4](this, e);
4824
+ }
4825
+ } : E[O] = y, h || Ea(E[O], r, w ? "" : O)) : h || (E = Object.getOwnPropertyDescriptor(e, r)), !h && !d)) {
4826
+ if (f = u[+c][r], f && (f ^ i) !== 7) throw Error("Decorating two elements with the same name (" + E[O].name + ") is not supported yet");
4827
+ u[+c][r] = i < 3 ? 1 : i;
4828
+ }
4829
+ for (var k = e, A = v.length - 1; A >= 0; A -= n ? 2 : 1) {
4830
+ var j = m(v[A], "A decorator", "be", !0), M = n ? v[A - 1] : void 0, N = {}, P = {
4831
+ kind: [
4832
+ "field",
4833
+ "accessor",
4834
+ "method",
4835
+ "getter",
4836
+ "setter",
4837
+ "class"
4838
+ ][i],
4839
+ name: r,
4840
+ metadata: l,
4841
+ addInitializer: (function(e, t) {
4842
+ if (e.v) throw TypeError("attempted to call addInitializer after decoration was finished");
4843
+ m(t, "An initializer", "be", !0), a.push(t);
4844
+ }).bind(null, N)
4845
+ };
4846
+ if (b) f = j.call(M, k, P), N.v = 1, m(f, "class decorators", "return") && (k = f);
4847
+ else if (P.static = c, P.private = d, f = P.access = { has: d ? g.bind() : function(e) {
4848
+ return r in e;
4849
+ } }, C || (f.get = d ? w ? function(e) {
4850
+ return _(e), E.value;
4851
+ } : T("get", 0, _) : function(e) {
4852
+ return e[r];
4853
+ }), !w && !S && (f.set = d ? T("set", 0, _) : function(e, t) {
4854
+ e[r] = t;
4855
+ }), k = j.call(M, x ? {
4856
+ get: E.get,
4857
+ set: E.set
4858
+ } : E[O], P), N.v = 1, x) {
4859
+ if (typeof k == "object" && k) (f = m(k.get, "accessor.get")) && (E.get = f), (f = m(k.set, "accessor.set")) && (E.set = f), (f = m(k.init, "accessor.init")) && D.unshift(f);
4860
+ else if (k !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
4861
+ } else m(k, (h ? "field" : "method") + " decorators", "return") && (h ? D.unshift(k) : E[O] = k);
4862
+ }
4863
+ return i < 2 && o.push(p(D, c, 1), p(a, c, 0)), !h && !b && (d ? x ? o.splice(-1, 0, T("get", c), T("set", c)) : o.push(w ? E[O] : m.call.bind(E[O])) : s(e, r, E)), k;
4864
+ }
4865
+ function g() {
4866
+ var t = [], r, a, o = function(e) {
4867
+ e && t.push(p(e));
4868
+ }, s = function(o, s) {
4869
+ for (var c = 0; c < n.length; c++) {
4870
+ var l = n[c], u = l[1], d = u & 7;
4871
+ if ((u & 8) == o && !d == s) {
4872
+ var f = l[2], p = !!l[3], m = u & 16;
4873
+ h(o ? e : e.prototype, l, m, p ? "#" + f : wa(f), d, d < 2 ? [] : o ? a ||= [] : r ||= [], t, !!o, p, s, o && p ? function(t) {
4874
+ return Ta(t) === e;
4875
+ } : i);
4876
+ }
4877
+ }
4878
+ };
4879
+ return s(8, 0), s(0, 0), s(8, 1), s(0, 1), o(r), o(a), t;
4880
+ }
4881
+ function _(e) {
4882
+ return s(e, o, {
4883
+ configurable: !0,
4884
+ enumerable: !0,
4885
+ value: l
4886
+ });
4887
+ }
4888
+ return a !== void 0 && (l = a[o]), l = c(l ?? null), f = g(), d || _(e), {
4889
+ e: f,
4890
+ get c() {
4891
+ var n = [];
4892
+ return d && [_(e = h(e, [t], r, e.name, 5, n)), p(n, 1)];
4893
+ }
4894
+ };
4895
+ }
4896
+ var Oa = d({
4897
+ ...Ti,
4898
+ name: "bleet-dialog"
4899
+ }), ka, Aa = zi, ja = l({ attribute: "data-dialog-class" }), Ma, Na, Pa, Fa, Ia, La, Ra;
4900
+ (class extends Aa {
4901
+ logger;
4902
+ apiService;
4903
+ static {
4904
+ ({e: [Ma, Na, Pa, Fa, Ia, La], c: [Ra, ka]} = Da(this, [Oa], [
4905
+ [
4906
+ ja,
4907
+ 0,
4908
+ "dialogClass"
4909
+ ],
4910
+ [
4911
+ l,
4912
+ 0,
4913
+ "loadError"
4914
+ ],
4915
+ [
4916
+ l,
4917
+ 0,
4918
+ "submitError"
4919
+ ]
4920
+ ], 0, void 0, Aa));
4921
+ }
4922
+ constructor(e = m(o).scopeTo("<bleet-dialog>"), t = m(n)) {
4923
+ super(), this.logger = e, this.apiService = t;
4924
+ }
4925
+ dialogClass = Ma(this, "");
4926
+ loadError = (Na(this), Pa(this, ""));
4927
+ submitError = (Fa(this), Ia(this, ""));
4928
+ loading = (La(this), !1);
4929
+ contentView = null;
4930
+ attached() {
4931
+ super.attached(), this.dialogElement.addEventListener("submit", this.onFormSubmit);
4932
+ }
4933
+ detaching() {
4934
+ this.dialogElement.removeEventListener("submit", this.onFormSubmit), super.detaching();
4935
+ }
4936
+ show(e) {
4937
+ e.url ? this.loadFromUrl(e.url) : this.contentView = e.content ?? null, super.show(e);
4938
+ }
4939
+ clear() {
4940
+ this.contentView = null, this.loading = !1;
4941
+ }
4942
+ onFormSubmit = (e) => {
4943
+ let t = e.target.closest("form");
4944
+ if (t && this.contentView !== null && t.getAttribute("data-dialog") !== "native") {
4945
+ e.preventDefault();
4946
+ let n = new FormData(t);
4947
+ e.submitter instanceof HTMLButtonElement && e.submitter.name && n.append(e.submitter.name, e.submitter.value || "");
4948
+ let r = n.get("_method") || t.getAttribute("method") || "POST";
4949
+ this.apiService.url(t.action).fromMultipart(n).request(r).then((e) => {
4950
+ this.applyResponse(e.body);
4951
+ }).catch((e) => {
4952
+ this.logger.error("form submit failed", e), this.publishError(this.submitError);
4953
+ });
4954
+ }
4955
+ };
4956
+ loadFromUrl(e) {
4957
+ this.loading = !0, this.apiService.url(e).get().then((e) => {
4958
+ this.applyResponse(e.body);
4959
+ }).catch((e) => {
4960
+ this.logger.error("loadFromUrl failed", e), this.close(), this.publishError(this.loadError);
4961
+ }).finally(() => {
4962
+ this.loading = !1;
4963
+ });
4964
+ }
4965
+ applyResponse(e) {
4966
+ e.content && (this.contentView = e.content), this.executeActions(e);
4967
+ }
4968
+ executeActions(e) {
4969
+ let t = e.refresh === !0 || e.action === U.RefreshAndClose;
4970
+ (e.action === U.Close || e.action === U.RefreshAndClose) && this.close(), e.toast && this.ea.publish(E.Toaster, {
4971
+ action: I.Add,
4972
+ toast: e.toast
4973
+ }), e.ajaxify ? this.ea.publish(E.Ajaxify, e.ajaxify) : e.redirect ? this.p.window.location.href = e.redirect : t === !0 && this.p.window.location.reload();
4974
+ }
4975
+ publishError(e) {
4976
+ e !== "" && this.ea.publish(E.Toaster, {
4977
+ action: I.Add,
4978
+ toast: {
4979
+ color: V.Danger,
4980
+ content: e
4981
+ }
4982
+ });
4983
+ }
4984
+ static {
4985
+ ka();
4986
+ }
4987
+ });
4988
+ //#endregion
4989
+ //#region src/index.ts
4990
+ var za = [
4991
+ Q,
4992
+ W,
4993
+ q,
4994
+ G,
4995
+ $,
4996
+ tn,
4997
+ X,
4998
+ J,
4999
+ K,
5000
+ Y,
5001
+ Z,
5002
+ In,
5003
+ Kn,
5004
+ ar,
5005
+ gr,
5006
+ Vr,
5007
+ Yr,
5008
+ ri,
5009
+ wi,
5010
+ Ra
5011
+ ];
5012
+ function Ba(e) {
4562
5013
  return {
4563
5014
  register(n) {
4564
- return (e ? t.customize(e) : t).register(n), n.register(...ca);
5015
+ return (e ? t.customize(e) : t).register(n), n.register(...za);
4565
5016
  },
4566
5017
  customize(e) {
4567
- return la(e);
5018
+ return Ba(e);
4568
5019
  }
4569
5020
  };
4570
5021
  }
4571
- var ua = la();
5022
+ var Va = Ba();
4572
5023
  //#endregion
4573
- export { M as AjaxifyAction, N as AjaxifyTriggerMode, te as BadgeAction, Si as BleetAjaxify, $ as BleetAjaxifyTriggerCustomAttribute, X as BleetAlertCustomAttribute, W as BleetBadgeCustomAttribute, H as BleetBurgerCustomAttribute, ua as BleetConfiguration, Ki as BleetDialog, G as BleetDropdownCustomAttribute, ti as BleetFocusCustomAttribute, U as BleetMenuCustomAttribute, Z as BleetModalTriggerCustomAttribute, qr as BleetOverlayCustomAttribute, Q as BleetPagerCustomAttribute, K as BleetPasswordCustomAttribute, Wn as BleetPopoverCustomAttribute, rr as BleetPopoverTriggerCustomAttribute, J as BleetProfileCustomAttribute, q as BleetTabsCustomAttribute, zr as BleetToastCustomAttribute, sa as BleetToaster, mr as BleetToasterCustomAttribute, Y as BleetToasterTriggerCustomAttribute, w as Channels, V as DialogAction, g as IStorageService, v as ITransitionService, b as ITrapFocusService, F as MenuAction, I as MenuStatus, A as ModalAction, j as ModalStatus, E as OverlayAction, D as OverlayStatus, L as PopoverAction, R as PopoverStatus, O as ProfileAction, k as ProfileStatus, P as ToasterAction, ee as ToasterStatus, z as UiColor, ne as UiIcon, B as UiToastIcon, T as UploadAction, S as setState };
5024
+ export { zi as AbstractDialog, sa as AbstractDropdown, xa as AbstractPager, Sa as AbstractToaster, P as AjaxifyAction, F as AjaxifyTriggerMode, te as BadgeAction, wi as BleetAjaxify, In as BleetAjaxifyTriggerCustomAttribute, Q as BleetAlertCustomAttribute, K as BleetBadgeCustomAttribute, W as BleetBurgerCustomAttribute, Va as BleetConfiguration, Ra as BleetDialog, q as BleetDropdownCustomAttribute, ri as BleetFocusCustomAttribute, G as BleetMenuCustomAttribute, $ as BleetModalTriggerCustomAttribute, Yr as BleetOverlayCustomAttribute, tn as BleetPagerCustomAttribute, J as BleetPasswordCustomAttribute, Kn as BleetPopoverCustomAttribute, ar as BleetPopoverTriggerCustomAttribute, X as BleetProfileCustomAttribute, Y as BleetTabsCustomAttribute, Vr as BleetToastCustomAttribute, gr as BleetToasterCustomAttribute, Z as BleetToasterTriggerCustomAttribute, E as Channels, U as DialogAction, v as IStorageService, b as ITransitionService, S as ITrapFocusService, L as MenuAction, R as MenuStatus, M as ModalAction, N as ModalStatus, O as OverlayAction, k as OverlayStatus, ya as PagerEvent, z as PopoverAction, B as PopoverStatus, A as ProfileAction, j as ProfileStatus, I as ToasterAction, ee as ToasterStatus, V as UiColor, ne as UiIcon, H as UiToastIcon, D as UploadAction, w as setState };
4574
5025
 
4575
5026
  //# sourceMappingURL=index.es.js.map