@supersoniks/concorde 1.1.45 → 1.1.46

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 (44) hide show
  1. package/concorde-core.bundle.js +39 -24
  2. package/concorde-core.es.js +701 -231
  3. package/core/components/functional/fetch/fetch.d.ts +2 -1
  4. package/core/components/functional/list/list.d.ts +3 -1
  5. package/core/components/functional/list/list.js +3 -1
  6. package/core/components/functional/queue/queue.d.ts +8 -1
  7. package/core/components/functional/queue/queue.js +126 -62
  8. package/core/components/functional/sdui/sdui.d.ts +2 -1
  9. package/core/components/ui/alert/alert.d.ts +3 -0
  10. package/core/components/ui/alert/alert.js +33 -1
  11. package/core/components/ui/badge/badge.d.ts +1 -1
  12. package/core/components/ui/badge/badge.js +9 -3
  13. package/core/components/ui/button/button.d.ts +1 -0
  14. package/core/components/ui/form/checkbox/checkbox.d.ts +3 -0
  15. package/core/components/ui/form/checkbox/checkbox.js +14 -3
  16. package/core/components/ui/form/css/form-control.d.ts +1 -0
  17. package/core/components/ui/form/css/form-control.js +17 -0
  18. package/core/components/ui/form/input/input.d.ts +5 -3
  19. package/core/components/ui/form/input/input.js +47 -3
  20. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +93 -13
  21. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +181 -52
  22. package/core/components/ui/form/textarea/textarea.d.ts +1 -0
  23. package/core/components/ui/icon/icon.js +1 -1
  24. package/core/components/ui/modal/modal-close.js +2 -3
  25. package/core/components/ui/modal/modal-content.js +1 -0
  26. package/core/components/ui/modal/modal.d.ts +8 -0
  27. package/core/components/ui/modal/modal.js +34 -6
  28. package/core/components/ui/pop/pop.js +18 -7
  29. package/core/components/ui/theme/theme-collection/core-variables.js +18 -9
  30. package/core/components/ui/theme/theme.js +8 -3
  31. package/core/mixins/Fetcher.d.ts +2 -1
  32. package/core/mixins/Fetcher.js +42 -10
  33. package/core/mixins/FormCheckable.d.ts +1 -0
  34. package/core/mixins/FormElement.d.ts +1 -0
  35. package/core/mixins/FormElement.js +6 -2
  36. package/core/mixins/FormInput.d.ts +1 -0
  37. package/core/mixins/Subscriber.d.ts +1 -0
  38. package/core/mixins/Subscriber.js +12 -7
  39. package/core/utils/PublisherProxy.d.ts +30 -3
  40. package/core/utils/PublisherProxy.js +218 -6
  41. package/core/utils/api.d.ts +3 -0
  42. package/core/utils/api.js +3 -1
  43. package/mixins.d.ts +4 -1
  44. package/package.json +5 -1
@@ -134,6 +134,7 @@ class Objects$1 {
134
134
  const _API = class {
135
135
  constructor(config) {
136
136
  this.addHTTPResponse = false;
137
+ this.cache = "default";
137
138
  this.serviceURL = config.serviceURL;
138
139
  if (!this.serviceURL)
139
140
  this.serviceURL = document.location.origin;
@@ -145,6 +146,7 @@ const _API = class {
145
146
  this.authToken = config.authToken;
146
147
  this.addHTTPResponse = config.addHTTPResponse || false;
147
148
  this.credentials = config.credentials;
149
+ this.cache = config.cache || "default";
148
150
  }
149
151
  set token(token) {
150
152
  this._token = token;
@@ -252,7 +254,7 @@ const _API = class {
252
254
  });
253
255
  if (!_API.loadingGetPromises.has(mapKey)) {
254
256
  const promise = new Promise(async (resolve) => {
255
- const result2 = await fetch(url, { headers, credentials: this.credentials });
257
+ const result2 = await fetch(url, { headers, credentials: this.credentials, cache: this.cache });
256
258
  const handledResult = await this.handleResult(result2, lastCall);
257
259
  resolve(handledResult);
258
260
  });
@@ -360,19 +362,22 @@ class Format$1 {
360
362
  function isComplex(value) {
361
363
  return typeof value === "object" && value != null;
362
364
  }
363
- class PublisherProxy$1 {
365
+ const _PublisherProxy = class {
364
366
  constructor(target, parentProxPub) {
365
367
  this._proxies_ = /* @__PURE__ */ new Map();
366
368
  this._key_ = "";
369
+ this._is_savable_ = false;
367
370
  this._invalidateListeners_ = /* @__PURE__ */ new Set();
368
371
  this._assignListeners_ = /* @__PURE__ */ new Set();
369
372
  this._mutationListeners_ = /* @__PURE__ */ new Set();
370
373
  this._fillListeners_ = /* @__PURE__ */ new Set();
371
374
  this._templateFillListeners_ = /* @__PURE__ */ new Set();
372
375
  this._lockInternalMutationPublishing_ = false;
376
+ this._instanceCounter_ = 0;
373
377
  this._value_ = target;
374
378
  this.parent = parentProxPub || null;
375
379
  this.root = this;
380
+ this._instanceCounter_ = 0;
376
381
  while (this.root.parent) {
377
382
  this.root = this.root.parent;
378
383
  }
@@ -387,6 +392,7 @@ class PublisherProxy$1 {
387
392
  this._fillListeners_.clear();
388
393
  this._templateFillListeners_.clear();
389
394
  this._proxies_.clear();
395
+ _PublisherProxy.instances.delete(this._instanceCounter_);
390
396
  }
391
397
  hasListener() {
392
398
  return this._templateFillListeners_.size > 0 || this._assignListeners_.size > 0 || this._invalidateListeners_.size > 0 || this._mutationListeners_.size > 0 || this._fillListeners_.size > 0;
@@ -395,6 +401,12 @@ class PublisherProxy$1 {
395
401
  this._mutationListeners_.forEach((handler) => handler());
396
402
  if (lockInternalMutationsTransmission)
397
403
  return;
404
+ if (!PublisherManager$1.changed && this._is_savable_) {
405
+ PublisherManager$1.changed = true;
406
+ PublisherManager$1.saveId++;
407
+ const saveId = PublisherManager$1.saveId;
408
+ setTimeout(() => PublisherManager$1.getInstance().saveToLocalStorage(saveId), 1e3);
409
+ }
398
410
  if (this.parent) {
399
411
  this.parent._publishInternalMutation_();
400
412
  }
@@ -543,28 +555,97 @@ class PublisherProxy$1 {
543
555
  }
544
556
  return this._value_;
545
557
  }
546
- }
558
+ get $tag() {
559
+ if (!this._instanceCounter_) {
560
+ _PublisherProxy.instancesCounter++;
561
+ this._instanceCounter_ = _PublisherProxy.instancesCounter;
562
+ }
563
+ _PublisherProxy.instances.set(this._instanceCounter_, this);
564
+ const str = '<reactive-publisher-proxy publisher="' + this._instanceCounter_ + '"></reactive-publisher-proxy>';
565
+ return str;
566
+ }
567
+ };
568
+ let PublisherProxy$1 = _PublisherProxy;
569
+ PublisherProxy$1.instances = /* @__PURE__ */ new Map();
570
+ PublisherProxy$1.instancesCounter = 0;
547
571
  const _PublisherManager = class {
548
572
  constructor() {
573
+ this.enabledLocaStorageProxies = [];
549
574
  this.publishers = /* @__PURE__ */ new Map();
575
+ this.localStorageData = {};
576
+ this.isLocalStrorageReady = null;
577
+ this.initialisedData = [];
550
578
  if (_PublisherManager.instance != null)
551
579
  throw "Singleton / use getInstance";
552
580
  _PublisherManager.instance = this;
581
+ this.isLocalStrorageReady = this.cleanStorageData();
582
+ }
583
+ async cleanStorageData() {
584
+ return new Promise((resolve) => {
585
+ const doiIt = async () => {
586
+ try {
587
+ let compressedData = localStorage.getItem("publisher-proxies-data");
588
+ let localStorageJSON = null;
589
+ if (compressedData)
590
+ localStorageJSON = await this.decompress(compressedData, "gzip");
591
+ if (localStorageJSON) {
592
+ try {
593
+ this.localStorageData = JSON.parse(localStorageJSON);
594
+ } catch (e2) {
595
+ this.localStorageData = {};
596
+ }
597
+ } else {
598
+ compressedData = await this.compress("{}", "gzip");
599
+ localStorage.setItem("publisher-proxies-data", compressedData);
600
+ this.localStorageData = {};
601
+ }
602
+ const expires = new Date().getTime() - 1e3 * 60 * 60 * 12;
603
+ for (const key in this.localStorageData) {
604
+ const item = this.localStorageData[key];
605
+ if (item.lastModifiationMS < expires) {
606
+ delete this.localStorageData[key];
607
+ }
608
+ }
609
+ resolve(true);
610
+ } catch (e2) {
611
+ window.requestAnimationFrame(() => {
612
+ resolve(false);
613
+ });
614
+ console.log("no publisher cache in this browser");
615
+ }
616
+ };
617
+ doiIt();
618
+ });
553
619
  }
554
620
  static getInstance() {
555
621
  if (_PublisherManager.instance == null)
556
622
  return new _PublisherManager();
557
623
  return _PublisherManager.instance;
558
624
  }
559
- static get(id) {
560
- return _PublisherManager.getInstance().get(id);
625
+ static get(id, options) {
626
+ return _PublisherManager.getInstance().get(id, options);
561
627
  }
562
628
  static delete(id) {
563
629
  return _PublisherManager.getInstance().delete(id);
564
630
  }
565
- get(id) {
566
- if (!this.publishers.has(id))
567
- this.publishers.set(id, new Publisher({}));
631
+ async setLocalData(publisher, id) {
632
+ var _a2;
633
+ await this.isLocalStrorageReady;
634
+ publisher.set(((_a2 = this.localStorageData[id + "\xA4page:>" + document.location.pathname]) == null ? void 0 : _a2.data) || publisher.get());
635
+ }
636
+ get(id, options) {
637
+ const hasLocalStorage = (options == null ? void 0 : options.localStorageMode) === "enabled";
638
+ if (!this.publishers.has(id)) {
639
+ const data = {};
640
+ const publisher2 = new Publisher(data);
641
+ this.set(id, publisher2);
642
+ }
643
+ const publisher = this.publishers.get(id);
644
+ if (hasLocalStorage && this.initialisedData.indexOf(id) === -1) {
645
+ publisher._is_savable_ = true;
646
+ this.initialisedData.push(id);
647
+ this.setLocalData(publisher, id);
648
+ }
568
649
  return this.publishers.get(id);
569
650
  }
570
651
  set(id, publisher) {
@@ -576,8 +657,75 @@ const _PublisherManager = class {
576
657
  this.publishers.delete(id);
577
658
  return true;
578
659
  }
660
+ async saveToLocalStorage(saveId = 0) {
661
+ if (saveId !== _PublisherManager.saveId && saveId % 10 != 0)
662
+ return;
663
+ try {
664
+ if (!_PublisherManager.changed || _PublisherManager.saving)
665
+ return;
666
+ _PublisherManager.saving = true;
667
+ _PublisherManager.changed = false;
668
+ const keys = Array.from(this.publishers.keys());
669
+ let hasChanged = false;
670
+ for (const key of keys) {
671
+ const publisher = this.publishers.get(key);
672
+ if (!(publisher == null ? void 0 : publisher._is_savable_))
673
+ continue;
674
+ const data = publisher == null ? void 0 : publisher.get();
675
+ if (!data)
676
+ continue;
677
+ this.localStorageData[key + "\xA4page:>" + document.location.pathname] = {
678
+ lastModifiationMS: new Date().getTime(),
679
+ data
680
+ };
681
+ hasChanged = true;
682
+ }
683
+ if (hasChanged) {
684
+ const compressedData = await this.compress(JSON.stringify(this.localStorageData), "gzip");
685
+ localStorage.setItem("publisher-proxies-data", compressedData);
686
+ }
687
+ _PublisherManager.saving = false;
688
+ if (_PublisherManager.changed) {
689
+ _PublisherManager.saveId++;
690
+ const saveId2 = _PublisherManager.saveId;
691
+ setTimeout(() => this.saveToLocalStorage(saveId2), 1e3);
692
+ }
693
+ } catch (e2) {
694
+ _PublisherManager.saving = false;
695
+ }
696
+ }
697
+ async compress(string, encoding) {
698
+ const byteArray = new TextEncoder().encode(string);
699
+ const win = window;
700
+ const cs = new win.CompressionStream(encoding);
701
+ const writer = cs.writable.getWriter();
702
+ writer.write(byteArray);
703
+ writer.close();
704
+ const result = await new Response(cs.readable).arrayBuffer();
705
+ const arrayBufferView = new Uint8Array(result);
706
+ let str = "";
707
+ for (let i2 = 0; i2 < arrayBufferView.length; i2++) {
708
+ str += String.fromCharCode(arrayBufferView[i2]);
709
+ }
710
+ return btoa(str);
711
+ }
712
+ async decompress(str, encoding) {
713
+ const decodedString = atob(str);
714
+ const arrayBufferViewFromLocalStorage = Uint8Array.from(decodedString, (c2) => c2.charCodeAt(0));
715
+ const byteArray = arrayBufferViewFromLocalStorage.buffer;
716
+ const win = window;
717
+ const cs = new win.DecompressionStream(encoding);
718
+ const writer = cs.writable.getWriter();
719
+ writer.write(byteArray);
720
+ writer.close();
721
+ const result = await new Response(cs.readable).arrayBuffer();
722
+ return new TextDecoder().decode(result);
723
+ }
579
724
  };
580
725
  let PublisherManager$1 = _PublisherManager;
726
+ PublisherManager$1.changed = false;
727
+ PublisherManager$1.saving = false;
728
+ PublisherManager$1.saveId = 0;
581
729
  PublisherManager$1.instance = null;
582
730
  class Publisher extends PublisherProxy$1 {
583
731
  constructor(target, parentProxPub = null) {
@@ -598,6 +746,7 @@ class Publisher extends PublisherProxy$1 {
598
746
  "offInternalMutation",
599
747
  "set",
600
748
  "get",
749
+ "$tag",
601
750
  "_templateFillListeners_",
602
751
  "_fillListeners_",
603
752
  "_assignListeners_",
@@ -613,7 +762,9 @@ class Publisher extends PublisherProxy$1 {
613
762
  "_proxies_",
614
763
  "parent",
615
764
  "_value_",
616
- "_lockInternalMutationPublishing_"
765
+ "_is_savable_",
766
+ "_lockInternalMutationPublishing_",
767
+ "_instanceCounter_"
617
768
  ].includes(sKey))
618
769
  return publisherInstance[sKey];
619
770
  if (!publisherInstance._proxies_.has(sKey)) {
@@ -630,6 +781,14 @@ class Publisher extends PublisherProxy$1 {
630
781
  publisherInstance._value_ = vValue;
631
782
  return true;
632
783
  }
784
+ if (sKey == "_is_savable_") {
785
+ publisherInstance._is_savable_ = vValue;
786
+ return true;
787
+ }
788
+ if (sKey == "_instanceCounter_") {
789
+ publisherInstance._instanceCounter_ = vValue;
790
+ return true;
791
+ }
633
792
  if (!publisherInstance._proxies_.has(sKey)) {
634
793
  const newPublisher = new Publisher({}, publisherInstance);
635
794
  newPublisher._proxies_.set("_parent_", thisProxy);
@@ -677,6 +836,26 @@ class Publisher extends PublisherProxy$1 {
677
836
  }
678
837
  if (typeof module != "undefined")
679
838
  module.exports = { Publisher, PublisherManager: PublisherManager$1 };
839
+ class PublisherWebComponent extends HTMLElement {
840
+ constructor() {
841
+ super();
842
+ this.publisherId = "";
843
+ this.onAssign = (value) => {
844
+ this.innerHTML = value.toString();
845
+ };
846
+ }
847
+ connectedCallback() {
848
+ var _a2;
849
+ this.publisherId = this.getAttribute("publisher") || "";
850
+ this.publisher = PublisherProxy$1.instances.get(parseInt(this.publisherId));
851
+ (_a2 = this.publisher) == null ? void 0 : _a2.onAssign(this.onAssign);
852
+ }
853
+ disconnectedCallback() {
854
+ var _a2;
855
+ (_a2 = this.publisher) == null ? void 0 : _a2.offAssign(this.onAssign);
856
+ }
857
+ }
858
+ customElements.define("reactive-publisher-proxy", PublisherWebComponent);
680
859
  const _DataBindObserver = class {
681
860
  static disable() {
682
861
  if (!this.enabled)
@@ -906,7 +1085,7 @@ function t$3(t2) {
906
1085
  * Copyright 2017 Google LLC
907
1086
  * SPDX-License-Identifier: BSD-3-Clause
908
1087
  */
909
- const o$9 = ({ finisher: e2, descriptor: t2 }) => (o2, n2) => {
1088
+ const o$a = ({ finisher: e2, descriptor: t2 }) => (o2, n2) => {
910
1089
  var r2;
911
1090
  if (void 0 === n2) {
912
1091
  const n3 = null !== (r2 = o2.originalKey) && void 0 !== r2 ? r2 : o2.key, i2 = null != t2 ? { kind: "method", placement: "prototype", key: n3, descriptor: t2(o2.key) } : { ...o2, key: n3 };
@@ -925,7 +1104,7 @@ const o$9 = ({ finisher: e2, descriptor: t2 }) => (o2, n2) => {
925
1104
  * SPDX-License-Identifier: BSD-3-Clause
926
1105
  */
927
1106
  function i$5(i2, n2) {
928
- return o$9({ descriptor: (o2) => {
1107
+ return o$a({ descriptor: (o2) => {
929
1108
  const t2 = { get() {
930
1109
  var o3, n3;
931
1110
  return null !== (n3 = null === (o3 = this.renderRoot) || void 0 === o3 ? void 0 : o3.querySelector(i2)) && void 0 !== n3 ? n3 : null;
@@ -945,11 +1124,11 @@ function i$5(i2, n2) {
945
1124
  * Copyright 2021 Google LLC
946
1125
  * SPDX-License-Identifier: BSD-3-Clause
947
1126
  */
948
- var n$6;
949
- const e$6 = null != (null === (n$6 = window.HTMLSlotElement) || void 0 === n$6 ? void 0 : n$6.prototype.assignedElements) ? (o2, n2) => o2.assignedElements(n2) : (o2, n2) => o2.assignedNodes(n2).filter((o3) => o3.nodeType === Node.ELEMENT_NODE);
1127
+ var n$7;
1128
+ const e$6 = null != (null === (n$7 = window.HTMLSlotElement) || void 0 === n$7 ? void 0 : n$7.prototype.assignedElements) ? (o2, n2) => o2.assignedElements(n2) : (o2, n2) => o2.assignedNodes(n2).filter((o3) => o3.nodeType === Node.ELEMENT_NODE);
950
1129
  function l$6(n2) {
951
1130
  const { slot: l2, selector: t2 } = null != n2 ? n2 : {};
952
- return o$9({ descriptor: (o2) => ({ get() {
1131
+ return o$a({ descriptor: (o2) => ({ get() {
953
1132
  var o3;
954
1133
  const r2 = "slot" + (l2 ? `[name=${l2}]` : ":not([name])"), i2 = null === (o3 = this.renderRoot) || void 0 === o3 ? void 0 : o3.querySelector(r2), s2 = null != i2 ? e$6(i2, n2) : [];
955
1134
  return t2 ? s2.filter((o4) => o4.matches(t2)) : s2;
@@ -960,9 +1139,9 @@ function l$6(n2) {
960
1139
  * Copyright 2017 Google LLC
961
1140
  * SPDX-License-Identifier: BSD-3-Clause
962
1141
  */
963
- function o$8(o2, n2, r2) {
1142
+ function o$9(o2, n2, r2) {
964
1143
  let l2, s2 = o2;
965
- return "object" == typeof o2 ? (s2 = o2.slot, l2 = o2) : l2 = { flatten: n2 }, r2 ? l$6({ slot: s2, flatten: n2, selector: r2 }) : o$9({ descriptor: (e2) => ({ get() {
1144
+ return "object" == typeof o2 ? (s2 = o2.slot, l2 = o2) : l2 = { flatten: n2 }, r2 ? l$6({ slot: s2, flatten: n2, selector: r2 }) : o$a({ descriptor: (e2) => ({ get() {
966
1145
  var e3, t2;
967
1146
  const o3 = "slot" + (s2 ? `[name=${s2}]` : ":not([name])"), n3 = null === (e3 = this.renderRoot) || void 0 === e3 ? void 0 : e3.querySelector(o3);
968
1147
  return null !== (t2 = null == n3 ? void 0 : n3.assignedNodes(l2)) && void 0 !== t2 ? t2 : [];
@@ -1035,18 +1214,22 @@ const Subscriber$1 = (superClass, type) => {
1035
1214
  this.style.removeProperty("display");
1036
1215
  }
1037
1216
  connectedCallback() {
1217
+ _SubscriberElement.instanceCounter++;
1038
1218
  if (this.hasAttribute("lazyRendering")) {
1039
1219
  const options = {
1040
1220
  root: null,
1041
- rootMargin: Math.max(window.innerWidth * 0.1, window.innerHeight * 0.1) + "px"
1221
+ rootMargin: Math.max(window.innerWidth, window.innerHeight) + "px"
1042
1222
  };
1043
1223
  let firstView = true;
1044
1224
  const iObserver = new IntersectionObserver((entries) => {
1045
1225
  for (const e2 of entries) {
1046
1226
  if (firstView && e2.isIntersecting) {
1227
+ this.addDebugger();
1047
1228
  firstView = false;
1048
1229
  this.initWording();
1049
1230
  this.initPublisher();
1231
+ iObserver.disconnect();
1232
+ break;
1050
1233
  }
1051
1234
  }
1052
1235
  }, options);
@@ -1054,10 +1237,9 @@ const Subscriber$1 = (superClass, type) => {
1054
1237
  } else {
1055
1238
  this.initWording();
1056
1239
  this.initPublisher();
1240
+ this.addDebugger();
1057
1241
  }
1058
- this.addDebugger();
1059
1242
  super.connectedCallback();
1060
- _SubscriberElement.instanceCounter++;
1061
1243
  }
1062
1244
  disconnectedCallback() {
1063
1245
  var _a2;
@@ -1147,7 +1329,8 @@ const Subscriber$1 = (superClass, type) => {
1147
1329
  password2 = this.getAncestorAttributeValue("password");
1148
1330
  }
1149
1331
  const credentials = this.getAncestorAttributeValue("credentials") || void 0;
1150
- return { serviceURL, token, userName, password: password2, authToken, tokenProvider, addHTTPResponse, credentials };
1332
+ const cache = this.getAttribute("cache") || void 0 || void 0;
1333
+ return { serviceURL, token, userName, password: password2, authToken, tokenProvider, addHTTPResponse, credentials, cache };
1151
1334
  }
1152
1335
  async initWording() {
1153
1336
  let hasWording = false;
@@ -1160,15 +1343,16 @@ const Subscriber$1 = (superClass, type) => {
1160
1343
  }
1161
1344
  if (!hasWording)
1162
1345
  return;
1163
- const publisher = PublisherManager$1.getInstance().get("sonic-wording");
1346
+ const publisher = PublisherManager$1.get("sonic-wording");
1164
1347
  const wordingProvider = this.getAncestorAttributeValue("wordingProvider");
1165
1348
  const api2 = new API(this.getApiConfiguration());
1166
1349
  if (wordingProvider) {
1167
1350
  const wordings = [];
1351
+ const publisherValue = publisher.get();
1168
1352
  for (const p2 of propNames) {
1169
1353
  if (p2.indexOf("wording_") == 0) {
1170
1354
  const p8 = p2.substring(8);
1171
- if (!publisher.get()[p2]) {
1355
+ if (!publisherValue[p2]) {
1172
1356
  publisher[p2] = "...";
1173
1357
  wordings.push(p8);
1174
1358
  }
@@ -1212,7 +1396,7 @@ const Subscriber$1 = (superClass, type) => {
1212
1396
  if (this.bindPublisher) {
1213
1397
  mng.set(publisherId, this.bindPublisher());
1214
1398
  }
1215
- let pub = mng.get(publisherId);
1399
+ let pub = mng.get(publisherId, { localStorageMode: this.getAttribute("localStorage") || "disabled" });
1216
1400
  this.dataProvider = publisherId;
1217
1401
  if (this.hasAttribute("subDataProvider")) {
1218
1402
  const dataPath = this.getAttribute("subDataProvider");
@@ -1310,8 +1494,8 @@ const TemplatesContainer$1 = (superClass) => {
1310
1494
  * Copyright 2019 Google LLC
1311
1495
  * SPDX-License-Identifier: BSD-3-Clause
1312
1496
  */
1313
- const t$2 = window, e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$6 = Symbol(), n$5 = /* @__PURE__ */ new WeakMap();
1314
- class o$7 {
1497
+ const t$2 = window, e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$6 = Symbol(), n$6 = /* @__PURE__ */ new WeakMap();
1498
+ class o$8 {
1315
1499
  constructor(t2, e2, n2) {
1316
1500
  if (this._$cssResult$ = true, n2 !== s$6)
1317
1501
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -1322,7 +1506,7 @@ class o$7 {
1322
1506
  const s2 = this.t;
1323
1507
  if (e$5 && void 0 === t2) {
1324
1508
  const e2 = void 0 !== s2 && 1 === s2.length;
1325
- e2 && (t2 = n$5.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && n$5.set(s2, t2));
1509
+ e2 && (t2 = n$6.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && n$6.set(s2, t2));
1326
1510
  }
1327
1511
  return t2;
1328
1512
  }
@@ -1330,7 +1514,7 @@ class o$7 {
1330
1514
  return this.cssText;
1331
1515
  }
1332
1516
  }
1333
- const r$5 = (t2) => new o$7("string" == typeof t2 ? t2 : t2 + "", void 0, s$6), i$4 = (t2, ...e2) => {
1517
+ const r$5 = (t2) => new o$8("string" == typeof t2 ? t2 : t2 + "", void 0, s$6), i$4 = (t2, ...e2) => {
1334
1518
  const n2 = 1 === t2.length ? t2[0] : e2.reduce((e3, s2, n3) => e3 + ((t3) => {
1335
1519
  if (true === t3._$cssResult$)
1336
1520
  return t3.cssText;
@@ -1338,7 +1522,7 @@ const r$5 = (t2) => new o$7("string" == typeof t2 ? t2 : t2 + "", void 0, s$6),
1338
1522
  return t3;
1339
1523
  throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
1340
1524
  })(s2) + t2[n3 + 1], t2[0]);
1341
- return new o$7(n2, t2, s$6);
1525
+ return new o$8(n2, t2, s$6);
1342
1526
  }, S$2 = (s2, n2) => {
1343
1527
  e$5 ? s2.adoptedStyleSheets = n2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet) : n2.forEach((e2) => {
1344
1528
  const n3 = document.createElement("style"), o2 = t$2.litNonce;
@@ -1356,7 +1540,7 @@ const r$5 = (t2) => new o$7("string" == typeof t2 ? t2 : t2 + "", void 0, s$6),
1356
1540
  * SPDX-License-Identifier: BSD-3-Clause
1357
1541
  */
1358
1542
  var s$5;
1359
- const e$4 = window, r$4 = e$4.trustedTypes, h$3 = r$4 ? r$4.emptyScript : "", o$6 = e$4.reactiveElementPolyfillSupport, n$4 = { toAttribute(t2, i2) {
1543
+ const e$4 = window, r$4 = e$4.trustedTypes, h$3 = r$4 ? r$4.emptyScript : "", o$7 = e$4.reactiveElementPolyfillSupport, n$5 = { toAttribute(t2, i2) {
1360
1544
  switch (i2) {
1361
1545
  case Boolean:
1362
1546
  t2 = t2 ? h$3 : null;
@@ -1384,8 +1568,8 @@ const e$4 = window, r$4 = e$4.trustedTypes, h$3 = r$4 ? r$4.emptyScript : "", o$
1384
1568
  }
1385
1569
  }
1386
1570
  return s2;
1387
- } }, a$2 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$5 = { attribute: true, type: String, converter: n$4, reflect: false, hasChanged: a$2 };
1388
- class d$1 extends HTMLElement {
1571
+ } }, a$3 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$5 = { attribute: true, type: String, converter: n$5, reflect: false, hasChanged: a$3 };
1572
+ class d$2 extends HTMLElement {
1389
1573
  constructor() {
1390
1574
  super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this.u();
1391
1575
  }
@@ -1489,7 +1673,7 @@ class d$1 extends HTMLElement {
1489
1673
  var e2;
1490
1674
  const r2 = this.constructor._$Ep(t2, s2);
1491
1675
  if (void 0 !== r2 && true === s2.reflect) {
1492
- const h2 = (void 0 !== (null === (e2 = s2.converter) || void 0 === e2 ? void 0 : e2.toAttribute) ? s2.converter : n$4).toAttribute(i2, s2.type);
1676
+ const h2 = (void 0 !== (null === (e2 = s2.converter) || void 0 === e2 ? void 0 : e2.toAttribute) ? s2.converter : n$5).toAttribute(i2, s2.type);
1493
1677
  this._$El = t2, null == h2 ? this.removeAttribute(r2) : this.setAttribute(r2, h2), this._$El = null;
1494
1678
  }
1495
1679
  }
@@ -1497,13 +1681,13 @@ class d$1 extends HTMLElement {
1497
1681
  var s2;
1498
1682
  const e2 = this.constructor, r2 = e2._$Ev.get(t2);
1499
1683
  if (void 0 !== r2 && this._$El !== r2) {
1500
- const t3 = e2.getPropertyOptions(r2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== (null === (s2 = t3.converter) || void 0 === s2 ? void 0 : s2.fromAttribute) ? t3.converter : n$4;
1684
+ const t3 = e2.getPropertyOptions(r2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== (null === (s2 = t3.converter) || void 0 === s2 ? void 0 : s2.fromAttribute) ? t3.converter : n$5;
1501
1685
  this._$El = r2, this[r2] = h2.fromAttribute(i2, t3.type), this._$El = null;
1502
1686
  }
1503
1687
  }
1504
1688
  requestUpdate(t2, i2, s2) {
1505
1689
  let e2 = true;
1506
- void 0 !== t2 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || a$2)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), true === s2.reflect && this._$El !== t2 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$E_ = this._$Ej());
1690
+ void 0 !== t2 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || a$3)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), true === s2.reflect && this._$El !== t2 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$E_ = this._$Ej());
1507
1691
  }
1508
1692
  async _$Ej() {
1509
1693
  this.isUpdatePending = true;
@@ -1564,14 +1748,14 @@ class d$1 extends HTMLElement {
1564
1748
  firstUpdated(t2) {
1565
1749
  }
1566
1750
  }
1567
- d$1.finalized = true, d$1.elementProperties = /* @__PURE__ */ new Map(), d$1.elementStyles = [], d$1.shadowRootOptions = { mode: "open" }, null == o$6 || o$6({ ReactiveElement: d$1 }), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.6.1");
1751
+ d$2.finalized = true, d$2.elementProperties = /* @__PURE__ */ new Map(), d$2.elementStyles = [], d$2.shadowRootOptions = { mode: "open" }, null == o$7 || o$7({ ReactiveElement: d$2 }), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.6.1");
1568
1752
  /**
1569
1753
  * @license
1570
1754
  * Copyright 2017 Google LLC
1571
1755
  * SPDX-License-Identifier: BSD-3-Clause
1572
1756
  */
1573
1757
  var t$1;
1574
- const i$3 = window, s$4 = i$3.trustedTypes, e$3 = s$4 ? s$4.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o$5 = `lit$${(Math.random() + "").slice(9)}$`, n$3 = "?" + o$5, l$4 = `<${n$3}>`, h$2 = document, r$3 = (t2 = "") => h$2.createComment(t2), d = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u$2 = Array.isArray, c$3 = (t2) => u$2(t2) || "function" == typeof (null == t2 ? void 0 : t2[Symbol.iterator]), v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, a$1 = /-->/g, f$2 = />/g, _ = RegExp(`>|[
1758
+ const i$3 = window, s$4 = i$3.trustedTypes, e$3 = s$4 ? s$4.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o$6 = `lit$${(Math.random() + "").slice(9)}$`, n$4 = "?" + o$6, l$4 = `<${n$4}>`, h$2 = document, r$3 = (t2 = "") => h$2.createComment(t2), d$1 = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u$2 = Array.isArray, c$3 = (t2) => u$2(t2) || "function" == typeof (null == t2 ? void 0 : t2[Symbol.iterator]), v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, a$2 = /-->/g, f$2 = />/g, _ = RegExp(`>|[
1575
1759
  \f\r](?:([^\\s"'>=/]+)([
1576
1760
  \f\r]*=[
1577
1761
  \f\r]*(?:[^
@@ -1582,9 +1766,9 @@ const i$3 = window, s$4 = i$3.trustedTypes, e$3 = s$4 ? s$4.createPolicy("lit-ht
1582
1766
  const s3 = t2[i3];
1583
1767
  let e2, u3, c2 = -1, g2 = 0;
1584
1768
  for (; g2 < s3.length && (d2.lastIndex = g2, u3 = d2.exec(s3), null !== u3); )
1585
- g2 = d2.lastIndex, d2 === v ? "!--" === u3[1] ? d2 = a$1 : void 0 !== u3[1] ? d2 = f$2 : void 0 !== u3[2] ? ($$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = _) : void 0 !== u3[3] && (d2 = _) : d2 === _ ? ">" === u3[0] ? (d2 = null != h2 ? h2 : v, c2 = -1) : void 0 === u3[1] ? c2 = -2 : (c2 = d2.lastIndex - u3[2].length, e2 = u3[1], d2 = void 0 === u3[3] ? _ : '"' === u3[3] ? p$2 : m$1) : d2 === p$2 || d2 === m$1 ? d2 = _ : d2 === a$1 || d2 === f$2 ? d2 = v : (d2 = _, h2 = void 0);
1769
+ g2 = d2.lastIndex, d2 === v ? "!--" === u3[1] ? d2 = a$2 : void 0 !== u3[1] ? d2 = f$2 : void 0 !== u3[2] ? ($$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = _) : void 0 !== u3[3] && (d2 = _) : d2 === _ ? ">" === u3[0] ? (d2 = null != h2 ? h2 : v, c2 = -1) : void 0 === u3[1] ? c2 = -2 : (c2 = d2.lastIndex - u3[2].length, e2 = u3[1], d2 = void 0 === u3[3] ? _ : '"' === u3[3] ? p$2 : m$1) : d2 === p$2 || d2 === m$1 ? d2 = _ : d2 === a$2 || d2 === f$2 ? d2 = v : (d2 = _, h2 = void 0);
1586
1770
  const y2 = d2 === _ && t2[i3 + 1].startsWith("/>") ? " " : "";
1587
- r2 += d2 === v ? s3 + l$4 : c2 >= 0 ? (n2.push(e2), s3.slice(0, c2) + "$lit$" + s3.slice(c2) + o$5 + y2) : s3 + o$5 + (-2 === c2 ? (n2.push(void 0), i3) : y2);
1771
+ r2 += d2 === v ? s3 + l$4 : c2 >= 0 ? (n2.push(e2), s3.slice(0, c2) + "$lit$" + s3.slice(c2) + o$6 + y2) : s3 + o$6 + (-2 === c2 ? (n2.push(void 0), i3) : y2);
1588
1772
  }
1589
1773
  const u2 = r2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : "");
1590
1774
  if (!Array.isArray(t2) || !t2.hasOwnProperty("raw"))
@@ -1606,10 +1790,10 @@ class C {
1606
1790
  if (l2.hasAttributes()) {
1607
1791
  const t3 = [];
1608
1792
  for (const i3 of l2.getAttributeNames())
1609
- if (i3.endsWith("$lit$") || i3.startsWith(o$5)) {
1793
+ if (i3.endsWith("$lit$") || i3.startsWith(o$6)) {
1610
1794
  const s2 = a2[d2++];
1611
1795
  if (t3.push(i3), void 0 !== s2) {
1612
- const t4 = l2.getAttribute(s2.toLowerCase() + "$lit$").split(o$5), i4 = /([.?@])?(.*)/.exec(s2);
1796
+ const t4 = l2.getAttribute(s2.toLowerCase() + "$lit$").split(o$6), i4 = /([.?@])?(.*)/.exec(s2);
1613
1797
  c2.push({ type: 1, index: h2, name: i4[2], strings: t4, ctor: "." === i4[1] ? M : "?" === i4[1] ? k : "@" === i4[1] ? H : S$1 });
1614
1798
  } else
1615
1799
  c2.push({ type: 6, index: h2 });
@@ -1618,7 +1802,7 @@ class C {
1618
1802
  l2.removeAttribute(i3);
1619
1803
  }
1620
1804
  if ($$1.test(l2.tagName)) {
1621
- const t3 = l2.textContent.split(o$5), i3 = t3.length - 1;
1805
+ const t3 = l2.textContent.split(o$6), i3 = t3.length - 1;
1622
1806
  if (i3 > 0) {
1623
1807
  l2.textContent = s$4 ? s$4.emptyScript : "";
1624
1808
  for (let s2 = 0; s2 < i3; s2++)
@@ -1627,12 +1811,12 @@ class C {
1627
1811
  }
1628
1812
  }
1629
1813
  } else if (8 === l2.nodeType)
1630
- if (l2.data === n$3)
1814
+ if (l2.data === n$4)
1631
1815
  c2.push({ type: 2, index: h2 });
1632
1816
  else {
1633
1817
  let t3 = -1;
1634
- for (; -1 !== (t3 = l2.data.indexOf(o$5, t3 + 1)); )
1635
- c2.push({ type: 7, index: h2 }), t3 += o$5.length - 1;
1818
+ for (; -1 !== (t3 = l2.data.indexOf(o$6, t3 + 1)); )
1819
+ c2.push({ type: 7, index: h2 }), t3 += o$6.length - 1;
1636
1820
  }
1637
1821
  h2++;
1638
1822
  }
@@ -1647,7 +1831,7 @@ function P(t2, i2, s2 = t2, e2) {
1647
1831
  if (i2 === x$1)
1648
1832
  return i2;
1649
1833
  let r2 = void 0 !== e2 ? null === (o2 = s2._$Co) || void 0 === o2 ? void 0 : o2[e2] : s2._$Cl;
1650
- const u2 = d(i2) ? void 0 : i2._$litDirective$;
1834
+ const u2 = d$1(i2) ? void 0 : i2._$litDirective$;
1651
1835
  return (null == r2 ? void 0 : r2.constructor) !== u2 && (null === (n2 = null == r2 ? void 0 : r2._$AO) || void 0 === n2 || n2.call(r2, false), void 0 === u2 ? r2 = void 0 : (r2 = new u2(t2), r2._$AT(t2, s2, e2)), void 0 !== e2 ? (null !== (l2 = (h2 = s2)._$Co) && void 0 !== l2 ? l2 : h2._$Co = [])[e2] = r2 : s2._$Cl = r2), void 0 !== r2 && (i2 = P(t2, r2._$AS(t2, i2.values), r2, e2)), i2;
1652
1836
  }
1653
1837
  class V {
@@ -1701,7 +1885,7 @@ class N {
1701
1885
  return this._$AB;
1702
1886
  }
1703
1887
  _$AI(t2, i2 = this) {
1704
- t2 = P(this, t2, i2), d(t2) ? t2 === b$1 || null == t2 || "" === t2 ? (this._$AH !== b$1 && this._$AR(), this._$AH = b$1) : t2 !== this._$AH && t2 !== x$1 && this.g(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : c$3(t2) ? this.k(t2) : this.g(t2);
1888
+ t2 = P(this, t2, i2), d$1(t2) ? t2 === b$1 || null == t2 || "" === t2 ? (this._$AH !== b$1 && this._$AR(), this._$AH = b$1) : t2 !== this._$AH && t2 !== x$1 && this.g(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : c$3(t2) ? this.k(t2) : this.g(t2);
1705
1889
  }
1706
1890
  O(t2, i2 = this._$AB) {
1707
1891
  return this._$AA.parentNode.insertBefore(t2, i2);
@@ -1710,7 +1894,7 @@ class N {
1710
1894
  this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
1711
1895
  }
1712
1896
  g(t2) {
1713
- this._$AH !== b$1 && d(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(h$2.createTextNode(t2)), this._$AH = t2;
1897
+ this._$AH !== b$1 && d$1(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(h$2.createTextNode(t2)), this._$AH = t2;
1714
1898
  }
1715
1899
  $(t2) {
1716
1900
  var i2;
@@ -1760,12 +1944,12 @@ class S$1 {
1760
1944
  const o2 = this.strings;
1761
1945
  let n2 = false;
1762
1946
  if (void 0 === o2)
1763
- t2 = P(this, t2, i2, 0), n2 = !d(t2) || t2 !== this._$AH && t2 !== x$1, n2 && (this._$AH = t2);
1947
+ t2 = P(this, t2, i2, 0), n2 = !d$1(t2) || t2 !== this._$AH && t2 !== x$1, n2 && (this._$AH = t2);
1764
1948
  else {
1765
1949
  const e3 = t2;
1766
1950
  let l2, h2;
1767
1951
  for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++)
1768
- h2 = P(this, e3[s2 + l2], i2, l2), h2 === x$1 && (h2 = this._$AH[l2]), n2 || (n2 = !d(h2) || h2 !== this._$AH[l2]), h2 === b$1 ? t2 = b$1 : t2 !== b$1 && (t2 += (null != h2 ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
1952
+ h2 = P(this, e3[s2 + l2], i2, l2), h2 === x$1 && (h2 = this._$AH[l2]), n2 || (n2 = !d$1(h2) || h2 !== this._$AH[l2]), h2 === b$1 ? t2 = b$1 : t2 !== b$1 && (t2 += (null != h2 ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
1769
1953
  }
1770
1954
  n2 && !e2 && this.j(t2);
1771
1955
  }
@@ -1817,7 +2001,7 @@ class I {
1817
2001
  P(this, t2);
1818
2002
  }
1819
2003
  }
1820
- const L = { P: "$lit$", A: o$5, M: n$3, C: 1, L: E, R: V, D: c$3, V: P, I: N, H: S$1, N: k, U: H, B: M, F: I }, z = i$3.litHtmlPolyfillSupport;
2004
+ const L = { P: "$lit$", A: o$6, M: n$4, C: 1, L: E, R: V, D: c$3, V: P, I: N, H: S$1, N: k, U: H, B: M, F: I }, z = i$3.litHtmlPolyfillSupport;
1821
2005
  null == z || z(C, N), (null !== (t$1 = i$3.litHtmlVersions) && void 0 !== t$1 ? t$1 : i$3.litHtmlVersions = []).push("2.6.1");
1822
2006
  const Z = (t2, i2, s2) => {
1823
2007
  var e2, o2;
@@ -1834,8 +2018,8 @@ const Z = (t2, i2, s2) => {
1834
2018
  * Copyright 2017 Google LLC
1835
2019
  * SPDX-License-Identifier: BSD-3-Clause
1836
2020
  */
1837
- var l$3, o$4;
1838
- class s$3 extends d$1 {
2021
+ var l$3, o$5;
2022
+ class s$3 extends d$2 {
1839
2023
  constructor() {
1840
2024
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1841
2025
  }
@@ -1861,9 +2045,9 @@ class s$3 extends d$1 {
1861
2045
  }
1862
2046
  }
1863
2047
  s$3.finalized = true, s$3._$litElement$ = true, null === (l$3 = globalThis.litElementHydrateSupport) || void 0 === l$3 || l$3.call(globalThis, { LitElement: s$3 });
1864
- const n$2 = globalThis.litElementPolyfillSupport;
1865
- null == n$2 || n$2({ LitElement: s$3 });
1866
- (null !== (o$4 = globalThis.litElementVersions) && void 0 !== o$4 ? o$4 : globalThis.litElementVersions = []).push("3.2.2");
2048
+ const n$3 = globalThis.litElementPolyfillSupport;
2049
+ null == n$3 || n$3({ LitElement: s$3 });
2050
+ (null !== (o$5 = globalThis.litElementVersions) && void 0 !== o$5 ? o$5 : globalThis.litElementVersions = []).push("3.2.2");
1867
2051
  var __defProp$16 = Object.defineProperty;
1868
2052
  var __getOwnPropDesc$16 = Object.getOwnPropertyDescriptor;
1869
2053
  var __decorateClass$16 = (decorators, target, key, kind) => {
@@ -2400,15 +2584,20 @@ const Form$2 = (superClass) => {
2400
2584
  next = loop[index - 1];
2401
2585
  }
2402
2586
  }
2403
- const elt = (_a2 = next == null ? void 0 : next.shadowRoot) == null ? void 0 : _a2.querySelector(selector);
2587
+ const elt = (_a2 = next == null ? void 0 : next.shadowRoot) == null ? void 0 : _a2.querySelector(
2588
+ selector
2589
+ );
2404
2590
  if (elt && elt.focus) {
2405
2591
  elt.focus();
2406
2592
  e2.preventDefault();
2593
+ e2.stopPropagation();
2407
2594
  }
2408
2595
  });
2409
2596
  }
2410
2597
  connectedCallback() {
2411
- this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
2598
+ this.formDataProvider = this.getAncestorAttributeValue(
2599
+ "formDataProvider"
2600
+ );
2412
2601
  super.connectedCallback();
2413
2602
  this.addKeyboardNavigation();
2414
2603
  }
@@ -2498,7 +2687,9 @@ class Arrays$1 {
2498
2687
  if (source.length < 1)
2499
2688
  return true;
2500
2689
  const first = (source[0] || {})[key];
2501
- return source.every((item) => (item || {})[key] == first);
2690
+ return source.every(
2691
+ (item) => (item || {})[key] == first
2692
+ );
2502
2693
  }
2503
2694
  };
2504
2695
  }
@@ -2560,7 +2751,9 @@ class Arrays$1 {
2560
2751
  forKey: (key) => {
2561
2752
  const set = [...new Set(source.map((item) => item[key]))];
2562
2753
  return Arrays$1.from(
2563
- set.map((value) => source.find((item) => item[key] == value))
2754
+ set.map(
2755
+ (value) => source.find((item) => item[key] == value)
2756
+ )
2564
2757
  );
2565
2758
  }
2566
2759
  };
@@ -2572,7 +2765,11 @@ class Arrays$1 {
2572
2765
  forKey: (key) => {
2573
2766
  const areValuesDifferentForKey = (compared1, key2) => (compared2) => compared1[key2] != compared2[key2];
2574
2767
  return Arrays$1.from(
2575
- source.filter((elt) => toRemoveFromSource.every(areValuesDifferentForKey(elt, key)))
2768
+ source.filter(
2769
+ (elt) => toRemoveFromSource.every(
2770
+ areValuesDifferentForKey(elt, key)
2771
+ )
2772
+ )
2576
2773
  );
2577
2774
  }
2578
2775
  };
@@ -3120,7 +3317,7 @@ Loader = __decorateClass$12([
3120
3317
  * Copyright 2020 Google LLC
3121
3318
  * SPDX-License-Identifier: BSD-3-Clause
3122
3319
  */
3123
- const { I: l$1 } = L, e$1 = (o2) => void 0 === o2.strings, c$2 = () => document.createComment(""), r$2 = (o2, t2, i2) => {
3320
+ const { I: l$1 } = L, n$2 = (o2, l2) => void 0 === l2 ? void 0 !== (null == o2 ? void 0 : o2._$litType$) : (null == o2 ? void 0 : o2._$litType$) === l2, e$1 = (o2) => void 0 === o2.strings, c$2 = () => document.createComment(""), r$2 = (o2, t2, i2) => {
3124
3321
  var n2;
3125
3322
  const d2 = o2._$AA.parentNode, v2 = void 0 === t2 ? o2._$AB : t2._$AA;
3126
3323
  if (void 0 === i2) {
@@ -3150,6 +3347,8 @@ const { I: l$1 } = L, e$1 = (o2) => void 0 === o2.strings, c$2 = () => document.
3150
3347
  const o3 = t2.nextSibling;
3151
3348
  t2.remove(), t2 = o3;
3152
3349
  }
3350
+ }, a$1 = (o2) => {
3351
+ o2._$AR();
3153
3352
  };
3154
3353
  /**
3155
3354
  * @license
@@ -3235,7 +3434,7 @@ const s$1 = (i2, t2) => {
3235
3434
  for (const i3 of r2)
3236
3435
  null === (o2 = (e2 = i3)._$AO) || void 0 === o2 || o2.call(e2, t2, false), s$1(i3, t2);
3237
3436
  return true;
3238
- }, o$3 = (i2) => {
3437
+ }, o$4 = (i2) => {
3239
3438
  let t2, e2;
3240
3439
  do {
3241
3440
  if (void 0 === (t2 = i2._$AM))
@@ -3253,7 +3452,7 @@ const s$1 = (i2, t2) => {
3253
3452
  }
3254
3453
  };
3255
3454
  function n$1(i2) {
3256
- void 0 !== this._$AN ? (o$3(this), this._$AM = i2, r$1(this)) : this._$AM = i2;
3455
+ void 0 !== this._$AN ? (o$4(this), this._$AM = i2, r$1(this)) : this._$AM = i2;
3257
3456
  }
3258
3457
  function h$1(i2, t2 = false, e2 = 0) {
3259
3458
  const r2 = this._$AH, n2 = this._$AN;
@@ -3261,9 +3460,9 @@ function h$1(i2, t2 = false, e2 = 0) {
3261
3460
  if (t2)
3262
3461
  if (Array.isArray(r2))
3263
3462
  for (let i3 = e2; i3 < r2.length; i3++)
3264
- s$1(r2[i3], false), o$3(r2[i3]);
3463
+ s$1(r2[i3], false), o$4(r2[i3]);
3265
3464
  else
3266
- null != r2 && (s$1(r2, false), o$3(r2));
3465
+ null != r2 && (s$1(r2, false), o$4(r2));
3267
3466
  else
3268
3467
  s$1(this, i2);
3269
3468
  }
@@ -3280,7 +3479,7 @@ class c extends i$2 {
3280
3479
  }
3281
3480
  _$AO(i2, t2 = true) {
3282
3481
  var e2, r2;
3283
- i2 !== this.isConnected && (this.isConnected = i2, i2 ? null === (e2 = this.reconnected) || void 0 === e2 || e2.call(this) : null === (r2 = this.disconnected) || void 0 === r2 || r2.call(this)), t2 && (s$1(this, i2), o$3(this));
3482
+ i2 !== this.isConnected && (this.isConnected = i2, i2 ? null === (e2 = this.reconnected) || void 0 === e2 || e2.call(this) : null === (r2 = this.disconnected) || void 0 === r2 || r2.call(this)), t2 && (s$1(this, i2), o$4(this));
3284
3483
  }
3285
3484
  setValue(t2) {
3286
3485
  if (e$1(this._$Ct))
@@ -3544,7 +3743,7 @@ class e extends i$2 {
3544
3743
  }
3545
3744
  }
3546
3745
  e.directiveName = "unsafeHTML", e.resultType = 1;
3547
- const o$2 = e$2(e);
3746
+ const o$3 = e$2(e);
3548
3747
  const loadingGetPromises = /* @__PURE__ */ new Map();
3549
3748
  const libraries = {
3550
3749
  heroicons: {
@@ -3608,7 +3807,7 @@ Icons.fontAwesomeNext = {
3608
3807
  iconsAsRecord[library] = libIcons;
3609
3808
  const libIconsKey = prefix + "-" + name;
3610
3809
  if (libIcons[libIconsKey])
3611
- return o$2(libIcons[libIconsKey]);
3810
+ return o$3(libIcons[libIconsKey]);
3612
3811
  const url = libraryItem.url.replace("$prefix", prefix).replace("$name", name);
3613
3812
  if (!loadingGetPromises.has(url)) {
3614
3813
  const promise = new Promise(async (resolve) => {
@@ -3629,9 +3828,9 @@ Icons.fontAwesomeNext = {
3629
3828
  const result = await loadingGetPromises.get(url);
3630
3829
  loadingGetPromises.delete(url);
3631
3830
  libIcons[libIconsKey] = result || "";
3632
- return o$2(result);
3831
+ return o$3(result);
3633
3832
  }
3634
- return o$2(iconsAsRecord["core"][params.name] || "");
3833
+ return o$3(iconsAsRecord["core"][params.name] || "");
3635
3834
  }
3636
3835
  };
3637
3836
  Icons.default = _Icons.fontAwesomeNext;
@@ -3661,7 +3860,7 @@ let Icon = class extends s$3 {
3661
3860
  return;
3662
3861
  this.renderId++;
3663
3862
  const frameRenderId = this.renderId;
3664
- window.requestAnimationFrame(async () => {
3863
+ (window.queueMicrotask || window.requestAnimationFrame)(async () => {
3665
3864
  if (frameRenderId != this.renderId) {
3666
3865
  return;
3667
3866
  }
@@ -3755,7 +3954,7 @@ let SonicToastItem = class extends s$3 {
3755
3954
  if (!this.visible) {
3756
3955
  return b$1;
3757
3956
  }
3758
- return y`<div class="sonic-toast ${this.status} ${this.ghost ? "ghost" : ""}"><button aria-label="Close" class="sonic-toast-close" @click="${() => this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status && y`<sonic-icon name="${icon$1[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title ? y`<div class="sonic-toast-title">${this.title}</div>` : ""} ${this.text ? o$2(this.text) : ""}<slot></slot></div>${!this.preserve ? this.autoHide() : ""}</div></div>`;
3957
+ return y`<div class="sonic-toast ${this.status} ${this.ghost ? "ghost" : ""}"><button aria-label="Close" class="sonic-toast-close" @click="${() => this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status && y`<sonic-icon name="${icon$1[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title ? y`<div class="sonic-toast-title">${this.title}</div>` : ""} ${this.text ? o$3(this.text) : ""}<slot></slot></div>${!this.preserve ? this.autoHide() : ""}</div></div>`;
3759
3958
  }
3760
3959
  hide() {
3761
3960
  if (!this.closest("sonic-toast")) {
@@ -3873,7 +4072,7 @@ let SonicToast$1 = class extends s$3 {
3873
4072
  }
3874
4073
  ],
3875
4074
  stabilizeOut: true
3876
- })}>${item.text ? o$2(item.text) : ""}</sonic-toast-item>`
4075
+ })}>${item.text ? o$3(item.text) : ""}</sonic-toast-item>`
3877
4076
  )}</div>`;
3878
4077
  }
3879
4078
  static removeAll() {
@@ -3995,24 +4194,41 @@ const Fetcher$1 = (superClass, propsType) => {
3995
4194
  if (!this.api)
3996
4195
  return;
3997
4196
  this.dispatchEvent(new CustomEvent("loading", { detail: this }));
3998
- this.isLoading = true;
3999
- this.requestUpdate();
4197
+ if (this.getAttribute("localStorage") === "enabled") {
4198
+ await PublisherManager.getInstance().isLocalStrorageReady;
4199
+ }
4200
+ if (!this.isConnected)
4201
+ return;
4000
4202
  const hasLoader = this.isDefaultLoaderEnabled && !this.hasAttribute("noLoader");
4001
- if (hasLoader)
4203
+ if (hasLoader) {
4002
4204
  Loader.show();
4205
+ }
4003
4206
  const headerData = PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();
4207
+ this.isLoading = true;
4208
+ if (Objects$1.isObject(this.props) && Object.keys(this.props || {}).length > 0 && this.isFirstLoad) {
4209
+ this.dispatchEvent(new CustomEvent("load", { detail: this }));
4210
+ this.isFirstLoad = false;
4211
+ this.isLoading = false;
4212
+ }
4004
4213
  let data = await this.api.get(this.endPoint || this.dataProvider || "", headerData);
4214
+ if (!this.isConnected) {
4215
+ if (hasLoader)
4216
+ Loader.hide();
4217
+ return;
4218
+ }
4005
4219
  if (!data) {
4006
4220
  SonicToast$1.add({ text: "Network Error", status: "error" });
4007
4221
  this.isLoading = false;
4008
- if (hasLoader)
4222
+ if (hasLoader) {
4009
4223
  Loader.hide();
4224
+ }
4010
4225
  return;
4011
4226
  } else if (data._sonic_http_response_ && !data._sonic_http_response_.ok && Object.keys(data).length === 1) {
4012
4227
  SonicToast$1.add({ text: "Network Error", status: "error" });
4013
4228
  }
4014
- if (hasLoader)
4229
+ if (hasLoader) {
4015
4230
  Loader.hide();
4231
+ }
4016
4232
  if (this.key) {
4017
4233
  const response = data._sonic_http_response_;
4018
4234
  data = Objects$1.traverse(data, this.key.split("."), this.hasAttribute("preserveOtherKeys"));
@@ -4036,11 +4252,10 @@ const Fetcher$1 = (superClass, propsType) => {
4036
4252
  }
4037
4253
  connectedCallback() {
4038
4254
  var _a2;
4255
+ super.connectedCallback();
4039
4256
  if (!this.isFetchEnabled) {
4040
- super.connectedCallback();
4041
4257
  return;
4042
4258
  }
4043
- super.connectedCallback();
4044
4259
  this.key = this.getAttribute("key");
4045
4260
  if (this.props) {
4046
4261
  this.publisher.set(this.props);
@@ -4050,16 +4265,24 @@ const Fetcher$1 = (superClass, propsType) => {
4050
4265
  const lazyLoad = this.getAttribute("lazyload");
4051
4266
  if (lazyLoad === null) {
4052
4267
  this._fetchData();
4268
+ } else {
4269
+ this.handleLazyLoad();
4053
4270
  }
4054
4271
  }
4055
- firstUpdated() {
4272
+ handleLazyLoad() {
4056
4273
  const lazyLoad = this.getAttribute("lazyload");
4057
4274
  if (lazyLoad === null) {
4058
4275
  return;
4059
4276
  }
4277
+ const rect = this.getBoundingClientRect();
4278
+ if (rect.x < window.innerWidth && rect.right > 0 && rect.y < window.innerHeight && rect.right > 0) {
4279
+ this._fetchData();
4280
+ return;
4281
+ }
4282
+ const boundsRatio = parseFloat(this.getAttribute("lazyBoundsRatio") || "1");
4060
4283
  const options = {
4061
4284
  root: null,
4062
- rootMargin: Math.max(window.innerWidth, window.innerHeight) + "px"
4285
+ rootMargin: Math.max(window.innerWidth * boundsRatio, window.innerHeight * boundsRatio) + "px"
4063
4286
  };
4064
4287
  this.iObserver = new IntersectionObserver((entries) => this.onIntersection(entries), options);
4065
4288
  let elt = this.shadowRoot ? this.shadowRoot.children[0] : this.children[0];
@@ -4076,9 +4299,12 @@ const Fetcher$1 = (superClass, propsType) => {
4076
4299
  }
4077
4300
  }
4078
4301
  onIntersection(entries) {
4302
+ var _a2;
4079
4303
  for (const e2 of entries) {
4080
4304
  if (e2.isIntersecting && this.isFirstLoad) {
4081
4305
  this._fetchData();
4306
+ (_a2 = this.iObserver) == null ? void 0 : _a2.disconnect();
4307
+ break;
4082
4308
  }
4083
4309
  }
4084
4310
  }
@@ -4155,7 +4381,7 @@ SonicIF = __decorateClass$Y([
4155
4381
  * Copyright 2020 Google LLC
4156
4382
  * SPDX-License-Identifier: BSD-3-Clause
4157
4383
  */
4158
- const o$1 = e$2(class extends i$2 {
4384
+ const o$2 = e$2(class extends i$2 {
4159
4385
  constructor(t$12) {
4160
4386
  if (super(t$12), t$12.type !== t.CHILD)
4161
4387
  throw Error("templateContent can only be used in child bindings");
@@ -4226,8 +4452,11 @@ let List = class extends Fetcher$1(Subscriber$1(TemplatesContainer$1(s$3))) {
4226
4452
  this.isLoading = true;
4227
4453
  super.connectedCallback();
4228
4454
  }
4455
+ disconnectedCallback() {
4456
+ super.disconnectedCallback();
4457
+ }
4229
4458
  renderLoadingState() {
4230
- return this.templateParts["skeleton"] ? o$1(this.templateParts["skeleton"]) : y`<sonic-loader mode="inline"></sonic-loader>`;
4459
+ return this.templateParts["skeleton"] ? o$2(this.templateParts["skeleton"]) : y`<sonic-loader mode="inline"></sonic-loader>`;
4231
4460
  }
4232
4461
  renderNoResultState() {
4233
4462
  return y`<div style="color:var(--sc-base-400);font-size:1.5em;margin:4rem 0;display:flex;gap:.5rem"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${typeof this.props === "string" && this.props == "" ? "Aucun r\xE9sultat" : this.props}</span></div>`;
@@ -4267,7 +4496,7 @@ let List = class extends Fetcher$1(Subscriber$1(TemplatesContainer$1(s$3))) {
4267
4496
  return y`<div></div>`;
4268
4497
  const props = this.formatProps();
4269
4498
  if (((props == null ? void 0 : props.length) || 0) == 0 && this.templateParts["no-item"]) {
4270
- return o$1(this.templateParts["no-item"]);
4499
+ return o$2(this.templateParts["no-item"]);
4271
4500
  }
4272
4501
  const templateCount = this.templateList.length;
4273
4502
  let counter = -1;
@@ -4299,7 +4528,7 @@ let List = class extends Fetcher$1(Subscriber$1(TemplatesContainer$1(s$3))) {
4299
4528
  counter = -1;
4300
4529
  return item && y`<sonic-subscriber ?debug="${this.defferedDebug === true}" .bindPublisher="${function() {
4301
4530
  return pub;
4302
- }}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${key}">${templatePart ? o$1(templatePart) : o$1(this.templateList[counter % templateCount])}</sonic-subscriber>${separator && isNotLast ? o$1(separator) : b$1}`;
4531
+ }}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${key}">${templatePart ? o$2(templatePart) : o$2(this.templateList[counter % templateCount])}</sonic-subscriber>${separator && isNotLast ? o$2(separator) : b$1}`;
4303
4532
  })}`;
4304
4533
  }
4305
4534
  };
@@ -4315,6 +4544,18 @@ __decorateClass$W([
4315
4544
  List = __decorateClass$W([
4316
4545
  e$8(tagName$S)
4317
4546
  ], List);
4547
+ /**
4548
+ * @license
4549
+ * Copyright 2021 Google LLC
4550
+ * SPDX-License-Identifier: BSD-3-Clause
4551
+ */
4552
+ function* o$1(o2, f2) {
4553
+ if (void 0 !== o2) {
4554
+ let i2 = 0;
4555
+ for (const t2 of o2)
4556
+ yield f2(t2, i2++);
4557
+ }
4558
+ }
4318
4559
  var __defProp$V = Object.defineProperty;
4319
4560
  var __getOwnPropDesc$V = Object.getOwnPropertyDescriptor;
4320
4561
  var __decorateClass$V = (decorators, target, key, kind) => {
@@ -4334,14 +4575,20 @@ let Queue = class extends Subscriber$1(s$3) {
4334
4575
  this.lastRequestTime = 0;
4335
4576
  this.key = "";
4336
4577
  this.itemPropertyMap = null;
4578
+ this.cache = "default";
4337
4579
  this.targetRequestDuration = 500;
4338
4580
  this.limit = 5;
4581
+ this.lazyBoundsRatio = 1;
4339
4582
  this.offset = 0;
4340
4583
  this.resultCount = 0;
4584
+ this.noLazyload = false;
4341
4585
  this.filteredFields = "";
4586
+ this.instanceId = 0;
4587
+ this.localStorage = "disabled";
4342
4588
  this.filterPublisher = null;
4343
4589
  this.searchHash = "";
4344
4590
  this.requestId = 0;
4591
+ this.isFirstRequest = true;
4345
4592
  this.dataProviderExpression = "";
4346
4593
  this.idKey = "id";
4347
4594
  this.currentScrollPosition = void 0;
@@ -4355,33 +4602,36 @@ let Queue = class extends Subscriber$1(s$3) {
4355
4602
  super.disconnectedCallback();
4356
4603
  return;
4357
4604
  }
4358
- connectedCallback() {
4605
+ async connectedCallback() {
4606
+ this.instanceId = Queue.instanceCounter++;
4607
+ this.localStorage = this.getAttribute("localStorage") || this.localStorage;
4608
+ this.removeAttribute("localStorage");
4359
4609
  this.noShadowDom = "";
4360
4610
  this.defferedDebug = this.hasAttribute("debug") || null;
4611
+ if (!this.dataProvider)
4612
+ this.dataProvider = this.dataProviderExpression || "sonic-queue-" + this.instanceId + "-" + Math.random().toString(36).substring(7);
4361
4613
  if (!this.dataProviderExpression) {
4362
4614
  this.dataProviderExpression = HTML.getAncestorAttributeValue(this.parentElement, "dataProvider") || "";
4363
4615
  }
4364
- if (!this.dataProvider)
4365
- this.dataProvider = "sonic-queue-" + Queue.instanceCounter++;
4366
- this.configFilter();
4367
4616
  super.connectedCallback();
4368
4617
  this.key = this.getAttribute("key");
4369
4618
  if (!this.templates)
4370
- this.templates = Array.from(this.querySelectorAll("template"));
4619
+ this.templates = Array.from(
4620
+ this.querySelectorAll("template")
4621
+ );
4371
4622
  this.lastRequestTime = new Date().getTime();
4372
- const func = window.requestAnimationFrame;
4373
- func(() => this.next());
4623
+ await PublisherManager$1.getInstance().isLocalStrorageReady;
4624
+ this.configFilter();
4374
4625
  }
4375
4626
  configFilter() {
4376
4627
  var _a2;
4377
4628
  const dataFilterProvider = this.getAncestorAttributeValue("dataFilterProvider");
4378
- if (!dataFilterProvider)
4629
+ if (!dataFilterProvider) {
4630
+ this.next();
4379
4631
  return;
4632
+ }
4380
4633
  this.filterPublisher = PublisherManager$1.getInstance().get(dataFilterProvider);
4381
4634
  (_a2 = this.filterPublisher) == null ? void 0 : _a2.onInternalMutation(() => {
4382
- var _a3;
4383
- if (Object.keys((_a3 = this.filterPublisher) == null ? void 0 : _a3.get()).length == 0)
4384
- return;
4385
4635
  this.updateFilteredContent();
4386
4636
  });
4387
4637
  }
@@ -4402,7 +4652,7 @@ let Queue = class extends Subscriber$1(s$3) {
4402
4652
  searchParams.set(f2, filterData[f2].toString());
4403
4653
  }
4404
4654
  const searchHash = searchParams.toString();
4405
- if (searchHash == this.searchHash)
4655
+ if (searchHash == this.searchHash && !this.isFirstRequest)
4406
4656
  return;
4407
4657
  this.searchHash = searchHash;
4408
4658
  for (const dataProvider2 of this.listDataProviders) {
@@ -4410,28 +4660,34 @@ let Queue = class extends Subscriber$1(s$3) {
4410
4660
  }
4411
4661
  this.listDataProviders = [];
4412
4662
  clearTimeout(this.filterTimeoutId);
4413
- this.filterTimeoutId = setTimeout(() => {
4414
- const count = this.resultCount;
4415
- this.props = null;
4416
- this.resultCount = count;
4417
- this.requestId++;
4418
- this.next();
4419
- }, 250);
4663
+ this.filterTimeoutId = setTimeout(
4664
+ async () => {
4665
+ const count = this.resultCount;
4666
+ this.props = null;
4667
+ this.requestId++;
4668
+ this.resultCount = count;
4669
+ await PublisherManager$1.getInstance().isLocalStrorageReady;
4670
+ window.requestAnimationFrame(() => this.next());
4671
+ },
4672
+ this.isFirstRequest ? 0 : 400
4673
+ );
4674
+ this.isFirstRequest = false;
4420
4675
  }
4421
4676
  resetDuration() {
4422
4677
  this.lastRequestTime = new Date().getTime();
4423
4678
  }
4424
4679
  next(e2) {
4425
- var _a2, _b;
4680
+ var _a2;
4426
4681
  let offset = this.offset;
4427
4682
  const newTime = new Date().getTime();
4428
4683
  const requestDuration = newTime - this.lastRequestTime;
4429
4684
  if (!this.nextHadEvent && e2) {
4685
+ this.publisher.resultCount = 0;
4430
4686
  this.resultCount = 0;
4431
4687
  }
4432
4688
  this.nextHadEvent = !!e2;
4433
4689
  if (e2) {
4434
- if (e2.detail.requestId != this.requestId)
4690
+ if (e2.detail.requestId < this.requestId)
4435
4691
  return;
4436
4692
  this.resultCount += e2.detail.props.length;
4437
4693
  if (!e2.detail.isFirstLoad || !e2.detail.props.length || this.dataProviderExpression.indexOf("$offset") == -1) {
@@ -4448,8 +4704,10 @@ let Queue = class extends Subscriber$1(s$3) {
4448
4704
  const item = props[props.length - 1];
4449
4705
  offset = parseInt(item.offset.toString()) + parseInt(item.limit.toString());
4450
4706
  }
4451
- if (requestDuration > 0 && e2)
4452
- this.limit = Math.round(this.limit / requestDuration * this.targetRequestDuration);
4707
+ if (requestDuration > 0 && e2 && !this.localStorage)
4708
+ this.limit = Math.round(
4709
+ this.limit / requestDuration * this.targetRequestDuration
4710
+ );
4453
4711
  if (this.limit < 1)
4454
4712
  this.limit = 1;
4455
4713
  if (this.limit > 15)
@@ -4461,7 +4719,7 @@ let Queue = class extends Subscriber$1(s$3) {
4461
4719
  const filterData = (_a2 = this.filterPublisher) == null ? void 0 : _a2.get();
4462
4720
  const filteredFieldsArray = this.filteredFields.split(" ");
4463
4721
  for (const f2 in filterData) {
4464
- if (this.filteredFields && !filteredFieldsArray.includes(f2) || filterData[f2] == null)
4722
+ if (this.filteredFields && filteredFieldsArray.includes(f2) || filterData[f2] == null || filterData[f2] == "")
4465
4723
  continue;
4466
4724
  searchParams.set(f2, filterData[f2]);
4467
4725
  }
@@ -4469,12 +4727,12 @@ let Queue = class extends Subscriber$1(s$3) {
4469
4727
  this.searchHash = searchParams.toString();
4470
4728
  dataProvider = endpoint + "?" + searchParams.toString();
4471
4729
  this.listDataProviders.push(dataProvider);
4472
- this.currentScrollPosition = (_b = document.scrollingElement) == null ? void 0 : _b.scrollTop;
4473
4730
  const newProps = [
4474
4731
  ...this.props,
4475
4732
  {
4476
4733
  id: searchParams.toString() + "/" + this.props.length,
4477
- dataProvider,
4734
+ dataProvider: dataProvider + "_item_from_queue_" + this.instanceId,
4735
+ endPoint: dataProvider,
4478
4736
  offset,
4479
4737
  limit: this.limit
4480
4738
  }
@@ -4484,24 +4742,19 @@ let Queue = class extends Subscriber$1(s$3) {
4484
4742
  this.lastRequestTime = new Date().getTime();
4485
4743
  }
4486
4744
  render() {
4487
- if (this.currentScrollPosition) {
4488
- window.requestAnimationFrame(() => {
4489
- if (document.scrollingElement && this.currentScrollPosition != void 0)
4490
- document.scrollingElement.scrollTop = this.currentScrollPosition;
4491
- this.currentScrollPosition = void 0;
4492
- });
4493
- }
4494
4745
  if (!Array.isArray(this.props))
4495
4746
  return b$1;
4496
- return y`${c$1(
4497
- this.props,
4498
- (item) => item.id,
4499
- (item, index) => {
4500
- var _a2;
4501
- const templates = index == 0 ? this.templates : (_a2 = this.templates) == null ? void 0 : _a2.filter((elt) => elt.getAttribute("data-value") != "no-item");
4502
- return y`<sonic-list fetch displayContents lazyload requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${this.defferedDebug === true}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${item.dataProvider}" idKey="${this.idKey}" .templates="${templates}"></sonic-list>`;
4503
- }
4504
- )}`;
4747
+ let lazyload = !this.noLazyload;
4748
+ if (this.props.length == 1) {
4749
+ lazyload = false;
4750
+ }
4751
+ return y`${o$1(this.props, (item, index) => {
4752
+ var _a2;
4753
+ const templates = index == 0 ? this.templates : (_a2 = this.templates) == null ? void 0 : _a2.filter(
4754
+ (elt) => elt.getAttribute("data-value") != "no-item"
4755
+ );
4756
+ return y`<sonic-list fetch cache="${this.cache}" displayContents lazyBoundsRatio="${this.lazyBoundsRatio}" ?lazyload="${lazyload}" localStorage="${this.localStorage}" requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${this.defferedDebug === true}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${item.dataProvider}" endPoint="${item.endPoint}" idKey="${this.idKey}" .templates="${templates}"></sonic-list>`;
4757
+ })}`;
4505
4758
  }
4506
4759
  };
4507
4760
  Queue.instanceCounter = 0;
@@ -4511,18 +4764,27 @@ __decorateClass$V([
4511
4764
  __decorateClass$V([
4512
4765
  e$7({ type: Object })
4513
4766
  ], Queue.prototype, "itemPropertyMap", 2);
4767
+ __decorateClass$V([
4768
+ e$7()
4769
+ ], Queue.prototype, "cache", 2);
4514
4770
  __decorateClass$V([
4515
4771
  e$7()
4516
4772
  ], Queue.prototype, "targetRequestDuration", 2);
4517
4773
  __decorateClass$V([
4518
4774
  e$7()
4519
4775
  ], Queue.prototype, "limit", 2);
4776
+ __decorateClass$V([
4777
+ e$7()
4778
+ ], Queue.prototype, "lazyBoundsRatio", 2);
4520
4779
  __decorateClass$V([
4521
4780
  e$7()
4522
4781
  ], Queue.prototype, "offset", 2);
4523
4782
  __decorateClass$V([
4524
4783
  e$7()
4525
4784
  ], Queue.prototype, "resultCount", 2);
4785
+ __decorateClass$V([
4786
+ e$7({ type: Boolean })
4787
+ ], Queue.prototype, "noLazyload", 2);
4526
4788
  __decorateClass$V([
4527
4789
  e$7()
4528
4790
  ], Queue.prototype, "filteredFields", 2);
@@ -5240,9 +5502,9 @@ let SonicRouter = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
5240
5502
  dataProvider = ((_a2 = match.shift()) == null ? void 0 : _a2.replace(regexp, dataProviderExpression)) || "";
5241
5503
  }
5242
5504
  }
5243
- return y`<div style="display:contents" dataProvider="${dataProvider}">${o$1(template)}</div>`;
5505
+ return y`<div style="display:contents" dataProvider="${dataProvider}">${o$2(template)}</div>`;
5244
5506
  }
5245
- return o$1(template);
5507
+ return o$2(template);
5246
5508
  }
5247
5509
  )}`;
5248
5510
  }
@@ -5398,9 +5660,9 @@ let SonicStates = class extends Subscriber$1(TemplatesContainer$1(s$3)) {
5398
5660
  dataProvider = (_a2 = match.shift()) == null ? void 0 : _a2.replace(regexp, dataProviderExpression);
5399
5661
  }
5400
5662
  }
5401
- return y`<div style="display:contents" dataProvider="${dataProvider}">${o$1(template)}</div>`;
5663
+ return y`<div style="display:contents" dataProvider="${dataProvider}">${o$2(template)}</div>`;
5402
5664
  }
5403
- return o$1(template);
5665
+ return o$2(template);
5404
5666
  }
5405
5667
  )}`;
5406
5668
  }
@@ -6170,14 +6432,18 @@ let SonicValue = class extends Subscriber(s$3) {
6170
6432
  render() {
6171
6433
  if (typeof this.props === "object" || this.props === void 0)
6172
6434
  return y`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
6173
- return y`${o$2(this.props.toString())}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
6435
+ return y`${o$3(this.props.toString())}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
6174
6436
  }
6175
6437
  };
6176
6438
  SonicValue = __decorateClass$L([
6177
6439
  e$8(tagName$J)
6178
6440
  ], SonicValue);
6179
- const coreVariables = i$4`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base);--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity));--sc-placeholder-bg:rgba(17, 24, 39, 0.05);--sc-shadow-sm:0 1px 3px 0 rgb(0 0 0 / 0.1),0 1px 2px -1px rgb(0 0 0 / 0.1);--sc-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);--sc-shadow-lg:0 10px 15px 0px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);--sc-shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);--sc-shadow-2xl:0 25px 50px -12px rgb(0 0 0 / 0.25);--sc-border-width:max(1px, 0.12rem);--sc-border-color:var(--sc-base-200);--sc-form-height:2.5em;--sc-form-border-width:var(--sc-border-width);--sc-input-bg:var(--sc-base-100);--sc-input-border-color:var(--sc-input-bg);--sc-input-rounded-intensity:1.4;--sc-input-rounded:calc(
6180
- (var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-input-rounded-intensity)
6441
+ const coreVariables = i$4`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base),sans-serif;--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc(
6442
+ (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
6443
+ var(--sc-btn-rounded-intensity)
6444
+ );--sc-placeholder-bg:rgba(17, 24, 39, 0.05);--sc-shadow-sm:0 1px 3px 0 rgb(0 0 0 / 0.1),0 1px 2px -1px rgb(0 0 0 / 0.1);--sc-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);--sc-shadow-lg:0 10px 15px 0px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);--sc-shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);--sc-shadow-2xl:0 25px 50px -12px rgb(0 0 0 / 0.25);--sc-border-width:max(1px, 0.12rem);--sc-border-color:var(--sc-base-200);--sc-form-height:2.5em;--sc-form-border-width:var(--sc-border-width);--sc-input-bg:var(--sc-base-100);--sc-input-border-color:var(--sc-input-bg);--sc-input-rounded-intensity:1.4;--sc-input-rounded:calc(
6445
+ (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
6446
+ var(--sc-input-rounded-intensity)
6181
6447
  );--sc-label-font-weight:500;--sc-contrast-content:#fff;--sc-contrast:#11151f;--sc-scrollbar-bg:var(--sc-base-400);--sc-body-bg:var(--sc-base)}`;
6182
6448
  const light = i$4`:host{--sc-primary:var(--sc-base-800);--sc-info:#2563eb;--sc-danger:#f43f5e;--sc-warning:#f97316;--sc-success:#14b8a6;--sc-primary-content:var(--sc-base);--sc-info-content:var(--sc-base);--sc-danger-content:var(--sc-base);--sc-warning-content:var(--sc-base);--sc-success-content:var(--sc-base);--sc-base:#fff;--sc-base-50:#f8fafc;--sc-base-100:#f1f5f9;--sc-base-200:#e2e8f0;--sc-base-300:#cbd5e1;--sc-base-400:#94a3b8;--sc-base-500:#64748b;--sc-base-600:#475569;--sc-base-700:#334155;--sc-base-800:#1e293b;--sc-base-900:#0f172a;--sc-base-content:var(--sc-base-700);--sc-input-bg:var(--sc-base-100);--sc-input-color:var(--sc-base-content)}`;
6183
6449
  const darkCss = i$4``;
@@ -6238,7 +6504,11 @@ let Theme = class extends s$3 {
6238
6504
  }
6239
6505
  getCssVariables() {
6240
6506
  const names = [];
6241
- const stylesheets = [...Theme.styles.map((s2) => s2.styleSheet), ...Array.from(document.styleSheets)];
6507
+ const stylesheets = [
6508
+ ...Theme.styles.map((s2) => s2.styleSheet),
6509
+ ...Array.from(document.styleSheets)
6510
+ ];
6511
+ console.log(stylesheets);
6242
6512
  for (const stylesheet of stylesheets) {
6243
6513
  try {
6244
6514
  if (!stylesheet)
@@ -6271,7 +6541,7 @@ Theme.styles = [
6271
6541
  light,
6272
6542
  dark,
6273
6543
  coreVariables,
6274
- i$4`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base);font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`
6544
+ i$4`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base),sans-serif;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`
6275
6545
  ];
6276
6546
  __decorateClass$K([
6277
6547
  e$7({ type: String, reflect: true })
@@ -6313,7 +6583,7 @@ let Badge = class extends s$3 {
6313
6583
  };
6314
6584
  Badge.styles = [
6315
6585
  fontSize,
6316
- i$4`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-200, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:99px;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`
6586
+ i$4`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-200, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:0.85em;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([contrast]){--sc-badge-color:var(--sc-contrast-content);--sc-badge-bg:var(--sc-contrast)}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`
6317
6587
  ];
6318
6588
  __decorateClass$J([
6319
6589
  e$7({ type: String, reflect: true })
@@ -6462,9 +6732,10 @@ __decorateClass$H([
6462
6732
  Progress = __decorateClass$H([
6463
6733
  e$8(tagName$F)
6464
6734
  ], Progress);
6735
+ const passwordToggle = i$4`.password-toggle{color:var(--sc-input-c);font-size:var(--sc-input-fs);cursor:pointer;margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-suffix .password-toggle{margin-right:0}`;
6465
6736
  const label = i$4`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`;
6466
6737
  const description = i$4`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`;
6467
- const formControl = i$4`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`;
6738
+ const formControl = i$4`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([inlineContent]) .no-prefix slot[name=prefix],:host([inlineContent]) .no-suffix slot[name=suffix]{display:none}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`;
6468
6739
  /**
6469
6740
  * @license
6470
6741
  * Copyright 2018 Google LLC
@@ -6516,10 +6787,12 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
6516
6787
  this.readonly = false;
6517
6788
  this.inlineContent = false;
6518
6789
  this.disableInlineContentFocus = false;
6790
+ this.showPasswordToggle = false;
6519
6791
  this.hasDescription = false;
6520
6792
  this.hasLabel = false;
6521
6793
  this.hasSuffix = false;
6522
6794
  this.hasPrefix = false;
6795
+ this.isPassword = false;
6523
6796
  }
6524
6797
  connectedCallback() {
6525
6798
  super.connectedCallback();
@@ -6532,6 +6805,11 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
6532
6805
  return;
6533
6806
  formPublisher[this.sameValueAsName].onAssign(this.sameValueAsHandle);
6534
6807
  }
6808
+ if (this.type == "password") {
6809
+ this.isPassword = true;
6810
+ this.showPasswordToggle = true;
6811
+ this.inlineContent = true;
6812
+ }
6535
6813
  }
6536
6814
  disconnectedCallback() {
6537
6815
  super.disconnectedCallback();
@@ -6546,6 +6824,9 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
6546
6824
  this.hasSlotOrProps();
6547
6825
  super.willUpdate(changedProperties);
6548
6826
  }
6827
+ setSelectionRange(start, end) {
6828
+ this.input.setSelectionRange(start, end);
6829
+ }
6549
6830
  hasSlotOrProps() {
6550
6831
  var _a2, _b, _c, _d;
6551
6832
  this.hasLabel = this.label || ((_a2 = this.slotLabelNodes) == null ? void 0 : _a2.length) ? true : false;
@@ -6566,14 +6847,26 @@ let Input = class extends Form(Form$2(Subscriber$1(s$3))) {
6566
6847
  }
6567
6848
  if (this.changeTimeoutId)
6568
6849
  clearTimeout(this.changeTimeoutId);
6569
- this.changeTimeoutId = setTimeout(() => super.handleChange(e2), parseInt(this.getAttribute("inputDelayMs")));
6850
+ this.changeTimeoutId = setTimeout(
6851
+ () => super.handleChange(e2),
6852
+ parseInt(this.getAttribute("inputDelayMs"))
6853
+ );
6854
+ }
6855
+ togglePasswordVisibility() {
6856
+ this.isPassword = !this.isPassword;
6857
+ this._type = this.isPassword ? "password" : "text";
6858
+ console.log(this.isPassword);
6570
6859
  }
6571
6860
  render() {
6572
6861
  const slotClasses = {
6573
6862
  "has-prefix": this.hasPrefix,
6574
- "has-suffix": this.hasSuffix
6863
+ "has-suffix": this.hasSuffix,
6864
+ "no-suffix": !this.hasSuffix,
6865
+ "no-prefix": !this.hasPrefix
6575
6866
  };
6576
- return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${o(slotClasses)}"><div class="${this.inlineContent ? "form-element form-element-wrapper" : "contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${l$2(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${l$2(this.list)}" tabindex="${l$2(this.tabindex)}" pattern="${l$2(this.pattern)}" min="${l$2(this.min)}" max="${l$2(this.max)}" step="${l$2(this.step)}" src="${l$2(this.src)}" minlength="${l$2(this.minlength)}" maxlength="${l$2(this.maxlength)}" placeholder="${l$2(this.placeholder)}" required="${l$2(this.required)}" autocomplete="${l$2(this.autocomplete)}" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot><slot name="list"></slot>`;
6867
+ return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$3(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${o(
6868
+ slotClasses
6869
+ )}"><div class="${this.inlineContent ? "form-element form-element-wrapper" : "contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${l$2(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${l$2(this.list)}" tabindex="${l$2(this.tabindex)}" pattern="${l$2(this.pattern)}" min="${l$2(this.min)}" max="${l$2(this.max)}" step="${l$2(this.step)}" src="${l$2(this.src)}" minlength="${l$2(this.minlength)}" maxlength="${l$2(this.maxlength)}" placeholder="${l$2(this.placeholder)}" required="${l$2(this.required)}" autocomplete="${l$2(this.autocomplete)}" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"> ${this.showPasswordToggle ? y`<sonic-button shape="circle" class="password-toggle" @click="${this.togglePasswordVisibility}" aria-label="Toggle password visibility" variant="unstyled"><sonic-icon library="heroicons" name="${this.isPassword ? "eye" : "eye-slash"}"></sonic-icon></sonic-button>` : ""}<slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$3(this.description)}` : ""}</slot><slot name="list"></slot>`;
6577
6870
  }
6578
6871
  };
6579
6872
  Input.styles = [
@@ -6581,7 +6874,8 @@ Input.styles = [
6581
6874
  formControl,
6582
6875
  label,
6583
6876
  description,
6584
- i$4`:host([type=hidden]){appearance:none!important;display:none!important}`
6877
+ passwordToggle,
6878
+ i$4`:host([type=hidden]){appearance:none!important;display:none!important}:host>.form-control{position:relative}`
6585
6879
  ];
6586
6880
  __decorateClass$G([
6587
6881
  e$7({ type: String, reflect: true })
@@ -6623,16 +6917,19 @@ __decorateClass$G([
6623
6917
  e$7({ type: Boolean })
6624
6918
  ], Input.prototype, "disableInlineContentFocus", 2);
6625
6919
  __decorateClass$G([
6626
- o$8({ slot: "label" })
6920
+ e$7({ type: Boolean })
6921
+ ], Input.prototype, "showPasswordToggle", 2);
6922
+ __decorateClass$G([
6923
+ o$9({ slot: "label" })
6627
6924
  ], Input.prototype, "slotLabelNodes", 2);
6628
6925
  __decorateClass$G([
6629
- o$8({ slot: "description" })
6926
+ o$9({ slot: "description" })
6630
6927
  ], Input.prototype, "slotDescriptionNodes", 2);
6631
6928
  __decorateClass$G([
6632
- o$8({ slot: "suffix" })
6929
+ o$9({ slot: "suffix" })
6633
6930
  ], Input.prototype, "slotSuffixNodes", 2);
6634
6931
  __decorateClass$G([
6635
- o$8({ slot: "prefix" })
6932
+ o$9({ slot: "prefix" })
6636
6933
  ], Input.prototype, "slotPrefixNodes", 2);
6637
6934
  __decorateClass$G([
6638
6935
  i$5("input")
@@ -6649,6 +6946,9 @@ __decorateClass$G([
6649
6946
  __decorateClass$G([
6650
6947
  t$3()
6651
6948
  ], Input.prototype, "hasPrefix", 2);
6949
+ __decorateClass$G([
6950
+ t$3()
6951
+ ], Input.prototype, "isPassword", 2);
6652
6952
  Input = __decorateClass$G([
6653
6953
  e$8(tagName$E)
6654
6954
  ], Input);
@@ -6675,7 +6975,9 @@ let Pop = class extends s$3 {
6675
6975
  this.positioningRuns = false;
6676
6976
  this.lastContentX = 0;
6677
6977
  this.lastContentY = 0;
6678
- this.resizeObserver = new ResizeObserver(() => this.computePosition(this.placement));
6978
+ this.resizeObserver = new ResizeObserver(
6979
+ () => this.computePosition(this.placement)
6980
+ );
6679
6981
  }
6680
6982
  runPositioningLoop() {
6681
6983
  if (!this.positioningRuns)
@@ -6703,18 +7005,22 @@ let Pop = class extends s$3 {
6703
7005
  this.lastContentY = 0;
6704
7006
  this.runPositioningLoop();
6705
7007
  }
7008
+ this.dispatchEvent(new CustomEvent("show"));
6706
7009
  }
6707
7010
  _hide() {
6708
7011
  this.open = false;
6709
7012
  this.popContent.setAttribute("tabindex", "-1");
6710
7013
  this.positioningRuns = false;
7014
+ this.dispatchEvent(new CustomEvent("hide"));
6711
7015
  }
6712
7016
  _handleClosePop(e2) {
6713
7017
  const path = e2.composedPath();
6714
7018
  const target = path[0];
6715
7019
  Pop.pops.forEach((pop) => {
6716
7020
  const popContainsTarget = path.includes(pop);
6717
- const popContentContainsTarget = path.includes(pop.querySelector('[slot="content"]'));
7021
+ const popContentContainsTarget = path.includes(
7022
+ pop.querySelector('[slot="content"]')
7023
+ );
6718
7024
  const isCloseManual = HTML$1.getAncestorAttributeValue(target, "data-on-select") === "keep";
6719
7025
  if (e2.type == "pointerdown" && popContainsTarget)
6720
7026
  return;
@@ -6734,7 +7040,6 @@ let Pop = class extends s$3 {
6734
7040
  firstUpdated(_changedProperties) {
6735
7041
  super.firstUpdated(_changedProperties);
6736
7042
  this.resizeObserver.observe(this.popContent);
6737
- this.computePosition(this.placement);
6738
7043
  }
6739
7044
  disconnectedCallback() {
6740
7045
  super.disconnectedCallback();
@@ -6812,7 +7117,7 @@ let Pop = class extends s$3 {
6812
7117
  });
6813
7118
  }
6814
7119
  render() {
6815
- return y`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open ? "is-open" : ""}"></slot>`;
7120
+ return y`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" style="display:none" class="${this.open ? "is-open" : ""}"></slot>`;
6816
7121
  }
6817
7122
  };
6818
7123
  Pop.pops = /* @__PURE__ */ new Set();
@@ -6889,69 +7194,150 @@ var __decorateClass$D = (decorators, target, key, kind) => {
6889
7194
  __defProp$D(target, key, result);
6890
7195
  return result;
6891
7196
  };
6892
- let InputAutocomplete = class extends TemplatesContainer(Subscriber(s$3)) {
7197
+ let InputAutocomplete = class extends TemplatesContainer(
7198
+ FormInput(FormElement(Subscriber(s$3)))
7199
+ ) {
6893
7200
  constructor() {
6894
7201
  super(...arguments);
6895
- this._name = "";
6896
- this.forceAutoFill = false;
7202
+ this.size = "md";
6897
7203
  this.placeholder = "";
6898
7204
  this.filteredFields = "";
6899
7205
  this.readonly = null;
6900
7206
  this.dataProviderExpression = "";
6901
7207
  this.key = "";
6902
- this.value = "";
6903
- this.formDataProvider = "";
6904
- }
6905
- get name() {
6906
- return this._name;
6907
- }
6908
- set name(value) {
6909
- if (this.hasAttribute("name") && !this.forceAutoFill)
6910
- value = this.getAttribute("name");
6911
- this._name = value;
6912
- this.requestUpdate();
6913
- }
6914
- get description() {
6915
- return this._description;
7208
+ this.searchParameter = "";
7209
+ this.searchDataProvider = "";
7210
+ this.initSearchDataProvider = "";
7211
+ this.queueDataProvider = "";
7212
+ this.initQueueDataProvider = "";
7213
+ this.lastValidSearch = "";
7214
+ this.updateSearchParameter = (value) => {
7215
+ if (value == "") {
7216
+ this.lastValidSearch = "";
7217
+ return;
7218
+ }
7219
+ this.queryQueueListItem(
7220
+ this.queueDataProvider,
7221
+ this.findSelection,
7222
+ this.setSearchFromSelection
7223
+ );
7224
+ };
7225
+ this.initSearchParameter = () => {
7226
+ this.queryQueueListItem(
7227
+ this.initQueueDataProvider,
7228
+ this.findSelection,
7229
+ this.setSearchFromSelection
7230
+ );
7231
+ };
7232
+ this.selectListItem = (listItem) => {
7233
+ var _a2;
7234
+ (_a2 = this.formValuePublisher) == null ? void 0 : _a2.set(listItem[this.name]);
7235
+ };
7236
+ this.findSearchedItem = (listItem) => {
7237
+ var _a2;
7238
+ return listItem[this.searchParameter || this.name] == ((_a2 = this.searchPublisher) == null ? void 0 : _a2.get());
7239
+ };
7240
+ this.findSelection = (listItem) => {
7241
+ return listItem[this.name] == this.value;
7242
+ };
7243
+ this.setSearchFromSelection = (listItem) => {
7244
+ var _a2;
7245
+ this.lastValidSearch = listItem[this.searchParameter || this.name];
7246
+ (_a2 = this.searchPublisher) == null ? void 0 : _a2.set(this.lastValidSearch);
7247
+ };
7248
+ this.updateActiveSelection = () => {
7249
+ var _a2, _b, _c;
7250
+ this.queryQueueListItem(
7251
+ this.queueDataProvider,
7252
+ this.findSearchedItem,
7253
+ this.selectListItem
7254
+ );
7255
+ if (!this.select && this.lastValidSearch && this.lastValidSearch != ((_a2 = this.searchPublisher) == null ? void 0 : _a2.get()) && ((_b = this.formValuePublisher) == null ? void 0 : _b.get())) {
7256
+ (_c = this.formValuePublisher) == null ? void 0 : _c.set("");
7257
+ }
7258
+ };
6916
7259
  }
6917
- set description(value) {
6918
- if (this.hasAttribute("description") && !this.forceAutoFill)
6919
- value = this.getAttribute("description");
6920
- this._description = value;
6921
- this.requestUpdate();
7260
+ connectedCallback() {
7261
+ var _a2, _b, _c;
7262
+ super.connectedCallback();
7263
+ const searchParameter = this.searchParameter || this.name;
7264
+ const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
7265
+ const dpPrefix = formDataProvider + "__autocomplete";
7266
+ this.initSearchDataProvider = `${dpPrefix}_init_search__`;
7267
+ this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
7268
+ this.searchDataProvider = `${dpPrefix}_search__`;
7269
+ this.queueDataProvider = `${dpPrefix}_queue__`;
7270
+ const getPublisher = PublisherManager.get;
7271
+ this.searchPublisher = getPublisher(this.searchDataProvider)[searchParameter];
7272
+ this.formValuePublisher = getPublisher(formDataProvider)[this.name];
7273
+ this.countPublisher = getPublisher(this.queueDataProvider).resultCount;
7274
+ this.initCountPublisher = getPublisher(
7275
+ this.initQueueDataProvider
7276
+ ).resultCount;
7277
+ if (this.value) {
7278
+ PublisherManager.get(this.initSearchDataProvider)[this.name] = this.value;
7279
+ }
7280
+ (_a2 = this.initCountPublisher) == null ? void 0 : _a2.onAssign(this.initSearchParameter);
7281
+ (_b = this.formValuePublisher) == null ? void 0 : _b.onAssign(this.updateSearchParameter);
7282
+ (_c = this.countPublisher) == null ? void 0 : _c.onAssign(this.updateActiveSelection);
6922
7283
  }
6923
- get label() {
6924
- return this._label;
7284
+ disconnectedCallback() {
7285
+ var _a2, _b, _c;
7286
+ super.disconnectedCallback();
7287
+ (_a2 = this.initCountPublisher) == null ? void 0 : _a2.offAssign(this.initSearchParameter);
7288
+ (_b = this.formValuePublisher) == null ? void 0 : _b.offAssign(this.updateSearchParameter);
7289
+ (_c = this.countPublisher) == null ? void 0 : _c.offAssign(this.updateActiveSelection);
7290
+ const getPublisher = PublisherManager.get;
7291
+ getPublisher(this.initSearchDataProvider).delete();
7292
+ getPublisher(this.initQueueDataProvider).delete();
7293
+ getPublisher(this.searchDataProvider).delete();
7294
+ getPublisher(this.queueDataProvider).delete();
7295
+ }
7296
+ queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
7297
+ const queuePublisher = PublisherManager.get(queueDataProvider);
7298
+ let listItem;
7299
+ const listsDescriptors = queuePublisher.get();
7300
+ if (!Array.isArray(listsDescriptors))
7301
+ return;
7302
+ for (const listDescriptor of listsDescriptors) {
7303
+ const list = PublisherManager.get(listDescriptor.dataProvider).get();
7304
+ if (!Array.isArray(list))
7305
+ continue;
7306
+ listItem = list.find(itemFinder);
7307
+ console.log(listItem);
7308
+ if (listItem) {
7309
+ break;
7310
+ }
7311
+ }
7312
+ if (listItem) {
7313
+ itemMutator(listItem);
7314
+ }
6925
7315
  }
6926
- set label(value) {
6927
- if (this.hasAttribute("label") && !this.forceAutoFill)
6928
- value = this.getAttribute("label");
6929
- this._label = value;
6930
- this.requestUpdate();
7316
+ setSelectionRange(start, end) {
7317
+ var _a2;
7318
+ (_a2 = this.querySelector("sonic-input")) == null ? void 0 : _a2.setSelectionRange(start, end);
6931
7319
  }
6932
- connectedCallback() {
6933
- this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
6934
- super.connectedCallback();
7320
+ handleHide() {
7321
+ var _a2, _b, _c;
7322
+ if (!this.select)
7323
+ return;
7324
+ if (((_a2 = this.searchPublisher) == null ? void 0 : _a2.get()) == "") {
7325
+ this.lastValidSearch = "";
7326
+ (_b = this.formValuePublisher) == null ? void 0 : _b.set("");
7327
+ return;
7328
+ }
7329
+ (_c = this.searchPublisher) == null ? void 0 : _c.set(this.lastValidSearch);
6935
7330
  }
6936
7331
  render() {
6937
- return y`<sonic-pop noToggle style="display:block"><sonic-input type="search" data-keyboard-nav="nav-autocomplete" label="${l$2(this.label)}" description="${l$2(this.description)}" name="${l$2(this.name)}" value="${l$2(this.value)}" autocomplete="off" clearable></sonic-input><sonic-menu slot="content"><sonic-queue filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.formDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue></sonic-menu></sonic-pop>`;
7332
+ return y`<sonic-pop noToggle style="display:block" @hide="${this.handleHide}"><sonic-input debug dataProvider="${this.initSearchDataProvider + Math.random()}" formDataProvider="${this.searchDataProvider}" type="search" data-keyboard-nav="${this.getAttribute("data-keyboard-nav") || ""}" label="${l$2(this.label)}" description="${l$2(this.description)}" name="${l$2(this.searchParameter || this.name)}" placeholder="${l$2(this.placeholder)}" ?readonly="${this.readonly}" autocomplete="off" clearable inlineContent size="${this.size}">${this.select ? y`<sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon>` : b$1}</sonic-input><sonic-menu slot="content"><sonic-queue dataProvider="${this.queueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.searchDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue><sonic-queue noLazyload dataProvider="${this.initQueueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.initSearchDataProvider}" key="${this.key}" displayContents></sonic-queue></sonic-menu></sonic-pop>`;
6938
7333
  }
6939
7334
  };
6940
7335
  InputAutocomplete.styles = [
6941
7336
  i$4`:host{display:block}`
6942
7337
  ];
6943
7338
  __decorateClass$D([
6944
- e$7()
6945
- ], InputAutocomplete.prototype, "name", 1);
6946
- __decorateClass$D([
6947
- e$7()
6948
- ], InputAutocomplete.prototype, "forceAutoFill", 2);
6949
- __decorateClass$D([
6950
- e$7()
6951
- ], InputAutocomplete.prototype, "description", 1);
6952
- __decorateClass$D([
6953
- e$7()
6954
- ], InputAutocomplete.prototype, "label", 1);
7339
+ e$7({ type: String })
7340
+ ], InputAutocomplete.prototype, "size", 2);
6955
7341
  __decorateClass$D([
6956
7342
  e$7({ type: String })
6957
7343
  ], InputAutocomplete.prototype, "placeholder", 2);
@@ -6964,12 +7350,15 @@ __decorateClass$D([
6964
7350
  __decorateClass$D([
6965
7351
  e$7({ type: String })
6966
7352
  ], InputAutocomplete.prototype, "dataProviderExpression", 2);
7353
+ __decorateClass$D([
7354
+ e$7({ type: Boolean })
7355
+ ], InputAutocomplete.prototype, "select", 2);
6967
7356
  __decorateClass$D([
6968
7357
  e$7({ type: String })
6969
7358
  ], InputAutocomplete.prototype, "key", 2);
6970
7359
  __decorateClass$D([
6971
7360
  e$7({ type: String })
6972
- ], InputAutocomplete.prototype, "value", 2);
7361
+ ], InputAutocomplete.prototype, "searchParameter", 2);
6973
7362
  InputAutocomplete = __decorateClass$D([
6974
7363
  e$8("sonic-input-autocomplete")
6975
7364
  ], InputAutocomplete);
@@ -7129,7 +7518,7 @@ let SonicComponent = class extends Subscriber(s$3) {
7129
7518
  render() {
7130
7519
  if (this.hasNoChar)
7131
7520
  return b$1;
7132
- return y`<span>${this.areEqual ? o$2(this.descriptionWhenEqual) : o$2(this.descriptionWhenNotEqual)}</span>`;
7521
+ return y`<span>${this.areEqual ? o$3(this.descriptionWhenEqual) : o$3(this.descriptionWhenNotEqual)}</span>`;
7133
7522
  }
7134
7523
  };
7135
7524
  __decorateClass$B([
@@ -7165,12 +7554,15 @@ var __decorateClass$A = (decorators, target, key, kind) => {
7165
7554
  return result;
7166
7555
  };
7167
7556
  const tagName$z = "sonic-checkbox";
7168
- let Checkbox = class extends Form$1(Form(Form$2(Subscriber$1(s$3)))) {
7557
+ let Checkbox = class extends Form$1(
7558
+ Form(Form$2(Subscriber$1(s$3)))
7559
+ ) {
7169
7560
  constructor() {
7170
7561
  super(...arguments);
7171
7562
  this.touched = false;
7172
7563
  this.iconName = "check";
7173
7564
  this.indeterminateIconName = "minus-small";
7565
+ this.showAsIndeterminate = false;
7174
7566
  this.hasDescription = false;
7175
7567
  this.hasLabel = false;
7176
7568
  }
@@ -7189,12 +7581,12 @@ let Checkbox = class extends Form$1(Form(Form$2(Subscriber$1(s$3)))) {
7189
7581
  this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) == null ? void 0 : _b.length) ? true : false;
7190
7582
  }
7191
7583
  render() {
7192
- return y`<label class="checkbox-container ${this.disabled ? "disabled" : ""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" .disabled="${l$2(this.disabled)}" .checked="${l$2(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}"><sonic-icon name="${this.checked == "indeterminate" ? this.indeterminateIconName : this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${!this.hasDescription && !this.hasLabel ? "hidden" : "checkbox-text"}">${this.label ? o$2(this.label) : ""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription ? "description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot></div></label>`;
7584
+ return y`<label class="checkbox-container ${this.disabled ? "disabled" : ""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" ?data-indeterminate="${this.showAsIndeterminate}" .disabled="${l$2(this.disabled)}" .checked="${l$2(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}"><sonic-icon name="${this.checked == "indeterminate" || this.showAsIndeterminate ? this.indeterminateIconName : this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${!this.hasDescription && !this.hasLabel ? "hidden" : "checkbox-text"}">${this.label ? o$3(this.label) : ""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription ? "description" : "hidden"}">${this.description ? y`${o$3(this.description)}` : ""}</slot></div></label>`;
7193
7585
  }
7194
7586
  };
7195
7587
  Checkbox.styles = [
7196
7588
  fontSize,
7197
- i$4`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`
7589
+ i$4`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked],input[data-indeterminate]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon,input[data-indeterminate]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`
7198
7590
  ];
7199
7591
  __decorateClass$A([
7200
7592
  e$7({ type: Boolean, reflect: true })
@@ -7205,6 +7597,9 @@ __decorateClass$A([
7205
7597
  __decorateClass$A([
7206
7598
  e$7({ type: String })
7207
7599
  ], Checkbox.prototype, "indeterminateIconName", 2);
7600
+ __decorateClass$A([
7601
+ e$7({ type: Boolean })
7602
+ ], Checkbox.prototype, "showAsIndeterminate", 2);
7208
7603
  __decorateClass$A([
7209
7604
  e$7({ type: Boolean })
7210
7605
  ], Checkbox.prototype, "hasDescription", 2);
@@ -7212,10 +7607,10 @@ __decorateClass$A([
7212
7607
  e$7({ type: Boolean })
7213
7608
  ], Checkbox.prototype, "hasLabel", 2);
7214
7609
  __decorateClass$A([
7215
- o$8()
7610
+ o$9()
7216
7611
  ], Checkbox.prototype, "slotLabelNodes", 2);
7217
7612
  __decorateClass$A([
7218
- o$8({ slot: "description" })
7613
+ o$9({ slot: "description" })
7219
7614
  ], Checkbox.prototype, "slotDescriptionNodes", 2);
7220
7615
  Checkbox = __decorateClass$A([
7221
7616
  e$8(tagName$z)
@@ -7374,14 +7769,14 @@ let Select = class extends Form$2(Subscriber$1(s$3)) {
7374
7769
  "has-prefix": this.hasPrefix,
7375
7770
  "has-suffix": this.hasSuffix
7376
7771
  };
7377
- return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${o(slotClasses)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${l$2(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}">${c$1(
7772
+ return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$3(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${o(slotClasses)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${l$2(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}">${c$1(
7378
7773
  this.options,
7379
7774
  (option) => option[this.valueKey],
7380
7775
  (option) => {
7381
7776
  const isSelected = this.value == option[this.valueKey] ? true : false;
7382
7777
  return y`<option ?selected="${isSelected}" value="${option[this.valueKey]}">${option[this.wordingKey]}</option>`;
7383
7778
  }
7384
- )}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot>`;
7779
+ )}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$3(this.description)}` : ""}</slot>`;
7385
7780
  }
7386
7781
  };
7387
7782
  Select.styles = [
@@ -7422,16 +7817,16 @@ __decorateClass$y([
7422
7817
  e$7()
7423
7818
  ], Select.prototype, "label", 1);
7424
7819
  __decorateClass$y([
7425
- o$8({ slot: "label" })
7820
+ o$9({ slot: "label" })
7426
7821
  ], Select.prototype, "slotLabelNodes", 2);
7427
7822
  __decorateClass$y([
7428
- o$8({ slot: "description" })
7823
+ o$9({ slot: "description" })
7429
7824
  ], Select.prototype, "slotDescriptionNodes", 2);
7430
7825
  __decorateClass$y([
7431
- o$8({ slot: "suffix" })
7826
+ o$9({ slot: "suffix" })
7432
7827
  ], Select.prototype, "slotSuffixNodes", 2);
7433
7828
  __decorateClass$y([
7434
- o$8({ slot: "prefix" })
7829
+ o$9({ slot: "prefix" })
7435
7830
  ], Select.prototype, "slotPrefixNodes", 2);
7436
7831
  __decorateClass$y([
7437
7832
  t$3()
@@ -7493,8 +7888,8 @@ let Textarea = class extends Form(Form$2(Subscriber$1(s$3))) {
7493
7888
  textarea2.reportValidity();
7494
7889
  }
7495
7890
  render() {
7496
- return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${l$2(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${l$2(this.rows)}" cols="${l$2(this.cols)}" maxlength="${l$2(this.maxlength)}" minlength="${l$2(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${l$2(this.spellcheck)}" autocomplete="${l$2(this.autocomplete)}" tabindex="${l$2(this.tabindex)}" wrap="${l$2(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}">
7497
- ${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot>`;
7891
+ return y`<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$3(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${l$2(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${l$2(this.rows)}" cols="${l$2(this.cols)}" maxlength="${l$2(this.maxlength)}" minlength="${l$2(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${l$2(this.spellcheck)}" autocomplete="${l$2(this.autocomplete)}" tabindex="${l$2(this.tabindex)}" wrap="${l$2(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${l$2(this.ariaLabel)}" aria-labelledby="${l$2(this.ariaLabelledby)}">
7892
+ ${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$3(this.description)}` : ""}</slot>`;
7498
7893
  }
7499
7894
  };
7500
7895
  Textarea.styles = [
@@ -7530,10 +7925,10 @@ __decorateClass$x([
7530
7925
  e$7({ type: String })
7531
7926
  ], Textarea.prototype, "placeholder", 2);
7532
7927
  __decorateClass$x([
7533
- o$8({ slot: "label" })
7928
+ o$9({ slot: "label" })
7534
7929
  ], Textarea.prototype, "slotLabelNodes", 2);
7535
7930
  __decorateClass$x([
7536
- o$8({ slot: "description" })
7931
+ o$9({ slot: "description" })
7537
7932
  ], Textarea.prototype, "slotDescriptionNodes", 2);
7538
7933
  __decorateClass$x([
7539
7934
  t$3()
@@ -7602,7 +7997,7 @@ let Legend = class extends s$3 {
7602
7997
  this.requestUpdate();
7603
7998
  }
7604
7999
  render() {
7605
- return y`<legend part="legend">${this.iconName ? y`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${l$2(this.iconPrefix)}" library="${l$2(this.iconLibrary)}"></sonic-icon></div>` : ""}<div class="legend-content">${o$2(this.label ? this.label : "")} ${this.description ? y`<sonic-legend-description>${o$2(this.description)}</sonic-legend-description>` : ""}<slot></slot></div><slot name="suffix"></slot></legend>`;
8000
+ return y`<legend part="legend">${this.iconName ? y`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${l$2(this.iconPrefix)}" library="${l$2(this.iconLibrary)}"></sonic-icon></div>` : ""}<div class="legend-content">${o$3(this.label ? this.label : "")} ${this.description ? y`<sonic-legend-description>${o$3(this.description)}</sonic-legend-description>` : ""}<slot></slot></div><slot name="suffix"></slot></legend>`;
7606
8001
  }
7607
8002
  };
7608
8003
  Legend.styles = [
@@ -7850,7 +8245,7 @@ let Group = class extends s$3 {
7850
8245
  const slotStyle = {
7851
8246
  alignItems: this.alignItems
7852
8247
  };
7853
- return y`<span class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$2(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${i$1(slotStyle)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$2(this.description)}` : ""}</slot>`;
8248
+ return y`<span class="${this.hasLabel ? "form-label" : "hidden"}">${this.label ? o$3(this.label) : ""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${i$1(slotStyle)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription ? "form-description" : "hidden"}">${this.description ? y`${o$3(this.description)}` : ""}</slot>`;
7854
8249
  }
7855
8250
  };
7856
8251
  Group.styles = [
@@ -7869,10 +8264,10 @@ __decorateClass$r([
7869
8264
  e$7({ type: String })
7870
8265
  ], Group.prototype, "description", 2);
7871
8266
  __decorateClass$r([
7872
- o$8({ slot: "label" })
8267
+ o$9({ slot: "label" })
7873
8268
  ], Group.prototype, "slotLabelNodes", 2);
7874
8269
  __decorateClass$r([
7875
- o$8({ slot: "description" })
8270
+ o$9({ slot: "description" })
7876
8271
  ], Group.prototype, "slotDescriptionNodes", 2);
7877
8272
  __decorateClass$r([
7878
8273
  t$3()
@@ -7946,6 +8341,42 @@ __decorateClass$q([
7946
8341
  Image = __decorateClass$q([
7947
8342
  e$8(tagName$q)
7948
8343
  ], Image);
8344
+ /**
8345
+ * @license
8346
+ * Copyright 2017 Google LLC
8347
+ * SPDX-License-Identifier: BSD-3-Clause
8348
+ */
8349
+ const d = e$2(class extends i$2 {
8350
+ constructor(t2) {
8351
+ super(t2), this.et = /* @__PURE__ */ new WeakMap();
8352
+ }
8353
+ render(t2) {
8354
+ return [t2];
8355
+ }
8356
+ update(s2, [e2]) {
8357
+ if (n$2(this.it) && (!n$2(e2) || this.it.strings !== e2.strings)) {
8358
+ const e3 = m(s2).pop();
8359
+ let o2 = this.et.get(this.it.strings);
8360
+ if (void 0 === o2) {
8361
+ const s3 = document.createDocumentFragment();
8362
+ o2 = Z(b$1, s3), o2.setConnected(false), this.et.set(this.it.strings, o2);
8363
+ }
8364
+ s$2(o2, [e3]), r$2(o2, void 0, e3);
8365
+ }
8366
+ if (n$2(e2)) {
8367
+ if (!n$2(this.it) || this.it.strings !== e2.strings) {
8368
+ const t2 = this.et.get(e2.strings);
8369
+ if (void 0 !== t2) {
8370
+ const i2 = m(t2).pop();
8371
+ a$1(s2), r$2(s2, void 0, i2), s$2(s2, [i2]);
8372
+ }
8373
+ }
8374
+ this.it = e2;
8375
+ } else
8376
+ this.it = void 0;
8377
+ return this.render(e2);
8378
+ }
8379
+ });
7949
8380
  var __defProp$p = Object.defineProperty;
7950
8381
  var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
7951
8382
  var __decorateClass$p = (decorators, target, key, kind) => {
@@ -7966,6 +8397,7 @@ let Taxonomy = class extends s$3 {
7966
8397
  this.separator = ",&nbsp;";
7967
8398
  this.key = "";
7968
8399
  this.displayAll = false;
8400
+ this.contrast = false;
7969
8401
  this.type = "default";
7970
8402
  this.variant = "default";
7971
8403
  this.size = "md";
@@ -7982,13 +8414,13 @@ let Taxonomy = class extends s$3 {
7982
8414
  return b$1;
7983
8415
  }
7984
8416
  this.style.removeProperty("display");
7985
- return y`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" library="${l$2(this.icon.library)}" prefix="${l$2(this.icon.prefix)}" name="${l$2(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${c$1(
8417
+ return d(y`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}" ?contrast="${this.contrast}"><sonic-icon slot="prefix" library="${l$2(this.icon.library)}" prefix="${l$2(this.icon.prefix)}" name="${l$2(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${c$1(
7986
8418
  taxo,
7987
8419
  (item) => item[this.key + "_id"],
7988
8420
  (item) => {
7989
- return y`<span>${item[this.key + "_name"] || item["name"]}</span><span class="sonic-taxonomy-separator">${o$2(this.separator)}</span>`;
8421
+ return y`<span>${item[this.key + "_name"] || item["name"]}</span><span class="sonic-taxonomy-separator">${o$3(this.separator)}</span>`;
7990
8422
  }
7991
- )}</span></sonic-badge>`;
8423
+ )}</span></sonic-badge>`);
7992
8424
  }
7993
8425
  };
7994
8426
  Taxonomy.styles = i$4`:host .sonic-taxonomy-separator:last-child{display:none}.taxonomy-list{display:flex;flex-wrap:wrap}`;
@@ -8007,6 +8439,9 @@ __decorateClass$p([
8007
8439
  __decorateClass$p([
8008
8440
  e$7({ type: Boolean })
8009
8441
  ], Taxonomy.prototype, "displayAll", 2);
8442
+ __decorateClass$p([
8443
+ e$7({ type: Boolean })
8444
+ ], Taxonomy.prototype, "contrast", 2);
8010
8445
  __decorateClass$p([
8011
8446
  e$7({ type: String, reflect: true })
8012
8447
  ], Taxonomy.prototype, "type", 2);
@@ -8276,7 +8711,7 @@ let ModalClose = class extends s$3 {
8276
8711
  }
8277
8712
  };
8278
8713
  ModalClose.styles = [
8279
- i$4`:host{position:sticky;display:block;align-self:flex-end;height:0;top:0;padding-top:.5rem;padding-right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`
8714
+ i$4`:host{position:sticky;display:block;align-self:flex-end;height:0;top:.5rem;right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`
8280
8715
  ];
8281
8716
  __decorateClass$m([
8282
8717
  e$7()
@@ -8302,7 +8737,7 @@ let ModalContent = class extends s$3 {
8302
8737
  }
8303
8738
  };
8304
8739
  ModalContent.styles = [
8305
- i$4`:host{display:block}`
8740
+ i$4`:host{display:block;width:100%}`
8306
8741
  ];
8307
8742
  ModalContent = __decorateClass$l([
8308
8743
  e$8(tagName$l)
@@ -8369,17 +8804,31 @@ let Modal = class extends Subscriber$1(s$3) {
8369
8804
  constructor() {
8370
8805
  super(...arguments);
8371
8806
  this.forceAction = false;
8807
+ this.removeOnHide = false;
8372
8808
  this.align = "left";
8373
8809
  this.padding = "var(--sc-modal-py) var(--sc-modal-px)";
8374
8810
  this.maxWidth = "var(--sc-modal-max-w) ";
8375
8811
  this.maxHeight = "var(--sc-modal-max-h) ";
8376
8812
  this.width = "100%";
8377
8813
  this.height = "auto";
8814
+ this.zIndex = "var(--sc-modal-z-index)";
8378
8815
  this.fullScreen = false;
8379
8816
  this.visible = false;
8380
8817
  }
8381
8818
  static create(options) {
8382
8819
  const modal = document.createElement(tagName$i);
8820
+ if (options.removeOnHide === true)
8821
+ modal.setAttribute("removeOnHide", "true");
8822
+ if (options.maxWidth)
8823
+ modal.maxWidth = options == null ? void 0 : options.maxWidth;
8824
+ if (options.width)
8825
+ modal.width = options == null ? void 0 : options.width;
8826
+ if (options.paddingX)
8827
+ modal.style.setProperty("--sc-modal-px", options == null ? void 0 : options.paddingX);
8828
+ if (options.paddingY)
8829
+ modal.style.setProperty("--sc-modal-py", options == null ? void 0 : options.paddingY);
8830
+ if (options.zIndex)
8831
+ modal.style.setProperty("--sc-modal-z-index", options == null ? void 0 : options.zIndex);
8383
8832
  modal.innerHTML = `<sonic-modal-close></sonic-modal-close><sonic-modal-content>${options.content}</sonic-modal-content>` || "";
8384
8833
  const container = document.querySelector("sonic-theme") || document.body;
8385
8834
  container.appendChild(modal);
@@ -8418,6 +8867,7 @@ let Modal = class extends Subscriber$1(s$3) {
8418
8867
  maxHeight: this.maxHeight,
8419
8868
  width: this.width,
8420
8869
  height: this.height,
8870
+ zIndex: this.zIndex,
8421
8871
  borderRadius: this.fullScreen ? "0" : "var(--sc-modal-rounded)"
8422
8872
  };
8423
8873
  const modalWrapperStyles = {
@@ -8436,7 +8886,7 @@ let Modal = class extends Subscriber$1(s$3) {
8436
8886
  },
8437
8887
  in: [{ transform: "translateY(25%) scale(1)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
8438
8888
  out: [{ transform: "translateY(20%) scale(1)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }]
8439
- })}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${!this.forceAction ? this.hide : ""}" ${$({
8889
+ })}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${!this.forceAction ? this.hide : null}" ${$({
8440
8890
  keyframeOptions: {
8441
8891
  duration: 500
8442
8892
  },
@@ -8459,6 +8909,9 @@ let Modal = class extends Subscriber$1(s$3) {
8459
8909
  if (this.hasAttribute("resetDataProviderOnHide")) {
8460
8910
  PublisherManager.get(this.getAttribute("resetDataProviderOnHide")).set({});
8461
8911
  }
8912
+ if (this.removeOnHide) {
8913
+ this.remove();
8914
+ }
8462
8915
  }
8463
8916
  dispose() {
8464
8917
  this.hide();
@@ -8467,9 +8920,9 @@ let Modal = class extends Subscriber$1(s$3) {
8467
8920
  handleEscape(e2) {
8468
8921
  if (e2.key === "Escape") {
8469
8922
  const modals = [...document.querySelectorAll(tagName$i)];
8470
- modals.forEach((item) => {
8471
- if (!this.forceAction) {
8472
- item.hide();
8923
+ modals.forEach((modal) => {
8924
+ if (!modal.forceAction) {
8925
+ modal.hide();
8473
8926
  }
8474
8927
  });
8475
8928
  }
@@ -8485,11 +8938,14 @@ let Modal = class extends Subscriber$1(s$3) {
8485
8938
  };
8486
8939
  Modal.styles = [
8487
8940
  customScroll,
8488
- i$4`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:80vh;--sc-modal-rounded:var(--sc-rounded-lg)}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:990;align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:900;opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`
8941
+ i$4`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:80vh;--sc-modal-rounded:var(--sc-rounded-lg);--sc-modal-z-index:990}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:calc(var(--sc-modal-z-index) + 1);align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:var(--sc-modal-z-index);opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important;border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`
8489
8942
  ];
8490
8943
  __decorateClass$i([
8491
8944
  e$7({ type: Boolean })
8492
8945
  ], Modal.prototype, "forceAction", 2);
8946
+ __decorateClass$i([
8947
+ e$7({ type: Boolean })
8948
+ ], Modal.prototype, "removeOnHide", 2);
8493
8949
  __decorateClass$i([
8494
8950
  e$7({ type: String, reflect: true })
8495
8951
  ], Modal.prototype, "align", 2);
@@ -8508,6 +8964,9 @@ __decorateClass$i([
8508
8964
  __decorateClass$i([
8509
8965
  e$7({ type: String })
8510
8966
  ], Modal.prototype, "height", 2);
8967
+ __decorateClass$i([
8968
+ e$7({ type: String })
8969
+ ], Modal.prototype, "zIndex", 2);
8511
8970
  __decorateClass$i([
8512
8971
  e$7({ type: Boolean, reflect: true })
8513
8972
  ], Modal.prototype, "fullScreen", 2);
@@ -8552,27 +9011,38 @@ let Alert = class extends s$3 {
8552
9011
  constructor() {
8553
9012
  super(...arguments);
8554
9013
  this.label = "";
9014
+ this.noIcon = false;
8555
9015
  this.text = "";
9016
+ this.dismissible = false;
8556
9017
  this.background = false;
8557
9018
  this.status = "default";
8558
9019
  }
8559
9020
  render() {
8560
- return y`<div part="alert" class="alert"><div>${this.status && y`<sonic-icon name="${icon[this.status]}"></sonic-icon>`}</div><div>${this.label ? y`<span class="label">${o$2(this.label)}</span>` : b$1}<slot>${this.text}</slot></div></div>`;
9021
+ return y`<div part="alert" class="alert">${!this.noIcon ? y`<div>${this.status && y`<sonic-icon name="${icon[this.status]}"></sonic-icon>`}</div>` : b$1}<div>${this.label ? y`<span class="label">${o$3(this.label)}</span>` : b$1}<slot>${this.text}</slot></div>${this.dismissible ? y`<sonic-button @click="${this.close}" class="close-btn" variant="unstyled" shape="circle"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>` : b$1}</div>`;
9022
+ }
9023
+ close() {
9024
+ this.remove();
8561
9025
  }
8562
9026
  };
8563
9027
  Alert.styles = [
8564
9028
  fontSize,
8565
- i$4`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}`
9029
+ i$4`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert,:host([dismissible]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before,:host([dismissible]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div,:host([dismissible])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([dismissible]) .alert{padding-right:3rem}:host([dismissible]) .close-btn{padding:.5em;position:absolute;top:.25rem;right:.25rem}`
8566
9030
  ];
8567
9031
  __decorateClass$h([
8568
9032
  e$7({ type: String })
8569
9033
  ], Alert.prototype, "label", 2);
9034
+ __decorateClass$h([
9035
+ e$7({ type: Boolean, reflect: true })
9036
+ ], Alert.prototype, "noIcon", 2);
8570
9037
  __decorateClass$h([
8571
9038
  e$7({ type: String })
8572
9039
  ], Alert.prototype, "text", 2);
8573
9040
  __decorateClass$h([
8574
9041
  e$7({ type: String, reflect: true })
8575
9042
  ], Alert.prototype, "size", 2);
9043
+ __decorateClass$h([
9044
+ e$7({ type: Boolean, reflect: true })
9045
+ ], Alert.prototype, "dismissible", 2);
8576
9046
  __decorateClass$h([
8577
9047
  e$7({ type: Boolean, reflect: true })
8578
9048
  ], Alert.prototype, "background", 2);
@@ -8733,14 +9203,14 @@ let Divider = class extends s$3 {
8733
9203
  }
8734
9204
  }
8735
9205
  render() {
8736
- return y`<div part="divider"><span class="text">${o$2(this.label ? this.label : "")}<slot></slot></span></div>`;
9206
+ return y`<div part="divider"><span class="text">${o$3(this.label ? this.label : "")}<slot></slot></span></div>`;
8737
9207
  }
8738
9208
  };
8739
9209
  Divider.styles = [
8740
9210
  i$4`:host{--sc-divider-my:0.5rem;--sc-divider-mx:0;--sc-divider-border-width:max(1px, var(--sc-border-width));--sc-divider-border-color:var(--sc-border-color);--sc-divider-border-style:solid;--sc-divider-color:currentColor;--sc-divider-ff:var(--sc-font-family-base);--sc-divider-fs:1rem;--sc-divider-fw:var(--sc-font-weight-base);--sc-divider-fst:var(--sc-font-style-base);margin:var(--sc-divider-my) var(--sc-divider-mx);font-size:var(--sc-divider-fs);font-style:var(--sc-divider-fst);font-family:var(--sc-divider-ff);font-weight:var(--sc-divider-fw);color:var(--sc-divider-color);display:block}:host([size="2xs"]){--sc-divider-my:0.35rem;--sc-divider-fs:0.68rem}:host([size=xs]){--sc-divider-my:0.5rem;--sc-divider-fs:0.75rem}:host([size=sm]){--sc-divider-my:0.75rem;--sc-divider-fs:0.875rem}:host([size=md]){--sc-divider-my:1.25rem}:host([size=lg]){--sc-divider-my:1.85rem}:host([size=xl]){--sc-divider-my:2.25rem}:host([size="2xl"]){--sc-divider-my:3.35rem}div{display:flex;align-items:center;width:100%}div::after,div::before{content:"";flex-grow:1;border-top:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:100%;opacity:var(--sc-divider-opacity,1)}:host([align=left]) div:before{display:none}:host([align=right]) div:after{display:none}:host([vertical]){margin:var(--sc-divider-mx) var(--sc-divider-my)}:host([vertical]) div{flex-direction:column;height:100%;min-height:var(--sc-form-height)}:host([vertical]) .has-text{gap:.25rem}:host([vertical]) div::after,:host([vertical]) div::before{border-top:none;border-left:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:auto;height:100%;opacity:var(--sc-divider-opacity,1)}:host([noMargin]){margin:0}.text{flex-shrink:0;line-height:1.1;max-width:80%}.no-text .text{display:none}.has-text{gap:.5rem}`
8741
9211
  ];
8742
9212
  __decorateClass$e([
8743
- o$8()
9213
+ o$9()
8744
9214
  ], Divider.prototype, "slotNodes", 2);
8745
9215
  __decorateClass$e([
8746
9216
  i$5("div")
@@ -8800,7 +9270,7 @@ var __decorateClass$c = (decorators, target, key, kind) => {
8800
9270
  const tagName$c = "sonic-card-header";
8801
9271
  let CardHeader = class extends s$3 {
8802
9272
  render() {
8803
- return y`<div class="header"><div class="header-content">${o$2(this.label)} ${this.description ? y`<sonic-card-header-description>${o$2(this.description)}</sonic-card-header-description>` : ""}<slot></slot></div><slot name="suffix"></slot></div>`;
9273
+ return y`<div class="header"><div class="header-content">${o$3(this.label)} ${this.description ? y`<sonic-card-header-description>${o$3(this.description)}</sonic-card-header-description>` : ""}<slot></slot></div><slot name="suffix"></slot></div>`;
8804
9274
  }
8805
9275
  };
8806
9276
  CardHeader.styles = [